Power grid wiring diagram component and line identification system and method based on artificial intelligence

Through the grid wiring diagram identification system based on artificial intelligence, multiple subsystems are used to conduct preliminary position confirmation, identification and topological relationship judgment of grid wiring diagrams, the problem of degradation of recognition accuracy caused by different sizes and resolutions of grid factory wiring diagrams is solved, and the recognition accuracy is reduced due to the different sizes and resolutions of grid plants is realized. Highly accurate line identification and information conversion.

CN114299533BActive Publication Date: 2025-01-10HUNAN YINGCHAO INTELLIGENT COMPUTING RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111661655.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-01-10
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The size and resolution of the power grid factory wiring diagram are different, which makes it difficult for ordinary yolo models to identify the same size of the box, resulting in a decrease in accuracy.

Method used

A grid wiring diagram component and line recognition system based on artificial intelligence was designed, including a comprehensive detection subsystem, component category recognition system, text recognition and position correction subsystem, line topological relationship model subsystem and component topological relationship discrimination subsystem , through preliminary position confirmation, identification of components and text, acquisition of connection relationships of lines and identification of component topology relationships, the accurate identification of the power grid wiring diagram is achieved.

Benefits of technology

The accuracy of detection of small objects under different scales is improved, and the proportion of small objects in each sub-picture is consistent through cutting and secondary detection methods, which improves the accuracy of component detection, and converts paper information into electronic information. High-precision line recognition is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299533B_ABST
    Figure CN114299533B_ABST
Patent Text Reader

Abstract

The present invention provides a power grid wiring diagram component and line recognition system and method based on artificial intelligence, including: step 1, inputting the original power grid plant wiring diagram into a comprehensive detection subsystem, performing preliminary position confirmation on the components and text in the image, obtaining a first power grid plant wiring diagram, obtaining a second power grid plant wiring diagram containing only text information and a third power grid plant wiring diagram containing only component information through a detection subsystem based on the first power grid plant wiring diagram, the comprehensive detection subsystem inputting the first power grid plant wiring diagram into a component category recognition system, inputting the second power grid plant wiring diagram into a text recognition and position correction subsystem, and inputting the third power grid plant wiring diagram into a line topology relationship model subsystem. The present invention effectively recognizes and judges small objects, improves the detection of small objects at different scales, and performs cropping according to the size of the picture so that the proportion of small targets in each sub-picture is roughly the same, thereby solving the detection of small targets of different sizes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wiring diagram recognition, and in particular to an artificial intelligence-based power grid wiring diagram component and line recognition system and method. Background Art

[0002] At present, in the field of target recognition, the yolo detection model is mainly used for target detection, and there is not much application of the wiring diagram of the power grid plant. Since the wiring diagram of the power grid plant is relatively complex and small, yolo is more needed to process small targets. In addition, for the determination of the connection relationship of the components of the wiring diagram of the power grid plant, the topological relationship is more used to directly determine the corresponding line-to-line connection relationship. There is no model that makes judgments based on the analysis results of the image. The wiring diagram of the power grid plant is drawn by different power plants, and the complexity of the power plants described is different, resulting in different sizes and resolutions of the entire wiring diagram. For the ordinary yolo model, the size of the box to be identified is difficult to fit consistently, which ultimately leads to a decrease in accuracy. Summary of the invention

[0003] The present invention provides a power grid wiring diagram component and line identification system and method based on artificial intelligence, the purpose of which is to solve the problem that due to the different sizes and resolutions of power grid plant wiring diagrams, the size of the box to be identified is difficult to fit consistently for ordinary YOLO models, which ultimately leads to a decrease in accuracy.

[0004] In order to achieve the above-mentioned object, an embodiment of the present invention provides a power grid wiring diagram component and line identification system based on artificial intelligence, comprising:

[0005] A comprehensive detection subsystem, which is used to perform preliminary position confirmation of components and text in the power plant wiring diagram;

[0006] A component category recognition system, the component category recognition system is used to detect the position of the text, the position of the component, the category of the component and the angle of the component, and the first end of the component category recognition system is electrically connected to the first end of the comprehensive detection subsystem;

[0007] A character recognition and position correction subsystem, wherein a first end of the character recognition and position correction subsystem is electrically connected to a second end of the comprehensive detection subsystem, and the character recognition and position correction subsystem is used to detect and recognize characters;

[0008] A line topology relationship model subsystem, wherein a first end of the line topology relationship model subsystem is electrically connected to a second end of the component category identification subsystem, a second end of the line topology relationship model subsystem is electrically connected to a second end of the text recognition and position correction subsystem, and the line topology relationship model subsystem is used to identify the connection relationship of all lines in a circuit diagram;

[0009] A component topology relationship determination subsystem, wherein the first end of the component topology relationship determination subsystem is electrically connected to the third end of the comprehensive detection subsystem, the second end of the component topology relationship determination subsystem is electrically connected to the third end of the text recognition and position correction subsystem, the third end of the component topology relationship determination subsystem is electrically connected to the third end of the line topology relationship model subsystem, and the component topology relationship determination subsystem is used for determining component topology relationships.

