CAD drawing power grid equipment modeling element extraction and matching method and device

By combining OCR block processing and edge detection with a position-aware algorithm, the problem of inaccurate matching between graphic elements and text information in non-vector CAD drawings is solved, achieving efficient extraction and matching of power grid equipment modeling elements, and improving the accuracy and intelligence level of power grid equipment modeling.

CN121963245APending Publication Date: 2026-05-01BEIJING UNIV OF POSTS & TELECOMM +2
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2025-12-01
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing CAD drawing modeling methods suffer from problems such as inaccurate matching of graphic elements and text information, low computational efficiency, and insufficient robustness when processing non-vector drawings. In particular, they are difficult to achieve high-precision extraction of equipment parameters in complex backgrounds and multi-table nested layouts.

Method used

OCR technology is used for block processing and text region detection. The edge detection algorithm is combined with the table frame recognition. The cross-modal matching relationship between primitives and text is established through the position-aware algorithm to generate structured data.

Benefits of technology

It significantly improves the accuracy and completeness of matching power grid equipment elements with text parameters in non-vector CAD drawings, enhances the extraction efficiency and accuracy of modeling elements, and supports the intelligent design and management of power grid equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963245A_ABST
    Figure CN121963245A_ABST
Patent Text Reader

Abstract

The invention provides a CAD drawing power grid equipment modeling element extraction and matching method and device. According to the CAD drawing power grid equipment modeling element extraction and matching method and device provided by the embodiment of the invention, cross-modal accurate matching of power grid equipment primitives and text parameters in a non-vector CAD drawing can be effectively realized, the integrity and accuracy of modeling element extraction are remarkably improved, and intelligent design, operation and maintenance of a power system are supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and apparatus for extracting and matching modeling elements of power grid equipment in CAD drawings. Background Technology

[0002] CAD drawings, as the core data carrier for intelligent design and operation of power systems, are widely used in key stages such as power grid equipment modeling, facility archive construction, and project review. With the development of artificial intelligence and deep learning technologies, CAD drawing analysis has gradually formed a multimodal information processing system, encompassing a complete technical architecture from primitive recognition and text detection to cross-modal matching. Specifically, this system includes key components such as an OCR-based text recognition module, an edge detection-driven structural analysis module, and a location-aware text-image association module. Traditional methods largely rely on the structured features of vector format drawings, achieving information acquisition through independent processing of symbol recognition and text extraction. However, multimodal collaborative processing for non-vector drawings is still in the exploratory stage, urgently requiring breakthroughs in systemic bottlenecks such as text-image separation and parameter fragmentation.

[0003] However, existing methods for extracting modeling elements from CAD drawings have significant limitations when dealing with non-vector graphics. Specifically, while traditional OCR technologies (such as EAST and CTPN) can recognize text content, they lack the ability to model the spatial relationships between graphic elements and text, leading to inaccurate matching of parameter information and equipment symbols. Consequently, while edge detection algorithms can provide region segmentation support in table structure parsing, they struggle with the computational efficiency issues of high-resolution drawings and lack robustness in recognizing short lines. Furthermore, the isolated processing of graphic element recognition results and text information prevents the formation of structured relationships between parameters such as equipment names and specifications, thus affecting the accuracy of digital twin power grid construction. The complex background interference, nested multi-table layouts, and symbol misrecognition issues in non-vector graphics further exacerbate the challenges to the completeness of modeling element extraction, hindering the power industry's transformation from manual analysis to intelligent management. Summary of the Invention

[0004] The present invention aims to at least partially solve one of the technical problems in the related art.

[0005] Therefore, the first objective of this invention is to propose a method for extracting and matching modeling elements of power grid equipment in CAD drawings.

[0006] The second objective of this invention is to provide a device for extracting and matching modeling elements of power grid equipment in CAD drawings.

[0007] To achieve the above objectives, a first aspect of the present invention proposes a method for extracting and matching modeling elements of power grid equipment in CAD drawings, comprising: S1 uses OCR technology to segment non-vector CAD drawings into blocks and detect text areas to obtain text location information and content; S2 uses an edge detection algorithm to identify the table frame and line structure in the drawing, and divides the text classification area based on the table cell. S3 combines primitive recognition results, text detection results, and table structure information, and uses a position-aware algorithm to analyze the coordinate relationship, orientation dependence, and table boundary constraints between primitives and text to establish cross-modal matching relationships; S4 generates structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters.

[0008] In one embodiment of the present invention, S1 includes: S11, Non-vector CAD drawings are divided into blocks according to the preset sliding window size to reduce the impact of large-size images on detection accuracy; S12, intelligently merge adjacent text blocks based on text location information. The merging conditions include that the spacing between text blocks is less than a preset threshold and the text direction is consistent.

[0009] In one embodiment of the present invention, S2 includes: S21, the Canny edge detection algorithm is used to identify lines in the preprocessed drawing, and dual thresholds are set to enhance the robustness of the table frame; S22, by analyzing the coordinates of the line intersections and the table boundary information, constructs a cell grid structure and spatially maps the text classification area to the cell position.

[0010] In one embodiment of the present invention, S3 includes: S31, based on the proximity constraint between the device name and the parameter text, set the Euclidean distance between the center point of the graphic element and the center point of the text box to be less than a preset threshold as the initial matching condition; S32 introduces a directionality check rule: when there is a rotation angle difference between the text label and the graphic element, the matching correction is performed by ensuring that the rotation angle difference of the smallest bounding rectangle is less than 15°.

[0011] In one embodiment of the present invention, it further includes: S5 detects the connection lines between elements in the drawing and identifies the topological relationship between live wires, neutral wires, and ground wires; S6, based on the identification results of the connection lines, establishes a three-dimensional spatial model of the logical connection relationship between graphic elements, and generates a complete connection relationship dataset of power grid equipment.

[0012] To achieve the above objectives, a second aspect of the present invention provides a device for extracting and matching modeling elements of power grid equipment in CAD drawings, comprising: The text region acquisition module is used to segment non-vector CAD drawings using OCR technology and detect text regions to obtain text location information and content. The table structure recognition module is used to identify the table frame and line structure in drawings through edge detection algorithms, and to divide the text classification area based on the table cells; The cross-modal matching analysis module combines primitive recognition results, text detection results, and table structure information, and uses position-aware algorithms to analyze the coordinate relationship, orientation dependence, and table boundary constraints between primitives and text to establish cross-modal matching relationships. The structured data generation module is used to generate structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters.

