CAD drawing structure recovery method and system based on multi-source graph element fusion

CN122550366BActive Publication Date: 2026-11-03SHANGHAI LINGSHU INTELLIGENT TECH CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611031971.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-11-03
Estimated Expiration
2046-07-13

AI Technical Summary

Technical Problem

Existing CAD drawing files cannot generate intrinsic object models that combine spatial topology and deep semantics in tasks such as drawing review, knowledge extraction, and intelligent question answering. They also lack multi-dimensional joint index structures, making it difficult to extract the distribution features of primitives in local areas and affecting the accuracy of engineering object networks.

Method used

By acquiring multi-source primitives from CAD drawings, feature mapping is performed to generate an intrinsic object model. Based on a multi-dimensional joint index structure, primitive distribution features of local areas are extracted. Combined with an adaptive tolerance threshold, the structural skeleton is restored. Implicit boundaries are deduced in scenarios with missing boundaries. Multi-line semantic fusion and attribution determination are performed to determine the engineering object network.

Benefits of technology

It enables accurate reconstruction of the structural skeleton of CAD drawings, improving the accuracy of engineering object networks and the spatial and semantic relationships of high-level structural objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122550366B_ABST
    Figure CN122550366B_ABST
Patent Text Reader

Abstract

The application discloses a CAD drawing structure recovery method and system based on multi-source graphic element fusion, and relates to the technical field of CAD drawings. A corresponding multi-dimensional joint index structure is constructed based on the spatial distribution and attribute dimension of an intrinsic object model, cross-modal merging of geometric elements is carried out based on an adaptive tolerance threshold, and implicit boundaries are deduced in the presence of missing boundaries in combination with text features, so that the structural framework of the CAD drawing is recovered, and the recovery of the structural framework of the CAD drawing is realized. Multi-line semantic fusion and attribution determination are performed on the geometric elements and text features, and multi-stage spatial relationship dynamic rehearsal is performed on the recovered structural framework, so that corresponding dynamic rehearsal events are determined; a plurality of key structural contents are determined according to the identification of the dynamic rehearsal events, and an engineering object network is determined in combination with cross matching of the intrinsic object model, and the accuracy of the engineering object network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of CAD drawings, and in particular to a method and system for restoring the structure of CAD drawings based on multi-source element fusion. Background Technology

[0002] Existing CAD drawing files typically store drawing information in the form of low-level drawing entities, including text entities, line segment entities, arc entities, dimensioning entities, and block reference entities. In practical industrial applications, tasks such as drawing review, knowledge extraction, and intelligent question answering usually rely on high-level structural objects such as tables, regions, and nodes, as well as their interrelationships.

[0003] Existing solutions mostly focus on the independent reading and parsing of low-level primitives, failing to perform deep feature mapping and fusion of multi-source heterogeneous primitives. This makes it impossible to generate intrinsic object models that combine spatial topology and deep semantics. Furthermore, existing technologies typically employ simple spatial indexing or full-map traversal methods, lacking a multi-dimensional joint index structure that couples spatial distribution and attribute dimensions. This makes it difficult to extract primitive distribution features in local areas, affecting the restoration of the structural skeleton of CAD drawings and failing to guarantee the accuracy of engineering object networks. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and system for restoring the structure of CAD drawings based on multi-source primitive fusion.

[0005] This invention provides a method for restoring the structure of CAD drawings based on multi-source primitive fusion, including: The system acquires multi-source primitives from CAD drawings, performs feature mapping on these primitives, and generates an intrinsic object model that includes geometric primitives, text features, and attribute features. Based on the spatial distribution and attribute dimensions of the intrinsic object model, the system constructs a corresponding multi-dimensional joint index structure. Based on the multidimensional joint index structure, the primitive distribution features of local regions are extracted, and the corresponding adaptive tolerance threshold is dynamically determined according to the primitive distribution features. Based on the adaptive tolerance threshold, geometric primitives are merged across modes, and implicit boundaries are inferred by combining text features in the scenario of missing boundaries, thereby restoring the structural skeleton of CAD drawings. In the restored structural skeleton, multi-line semantic fusion and attribution determination are performed on geometric primitives and text features, and multi-stage spatial relationship dynamic pre-simulation is performed on the restored structural skeleton to determine the corresponding dynamic pre-simulation events. Based on the identification of dynamic pre-simulation events, multiple key structural contents are determined, and the engineering object network is determined by cross-matching of the intrinsic object model. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic relationships between objects.

[0006] This invention provides a CAD drawing structure recovery system based on multi-source primitive fusion, which is applied to the aforementioned CAD drawing structure recovery method based on multi-source primitive fusion. The multi-source primitive fusion-based CAD drawing structure recovery system includes: The multidimensional joint index module is used to obtain multi-source primitives in CAD drawings, perform feature mapping on the multi-source primitives, thereby generating an intrinsic object model containing geometric primitives, text features and attribute features, and construct a corresponding multidimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model. The recovery module is used to extract the primitive distribution features of local areas based on the multi-dimensional joint index structure, dynamically determine the corresponding adaptive tolerance threshold based on the primitive distribution features, perform cross-modal merging of geometric primitives based on the adaptive tolerance threshold, and infer implicit boundaries by combining text features in the case of missing boundaries, thereby restoring the structural skeleton of CAD drawings. The dynamic pre-simulation module is used to perform multi-line semantic fusion and attribution determination on geometric primitives and text features in the restored structural skeleton, and to perform multi-stage spatial relationship dynamic pre-simulation on the restored structural skeleton, thereby determining the corresponding dynamic pre-simulation events. The engineering object network module is used to determine multiple key structural contents based on the identification of dynamic pre-simulation events, and to determine the engineering object network by combining the cross-matching of the intrinsic object model. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic relationships between objects.

[0007] Compared with the prior art, the beneficial effects of the present invention are: (1) Obtain multi-source primitives in CAD drawings, perform feature mapping on multi-source primitives to generate an intrinsic object model containing geometric primitives, text features and attribute features, and construct a corresponding multi-dimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model; extract primitive distribution features of local areas based on the multi-dimensional joint index structure, and dynamically determine the corresponding adaptive tolerance threshold based on the primitive distribution features; perform cross-modal merging of geometric primitives based on the adaptive tolerance threshold, and infer implicit boundaries in the scenario of missing boundaries by combining text features, thereby restoring the structural skeleton of CAD drawings. The introduction of multi-dimensional joint index structure further controls the adaptive tolerance threshold, realizing the restoration of the structural skeleton of CAD drawings.

[0008] (2) In the restored structural skeleton, multi-line semantic fusion and attribution determination are performed on geometric primitives and text features, and multi-stage spatial relationship dynamic pre-simulation is performed on the restored structural skeleton to determine the corresponding dynamic pre-simulation events; multiple key structural contents are determined based on the identification of dynamic pre-simulation events, and the engineering object network is determined by combining the cross-matching of the intrinsic object model. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic association relationships between objects. The dynamic pre-simulation events are further controlled, and multiple key structural contents and intrinsic object models are fully considered, which improves the accuracy of the engineering object network. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating the CAD drawing structure recovery method based on multi-source primitive fusion in an embodiment of the present invention. Figure 2 This is a flowchart illustrating step S11 in the CAD drawing structure recovery method based on multi-source primitive fusion in an embodiment of the present invention. Figure 3 This is a flowchart illustrating step S12 in the CAD drawing structure recovery method based on multi-source primitive fusion in an embodiment of the present invention. Figure 4 This is a flowchart illustrating step S13 in the CAD drawing structure recovery method based on multi-source primitive fusion in an embodiment of the present invention. Figure 5 This is a flowchart illustrating step S14 in the CAD drawing structure recovery method based on multi-source primitive fusion in an embodiment of the present invention. Figure 6 This is a schematic diagram of the structural composition of the CAD drawing structure recovery system based on multi-source primitive fusion in an embodiment of the present invention. Detailed Implementation

[0010] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0011] Please see Figures 1 to 6 A method for restoring the structure of CAD drawings based on multi-source primitive fusion is applied to CAD drawing scenarios. The method includes: Step S11: Obtain multi-source primitives from CAD drawings, perform feature mapping on multi-source primitives to generate an intrinsic object model containing geometric primitives, text features and attribute features, and construct a corresponding multi-dimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model. Step S12: Extract the primitive distribution features of the local area based on the multidimensional joint index structure, and dynamically determine the corresponding adaptive tolerance threshold according to the primitive distribution features. Perform cross-modal merging of geometric primitives based on the adaptive tolerance threshold, and infer the implicit boundary in the case of missing boundary by combining text features, thereby restoring the structural skeleton of the CAD drawing. Step S13: In the restored structural skeleton, perform multi-line semantic fusion and attribution determination on geometric primitives and text features, and perform multi-stage spatial relationship dynamic pre-simulation on the restored structural skeleton to determine the corresponding dynamic pre-simulation events. Step S14: Based on the identification of dynamic pre-simulation events, determine multiple key structural contents, and combine them with the cross-matching of the intrinsic object model to determine the engineering object network. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic relationships between objects.