[0010] The embodiment of the present invention further provides a method for identifying power grid wiring diagram components and lines based on artificial intelligence, comprising:

[0011] Step 1, input the original power grid plant wiring diagram into the comprehensive detection subsystem, perform preliminary position confirmation on the components and text in the image, obtain the first power grid plant wiring diagram, obtain the second power grid plant wiring diagram containing only text information and the third power grid plant wiring diagram containing only component information through the detection subsystem based on the first power grid plant wiring diagram, the comprehensive detection subsystem inputs the first power grid plant wiring diagram into the component category recognition system, the second power grid plant wiring diagram into the text recognition and position correction subsystem, and the third power grid plant wiring diagram into the line topology relationship model subsystem;

[0012] Step 2: The text recognition and position correction subsystem performs text recognition and position correction on the input second power grid plant wiring diagram to obtain basic information of the text, which is the position of the text in the power grid wiring diagram and the text content information. The text recognition and position correction subsystem inputs the basic information of the text into the line topology relationship model subsystem to name the line and the component topology relationship judgment subsystem to correct the category of the component;

[0013] Step 3, the line topology relationship model subsystem obtains the connection relationship of all lines and the number names of the lines according to the wiring diagram of the third power grid plant and the basic information of the text, and corrects the component position according to the connection relationship of the lines, adjusts the basic information of the text, and obtains the line connection relationship diagram. The line topology relationship model subsystem inputs the line connection relationship diagram into the component topology relationship determination subsystem;

[0014] Step 4: The component topology relationship determination subsystem determines the component topology relationship based on the component category and position results, the text category and position results, and the line connection relationship diagram to obtain a picture description result.

[0015] Wherein, the step 1 specifically includes:

[0016] Step 11, input the original power grid plant wiring diagram into the preliminary component detection model in the component detection classification system, and the preliminary component detection model outputs the size of the smallest component in the original power grid plant wiring diagram:

[0017] Step 111, the preliminary component detection model detects the original power grid plant wiring diagram to determine whether the component can be detected in the original power grid plant wiring diagram;

[0018] Step 112, when the component does not appear in the original power plant wiring diagram, the preliminary component detection model is revised and iterated;

[0019] Step 113, when a component appears in the original power plant wiring diagram, the preliminary component detection model finds the smallest component of the original power plant wiring diagram and outputs the size of the smallest component.

[0020] Wherein, the step 1 further comprises:

[0021] Step 12, cutting the original power grid plant wiring diagram according to the proportion of the size of the smallest component to the original power grid plant wiring diagram, the proportions of the cut sub-diagrams are consistent, and the original power grid plant wiring diagram is cut into multiple sub-diagrams;

[0022] The size of the cropping box is calculated during the cropping process as follows:

[0023]

[0024] Among them, minimum_element represents the area of ​​the smallest element in the image, ratio represents the proportional coefficient, and in the integer 6-bit detection model, the sum of the smallest pixels detected in an image is 6, on which the coefficient is added. Input_size represents the image size input by the component sub-image model, and crop_window_size represents the side length of the cropping box.

[0025] Wherein, the step 1 further comprises:

[0026] Step 13, pre-processing the multiple sub-images by denoising, grayscale mapping and HOG transformation respectively to obtain the processed sub-images;

[0027] Step 14, setting the initial value of the sub-graph detection model in the component detection classification system, correcting the loss function of the sub-graph detection model according to the length-width ratio of the frame in the power grid plant wiring diagram and the black-white characteristics in the power grid plant wiring diagram, adding the straight line corner determination to the determination of the loss function, and obtaining the corrected sub-graph detection model;

[0028] Step 15, input the processed multiple sub-images into the modified sub-image detection model to detect the component position and text position of each sub-image and mark the prediction box, wherein the prediction box includes the component box and the text box, to obtain the marked multiple sub-images.

[0029] Wherein, the step 1 further comprises:

[0030] Step 16: stitch the labeled sub-images to obtain the final component detection image:

[0031] Step 161, assembling the marked sub-images according to their positions, and fusing and splicing the components and text boxes in each marked sub-image;

[0032] Step 162, perform iou matching on the component frames in each annotated sub-image respectively with other component frames in adjacent annotated sub-images. The iou matching calculation formula is as follows:

[0033]

[0034] Among them, iou_small represents the overlap coefficient of two component frames, that is, the degree of overlap. 0 means that the two component frames are separated from each other without overlap, 1 means that the two component frames completely overlap, Sinner represents the overlapping area of ​​the two component frames, S1 represents the area of ​​the first component frame, and S2 represents the area of ​​the second component frame;

[0035] Step 163, when the IOU matching values ​​of the two component frames are greater than the set IOU matching threshold, the confidence difference between the two component frames and the area difference between the two component frames are calculated, and it is determined whether the confidence difference between the two component frames is greater than the set confidence difference threshold and whether the area difference between the two component frames is greater than the set area difference threshold;