[0013] The method and apparatus of this invention can effectively solve the cross-modal matching problem between power grid equipment elements and text parameters in non-vector CAD drawings, and significantly improve the completeness and accuracy of modeling element extraction.

[0014] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0015] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a method for extracting and matching modeling elements of power grid equipment in CAD drawings according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a method for extracting and matching modeling elements of power grid equipment in CAD drawings according to an embodiment of the present invention; Figure 3 This is the overall architecture of the structure-context reasoning framework according to an embodiment of the present invention; Figure 4 This refers to CAD text extraction and structural analysis according to embodiments of the present invention; Figure 5 According to an embodiment of the present invention, the table area is geometrically divided and a grid topology is established; Figure 6 This is a graphical representation of the region division used for candidate text filtering according to an embodiment of the present invention; Figure 7 This is a diagram showing the result of extracting drawing information according to an embodiment of the present invention; Figure 8 This is a diagram showing the image-text matching result according to an embodiment of the present invention; Figure 9This is a structural diagram of a CAD drawing power grid equipment modeling element extraction and matching device according to an embodiment of the present invention. Detailed Implementation

[0016] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0017] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0018] The following describes, with reference to the accompanying drawings, a method and apparatus for extracting and matching modeling elements of power grid equipment from CAD drawings, according to an embodiment of the present invention.

[0019] Example 1 Figure 1 This is a flowchart of a method for extracting and matching modeling elements of power grid equipment from CAD drawings, according to an embodiment of the present invention. Figure 1 As shown, it includes: S1 uses OCR technology to segment non-vector CAD drawings into blocks and detect text areas to obtain text location information and content.

[0020] Specifically, in some implementations, this step uses OCR technology to segment non-vector CAD drawings and detect text regions to obtain the location information and content of the text. This is a crucial preliminary step in the entire method for extracting and matching power grid equipment modeling elements from CAD drawings. Since non-vector CAD drawings are stored in pixel image format, their text information lacks structured features. Therefore, efficient extraction requires a combination of image processing and OCR recognition.

[0021] Furthermore, the CAD drawings are first preprocessed, including grayscale and binarization, to enhance the contrast between text and background and reduce image noise interference with OCR recognition. After preprocessing, the text detection module of PaddleOCRv4 is used for text region recognition. PaddleOCR is based on a deep learning model, and its detection module uses advanced algorithms such as DBNet (Differentiable Binarization Network) or EAST (Efficient and Accurate Scene Text Detector). Through multi-scale feature fusion and end-to-end detection mechanisms, it achieves accurate localization of text regions in any direction, with different fonts and layouts. Considering that CAD drawings are usually high-resolution and large in size, to avoid a decrease in detection accuracy due to excessively large images, this method adopts a sliding window block processing strategy, dividing the image into multiple 500×500 pixel sub-blocks for independent detection. After detection, adjacent text regions are intelligently merged into complete text blocks through clustering and merging algorithms based on text location information, ensuring the consistency and completeness of the extraction results.

[0022] Furthermore, the confidence threshold for OCR detection in this step is set to 0.5 to filter out low-confidence misidentification results. Experiments show that on the Southern Power Grid CAD drawing dataset, this method achieves an average text detection accuracy of 94.73% in four typical drawing types, significantly outperforming the traditional EAST and CTPN methods. In addition, the output format for the text region is standardized bounding box coordinates (x_min, y_min, x_max, y_max) and the identified text content, facilitating subsequent text classification and image-text matching processing.

[0023] Furthermore, this step is widely applicable to the automated parsing of non-vector CAD drawings in the power industry, such as typical design drawings for 10kV and below power expansion projects. By efficiently extracting textual information such as equipment names, specifications, and technical descriptions from the drawings, it provides structured data support for subsequent element recognition and text-image matching, thereby achieving the automatic extraction and association of power grid equipment modeling elements.

[0024] Furthermore, this step effectively solves the problem of difficult structured extraction of text information from non-vector CAD drawings, laying a solid foundation for subsequent parameter matching and element-text association. Its high-precision text detection capability significantly improves the completeness and accuracy of modeling elements, providing reliable data support for the intelligent design and operation and maintenance management of power engineering.

[0025] Furthermore, S1 includes: S11 divides the non-vector CAD drawing into blocks according to the preset sliding window size to reduce the impact of large-size images on detection accuracy.

[0026] Specifically, in some implementations, to address the potential decrease in detection accuracy when processing large-size images of non-vector CAD drawings, this method employs a block-based processing strategy with a preset sliding window size (500×500 pixels). This divides the original image into multiple overlapping or non-overlapping local regions to improve the stability and accuracy of text detection. The technical implementation of this step is based on image segmentation and region-level processing mechanisms. Its core principle lies in reducing image complexity through localization, thereby optimizing the performance of the OCR model in large-size images.

[0027] Furthermore, the non-vector CAD drawing is first preprocessed, including grayscale conversion, binarization, and noise suppression, to enhance the contrast between text and background. Then, a sliding window algorithm is used to divide the processed image into blocks according to a set window size (500×500 pixels). The sliding window step size can be adjusted according to actual needs, typically set to 75% of the window width (i.e., 375 pixels) to ensure a certain overlap between adjacent areas, thereby avoiding the loss of key text information due to window boundaries. Each sub-block is independently input to PaddleOCR's text detection module for processing. This module, based on the DBNet architecture, has end-to-end text localization capabilities, can recognize text regions in any direction, and output the coordinate information of the text box.

[0028] Furthermore, the choice of the sliding window size (500×500 pixels) was based on a balance between experimental verification and computational efficiency. A window that is too small may cause text fragmentation, affecting recognition continuity; while a window that is too large will increase the computational burden and reduce processing speed. Experiments show that a 500×500 pixel window effectively improves detection accuracy while ensuring text integrity. In addition, PaddleOCR's detection threshold was set to 0.5 to filter low-confidence text detection results, ensuring that the output text region has high reliability.

[0029] Furthermore, since non-vector CAD drawings typically have high resolution and complex backgrounds, direct global OCR detection can easily lead to missed or false text detections. By segmenting the data into blocks, the computational complexity of image processing can be reduced, and the model's ability to perceive local features can be improved, thereby enhancing the robustness of text detection. Finally, the system performs coordinate mapping and merging of the detection results from each sub-block to restore the complete text layout in the original image, providing a structured and high-precision text data foundation for subsequent image-text matching and parameter extraction. This technique has significant practical value in the intelligent parsing of CAD drawings in the power industry, and is particularly suitable for processing complex engineering drawings such as high-voltage system wiring diagrams and substation configuration diagrams.