[0012] refer to Figure 2 In step S11, the specific steps are as follows: S111: Obtain the target CAD drawing file by traversing the CAD database, determine the corresponding multi-source heterogeneous primitives based on the identification of the target CAD drawing file, and trigger the feature mapping of multi-source heterogeneous primitives in combination with the pre-trained feature extraction network to convert multi-source heterogeneous primitives into a unified internal object representation. Then, perform cross-modal fusion of geometric primitives, text features and attribute features through an attention mechanism to generate an intrinsic object model that combines spatial topology and deep semantics. S112: Using the bounding box of the intrinsic object model as spatial distribution information and object type and attribute characteristics as attribute dimensions, the CAD drawing space is divided into gridded regions. This generates spatial index nodes, and object type and attribute labels are then attached to these spatial index nodes, thereby constructing a multi-dimensional joint index structure that couples spatial location, object type, and attribute labels.

[0013] In the embodiments of this application, the target CAD drawing file is obtained by traversing the CAD database. Based on the identification of the target CAD drawing file, the corresponding multi-source heterogeneous primitives are extracted. The feature mapping of the multi-source heterogeneous primitives is triggered by combining a pre-trained feature extraction network to convert the multi-source heterogeneous primitives into a unified internal object representation. The geometric primitives, text features and attribute features are fused across modalities through an attention mechanism to generate an intrinsic object model that combines spatial topology and deep semantics, thus introducing an intrinsic object model.

[0014] At this point, the system performs a traversal operation on the CAD database based on the preset file reading interface, retrieves and obtains the target CAD drawing file; it parses the underlying data structure of the target CAD drawing file, identifies and extracts the multi-source heterogeneous graphic elements that constitute the drawing; the multi-source heterogeneous graphic elements have heterogeneity in data format and expression dimension, specifically including but not limited to: "geometric graphic elements representing geometric contours, such as straight lines LINE, polylines LWPOLYLINE, and arcs ARC", "text graphic elements representing engineering semantics, such as single-line text TEXT and multi-line text MTEXT", "dimensional graphic elements representing process constraints, such as linear annotations DIMENSION", and "block reference graphic elements and attribute graphic elements representing standard parts or symbol reuse, such as ATTRIB".

[0015] After extracting multi-source heterogeneous primitives, they are input into a pre-trained feature extraction network to trigger feature mapping. The pre-trained feature extraction network uses corresponding feature extraction branches for primitives of different modalities: for geometric primitives, their coordinate sequence, curvature, and length are extracted as geometric feature vectors; for text primitives, their semantic embedding vectors are extracted as text features based on a natural language processing model; for size and attribute primitives, their tolerance, layer, and attribute key-value pairs are extracted as attribute features. Through the above feature mapping, the originally heterogeneous underlying primitive data is converted into a unified internal object representation with a unified dimension. The unified internal object representation includes at least object identifiers, spatial coordinate bounding boxes, geometric feature vectors, text feature vectors, and attribute feature vectors.

[0016] After obtaining a unified internal object representation, an attention mechanism is introduced to perform cross-modal fusion of geometric primitives, text features, and attribute features. At this point, the geometric feature vector of the target primitive is used as the query term, and the text feature vector and attribute feature vector of spatial proximity are used as the key and value terms. The cross-modal attention weight distribution is calculated. Through this weight distribution, the model can adaptively focus on the associated features that contribute the most to the spatial topology and engineering semantics of the current primitive, suppress redundant or interfering features, and concatenate and dimensionality-reduced the weighted fused cross-modal features with the original spatial coordinate bounding box to generate an intrinsic object model that combines spatial topological information and deep semantic information.

[0017] Optionally, the intrinsic object model refers to the unified transformation of the original low-level primitives in CAD drawings into a standardized data structure through feature mapping. This data structure contains at least the following four fields: unique object identifier, spatial coordinate bounding box, geometric feature vector, text feature vector, and attribute feature vector. Regarding the spatial topology of the intrinsic object model, the bounding box records the object's position in the drawing and its relative spatial relationships with other objects, such as containment, adjacency, and intersection. Regarding the deep semantics of the intrinsic object model, the text feature vector and attribute feature vector record the object's engineering meaning. This model can be serialized and stored using JSON or similar structured files for easy access by subsequent modules.

[0018] Specifically, the system traverses the database to obtain the reducer assembly drawing file, and identifies and extracts multi-source heterogeneous graphic elements from it: including "straight lines: geometric elements" that form the border of the parts list, "part name and material text: text elements" in the parts list, "linear dimensions and tolerances: dimension elements" that indicate the shaft hole fit accuracy, and "block references: block reference elements" that represent bearing standard parts.

[0019] Feature mapping is performed on the aforementioned heterogeneous primitives: for the straight lines that form the border of the detail table, their endpoint coordinates and horizontal / vertical features are extracted to generate geometric feature vectors; for the text primitive "Material: 45 steel", a text feature vector representing its engineering material semantics is generated through a pre-trained language model; for the bearing block reference, its contained "attribute information, such as model and code", is extracted to generate attribute feature vectors; thus, primitives with completely different data structures are all converted into a unified internal object representation containing geometric, text, and attribute feature dimensions.

[0020] Taking the text primitive "Material: 45 Steel" in the details table as an example, its text feature vector is used as the query term, and the adjacent border lines of the details table and the information of its layer are used as the key and value terms. Since the text is spatially surrounded by border lines and belongs to the same "details table" layer, the attention mechanism will give higher weight to these spatially adjacent geometric features and layer attribute features. Through cross-modal fusion, the text primitive not only contains the semantic information of "45 Steel", but also deeply integrates its spatial topological constraints and layer affiliation information in a certain row and column of the details table. Finally, the corresponding intrinsic object model is generated, which provides a high-fidelity data foundation for subsequent structural skeleton restoration and relationship inference.

[0021] Furthermore, using the bounding box of the intrinsic object model as spatial distribution information and object type and attribute characteristics as attribute dimensions, the CAD drawing space is divided into gridded regions; thereby generating spatial index nodes, and object type and attribute labels are extended and attached to these spatial index nodes, thus constructing a multi-dimensional joint index structure that couples spatial location, object type and attribute labels in three dimensions.

[0022] At this point, the bounding box information in the aforementioned intrinsic object model is extracted as spatial distribution information, and the maximum bounding rectangle range of the bounding box in the global coordinate system of the CAD drawing is obtained. Based on a preset grid division strategy, such as equal-spacing division or adaptive division based on primitive distribution density, the CAD drawing space within the maximum bounding rectangle range is divided into two-dimensional gridded regions, thereby discretizing the continuous drawing space into multiple non-overlapping grid units. The grid unit is the basic spatial granularity for subsequent spatial indexing. Through this operation, spatial mapping and segmentation from the entire drawing space to local areas are realized.

[0023] After completing the gridded area division of the drawing space, a corresponding spatial index node is generated for each grid cell. Then, all intrinsic object models are traversed, and the spatial position of each intrinsic object model, such as the center point of the bounding box or the intersection area between the bounding box and the grid cell, is mapped to the corresponding grid cell. The intrinsic object model is then attached to the corresponding spatial index node. Thus, the spatial index node not only carries the coordinate range information of the spatial area, but also aggregates all intrinsic object models located in the area, realizing the initial association between spatial position and object entity.

[0024] Building upon the intrinsic object model mounted to the spatial index node, the "object type, such as text, line, block reference, etc." and "attribute features, such as layer name, block name, dimension style, etc." of the intrinsic object model are further extracted. The object type and attribute features are then transformed into structured attribute tags and extended and mounted to the corresponding spatial index node. At this point, a spatial index node not only records the set of objects it contains, but also records the type distribution and attribute feature summary of all objects within the node through an attached attribute tag list. Through this operation, the spatial index node acquires the ability to describe attribute semantics in addition to spatial location.