[0036] Step 164, when the difference between the confidences of the two component frames is less than the set confidence difference threshold and the difference between the areas of the two component frames is less than the set area difference threshold, it is determined that the two component frames are the same object, and the two component frames are combined accordingly;

[0037] Step 165, when the difference between the confidences of the two component frames is greater than the set confidence difference threshold and the difference between the areas of the two component frames is greater than the set area difference threshold, the prediction frame with a smaller area is discarded and the component frame with a larger area is selected;

[0038] Step 166, when the difference between the confidences of the two component frames is less than the set confidence difference threshold and the difference between the areas of the two component frames is greater than the set area difference threshold, the component frame with the smaller area is determined to be a supplementary item, and the component frame with the smaller area is merged with the component frame with the larger area;

[0039] Step 167, when the confidence difference between the two component frames is greater than the set confidence difference threshold and the area difference between the two component frames is less than the set area difference threshold, it is determined that the two component frames have overlapping erroneous components, and similar occurrence times are found according to other sub-graphs to remove the erroneous overlap;

[0040] Step 168, until the IOU matching of the component frames between all the labeled sub-images and the adjacent labeled sub-images is completed, the final component detection image is obtained.

[0041] Wherein, the step 1 further comprises:

[0042] Step 17, the modified sub-image detection model outputs the final component detection image;

[0043] Step 18, extracting components from the final component detection picture according to the coordinates of each component in the final component detection picture to form a data set containing only the components, inputting the data set containing only the components into the first residual network for component classification, obtaining each component category and marking each component category on the final component detection picture;

[0044] Step 19, inputting the data set containing only components into the second residual network to distinguish the component angles, obtaining the angles of each component and marking the angles of each component on the final component detection picture to obtain the first power grid plant wiring diagram.

[0045] Wherein, the step 2 specifically includes:

[0046] Perform the following steps for all text boxes in the second grid plant wiring diagram:

[0047] Step 21, converting the input second power grid plant wiring diagram into a grayscale image, processing the grayscale image through an adaptive threshold and using an opening operation to remove noise in the grayscale image;

[0048] Step 22, calculating the sum of pixel values ​​row by row for the characters in the grayscale image after noise removal, and determining whether the sum of pixel values ​​in a row is zero;

[0049] Step 23, when the sum of the pixel values ​​of a row is zero, it means that the current row does not contain any characters and is a blank area;

[0050] Step 24, when the sum of the pixel values ​​of a row is not zero, it means that the current row belongs to a row of characters, jump to step 22, until the sum of the pixel values ​​of a row is not zero again, then the row between the two rows constitutes a character, and the character is saved in the dictionary character_dict.

[0051] Wherein, the step 2 further comprises:

[0052] Step 25, the key value of the dictionary indicates the character number, the value of the dictionary indicates the subscript of the starting row and the subscript of the ending row, and the value of each element is a list that records the starting column subscript and the ending column subscript of a character, and the number of character rows is obtained;

[0053] Step 26, judging based on the number of character lines, when the number of character lines is greater than 1, adding white edges to the characters to make them into a square three times the length of the long side of the original image, and using the character detection and character recognition network in optical character recognition to perform recognition and obtain basic information of the characters;

[0054] Step 27, when the number of character lines is less than 1, use the text recognition network in optical character recognition to perform recognition to obtain basic information of the text.

[0055] Wherein, the step 3 specifically includes:

[0056] Step 31, selecting components to be tested and non-standard files according to component types and component positions, and removing the selected non-standard files;

[0057] Step 32, selecting the components to be detected according to the text position and recognition, and eliminating all the selected components to be detected to obtain a picture with only lines;

[0058] Step 33, performing pixel point calculation, binarization and noise removal preprocessing on the image with only lines, obtaining the positions of horizontal and vertical lines, and obtaining a line connection relationship diagram.

[0059] The above scheme of the present invention has the following beneficial effects:

[0060] The power grid wiring diagram component and line identification system and method based on artificial intelligence described in the above-mentioned embodiment of the present invention mainly effectively identify and judge small objects, thereby improving the detection of small objects at different scales, that is, some images are large in size and the objects account for a small proportion. The image size is cropped to make the proportion of small targets in each sub-image roughly the same, thereby solving the detection of small targets of different sizes; through the method of secondary detection and cropping fusion, different power plant wiring diagrams are converted into the same scale, that is, the proportion of small targets in each sub-image remains consistent, thereby effectively improving the accuracy of component detection, and finally converting the image information into text information, including components, component names, and line wiring conditions, and can convert paper information into electronic information for storage. For line identification, it can achieve higher accuracy, can supplement and improve information such as line nodes and line names, and can connect the relationship between components through topological operations, and can effectively add components and lines to the final information file. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is the overall flow chart of the present invention;

[0062] Figure 2 It is a structural block diagram of the present invention;

[0063] Figure 3is a specific flow chart of the component category identification system of the present invention;

[0064] Figure 4 It is a specific flow chart of the text recognition and position correction subsystem of the present invention;

[0065] Figure 5 A specific flow chart of the line topology relationship model subsystem of the present invention;

[0066] Figure 6 This is the final component detection diagram of the present invention;