[0030] S12, intelligently merge adjacent text blocks based on text location information. The merging conditions include that the spacing between text blocks is less than a preset threshold and the text direction is consistent.

[0031] Specifically, in some implementations, the step of intelligently merging adjacent text blocks based on text location information is a key post-processing step in the extraction of power grid equipment modeling elements from CAD drawings. This aims to improve the coherence and structure of the text recognition results. The core technical principle of this step is to analyze the spatial distribution characteristics of the text blocks obtained from OCR recognition, and combine geometric positional relationships with text direction consistency to automatically integrate logically merged text regions, thereby restoring the complete text information that may have been segmented in the original drawing.

[0032] Furthermore, the system first acquires the coordinate information of the text blocks output by PaddleOCR, including the bounding box coordinates (x_min, y_min, x_max, y_max) and text direction (horizontal or vertical) for each text block. Between text blocks, the system calculates their geometric spacing, i.e., the minimum horizontal or vertical distance between adjacent text blocks. If this spacing is less than a preset threshold (10 pixels), the two text blocks are considered spatially adjacent and may belong to the same semantic unit. Further, the system determines whether the text blocks have the same direction, for example, both text blocks are horizontal or vertical, to ensure that the merged text maintains consistency in its layout logic.

[0033] Furthermore, the spacing threshold is 10 pixels. This parameter has been experimentally verified to effectively distinguish between independent and continuous text in CAD drawings, avoiding erroneous merging due to excessively small spacing or omissions due to excessively large spacing. Text direction consistency judgment is usually based on text rotation angle (e.g., 0°, 90°, 180°, 270°) or text arrangement direction (e.g., from left to right, from top to bottom). In actual processing, cluster analysis can be performed in conjunction with the arrangement trend of text lines to enhance the robustness of merging.

[0034] Furthermore, it is particularly suitable for densely packed text areas in CAD drawings, such as equipment parameter tables and annotations. Through intelligent merging, the system can recombine complete sentences or parameter items that were originally divided into multiple independent text blocks, improving the accuracy of subsequent text classification and image-text matching. For example, in high-voltage system wiring configuration diagrams, equipment models and parameters are often arranged in a compact form. If merging is not performed, the parameter information will be incomplete, affecting the quality of modeling element extraction.

[0035] Furthermore, this step significantly improves the completeness and readability of the text recognition results, providing more accurate text input for subsequent edge-detection-based parameter matching and location-aware image-text matching. Through the recovery of structured text, the system can more efficiently extract key information such as equipment names, models, and technical parameters, thereby enhancing the intelligent parsing capabilities of CAD drawings and providing a reliable data foundation for the digital modeling and automated management of power grid equipment.

[0036] S2 uses an edge detection algorithm to identify the table frame and line structure in the drawing, and divides the text classification area based on the table cells.

[0037] Specifically, in this method, the step of identifying the table framework and line structure in the drawing through edge detection algorithm, and dividing the text classification region based on the table cells, is a key step in realizing the structured extraction of power grid equipment parameters from CAD drawings. This step mainly relies on edge detection technology in image processing, combined with the geometric characteristics of the table structure in the CAD drawing, to structurally divide the text region, thereby providing a spatial layout basis for subsequent text classification and parameter matching.

[0038] Further, this step first performs edge detection on the CAD drawing that has undergone image preprocessing (such as grayscale conversion and binarization). This invention employs the classic Canny edge detection algorithm, whose core principle is to suppress image noise through Gaussian filtering, calculate the image gradient magnitude and direction, identify strong and weak edges using a dual-threshold strategy, and preserve continuous line structures through edge concatenation operations. The Canny algorithm exhibits good robustness in CAD drawing processing, and is particularly suitable for extracting table frames from high-resolution images. In experiments, the low threshold of the Canny algorithm was set to 50, and the high threshold was set to 150. This parameter combination effectively distinguished table lines from background noise in actual tests while preserving the complete structure of the table.

[0039] Furthermore, in the edge detection results, the row and column lines of the table are identified using Hough Transform or intersection-based geometric analysis methods to construct the table's grid structure. Based on the coordinates of the row and column intersections, the boundary region of each cell can be defined. Subsequently, the text boxes recognized by PaddleOCR are spatially matched with the table cells to determine whether the text is located within a specific cell, thereby achieving structured text classification.

[0040] This step plays a crucial role in the overall technical solution. On the one hand, it compensates for the lack of structured information in OCR recognition results, enabling text information to be organized according to tabular logic. On the other hand, it provides spatial constraints for primitive-text matching, facilitating the establishment of correspondences between equipment graphics and parameter text. Experimental results show that this method maintains high text classification accuracy in multi-table CAD drawings, significantly improving the completeness and automation level of power grid equipment parameter extraction.

[0041] Furthermore, S2 includes: S21 uses the Canny edge detection algorithm to identify lines in the preprocessed drawing and sets dual thresholds to enhance the robustness of the table frame.

[0042] Specifically, in the parameter matching step of power grid equipment based on edge detection, the Canny edge detection algorithm is used to identify lines in the preprocessed CAD drawings, which is a key technical step in realizing table structure extraction and text region segmentation. The Canny algorithm is a classic multi-stage edge detection method, whose core principle is based on image gradient calculation and a dual-threshold filtering mechanism. First, the image is smoothed using a Gaussian filter (usually a Gaussian kernel with σ=1.4) to eliminate noise interference. Then, the Sobel operator is used to calculate the gradient magnitude and direction of the image in the horizontal and vertical directions, thereby identifying potential edge points. In some implementations, Non-Maximum Suppression (NMS) of the gradient magnitude is further applied to refine the edge contours and ensure the single-pixel width of the edges. Finally, edge connection and filtering are performed by setting dual thresholds (50 and 150), where edges below the lower threshold are suppressed, edges above the higher threshold are retained, and edges in between are retained based on their connectivity with strong edges, thus achieving robust recognition of table frames.

[0043] Furthermore, the dual-threshold setting of Canny edge detection has significant engineering implications. A low threshold of 50 is used to capture weaker edges that may form a table structure, while a high threshold of 150 is used to preserve strong edges, ensuring the integrity of the table borders. This parameter combination was verified as the optimal configuration in experiments, effectively handling issues such as inconsistent line thickness and complex backgrounds in CAD drawings, especially demonstrating good computational efficiency and structured output capabilities when processing high-resolution images in non-vector formats. Furthermore, the edge detection results are spatially aligned with the text box position information extracted by PaddleOCR. By analyzing the relative positional relationship between the text and table cells, structured matching and classification of device parameters are achieved.