[0025] Using spatial index nodes as the basic unit, a multi-dimensional joint index structure is constructed by integrating all spatial index nodes through the establishment of "spatial adjacency pointers, such as recording the index node addresses of adjacent grid cells," which couples spatial location, object type, and attribute labels. Logically, the multi-dimensional joint index structure is represented as follows: spatial grid as the first dimension, object type as the second dimension, and attribute labels as the third dimension. During retrieval, the target set of spatial index nodes can be determined based on the spatial range, and secondary filtering can be performed within the node set based on object type and attribute labels. This transforms the traditional full-map traversal retrieval into a joint dimensionality reduction retrieval of "spatial positioning-attribute filtering," significantly improving the efficiency of relationship search and candidate filtering in complex drawings.

[0026] For multidimensional composite index structures, a data organization method used to accelerate the retrieval of graphic elements in CAD drawings, it consists of multiple spatial index nodes. The construction steps of a multidimensional composite index structure are as follows: Based on the bounding box of each intrinsic object model, calculate the global bounding rectangle of the entire drawing; divide this rectangle into several grid cells according to preset fixed dimensions, with each grid cell corresponding to a spatial index node.

[0027] Each spatial index node records the following three pieces of information: First, spatial location information, i.e., the X-axis and Y-axis range of the grid cell in the drawing coordinate system; second, object type labels, i.e., a deduplicated summary of object types for all intrinsic object models within the grid cell; and third, an attribute label list, i.e., a deduplicated summary of key attributes for all intrinsic object models within the grid cell. In addition, each spatial index node also stores pointers to its four adjacent grid cells (up, down, left, and right), forming an adjacency relationship. When it is necessary to retrieve a specific type of object within a certain area, one or more corresponding grid cells can be located first through the coordinate range. Then, the required type and attribute conditions can be filtered from the attribute labels of these grid cells, thus achieving efficient retrieval by "spatial location followed by attribute filtering" without traversing the entire drawing.

[0028] Specifically, the system extracts the bounding boxes of all intrinsic object models in the general assembly drawing of the reducer, such as the bounding boxes of the parts list, the text boxes of technical requirements, and the bounding boxes of the bearing blocks, and calculates the global bounding rectangle covering the entire drawing. According to the preset 50mm×50mm equal spacing strategy, the global bounding rectangle is divided into several grid units, thus discretizing the continuous assembly drawing space.

[0029] A spatial index node is generated for each 50mm×50mm grid cell. When the block reference intrinsic object model representing the "gear shaft" is traversed, the object is determined to fall into the (5,8) grid cell based on the coordinate position of its bounding box center point. Then, the intrinsic object model of the "gear shaft" is attached to the (5,8) spatial index node. In this way, all line segments, text, dimensions and other objects in the drawing are attached to their corresponding spatial index nodes.

[0030] For the (5,8) spatial index node that is attached to the "Gear Shaft" block reference, further extract the object type ("block reference class") and attribute features (layer is "Standard Parts Layer", block name is "Gear_Shaft"); convert this information into attribute labels, such as Type=INSERT,Layer=Standard_Parts,Block=Gear_Shaft), and expand the attribute label list attached to the (5,8) spatial index node; if there are other primitives in the mesh, such as dimension lines that indicate tolerances, then similarly add the labels "Dimension Class" and "Tolerance Layer" to the label list of this node.

[0031] By recording the pointers to the upper, lower, left, and right adjacency relationships between each grid cell, a complete multi-dimensional joint index structure is constructed. When subsequent steps require searching for "text objects located within the parts list area" in the reducer drawing, the system does not need to traverse the entire drawing. Instead, it locates the corresponding set of spatial index nodes (first dimension: spatial location) through the coordinate range of the parts list. Within the node set, objects with the "text" type and the "parts list layer" are directly filtered using the attached attribute tags, such as the second and third dimensions: object type and attribute tags. This achieves efficient and accurate positioning and extraction of complex assembly drawing elements.

[0032] refer to Figure 3 In step S12, the specific steps are as follows: S121: Dynamically identify the multidimensional joint index structure and extract the primitive distribution features of the local area during the identification process. The primitive distribution features cover the density distribution of the object, the average height of the local text, the distribution of line segment length, and the scale of the object bounding box. Input the primitive distribution features into the preset tolerance inference network to determine the adaptive tolerance threshold of the corresponding local area. S122: Based on the adaptive tolerance threshold, cross-modal geometric clustering and span merging are performed on geometric primitives to form a candidate set of structural boundaries. In the case of boundary breaks or partial missing parts in CAD drawings, the corresponding implicit boundaries are further deduced by combining text alignment direction, adjacent object positions, row and column alignment rules and local closure constraints. At the same time, the explicit and implicit boundaries of CAD drawings are managed to restore the structural skeleton of CAD drawings that includes the outer contour boundary, row boundary and column boundary.

[0033] In the embodiments of this application, the multidimensional joint index structure is dynamically identified, and the primitive distribution features of local regions are extracted during the identification process. These primitive distribution features cover the density distribution of objects, the average height of local text, the distribution of line segment lengths, and the scale of object bounding boxes. The primitive distribution features are input into a preset tolerance inference network to determine the adaptive tolerance threshold of the corresponding local region. This approach combines the overall considerations of primitive distribution features and the preset tolerance inference network, ensuring the accuracy of the adaptive tolerance threshold of the corresponding local region.

[0034] At this point, the multidimensional joint index structure, which is coupled with the spatial location, object type, and attribute label as described above, is dynamically identified. Dynamic identification means that, based on a preset traversal strategy or a retrieval instruction triggered by the upper-level logic, each spatial index node in the multidimensional joint index structure is parsed sequentially. During the identification process, the spatial range corresponding to the current spatial index node is extracted, thereby dynamically dividing the global drawing space into several local areas to be analyzed, achieving data focusing and isolation from the macroscopic full drawing to the microscopic local areas.

[0035] After determining the local region, the primitive distribution features of that local region are extracted based on the set of intrinsic object models attached to the spatial index nodes corresponding to that region. The primitive distribution features are a multi-dimensional feature vector, specifically covering the following four quantitative indicators: Object density distribution: Counts the number of intrinsic object models contained per unit area in the current local region, which is used to characterize the primitive crowding degree of the region; Average local text height: Calculates the average bounding box height of all text class intrinsic object models within the current local area, used to characterize the basic scale of text primitives in this area; Line segment length distribution: Extract the length statistical features (such as mean, variance or quantile) of all geometric line segment objects in the current local area to characterize the span pattern of line segment primitives in the area; Object bounding box scale: Calculates the diagonal length or average area of ​​the bounding boxes of all intrinsic object models within the current local region, used to characterize the overall geometric scale of the primitives in this region.

[0036] After obtaining the primitive distribution characteristics of the aforementioned local area, the multi-dimensional feature vectors are input into a pre-set tolerance inference network. The tolerance inference network is a pre-trained mapping model, such as a multilayer perceptron or regression tree model, which establishes a non-linear mapping relationship between primitive distribution characteristics and optimal tolerance parameters. The tolerance inference network performs forward propagation and mapping calculation on the input feature vectors and outputs a set of adaptive tolerance thresholds corresponding to the current local area. The adaptive tolerance thresholds include at least row clustering tolerance, column clustering tolerance, line segment merging tolerance, text attribution tolerance, and nearest neighbor search radius. Thus, dynamic and precise customization of tolerance parameters is achieved for local areas with different complexities and drawing styles in the drawing.

[0037] The adaptive tolerance threshold refers to a set of allowable distance or deviation values ​​dynamically calculated for different local areas in a CAD drawing to determine whether graphic elements belong to the same structural unit. This threshold is not a fixed value but is calculated by a "tolerance inference network" based on the graphic element distribution characteristics of the current local area. Specifically, this threshold set includes at least the following four parameters: "row clustering tolerance, the maximum Y-coordinate deviation used to determine whether two horizontal line segments belong to the same row," "column clustering tolerance, the maximum X-coordinate deviation used to determine whether two vertical line segments belong to the same column," "text affiliation tolerance, the maximum offset distance used to determine whether text belongs to a certain cell," and "nearest neighbor search radius, the maximum spatial distance used to retrieve candidate related objects."

[0038] For example, in text-dense detail table areas, due to the congestion of graphic elements, the system outputs a smaller neighbor search radius to avoid incorrect associations across cells; while in sparse main view areas, the system outputs a larger neighbor search radius to cover more distant candidate objects.