[0067] Figure 7 This is a schematic diagram of the first line detection result of the present invention;

[0068] Figure 8 It is a schematic diagram of the second line detection result of the present invention;

[0069] Fig. 9 This is a schematic diagram of the uncropped YOLO detection model training results of the present invention;

[0070] Fig.10 This is a schematic diagram of the training results of the cropped YOLO detection model of the present invention;

[0071] Fig.11 It is a result schematic diagram of the first residual network of the present invention.

[0072] [Description of Reference Numerals]

[0073] 1- Comprehensive detection subsystem; 2- Text recognition and position correction subsystem; 3- Component category recognition system; 4- Line topological relationship model subsystem; 5- Component topological relationship judgment subsystem. DETAILED DESCRIPTION

[0074] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0075] The present invention aims to solve the problem that due to the different sizes and resolutions of power grid plant wiring diagrams, it is difficult for ordinary yolo models to fit the sizes of boxes to be identified consistently, which ultimately leads to a decrease in accuracy. An artificial intelligence-based power grid wiring diagram component and line identification system and method are provided.

[0076] like Figures 1 to 11As shown, an embodiment of the present invention provides an artificial intelligence-based power grid wiring diagram component and line identification system, including: a comprehensive detection subsystem 1, the comprehensive detection subsystem 1 is used to perform preliminary position confirmation of components and texts in the power grid plant wiring diagram; a component category identification system 3, the component category identification system 3 is used to detect the position of texts, the position of components, the category of components and the angle of components, and the first end of the component category identification system 3 is electrically connected to the first end of the comprehensive detection subsystem 1; a text recognition and position correction subsystem 2, the first end of the text recognition and position correction subsystem 2 is electrically connected to the second end of the comprehensive detection subsystem 1, and the text recognition and position correction subsystem 2 is used to detect and recognize text; a line topology relationship model subsystem 4, the line topology relationship model subsystem 4 The first end of the topological relationship model subsystem 4 is electrically connected to the second end of the component category identification subsystem, the second end of the line topological relationship model subsystem 4 is electrically connected to the second end of the text recognition and position correction subsystem 2, and the line topological relationship model subsystem 4 is used to identify the connection relationship of all lines in the circuit diagram; the component topological relationship judgment subsystem 5, the first end of the component topological relationship judgment subsystem 5 is electrically connected to the third end of the comprehensive detection subsystem 1, the second end of the component topological relationship judgment subsystem 5 is electrically connected to the third end of the text recognition and position correction subsystem 2, the third end of the component topological relationship judgment subsystem 5 is electrically connected to the third end of the line topological relationship model subsystem 4, and the component topological relationship judgment subsystem 5 is used to judge the component topological relationship.

[0077] The power grid wiring diagram component and line recognition system and method based on artificial intelligence described in the above embodiment of the present invention, the component detection system, for the given power grid plant wiring diagram, the input of the system is the power grid field wiring diagram, through the target detection model, finally obtains the output of two branches, respectively, the text and the relevant information of the component. The text information includes the position of the text, and the component information includes the component position, component category and component angle. The text recognition system realizes the text recognition within the text position range obtained in the component detection system, and corrects the text according to the relevant text characteristics of the power grid plant wiring diagram. Since the text and the component in the wiring diagram are one-to-one corresponding, the text recognition is corrected again according to the component type and the text of the component; the topological relationship model of the line, using image processing means, by corroding and expanding the pixel points, the specific position of each line can be analyzed, and then the relevant connection information of each line is obtained according to the type of component and the information of the text, so as to finally obtain the connection relationship of the lines of all circuit diagrams, and according to the connection topological relationship, the position adjustment of the component and the result of the text can be corrected.

[0078] An embodiment of the present invention also provides a method for identifying components and lines in a power grid wiring diagram based on artificial intelligence, including: step 1, inputting the original power grid plant wiring diagram into a comprehensive detection subsystem 1, performing preliminary position confirmation on the components and text in the image, and obtaining a first power grid plant wiring diagram, and obtaining a second power grid plant wiring diagram containing only text information and a third power grid plant wiring diagram containing only component information through a detection subsystem based on the first power grid plant wiring diagram, the comprehensive detection subsystem 1 inputs the first power grid plant wiring diagram into a component category recognition system 3, inputs the second power grid plant wiring diagram into a text recognition and position correction subsystem 2, and inputs the third power grid plant wiring diagram into a line topology relationship model subsystem 4; step 2, the text recognition and position correction subsystem 2 performs text recognition and position correction on the input second power grid plant wiring diagram to obtain basic information of the text, and the basic information of the text is the text The text recognition and position correction subsystem 2 inputs the basic information of the text into the line topology relationship model subsystem 4 to name the line and the component topology relationship judgment subsystem 5 to correct the category of the component; step 3, the line topology relationship model subsystem 4 obtains the connection relationship of all lines and the number name of the line according to the third power grid plant wiring diagram and the basic information of the text, and corrects the component position according to the connection relationship of the line, adjusts the basic information of the text, and obtains the line connection relationship diagram. The line topology relationship model subsystem 4 inputs the line connection relationship diagram into the component topology relationship judgment subsystem 5; step 4, the component topology relationship judgment subsystem 5 judges the component topology relationship according to the category and position results of the component, the category and position results of the text and the line connection relationship diagram to obtain the picture description result.