[0044] Furthermore, this step plays a crucial role in the entire intelligent information extraction process of CAD drawings. On the one hand, it provides a structured basis for the classification and parameter extraction of text information, enabling information such as equipment name, specifications, and quantity to be accurately categorized into the corresponding table cells. On the other hand, its output provides spatial constraints for subsequent location-aware primitive-text matching algorithms, helping to improve the accuracy of image-text association. Through this edge detection and parameter matching mechanism, this method achieves efficient recognition of table structures on the Southern Power Grid CAD drawing dataset, providing solid technical support for the automated extraction of power grid equipment modeling elements.

[0045] S22, by analyzing the coordinates of the line intersections and the table boundary information, constructs a cell grid structure and spatially maps the text classification area to the cell position.

[0046] Specifically, by analyzing the coordinates of line intersections and table boundary information, a cell grid structure is constructed, and the text classification areas are spatially mapped to the cell positions. This is a key step in achieving structured extraction and text-image matching of power grid equipment parameters in CAD drawings. This step mainly relies on edge detection and geometric analysis techniques in image processing, combined with OCR recognition results, to achieve accurate alignment between text and table structures.

[0047] Further, this step first performs Canny edge detection on the CAD drawing, identifying line structures in the image by setting dual thresholds (e.g., 50 and 150). The detected edge information is further processed to extract the table's bounding boxes and the coordinates of intersections between cells. Specifically, Hough Transform or line-fitting algorithms (such as the HoughLinesP function in OpenCV) are used to cluster and sort the edge lines, identifying table lines in both horizontal and vertical directions, thus constructing the table's grid structure. Furthermore, by calculating the intersections between adjacent lines, the coordinate range of each cell can be determined, forming a structured table layout.

[0048] Furthermore, the precision of table cell segmentation directly impacts the accuracy of subsequent text matching. In the experiment, edge detection thresholds were set to 50 and 150 to balance noise suppression and edge preservation. The minimum cell size was typically set to 20×20 pixels to exclude invalid or excessively small regions. Simultaneously, the coordinate information of the text region was output by PaddleOCR, with a detection threshold set to 0.5 to ensure that high-confidence text boxes were retained for matching.

[0049] Furthermore, this step is widely applicable to parameter extraction from CAD drawings such as high-voltage / low-voltage system wiring diagrams and substation configuration diagrams. By spatially mapping text information to table cells, structured classification of information such as equipment names, models, and parameters can be achieved, providing data support for subsequent modeling.

[0050] Furthermore, this step effectively solves the problem of separating table structures from text information in non-vector CAD drawings, improving the completeness and accuracy of parameter extraction. By constructing a grid structure and performing spatial mapping, the logical association between text and graphic elements is realized, providing a reliable data foundation for the intelligent modeling and management of power grid equipment.

[0051] S3 combines primitive recognition results, text detection results, and table structure information, and uses a position-aware algorithm to analyze the coordinate relationship, orientation dependence, and table boundary constraints between primitives and text to establish cross-modal matching relationships.

[0052] Specifically, in some implementations, location-aware primitive-text feature matching algorithms achieve cross-modal association between graphic objects and textual information by fusing primitive recognition results, text detection results, and table structure information. The core of this step lies in utilizing spatial positional relationships, directional dependencies, and table boundary constraints to construct a semantic mapping between primitives and text, thereby improving the completeness and accuracy of modeling feature extraction.

[0053] Furthermore, the algorithm first receives the coordinate information of the graphic object from the primitive recognition module, as well as the text detection results output by PaddleOCR, including the coordinates, rotation angle, and recognized content of the text box. It then combines this with the table structure information extracted from edge detection, such as cell boundaries and row / column distribution, to construct spatial constraints. In practice, the algorithm employs a matching strategy based on Euclidean distance and directional consistency to calculate the relative positional relationship between the primitive's center point and the text box. For example, a maximum allowable distance threshold of 50 pixels is set between the primitive and the text box. If the distance between the text box and the primitive is less than this threshold and the directional angle difference is less than 15°, then a potential association is considered between them. In addition, table structure information is used to further constrain the matching range, ensuring that the text content is matched only with primitives located in the same or adjacent table cells, thereby improving matching accuracy.

[0054] Furthermore, the key parameters of this algorithm include the position matching threshold (50 pixels), the direction matching tolerance (15°), the text region confidence threshold (0.5), and the boundary recognition accuracy of table cells (above 90%). In experiments, the image-text matching accuracy of this step reached 91.34%, indicating that it has good robustness and adaptability in complex CAD drawings.

[0055] Furthermore, this algorithm is widely applicable to the intelligent parsing of CAD drawings in the power industry, especially in scenarios such as high-voltage / low-voltage system wiring diagrams and substation configuration diagrams. It can automatically identify and associate equipment elements with corresponding parameter text, providing data support for power grid equipment modeling, digital twin construction, and automated design review.

[0056] Furthermore, this step effectively solves the problem of separating graphic elements from textual information in traditional methods. By introducing a position-aware mechanism and table structure constraints, it significantly improves the accuracy and efficiency of cross-modal information matching, providing key technical support for the intelligent processing of CAD drawings.

[0057] Furthermore, S3 includes: S31, based on the proximity constraint between the device name and the parameter text, set the Euclidean distance between the center point of the graphic element and the center point of the text box to be less than a preset threshold as the initial matching condition.

[0058] Specifically, in some implementations, based on the proximity constraint between the device name and the parameter text, setting the Euclidean distance between the center point of the primitive and the center point of the text box to be less than a preset threshold (50 pixels) is one of the key steps in this method to achieve cross-modal association between primitives and text. This step is based on a spatially aware matching strategy, aiming to initially filter out text information related to primitives through geometric positional relationships, providing a foundation for subsequent semantic matching and parameter normalization processing.

[0059] Furthermore, this step first relies on the outputs of the primitive recognition module and the OCR text detection module. Primitive recognition typically employs deep learning-based object detection models (such as YOLO, SSD, etc.), outputting the bounding box and category label for each primitive; while the OCR module (such as PaddleOCR) outputs the coordinate information (x_min, y_min, x_max, y_max) of the text region and the recognized text content. After obtaining the coordinate information of the primitives and text, the system calculates the Euclidean distance between the geometric center point of each primitive (primitive center point) and the geometric center point of each text box.