[0039] Specifically, the system dynamically identifies the constructed multidimensional joint index structure. For example, the system sequentially scans the spatial index nodes corresponding to the lower right corner of the drawing, dynamically determines the "rectangular range covered by the node, i.e. the area where the details table is located" as the current local area, and determines the node corresponding to the center area of ​​the main view of the drawing as another local area, thereby realizing the block parsing of different drawing areas.

[0040] For the identified "partial area of ​​the schedule", the system extracts the distribution characteristics of all intrinsic object models within the area: Statistically, the number of graphic elements per unit area in this schedule area is extremely large, indicating a high object density distribution; the average height of the bounding boxes of text such as "part name" and "material" within the area is approximately 3.5mm, indicating an average local text height of 3.5mm; the length distribution of the horizontal and vertical line segments constituting the table border is mainly concentrated between 50mm and 180mm; the average size of the object bounding boxes of all graphic elements is relatively small, showing a compact arrangement; In contrast, in the "partial area of ​​the gear shaft" in the main view, the extracted object density distribution is low, the average local text height may be 5mm, and the line segment length distribution is mostly short line segments or arcs.

[0041] The "four-dimensional primitive distribution feature vector extracted from the 'partial area of ​​the detail table,' characterized by high density, 3.5mm text height, medium-length line segments, and small bounding box scale," is input into the tolerance inference network. Based on the high-density features, the network determines that this area is prone to mismatches and outputs a "smaller neighbor search radius, such as 1.0mm," to avoid incorrect cross-cell associations. Simultaneously, based on the 3.5mm text height, a text attribution tolerance of 0.7mm is output proportionally. Conversely, if the input is the feature vector of the "partial area of ​​the gear shaft," due to its low density and large text height, the tolerance inference network adaptively outputs a "larger neighbor search radius, such as 3.0mm," and a "larger text attribution tolerance, such as 1.5mm," to adapt to the sparse and large-font primitive layout. Through this process, different areas in the same reducer assembly drawing obtain the tolerance threshold that best matches their local features, completely avoiding problems such as text overflow or missing main view associations caused by a single fixed threshold.

[0042] Furthermore, based on the adaptive tolerance threshold, cross-modal geometric clustering and span merging are performed on geometric primitives to form a candidate set of structural boundaries. In scenarios where there are boundary breaks or partial missing parts in CAD drawings, the corresponding implicit boundaries are further deduced by combining text alignment direction, adjacent object positions, row and column alignment rules, and local closure constraints. At the same time, the explicit and implicit boundaries of CAD drawings are managed to restore the structural skeleton of CAD drawings, which includes the outer contour boundaries, row boundaries, and column boundaries. A multi-dimensional joint index structure is introduced to further control the adaptive tolerance threshold, thereby realizing the restoration of the structural skeleton of CAD drawings.

[0043] At this point, based on the determined local adaptive tolerance threshold, cross-modal geometric clustering is performed on the geometric primitives within the local area. Candidate geometric line segments are then selected and categorized into horizontal and vertical line segment sets based on their direction parameters. Using the row and column clustering tolerances in the adaptive tolerance threshold as criteria, positional clustering is performed on the horizontal and vertical line segments respectively, merging line segments with spatial position deviations within the tolerance range into the same cluster. Furthermore, a span merging operation is performed on the line segments within the same cluster, i.e., calculating the union interval of the line segment projections in the corresponding directions, merging multiple discrete and collinear short line segments into a single continuous long line segment, thus forming a candidate set of structural boundaries.

[0044] After forming a candidate set of structural boundaries, the system checks whether there are scenarios of boundary breaks or partial missing parts in the CAD drawings. If so, it further combines multi-dimensional constraints to deduce the corresponding implicit boundaries. The deduction process specifically includes: extracting the text alignment direction and adjacent object positions of text primitives in the current local area, identifying the arrangement rules of text in the horizontal or vertical direction, and forming row and column alignment rules. At the same time, combined with the recovered adjacent explicit boundaries, local closure constraints are applied, that is, assuming that the tables or areas in the engineering structure are usually closed rectangular topologies. When a certain area is missing a closed line segment, but the row and column distribution of the internal text is regular and aligned with the existing boundaries, virtual completion line segments are generated at the missing point based on the row and column alignment rules and local closure constraints, which is the implicit boundary.

[0045] After deriving the implicit boundaries, the explicit boundaries that actually exist in the CAD drawings and the implicit boundaries generated by the derivation are managed in a unified manner. At this time, each boundary is assigned a source identifier, which contains at least two labels: "explicit" and "implicit" to preserve the traceability of the boundary restoration process. Based on the set of explicit and implicit boundaries, the outer contour boundaries, row boundaries, and column boundaries of the structure are identified and extracted, thereby reconstructing a complete or nearly complete structural skeleton, which is then used as the geometric framework for the subsequent generation of high-level objects.

[0046] Specifically, for the detail table area in the lower right corner of the drawing, the system extracts the geometric primitives that make up the horizontal and vertical grid lines of the detail table. Due to drawing errors, the two short horizontal lines belonging to the lower boundary of the first row have a slight deviation in the Y-axis coordinate. Based on the row clustering tolerance derived above, such as 0.8mm, the system determines that the two short horizontal lines belong to the same horizontal cluster and performs span merging on the two in the X-axis direction to generate a complete long horizontal line that runs through the left and right boundaries. This long horizontal line is then included in the candidate set of structural boundaries.

[0047] On the far right of the schedule, due to omissions in the drafting or damage to the drawing, the right vertical boundary line of the last column is completely missing, indicating a partial boundary loss scenario. At this time, the system detects that there are multiple lines of text such as "Quantity" and "Remarks" within this area. The right edges of these texts are highly aligned in the X-axis direction, forming a clear right alignment rule, i.e., the text alignment direction and the position of adjacent objects. At the same time, there are explicit boundaries on the left and top and bottom sides of the schedule. Based on the row and column alignment rules and the local closure constraint that the table must be closed, the system automatically deduces a vertical virtual line segment at the right alignment line position of the rightmost column of text as the missing right boundary, i.e., the implicit boundary.

[0048] The system manages the recovered boundaries, labeling the horizontal and vertical lines derived from the original graphic elements as "explicit" and the rightmost vertical boundary as "implicit". Based on these boundaries, the system extracts the outline of the detail table, the row separators (row boundaries), and the column separators (column boundaries), thus successfully recovering the complete structural skeleton of the reducer assembly drawing detail table, ensuring the completeness and accuracy of subsequent part information extraction.

[0049] refer to Figure 4 In step S13, the specific steps are as follows: S131: In the restored structural skeleton, candidate objects of the target text are screened based on the multi-dimensional joint index structure and adaptive tolerance threshold, and the corresponding spatial relationship is determined. At the same time, the sequence labeling mechanism is used to perform semantic fusion and splicing on multiple lines of text within the same semantic cluster, thereby completing the text belonging binding. Furthermore, multi-stage spatial relationship dynamic pre-playing is performed on the restored structural skeleton. S132: In the dynamic pre-simulation of the multi-stage spatial relationships of the restored structural skeleton, a multi-dimensional joint index structure is used to retrieve local neighborhood candidate objects. Based on the bounding box and endpoint contact, a preliminary determination of geometric relationships is made. Then, combined with object type and semantic constraints, dynamic screening and confidence assessment are carried out to determine the corresponding dynamic pre-simulation events.

[0050] In the embodiments of this application, in the restored structural skeleton, candidate objects of the target text are screened based on the multi-dimensional joint index structure and adaptive tolerance threshold, and the corresponding spatial relationship is determined. At the same time, the sequence labeling mechanism is used to perform semantic fusion and splicing on multiple lines of text within the same semantic cluster, thereby completing the text attribution binding. Furthermore, multi-stage spatial relationship dynamic pre-simulation is performed on the restored structural skeleton, introducing multi-stage spatial relationship dynamic pre-simulation of the restored structural skeleton.

[0051] At this point, based on the restored structural skeleton, using the intrinsic object model of the target text primitives as the query starting point, and utilizing the aforementioned constructed multidimensional joint index structure, the local grid region where the target text is located is quickly located in the spatial dimension, and a candidate set of object types, such as structural units, regional objects, or engineering objects, is filtered in the attribute dimension. Based on the adaptive tolerance threshold determined by the current local region, specifically the text belonging tolerance and the neighbor search radius, the geometric relationship between the bounding box or center point of the target text and the boundary of the candidate object is calculated. The geometric relationship determination includes at least inclusion relationship, intersection relationship, and proximity relationship. If the target text falls inside the bounding box of the candidate object or the offset distance is within the adaptive tolerance threshold range, it is determined that there is a potential spatial association between the two, thus completing the preliminary determination of the spatial relationship of the candidate objects.

