CAD drawing segmentation parameter adjustment method and system combined with region recognition
By obtaining the regional feature vector set for type identification and dynamically adjusting the segmentation parameters during the CAD drawing segmentation process, the problem of inaccurate region identification is solved, higher segmentation accuracy and adaptability are achieved, and the segmentation quality and structuring effect are optimized.
Patent Information
- Application Number
- CN202510884083.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-30
AI Technical Summary
In the existing technology, during the CAD drawing segmentation process, region recognition is inaccurate and segmentation parameters are fixed, resulting in poor segmentation effect, which affects subsequent structured processing and application effects.
By acquiring the target CAD drawing file, regional features are extracted and a regional feature vector set is generated. Based on the regional feature vector set, regional types are identified. Segmentation parameters are dynamically adjusted and adaptive segmentation and topological relationship verification are performed. A segmentation rule library is constructed and the segmentation parameter set is optimized to generate structured drawing segmentation results.
It improves the accuracy and adaptability of CAD drawing segmentation, optimizes segmentation quality and structuring effects, and solves the problems of inaccurate region recognition and fixed segmentation parameters.
Smart Images

Figure CN120374991B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for adjusting CAD drawing segmentation parameters in combination with region recognition. Background Art
[0002] In the segmentation process of CAD drawings, the drawing segmentation is usually performed based on preset fixed parameters. The feature recognition of each area in the drawing relies on a single geometric attribute or simple rules, lacking in-depth analysis and dynamic adaptation of different regional characteristics. Due to the complex and changing content of drawings, regional layout, boundary shape, and internal semantic information vary significantly. Fixed segmentation parameters often cannot cover all cases. This leads to problems such as inaccurate regional division, boundary positioning deviation, and abnormal regional topological relationships during the segmentation process, which in turn affects the subsequent structured processing and application effectiveness. Summary of the Invention
[0003] The present application provides a method and system for adjusting CAD drawing segmentation parameters in combination with region recognition, which is used to solve the technical problems in the prior art of inaccurate region recognition and fixed segmentation parameters during CAD drawing segmentation, resulting in poor segmentation effect.
[0004] In view of the above problems, the present application provides a method and system for adjusting CAD drawing segmentation parameters combined with region recognition.
[0005] In a first aspect of the present application, a method for adjusting CAD drawing segmentation parameters in combination with region recognition is provided, the method comprising:
[0006] A target CAD drawing file is obtained to extract regional features, generate a regional feature vector set, perform regional type identification based on the regional feature vector set, and determine multiple regional information, wherein the multiple regional information includes boundary information; a segmentation rule library is constructed, and the segmentation rule library is matched according to the multiple regional information, and the boundary information is dynamically adjusted according to the matching result to obtain a segmentation parameter set; based on the segmentation parameter set, the target CAD drawing file is adaptively segmented to generate a structured drawing segmentation result; and a topological relationship check is performed based on the structured drawing segmentation result to generate a segmentation optimization result.
[0007] A second aspect of the present application provides a CAD drawing segmentation parameter adjustment system combined with region recognition, the system comprising:
[0008] A region type identification module is used to obtain a target CAD drawing file to extract region features, generate a region feature vector set, perform region type identification based on the region feature vector set, and determine multiple region information, wherein the multiple region information includes boundary information; a dynamic adjustment module is used to construct a segmentation rule library, match the segmentation rule library according to the multiple region information, dynamically adjust the boundary information according to the matching results, and obtain a segmentation parameter set; an adaptive segmentation processing module is used to perform adaptive segmentation processing on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result; a topology relationship verification module is used to perform topology relationship verification based on the structured drawing segmentation result to generate a segmentation optimization result.
[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0010] This application obtains a target CAD drawing file to perform regional feature extraction, generates a regional feature vector set, performs regional type identification based on the regional feature vector set, determines multiple regional information, and the multiple regional information includes boundary information; constructs a segmentation rule library, matches the segmentation rule library according to the multiple regional information, dynamically adjusts the boundary information according to the matching results, and obtains a segmentation parameter set; performs adaptive segmentation processing on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result; performs topological relationship verification based on the structured drawing segmentation result to generate a segmentation optimization result. The present invention solves the technical problem of inaccurate regional identification and fixed segmentation parameters in the CAD drawing segmentation process in the prior art, resulting in poor segmentation effect. By performing regional type identification based on the regional feature vector set, dynamically adjusting the segmentation parameters, and performing adaptive segmentation and topological relationship verification, the technical effect of improving the accuracy and adaptability of CAD drawing segmentation, optimizing segmentation quality and structuring effect is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A flow chart of a method for adjusting CAD drawing segmentation parameters in combination with region recognition provided in an embodiment of the present application;
[0013] Figure 2 Schematic diagram of the structure of a CAD drawing segmentation parameter adjustment system combined with region recognition provided in an embodiment of the present application.
[0014] Description of the accompanying drawings: region type identification module 11, dynamic adjustment module 12, adaptive segmentation processing module 13, topology relationship verification module 14. DETAILED DESCRIPTION
[0015] This application provides a CAD drawing segmentation parameter adjustment method and system combined with region recognition, aiming to solve the technical problems in the prior art of inaccurate region recognition and fixed segmentation parameters leading to poor segmentation effect during the CAD drawing segmentation process. By identifying region types based on a region feature vector set, dynamically adjusting segmentation parameters, and performing adaptive segmentation and topological relationship verification, the application achieves the technical effect of improving the accuracy and adaptability of CAD drawing segmentation, and optimizing segmentation quality and structuring effect.
[0016] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0017] It should be noted that any variations of the terms "include" and "have" are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or modules that are not clearly listed or are inherent to these processes, methods, products or devices.
[0018] Example 1, as Figure 1 As shown, the present application provides a method for adjusting CAD drawing segmentation parameters in combination with region recognition, the method comprising:
[0019] Step S100: obtaining a target CAD drawing file to extract regional features, generating a regional feature vector set, performing regional type identification based on the regional feature vector set, and determining a plurality of regional information, wherein the plurality of regional information includes boundary information.
[0020] In an embodiment of the present application, the target CAD drawing file is first obtained, and the geometric feature vector and semantic feature vector are extracted respectively by performing geometric analysis and semantic analysis on the drawing content, and a fusion result is generated through multimodal fusion; then, feature weighting is performed based on the fusion result to form multiple feature weight sequences, and a regional feature vector set is generated.
[0021] Next, based on the regional feature vector set, feature maps of different levels are further extracted to construct a multi-scale feature pyramid. The regional type probability distribution matrix is generated through feature fusion, and the matrix is traversed to screen candidate regions and mark their types. On this basis, the boundary information is obtained by combining the overlap elimination process, and the association analysis between the boundary coordinate sequence and the regional type label is carried out to complete the region demarcation and identification according to the topological connection relationship, thereby determining the information of multiple regions containing boundary information.
[0022] Furthermore, in the method provided in the embodiment of the application, obtaining the target CAD drawing file to extract regional features and generate a regional feature vector set also includes:
[0023] Obtain a target CAD drawing file, perform geometric analysis based on the target CAD drawing file, and determine a geometric feature vector; perform semantic analysis based on the target CAD drawing file, and determine a semantic feature vector; perform multimodal fusion on the geometric feature vector and the semantic feature vector to generate a multimodal fusion result; perform feature weighting based on the multimodal fusion result to determine multiple feature weight sequences, and generate the regional feature vector set according to the multiple feature weight sequences.
[0024] In this embodiment, a target CAD drawing file is first acquired. Vector graphics data parsing methods are then used to parse the drawing content, extracting basic vector elements, including lines, arcs, polylines, block references, and layer attribute information. By parsing CAD file formats (such as DWG and DXF), the spatial coordinates, hierarchical relationships, and associated attributes of the primitives are digitized.
[0025] Next, geometric analysis is performed using a modified Douglas-Peucker algorithm to simplify the contours of various primitives, extract key feature points, and then calculate the curvature distribution, angle distribution, and closure characteristics of each primitive based on the simplified contours. For example, in closed contour detection, the distance between the first and last vertices and the angular trend determine whether a polyline constitutes a valid closed region. The results of this processing form geometric feature vectors, which are used to accurately describe the region's boundary morphology and spatial structure.
[0026] Semantic analysis is performed on the target CAD drawing file. First, an optical character recognition (OCR) engine (such as Tesseract OCR or a Transformer-based text recognition network) is used to extract text annotations from the drawing and parse out semantic keywords representing the area's function (such as "office" and "warehouse"). Based on the extracted spatial layout of the primitives, a graph structure is constructed, and a graph neural network (GNN) model is used to learn spatial topological relationships. Specifically, during GNN training, node feature vectors (including primitive area, perimeter, and annotation word vectors) are initialized, using primitives as nodes and spatial adjacencies as edges. Node representations are iteratively updated through a multi-layer neural message passing mechanism, optimizing the node embeddings. During learning, the embeddings maintain local connectivity (connectivity) and structural symmetry (symmetry) while incorporating contextual semantic information (annotation relevance). The training objective is to minimize node category prediction error, and backpropagation optimization is performed using a cross-entropy loss function. After training, the embedding vector generated for each node is used as the semantic feature vector of the region, comprehensively describing the region's spatial relationships and functional label characteristics.
[0027] The geometric and semantic feature vectors are then multimodally fused using a unified feature space mapping and weighted fusion method. This involves mapping the two distinct features into a unified high-dimensional feature space using linear or nonlinear encoders. Attention or concatenation mechanisms are then introduced during the fusion phase to generate a multimodal fusion result that comprehensively expresses the region's geometric form and semantic functional characteristics. For example, for a large area annotated as a warehouse, the fusion result can simultaneously reflect the combined characteristics of both the area scale and the warehouse function.
[0028] Based on the results of multimodal fusion, features are weighted using a weighting method based on feature importance ranking. Specifically, feature ablation analysis is performed during the pre-training phase or on a small-scale validation set to evaluate the contribution of each type of feature (such as curvature features, area features, and semantic keyword features) to improving region recognition accuracy. Weights are assigned based on the contribution, forming multiple feature weight sequences. For example, analysis shows that the importance weight of area features is 0.35, the importance weight of functional category features is 0.45, and the importance weight of boundary closure features is 0.2. Finally, the fused feature dimensions are weighted and combined according to the feature weight sequence to generate a set of regional feature vectors that comprehensively represent each region.
[0029] Furthermore, in the method provided in the embodiment of the application, region type identification is performed based on the region feature vector set to determine multiple region information, and further includes:
[0030] Based on the regional feature vector set, feature maps of different levels are extracted, a multi-scale feature pyramid is constructed, and feature fusion is performed according to the multi-scale feature pyramid to generate a regional type probability distribution matrix; the regional type probability distribution matrix is traversed to perform screening and marking to determine multiple candidate regions, and the multiple candidate regions include multiple regional type labels; based on the multiple regional type labels, overlap elimination is performed on the multiple candidate regions to obtain boundary information, and the boundary information includes a boundary coordinate sequence; according to the boundary coordinates and the multiple regional type labels, association analysis is performed, and regional demarcation and identification are performed according to the topological connection relationship to obtain the multiple regional information.
[0031] In an embodiment of the present application, based on the aforementioned generated regional feature vector set, a feature mapping method is first used to map each regional feature vector to a two-dimensional space through a two-dimensional convolution transformation process to generate a corresponding feature map. Among them, the shallow feature map mainly expresses the geometric detail features such as the boundary continuity, corner density, and local curvature change of the region, while the high-level feature map encodes the abstract semantic features such as the functional category and adjacency pattern of the region. After completing the feature map extraction, a multi-scale feature pyramid construction method is adopted to obtain a multi-scale feature map by downsampling layer by layer, and integrates spatial information and semantic information between features of different scales through lateral connections to establish a multi-scale feature pyramid with progressive resolution characteristics.
[0032] Based on the constructed multi-scale feature pyramid, a cross-scale feature fusion method is used to directly fuse low-level fine-grained features with high-level abstract semantic features. Specifically, this involves feature concatenation, element-by-element summation, or feature enhancement based on a spatial attention mechanism. This fusion process is accomplished through a natural flow of information, generating a fused feature map that uniformly expresses spatial structure and semantic characteristics. Based on the fused feature map, the Softmax normalization method is applied to perform multi-category confidence normalization on each spatial location, outputting the predicted probability corresponding to each category. This ultimately generates a region type probability distribution matrix, where each matrix element is a specific real-valued value, representing the probability that the current location belongs to a certain region type, and ensuring that the sum of all category probabilities is 1.
[0033] A sliding window screening method is used to extract candidate regions from the region type probability distribution matrix. A fixed-size sliding window is set to traverse the matrix with a predetermined step size. When the maximum category confidence within the window exceeds a set confidence threshold (e.g., 0.8), the window position is marked as a candidate region and the region type label corresponding to the maximum confidence is assigned. Through traversal and screening, multiple preliminary candidate region sets are obtained.
[0034] To eliminate redundant candidate regions, we further employ an Intersection-over-Union (IoU)-based overlap elimination method. This method calculates the IoU of any two candidate regions. When the IoU exceeds a set threshold (e.g., 0.5), the candidate with the higher confidence level is retained, and redundant overlapping regions are eliminated, forming a set of valid candidate regions without overlap. After eliminating overlap, the boundary information of each candidate region is extracted, and a contour tracking method is used to extract a continuous and ordered sequence of boundary coordinates, accurately describing the region's shape and spatial position.
[0035] Based on the obtained boundary coordinate sequence and region type labels, a topological delineation method based on adjacency relationship analysis is further adopted to extract the spatial contact relationship, boundary collinearity and region inclusion characteristics between regions, construct a regional adjacency relationship graph, and judge the ownership logic of each region based on the adjacency relationship to complete the final region demarcation and identification, generating multiple region information with clear structure and semantics.
[0036] Step S200: constructing a segmentation rule library, matching the segmentation rule library according to the plurality of region information, dynamically adjusting the boundary information according to the matching result, and obtaining a segmentation parameter set.
[0037] In the embodiment of the present application, firstly, by retrieving the historical drawing segmentation data and combining it with the information of multiple region type labels, a standardized segmentation rule library is constructed. Then, based on the extracted multiple region information, the segmentation rule library is matched to generate a corresponding initial segmentation parameter set.
[0038] Based on this, the initial segmentation parameter set is combined with the boundary coordinate sequence for real-time detection, extracting the boundary continuity index of each region. Simultaneously, the topological connectivity between regions is detected to determine the topological relationship between adjacent regions. Based on the boundary continuity index and the topological relationship between adjacent regions, the initial segmentation parameter set is dynamically adjusted, and the original boundary information is reconstructed based on the adjusted parameters, ultimately generating a complete segmentation parameter set for adaptive segmentation.
[0039] Furthermore, in the method provided in the embodiment of the application, the segmentation rule library is matched according to the multiple region information, and the boundary information is dynamically adjusted according to the matching results to obtain a segmentation parameter set, which further includes:
[0040] Retrieve historical drawing segmentation data, build the segmentation rule library based on the combination of the multiple area type labels; match the multiple area information with the segmentation rule library to generate an initial segmentation parameter set; perform real-time detection based on the boundary coordinate sequence combined with the initial segmentation parameter set to determine a boundary continuity index; perform real-time detection based on the topological connection relationship combined with the initial segmentation parameter set to determine the topological relationship of adjacent areas; dynamically adjust the initial segmentation parameter set according to the boundary continuity index and the topological relationship of adjacent areas, reconstruct the boundary information according to the adjustment result, and generate the segmentation parameter set.
[0041] In this embodiment, historical drawing segmentation data is first retrieved from a pre-set database. Multimodal feature extraction is then performed on this historical drawing segmentation data to establish a unified three-dimensional feature space coordinate system. Cluster analysis is then performed within this feature space based on multiple region type labels to construct a region type-parameter association network. Cross-validation is then performed based on this region type-parameter association network. Based on the validation results, the associations are screened and optimized, ultimately extracting a representative and applicable set of segmentation parameters, completing the construction of a segmentation rule library.
[0042] After the segmentation rule base is constructed, a feature matching retrieval method is used to match parameters for the extracted regions. Specifically, for each region to be segmented, based on its extracted feature vector (including boundary coordinate information, area characteristics, topological structure characteristics, etc.), the Euclidean distance calculation method or cosine similarity matching method is used to search the segmentation rule base for the closest historical template. The most similar matching item is selected and its corresponding segmentation parameters are extracted. Through this process, an initial set of segmentation parameters is generated.
[0043] After obtaining the initial set of segmentation parameters, a boundary continuity detection method is used to perform real-time detection based on the region's boundary data. Specific steps include analyzing the trend of point spacing changes in the boundary coordinate sequence to identify abnormally increased spacing breakpoints; calculating the angle change between continuous boundary segments to identify sudden angle changes; and detecting the integrity of closed paths to identify the presence of unclosed boundary loops. Combining these detection results, a boundary continuity index is generated to describe the coherence and integrity of the region's boundaries. Simultaneously, based on the extracted region type labels and boundary information, a topological connectivity detection method is applied to analyze whether there are shared boundaries, inclusion relationships, or overlapping relationships between regions, forming a topological relationship between adjacent regions that represents the spatial contact characteristics and connectivity structure of the regions.
[0044] Finally, a dynamic parameter optimization strategy is used to adjust the initial segmentation parameter set based on the boundary continuity index and the topological relationship between adjacent regions, generating an optimized parameter set containing optimization information. Boundary reconstruction is then performed based on the optimized parameter set to generate a coherent smooth boundary. Through simulated segmentation and feedback optimization, an accurate and standardized segmentation parameter set is ultimately output.
[0045] Furthermore, in the method provided in the embodiment of the application, the historical drawing segmentation data is retrieved, and the segmentation rule library is constructed based on the combination of the multiple area type labels, further comprising:
[0046] Multimodal feature extraction is performed on the historical drawing segmentation data to establish a three-dimensional feature space coordinate system; cluster analysis is performed on the historical drawing segmentation data based on the three-dimensional feature space coordinate system according to the multiple area type labels to construct an area type-parameter association network; cross-validation is performed based on the area type-parameter association network, and the area type-parameter association network is traversed for screening according to the verification results to construct the segmentation rule library.
[0047] In an embodiment of the present application, first, a multimodal feature extraction method is used to perform detailed analysis and processing on the historical drawing segmentation data. Specifically, the boundary of each area object is sampled, and the vertex density (i.e., the number of vertices per unit boundary length) and the curvature variation coefficient (i.e., the ratio of the standard deviation of the boundary curvature change to the mean) are extracted as geometric features to measure the complexity of the area boundary morphology; the annotation coverage ratio of the area (referring to the proportion of the area covered by effective semantic annotations) and the symbol encoding level (based on the functional level defined by the drawing symbol system) are extracted as semantic features through text recognition and semantic mapping methods; at the same time, the connectivity index (i.e., the average number of connections between the area boundary and other areas) and the interface tolerance level (i.e., the allowable deviation level of the interface position and size) are extracted as topological features based on adjacency analysis. Based on the multidimensional features extracted above, a set of coordinates is defined in space for each historical region sample, where the X-axis represents geometric complexity (vertex density × curvature variation coefficient), the Y-axis represents semantic relevance (annotation coverage ratio × symbol encoding level), and the Z-axis represents topological constraint strength (connectivity index × interface tolerance level). This constructs a unified three-dimensional feature space coordinate system for comprehensively characterizing the region's geometric, semantic, and topological attributes. Based on this, a standardized regional feature template is generated for each sample.
[0048] After establishing the three-dimensional feature space coordinate system, supervised clustering analysis is used based on multiple existing area type labels. Specifically, using area type labels (such as "room," "corridor," and "computer room") as a guide, area samples within the same category are initially divided based on their location distribution in the three-dimensional coordinate system. Subsequently, a K-Means clustering method based on Euclidean distance is applied within each category to further subdivide sub-clusters with similar feature distributions. For example, areas belonging to the "room" category are divided into fine-grained categories such as small rooms, medium rooms, and large conference rooms based on their size and boundary complexity. In this way, the diverse characteristics of various area types in historical drawings are structured and summarized, forming a complete area type-parameter association network. The network nodes represent area types and their sub-characteristic clusters, while the edges record the empirical segmentation parameter ranges corresponding to each type, such as the recommended minimum segmentation unit, boundary fitting accuracy, and interface processing rules.
[0049] To ensure the universality and robustness of the region type-parameter association network, a cross-validation method was applied. The historical segmentation data was divided into a training set and a validation set. After constructing a preliminary association network model on the training set, the accuracy of the derivation from regional features to parameters was verified one by one on the validation set. Calculated metrics included matching accuracy (the degree of consistency between predicted parameters and manually segmented parameters) and segmentation result integrity (gap rate, error merging rate), among others. For example, for the "office area" template parameters extracted from the training set, the validation set "office area" area was tested for its ability to correctly restore reasonable boundary details and adjacency logic. Based on the validation results, the region type-parameter association network was traversed and screened, eliminating feature clusters or parameter configurations that performed poorly during the validation process. Ultimately, high-confidence structures were retained, completing the construction of an optimized standardized segmentation rule library.
[0050] Furthermore, in the method provided in the embodiment of the application, the initial segmentation parameter set is dynamically adjusted according to the boundary continuity index and the topological relationship of the adjacent regions, and the boundary information is reconstructed according to the adjustment result to generate the segmentation parameter set, which also includes:
[0051] A sensitivity analysis is performed based on the boundary continuity index to construct a parameter adjustment influencing weight factor; a parameter collaborative optimization constraint condition is constructed according to the topological relationship of the adjacent regions; the initial segmentation parameter set is dynamically adjusted according to the parameter collaborative optimization constraint condition combined with the parameter adjustment influencing weight factor to obtain an adjustment result, and the adjustment result includes a parameter optimization set; boundary reconstruction is performed based on the parameter optimization set to generate a smooth boundary, simulated segmentation is performed according to the smooth boundary to obtain a segmentation effect, feedback optimization is performed based on the segmentation effect, and the segmentation parameter set is generated.
[0052] In an embodiment of the present application, first, the local perturbation sensitivity analysis method is used to evaluate the initial segmentation parameter set for the extracted boundary continuity index. The specific steps are to set a certain amplitude of fine-tuning amplitude for each segmentation parameter (such as a 5% initial value change), and make small adjustments in the positive and negative directions respectively. Then, under the adjusted boundary conditions, the continuity index is re-extracted, including the boundary breakage rate (the ratio of the number of break points to the total number of boundary points), the curvature fluctuation rate (the ratio of the standard deviation of the local curvature change to the mean) and the closure integrity (the continuity rate of the closed path boundary). The continuity index is obtained by the discrete curvature calculation method, and the curvature calculation method is based on the angle change of the boundary sequence point divided by the corresponding arc length. The rate of change of the continuity index after each parameter perturbation is statistically analyzed, and the sensitivity of each parameter to the overall segmentation effect is determined by normalizing the rate of change, thereby forming the parameter adjustment influence weight factor corresponding to each parameter.
[0053] After the sensitivity analysis is completed, the adjacency graph analysis method is used to construct parameter collaborative optimization constraints based on the extracted topological relationships of adjacent regions. Specifically, the adjacency relationship of each region boundary is extracted, and by setting a distance threshold (such as setting δ = 1.5 pixels based on the CAD drawing resolution), the minimum distance between region boundaries is calculated to identify directly adjacent regions. The overlap ratio of adjacent boundaries (the ratio of shared side length to minimum perimeter) is further calculated to screen out closely connected region pairs. For closely adjacent regions, collaborative optimization constraints are formulated to synchronously adjust boundary continuity requirements. For example, changes in parameters such as boundary smoothness and segmentation accuracy of adjacent regions are required to be consistent to prevent boundary breakage or dislocation. For regions with inclusion relationships, inclusion boundary consistency constraints are formulated to ensure coordination and consistency between internal and external boundaries.
[0054] Based on the above-mentioned parameter adjustment influencing weight factors and parameter collaborative optimization constraints, the initial segmentation parameter set is dynamically optimized and adjusted. During the adjustment process, the parameters with high sensitivity are adjusted first, and each parameter is gradually fine-tuned, while ensuring that it meets the collaborative optimization constraints. After each round of fine-tuning, the boundary continuity index and topological coherence index are re-evaluated. The evaluation criteria include a decrease in the boundary fracture rate, an increase in the curvature smoothness, and no fractures on adjacent boundaries. If the indicators are significantly improved after this round of parameter combination optimization (such as a decrease in the fracture rate of more than 5%), the adjustment is confirmed; otherwise, the adjustment range or optimization direction is appropriately corrected and the optimization continues. Through iterative adjustment and verification of the segmentation effect, a set of optimized parameter sets that meet the boundary continuity and topological logic requirements are finally obtained, that is, the adjustment results are formed. The adjustment results clearly include the specific parameter configurations optimized for different regional characteristics, collectively referred to as parameter optimization sets.
[0055] Based on the resulting optimized parameter set, the boundary is further reconstructed using a B-spline curve fitting method to process the boundary coordinate sequence. Specifically, smoothing control points are inserted into the original boundary point set. By minimizing the change in curvature, sharp corners are eliminated, fracture transition areas are smoothed, and overall boundary continuity is ensured. The resulting smooth boundary accurately reflects the optimized regional morphological characteristics.
[0056] Then, based on the reconstructed smooth boundary, simulated segmentation is performed, and the current segmentation parameter set is applied in the simulation environment to perform a virtual cutting operation to evaluate the segmentation effect. Evaluation criteria include regional segmentation integrity (whether there are isolated small blocks), boundary continuity (whether there are unclosed paths), and adjacency coherence (consistency of segmentation lines between adjacent regions). If local anomalies are found in the simulated segmentation, such as small isolated areas (area less than 1% of the total area) or boundary fractures, the feedback optimization mechanism is further applied based on the simulation results to adjust the relevant segmentation parameters (such as fine-tuning the segmentation density and adding boundary compensation processing). The simulation is repeated until the segmentation effect meets the preset quality standards. Finally, the parameter settings after simulated segmentation and feedback optimization are integrated to output the determined segmentation parameter set.
[0057] Step S300: performing adaptive segmentation processing on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result.
[0058] In an embodiment of the present application, first, based on the segmentation parameter set, a comprehensive analysis is performed on the target CAD drawing file, the boundary characteristics and primitive distribution characteristics of each region are extracted, and the corresponding geometric complexity index is calculated and generated. The segmentation parameter set is then sorted in descending order according to the geometric complexity index to determine the segmentation priority of each region. According to the segmentation priority, a hierarchical processing queue is constructed to organize the processing order of each region in an orderly manner. Based on the processing queue, a coarse segmentation operation is performed on the target CAD drawing file to extract preliminary initial contour information. Based on the initial contour, a boundary perception analysis is performed to detect the local coherence and integrity characteristics of the contour, and the corresponding segmentation compensation parameters are dynamically generated. Finally, the segmentation compensation parameters and the initial contour information are combined to complete the regional boundary correction and optimization, and the structured drawing segmentation result is output.
[0059] Furthermore, in the method provided in the embodiment of the application, adaptive segmentation processing is performed on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result, and the method further includes:
[0060] Based on the segmentation parameter set, the target CAD drawing file is subjected to complexity analysis to generate a geometric complexity index; the segmentation parameter set is arranged in descending order according to the geometric complexity index to determine the segmentation priority; a hierarchical processing queue is constructed based on the geometric complexity index combined with the segmentation priority; the target CAD drawing file is coarsely segmented according to the hierarchical processing queue to generate initial contour information, boundary perception is performed based on the initial contour information, and segmentation compensation parameters are generated; the structured drawing segmentation result is generated based on the segmentation compensation parameters combined with the initial contour information.
[0061] In an embodiment of the present application, first, based on the extracted segmentation parameter set, the target CAD drawing file is subjected to complexity analysis. Specifically, the boundary information of the area to be processed in the drawing is parsed, and the basic geometric features of each area are extracted, including the number of boundary vertices, the degree of change of local curvature, the ratio of the total length of the boundary to the enclosed area, the completeness of the boundary closure, etc. The number of vertices is obtained by directly counting the boundary definition points, the degree of change of curvature is obtained by applying a sliding window to the boundary point set, and the standard deviation is calculated after calculating the change of the tangent angle between consecutive points. The ratio of boundary length to area is directly calculated by area measurement and perimeter measurement tools, and the degree of boundary closure is determined by measuring whether the distance between the first and last points is less than the tolerance value. After extracting the above basic features, a single geometric complexity index is generated by feature fusion and comprehensive scoring methods. Specifically, different eigenvalues are first normalized to a numerical range of 0 to 1. For example, by minimum-maximum normalization, indicators such as the number of boundary vertices and the curvature change rate are normalized. Then, based on the pre-defined feature importance (for example, the number of vertices and curvature variation are generally more important than area), the normalized feature values are directly linearly combined to form the final complexity score. For example, if the fusion ratios of the number of vertices, curvature variation, boundary area ratio, and closure are set to 0.35, 0.35, 0.2, and 0.1, respectively, each metric is multiplied by the corresponding ratio and summed to obtain the geometric complexity index.
[0062] After the geometric complexity index is generated, the complexity descending order method is used according to the complexity index value corresponding to each area. By sorting all the areas to be processed from high to low according to the geometric complexity index, giving priority to areas with complex structure, rich details or poor boundary connectivity, the segmentation priority is determined.
[0063] A hierarchical processing queue is then constructed based on the geometric complexity index combined with the segmentation priority. During this process, based on the extracted segmentation priority and the corresponding geometric complexity index, each area to be processed is sorted in descending order through a comprehensive evaluation method to generate a preliminary priority processing queue. The regional segmentation tasks are then executed in sequence according to the priority processing queue, and segmentation status information is collected in real time during the segmentation process to generate real-time segmentation monitoring data including segmentation completion rate, anomaly detection results, etc. If segmentation failure or anomalies are found in certain areas during the segmentation process, the corresponding segmentation failure area parameters are automatically extracted, including local fracture information, closure anomaly indicators, etc. Based on the segmentation failure area parameters, further complexity reassessment is performed to reassess the processing difficulty of the area. Based on the results of the reassessment, the original priority processing queue is dynamically adjusted, and finally a hierarchical processing queue that can adapt to actual changes in segmentation progress is constructed.
[0064] Based on the dynamically constructed hierarchical processing queue, the target CAD drawing file is then coarsely segmented using a method based on spatial proximity clustering and contour tracing. This process analyzes the spatial distribution of CAD primitives (such as lines, arcs, and polylines), identifies region identities using density clustering (e.g., DBSCAN), and extracts the approximate outer boundaries of each region using a contour tracing algorithm to form initial contour information. This initial contour information, including the boundary node sequence, estimated area, and surrounding adjacency information, serves as the basis for subsequent refined segmentation. After obtaining this initial contour information, boundary-aware analysis methods are further applied to detect local details of the initially extracted contour. These include detecting boundary closure (by calculating the distance between the first and last points), identifying local curvature changes (by analyzing local tangent changes to detect unusually sharp corners), and detecting small-scale boundary breaks (by determining point-to-point continuity). Based on the boundary-aware results, a targeted correction strategy is dynamically generated, extracting segmentation compensation parameters, including a local connection patching strategy, a curvature smoothing range, and a scheme for merging isolated patches. These parameters serve as input for subsequent compensation optimization.
[0065] Finally, based on the extracted segmentation compensation parameters and combined with the existing initial contour information, boundary reconstruction and refinement methods are used to correct and improve the coarse segmentation results. This correction process includes interpolating broken boundaries, smoothing sharp corners, adjusting adjacent boundary relationships, and optimizing the overall regional segmentation shape. This generates a structured drawing segmentation result that meets the requirements of boundary continuity, topological integrity, and detailed reproduction. This structured result is output as a standard data structure, containing a list of boundary nodes for each region, area characteristics, adjacent region indexes, and associated segmentation parameter information.
[0066] Furthermore, in the method provided in the embodiment of the application, a hierarchical processing queue is constructed based on the geometric complexity index and the segmentation priority, and further includes:
[0067] Based on the segmentation priority, the weighted total score is arranged in descending order according to the geometric complexity index to generate a priority processing queue; segmentation monitoring is performed according to the priority processing queue to generate real-time segmentation monitoring data, and the real-time segmentation monitoring data includes segmentation progress data; segmentation failure area parameters are extracted according to the segmentation progress data, and complexity re-evaluation is performed based on the segmentation failure area parameters. The priority processing queue is dynamically adjusted according to the evaluation result to construct the hierarchical processing queue.
[0068] In the embodiment of the present application, all areas to be processed are first sorted based on the extracted segmentation priority and geometric complexity index, using a method of priority sorting combined with complexity screening. Specifically, the segmentation priority is used as the initial sorting basis, and areas with higher logical or business importance are prioritized; within the same segmentation priority, internal sorting is performed based on the geometric complexity index, with areas with larger complexity index values placed in front and areas with smaller values placed in the back. Through this two-layer sequential screening method based on priority first and complexity second, a priority processing queue is generated.
[0069] Subsequently, the segmentation operation is performed on each area in the target CAD drawing file in sequence according to the generated priority processing queue. During the segmentation execution process, the real-time segmentation monitoring method is enabled synchronously to record the dynamic status. Specifically, a segmentation status flag is set for each segmented area. When the segmentation is executed, the boundary closure rate, segmentation completion rate, number of isolated blocks, and adjacency relationship maintenance are detected in real time, and the detection results are generated into corresponding real-time segmentation monitoring data. Among them, the segmentation progress data indicates the stage of completion of the regional segmentation, such as successful segmentation, partial failure, or complete failure, and records the specific indicators of abnormalities in the segmentation operation.
[0070] If anomalies are detected in a segmentation area during the segmentation process, such as broken boundaries, closure failure, or the generation of unusual small blocks, the system automatically identifies the area as a failed segmentation area and instantly extracts parameters for the failed segmentation area. These parameters include the number of abnormal boundary segments (detecting the number of broken segments), the width of the closed gap (measuring the distance between the beginning and the end of the gap), and abnormal local curvature changes (detecting the number of sudden angle points). These parameters are calculated in real time using standard graphical analysis techniques to form a complete description of the failed area.
[0071] Based on the extracted parameters of the failed segmentation regions, a local feature recalculation and complexity reassessment method is applied to re-analyze the failed regions at a fine-grained level. This involves re-extracting the local boundary point set and calculating the local vertex density, local curvature variation standard deviation, and adjacency structure continuity index. Based on this recalculated local feature data, a new local complexity estimate is derived. By comparing this with the initial global complexity index, it is determined whether the actual complexity of the failed regions has increased, and based on this, it is determined whether the processing order of the regions needs to be adjusted.
[0072] After obtaining the new local complexity assessment results, the original priority processing queue is dynamically adjusted using a priority increase and queue reinsertion method. Specifically, if the actual complexity of a segmentation failure region increases significantly, its priority is increased, placing it higher in the current processing queue than the unprocessed regions. It is then reinserted into the queue to ensure that it is processed first in the next segmentation round, preventing the failed region from further expanding its impact in subsequent processing. This adjusted processing queue is the updated hierarchical processing queue.
[0073] Step S400: performing a topological relationship check based on the structured drawing segmentation result to generate a segmentation optimization result.
[0074] In an embodiment of the present application, the center line of each segmented area is first extracted based on the segmentation result of the structured drawing, and a normal detection band for local spatial relationship detection is generated along the center line. A topological scanning operation is performed through the detection band to identify abnormal contact, intersection or fracture problems between regional boundaries, and extract abnormal topological structure data. Subsequently, standardized boundary verification constraints are set, and a topological check is performed based on the extracted abnormal topological structure data to verify the compliance of the closure, adjacency continuity and inclusion relationship of the region. According to the results of the topological check, a comprehensive segmentation quality assessment is performed on each segmented area, and a corresponding segmentation quality score is generated based on the evaluation criteria. Finally, the segmentation quality score is used as a key indicator and added to the overall segmentation optimization result.
[0075] Furthermore, in the method provided in the embodiment of the application, topological relationship verification is performed based on the structured drawing segmentation result to generate a segmentation optimization result, and the method further includes:
[0076] Based on the segmentation result of the structured drawing, the center line of each segmented area is extracted, a normal detection band is generated along the center line, topology detection is performed according to the normal detection band, and abnormal topological structure data is obtained; boundary verification constraints are set, and topology verification is performed according to the boundary verification constraints based on the abnormal topological structure data, and segmentation quality is evaluated according to the verification result to generate a segmentation quality score; the segmentation quality score is added to the segmentation optimization result.
[0077] In an embodiment of the present application, the center lines of each segmented area are first extracted based on the generated structured drawing segmentation result. The center line refers to a single-pixel-wide connected skeleton line extracted by the medial axis transformation technology, which can accurately represent the geometric trunk features of the segmented area. The extraction method adopts a step-by-step erosion skeletonization algorithm (such as the Zhang-Suen thinning algorithm), which gradually reduces the edge pixels until only the trunk line remains while ensuring regional connectivity. For example, if a segmented area is a complex, irregular room, its center line will generate a continuous thin line along the direction of the main passage of the room. Even if there are depressions or sharp corners inside the room, the center line can accurately follow the overall shape trend, thereby providing an accurate basis for subsequent normal detection.
[0078] After extracting the centerline, a corresponding normal detection band is generated along each centerline. Specifically, based on each pixel point on the centerline, its tangent direction is calculated, and then the detection band area is expanded in the normal direction perpendicular to the tangent direction according to the preset bandwidth (such as 5 pixels on each side). The detection band is generated using a local vector field calculation method to ensure that the detection band can cover the area boundary and the contact zone of the adjacent area. For example, for a straight centerline, the detection band is evenly distributed on both sides, which is suitable for detecting wall boundary fractures; for the bending point of the centerline at the corner, the detection band automatically turns according to the local tangent change to ensure that topological anomalies at the bending point can also be effectively scanned.
[0079] By establishing normal detection zones, a local spatial scanning method is applied for topological detection. During the detection process, all nodes within each normal zone are traversed to check the connectivity between nodes, the shortest distance from a node to the adjacent boundary, and whether there are illegal intersections, breaks, or unnecessary overlap between nodes. Anomalies are marked by category, such as isolated points within the detection zone (indicating a boundary break) or overlap between boundary segments exceeding the tolerance (indicating an overlap issue). Ultimately, all detected issues are archived to form abnormal topological structure data. For example, if a detection zone detects more than three consecutive isolated break points in two areas that should be adjacent, it can be determined that a serious adjacency break exists, requiring subsequent correction.
[0080] For the extracted abnormal topological structure data, a unified boundary verification constraint is set. The setting of the boundary verification constraint is implemented using the constraint propagation algorithm. First, the dimension annotation information in the CAD drawing is parsed, and the dimension data such as the length, width, radius, etc. are matched one by one with the actual extracted area boundary dimensions, and then extended to all associated boundary segments through the propagation mechanism. For example, if the dimension of a door is marked as 1.2 meters, but the corresponding boundary segment length is actually measured to be 1.05 meters, and exceeds the allowable error (set to ±2%), the boundary segment dimension verification is deemed to have failed, thereby triggering the subsequent topology correction process. In this way, not only is the dimension matching locally verified, but a globally consistent dimension logic verification network can also be formed at the structured drawing level.
[0081] Based on the established boundary validation constraints, a systematic topology check is further performed. This topology check uses a connectivity analysis method based on an adjacency matrix to traverse all segmented regions and their adjacent boundaries, verifying whether the regions form closed paths, whether adjacent boundaries are bidirectionally consistent (i.e., A is adjacent to B, and B is also adjacent to A), and whether nested relationships (such as columns in a room) are correctly enclosed within the parent region. For example, if it is detected that the boundary between two regions that should be adjacent is only one-way connected, or if the boundary of an internal child region exceeds the boundary of the parent region, the corresponding topology check will be marked as failed, and the detailed exception type and location will be recorded.
[0082] After completing the topology check, an overall segmentation quality assessment is performed based on the anomaly data output by the check. The assessment system is based on multiple dimensions, including boundary continuity scores (higher scores for low break rates), adjacency consistency scores (higher scores for good adjacency integrity), and topological integrity scores (higher scores for correct nesting and containment relationships). The scores for each dimension are quantified based on the number and severity of anomalies. For example, 5 points are deducted for each break and 10 points for each adjacency conflict. By combining the scores of each dimension, a segmentation quality score ranging from 0 to 100 is generated. The minimum acceptable threshold can be set based on the application scenario (e.g., a score above 80 is acceptable, while a score below 80 triggers optimization).
[0083] Finally, the segmentation quality score of each segmented area is integrated with the corresponding abnormal topological structure data to generate the overall segmentation optimization result.
[0084] In the embodiments of the present application, in summary, the embodiments of the present application have at least the following technical effects:
[0085] This application obtains a target CAD drawing file to perform regional feature extraction, generates a regional feature vector set, performs regional type identification based on the regional feature vector set, determines multiple regional information, and the multiple regional information includes boundary information; constructs a segmentation rule library, matches the segmentation rule library according to the multiple regional information, dynamically adjusts the boundary information according to the matching results, and obtains a segmentation parameter set; performs adaptive segmentation processing on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result; performs topological relationship verification based on the structured drawing segmentation result to generate a segmentation optimization result. The present invention solves the technical problem of inaccurate regional identification and fixed segmentation parameters in the CAD drawing segmentation process in the prior art, resulting in poor segmentation effect. By performing regional type identification based on the regional feature vector set, dynamically adjusting the segmentation parameters, and performing adaptive segmentation and topological relationship verification, the technical effect of improving the accuracy and adaptability of CAD drawing segmentation, optimizing segmentation quality and structuring effect is achieved.
[0086] The second embodiment is based on the same inventive concept as the method for adjusting CAD drawing segmentation parameters in combination with region recognition in the above embodiment. Figure 2 As shown, the present application provides a CAD drawing segmentation parameter adjustment system combined with region recognition. The system and method embodiments in the present application are based on the same inventive concept. The system includes:
[0087] The region type identification module 11 is used to obtain the target CAD drawing file to extract region features, generate a region feature vector set, perform region type identification based on the region feature vector set, and determine multiple region information, wherein the multiple region information includes boundary information; the dynamic adjustment module 12 is used to construct a segmentation rule library, match the segmentation rule library according to the multiple region information, dynamically adjust the boundary information according to the matching results, and obtain a segmentation parameter set; the adaptive segmentation processing module 13 is used to perform adaptive segmentation processing on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result; the topology relationship verification module 14 is used to perform topology relationship verification based on the structured drawing segmentation result to generate a segmentation optimization result.
[0088] Furthermore, the system is also used to implement the following functions:
[0089] Obtain a target CAD drawing file, perform geometric analysis based on the target CAD drawing file, and determine a geometric feature vector; perform semantic analysis based on the target CAD drawing file, and determine a semantic feature vector; perform multimodal fusion on the geometric feature vector and the semantic feature vector to generate a multimodal fusion result; perform feature weighting based on the multimodal fusion result to determine multiple feature weight sequences, and generate the regional feature vector set according to the multiple feature weight sequences.
[0090] Furthermore, the system is also used to implement the following functions:
[0091] Based on the regional feature vector set, feature maps of different levels are extracted, a multi-scale feature pyramid is constructed, and feature fusion is performed according to the multi-scale feature pyramid to generate a regional type probability distribution matrix; the regional type probability distribution matrix is traversed to perform screening and marking to determine multiple candidate regions, and the multiple candidate regions include multiple regional type labels; based on the multiple regional type labels, overlap elimination is performed on the multiple candidate regions to obtain boundary information, and the boundary information includes a boundary coordinate sequence; according to the boundary coordinates and the multiple regional type labels, association analysis is performed, and regional demarcation and identification are performed according to the topological connection relationship to obtain the multiple regional information.
[0092] Furthermore, the system is also used to implement the following functions:
[0093] Retrieve historical drawing segmentation data, build the segmentation rule library based on the combination of the multiple area type labels; match the multiple area information with the segmentation rule library to generate an initial segmentation parameter set; perform real-time detection based on the boundary coordinate sequence combined with the initial segmentation parameter set to determine a boundary continuity index; perform real-time detection based on the topological connection relationship combined with the initial segmentation parameter set to determine the topological relationship of adjacent areas; dynamically adjust the initial segmentation parameter set according to the boundary continuity index and the topological relationship of adjacent areas, reconstruct the boundary information according to the adjustment result, and generate the segmentation parameter set.
[0094] Furthermore, the system is also used to implement the following functions:
[0095] Multimodal feature extraction is performed on the historical drawing segmentation data to establish a three-dimensional feature space coordinate system; cluster analysis is performed on the historical drawing segmentation data based on the three-dimensional feature space coordinate system according to the multiple area type labels to construct an area type-parameter association network; cross-validation is performed based on the area type-parameter association network, and the area type-parameter association network is traversed for screening according to the verification results to construct the segmentation rule library.
[0096] Furthermore, the system is also used to implement the following functions:
[0097] A sensitivity analysis is performed based on the boundary continuity index to construct a parameter adjustment influencing weight factor; a parameter collaborative optimization constraint condition is constructed according to the topological relationship of the adjacent regions; the initial segmentation parameter set is dynamically adjusted according to the parameter collaborative optimization constraint condition combined with the parameter adjustment influencing weight factor to obtain an adjustment result, and the adjustment result includes a parameter optimization set; boundary reconstruction is performed based on the parameter optimization set to generate a smooth boundary, simulated segmentation is performed according to the smooth boundary to obtain a segmentation effect, feedback optimization is performed based on the segmentation effect, and the segmentation parameter set is generated.
[0098] Furthermore, the system is also used to implement the following functions:
[0099] Based on the segmentation parameter set, the target CAD drawing file is subjected to complexity analysis to generate a geometric complexity index; the segmentation parameter set is arranged in descending order according to the geometric complexity index to determine the segmentation priority; a hierarchical processing queue is constructed based on the geometric complexity index combined with the segmentation priority; the target CAD drawing file is coarsely segmented according to the hierarchical processing queue to generate initial contour information, boundary perception is performed based on the initial contour information, and segmentation compensation parameters are generated; the structured drawing segmentation result is generated based on the segmentation compensation parameters combined with the initial contour information.
[0100] Furthermore, the system is also used to implement the following functions:
[0101] Based on the segmentation priority, the weighted total score is arranged in descending order according to the geometric complexity index to generate a priority processing queue; segmentation monitoring is performed according to the priority processing queue to generate real-time segmentation monitoring data, and the real-time segmentation monitoring data includes segmentation progress data; segmentation failure area parameters are extracted according to the segmentation progress data, and complexity re-evaluation is performed based on the segmentation failure area parameters. The priority processing queue is dynamically adjusted according to the evaluation result to construct the hierarchical processing queue.
[0102] Furthermore, the system is also used to implement the following functions:
[0103] Based on the segmentation result of the structured drawing, the center line of each segmented area is extracted, a normal detection band is generated along the center line, topology detection is performed according to the normal detection band, and abnormal topological structure data is obtained; boundary verification constraints are set, and topology verification is performed according to the boundary verification constraints based on the abnormal topological structure data, and segmentation quality is evaluated according to the verification result to generate a segmentation quality score; the segmentation quality score is added to the segmentation optimization result.
[0104] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0105] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0106] This specification and drawings are merely illustrative of the present application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of this application. Thus, this application is intended to include such modifications and variations as fall within the scope of this application and its equivalents.
Claims
1. A CAD drawing segmentation parameter adjustment method combined with region recognition, characterized in that: The method comprises: Obtaining a target CAD drawing file to perform region feature extraction, generating a region feature vector set, performing region type identification based on the region feature vector set, and determining a plurality of region information, wherein the plurality of region information includes boundary information; Constructing a segmentation rule library, matching the segmentation rule library according to the plurality of region information, dynamically adjusting the boundary information according to the matching result, and obtaining a segmentation parameter set; Adaptively segmenting the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result; Performing a topological relationship check based on the structured drawing segmentation result to generate a segmentation optimization result; The method of matching the segmentation rule library according to the plurality of region information and dynamically adjusting the boundary information according to the matching results to obtain a segmentation parameter set includes: Retrieving historical drawing segmentation data, and building the segmentation rule library based on combining multiple area type labels; Generate an initial segmentation parameter set based on matching the plurality of region information with the segmentation rule library; Performing real-time detection based on the boundary coordinate sequence combined with the initial segmentation parameter set to determine a boundary continuity index; Performing real-time detection based on the topological connection relationship in combination with the initial segmentation parameter set to determine the topological relationship of adjacent areas; The initial segmentation parameter set is dynamically adjusted according to the boundary continuity index and the adjacent region topological relationship, and the boundary information is reconstructed according to the adjustment result to generate the segmentation parameter set.
2. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 1, wherein: Obtain the target CAD drawing file to extract regional features and generate a regional feature vector set. The method includes: Obtain a target CAD drawing file, perform geometric analysis based on the target CAD drawing file, and determine a geometric feature vector; Perform semantic analysis based on the target CAD drawing file to determine the semantic feature vector; Performing multimodal fusion on the geometric feature vector and the semantic feature vector to generate a multimodal fusion result; Feature weighting is performed according to the multimodal fusion result to determine a plurality of feature weight sequences, and the regional feature vector set is generated according to the plurality of feature weight sequences.
3. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 1, wherein: Performing region type identification based on the region feature vector set to determine multiple region information, the method includes: Extracting feature maps of different levels based on the regional feature vector set, constructing a multi-scale feature pyramid, performing feature fusion according to the multi-scale feature pyramid, and generating a regional type probability distribution matrix; Traversing the region type probability distribution matrix to perform screening and marking, and determining a plurality of candidate regions, wherein the plurality of candidate regions include a plurality of region type labels; Eliminate overlap based on the multiple candidate regions based on the multiple region type labels to obtain boundary information, where the boundary information includes a boundary coordinate sequence; An association analysis is performed on the boundary coordinates and the multiple region type labels, and region demarcation and identification is performed based on topological connection relationships to obtain the multiple region information.
4. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 1, wherein: Retrieving historical drawing segmentation data, and building the segmentation rule library based on the combination of the multiple area type labels, the method includes: Performing multimodal feature extraction on the historical drawing segmentation data to establish a three-dimensional feature space coordinate system; performing cluster analysis on the historical drawing segmentation data based on the three-dimensional feature space coordinate system according to the multiple area type labels to construct an area type-parameter association network; Cross-validation is performed based on the region type-parameter association network, and the region type-parameter association network is traversed for screening according to the validation results to construct the segmentation rule library.
5. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 1, wherein: Dynamically adjusting an initial segmentation parameter set according to the boundary continuity index and the adjacent region topological relationship, reconstructing the boundary information according to the adjustment result, and generating the segmentation parameter set, the method comprising: Conducting sensitivity analysis based on the boundary continuity index and constructing parameter adjustment impact weight factors; Constructing parameter collaborative optimization constraint conditions according to the topological relationship of the adjacent regions; Dynamically adjusting the initial segmentation parameter set according to the parameter collaborative optimization constraint condition and the parameter adjustment influencing weight factor to obtain an adjustment result, wherein the adjustment result includes a parameter optimization set; Boundary reconstruction is performed based on the parameter optimization set to generate a smooth boundary, simulated segmentation is performed according to the smooth boundary to obtain a segmentation effect, and feedback optimization is performed based on the segmentation effect to generate the segmentation parameter set.
6. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 1, wherein: Adaptively segmenting the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result, the method comprising: Performing complexity analysis on the target CAD drawing file based on the segmentation parameter set to generate a geometric complexity index; Arrange the segmentation parameter set in descending order according to the geometric complexity index to determine a segmentation priority; Constructing a hierarchical processing queue according to the geometric complexity index and the segmentation priority; Performing rough segmentation on the target CAD drawing file according to the hierarchical processing queue to generate initial contour information, performing boundary perception based on the initial contour information, and generating segmentation compensation parameters; The structured drawing segmentation result is generated based on the segmentation compensation parameter and the initial contour information.
7. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 6, wherein: Constructing a hierarchical processing queue based on the geometric complexity index and the segmentation priority, the method includes: Generating a priority processing queue based on the segmentation priorities and arranging them in descending order of weighted total scores according to the geometric complexity index; Perform segmentation monitoring according to the priority processing queue to generate real-time segmentation monitoring data, wherein the real-time segmentation monitoring data includes segmentation progress data; Extracting segmentation failure area parameters according to the segmentation progress data, performing complexity reassessment based on the segmentation failure area parameters, dynamically adjusting the priority processing queue according to the assessment result, and constructing the hierarchical processing queue.
8. The method for adjusting CAD drawing segmentation parameters in combination with region recognition according to claim 1, wherein: Performing a topological relationship check based on the structured drawing segmentation result to generate a segmentation optimization result, the method comprising: Extracting the center line of each segmented area based on the segmentation result of the structured drawing, generating a normal detection zone along the center line, performing topology detection according to the normal detection zone, and obtaining abnormal topological structure data; Setting boundary verification constraints, performing topology verification based on the abnormal topological structure data according to the boundary verification constraints, performing segmentation quality assessment based on the verification results, and generating a segmentation quality score; The segmentation quality score is added to the segmentation optimization result.
9. The CAD drawing segmentation parameter adjustment system combined with region recognition is characterized by: The system is used to execute the CAD drawing segmentation parameter adjustment method combined with region recognition according to any one of claims 1 to 7, and the system comprises: A region type identification module is used to obtain a target CAD drawing file to perform region feature extraction, generate a region feature vector set, perform region type identification based on the region feature vector set, and determine multiple region information, wherein the multiple region information includes boundary information; a dynamic adjustment module, configured to construct a segmentation rule library, match the segmentation rule library according to the plurality of region information, and dynamically adjust the boundary information according to the matching result to obtain a segmentation parameter set; An adaptive segmentation processing module, configured to perform adaptive segmentation processing on the target CAD drawing file based on the segmentation parameter set to generate a structured drawing segmentation result; The topology relationship verification module is used to perform topology relationship verification based on the structured drawing segmentation result and generate a segmentation optimization result.
Citation Information
Patent Citations
A medium-intelligent segmentation parameter automatic selection method for strengthening a specific area class target attribute
CN109741345A
CAD drawing analysis method, device and equipment and storage medium
CN113052023A