[0079] The artificial intelligence-based power grid wiring diagram component and line identification system and method described in the above-mentioned embodiment of the present invention, the voltage change from the component to the transformer, starting from the bus, according to the principle of the topological tree, determines whether the transformer is traversed. If the transformer is not traversed, each original component passing through the line is the voltage; the judgment of the intersection of the line segments, the intersection is divided into wires and wires, and busbars and wires, where the wires and wires are divided into two small line segments starting from the connection point; the busbar and the wire are mainly judged whether there is a circle. If the circle appears or the component appears in the line, the line is judged to be related to the busbar vector, otherwise it is a crossing situation and the nearby text is associated. In the topological relationship of the line, it is not only necessary to judge the position and connection of the line. According to the connection situation, the components in the entire picture need to be named, and the naming method is based on the connection relationship of the line, so as to obtain the names of all the line segments and components in the picture.

[0080] Wherein, the step 1 specifically includes: step 11, inputting the original power grid plant wiring diagram into a preliminary component detection model in the component detection classification system, and the preliminary component detection model outputs the size of the smallest component in the original power grid plant wiring diagram; step 111, the preliminary component detection model detects the original power grid plant wiring diagram to determine whether the component can be detected in the original power grid plant wiring diagram; step 112, when the component does not appear in the original power grid plant wiring diagram, the preliminary component detection model is corrected and iterated; step 113, when the component appears in the original power grid plant wiring diagram, the preliminary component detection model finds the smallest component in the original power grid plant wiring diagram and outputs the size of the smallest component.

[0081] In the artificial intelligence-based power grid wiring diagram component and line identification system and method described in the above embodiments of the present invention, the preliminary component detection model and the sub-graph detection model are both yolo detection models.

[0082] Wherein, the step 1 further includes: step 12, cutting the original power grid plant wiring diagram according to the proportion of the size of the smallest component to the original power grid plant wiring diagram, the proportions of the cut sub-diagrams are consistent, and cutting the original power grid plant wiring diagram into multiple sub-diagrams;

[0083] The size of the cropping box is calculated during the cropping process as follows:

[0084]

[0085] Among them, minimum_element represents the area of ​​the smallest element in the image, ratio represents the proportional coefficient, and in the integer 6-bit detection model, the sum of the smallest pixels detected in an image is 6, on which the coefficient is added. Input_size represents the image size input by the component sub-image model, and crop_window_size represents the side length of the cropping box.

[0086] Wherein, the step 1 also includes: step 13, pre-processing the multiple sub-images by denoising, grayscale and HOG transformation respectively, to obtain the processed multiple sub-images; step 14, setting the initial value of the sub-image detection model in the component detection classification system, correcting the loss function of the sub-image detection model according to the aspect ratio of the box in the power grid plant wiring diagram and the black and white characteristics in the power grid plant wiring diagram, adding the straight line corner judgment to the judgment of the loss function, and obtaining the corrected sub-image detection model; step 15, inputting the processed multiple sub-images into the corrected sub-image detection model to detect the component position and text position of each sub-image and mark the prediction box, wherein the prediction box includes the component box and the text box, to obtain the marked multiple sub-images.

[0087] Wherein, the step 1 also includes: step 16, performing sub-image splicing on the multiple annotated sub-images to obtain the final component detection image; step 161, performing splicing on the multiple annotated sub-images according to the sub-image positions, and fusing and splicing the components and text boxes in each annotated sub-image; step 162, performing iou matching on the component boxes in each annotated sub-image respectively with other component boxes in the adjacent annotated sub-images, and the iou matching calculation formula is as follows:

[0088]

[0089] Among them, iou_small represents the overlap coefficient of two component frames, that is, the degree of overlap. 0 means that the two component frames are separated from each other without overlap, 1 means that the two component frames completely overlap, Sinner represents the overlapping area of ​​the two component frames, S1 represents the area of ​​the first component frame, and S2 represents the area of ​​the second component frame;

[0090] Step 163, when the iou matching value of the two component frames is greater than the set iou matching threshold, calculate the confidence difference of the two component frames and the area difference of the two component frames, and judge whether the confidence difference of the two component frames is greater than the set confidence difference threshold and whether the area difference of the two component frames is greater than the set area difference threshold; Step 164, when the confidence difference of the two component frames is less than the set confidence difference threshold and the area difference of the two component frames is less than the set area difference threshold, judge that the two component frames are the same object and combine the two component frames accordingly; Step 165, when the confidence difference of the two component frames is greater than the set confidence difference threshold and the area difference of the two component frames is greater than the set area difference threshold, discard the small area component frames. Prediction frame, select the component frame with a large area; step 166, when the difference in confidence between the two component frames is less than the set confidence difference threshold and the difference in area between the two component frames is greater than the set area difference threshold, determine that the component frame with a small area is a supplementary item, and merge the component frame with the component frame with a large area; step 167, when the difference in confidence between the two component frames is greater than the set confidence difference threshold and the difference in area between the two component frames is less than the set area difference threshold, determine that the two component frames have overlapping erroneous components, find similar occurrence times based on other sub-images, and remove erroneous overlaps; step 168, until the iou matching of the component frames between all annotated sub-images and adjacent annotated sub-images is completed, the final component detection image is obtained.