[0052] To address the common problem of scattered multi-line text in engineering drawings, after initial spatial relationship determination, a sequence labeling mechanism is introduced to perform semantic fusion and splicing of multi-line text. At this point, text lines that are spatially adjacent, belong to the same structural unit, or have the same attribute labels are serialized and input into a preset sequence labeling model. The sequence labeling model assigns fusion labels to each text element in the sequence based on the horizontal proximity, vertical proximity, text height consistency, and semantic coherence of the text, such as sequence start label, sequence middle label, or sequence end label. Based on the fusion labels, multi-line text belonging to the "same semantic cluster, i.e., having the same combination of fusion labels" is logically spliced ​​to form long text content that conforms to the complete engineering semantics, and noisy marked text is filtered out.

[0053] After completing the semantic fusion and splicing of multi-line text, the generated complete long text is treated as a whole text object, and its spatial relationship with the candidate objects selected in step S21 is recalculated. If the whole text object clearly falls within the boundary of a "certain structural unit, such as a cell or region object", or satisfies the local alignment and anchor point constraints with a "certain engineering object, such as a block object", then the ownership binding relationship between the whole text object and the corresponding candidate object is established, thereby realizing the stable mounting of text with geometric structures and engineering objects.

[0054] After completing the text attribution binding, a multi-stage spatial relationship dynamic pre-simulation is performed on the restored structural skeleton and its bound text objects. Dynamic pre-simulation refers to the step-by-step simulation and deduction within a local area based on the restored structural boundaries, row and column grid skeletons, attribution-bound text and geometric objects, according to a "preset spatial relationship rule library covering relationship types such as containment, proximity, alignment, intersection, connectivity, attribution, and anchoring". Local topology pre-simulation is performed to verify whether the compositional relationship between cells and rows and columns is closed. Next, semantic constraint pre-simulation is performed to verify whether the mapping between text labels and structural units conforms to engineering logic. Finally, global association pre-simulation is performed to infer the node connectivity and size binding relationship across regions. Through the above multi-stage pre-simulation, dynamic pre-simulation events reflecting the spatial and semantic relationships between objects are identified and output, providing a relational constraint basis for the subsequent construction of high-level engineering object networks.

[0055] Specifically, for the "Material" column in the details table, the system uses the target text "45 steel" as the query object, uses a multidimensional composite index to quickly locate the corresponding grid area in the details table, and filters the cell boundaries within that area as candidate objects. Based on the small adaptive text inclusion tolerance of the details table area, such as 0.7mm, the system determines that the center point of the text "45 steel" falls completely inside the cell boundary box of the third row and second column, thus determining that there is an inclusion relationship between the two.

[0056] In the technical requirements area of ​​the reducer, there are two adjacent lines of text: "All mating surfaces during assembly" and "No oil leakage is allowed". The system serializes these two lines of text and inputs them into the sequence labeling model. Based on the fact that the vertical spacing between the two lines is within the tolerance range, the text height is consistent, and the semantics constitute a coherent expression of conditions and results, the model assigns a "sequence start label" to the first line and a "sequence end label" to the second line. Accordingly, the system logically concatenates these two scattered lines of text into the complete long text "No oil leakage is allowed at all mating surfaces during assembly".

[0057] The system treats the concatenated complete technical requirement text as a whole and recalculates its relationship with the candidate "technical requirement region object". Since the entire text is completely within the bounding box of the technical requirement region and meets the alignment constraints, the system performs affiliation binding on this complete text with the region object to ensure that the technical requirement is extracted as a complete semantic unit.

[0058] The system performs multi-stage dynamic spatial relationship pre-simulation on the restored structural skeleton of the reducer drawings. In the local topology pre-simulation, it verifies whether the boundaries of each row and column of the parts list correctly intersect to form cells. In the semantic constraint pre-simulation, it verifies whether the dimensioning objects, such as the dimension lines that annotate the diameter of the gear shaft, satisfy the intersection relationship between the leader direction and the geometric objects. In the global association pre-simulation, it deduces the anchoring correspondence between the "drawing code" text in the title block and the header of the parts list. Through the above pre-simulation, the system accurately outputs dynamic pre-simulation events such as "cell contains text", "dimension lines are bound to geometric contours", and "title block is anchored to the parts list", providing accurate relational data for the final generation of the engineering object network of the reducer assembly drawing.

[0059] Furthermore, in the dynamic pre-simulation of the multi-stage spatial relationships of the restored structural skeleton, a multi-dimensional joint index structure is used to retrieve local neighborhood candidate objects. Based on the bounding box and endpoint contact, a preliminary determination of geometric relationships is made. Then, dynamic screening and confidence assessment are carried out in combination with object type and semantic constraints, thereby determining the corresponding dynamic pre-simulation events. This approach is compatible with the overall consideration of dynamic screening and confidence assessment based on object type and semantic constraints, ensuring the accuracy of the corresponding dynamic pre-simulation events.

[0060] At this point, during the multi-stage spatial relationship dynamic pre-simulation of the restored structural skeleton, the target intrinsic object model to be determined is used as the query anchor point. The retrieval operation is performed using the multi-dimensional joint index structure that couples the spatial location, object type, and attribute labels in the three dimensions mentioned above. At this point, based on the bounding box of the target object, a preset neighbor search radius is expanded outward to quickly locate the grid area that overlaps with or is adjacent to the target object in the spatial dimension. At the same time, in the attribute dimension, filtering conditions are set according to the relationship type to be determined, such as retrieving candidate cell objects, geometric objects, or size objects. This extracts the set of objects that meet the attribute conditions from the index nodes corresponding to the grid area, forming a local neighborhood candidate object set, which greatly reduces the computational complexity of full graph traversal to local subset retrieval.

[0061] After obtaining the set of local neighborhood candidate objects, the bounding boxes and geometric parameters of the target object and each candidate object are extracted, and a preliminary geometric relationship determination is performed. The preliminary geometric relationship determination includes at least: calculating the intersection-union ratio or inclusion relationship between bounding boxes to determine whether there is an inclusion or intersection relationship; calculating the Euclidean distance between center points to determine the proximity relationship; extracting the axis direction or alignment edge to determine the alignment relationship; and extracting the endpoint coordinates of line segment objects, calculating the shortest distance between the endpoints and the boundary of the candidate object. If the shortest distance is less than the preset connectivity determination tolerance, it is determined that there is an endpoint contact situation, thereby initially establishing the candidate geometric relationship between the target object and the candidate objects.

[0062] After the initial determination of geometric relationships, the results are further dynamically filtered by combining object type and semantic constraints. At this point, based on the prior semantic rules of the engineering drawings, reasonable relationships between different types of objects are constrained and filtered: for example, text objects are preferentially allowed to establish belonging or anchoring relationships with cell objects or block objects, while belonging relationships with line segment objects are prohibited; dimension objects are preferentially allowed to establish dimension binding relationships with geometric contours; based on semantic constraints, candidate associations that meet the geometric conditions but are semantically unreasonable are eliminated; the confidence of the remaining candidate associations is evaluated, and the confidence evaluation comprehensively considers the depth of the bounding box, the tightness of the endpoint contact, and the priority weight of the semantic constraints, and outputs the confidence score of each pair of candidate associations through weighted calculation.

[0063] Based on the results of dynamic screening and confidence scores, corresponding dynamic pre-simulation events are determined; the association between target objects and candidate objects with confidence scores higher than a preset threshold is instantiated to generate dynamic pre-simulation event records containing relationship type, relationship subject and object, and confidence scores; dynamic pre-simulation events characterize the most likely spatial and logical interaction patterns between objects under the current structural skeleton and semantic constraints, providing solid relationship edge data for the subsequent construction of high-level engineering object networks.

[0064] Specifically, when the system performs a spatial relationship simulation of the end of the center line of the main view of the gear shaft, it uses the center line object as an anchor point and uses a multi-dimensional joint index structure to retrieve the grid in which it is located and its adjacent grids. The system locates the area around the center line in the spatial dimension and filters "node type" and "dimension type" objects in the attribute dimension, quickly excluding text objects in the far-end detail table area, forming a set of local neighborhood candidate objects that only contain the local arc center point and diameter dimension annotation.

[0065] The system performs a geometric determination on the center line and the center point objects in the candidate set; the calculation found that the boundary distance between the right endpoint coordinate of the center line and the center point object of the right bearing is only 0.2mm, which is less than the connectivity determination tolerance, such as 0.5mm. Therefore, it is initially determined that there is a "endpoint contact" connectivity geometric relationship between the two; at the same time, the center line passes through the gear shaft profile as a whole, and it is determined that there is an "intersection" relationship.