[0060] Furthermore, the 50-pixel threshold was determined based on statistical analysis of the typical spatial distribution of graphic elements and text annotations in China Southern Power Grid CAD drawings. Experiments show that in drawings for 10kV and below power receiving projects, equipment names and parameter text are typically located above, to the right, or below the graphic elements, with a distance not exceeding 50 pixels. This threshold exhibits robustness across different resolutions, particularly suitable for standard A4 or A3 sized drawings (approximately 300 DPI). In practical applications, it can be dynamically adjusted according to the specific drawing scale.

[0061] Furthermore, this step is widely applied to various drawing types, including high-voltage system wiring diagrams, low-voltage system wiring diagrams, combined substations, and prefabricated substations. Through proximity constraints, the system can quickly filter out redundant text unrelated to the graphic elements, such as drawing titles and legends, thereby improving matching efficiency and accuracy. This step typically serves as a pre-screening mechanism for text-image matching algorithms, complementing subsequent steps such as semantic matching and table structure analysis to jointly construct a complete association system for modeling elements.

[0062] Furthermore, this step significantly improves the matching efficiency between graphic elements and text, reducing the probability of false and missed matches. In tests on high-voltage system wiring configuration diagrams, the recall rate of this preliminary matching strategy reached 89.2%, laying the foundation for the final graphic-text matching accuracy of 91.34%. In addition, this method demonstrates good adaptability when processing non-vector CAD drawings, especially in scenarios where the positional relationship between text and graphic elements is clear, effectively supporting the structured extraction and automated processing of power grid equipment modeling elements.

[0063] S32 introduces a directionality check rule: when there is a rotation angle difference between the text label and the graphic element, the matching correction is performed by ensuring that the rotation angle difference of the smallest bounding rectangle is less than 15°.

[0064] Specifically, in some implementations, introducing a directionality verification rule is one of the key optimization steps in the location-aware primitive-text element matching algorithm of this invention. Its core purpose is to improve the robustness and accuracy of image-text matching by using the rotation angle difference of the minimum bounding rectangle (MBR) to correct for rotation differences between text annotations and primitives. This step is technically implemented based on spatial consistency verification of image geometric analysis and text recognition results.

[0065] Furthermore, after text detection is performed using PaddleOCR, each text box is represented as a rotated bounding box, which includes center coordinates, width, height, and rotation angle. Simultaneously, the primitive objects output by the primitive recognition module also have corresponding minimum bounding rectangles, used to describe their spatial position and orientation within the drawing.

[0066] Furthermore, in the processing of CAD drawings in the power industry, this step is particularly suitable for handling text-image misalignment issues caused by scanning, rotation, or layout irregularities in non-vectorized drawings. For example, in high-voltage system wiring configuration diagrams, there may be slight rotational differences between equipment symbols and label text. This directional verification rule can effectively correct matching deviations, ensuring the correct correspondence between equipment parameters and graphic elements. This technique significantly improves the adaptability of text-image matching algorithms in complex scenarios, providing crucial support for the automated extraction of modeling elements for power grid equipment.

[0067] S4 generates structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters.

[0068] Specifically, this step generates structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters. It is a key link in the entire CAD drawing intelligent information extraction system. Its core objective is to semantically associate and structure the unstructured data obtained through graphic element recognition and text recognition, thereby providing complete and accurate data support for power grid equipment modeling.

[0069] Furthermore, this step, based on the previous primitive recognition results and the text information extracted by PaddleOCR, employs a location-aware primitive-text element matching algorithm. First, the system obtains the coordinate information (x_min, y_min, x_max, y_max) of the text box and the text content through OCR recognition, while simultaneously combining the primitive category, bounding box coordinates, and semantic labels output by the primitive recognition module. During the matching process, the system calculates the spatial distance (e.g., Euclidean distance, Manhattan distance) and relative positional relationship (e.g., up / down, left / right, containment, intersection, etc.) between the text box and the primitive box, and combines this with semantic similarity matching between the text content and the primitive semantics (e.g., similarity calculation based on BERT or word vectors) to construct a multi-dimensional matching feature vector. Further, the system introduces table structure information as auxiliary clues, using the table cell structure extracted through edge detection to accurately match text parameters (e.g., rated voltage, rated current, model, etc.) with the corresponding primitives.

[0070] Furthermore, the key parameters used in the matching algorithm include: a spatial threshold between text and primitives (usually set to 30-50 pixels) to determine whether there is a reasonable correlation between the two; and a semantic matching threshold (such as cosine similarity ≥ 0.75) to filter irrelevant text information. Experiments show that the method achieves an average text-image matching accuracy of 91.34% on the Southern Power Grid CAD drawing dataset, significantly outperforming traditional methods.

[0071] Furthermore, this step is widely applicable to scenarios such as power engineering design, equipment asset management, and the construction of operation and maintenance knowledge bases. For example, in high-voltage system wiring diagrams, the system can match circuit breaker elements with their corresponding rated current of 1250A text information, thereby providing complete parameter input for equipment modeling. In low-voltage system wiring diagrams, this method can identify and associate key parameters such as current transformers and transformation ratios of 100 / 5, improving the intelligence level of drawing analysis.

[0072] Furthermore, by integrating cross-modal data, the problem of separating graphic elements and textual information in CAD drawings was solved, achieving end-to-end mapping from images to structured data. Its innovation lies in the multi-dimensional fusion of edge detection, OCR recognition, and graphic element recognition results, constructing a robust and scalable matching mechanism, providing a solid foundation for the automated modeling and intelligent management of CAD drawings in the power industry.

[0073] The non-vector CAD drawing power grid equipment graphic matching method of the present invention can effectively extract text and graphic element information in non-vector CAD drawings and achieve high-precision matching of graphic elements, significantly improving the completeness and accuracy of power grid equipment modeling elements.

[0074] Example 2 This invention proposes an intelligent understanding and deep analysis method for CAD drawings. First, it proposes using PaddlePaddle's text recognition model to initially extract text information from drawings. Then, it combines edge detection technology to identify tables and lines in the drawings, assisting in the classification and matching of the extracted text, effectively improving the extraction capability of CAD text elements. Second, it proposes a location-aware primitive-text matching method to match primitive recognition results with text results, thereby achieving cross-modal data fusion. This invention mainly involves modeling elements such as primitives and text in drawings. A structure-context reasoning framework is proposed. This multimodal system integrates high-performance text recognition, image recognition, and geometric structure analysis to construct a reliable primitive-text information extraction pipeline for complex CAD drawings, such as... Figure 2 As shown. This combination of advanced technologies not only effectively handles complex, dense table layouts, but also accurately and robustly associates graphic elements with their corresponding text parameters.