[0091] The artificial intelligence-based power grid wiring diagram component and line identification system and method described in the above-mentioned embodiment of the present invention mainly uses the idea of ​​non-maximum suppression in the process of splicing sub-graphs. First, different categories are determined. In the category to which each box belongs, the components and text boxes in the yolo output in each sub-graph are fused and spliced, and the component box in each sub-graph is iou matched with other component boxes. For two boxes with larger iou, the confidence of each box is fused. If the confidence of the two boxes is less than a certain threshold, the two boxes are judged to represent the same position, and it is judged that there is a slight deviation in the position of the box, and the two boxes are fused; if the confidence is greater than a certain threshold, it is judged that one of the two boxes is correct and the other box has a larger deviation, and only the box with a larger confidence is selected as the fused box.

[0092] Wherein, the step 1 also includes: step 17, the modified sub-image detection model outputs the final component detection picture; step 18, taking out the components from the final component detection picture according to the coordinates of each component in the final component detection picture, forming a data set containing only the components, inputting the data set containing only the components into the first residual network for component classification, obtaining each component category and marking each component category on the final component detection picture; step 19, inputting the data set containing only the components into the second residual network for component angle distinction, obtaining each component angle and marking each component angle on the final component detection picture, and obtaining the first power grid plant wiring diagram.

[0093] The artificial intelligence-based power grid wiring diagram component and line identification system and method described in the above-mentioned embodiments of the present invention, for component classification, first, the components are taken out from the original image according to the coordinates of each component obtained by target detection to form a data set containing only the components, and the first residual network is used for classification to determine the category of each component; secondly, since the same type of components need to be distinguished by angle, the data set is further expanded on the basis of the component category determination, and images of the same category at different angles are added, and the second residual network is used again to classify the four angles.

[0094] Wherein, the step 2 specifically includes: performing the following steps on all text boxes in the second power grid plant wiring diagram: step 21, converting the input second power grid plant wiring diagram into a grayscale image, processing the grayscale image through an adaptive threshold and using an open operation to remove noise in the grayscale image; step 22, calculating the sum of pixel values ​​by row for the characters in the grayscale image after noise removal, and judging whether the sum of pixel values ​​of a row is zero; step 23, when the sum of pixel values ​​of a row is zero, it indicates that the current row does not contain any characters and is a blank area; step 24, when the sum of pixel values ​​of a row is not zero, it indicates that the current row belongs to a row of characters, and jumps to step 22 until the sum of pixel values ​​of a row is not zero again, then the row between the two rows constitutes a character, and the character is saved in the dictionary character_dict.

[0095] Wherein, the step 2 also includes: step 25, the key value of the dictionary indicates the character number, the value of the dictionary indicates the subscript of the starting row and the subscript of the ending row, the value of each element is a list that records the starting column subscript and the ending column subscript of a character, and the number of character rows is obtained; step 26, judging according to the number of character rows, when the number of text rows is greater than 1, the text is added with a white border to become a square three times the length of the long side of the original image, and the text detection and text recognition network in optical character recognition are used for recognition to obtain the basic information of the text; step 27, when the number of character rows is less than 1, the text recognition network in optical character recognition is used for recognition to obtain the basic information of the text.

[0096] Among them, the step 3 specifically includes: step 31, selecting components to be detected and non-standard files according to component category and component position, and eliminating the selected non-standard files; step 32, selecting components to be detected according to text position and recognition, eliminating all selected components to be detected, and obtaining a picture with only lines; step 33, performing pixel point calculation, binarization and denoising preprocessing on the picture with only lines, obtaining the positions of horizontal and vertical lines, and obtaining a line connection relationship diagram.

[0097] The power grid wiring diagram component and line identification system and method based on artificial intelligence described in the above embodiment of the present invention first compares the accuracy before and after cutting. Fig. 9 This is the uncut YOLO detection model training result. Fig.10 The following are the training results of the cropped yolo detection model. Through the comparison of the training results, we can find that the map has been improved to a certain extent, and the loss functions in the validation set have been reduced to a certain extent. After target detection, two residual networks are trained for category and angle training respectively. The results of the first residual network are as follows: Fig.11,Through the results of category detection, it can be found that the final accuracy of the ,resnet added can reach 0.99, which effectively improves the classification ,accuracy of the detection backend.

[0098] The artificial intelligence-based power grid wiring diagram component and line identification system and method described in the above-mentioned embodiments of the present invention are mainly used in paperless services for power plant network wiring. Since they mainly discuss the identification of small object components, they can mainly perform effective identification and judgment on small objects, thereby improving the detection of small objects at different scales. That is, some images are large in size, but the objects account for a small proportion. The images are cropped according to the size so that the proportion of small targets in each sub-image is roughly the same, thereby solving the detection of small targets of different sizes.