[0066] The system introduces semantic constraints for dynamic filtering. According to prior rules, "centerline" objects and "node" objects are allowed to establish a "connected" relationship, while a connected relationship with general contour lines is prohibited. Based on this, the system eliminates the incorrect connection judgment between the centerline and the adjacent gear contour lines. Confidence assessment is performed. Since the "endpoint distance is extremely small, such as 0.2mm" and the semantics conform to the engineering logic of "axis passing through the center of the circle", the confidence assessment score of this connection relationship is 0.95.

[0067] At this point, the confidence score is a floating-point number between 0 and 1, used to quantify the credibility of the relationship between two objects as a genuine engineering relationship. The closer the score is to 1, the higher the probability that the relationship is valid; the closer the score is to 0, the higher the probability that the relationship is a false match. In this example, the "connectivity" relationship between the centerline object and the node object is assigned a confidence score of 0.95, which is calculated based on a weighted average of the following multiple quantitative indicators.

[0068] First Dimension: Spatial Distance Density: The system calculates the Euclidean distance between the endpoints of the centerline object and the center point of the node object. In this example, this distance is 0.2 mm. The system compares this distance with the adaptive nearest neighbor search radius of the current local region. This radius is determined by the tolerance inference network based on the local primitive distribution characteristics. Assuming the nearest neighbor search radius of the current region is 0.5 mm, the system uses the ratio of the actual distance to the search radius as the spatial distance sub-score. The calculation formula is: 1 minus (actual distance divided by search radius). Substituting the value, we get 1 minus (0.2 divided by 0.5), that is, 1 minus 0.4, which gives 0.6. This sub-score reflects the rule that the closer the endpoints are, the higher the score.

[0069] Second dimension: Geometric alignment consistency: The system verifies whether the axis direction of the centerline object points to the center point of the node object. The system calculates the direction vector of the centerline object and the vector from the endpoint of the centerline to the center point of the node, and calculates the cosine value of the angle between the two vectors. In this example, the centerline points exactly to the center of the circle, the angle is 0 degrees, and the cosine value is 1. The system uses this cosine value as the geometric alignment sub-score, i.e., 1.0. This sub-score reflects the degree of alignment between the axis direction and the node position. The score is 1 when perfectly aligned and 0 when perpendicular.

[0070] The third dimension: Semantic matching degree of object type: Based on the preset prior rule base, the system determines whether the combination of object types of the current subject and object conforms to engineering semantics. In this example, the subject is a "centerline" object and the object is a "node" object. The rule base explicitly stipulates that "centerline" and "node" objects are allowed to establish a "connected" relationship, and the semantic matching degree of this relationship is 1.0. If the type combination of the subject and object is not defined in the rule base or is explicitly prohibited, the semantic matching degree sub-score is 0. In this example, the sub-score is 1.0.

[0071] Fourth Dimension: Local Context Consistency: The system checks whether the current judgment result is consistent with other judged relationships within the same local area. For example, in the gear shaft area of ​​this example, the system simultaneously detects multiple connectivity relationships between center lines and nodes, and the spatial distance and alignment angle of these relationships show a consistent pattern. The system calculates the outlier degree of the current judgment result by statistically analyzing the mean and variance of the distances of all similar judgment results within the local area. Since the distance value of 0.2 mm is very close to the average distance of 0.18 mm in the area and there is no outlier, the system assigns a local context consistency sub-score of 0.95.

[0072] Therefore, the system sums the four sub-scores according to preset weight coefficients. The weight allocation is based on engineering practice experience: spatial distance density reflects direct geometric contact and is the most basic evidence of connectivity, so it is assigned a weight of 0.4; geometric alignment consistency reflects directional matching, which is crucial for engineering logic such as "centerline passes through the center of a circle", so it is assigned a weight of 0.3; object type semantic matching reflects engineering prior knowledge and can quickly eliminate semantically impossible relationships, so it is assigned a weight of 0.2; local context consistency is used as an auxiliary verification item to reduce random errors, so it is assigned a weight of 0.1.

[0073] Calculated according to the above weights: 0.6×0.4=0.24, 1.0×0.3=0.30, 1.0×0.2=0.20, 0.95×0.1=0.095, the sum of the four items is: 0.24+0.30+0.20+0.095=0.835. However, since the scores of all four sub-scores in this local area are not lower than 0.6, and the geometric alignment consistency score is full, the system determines that the relationship meets the triggering condition of "high confidence" and applies a non-linear gain to the final score, correcting 0.835 upward to 0.95.

[0074] The system instantiates the pair of associations with a confidence level of 0.95 that exceeds the "preset threshold, such as 0.7", and generates a dynamic pre-simulation event record: "Centerline object A and node object B have a connectivity relationship, confidence level 0.95". At the same time, for a nearby diameter dimension annotation object, the system generates a dynamic pre-simulation event "Dimension object C and geometric contour D have a dimension binding relationship" through the same geometric and semantic filtering. These pre-simulation events accurately capture the positioning and annotation logic of the core parts in the reducer assembly drawing, providing reliable relationship edges for the final construction of the engineering object network of the gear shaft component.

[0075] refer to Figure 5 In step S14, the specific steps are as follows: S141: Dynamically identify dynamic pre-play events and output the corresponding identification results. Combine the restored structural skeleton to determine multiple key structural contents, including table objects, row objects, column objects, cell objects, region objects, node objects and size binding. S142: The intrinsic object model performs cross-matching of key structural content and assigns an identifier, original primitive, boundary, semantics and association to each high-level structural object during the matching process. With key structural content as nodes and spatial and semantic associations determined by dynamic pre-playing events as edges, an engineering object network is constructed. In this engineering object network, the nodes represent high-level structural objects and the edges represent the spatial and semantic associations between objects.

[0076] In the embodiments of this application, dynamic pre-simulation events are dynamically identified and the corresponding identification results are output. In combination with the restored structural skeleton, multiple key structural contents are determined. The multiple key structural contents include table objects, row objects, column objects, cell objects, region objects, node objects, and size binding.

[0077] At this point, dynamic recognition is performed on the dynamic pre-simulation events generated in the aforementioned steps. Dynamic recognition refers to parsing and pattern matching of dynamic pre-simulation event records that include relation types, relation subjects, objects, and confidence scores. Based on a preset engineering structure event pattern library, the input dynamic pre-simulation events are compared with typical association templates in the pattern library, such as "cells containing text," "nodes connecting line segments," and "dimensions binding geometric contours," to verify the rationality of the event logic. When the confidence score of a pre-simulation event is higher than a preset threshold and meets the pattern constraints, the event is determined to be a valid recognition event, and the relation subjects and objects in the event are extracted as recognition results. Otherwise, they are filtered out to eliminate mismatches or noisy associations.

[0078] After outputting valid recognition results, the recognition results are mapped and fused with the "restored structural skeleton in step S122, including the outer contour boundary, row boundary and column boundary of the structure". Specifically, the restored structural skeleton is used as a spatial topological framework. The set of objects with the same boundary belonging or satisfying specific spatial inclusion relationship in the recognition results is clustered and encapsulated, thereby upsizing and aggregating discrete low-level primitives and intermediate objects into high-level structured entities. The high-level structured entities are the key structural content. They not only inherit the geometric boundary features of the structural skeleton, but also integrate the semantic associations and functional attributes revealed by the dynamic pre-show events, realizing the leap from geometric skeleton to engineering semantic objects.

[0079] In the process of determining key structural content, based on the different mapping relationships between the identification results and the structural skeleton, various types of high-level key structural content are generated and instantiated; specifically including: (1) Table object: the whole area enclosed by the closed outer contour boundary and the inner row and column boundary, and instantiated when it contains a large amount of belonging text; (2) Row object and column object: the set of objects composed of continuous horizontal or vertical boundaries and internal alignment; (3) Cell object: the smallest closed area formed by the intersection of the row boundary and the column boundary, and instantiated when it is bound with belonging text; (4) Region object: the closed range enclosed by specific boundaries, which does not have typical table row and column characteristics but has a unified attribute label (such as technical requirement area); (5) Node object: in pipeline or logical connection relationship, the intersection entity of multiple line segment endpoints converges and satisfies the connectivity pre-event; (6) Dimension binding object: a composite entity composed of dimension annotation entity and target geometric object that satisfies the dimension binding pre-event.