[0075] In one embodiment of the present invention, a structured parsing module for CAD text extraction is proposed, which integrates robust recognition backbone with a professional post-processing framework. This module utilizes geometric inclusion constraints and longitudinal reconstruction mechanisms to effectively convert fragmented content into structurally aligned data units, providing a reliable text corpus for parameter extraction.

[0076] Furthermore, a geometry-aware device parameter matching method is proposed. This method utilizes advanced geometric analysis to establish an accurate grid topology for table regions and systematically applies domain-specific horizontal association constraints to accurately associate text with its device context, thereby achieving robust parameter extraction in multi-table configurations.

[0077] Furthermore, a location-aware image-text matching algorithm is proposed. This algorithm goes beyond simple proximity matching by analyzing the topological relationships between graphic primitives and text. It employs multi-layer constraint verification to achieve highly reliable and accurate cross-modal data association.

[0078] In one embodiment of the present invention, CAD drawing analysis includes: In the field of CAD drawing analysis, related research mainly focuses on how to efficiently and accurately extract and understand the graphic and textual information in drawings to support application scenarios such as engineering design, construction management, and operation and maintenance monitoring. In recent years, CAD drawing analysis has received widespread attention and in-depth research in academia and industry.

[0079] Furthermore, text detection technology aims to accurately locate text regions within complex drawings. Early text detection methods primarily relied on traditional image processing techniques, such as connected component analysis. While these methods were computationally efficient, their performance was limited in complex backgrounds and diverse scenes. With the rise of deep learning, text detection methods based on convolutional neural networks (CNNs) have gradually replaced traditional algorithms. These technological advancements have not only improved detection accuracy but also significantly enhanced detection efficiency.

[0080] Furthermore, edge detection includes: Edge detection technology, as a foundation of computer vision and image processing, has evolved from traditional differential operators to deep learning models. Early edge detection algorithms primarily relied on differential operators, but were quite sensitive to noise. John Canny

[17] This paper proposes the classic Canny edge detection algorithm, which significantly improves the accuracy and noise resistance of edge detection. With the development of deep learning, edge detection methods based on convolutional neural networks (CNNs) have gradually emerged. While these deep learning-based edge detection methods perform well in complex scenes, they suffer from high computational complexity and demanding hardware resources, making them difficult to meet real-time requirements. Furthermore, these methods may become computationally inefficient when processing high-resolution CAD drawings due to the large image size. This paper employs the Canny edge detection algorithm for processing CAD drawings, which demonstrates significant advantages in complex drawing analysis, offering high computational efficiency and making it suitable for processing high-resolution CAD drawings.

[0081] This invention employs a structure-context reasoning framework for CAD drawings, aiming to achieve efficient and intelligent extraction of information from CAD drawings. For example... Figure 3 As shown, the method mainly consists of three core modules: a structured parsing module for text extraction, a geometric matching module for device parameter association, and a position-aware algorithm for image-text association. The core of this framework is the initial OCR operation using a deep learning-based recognition backbone. Simultaneously, image processing technology identifies geometric primitives and structural information in the drawings, providing necessary structured support for subsequent text parsing and image-text matching. This systematic multi-constraint design constructs an efficient, intelligent, and comprehensive framework for extracting CAD drawing information.

[0082] In one embodiment of the present invention, text extraction and structured parsing include: The present invention proposes a CAD text extraction and structured parsing module, aiming to solve two core problems commonly found in CAD documents: text fragmentation and lack of topological association between text and structure. The entire workflow begins with input stabilization, where grayscale conversion is used to enhance brightness consistency, and local adaptive thresholding is employed to generate a high-contrast binary image, thereby robustly isolating text pixels in complex backgrounds to ensure high-quality input for subsequent recognition. Structured parsing is as follows... Figure 4 As shown.

[0083] Although text detection and recognition rely on high-performance multi-branch feature fusion architectures, the initial output often consists of a large number of disordered and fragmented text boxes. Therefore, this study focuses on the structured post-processing and data attribution stages. This stage constructs a structured parsing framework that assigns text fragments to corresponding table regions through geometric inclusion constraints. Simultaneously, it integrates a vertical reconstruction mechanism to reassemble fragmented characters into semantically complete and structurally aligned data units, providing a reliable basic corpus for subsequent parameter extraction.

[0084] The structuring process first extracts table boundaries through morphological operations and probabilistic Hough transforms to determine structural elements within the drawing. Based on this, strict geometric inclusion constraints are used to logically associate text blocks with the identified table coordinates, ensuring that the spatial assignment of the text is reasonable and context-consistent. Subsequently, to address common issues in CAD drawings such as vertical stacking and character fragmentation, a vertical reconstruction mechanism merges text based on geometric constraints (including vertical proximity (Δy < 10 pixels) and horizontal alignment (Δx < 10 pixels)), achieving complete recovery of technical abbreviations, symbol combinations, and list items. Through these procedures, the system effectively transforms the noisy and structurally chaotic raw OCR output into semantically clear and structurally standardized text data, providing a stable and high-quality input foundation for equipment parameter extraction and drawing information modeling.

[0085] In one embodiment of the invention, device parameter matching includes: after the structured text parsing module outputs, the next key task is to accurately map these explicit text entities to specific device parameters in the structured context. For example... Figure 5 As shown, the system employs a method combining high-order geometric reasoning and classical image analysis techniques to establish an accurate and quantifiable grid topology for table regions on drawings. Since a single drawing typically contains multiple dense tables, this process suffers from significant ambiguity regarding parameter attribution. To address this issue, a structure-aware parameter matching method is proposed, comprising two core stages: structured quantization and structured parameter association.

[0086] In the structured quantization stage, the system employs a method combining high-order geometric reasoning and classical image analysis techniques to establish a precise and quantifiable mesh topology for the table areas on the drawing. By calculating intersection points and performing geometric analysis on the detected edges, the precise coordinate range (T) of each table cell can be derived. x0 ,T y0 ,T x1 ,T y1 This quantization process transforms inherent fuzzy spatial layout information into an operable topological structure, providing reliable structural constraints for subsequent parameter assignment.

[0087] The structured parameter association stage constitutes the core matching mechanism. Based on the layout conventions of the engineering drawings, this stage utilizes the aforementioned grid topology to implement a set of customized association rules. The main rule is a horizontal association constraint: when the center point of the parameter text T falls vertically within the bounding box of the device name K, K(y) = ... K ≤y Tcenter ≤y K ′ When T is located to the right of K within the table structure, the system establishes an association between T and K. This rule ensures that parameter attribution conforms to the spatial organization common in engineering lists. Before final association, the system performs consistency verification through text classification and type recognition (e.g., quantity, size, model, etc.) based on regular expressions to ensure the semantic quality and structural integrity of the extracted parameters. This approach, driven by multi-layered structural, geometric, and semantic constraints, enables the reliable extraction, association, and transformation of equipment parameters from complex engineering drawings into standardized data structures.