[0099] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An artificial intelligence-based power grid wiring diagram component and line identification system, characterized in that: include: A comprehensive detection subsystem, which is used to perform preliminary position confirmation of components and text in the power plant wiring diagram; A component category recognition system, the component category recognition system is used to detect the position of the text, the position of the component, the category of the component and the angle of the component, and the first end of the component category recognition system is electrically connected to the first end of the comprehensive detection subsystem; A character recognition and position correction subsystem, wherein a first end of the character recognition and position correction subsystem is electrically connected to a second end of the comprehensive detection subsystem, and the character recognition and position correction subsystem is used to detect and recognize characters; A line topology relationship model subsystem, wherein a first end of the line topology relationship model subsystem is electrically connected to a second end of the component category identification subsystem, a second end of the line topology relationship model subsystem is electrically connected to a second end of the text recognition and position correction subsystem, and the line topology relationship model subsystem is used to identify the connection relationship of all lines in a circuit diagram; A component topology relationship determination subsystem, wherein the first end of the component topology relationship determination subsystem is electrically connected to the third end of the comprehensive detection subsystem, the second end of the component topology relationship determination subsystem is electrically connected to the third end of the text recognition and position correction subsystem, the third end of the component topology relationship determination subsystem is electrically connected to the third end of the line topology relationship model subsystem, and the component topology relationship determination subsystem is used for determining component topology relationships.

2. A method for identifying power grid wiring diagram components and lines based on artificial intelligence, applied to the power grid wiring diagram component and line identification system based on artificial intelligence as claimed in claim 1, characterized in that: include: Step 1, input the original power grid plant wiring diagram into the comprehensive detection subsystem, perform preliminary position confirmation on the components and text in the image, obtain the first power grid plant wiring diagram, obtain the second power grid plant wiring diagram containing only text information and the third power grid plant wiring diagram containing only component information through the detection subsystem based on the first power grid plant wiring diagram, the comprehensive detection subsystem inputs the first power grid plant wiring diagram into the component category recognition system, the second power grid plant wiring diagram into the text recognition and position correction subsystem, and the third power grid plant wiring diagram into the line topology relationship model subsystem; Step 2: The text recognition and position correction subsystem performs text recognition and position correction on the input second power grid plant wiring diagram to obtain basic information of the text, which is the position of the text in the power grid wiring diagram and the text content information. The text recognition and position correction subsystem inputs the basic information of the text into the line topology relationship model subsystem to name the line and the component topology relationship judgment subsystem to correct the category of the component; Step 3, the line topology relationship model subsystem obtains the connection relationship of all lines and the number names of the lines according to the wiring diagram of the third power grid plant and the basic information of the text, and corrects the component position according to the connection relationship of the lines, adjusts the basic information of the text, and obtains the line connection relationship diagram. The line topology relationship model subsystem inputs the line connection relationship diagram into the component topology relationship determination subsystem; Step 4: The component topology relationship determination subsystem determines the component topology relationship based on the component category and position results, the text category and position results, and the line connection relationship diagram to obtain a picture description result.

3. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 2, characterized in that: The step 1 specifically includes: Step 11, input the original power grid plant wiring diagram into the preliminary component detection model in the component detection classification system, and the preliminary component detection model outputs the size of the smallest component in the original power grid plant wiring diagram: Step 111, the preliminary component detection model detects the original power grid plant wiring diagram to determine whether the component can be detected in the original power grid plant wiring diagram; Step 112, when the component does not appear in the original power plant wiring diagram, the preliminary component detection model is revised and iterated; Step 113, when a component appears in the original power plant wiring diagram, the preliminary component detection model finds the smallest component of the original power plant wiring diagram and outputs the size of the smallest component.

4. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 3, characterized in that: The step 1 also includes: Step 12, cutting the original power grid plant wiring diagram according to the proportion of the size of the smallest component to the original power grid plant wiring diagram, the proportions of the cut sub-diagrams are consistent, and the original power grid plant wiring diagram is cut into multiple sub-diagrams; The size of the cropping box is calculated during the cropping process as follows: Among them, minimum_element represents the area of ​​the smallest element in the image, ratio represents the proportional coefficient, and in the integer 6-bit detection model, the sum of the smallest pixels detected in an image is 6, on which the coefficient is added. Input_size represents the image size input by the component sub-image model, and crop_window_size represents the side length of the cropping box.

5. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 4, characterized in that: The step 1 also includes: Step 13, pre-processing the multiple sub-images by denoising, grayscale mapping and HOG transformation respectively to obtain the processed sub-images; Step 14, setting the initial value of the sub-graph detection model in the component detection classification system, correcting the loss function of the sub-graph detection model according to the length-width ratio of the frame in the power grid plant wiring diagram and the black-white characteristics in the power grid plant wiring diagram, adding the straight line corner determination to the determination of the loss function, and obtaining the corrected sub-graph detection model; Step 15, input the processed multiple sub-images into the modified sub-image detection model to detect the component position and text position of each sub-image and mark the prediction box, wherein the prediction box includes the component box and the text box, to obtain the marked multiple sub-images.

6. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 5, characterized in that: The step 1 also includes: Step 16: stitch the labeled sub-images to obtain the final component detection image: Step 161, assembling the marked sub-images according to their positions, and fusing and splicing the components and text boxes in each marked sub-image; Step 162, perform iou matching on the component frames in each annotated sub-image respectively with other component frames in adjacent annotated sub-images. The iou matching calculation formula is as follows: Among them, iou_small represents the overlap coefficient of two component frames, that is, the degree of overlap. 0 means that the two component frames are separated from each other without overlap, 1 means that the two component frames completely overlap, Sinner represents the overlapping area of ​​the two component frames, S1 represents the area of ​​the first component frame, and S2 represents the area of ​​the second component frame; Step 163, when the IOU matching values ​​of the two component frames are greater than the set IOU matching threshold, the confidence difference between the two component frames and the area difference between the two component frames are calculated, and it is determined whether the confidence difference between the two component frames is greater than the set confidence difference threshold and whether the area difference between the two component frames is greater than the set area difference threshold; Step 164, when the difference between the confidences of the two component frames is less than the set confidence difference threshold and the difference between the areas of the two component frames is less than the set area difference threshold, it is determined that the two component frames are the same object, and the two component frames are combined accordingly; Step 165, when the difference between the confidences of the two component frames is greater than the set confidence difference threshold and the difference between the areas of the two component frames is greater than the set area difference threshold, the prediction frame with a smaller area is discarded and the component frame with a larger area is selected; Step 166, when the difference between the confidences of the two component frames is less than the set confidence difference threshold and the difference between the areas of the two component frames is greater than the set area difference threshold, the component frame with the smaller area is determined to be a supplementary item, and the component frame with the smaller area is merged with the component frame with the larger area; Step 167, when the confidence difference between the two component frames is greater than the set confidence difference threshold and the area difference between the two component frames is less than the set area difference threshold, it is determined that the two component frames have overlapping erroneous components, and similar occurrence times are found according to other sub-graphs to remove the erroneous overlap; Step 168, until the IOU matching of the component frames between all the labeled sub-images and the adjacent labeled sub-images is completed, the final component detection image is obtained.

7. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 6, characterized in that: The step 1 also includes: Step 17, the modified sub-image detection model outputs the final component detection image; Step 18, extracting components from the final component detection picture according to the coordinates of each component in the final component detection picture to form a data set containing only the components, inputting the data set containing only the components into the first residual network for component classification, obtaining each component category and marking each component category on the final component detection picture; Step 19, inputting the data set containing only components into the second residual network to distinguish the component angles, obtaining the angles of each component and marking the angles of each component on the final component detection picture to obtain the first power grid plant wiring diagram.

8. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 7, characterized in that: The step 2 specifically includes: Perform the following steps for all text boxes in the second grid plant wiring diagram: Step 21, converting the input second power grid plant wiring diagram into a grayscale image, processing the grayscale image through an adaptive threshold and using an opening operation to remove noise in the grayscale image; Step 22, calculating the sum of pixel values ​​row by row for the characters in the grayscale image after noise removal, and determining whether the sum of pixel values ​​in a row is zero; Step 23, when the sum of the pixel values ​​of a row is zero, it means that the current row does not contain any characters and is a blank area; Step 24, when the sum of the pixel values ​​of a row is not zero, it means that the current row belongs to a row of characters, jump to step 22, until the sum of the pixel values ​​of a row is not zero again, then the row between the two rows constitutes a character, and the character is saved in the dictionary character_dict.

9. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 8, characterized in that: The step 2 also includes: Step 25, the key value of the dictionary indicates the character number, the value of the dictionary indicates the subscript of the starting row and the subscript of the ending row, and the value of each element is a list that records the starting column subscript and the ending column subscript of a character, and the number of character rows is obtained; Step 26, judging based on the number of character lines, when the number of character lines is greater than 1, adding white edges to the characters to make them into a square three times the length of the long side of the original image, and using the character detection and character recognition network in optical character recognition to perform recognition and obtain basic information of the characters; Step 27, when the number of character lines is less than 1, use the text recognition network in optical character recognition to perform recognition to obtain basic information of the text.

10. The method for identifying power grid wiring diagram components and lines based on artificial intelligence according to claim 9, characterized in that: The step 3 specifically includes: Step 31, selecting components to be tested and non-standard files according to component types and component positions, and removing the selected non-standard files; Step 32, selecting the components to be detected according to the text position and recognition, and eliminating all the selected components to be detected to obtain a picture with only lines; Step 33, performing pixel point calculation, binarization and noise removal preprocessing on the image with only lines, obtaining the positions of horizontal and vertical lines, and obtaining a line connection relationship diagram.

Citation Information

Patent Citations

  • Automatic intelligent power grid partitioning method

    CN104218673A

  • A method and system for automatically generating a large-scale power grid electromagnetic transient simulation model

    CN109766586A