[0080] Specifically, the system dynamically identifies pre-event events. For example, upon receiving a pre-event "text '45 steel' belongs to the bounding box, confidence level 0.95", the system compares it with the pattern library, confirms that it conforms to the "cell contains text" pattern, determines it as a valid event, and outputs the association result between the text and the bounding box. At the same time, upon receiving the event "dimension line is bound to geometric contour, confidence level 0.88", it is confirmed to conform to the dimension binding pattern and is also output as a valid result. However, if it receives "detail table text is connected to the endpoint of the center line of the main view, confidence level 0.3", it is filtered out because it does not conform to the logical pattern and has a low confidence level.

[0081] The system maps the effective recognition results onto the restored structural skeleton. In the lower right corner of the reducer drawing, the system has restored the structural skeleton composed of multiple horizontal and vertical lines, including the outer contour and internal grid boundaries. The system merges and encapsulates all "text objects" belonging to the internal boundaries of the skeleton in the recognition results, such as "part number", "name", "gear shaft", "45 steel", etc., with the skeleton, aggregating the originally discrete lines and text into a whole structure with engineering semantics.

[0082] The system generates and instantiates specific high-level key structural content: For the closed grid skeleton in the lower right corner and its internal belonging text, a table object called "Details Table" is instantiated; multiple "row objects, such as the row containing the gear shaft" and "column objects, such as the material column" are instantiated based on the alignment rules of the horizontal boundaries and text; cell objects are instantiated based on the smallest closed area where row and column boundaries intersect, combined with the internal text "45 steel"; for the area in the lower left corner of the drawing that lacks row and column features but is enclosed by boundaries and contains multiple technical requirement texts, a "Technical Requirements" area object is instantiated; in the main view, based on the intersection points of multiple pipeline segments and the connection pre-simulation event, a node object for the hydraulic interface is instantiated; based on the binding event between the dimension line and the outer circle contour of the gear shaft, a dimension binding object for annotating the gear shaft diameter is instantiated; thus, the reducer assembly drawing is completely restored from the underlying point, line, and surface primitives into a high-level structural content system with rich engineering semantics.

[0083] Furthermore, the intrinsic object model performs cross-matching of key structural content and assigns each high-level structural object an identifier, original primitive, boundary, semantics, and association during the matching process. Using key structural content as nodes and spatial and semantic associations determined by dynamic pre-simulation events as edges, an engineering object network is constructed. In this engineering object network, nodes represent high-level structural objects, and edges represent spatial and semantic associations between objects. This further controls dynamic pre-simulation events, fully considers multiple key structural contents and the intrinsic object model, and improves the accuracy of the engineering object network.

[0084] At this point, the set of intrinsic object models that combine spatial topology and deep semantics generated in the previous steps is cross-matched with the key structural content determined in step S141. Then, the spatial location and attribute labels of the intrinsic object models are retrieved and compared with the boundary information and geometric coverage of the key structural content as constraints. If the spatial location of an intrinsic object model falls completely within the boundary range of the key structural content, and its object type and attribute features conform to the semantic definition of the key structural content, then the intrinsic object model is determined to be successfully matched with the key structural content, thereby establishing the source association between the bottom primitives and the high-level structure.

[0085] After cross-matching is completed, attribute assignment and instantiation operations are performed for each key structural content to generate the final high-level structural object. Attribute assignment includes at least: assigning a globally unique object identifier to each high-level structural object; mounting the set of successfully matched intrinsic object models as the original primitive set to which the high-level structural object belongs; extracting and writing the outer contour and internal boundary information of the key structural content; extracting and writing text content or deep semantic content based on the text features and attribute features in the matched intrinsic object models; and initializing the set of association relationships of the object based on the aforementioned dynamic pre-playing events. Through the above operations, the abstract key structural content is transformed into a high-level structural object entity with a complete data structure.

[0086] Using high-level structural objects as nodes in the engineering object network and spatial and semantic relationships determined by dynamic pre-simulation events as edges, topology construction is performed. Then, all valid dynamic pre-simulation events are traversed, and the relational subjects and objects within the events are extracted. Directed or undirected connections are established between the corresponding nodes, and the "relationship type, such as containment, proximity, alignment, intersection, connectivity, belonging, anchoring, etc." and the relationship confidence level are used as the weight attributes of the edges. Thus, discrete high-level structural objects are linked into a graph structure that expresses the overall engineering semantics, i.e., the engineering object network.

[0087] In the engineering object network, nodes explicitly represent high-level structural objects, such as tables, regions, nodes, and size-bound objects, while edges explicitly represent the spatial and semantic relationships between objects. The system performs secondary verification and filtering on isolated nodes in the network and prunes redundant transitive edges to ensure the compactness of the network topology and the accuracy of the logic, thereby outputting a structured engineering object network that can be directly parsed and invoked by downstream engineering applications.

[0088] Specifically, the system cross-matches the intrinsic object model with the identified key structural content. For example, for the key structural content of "gear shaft material cell", the system retrieves the intrinsic object model within its boundary range and successfully matches the text intrinsic object "45 steel" and the four line segment intrinsic objects that constitute the boundary of the cell, thereby establishing the association between the underlying primitive and the cell.

[0089] The system assigns attributes and instantiates the cell; assigns it a globally unique object identifier, such as "Cell_GearShaft_Material"; mounts the previously matched text and line segment intrinsic objects as their respective original primitive sets; extracts the coordinate range of the four line segments as boundary information; writes the text content "45 steel" and the semantic tag "material"; and initializes its association set; and so on, the entire schedule table is instantiated as a "table object", the center line intersection in the main view is instantiated as a "node object", and the shaft diameter with tolerance annotation is instantiated as a "dimension binding object".

[0090] The system uses these instantiated high-level structural objects as nodes and constructs network edges based on dynamic pre-event events. For example, based on the "belonging" pre-event event, an edge of type "belonging" is established between the "Material Cell Object" node and the "45 Steel Text Object" node; based on the "contains" pre-event event, an edge of type "contains" is established between the "Details Table Object" node and the "Material Cell Object" node; based on the "Dimension Binding" pre-event event, an edge of type "Dimension Binding" is established between the "Dimension Binding Object" node and the "Gear Shaft Geometric Profile Object" node.

[0091] The system semantically defines the generated engineering object network. At this point, the entire reducer assembly drawing has been transformed into a complete graph network: the nodes in the network represent high-level structural objects such as parts lists, cells, technical requirement areas, and pipeline nodes, and the edges in the network accurately represent spatial and semantic relationships such as "cell belonging to table", "text anchoring node", and "dimensional constraint geometry". This engineering object network can be directly output to the drawing intelligent question-and-answer system. When a user queries "material and dimensions of gear shaft", the system can quickly navigate from the "gear shaft" node to the "material cell" node and the "dimensional binding object" node by traversing the network edges, thus achieving accurate extraction of engineering knowledge.

[0092] Please see Figure 6 The CAD drawing structure recovery system based on multi-source primitive fusion is applied to the aforementioned CAD drawing structure recovery method based on multi-source primitive fusion; the CAD drawing structure recovery system based on multi-source primitive fusion includes: The multidimensional joint index module 21 is used to obtain multi-source primitives in CAD drawings, perform feature mapping on the multi-source primitives, thereby generating an intrinsic object model containing geometric primitives, text features and attribute features, and constructing a corresponding multidimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model. The recovery module 22 is used to extract the primitive distribution features of local areas based on the multi-dimensional joint index structure, dynamically determine the corresponding adaptive tolerance threshold based on the primitive distribution features, perform cross-modal merging of geometric primitives based on the adaptive tolerance threshold, and infer implicit boundaries by combining text features in the scenario of missing boundaries, thereby restoring the structural skeleton of the CAD drawing. The dynamic pre-simulation module 23 is used to perform multi-line semantic fusion and attribution determination on geometric primitives and text features in the restored structural skeleton, and to perform multi-stage spatial relationship dynamic pre-simulation on the restored structural skeleton, thereby determining the corresponding dynamic pre-simulation events. The engineering object network module 24 is used to determine multiple key structural contents based on the identification of dynamic pre-simulation events, and to determine the engineering object network by combining the cross-matching of the intrinsic object model. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic relationships between objects.

[0093] It should be noted that although multiple modules are mentioned in the detailed description above, this division is not mandatory; in fact, according to the embodiments of this disclosure, the features and functions of two or more modules or described above can be embodied in one module; conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.

[0094] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein; this application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein; the specification and embodiments are to be considered exemplary only.