[0088] In one embodiment of the present invention, image-text matching includes: to establish a reliable and explicit cross-modal link between detected graphic symbols and their text attributes, a location-aware image-text matching algorithm is proposed, the core of which is a verification method based on multi-layer structural constraints. This method overcomes the limitations of naive proximity matching by applying multiple successive topological and semantic checks. The process begins with candidate identification: a region partitioning representation of the drawing (… Figure 6 It supports content-based filtering, quickly narrowing down the potential text pool based on semantic relevance to the expected tags of graphic elements. The subsequent precise association phase enforces three distinct, non-standard constraints, elevating the matching logic above standard geometric proximity. First, geometric verification utilizes the center point of the graphic element (P... G =(x G ,y G )) and the center point of the candidate text block (P) T =(x T ,y T The Euclidean distance D between the two sides is only considered if D is below a predetermined threshold (D). <T dist Matching is only effective when... Crucially, this is paired with strict quadrant constraints to enforce typical placement topologies for engineering schematics. These constraints are mathematically formalized based on relative coordinates: (x T x G )∈S x and(y T y G )∈S y Where S x and S y The allowed signs for coordinate differences are defined (e.g., S∈{+, First, to ensure the text lies in one of the geometrically possible quadrants (e.g., quadrant I or II relative to the symbol anchor), unreasonable spatial relationships caused by overlapping annotations are eliminated. Second, for table-based entries, structure-aware column constraints are applied. This constraint is crucial because it ensures that the coordinate range of the text is logically and precisely aligned with the column range defined by the vertical lines extracted from the list entries of the graphic elements. This topological filtering mechanism effectively eliminates erroneous associations across different rows or columns. Finally, the system employs contextual semantic verification, a key closed-loop mechanism: the extracted numerical count text is used to cross-validate the actual counts of detected graphic primitives in the relevant regions. This multi-layered verification system significantly improves the robustness and accuracy of the final cross-modal associations.

[0089] In one embodiment of the present invention, the experimental setup includes: all experiments in this paper are conducted on typical design drawings of 10kV and below power receiving projects of the Southern Power Grid. The experiments are mainly divided into text detection, edge detection-based text processing, and image-text matching experiments. To ensure complete reproducibility, the key parameters of the three components of the framework are specified as follows: For CAD text detection, the PP-OCRv4 ultra-lightweight series is used, utilizing the DB detection algorithm and the CRNN recognition algorithm. Key configuration parameters include: the detection threshold is set to 0.3, and the final result filter is set to 0.5. The slicing mechanism uses a horizontal step size of 600 pixels and a vertical step size of 650 pixels, with a text merging threshold of 5 horizontally and 10 vertically.

[0090] In one embodiment of the invention, a series of experiments were conducted on a dataset of CAD drawings from China Southern Power Grid. This dataset is based on the "Typical Design Drawings for 10kV and Below Business Expansion and Power Receiving Projects of China Southern Power Grid," a standardized collection compiled by the company to unify the design of 10kV and below business expansion and power receiving projects.

[0091] Table 1. Text detection results

[0092] Table 2. Image-text matching results

[0093] The proposed method was used in the CAD text detection experiment. This method combines high-performance, end-to-end recognition technology with a professional structured parsing module (Method A). The average accuracy across different categories reached 94.73%. Compared with other mainstream advanced detection methods, the overall method exhibits superior detection accuracy. This excellent performance is not only attributed to the efficient recognition architecture, but more importantly, to the optimization provided by the post-processing technology. Specific results are shown in Table 1.

[0094] Test results further validate the effectiveness of the proposed structure-aware parameter matching method. Text extraction demonstrates high accuracy and robustness in both single-table and multi-table CAD drawings. Experiments confirm that the method can handle complex layouts and maintain stable performance in multi-table scenarios, providing a reliable foundation for subsequent information understanding. Although the identification of some extremely short lines may not be precise enough, these inaccuracies do not affect the final device parameter extraction results.

[0095] After performing edge detection, the effectiveness of device parameter matching on four datasets was systematically evaluated. Figure 7(b) shows the extracted equipment names, specifications, and quantities. The results demonstrate that the proposed method can reliably enumerate equipment information in different switch cabinets, proving that edge detection provides robust region localization for subsequent text extraction. Nevertheless, some equipment quantities or specifications may still be missed, possibly due to factors such as small font size, unconventional font styles, low text-to-background contrast, or overlapping graphic elements. These limitations suggest that while edge detection greatly facilitates text localization, additional refinement or preprocessing could further improve the completeness of the extraction.

[0096] The image-text matching task was tested on high-pressure and low-pressure system diagrams, demonstrating a valid association between graphical elements and text annotations. The overall mean accuracy across all datasets reached 91.34% (Table 2). Figure 8 Several examples of these high-quality matches are presented, consistently achieving accuracy in both image detection and text recognition. While the results confirm the robustness of the proposed method, some elements (such as equipotential points) are excluded due to a lack of text, and occasional misidentification of graphical primitives leads to minor device mismatches. These issues highlight the opportunity to further improve the method in complex or cluttered graph scenarios.

[0097] This invention also offers the following technical advantages: To facilitate intelligent understanding of CAD drawings, this paper proposes a method for deep parsing and multimodal analysis. First, a text recognition model using PaddleOCR is used to initially extract text information from the drawings. Combined with edge detection, this method identifies tables and lines in the drawings, assisting in the classification and association of extracted text, thereby enhancing CAD text extraction capabilities. Second, building upon previous work on CAD primitive recognition, a location-aware primitive-text matching method is employed to associate primitive detection results with text information, achieving cross-modal data fusion. This method currently focuses on primitive recognition and text information. Future work will further explore the logical connections between primitives, such as detecting connectivity between components. By integrating intelligent primitive detection results, the aim is to accurately identify connecting lines (including live, neutral, and ground wires), model the relationships between primitives, and achieve precise CAD drawing parsing.

[0098] Example 3 To achieve the above embodiments, such as Figure 9 As shown, this embodiment also provides a device 10 for extracting and matching modeling elements of power grid equipment in CAD drawings, including: The text region acquisition module 100 is used to segment non-vector CAD drawings into blocks and detect text regions using OCR technology, and to acquire text location information and content. The table structure recognition module 200 is used to recognize the table frame and line structure in the drawing through edge detection algorithm, and divide the text classification area based on the table cell. The cross-modal matching analysis module 300 is used to combine primitive recognition results, text detection results and table structure information, and use position-aware algorithms to analyze the coordinate relationship, orientation dependence and table boundary constraints between primitives and text to establish cross-modal matching relationships; The structured data generation module 400 is used to generate structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters.

[0099] Furthermore, the text region acquisition module 100 is also used for: Non-vector CAD drawings are divided into blocks according to preset sliding window sizes to reduce the impact of large-size images on detection accuracy; Intelligent merging of adjacent text blocks is performed based on text location information. The merging conditions include that the spacing between text blocks is less than a preset threshold and that the text directions are consistent.

[0100] Furthermore, the table structure recognition module 200 is also used for: The Canny edge detection algorithm is used to identify lines in the preprocessed drawing, and dual thresholds are set to enhance the robustness of the table frame. By analyzing the coordinates of line intersections and table boundary information, a cell grid structure is constructed, and the text classification area is spatially mapped to the cell position.

[0101] Furthermore, the cross-modal matching analysis module 300 is also used for: Based on the proximity constraint between the device name and the parameter text, the Euclidean distance between the center point of the graphic element and the center point of the text box is set to be less than a preset threshold as the initial matching condition. A directionality check rule is introduced. When there is a rotation angle difference between the text label and the graphic element, the matching correction is performed by ensuring that the rotation angle difference of the smallest bounding rectangle is less than 15°.

[0102] Furthermore, it also includes: The connection line detection module is used to detect the connection lines between elements in the drawing and identify the topological relationship between live wires, neutral wires and ground wires; The 3D modeling module is used to establish 3D spatial modeling of the logical connection relationships between elements based on the identification results of the connection lines, and generate a complete dataset of connection relationships for power grid equipment.

[0103] The non-vector CAD drawing power grid equipment graphic matching device of this invention can effectively extract text and graphic element information from non-vector CAD drawings and achieve high-precision matching of graphic elements, significantly improving the completeness and accuracy of power grid equipment modeling elements.

[0104] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0105] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

Claims

1. A method for extracting and matching modeling elements of power grid equipment in CAD drawings, characterized in that, include: S1 uses OCR technology to segment non-vector CAD drawings into blocks and detect text areas to obtain text location information and content; S2 uses an edge detection algorithm to identify the table frame and line structure in the drawing, and divides the text classification area based on the table cell. S3 combines primitive recognition results, text detection results, and table structure information, and uses a position-aware algorithm to analyze the coordinate relationship, orientation dependence, and table boundary constraints between primitives and text to establish cross-modal matching relationships; S4 generates structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters.

2. The method as described in claim 1, characterized in that, The S1 further includes: S11, Non-vector CAD drawings are divided into blocks according to the preset sliding window size to reduce the impact of large-size images on detection accuracy; S12, intelligently merge adjacent text blocks based on text location information. The merging conditions include that the spacing between text blocks is less than a preset threshold and the text direction is consistent.

3. The method as described in claim 1, characterized in that, The S2 further includes: S21, the Canny edge detection algorithm is used to identify lines in the preprocessed drawing, and dual thresholds are set to enhance the robustness of the table frame; S22, by analyzing the coordinates of the line intersections and the table boundary information, constructs a cell grid structure and spatially maps the text classification area to the cell position.

4. The method as described in claim 1, characterized in that, The S3 further includes: S31, based on the proximity constraint between the device name and the parameter text, set the Euclidean distance between the center point of the graphic element and the center point of the text box to be less than a preset threshold as the initial matching condition; S32 introduces a directionality check rule: when there is a rotation angle difference between the text label and the graphic element, the matching correction is performed by ensuring that the rotation angle difference of the smallest bounding rectangle is less than 15°.

5. The method as described in claim 1, characterized in that, Also includes: S5 detects the connection lines between elements in the drawing and identifies the topological relationship between live wires, neutral wires, and ground wires; S6, based on the identification results of the connection lines, establishes a three-dimensional spatial model of the logical connection relationship between graphic elements, and generates a complete connection relationship dataset of power grid equipment.

6. A device for extracting and matching modeling elements of power grid equipment in CAD drawings, characterized in that, include: The text region acquisition module is used to segment non-vector CAD drawings using OCR technology and detect text regions to obtain text location information and content. The table structure recognition module is used to identify the table frame and line structure in drawings through edge detection algorithms, and to divide the text classification area based on the table cells; The cross-modal matching analysis module combines primitive recognition results, text detection results, and table structure information, and uses position-aware algorithms to analyze the coordinate relationship, orientation dependence, and table boundary constraints between primitives and text to establish cross-modal matching relationships. The structured data generation module is used to generate structured data of power grid equipment modeling elements based on matching relationships, realizing end-to-end association between graphic elements and text parameters.

7. The apparatus as claimed in claim 6, characterized in that, The text region acquisition module is also used for: Non-vector CAD drawings are divided into blocks according to preset sliding window sizes to reduce the impact of large-size images on detection accuracy; Intelligent merging of adjacent text blocks is performed based on text location information. The merging conditions include that the spacing between text blocks is less than a preset threshold and that the text directions are consistent.

8. The apparatus as claimed in claim 6, characterized in that, The table structure recognition module is also used for: The Canny edge detection algorithm is used to identify lines in the preprocessed drawing, and dual thresholds are set to enhance the robustness of the table frame. By analyzing the coordinates of line intersections and table boundary information, a cell grid structure is constructed, and the text classification area is spatially mapped to the cell position.

9. The apparatus as claimed in claim 6, characterized in that, The cross-modal matching analysis module is also used for: Based on the proximity constraint between the device name and the parameter text, the Euclidean distance between the center point of the graphic element and the center point of the text box is set to be less than a preset threshold as the initial matching condition. A directionality check rule is introduced. When there is a rotation angle difference between the text label and the graphic element, the matching correction is performed by ensuring that the rotation angle difference of the smallest bounding rectangle is less than 15°.

10. The apparatus as claimed in claim 6, characterized in that, Also includes: The connection line detection module is used to detect the connection lines between elements in the drawing and identify the topological relationship between live wires, neutral wires and ground wires; The 3D modeling module is used to establish 3D spatial modeling of the logical connection relationships between elements based on the identification results of the connection lines, and generate a complete dataset of connection relationships for power grid equipment.

Citation Information

Cited By

  • Plant station wiring diagram equipment text matching method, system, device and storage medium

    CN122135388A