[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for restoring the structure of CAD drawings based on multi-source primitive fusion, characterized in that, include: The system acquires multi-source primitives from CAD drawings, performs feature mapping on these primitives, and generates an intrinsic object model that includes geometric primitives, text features, and attribute features. Based on the spatial distribution and attribute dimensions of the intrinsic object model, the system constructs a corresponding multi-dimensional joint index structure. Based on the multidimensional joint index structure, the primitive distribution features of local regions are extracted, and the corresponding adaptive tolerance threshold is dynamically determined according to the primitive distribution features. Based on the adaptive tolerance threshold, geometric primitives are merged across modes, and implicit boundaries are inferred by combining text features in the scenario of missing boundaries, thereby restoring the structural skeleton of CAD drawings. In the restored structural skeleton, multi-line semantic fusion and attribution determination are performed on geometric primitives and text features, and multi-stage dynamic spatial relationship pre-simulation is performed on the restored structural skeleton to determine the corresponding dynamic pre-simulation events. This includes: in the restored structural skeleton, candidate objects of the target text are screened based on a multi-dimensional joint index structure and adaptive tolerance threshold, and the corresponding spatial relationships are determined. At the same time, the sequence labeling mechanism is used to perform semantic fusion and splicing on multiple lines of text within the same semantic cluster to complete the text attribution binding, and further multi-stage dynamic spatial relationship pre-simulation is performed on the restored structural skeleton; in the multi-stage dynamic spatial relationship pre-simulation of the restored structural skeleton, local neighborhood candidate objects are retrieved using a multi-dimensional joint index structure, and the geometric relationships are initially determined based on the bounding box and endpoint contact. Then, dynamic screening and confidence evaluation are performed in combination with object type and semantic constraints to determine the corresponding dynamic pre-simulation events. The confidence assessment comprehensively considers the depth of the bounding box, the tightness of the endpoint contact, and the priority weight of semantic constraints; the dynamic pre-event characterizes the spatial and logical interaction patterns between objects under the current structural skeleton and semantic constraints. Based on the identification of dynamic pre-simulation events, multiple key structural contents are determined, and the engineering object network is determined by cross-matching of the intrinsic object model. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic relationships between objects.

2. The CAD drawing structure recovery method based on multi-source primitive fusion according to claim 1, characterized in that, The process of acquiring multi-source primitives from CAD drawings, performing feature mapping on these primitives to generate an intrinsic object model containing geometric primitives, text features, and attribute features, and constructing a corresponding multi-dimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model, includes: The target CAD drawing file is obtained by traversing the CAD database. Based on the identification of the target CAD drawing file, the corresponding multi-source heterogeneous primitives are extracted. The feature mapping of the multi-source heterogeneous primitives is triggered by combining a pre-trained feature extraction network to convert the multi-source heterogeneous primitives into a unified internal object representation. The attention mechanism is used to perform cross-modal fusion of geometric primitives, text features and attribute features to generate an intrinsic object model that combines spatial topology and deep semantics.

3. The CAD drawing structure recovery method based on multi-source primitive fusion according to claim 2, characterized in that, The process of acquiring multi-source primitives from CAD drawings, performing feature mapping on these primitives to generate an intrinsic object model containing geometric primitives, text features, and attribute features, and constructing a corresponding multi-dimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model, also includes: Using the bounding box of the intrinsic object model as spatial distribution information and object type and attribute characteristics as attribute dimensions, the CAD drawing space is divided into gridded areas to generate spatial index nodes. Object type and attribute labels are then attached to these spatial index nodes, thereby constructing a multi-dimensional joint index structure that couples spatial location, object type, and attribute labels.

4. The CAD drawing structure recovery method based on multi-source primitive fusion according to claim 1, characterized in that, The method involves extracting the primitive distribution features of local regions based on a multi-dimensional joint index structure, dynamically determining the corresponding adaptive tolerance threshold based on the primitive distribution features, merging geometric primitives across modalities based on the adaptive tolerance threshold, and inferring implicit boundaries by combining text features in scenarios with missing boundaries, thereby restoring the structural skeleton of the CAD drawing, including: The multidimensional joint index structure is dynamically identified, and the primitive distribution features of local regions are extracted during the identification process. These primitive distribution features cover the density distribution of objects, the average height of local text, the distribution of line segment lengths, and the scale of object bounding boxes. The primitive distribution features are input into a preset tolerance inference network to determine the adaptive tolerance threshold of the corresponding local region.

5. The CAD drawing structure recovery method based on multi-source primitive fusion according to claim 4, characterized in that, The method of extracting local primitive distribution features based on a multi-dimensional joint index structure, dynamically determining the corresponding adaptive tolerance threshold based on the primitive distribution features, performing cross-modal merging of geometric primitives based on the adaptive tolerance threshold, and inferring implicit boundaries by combining text features in scenarios with missing boundaries, thereby restoring the structural skeleton of the CAD drawing, also includes: Based on an adaptive tolerance threshold, cross-modal geometric clustering and span merging are performed on geometric primitives to form a candidate set of structural boundaries. In scenarios where there are boundary breaks or partial missing parts in the CAD drawing, the corresponding implicit boundaries are further deduced by combining text alignment direction, adjacent object positions, row and column alignment rules, and local closure constraints. At the same time, the explicit and implicit boundaries of the CAD drawing are managed to restore the structural skeleton of the CAD drawing, which includes the outer contour boundary, row boundary, and column boundary.

6. The CAD drawing structure recovery method based on multi-source primitive fusion according to claim 1, characterized in that, The process involves identifying multiple key structural elements based on the recognition of dynamic pre-simulation events, and then determining an engineering object network by combining cross-matching of the intrinsic object model. Nodes in this engineering object network represent high-level structural objects, and edges represent the spatial and semantic relationships between objects, including: Dynamically identify the dynamic pre-simulation events and output the corresponding identification results. Combined with the restored structural skeleton, determine several key structural contents, including table objects, row objects, column objects, cell objects, region objects, node objects, and size binding.

7. The CAD drawing structure recovery method based on multi-source primitive fusion according to claim 6, characterized in that, The process of identifying multiple key structural elements based on the recognition of dynamic pre-simulation events, and determining an engineering object network by combining cross-matching of the intrinsic object model, wherein nodes in the engineering object network represent high-level structural objects and edges represent spatial and semantic relationships between objects, further includes: The intrinsic object model performs cross-matching of key structural content and assigns each high-level structural object an identifier, original primitive, boundary, semantics, and association during the matching process. Using key structural content as nodes and spatial and semantic associations determined by dynamic pre-playing events as edges, an engineering object network is constructed. In this engineering object network, nodes represent high-level structural objects, and edges represent spatial and semantic associations between objects.

8. A CAD drawing structure recovery system based on multi-source primitive fusion, characterized in that, The CAD drawing structure recovery system based on multi-source primitive fusion is applied to the CAD drawing structure recovery method based on multi-source primitive fusion as described in any one of claims 1-7; The CAD drawing structure restoration system based on multi-source primitive fusion includes: The multidimensional joint index module is used to obtain multi-source primitives in CAD drawings, perform feature mapping on the multi-source primitives, thereby generating an intrinsic object model containing geometric primitives, text features and attribute features, and construct a corresponding multidimensional joint index structure based on the spatial distribution and attribute dimensions of the intrinsic object model. The recovery module is used to extract the primitive distribution features of local areas based on the multi-dimensional joint index structure, dynamically determine the corresponding adaptive tolerance threshold based on the primitive distribution features, perform cross-modal merging of geometric primitives based on the adaptive tolerance threshold, and infer implicit boundaries by combining text features in the case of missing boundaries, thereby restoring the structural skeleton of CAD drawings. The dynamic pre-simulation module is used to perform multi-line semantic fusion and attribution determination on geometric primitives and text features in the restored structural skeleton, and to perform multi-stage spatial relationship dynamic pre-simulation on the restored structural skeleton, thereby determining the corresponding dynamic pre-simulation events. The engineering object network module is used to determine multiple key structural contents based on the identification of dynamic pre-simulation events, and to determine the engineering object network by combining the cross-matching of the intrinsic object model. The nodes in the engineering object network represent high-level structural objects, and the edges represent the spatial and semantic relationships between objects.

Citation Information

Patent Citations

  • Wireless table structure restoration method and device, computer equipment and storage medium

    CN115618836A

  • Highway bridge drawing multi-modal information extraction and semantic understanding method and system

    CN121768029A

  • Finite element intelligent modeling and interactive analysis integration method based on structural semantic graph

    CN122365663A