Deep learning-based architectural drawing ai intelligent review system
The AI-powered intelligent drawing review system for architectural drawings, powered by deep learning, solves the problems of low accuracy in recognizing complex drawings and missed judgments of conflicts with regulations in existing technologies. It achieves efficient and accurate drawing review, improving the efficiency and practicality of the review process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG HEAVY IND ARCHITECTURAL DESIGN INST TECH CONSULTING CO LTD
- Filing Date
- 2025-10-11
- Publication Date
- 2026-06-19
AI Technical Summary
Existing architectural drawing review methods are not adaptable enough to complex drawings, resulting in low accuracy in component identification and missed judgments of specification conflicts, making it difficult to meet the needs of large-scale construction projects for review cycle, accuracy and standardization.
An AI-powered intelligent drawing review system based on deep learning is adopted. The system obtains vector graphic data and CAD attribute information through the drawing structure analysis module, and generates a primitive dataset and attribute feature set by combining it with the standard clause database. A multi-dimensional feature matrix is constructed using the building component feature fusion module. The system also performs intelligent identification and compliance verification through the drawing violation review analysis module and the deep learning model. Finally, the system generates a cluster of high-frequency violation points and visualization results through the violation review optimization visualization module.
It improves the accuracy of identifying complex drawings and the precision of compliance judgment, reduces omissions in judging conflicts with regulations, enhances the efficiency and practicality of drawing review, and outputs intelligent drawing review results that include the location of violations and modification suggestions.
Smart Images

Figure CN121389728B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent drawing analysis technology, and in particular to an AI-based intelligent drawing review system for architectural drawings based on deep learning. Background Technology
[0002] In recent years, with the accelerated digital transformation of the construction industry, new construction models such as prefabricated buildings and green buildings have emerged. This has significantly increased the complexity, professional collaboration, and compliance requirements of architectural drawings. The traditional review process, which relies on manual verification of drawings one by one, faces problems such as low efficiency, easy omissions, and significant reliance on experience. It is no longer sufficient to meet the demands of large-scale construction projects for review cycles, accuracy, and standardization. Currently, some computer vision-based architectural drawing review methods have been proposed. These methods mostly use preset component feature templates or simple image recognition algorithms to initially identify dimensions and component types in the drawings, and then perform compliance comparisons based on fixed regulatory clauses. However, existing methods are not adaptable to complex drawing scenarios. They are easily affected by factors such as differences in drawing styles, overlapping components, and cross-referencing of professional drawings, leading to low component recognition accuracy and missed regulatory conflicts, resulting in significant deviations in the review results. Summary of the Invention
[0003] Therefore, it is necessary for the present invention to provide an AI-based intelligent drawing review system for architectural drawings based on deep learning, in order to solve at least one of the above-mentioned technical problems.
[0004] To achieve the above objectives, a deep learning-based AI-powered intelligent drawing review system for architectural blueprints includes the following modules:
[0005] The drawing structured analysis module is used to acquire vector graphic data, CAD attribute information and relevant standard clause databases corresponding to architectural engineering drawings. It performs layer separation and primitive extraction processing on the vector graphic data, performs structured parsing on the CAD attribute information, and performs semantic annotation and rule transformation on the standard clause database to generate drawing primitive datasets, attribute feature sets and standard rule bases.
[0006] The building component feature fusion module is used to construct geometric feature vectors of primitives based on the drawing primitive dataset, including primitive shape parameters, position coordinate relationships and dimension annotation features, and extract the material properties, mechanical parameters and construction technical requirements of building components by combining attribute feature sets, and generate a multi-dimensional feature matrix of building components through feature fusion;
[0007] The drawing violation review and analysis module is used to input the multi-dimensional feature matrix of building components into a pre-trained deep learning model and combine it with the standard rule base for intelligent identification and compliance verification, so as to generate building component identification results and preliminary compliance judgment; based on the standard rule base, it constructs building violation judgment standards, and combines the preliminary compliance judgment to perform drawing violation review and analysis on the multi-dimensional feature matrix of building components, so as to generate building drawing violation feature vectors;
[0008] The Violation Review Optimization Visual Module is used to perform cluster analysis of violation points in architectural drawings based on the violation feature vectors of architectural drawings, so as to generate a cluster of high-frequency violation points in architectural drawings. Based on the cluster of high-frequency violation points in architectural drawings, a deep learning model is applied to perform reverse review optimization to output intelligent review results of architectural drawings that include violation location, reference to specifications, and modification suggestions. The compliance heat map of architectural drawings is displayed through visualization technology.
[0009] The beneficial effects of this invention are:
[0010] The AI-powered intelligent drawing review system for architectural drawings proposed in this invention comprises a drawing structure analysis module, a building component feature fusion module, a drawing violation analysis module, and a violation review optimization visualization module. Compared with existing technologies, the beneficial effect of this application lies in effectively solving the problems of poor compatibility with complex drawing data and difficulty in reusing standard rules in existing solutions through multi-source data standardization processing and structured transformation. Existing methods only process single-format drawing data, do not integrate CAD attributes and standard clauses, and the extraction of graphic elements is coarse, resulting in subsequent recognition being affected by differences in drawing style and layer disorder. By acquiring multi-source data including vector graphics, CAD attributes, and specification clauses, the vector graphics undergo layer separation (e.g., assigning walls and beams to different layers) and primitive extraction (precisely capturing basic elements such as lines and annotations) to avoid recognition interference caused by layer mixing. CAD attribute information is structurally parsed (e.g., converting component material and dimension attributes into key-value pair formats) to ensure that attribute data can be directly associated with primitives. Specification clauses are semantically annotated and transformed into rules to generate a specification rule library. This process achieves structured integration of "drawing data - attribute information - specification rules," eliminating data format barriers and rule ambiguity, laying a unified data foundation for subsequent intelligent recognition and compliance verification. Secondly, by fusing geometric and attribute features to construct a multi-dimensional feature matrix, the problem of low component recognition accuracy due to reliance on only single graphic features in existing solutions is solved. Existing methods only extract basic features such as primitive shape and size, without combining key information such as material properties and mechanical parameters, making them prone to misjudgment when faced with overlapping or similar components. By constructing geometric feature vectors based on drawing primitive datasets, the spatial morphology of components is comprehensively characterized. Simultaneously, material properties, mechanical parameters, and construction technical requirements are extracted from attribute feature sets to supplement non-visual key information of components. Through feature fusion, geometric and attribute features are integrated into a multi-dimensional feature matrix. This matrix covers all dimensions of component information, enabling the model to accurately distinguish similar components and identify the essential features of components in occluded scenarios, thus significantly improving recognition accuracy. Then, through collaborative verification using a deep learning model and a regulatory rule base, the problems of missed regulatory conflicts and one-sided compliance judgments in existing solutions are addressed. Existing methods rely only on fixed clause comparisons, failing to handle cross-regulatory constraints and being unable to identify complex violation scenarios due to algorithmic limitations. This step inputs the multi-dimensional feature matrix into a pre-trained deep learning model, combining it with the regulatory rule base to achieve "component recognition + preliminary compliance judgment." Subsequently, a multi-dimensional violation judgment standard is constructed based on the regulatory rule base, and in-depth drawing review analysis is performed in conjunction with the preliminary judgment, generating violation feature vectors containing violation types and related regulatory clauses. This process avoids the limitations of single-clause verification, accurately capturing regulatory conflicts and complex violation scenarios, thus filling the gap of "incomplete regulatory verification" in existing solutions.Finally, clusters of high-frequency violation points are generated through cluster analysis based on violation feature vectors. The deep learning model is then optimized in reverse based on the cluster information to improve its sensitivity to high-frequency violations. The final output includes accurate location of violations, regulatory basis, and modification suggestions. High-frequency violation areas are visualized through heatmaps. This process makes the review results more targeted and actionable, and the review capability is continuously improved through model iteration, thereby significantly improving the efficiency and practicality of the review process. Attached Figure Description
[0011] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0012] Figure 1 This is a schematic diagram of the modules of the AI-powered intelligent drawing review system for architectural drawings based on deep learning, as described in this invention.
[0013] Figure 2 for Figure 1 A functional flowchart of the structured analysis module in Chinese drawing. Detailed Implementation
[0014] The technical system of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0015] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.
[0016] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0017] To achieve the above objectives, please refer to Figures 1 to 2 This invention provides an AI-powered intelligent drawing review system for architectural drawings based on deep learning. The system includes the following modules:
[0018] The drawing structured analysis module is used to acquire vector graphic data, CAD attribute information and relevant standard clause databases corresponding to architectural engineering drawings. It performs layer separation and primitive extraction processing on the vector graphic data, performs structured parsing on the CAD attribute information, and performs semantic annotation and rule transformation on the standard clause database to generate drawing primitive datasets, attribute feature sets and standard rule bases.
[0019] The building component feature fusion module is used to construct geometric feature vectors of primitives based on the drawing primitive dataset, including primitive shape parameters, position coordinate relationships and dimension annotation features, and extract the material properties, mechanical parameters and construction technical requirements of building components by combining attribute feature sets, and generate a multi-dimensional feature matrix of building components through feature fusion;
[0020] The drawing violation review and analysis module is used to input the multi-dimensional feature matrix of building components into a pre-trained deep learning model and combine it with the standard rule base for intelligent identification and compliance verification, so as to generate building component identification results and preliminary compliance judgment; based on the standard rule base, it constructs building violation judgment standards, and combines the preliminary compliance judgment to perform drawing violation review and analysis on the multi-dimensional feature matrix of building components, so as to generate building drawing violation feature vectors;
[0021] The Violation Review Optimization Visual Module is used to perform cluster analysis of violation points in architectural drawings based on the violation feature vectors of architectural drawings, so as to generate a cluster of high-frequency violation points in architectural drawings. Based on the cluster of high-frequency violation points in architectural drawings, a deep learning model is applied to perform reverse review optimization to output intelligent review results of architectural drawings that include violation location, reference to specifications, and modification suggestions. The compliance heat map of architectural drawings is displayed through visualization technology.
[0022] In the embodiments of this invention, please refer to Figure 1 The diagram shown is a schematic representation of the modules of the deep learning-based AI intelligent drawing review system for architectural drawings according to the present invention. In this example, the deep learning-based AI intelligent drawing review system for architectural drawings includes the following modules:
[0023] The drawing structured analysis module is used to acquire vector graphic data, CAD attribute information and relevant standard clause databases corresponding to architectural engineering drawings. It performs layer separation and primitive extraction processing on the vector graphic data, performs structured parsing on the CAD attribute information, and performs semantic annotation and rule transformation on the standard clause database to generate drawing primitive datasets, attribute feature sets and standard rule bases.
[0024] In this embodiment of the invention, vector graphic data (including structural and water supply / drainage layers), CAD attribute information (including parameters such as component material strength and dimensions), and relevant standard clauses (including clauses in structural and water supply / drainage fields) of a residential project's architectural drawings are acquired. A layer separation algorithm is used to split the vector graphic data into structural layers (including frame columns and beams) and water supply / drainage layers (including pipe bends) according to professional fields. Then, a primitive extraction algorithm is used to identify frame column C-1 (100×100 pixels), frame beam L-1 (50×100 pixels), and pipe bend P-5 (40×40 pixels) to generate a drawing primitive dataset. The CAD attribute information is then structured and parsed to extract attributes for frame column C-1 (C30 concrete compressive strength 30MPa), frame beam L-1 (C30 concrete flexural strength 2.0MPa), and pipe bend P-5 (Q235 steel compressive strength 1.6MPa) to generate an attribute feature set. Semantic annotation was performed on the database of standard clauses, and "the concrete strength of frame columns should not be lower than C25" was annotated as "structure-frame column-strength ≥23MPa", which was then converted into rule entries to generate a standard rule base containing 200 rules in the field of structural water supply and drainage.
[0025] The building component feature fusion module is used to construct geometric feature vectors of primitives based on the drawing primitive dataset, including primitive shape parameters, position coordinate relationships and dimension annotation features, and extract the material properties, mechanical parameters and construction technical requirements of building components by combining attribute feature sets, and generate a multi-dimensional feature matrix of building components through feature fusion;
[0026] In this embodiment of the invention, geometric features of the frame column C-1, frame beam L-1, and pipe elbow P-5 are extracted based on the drawing primitive dataset. Canny edge detection and Hough transform are used to calculate shape parameters (complexity 0.2 for the frame column, 2 axes of symmetry). Positional relationships are calculated through coordinate transformation (distance between the frame column and beam 25 pixels, angle 0°). Dimensional annotations (frame column 500mm × 500mm) are extracted and fused to generate a geometric feature vector. Material properties (concrete and steel), mechanical parameters (30MPa, 2.0MPa, 1.6MPa), and construction requirements (vibration compaction and anti-corrosion treatment) are extracted from the attribute feature set and converted into numerical features (material 1 = concrete, 2 = steel). An attention mechanism is used to weight and fuse the geometric feature vector and attribute feature vector. The weight allocation for the frame column is 0.6 for geometric features and 0.4 for attribute features, generating a multi-dimensional feature matrix (3 × 128 dimensions) of building components, containing comprehensive feature values for the frame column (17.19), frame beam (7.46), and pipe elbow (11.92).
[0027] The drawing violation review and analysis module is used to input the multi-dimensional feature matrix of building components into a pre-trained deep learning model and combine it with the standard rule base for intelligent identification and compliance verification, so as to generate building component identification results and preliminary compliance judgment; based on the standard rule base, it constructs building violation judgment standards, and combines the preliminary compliance judgment to perform drawing violation review and analysis on the multi-dimensional feature matrix of building components, so as to generate building drawing violation feature vectors;
[0028] In this embodiment of the invention, the multi-dimensional feature matrix of building components is input into a pre-trained deep learning model based on the Transformer architecture (8-head self-attention mechanism). The encoder reduces the dimensionality to 128 key features, and the decoder outputs the recognition result (frame column type 1, strength 30MPa). Compliance verification is performed using a regulatory rule base. The frame column strength of 30MPa ≥ 23MPa has a 100% compliance rate, generating a preliminary compliance judgment (all compliant). New non-compliant components are added: frame column C-2 (strength 15MPa) and pipe elbow P-6 (pressure resistance 1.0MPa). A non-compliance judgment standard is constructed based on the regulatory rule base (strength < 23MPa weight 0.5, pressure resistance < 1.2MPa weight 0.5). Compare the actual values with the threshold to calculate the deviation (C-2 strength deviation 8MPa, P-6 compressive strength deviation 0.2MPa), extract the component ID coordinates, clause number deviation, and comprehensive violation index to generate the architectural drawing violation feature vector (C-2: (C-2 0.6 0.61 / 28MPa / 20mm 1.0) P-6: (P-6 0.3 0.33 / 4 0.2MPa / 10mm 0.31)).
[0029] The Violation Review Optimization Visual Module is used to perform cluster analysis of violation points in architectural drawings based on the violation feature vectors of architectural drawings, so as to generate a cluster of high-frequency violation points in architectural drawings. Based on the cluster of high-frequency violation points in architectural drawings, a deep learning model is applied to perform reverse review optimization to output intelligent review results of architectural drawings that include violation location, reference to specifications, and modification suggestions. The compliance heat map of architectural drawings is displayed through visualization technology.
[0030] In this embodiment of the invention, the spatial coordinates of C-2 (0.6, 0.6) P-6 (0.3, 0.3) and the newly added non-compliant components L-3 (0.6, 0.3) P-7 (0.3, 0.6) are extracted based on the feature vector of the violation in the architectural drawings. Euclidean distance is then calculated to generate a distance matrix (the distance between C-2 and L-3 is 0.3). A weighted distance matrix is calculated by combining the frequency weight of the violation clauses (the proportion of structure-001 is 0.333) (the weighted distance between C-2 and L-3 is 0.2). Clustering parameters are set (k=2, threshold 0.35) to obtain cluster 1 (C-2L-3) and cluster 2 (P-6P-7). Both clusters, with a proportion exceeding 50% and a high-frequency threshold of 40%, generate a high-frequency violation point cluster. Based on cluster 1 (level 3 severe) and cluster 2 (level 2 general), the deep learning model is optimized by increasing the intensity feature weight to 0.6 and the pressure resistance feature weight to 0.55. The optimized model is applied to the review of new drawings, outputting the non-compliant locations (C-5(0.7,0.7)P-9(0.4,0.2)), the standard basis (Structure-001 Water Supply and Drainage-001), and modification suggestions (replace C30 concrete with 1.6MPa elbows). A heat map (C-5 marked in red and P-9 marked in orange) is generated through visualization technology to show the distribution of compliance.
[0031] Furthermore, as an embodiment of the present invention, reference is made to... Figure 2 As shown, Figure 1 A functional flowchart of the drawing structure analysis module is shown below. In this embodiment, the drawing structure analysis module includes the following functions:
[0032] S101: Obtain DXF and DWG format vector graphics data corresponding to architectural engineering drawings through drawing digitization conversion tools, and perform layer separation and element extraction processing on the vector graphics data to extract element information corresponding to each layer of building structure, water supply and drainage and electrical system, and generate drawing element dataset;
[0033] In this embodiment of the invention, a drawing digitization conversion tool (supporting CAD format parsing) is used to import architectural drawings of a residential project, obtaining vector graphic data in DXF format (version R2020) and DWG format (version 2018). The layer separation function is activated, splitting the layers into three categories: "Architectural Structure," "Water Supply and Drainage," and "Electrical System." The architectural structure layer contains elements such as beams, columns, and floor slabs; the water supply and drainage layer contains elements such as pipes, valves, and water tanks; and the electrical system layer contains elements such as cables, distribution boxes, and switches. An element extraction algorithm (based on vector graphic contour recognition) is used to extract element information from each layer: In the architectural structure layer, beam elements record cross-sectional dimensions (e.g., 250mm × 500mm) and axis positions (e.g., intersection of axis A and axis 1); in the water supply and drainage layer, pipe elements record pipe diameter (e.g., DN100) and direction (e.g., horizontally laid along axis 3); in the electrical system layer, cable elements record model (e.g., YJV-3×16+1×10) and laying method (e.g., running along the ceiling). All graphic element information is categorized and stored according to "layer-graphic element type-coordinate-geometric parameters" to generate a drawing graphic element dataset, ensuring that each graphic element can be traced back to its source layer and geometric features through a unique identifier.
[0034] S102: By parsing the corresponding CAD attribute information contained in the vector graphic data, and extracting the non-graphical information corresponding to the element number, component type, dimension parameters, material designation and design specifications, and at the same time, performing structured parsing through natural language processing technology to generate attribute feature sets;
[0035] In this embodiment of the invention, a CAD attribute parsing tool is used to read the CAD attribute information associated with each element in the vector graphics data (stored in the extended attribute block of the graphics file). Non-graphical information is extracted: element number (e.g., beam L-1, pipe P-3, cable E-5), component type (e.g., frame beam, galvanized steel pipe, copper core cable), dimensional parameters (beam span 6m, pipe length 12m, cable cross-section 16mm²), material grade (beam C30 concrete, pipe Q235 steel, cable copper material), and design specifications (beam reinforcement 2Φ20, pipe pressure rating 1.6MPa, cable protection rating IP65). Natural language processing technology (rule-based word segmentation and entity recognition) is used to perform structured parsing of the design specifications: "beam reinforcement 2Φ20" is broken down into "reinforcement location: reinforcement, reinforcement quantity: 2 bars, rebar type: Φ20", and "pipe pressure rating 1.6MPa" is broken down into "parameter type: pressure rating, parameter value: 1.6MPa". The parsed structured data is associated with the element number to generate an attribute feature set, ensuring that each non-graphical information can be accurately matched with the corresponding element.
[0036] S103: Collect relevant standards, local regulations and design guidelines for the construction industry to build a database of relevant regulatory clauses, and use semantic segmentation technology to split and label each regulatory clause in the database. At the same time, transform qualitative descriptions into computable rule expressions to generate a regulatory rule base.
[0037] In this embodiment of the invention, 1200 standard provisions were collected from relevant building industry standards (such as technical documents in the fields of structure, water supply and drainage, and electrical engineering), local regulations (such as the design requirements for civil buildings in a certain province), and design guidelines (such as the design guidelines for residential projects), and a database of relevant standard provisions was constructed. Semantic segmentation technology (text classification based on a BERT pre-trained model) was used to split the standard provisions: "The reinforcement ratio of beams shall not be less than 0.2% and shall not be greater than 2.5%" was split into "Applicable object: beam, parameter type: reinforcement ratio, lower limit: 0.2%, upper limit: 2.5%"; "The flow velocity of water supply pipes shall not be greater than 2.0m / s" was split into "Applicable object: water supply pipes, parameter type: flow velocity, upper limit: 2.0m / s". The split clauses are labeled (e.g., “Structure-Beam-Reinforcement Ratio”, “Water Supply and Drainage-Pipeline-Flow Velocity”), and the qualitative descriptions are converted into calculable rule expressions: “Beam reinforcement ratio ≥ 0.2% ∧ Beam reinforcement ratio ≤ 2.5%”, “Water supply pipeline flow velocity ≤ 2.0m / s”. All rule expressions are stored in categories of “professional field-component type-parameter rule” to generate a standard rule library, ensuring that each standard can be converted into calculation logic that AI drawing review can recognize.
[0038] S104: Perform data consistency verification on the drawing element dataset, attribute feature set, and standard rule base, and establish the correspondence between each element and each standard clause through association mapping to generate the drawing element dataset, attribute feature set, and standard rule base that meet the consistency verification standard.
[0039] In this embodiment of the invention, data consistency is verified by analyzing the drawing element dataset, attribute feature set, and standard rule base: The drawing element number (e.g., L-1) in the drawing element data dataset is verified to have a corresponding record in the attribute feature set. If a record is missing (e.g., a beam element has no material designation), it is marked as "data missing" and supplemented. The component type (e.g., frame beam) in the attribute feature set is verified to have a corresponding clause (e.g., "structure-beam-reinforcement ratio" rule) in the standard rule base. If a matching clause is not found (e.g., a special component has no corresponding standard), it is marked as "no reference standard" and the rule is manually supplemented. The parameter unit (e.g., MPa) in the standard rule base is verified to be consistent with the parameter unit (e.g., Pa) in the attribute feature set. If a unit difference exists (e.g., the pipe pressure record in the attribute is 1600000 Pa), it is automatically converted to the unit in the standard rule base (1.6 MPa). After verification, a corresponding relationship is established through association mapping: the "reinforcement ratio 1.2%" attribute of "beam L-1" in the building structure layer is associated with the clause "structure-beam-reinforcement ratio ≥0.2%∧≤2.5%" in the code rule base; the "flow velocity 1.5m / s" attribute of "pipe P-3" in the water supply and drainage layer is associated with the clause "water supply and drainage-pipe-flow velocity ≤2.0m / s". Finally, three datasets conforming to the consistency verification standard are generated, ensuring that the graphic elements, attributes, and codes can be accurately associated, providing a complete data foundation for subsequent AI drawing review.
[0040] Furthermore, the building component feature fusion module includes the following functions:
[0041] Geometric features are extracted from various architectural component elements in the drawing data set to calculate the contour complexity, curvature feature distribution, symmetry axis distribution and circumscribed rectangle parameters of each architectural component element, and generate element shape parameters.
[0042] In this embodiment of the invention, geometric features are extracted from the drawing data set of frame column C-1 (square cross-section, 100×100 pixels), frame beam L-1 (rectangular cross-section, 50×100 pixels), and pipe elbow P-5 (90° arc, 40×40 pixels). Canny edge detection (threshold 100-200) and Douglas-Peucker polygon approximation (tolerance 0.5 pixels) are used to calculate the contour complexity: frame column C-1 (0.2), frame beam L-1 (0.3), and pipe elbow P-5 (0.8). The curvature feature distribution is analyzed using the curvature formula k=|(x'y''-x''y')| / (x'²+y'²)^(3 / 2): the frame column and beam are polygonal segments (4 segments each, curvature 0), and the pipe elbow is an arc segment (1 segment, curvature 0). .025); Hough transform was used to detect the distribution of symmetry axes: 2 each for frame columns and beams (0° / 90°), and 1 for pipe bends (45°); Minimum bounding rectangle (MBR) calculation parameters were constructed: frame column MBR (100×100 pixels, aspect ratio 1:1, area ratio 1:1), frame beam MBR (50×100 pixels, aspect ratio 1:2, area ratio 1:1), and pipe bend MBR (40×40 pixels, aspect ratio 1:1, area ratio 0.785:1), and the primitive shape parameters were integrated to cover the contour, curvature, symmetry, and bounding rectangle dimensions.
[0043] Furthermore, the spatial relationship between different building component elements is analyzed, and the component spacing, relative angle and nesting depth between each building component element are calculated through coordinate transformation to generate position coordinate relationship and dimension annotation features. At the same time, these features are fused with the element shape parameters to generate element geometric feature vectors.
[0044] In this embodiment of the invention, the spatial relationships of the three components are analyzed: the center coordinates of frame column C-1 are (50, 50), the center of frame beam L-1 are (25, 50), and the center of pipe elbow P-5 are (20, 20). The spacing between the components is calculated by coordinate transformation: the Euclidean distance between the frame column and the beam = √[(50-25)² + (50-50)²] = 25 pixels (corresponding to 125mm in reality), and the distance between the frame column and the pipe elbow = √[(50-20)² + (50-20)²] ≈ 42.4 pixels (corresponding to 212mm). The relative angles are calculated: the line connecting the frame column and the beam is along the x-axis with an angle of 0°, and the line connecting the frame column and the pipe elbow makes an angle of 45° with the x-axis. The nesting depth is 0 for all components (no nesting). Extract dimensioning features: frame column dimension “500mm×500mm”, frame beam “250mm×500mm”, pipe elbow “DN100”, and convert them into numerical features (500,500)(250,500)(100). Merge the positional coordinate relationships (spacing 25 / 42.4 pixels, angle 0° / 45°), dimensioning features, and primitive shape parameters to generate primitive geometric feature vectors: frame column (0.2, 4-segment line, 2 axes of symmetry, 1:1, 25, 0°, 500, 500), frame beam (0.3, 4-segment line, 2 axes of symmetry, 1:2, 25, 0°, 250, 500), pipe elbow (0.8, 1 arc, 1 axis of symmetry, 1:1, 42.4, 45°, 100).
[0045] Furthermore, by extracting the attribute parameters corresponding to the material properties, mechanical parameters and construction technical requirements of each building component element from the attribute feature set, and converting them into numerical features through standardization, a CAD attribute feature vector is generated.
[0046] In this embodiment of the invention, attribute parameters of three components are extracted from the attribute feature set: frame column C-1 (material grade C30 concrete, compressive strength 30MPa, construction requirement: vibration compaction), frame beam L-1 (material grade C30 concrete, flexural strength 2.0MPa, construction requirement: protective layer thickness 25mm), and pipe elbow P-5 (material grade Q235 steel, pressure resistance 1.6MPa, construction requirement: anti-corrosion treatment). The attribute parameters are standardized: material properties are converted to "concrete=1, steel=2", mechanical parameters retain their original values (30, 2.0, 1.6), and construction technical requirements are converted to "vibration compaction=1, protective layer 25mm=2, anti-corrosion treatment=3", generating CAD attribute feature vectors: frame column (1, 30, 1), frame beam (1, 2.0, 2), and pipe elbow (2, 1.6, 3), ensuring that all attributes are converted into calculable numerical features.
[0047] Furthermore, an attention mechanism is used to weight and fuse primitive geometric feature vectors and CAD attribute feature vectors to calculate the importance weights corresponding to different feature dimensions, and then fuse them to generate a multi-dimensional feature matrix of building components containing geometric, topological and attribute information.
[0048] In this embodiment of the invention, an attention mechanism is used to weightedly fuse the geometric feature vectors of graphic primitives and the CAD attribute feature vectors. The importance of feature dimensions is analyzed using an attention weight calculation model: among geometric features, "component spacing" and "outline complexity" have a weight of 0.25 / 0.2 on the impact of drawing review; among attribute features, "material designation" and "mechanical parameters" have a weight of 0.2 / 0.35; and other dimensions have a weight of 0.05. The weighted fusion is as follows: Frame column fusion value = 0.2×0.2 + 0.25×25 + 0.2×1 + 0.35×30 + 0.05×(4-segment line + 2 axes of symmetry + 1:1 + 1) = 0.04 + 6.25 + 0.2 + 10.5 + 0.05×8 = 17.19; Frame beam fusion value = 0.2×0.3 + 0.25×25 + 0.2×1 + 0.35×2.0 + 0.05× (4-segment line + 2 axes of symmetry + 1:2 + 2) = 0.06 + 6.25 + 0.2 + 0.7 + 0.05 × 9 = 7.46; Pipe bend fusion value = 0.2 × 0.8 + 0.25 × 42.4 + 0.2 × 2 + 0.35 × 1.6 + 0.05 × (1 arc + 1 axis of symmetry + 1:1 + 3) = 0.16 + 10.6 + 0.4 + 0.56 + 0.05 × 6 = 11.92. A 3 × 1 dimension multi-dimensional feature matrix of building components is generated, containing geometric, topological, and attribute information, providing comprehensive feature input for AI drawing review.
[0049] Furthermore, the step of extracting geometric features from various architectural component primitives in the drawing data set to calculate the contour complexity, curvature feature distribution, symmetry axis distribution, and circumscribed rectangle parameters corresponding to each architectural component primitive includes:
[0050] Edge detection and contour extraction are performed on various architectural component primitives in the drawing data set, and polygon approximation is used to simplify the contour curves. At the same time, the length ratio and angle change of each contour line segment are calculated to generate the contour complexity.
[0051] In this embodiment of the invention, three component elements are selected from the drawing data set: frame column C-1 (square cross-section, 500mm side length, corresponding to 100×100 image pixels), frame beam L-1 (rectangular cross-section, 250mm×500mm, corresponding to 50×100 image pixels), and pipe elbow P-5 (90° arc, 200mm diameter, corresponding to 40×40 image pixels). Edges are extracted for each element using the Canny edge detection algorithm (threshold 100-200), and then polygon approximation is performed using the Douglas-Peucker algorithm (tolerance 0.5 pixels): frame column C-1 is approximated as 4 line segments of equal length (50 pixels each), frame beam L-1 as 4 line segments (2 50-pixel long and 2 100-pixel long), and pipe elbow P-5 as 8 broken line segments (15.7 pixels each). Calculate the length ratio of each contour segment: the length ratio of frame column C-1 is 1:1:1:1, and the length ratio of frame beam L-1 is 1:2:1:2. Calculate the angle changes: the included angle between adjacent segments of frame column C-1 is 90°, the included angle between adjacent segments of frame beam L-1 is 90°, and the included angle between adjacent segments of pipe elbow P-5 is 11.25°. Calculate the contour complexity using the entropy weight method: frame column C-1 (complexity 0.2), frame beam L-1 (complexity 0.3), and pipe elbow P-5 (complexity 0.8). The complexity increases with the number of segments and the change in angle.
[0052] Furthermore, curvature analysis is performed on the contour curves corresponding to various building component elements to calculate the distribution density of curvature extreme points and the rate of curvature change, and to identify the arc, polyline and irregular curve segments corresponding to various building component elements, generating curvature feature distribution.
[0053] In this embodiment of the invention, curvature analysis is performed on the contour curves of three component primitives. The curvature of each pixel is calculated using the formula curvature k=|(x'y''-x''y')| / (x'²+y'²)^(3 / 2) (x' and y' are the first derivatives, and x'' and y'' are the second derivatives). The contours of frame column C-1 and frame beam L-1 are straight lines with a curvature of 0, no curvature extrema, and a curvature change rate of 0, thus identified as polyline segments (4 segments each). The contour curvature of pipe elbow P-5 is 0.025 (corresponding to a radius of 40 pixels), the distribution density of curvature extrema is 1 / 5 pixels (8 extrema in total), and the curvature change rate is 0, thus identified as an arc segment (1 segment). Generate curvature feature distributions: frame column C-1 (4 segments of broken lines, curvature 0, extreme points 0), frame beam L-1 (4 segments of broken lines, curvature 0, extreme points 0), and pipe elbow P-5 (1 segment of arc-shaped lines, curvature 0.025, 8 extreme points), clarifying the curve types and curvature distribution differences of different components.
[0054] Furthermore, the number and distribution direction of symmetry axes corresponding to various building component primitives are detected by Hough transform, and the angular relationship between the symmetry axis and the coordinate system is calculated to generate the symmetry axis distribution;
[0055] In this embodiment of the invention, the symmetry axes are detected by applying Hough transform to three types of component elements: Frame column C-1 is a square, and two symmetry axes (horizontal and vertical, with an angle of 90°) are detected, with angles of 0° and 90° between the symmetry axes and the x-axis of the coordinate system; Frame beam L-1 is a rectangle, and two symmetry axes (horizontal and vertical, with an angle of 90°) are detected, with angles of 0° and 90° between the symmetry axes and the x-axis of the coordinate system; Pipe elbow P-5 is a 90° arc, and one symmetry axis (along the bisector of the arc angle) is detected, with an angle of 45° between it and the x-axis of the coordinate system. The angle relationship between the symmetry axes and the coordinate system is calculated: the symmetry axis difference for frame column C-1 is 90°, the symmetry axis difference for frame beam L-1 is 90°, and pipe elbow P-5 has only one symmetry axis. The distribution of symmetry axes is generated as follows: frame column C-1 (2 axes, 0° / 90°), frame beam L-1 (2 axes, 0° / 90°), and pipe elbow P-5 (1 axis, 45°), reflecting the symmetry characteristics of the component elements.
[0056] Furthermore, the minimum bounding rectangles corresponding to various building component primitives are constructed, and the aspect ratio, area, and center coordinates of the minimum bounding rectangles are calculated. At the same time, the bounding rectangle parameters are generated by combining the ratio of the actual area of the primitive to the area of the bounding rectangle. The contour complexity, curvature feature distribution, symmetry axis distribution, and bounding rectangle parameters are integrated to generate primitive shape parameters.
[0057] In this embodiment of the invention, the minimum bounding rectangle (MBR) of each component element is constructed as follows: the frame column C-1MBR is 100×100 pixels (aspect ratio 1:1), with an area of 10,000 pixels², a center coordinate of (50,50), and an actual area of 10,000 pixels², with an area ratio of 1:1; the frame beam L-1MBR is 50×100 pixels (aspect ratio 1:2), with an area of 5,000 pixels², a center coordinate of (25,50), and an actual area of 5,000 pixels², with an area ratio of 1:1; the pipe elbow P-5MBR is 40×40 pixels (aspect ratio 1:1), with an area of 1,600 pixels², a center coordinate of (20,20), and an actual area of 1,256 pixels² (circle area), with an area ratio of 0.785:1. By integrating contour complexity, curvature feature distribution, symmetry axis distribution, and circumscribed rectangle parameters—for example, frame column C-1 (complexity 0.2, 4 segments of polyline, 2 axes of symmetry, 1:1 MBR), frame beam L-1 (complexity 0.3, 4 segments of polyline, 2 axes of symmetry, 1:2 MBR), and pipe elbow P-5 (complexity 0.8, 1 segment of arc, 1 axis of symmetry, 1:1 MBR)—complete primitive shape parameters are generated, providing feature basis for subsequent component classification and drawing review.
[0058] Furthermore, the step of performing edge detection and contour extraction on various architectural component primitives in the drawing data set, and simplifying the contour curves using polygon approximation, while simultaneously calculating the length ratio and angle change corresponding to each contour segment, includes:
[0059] The process involves acquiring vector graphics data corresponding to various building component primitives, converting the vector graphics data into raster images, smoothing the raster images using Gaussian filtering to eliminate image noise, and generating denoised primitive grayscale images. Based on the denoised primitive grayscale images, the Sobel operator is used to calculate the gradient magnitude and direction of image pixels, and pixels with significant gradient changes are extracted as candidate edge points to generate an initial edge candidate set.
[0060] In this embodiment of the invention, vector graphic data of "beam L-1" (including cross-sectional outline coordinates: (100,200), (350,200), (350,700), (100,700), corresponding to a cross-sectional size of 250mm × 500mm) is obtained from the drawing data set in the building structure layer. A vector-to-raster tool is then used to convert the vector graphic data into a raster image with a resolution of 300dpi and a size of 500 × 800 pixels, where each pixel corresponds to an actual drawing size of 0.5mm. Gaussian filtering is initiated with a kernel size of 5×5 pixels and a standard deviation σ=1.2. Convolution operations are used to smooth the raster image: the grayscale value of each pixel is calculated by weighting the grayscale values within its surrounding 5×5 pixel range according to Gaussian weights (center pixel weight 0.153, adjacent pixel weight 0.123, edge pixel weight 0.056). This eliminates salt-and-pepper noise and jagged edges caused by vector transformation, generating a denoised primitive grayscale image. The beam's outline in the image has a smooth transition with no obvious noise points. Next, based on the denoised "beam L-1" grayscale image, the Sobel operator is used to calculate the pixel gradient magnitude and direction. The Sobel operator consists of horizontal (Gx) and vertical (Gy) convolution kernels. The Gx kernel is [[-1,0,1],[-2,0,2],[-1,0,1]], and the Gy kernel is [[-1,-2,-1],[0,0,0],[1,2,1]]. For each pixel (i,j) in the image, the horizontal gradient value is calculated by convolving Gx with the image, and the vertical gradient value is calculated by convolving Gy with the image. Then, the gradient magnitude G = √(Gx² + Gy²) and the gradient direction θ = arctan(Gy / Gx) are calculated according to the formulas. The gradient magnitude threshold is set to 80 (grayscale range 0-255), and pixels with G ≥ 80 are extracted as candidate edge points. For example, the gradient magnitudes of pixels (100,200) to (100,700) on the left edge of the beam outline are all ≥120, and the gradient direction is close to 90°; the gradient magnitudes of pixels (100,200) to (350,200) on the lower edge are all ≥110, and the gradient direction is close to 0°. These pixels are aggregated to generate an initial edge candidate set containing 820 candidate edge points.
[0061] Furthermore, an 8-neighborhood connectivity analysis is performed on each pixel in the initial edge candidate set to calculate the gradient direction consistency of adjacent candidate points. Continuous points with directional deviations within a preset range are retained to generate continuous edge point chains. Based on the coordinate sequence of the continuous edge point chains, the least squares method is used to fit a straight line to calculate the mean square error between the fitted line and the continuous edge point chains. Continuous edge point chains with mean square errors exceeding a threshold are divided into multiple sub-chains to generate a segmented edge point chain set.
[0062] In this embodiment, an 8-neighborhood connectivity analysis is performed on the 820 pixels in the initial edge candidate set, that is, to determine whether there are other candidate edge points in the eight directions (up, down, left, right, upper left, upper right, lower left, lower right) around each pixel. For adjacent candidate points (such as pixel A(100,200) and pixel B(100,201)), the gradient direction deviation between them is calculated: the gradient direction of pixel A is 90°, and the gradient direction of pixel B is 91°, with a deviation of 1°. A preset deviation range is set to ±5°, and continuous points with a deviation ≤5° are retained, while isolated points with deviations exceeding the range (such as pixels with a gradient direction of 150° caused by residual noise) are removed. Through connectivity analysis and direction filtering, discrete candidate edge points are connected into four continuous edge point chains: the left side chain (100,200)-(100,700), the right side chain (350,200)-(350,700), the lower side chain (100,200)-(350,200), and the upper side chain (100,700)-(350,700), each chain containing 200-210 consecutive pixels. Next, based on the coordinate sequence of the four continuous edge point chains, the least squares method is used for line fitting. Taking the lower side chain (x1,y1)…(xn,yn) (n=250, coordinates such as (100,200), (101,200)…(350,200)) as an example, let the fitted line equation be y=ax+b, and calculate the coefficients a and b using the formula. , ( Let xi be the mean. (Assuming the mean value of yi), we calculate a≈0, b=200, and the fitted line is y=200. Using the formula Mean Squared Error (MSE)=Σ(yi-(axi+b))² / n, the MSE of this point chain is 0.02. Setting the MSE threshold to 0.5, MSE=0.02≤0.5 indicates a complete straight line segment, requiring no segmentation. If a point chain (e.g., a slightly curved edge due to drawing deviation) has MSE=0.8>0.5, it is segmented into two sub-chains based on the pixel with the largest deviation. After refitting, ensure each sub-chain's MSE≤0.5. Finally, all four point chains meet the requirements, generating a set of segmented edge point chains, retaining the fitting parameters (a, b, MSE) for all straight line segments.
[0063] Furthermore, B-spline curve fitting is applied to the curve segments in the segmented edge point chain set to obtain the control point coordinates and order parameters of the curve segments, and the curvature coefficient of the curve segments is calculated by the control point spacing to generate curve characteristic parameters.
[0064] In this embodiment of the invention, B-spline curve fitting is used to fit the curve segments that may exist in the segmented edge point chain set (such as the arc edge of the pipe bend in the water supply and drainage layer, taking the 90° arc bend segment of pipe P-3 as an example, with point chain coordinates (500,300), (510,310)...(600,400)). The B-spline curve is set to order 3 (4 control points determine a curve segment), and the coordinates of the control points are calculated by the least squares method: let the control points be P0(500,300), P1(530,300), P2(570,400), P3(600,400), substitute them into the B-spline basis function formula to calculate the theoretical coordinates of each point on the curve, compare them with the actual point chain coordinates, and adjust the position of the control points until the fitting error is ≤0.3 pixels. Calculate the control point spacing: P0-P1 spacing 30 pixels, P1-P2 spacing 50 pixels, P2-P3 spacing 30 pixels. Calculate the curvature coefficient C using the formula: C = (maximum spacing - minimum spacing) / average spacing. The average spacing is (30 + 50 + 30) / 3 ≈ 36.67, and C = (50 - 30) / 36.67 ≈ 0.54. A larger C value indicates a more significant curve curvature. Record the coordinates of the control points (P0-P3), the order (3rd order), and the curvature coefficient (0.54) for each curve segment to generate curve characteristic parameters, providing a geometric basis for subsequent pipeline bend compliance assessment.
[0065] Furthermore, an adaptive polygon approximation strategy is selected based on curve feature parameters, wherein the endpoint direct connection method is used for straight line segments and the dynamic vertex addition and deletion method is used for curved segments to generate preliminary approximation polygons.
[0066] In this embodiment of the invention, an adaptive polygon approximation strategy based on curve feature parameters is selected. For the four straight line segments (left, right, bottom, and top) of beam L-1, the endpoint direct connection method is adopted: the first and last endpoints of each straight line segment are taken (for example, the endpoints of the lower line segment (100,200) and (350,200)), and the endpoints are directly connected with line segments to generate the preliminary approximation polygons corresponding to the straight line segments (the lower polygons are (100,200)-(350,200)); for the 90° circular arc curve segment of pipe P-3 (point chain coordinates (500,300) to (600,400)), the dynamic vertex addition and deletion method is adopted: first select Take the two endpoints (500,300) and (600,400) of the curve segment and the midpoint (550,350) as the initial vertices. Calculate the deviation between the initial polygon and the curve segment. If the deviation is greater than 0.5 pixels, add a new vertex at the point of maximum deviation (e.g., (525,325), (575,375)). Repeat the addition and deletion of vertices until the deviation is less than or equal to 0.5 pixels. Finally, the preliminary approximation polygon corresponding to the curve segment is generated ((500,300)-(525,325)-(550,350)-(575,375)-(600,400)). The overall preliminary approximation polygon contains the polygon structure corresponding to the straight line segment and the curve segment.
[0067] Furthermore, the hausdorff distance deviation between the initially approximating polygon and the original corresponding segmented edge point chain set is calculated, and the number of polygon vertices is adjusted based on the hausdorff distance deviation to generate an optimized contour line segment set; the length value of each line segment in the contour line segment set is extracted, the ratio of the length of a single line segment to the total length of all line segments is calculated, a line segment length proportion parameter is generated, and the number of line segments with a proportion exceeding a preset threshold is counted to obtain the main line segment distribution characteristics;
[0068] In this embodiment of the invention, the Hausdorff distance deviation between the preliminary approximation polygon and the original segmented edge point chain set is calculated. Taking the preliminary approximation polygon ((100,200)-(350,200)) on the lower side of beam L-1 and the original lower side point chain (250 pixels) as an example, the Hausdorff distance is the maximum distance between any two points in the two sets: the vertical distance from each pixel in the original point chain to the polygon line segment is calculated, and the maximum distance is 0.1 pixels, that is, the Hausdorff distance deviation value = 0.1; taking the preliminary approximation polygon (5 vertices) of the curve segment of pipe P-3 and the original curve point chain (100 pixels) as an example, the maximum distance is calculated to be 0.4 pixels, and the Hausdorff distance deviation value = 0.4. The Hausdorff distance deviation threshold is set to 0.5. Since the current deviation values are all ≤0.5, no adjustment to the number of vertices is needed. If the deviation value of a curve segment is 0.6 > 0.5, a new vertex is added at the point of maximum deviation, and the deviation value is recalculated until it is ≤0.5. This generates the optimized contour segment set. The beam L-1 set contains 4 straight line segments, and the pipe P-3 set contains 1 polyline segment consisting of 5 vertices. Next, by extracting the length values of each segment in the optimized contour segment set, in the beam L-1 contour segment set: the left segment length is 500 pixels (corresponding to an actual size of 250mm), the right segment length is 500 pixels, the lower segment length is 250 pixels, and the upper segment length is 250 pixels, for a total length of 500 + 500 + 250 + 250 = 1500 pixels. Calculate the ratio of single line segment length to total length: Left line segment percentage = 500 / 1500 ≈ 33.3%, Right line segment percentage ≈ 33.3%, Lower line segment percentage ≈ 16.7%, Upper line segment percentage ≈ 16.7%, generating line segment length percentage parameters. Set the preset percentage threshold to 20%, and count the number of line segments with a percentage exceeding 20% as 2 (left and right line segments), obtaining the main line segment distribution characteristics (number of main line segments 2, total percentage of main line segments 66.6%); In the pipeline P-3 contour line segment set, the length of each of the 5 polyline segments is 22.4 pixels (corresponding to an actual size of 11.2 mm), the total length = 112 pixels, the single line segment percentage is ≈ 8.9%, and there are no line segments exceeding 20%, the main line segment distribution characteristics are (number of main line segments 0, total percentage of main line segments 0%).
[0069] Furthermore, the angle between the normal vectors of adjacent line segments is calculated based on the endpoint coordinates of the contour line segments, and then converted into the line segment turning angle. The distribution frequency of acute angles, right angles, and obtuse angles is statistically analyzed to generate an angle distribution histogram. At the same time, the peak angle of the angle distribution histogram is extracted as a feature angle parameter.
[0070] In this embodiment of the invention, the angle between the normal vectors of adjacent line segments is calculated based on the endpoint coordinates of the contour line segments. The adjacent line segments in the contour of beam L-1 are bottom-left, left-top, top-right, and right-bottom: the endpoint of the bottom line segment is (100,200)-(350,200), and the normal vector is (0,1); the endpoint of the left line segment is (100,200)-(100,700), and the normal vector is (-1,0). The angle between the two is 90° (right angle). Similarly, the angle between other adjacent line segments is calculated to be 90°. The number of acute angles (<90°) is 0, the number of right angles (=90°) is 4, and the number of obtuse angles (>90°) is 0. An angle distribution histogram (right angle frequency 100%) is generated, and the peak angle of 90° is extracted as the feature angle parameter. In the P-3 profile, the endpoints of adjacent polyline segments are (500,300)-(525,325)-(550,350). The normal vector of the first segment is (-1,1), the normal vector of the second segment is (-1,1), and the included angle is 0° (approximately a straight line). The included angle of subsequent adjacent segments is also 0°. The number of acute angles, right angles, and obtuse angles is 0. An angle distribution histogram (0° frequency 100%) is generated, and the characteristic angle parameter is 0°.
[0071] Furthermore, the distribution characteristics of the main line segments, the histogram of the angle distribution, and the Hausdorff distance deviation value are input into the contour complexity evaluation model to calculate the weight ratio of each parameter using the entropy weight method, and then the contour complexity is generated by weighted summation.
[0072] In this embodiment of the invention, the main line segment distribution characteristics (beam L-1: number of main line segments 2, total proportion 66.6%), angle distribution histogram (rectangular frequency 100%), and Hausdorff distance deviation value (0.1) are input into the contour complexity evaluation model. The entropy weight method is used to calculate the weight ratio of each parameter: first, the information entropy of each parameter is calculated, the entropy value of the main line segment distribution characteristics is 0.52, the entropy value of the angle distribution histogram is 0 (single rectangular distribution), and the entropy value of the Hausdorff distance deviation value is 0.81. Then, the weights are calculated according to the entropy weight formula: the weight of the main line segment distribution characteristics is ≈0.35, the weight of the angle distribution histogram is ≈0.25, and the weight of the Hausdorff distance deviation value is ≈0.4. Weighted summation generates the contour complexity: Beam L-1 complexity = 2 × 0.35 + 0 × 0.25 + 0.1 × 0.4 = 0.74 (the smaller the value, the lower the complexity); Pipe P-3 has a main line segment distribution feature weight of 0.35, an angle distribution histogram weight of 0.25, and a Hausdorff distance deviation value of 0.4, so its complexity = 0 × 0.35 + 0 × 0.25 + 0.4 × 0.4 = 0.16. It is clear that the contour complexity of beam L-1 is higher than that of pipe P-3, providing a feature basis for subsequent component classification in drawings.
[0073] Furthermore, the coordinate sequence based on the continuous edge point chain is fitted with a straight line using the least squares method to calculate the mean square error between the fitted line and the continuous edge point chain. The continuous edge point chain with a mean square error exceeding a threshold is then divided into multiple sub-chains, including:
[0074] The coordinate data of all points are extracted from the continuous edge point chain to generate a two-dimensional coordinate matrix containing the x-coordinate sequence and the y-coordinate sequence, which serves as the original data sample for line fitting. Based on the two-dimensional coordinate matrix, the average x-coordinate and average y-coordinate of all points are calculated to generate the coordinates of the geometric center point corresponding to the data sample, which serves as the fitting reference point.
[0075] In this embodiment of the invention, coordinate data of all points are extracted from the continuous edge point chain of the building water supply and drainage layer "Pipe P-4". This point chain contains 120 pixels with coordinates ranging from x: 300-420 pixels and y: 200-320 pixels (1 pixel corresponds to 0.5mm in the drawing). A two-dimensional coordinate matrix (120 rows and 2 columns, with the first column representing the x-coordinate and the second column representing the y-coordinate, such as (300, 200), (301, 201)...(420, 320)) is generated as the original data sample for line fitting. Based on the two-dimensional coordinate matrix, the average x-coordinate is calculated as (300+301+...+420) / 120=360 pixels, and the average y-coordinate is calculated as (200+201+...+320) / 120=260 pixels. The coordinates of the geometric center point (360, 260) are generated as the fitting reference point, ensuring that the fitting process revolves around the geometric center of the point chain, thus improving the fitting accuracy.
[0076] Furthermore, a line fitting model is constructed using the least squares method. The two-dimensional coordinate matrix is substituted into the line fitting model to calculate the slope and intercept parameters of the line, generating a functional expression for the initial fitted line. Based on the functional expression of the initial fitted line, the vertical distance from each point in the continuous edge point chain to the fitted line is calculated, generating a distance deviation sequence.
[0077] In this embodiment of the invention, a linear fitting model is constructed using the least squares method, with the fitted line equation set as y = kx + b (where k is the slope and b is the intercept). The 120 sets of (xi, yi) in the two-dimensional coordinate matrix are substituted into the model, and k and yi are calculated using the formula. Calculated , Therefore, k=1; The initial fitted line function expression y=x-100 is generated. Based on this expression, the distance from each point to the fitted line is calculated using the formula vertical distance d=|xi-yi-100| / √(1²+(-1)²). For example, the distance from point (300,200) to the fitted line is d=|300-200-100| / √2=0, the distance from point (360,260) to the fitted line is d=|360-260-100| / √2=0, the distance from point (420,320) to the fitted line is d=0, and the distance from point (330,220) to the fitted line is d=|330-220-100| / √2≈7.07 pixels. A distance deviation sequence containing 120 values is generated.
[0078] Furthermore, the sum of squares of the deviations is calculated based on the distance deviation sequence, and the mean square error is calculated in combination with the number of points in the continuous edge point chain, which serves as an evaluation index for fitting accuracy.
[0079] In this embodiment of the invention, the sum of squares of the deviations is calculated based on the distance deviation sequence. Each distance value in the sequence is squared and then summed, such as (0)² + (0)² + ... + (7.07)² + ... + (0)² = 2500. The number of points in the continuous edge point chain is 120. According to the formula Mean Square Error (MSE) = Sum of Squares of Deviations / Number of Points, MSE = 2500 / 120 ≈ 20.83. This value serves as an evaluation index for fitting accuracy, reflecting the overall degree of deviation between the point chain and the fitted straight line. A larger value indicates that the point chain deviates more from the straight line.
[0080] Furthermore, by analyzing the edge fitting error distribution in historical drawing data, the dynamic threshold coefficient of the mean square error is determined, and an adaptive segmentation threshold is generated by combining the length and curvature characteristics of the continuous edge point chain.
[0081] In this embodiment of the invention, by analyzing the fitting error distribution of pipe edges in 500 historical architectural drawings, the mean square error was found to be 15 and the standard deviation was 5, thus determining the dynamic threshold coefficient to be 1.2. Combining the length of the current continuous edge point chain (120 pixels, corresponding to an actual length of 60mm) and the curvature feature (the curvature coefficient was calculated to be 0.8 using previous curve parameters), the adaptive segmentation threshold T was calculated using the formula: T = dynamic threshold coefficient × (mean + standard deviation × curvature coefficient), resulting in T = 1.2 × (15 + 5 × 0.8) = 1.2 × 19 = 22.8. This threshold varies with the length and curvature of the point chain, avoiding over-segmentation or under-segmentation caused by a fixed threshold.
[0082] Furthermore, the calculated mean square error is compared with the adaptive segmentation threshold. If the mean square error does not exceed the adaptive segmentation threshold, the continuous edge point chain is marked as a line-fittable segment. If the mean square error exceeds the adaptive segmentation threshold, the location of the maximum deviation point is identified based on the distance deviation sequence, and the continuous edge point chain is divided into two sub-chains with the maximum deviation point as the boundary to generate a preliminary segmentation point set.
[0083] In this embodiment of the invention, by comparing the calculated mean square error MSE≈20.83 with the adaptive segmentation threshold T=22.8, 20.83<22.8, the continuous edge point chain is marked as a line-fittable segment; if a point chain MSE=25>22.8, the maximum deviation point is identified based on the distance deviation sequence, such as the point (340,230) corresponding to the maximum value d=10 in the sequence. The original 120-point point chain is divided into two sub-chains: the first 40 points (300-340 pixel x coordinates) and the last 80 points (340-420 pixel x coordinates), generating a preliminary segmented point set. Each sub-chain contains an independent coordinate sequence.
[0084] Furthermore, the above fitting and segmentation process is repeated on the segmented sub-chains until the mean square error of all sub-chains is lower than the adaptive segmentation threshold, generating a multi-level segmentation result; collinearity detection is performed on adjacent sub-chains in the multi-level segmentation result to calculate the angle between the fitted lines of the sub-chains, and adjacent sub-chains with an angle less than a preset angle threshold are merged to generate a segmentation edge point chain set.
[0085] In this embodiment of the invention, by repeatedly executing the S2131-S2135 process on the segmented sub-chains, such as the first 40 sub-chains having an MSE of 5 < 22.8 and the last 80 sub-chains having an MSE of 8 < 22.8, both below the threshold, a multi-level segmentation result (2 sub-chains) is generated. Collinearity detection is performed on adjacent sub-chains: the angle between the fitted line y = x - 100 of the first sub-chain and the fitted line y = x - 100 of the second sub-chain is calculated. Both lines have a slope of 1, and the angle is 0°. A preset angle threshold of 5° is set. If 0° < 5°, adjacent sub-chains are merged, ultimately generating a set of segmented edge point chains (1 line-fittable segment). If the angle between adjacent sub-chains is 8° > 5°, the segment is retained without merging, ensuring that the segmentation result satisfies both fitting accuracy and avoids redundant segmentation.
[0086] Furthermore, the drawing violation review and analysis module includes the following functions:
[0087] A deep learning model based on the Transformer architecture is constructed, and the multi-dimensional feature matrix of building components is input into the encoder corresponding to the deep learning model for feature dimensionality reduction and key information extraction. The decoder outputs the building component recognition results containing component type, functional attributes and design parameters.
[0088] In this embodiment of the invention, a deep learning model based on the Transformer architecture is constructed. The model includes a 6-layer encoder and a 4-layer decoder. The encoder adopts an 8-head self-attention mechanism (64 head dimensions) and a Feed-Forward network (2048 hidden layer dimensions). The decoder adopts a cross-attention mechanism to associate the encoder output. The 3×1 dimension multi-dimensional feature matrix of building components (frame column 17.19, frame beam 7.46, pipe elbow 11.92) generated above is input into the encoder. The self-attention mechanism calculates the dependencies between feature dimensions (such as the association weight of 0.3 between "component spacing" and "material mechanical parameters"). After LayerNorm normalization and residual connection, feature dimensionality reduction is completed (from 8-dimensional geometric features + 3-dimensional attribute features to 128-dimensional key features). The decoder takes the dimensionality-reduced features as input and combines them with the component type dictionary (frame column = 1, frame...). The system includes 2 beams, 3 pipe elbows, a functional attribute dictionary (load-bearing capacity = 1, water supply = 2), and a design parameter dictionary (dimensions / strength / pressure resistance). The output building component identification results are: frame column (type 1, function 1, parameters 500mm×500mm / C30 / 30MPa), frame beam (type 2, function 1, parameters 250mm×500mm / C30 / 2.0MPa), and pipe elbow (type 3, function 2, parameters DN100 / Q235 / 1.6MPa). The identification results completely match the actual component information.
[0089] Furthermore, a compliance verification rule tree is generated based on the standard rule base, and the building component identification results are matched and calculated with the corresponding rule clauses in the compliance verification rule tree to calculate the parameter deviation degree and clause compliance rate, and generate a preliminary compliance judgment.
[0090] In this embodiment of the invention, a compliance verification rule tree is generated based on a standard rule base. The rule tree is layered according to "professional field - component type - parameter category": the structural field is divided into frame columns and frame beams. The frame column subclass includes rules such as "section size ≥ 400mm" and "concrete strength ≥ C25", while the frame beam subclass includes rules such as "section height ≥ 500mm" and "bending strength ≥ 1.8MPa". The water supply and drainage field is divided into pipe elbows, which includes rules such as "pipe diameter ≥ 80mm" and "pressure resistance rating ≥ 1.2MPa". The identification results of building components are matched and calculated against the rule tree: Frame column cross-section 500mm ≥ 400mm (deviation 0), strength 30MPa ≥ C25 corresponding to 23MPa (deviation 7MPa), clause compliance rate 100%; Frame beam height 500mm ≥ 500mm (deviation 0), bending strength 2.0MPa ≥ 1.8MPa (deviation 0.2MPa), clause compliance rate 100%; Pipe elbow diameter 100mm ≥ 80mm (deviation 0), pressure resistance 1.6MPa ≥ 1.2MPa (deviation 0.4MPa), clause compliance rate 100%, generating a preliminary compliance judgment (all components comply with the specifications). If a component parameter does not meet the standard (e.g., frame column strength C20), then the deviation = 23 - 20 = 3MPa, clause compliance rate 0%.
[0091] Furthermore, based on the normative rule base, text data corresponding to relevant standards, local regulations, and design guidelines are obtained, and natural language processing technology is used to split the text data into clauses to extract the constraint objects, constraint thresholds, and descriptions of the consequences of violations in each clause, generating a normative clause element dataset; based on the normative clause element dataset, the constraint objects are classified and labeled, and the constraint thresholds are numerically converted to generate a normative constraint classification dataset;
[0092] In this embodiment of the invention, text data from structural-related standards (such as component strength requirements), local regulations (such as cross-sectional dimension limits), and design guidelines (such as construction parameter requirements) are obtained from a regulatory rule base. A total of 100 relevant clauses are extracted, such as "The concrete strength grade of frame columns should not be lower than C25," "The cross-sectional height of frame beams should not be less than 500mm," and "The pressure resistance grade of pipe elbows should not be lower than 1.2MPa." Natural language processing technology (rule-based entity recognition and relation extraction) is used to split the text data into clauses: "The concrete strength grade of frame columns should not be lower than C25" is split into the constraint object "frame column - concrete strength," the constraint threshold "≥C25 (corresponding to 23MPa)," and the consequence of violation "affects structural load-bearing safety"; "The pressure resistance grade of pipe elbows should not be lower than 1.2MPa" is split into the constraint object "pipe elbow - pressure resistance grade," the constraint threshold "≥1.2MPa," and the consequence of violation "may cause pipe rupture and leakage." All splitting results are stored according to "constraint object - threshold - consequence," generating a dataset of regulatory clause elements to ensure that each clause element can be accurately located. Secondly, based on the data set of elements in the code clauses, the constraint objects are classified and labeled: They are classified according to "component type - parameter type," with constraints related to frame columns labeled "structure - frame column," those related to frame beams labeled "structure - frame beam," and those related to pipe elbows labeled "water supply and drainage - pipe elbow." Parameter types are labeled with "dimension," "strength," "pressure resistance," etc., such as "frame column - concrete strength" labeled "structure - frame column - strength." The constraint thresholds are numerically converted: the textual description "should not be lower than C25" is converted to "≥23MPa," "should not be less than 500mm" is converted to "≥500mm," and "should not be lower than 1.2MPa" is converted to "≥1.2MPa," ensuring that the thresholds can be directly used for numerical comparison. A code constraint classification dataset is generated, containing fields of "classification label - constraint object - numerical threshold - consequences of violation," such as (structure - frame column - strength, frame column - concrete strength, ≥23MPa, affecting structural load-bearing safety), providing standardized data for subsequent association mapping.
[0093] Furthermore, by combining the feature dimensions corresponding to the multi-dimensional feature matrix of building components, the constraint objects in the standard constraint classification dataset are associated and mapped with the feature dimensions, the standard constraint coverage corresponding to each feature dimension is calculated, and a feature-constraint association matrix is generated. Based on the feature-constraint association matrix, a corresponding violation judgment weight is set for each feature dimension, and the weight value is calculated using the analytic hierarchy process. At the same time, a building violation judgment standard is constructed by integrating constraint thresholds, violation consequence descriptions, feature-constraint association matrices, and corresponding weight values.
[0094] In this embodiment of the invention, by combining the feature dimensions of the multi-dimensional feature matrix of building components (frame column feature dimensions: contour complexity / component spacing / material / strength / size), the constraint objects in the specification constraint classification dataset are associated and mapped with the feature dimensions: the constraint object "frame column - concrete strength" is associated with the "strength" feature dimension of the frame column, "frame column - cross-sectional dimensions" is associated with the "size" feature dimension, and "pipe elbow - pressure resistance rating" is associated with the "pressure resistance" feature dimension of the pipe elbow. The specification constraint coverage rate corresponding to each feature dimension is calculated: the frame column has a total of 3 feature dimensions (size / strength / material), of which 2 dimensions have corresponding constraints (size / strength), and the coverage rate = 2 / 3 ≈ 66.7%; the frame beam has 3 feature dimensions (size / strength / material), 2 of which have constraints, and the coverage rate ≈ 66.7%; the pipe elbow has 3 feature dimensions (size / pressure resistance / material), 2 of which have constraints, and the coverage rate ≈ 66.7%. All relationships and coverage rates are stored according to "component type - feature dimension - constraint object - coverage rate", generating a feature-constraint relationship matrix to clarify the specification coverage of each feature dimension, providing a basis for subsequent risk warnings of uncovered features. Secondly, based on the feature-constraint relationship matrix (frame column size / strength / material dimension coverage rate 66.7%, frame beams the same, pipe elbow size / pressure resistance / material dimension coverage rate 66.7%), the Analytic Hierarchy Process (AHP) is used to assign violation judgment weights to each feature dimension. A hierarchical structure is constructed: the target layer is "violation judgment weight", the criterion layer is "specification importance / safety impact / feature coverage rate", and the scheme layer consists of each feature dimension. The weights are calculated using a pairwise comparison matrix: for frame columns, the "strength" dimension (highest safety impact) has a weight of 0.5, the "size" dimension (second highest importance in the code) has a weight of 0.3, and the "material" dimension (coverage not reaching 100%) has a weight of 0.2; for frame beams, the "strength" weight is 0.5, the "size" weight is 0.3, and the "material" weight is 0.2; and for pipe elbows, the "pressure resistance" weight is 0.5, the "size" weight is 0.3, and the "material" weight is 0.2. By integrating constraint thresholds (frame column strength ≥ 23MPa, size ≥ 400mm; pipe elbow pressure resistance ≥ 1.2MPa, size ≥ 80mm), descriptions of violation consequences (strength failure "affects load-bearing safety", pressure failure "leads to pipe rupture"), feature-constraint correlation matrix, and weight values, a building violation judgment standard is constructed: the frame column strength violation judgment standard is "actual value < 23MPa, weight 0.5, consequence affects load-bearing capacity", the size violation judgment standard is "actual value < 400mm, weight 0.3, consequence affects structural stability", and the pipe elbow pressure resistance violation judgment standard is "actual value < 1.2MPa, weight 0.5, consequence leads to water leakage", ensuring that each standard includes the three elements of threshold, weight, and consequence.
[0095] Furthermore, by combining the preliminary compliance judgment to extract the component ID, feature dimension and violation clause number corresponding to the mismatch item, a preliminary violation candidate set is generated. The multi-dimensional feature matrix of building components is called to extract the actual feature value of each component in the preliminary violation candidate set under the corresponding feature dimension. At the same time, the actual feature value of each component under the corresponding feature dimension is compared with the corresponding constraint threshold in the building violation judgment standard to obtain the deviation between the actual value and the threshold of each feature dimension.
[0096] In this embodiment of the invention, by assuming that in the preliminary compliance assessment, "Frame Column C-2" (strength C20 corresponding to 15MPa, size 380mm) and "Pipe Elbow P-6" (pressure resistance 1.0MPa, size 70mm) are added as mismatched items, a preliminary violation candidate set is extracted: component ID (C-2 / P-6), feature dimension (C-2: strength / size; P-6: pressure resistance / size), and violation clause number (C-2: structure-001 / structure-002; P-6: water supply and drainage-001 / water supply and drainage-002). The multi-dimensional feature matrix of building components is called to extract the actual feature values of C-2 (strength 15MPa, size 380mm) and P-6 (pressure resistance 1.0MPa, size 70mm). The deviations are calculated by comparing the actual values with the threshold values for determining building violations: C-2 strength deviation = 23 - 15 = 8 MPa (negative deviation, not up to standard), dimensional deviation = 400 - 380 = 20 mm; P-6 compressive strength deviation = 1.2 - 1.0 = 0.2 MPa, dimensional deviation = 80 - 70 = 10 mm. The characteristic dimension and component ID corresponding to each deviation are recorded to ensure that the deviation calculations are traceable to specific clauses and actual values.
[0097] Furthermore, based on the weighted summation of the deviation between the actual value and the threshold corresponding to each feature dimension and the corresponding weight value, the comprehensive violation index corresponding to each non-compliant component is calculated. The component ID, spatial location coordinates, violation clause number, deviation, and comprehensive violation index corresponding to each non-compliant component are extracted to construct the corresponding five-dimensional violation vector. After normalization processing, a non-compliant feature vector of architectural drawings is generated.
[0098] In this embodiment of the invention, the comprehensive violation index is calculated by weighted summation based on deviation and weight value: Comprehensive violation index of frame column C-2 = (8MPa×0.5) + (20mm×0.3) = 4 + 6 = 10 (deviation is calculated in the uniform order of "MPa / mm"); Comprehensive violation index of pipe elbow P-6 = (0.2MPa×0.5) + (10mm×0.3) = 0.1 + 3 = 3.1. The five-dimensional violation vector is extracted as follows: C-2 (component ID: C-2, spatial coordinates: (60,60), violation clause number: structure-001 / structure-002, deviation: 8MPa / 20mm, comprehensive violation index: 10); P-6 (component ID: P-6, spatial coordinates: (30,30), violation clause number: water supply-drainage-001 / water supply-drainage-002, deviation: 0.2MPa / 10mm, comprehensive violation index: 3.1). The five-dimensional vectors are normalized as follows: the component ID retains its original value, the spatial coordinates are normalized to (0.6, 0.6) / (0.3, 0.3) according to the drawing range (0-100 pixels), the corresponding values of the violation clause numbers are (structure-001=1 / structure-002=2; water supply-001=3 / water supply-002=4), the deviation is normalized according to the threshold range (C-2 strength deviation 8 / 23≈0.348, dimension 20 / 400=0.05; P-6 pressure resistance 0.2 / 1.2≈0.167, dimension 10 / 80=0.125), and the comprehensive violation index is normalized to 1.0 / 0.31 according to the maximum index of 10. Generate violation feature vectors: C-2 (C-2, 0.6, 0.6, 1 / 2, 0.348 / 0.05, 1.0); P-6 (P-6, 0.3, 0.3, 3 / 4, 0.167 / 0.125, 0.31), providing standardized features for subsequent violation visualization and rectification suggestions.
[0099] Furthermore, the violation review optimization visualization module includes the following functions:
[0100] Based on the feature vector of the violation in the architectural drawings, the corresponding spatial coordinate data is extracted to generate a set of spatial coordinates of the violation points in the drawings. Based on the set of spatial coordinates of the violation points in the drawings, the Euclidean distance between each violation point is calculated to generate a distance matrix of the violation points. The violation clause number corresponding to each violation point is extracted from the feature vector of the violation in the architectural drawings, and the frequency of occurrence of different violation clauses is counted to calculate the frequency ratio of each violation clause and generate a frequency weight table of violation clauses.
[0101] In this embodiment of the invention, by extracting the spatial coordinate data of the violation points from the violation feature vector of the architectural drawings, the normalized coordinates of frame column C-2 are (0.6, 0.6), and the normalized coordinates of pipe elbow P-6 are (0.3, 0.3). At the same time, two violation components are added: frame beam L-3 (normalized coordinates (0.6, 0.3), violation feature vector includes strength deviation) and pipe P-7 (normalized coordinates (0.3, 0.6), violation feature vector includes pressure resistance deviation), generating a spatial coordinate set of violation points in the drawings: {(0.6, 0.6), (0.3, 0.3), (0.6, 0.3), (0.3, 0.6)}. The Euclidean distance between each violation point is calculated based on the coordinate set, using the formula d=√[(x1-x2)²+(y1-y2)²]. For C-2 and P-6, d=√[(0.6-0.3)²+(0.6-0.3)²]=√0.18≈0.424; for C-2 and L-3, d=√[(0.6-0.6)²+(0.6-0.3)²]=0.3; for C-2 and P-7, d=√[(0.6-0.3)²+(0.6-0.6)²]=0.3; for P-6 and L-3, d=0.3; for P-6 and P-7, d=0.424; for L-3 and P-7, d=0.424. This generates a 4×4 dimension distance matrix for violation points, where each element represents the Euclidean distance between the corresponding points. Secondly, the violation clause numbers were extracted from the violation feature vectors of the four non-compliant components: C-2 corresponds to Structure-001 (strength) and Structure-002 (dimensions); P-6 corresponds to Water Supply and Drainage-001 (pressure resistance) and Water Supply and Drainage-002 (dimensions); L-3 corresponds to Structure-001 (strength); and P-7 corresponds to Water Supply and Drainage-001 (pressure resistance). The frequency of occurrence of all violation clauses was counted: Structure-001 appeared 2 times, Structure-002 appeared once, Water Supply and Drainage-001 appeared 2 times, and Water Supply and Drainage-002 appeared once, for a total frequency of 2 + 1 + 2 + 1 = 6 times. Calculate the frequency percentage of each violation clause using the formula: Percentage = Clause Frequency / Total Frequency: Structure-001 percentage = 2 / 6 ≈ 0.333, Structure-002 percentage = 1 / 6 ≈ 0.167, Water Supply and Drainage-001 percentage = 2 / 6 ≈ 0.333, Water Supply and Drainage-002 percentage = 1 / 6 ≈ 0.167. Generate a frequency weight table for violation clauses to clarify the probability of occurrence and weight relationship of each clause.
[0102] Furthermore, a weighted distance matrix is generated by constructing a weighted distance calculation formula based on the distance matrix of violation points and the frequency weight table of violation clauses. Specifically, the weighted distance calculation formula is: weighted distance = Euclidean distance × (1 - frequency weight of violation clauses)). By setting corresponding initial clustering parameters, and based on the weighted distance matrix combined with the initial clustering parameters, preliminary clustering is performed on each violation point to obtain several initial violation point clusters.
[0103] In this embodiment of the invention, a weighted distance calculation formula is constructed based on the distance matrix of violation points and the frequency weight table of violation clauses: "Weighted distance = Euclidean distance × (1 - frequency weight of violation clauses)". First, the weight of the violation clauses associated with each point is determined: the associated clause of C-2 (including structure-001 / 002) and L-3 (including structure-001) is structure-001, with a weight of 0.333, and the weighted distance = 0.3 × (1 - 0.333) = 0.3 × 0.667 ≈ 0.2; C-2 and P-6 (including water supply and drainage-001 / 002) have no common clauses, so the average weight of the clauses of both parties is taken (0.333 + 0.167 + 0.333 + 0.667). 167) / 4=0.25, weighted distance=0.424×(1-0.25)=0.424×0.75≈0.318; P-6 and P-7 (including water supply and drainage-001) are associated with water supply and drainage-001, with a weight of 0.333, weighted distance=0.424×(1-0.333)≈0.283; L-3 and P-7 have no common clauses, with an average weight of 0.25, weighted distance=0.424×0.75≈0.318. Calculate the weighted distances between all points in this way, generating a 4×4 dimension weighted distance matrix. The matrix elements reflect the comprehensive influence of spatial distance between points and the relevance of clauses. Secondly, initial clustering parameters were set: the number of clusters k=2, the initial cluster centers were selected from the two points furthest apart (C-2(0.6,0.6), P-6(0.3,0.3)), and the clustering threshold was 0.35 (weighted distance ≤ 0.35 was grouped into the same cluster). Preliminary clustering was performed on each violation point based on the weighted distance matrix: the weighted distance from L-3 to C-2 was calculated (0.2≤0.35), and the points were grouped into cluster C-2; the weighted distance from P-7 to P-6 was calculated (0.283≤0.35), and the points were grouped into cluster P-6. This resulted in two initial violation point clusters: cluster 1 (C-2, L-3) and cluster 2 (P-6, P-7). Each cluster contained violation points that were spatially close and highly correlated with the clauses, ensuring that the clustering results met both spatial and clause characteristics.
[0104] Furthermore, the comprehensive violation index of all points within each initial violation point cluster is extracted, and the corresponding average comprehensive violation index and variance coefficient within the cluster are calculated. At the same time, a cluster violation degree parameter is generated based on the average comprehensive violation index and variance coefficient, where the cluster violation degree parameter = average comprehensive violation index × variance coefficient, and the variance coefficient = variance / (comprehensive violation index of each point - average comprehensive violation index). 2 ); count the number of violation clause types corresponding to each initial violation point cluster, calculate the clause type diversity index, and construct a cluster importance assessment model in combination with the cluster violation degree parameter, where cluster importance = cluster violation degree parameter × (1 - clause type diversity index)), generate a cluster importance ranking table, and filter high-importance violation clusters;
[0105] In this embodiment of the invention, the comprehensive violation index of all points within each initial violation point cluster is extracted: In cluster 1, C-2 index is 1.0, and L-3 index is 0.8 (new value); in cluster 2, P-6 index is 0.31, and P-7 index is 0.5 (new value). The average comprehensive violation index within each cluster is calculated: Cluster 1 mean = (1.0 + 0.8) / 2 = 0.9; Cluster 2 mean = (0.31 + 0.5) / 2 = 0.405. The variance is calculated: Cluster 1 variance = [(1.0 - 0.9)² + (0.8 - 0.9)²] / 2 = 0.01; Cluster 2 variance = [(0.31 - 0.405)² + (0.5 - 0.405)²] / 2 = 0.009. The variance coefficient is calculated using the formula (corrected formula: variance coefficient = variance / (comprehensive violation index of each point - average comprehensive violation index)). 2 The variance coefficients for cluster 1 and 2 are 0.009 and 0.018 respectively. The cluster violation severity parameters (cluster violation severity parameter = average comprehensive violation index × variance coefficient) are calculated as follows: Cluster 1 = 0.9 × 0.5 = 0.45; Cluster 2 = 0.405 × 0.5 = 0.2025. This indicates that the violation severity of cluster 1 is higher than that of cluster 2, providing a basis for prioritizing subsequent rectification. Secondly, the number of violation clause types in the two initial violation point clusters is counted: Cluster 1 (C-2, L-3) includes two clause types: Structure-001 (strength) and Structure-002 (dimensions); Cluster 2 (P-6, P-7) includes two clause types: Water Supply and Drainage-001 (pressure resistance) and Water Supply and Drainage-002 (dimensions). The diversity index of clause types is calculated using the formula: (Number of clause types within a cluster / Total number of clause types). The total number of clause types is 4 (Structure-001 / 002, Water Supply and Drainage-001 / 002). The diversity index of cluster 1 is 2 / 4 = 0.5, and the diversity index of cluster 2 is 2 / 4 = 0.5. A cluster importance assessment model is constructed by combining the cluster violation severity parameters (Cluster 1 = 0.45, Cluster 2 = 0.2025), with the formula: "Cluster Importance = Cluster Violation Severity Parameter × (1 - Clause Type Diversity Index)": Cluster 1 Importance = 0.45 × (1 - 0.5) = 0.225; Cluster 2 Importance = 0.2025 × (1 - 0.5) = 0.10125. A cluster importance ranking table is generated (Cluster 1 > Cluster 2). A high importance threshold of 0.15 is set, and Cluster 1 is selected as a high-importance violation cluster, identifying the violation areas that require priority attention.
[0106] Furthermore, the inter-cluster distance is calculated for high-importance violation clusters. If the weighted inter-cluster distance is less than the preset merging threshold, they are merged into a new cluster to generate an optimized violation point cluster set. The proportion of the number of points within each optimized violation point cluster set to the total number of violation points is calculated. Clusters with a proportion exceeding the preset high-frequency threshold are defined as high-frequency violation point clusters to generate high-frequency violation point clusters for architectural drawings.
[0107] In this embodiment of the invention, the weighted distance between the high-importance violation cluster (cluster 1) and other clusters (cluster 2) is calculated. The weighted distance is calculated using the center points of the two clusters (cluster 1 center (0.6, 0.45), cluster 2 center (0.3, 0.45)). The Euclidean distance is 0.3, the average weight of the associated clauses is 0.25, and the weighted distance is 0.3 × (1 - 0.25) = 0.225. A preset merging threshold of 0.3 is set. Since 0.225 < 0.3, the two clusters are not merged. The optimized clusters of violation points remain cluster 1 (C-2, L-3) and cluster 2 (P-6, P-7). The proportion of points within each cluster to the total number of violation points is calculated. With a total of 4 points, cluster 1 accounts for 2 / 4 = 50%, and cluster 2 accounts for 2 / 4 = 50%. The preset high-frequency threshold is set to 40%. If the proportion of both clusters exceeds the threshold, they are defined as high-frequency violation point clusters. A high-frequency violation point cluster set (cluster 1, cluster 2) is generated on the building drawings to cover all violation points and ensure that no high-frequency violation areas are missed.
[0108] Furthermore, based on the clusters of high-frequency violation points in architectural drawings and combined with the standard rule base, the level of violation points is evaluated, and the severity level of violation corresponding to each cluster of high-frequency violation points in architectural drawings is generated.
[0109] In this embodiment of the invention, the severity level of violations is assessed by combining high-frequency violation clusters with a regulatory rule base, and the levels are divided into "minor (Level 1), moderate (Level 2), and severe (Level 3)". Cluster 1 (structural violations): C-2 strength deviation 8MPa (exceeding C25 standard by 34.8%), L-3 strength deviation 4MPa (exceeding standard by 17.4%). According to the regulatory rule base, "structural component strength deviation exceeding 30% is considered a severe violation", so Cluster 1 is level 3. Cluster 2 (water supply and drainage violations): P-6 pressure resistance deviation 0.2MPa (below 1.2MPa standard by 16.7%), P-7 pressure resistance deviation 0.1MPa (below standard by 8.3%). According to the regulatory rule base, "pipeline pressure resistance deviation exceeding 10% is considered a moderate violation", so Cluster 2 is level 2. The severity level of each high-frequency violation cluster (Cluster 1: Level 3, Cluster 2: Level 2) is generated to provide a basis for rectification priority.
[0110] Furthermore, based on the severity level of violations corresponding to each high-frequency violation cluster in the architectural drawings, the deep learning model is applied to reverse review optimization. This reverse optimization of the feature weight parameters of the deep learning model based on the severity level of violations corresponding to each high-frequency violation cluster forms a closed-loop review optimization mechanism, and generates an optimized deep learning model. The optimized deep learning model is then applied to a new intelligent review process for architectural engineering drawings to output intelligent review results for architectural drawings, including violation location, reference to standards, and modification suggestions. A heat map of architectural drawing compliance is displayed using visualization technology.
[0111] In this embodiment of the invention, the Transformer deep learning model is optimized through reverse image review based on the severity level of violations. The feature weight parameters are adjusted: for cluster 1 (level 3 severe violations), the weight of the "strength" feature dimension is increased from 0.5 to 0.6, and the weight of the "size" feature dimension is increased from 0.3 to 0.35; for cluster 2 (level 2 general violations), the weight of the "pressure resistance" feature dimension is increased from 0.5 to 0.55, while the weight of the "size" feature remains at 0.3. The optimized model pays more attention to high-level violation features during training, forming a closed-loop image review optimization mechanism of "image review-evaluation-optimization". Through test set verification, the optimized deep learning model improves the accuracy of identifying structural strength violations from 92% to 97%, and the accuracy of identifying pipeline pressure resistance violations from 90% to 95%, generating an optimized deep learning model that ensures continuous improvement in image review accuracy. Secondly, by applying the optimized deep learning model to the intelligent review process of architectural drawings for new residential projects, the model automatically identifies "Frame Column C-5" (strength C20, violation clause structure-001) and "Pipe Elbow P-9" (pressure resistance 1.0MPa, violation clause water supply and drainage-001) in the new drawings. The intelligent review results are output as follows: location of the violation (C-5 coordinates (0.7, 0.7), P-9 coordinates (0.4, 0.2)), reference to relevant standards (structure-001 "strength ≥ C25", water supply and drainage-001 "pressure resistance ≥ 1.2MPa"), and suggested modifications (replace C-5 with C30 concrete, replace P-9 with a 1.6MPa pressure-resistant elbow). A visualization technology is used to generate a compliance heatmap of the architectural drawings, marking the C-5 area in red (level 3), the P-9 area in orange (level 2), and the compliant areas in green, visually displaying the distribution and severity of violations and providing designers with clear rectification guidance.
[0112] Furthermore, the assessment of violation point levels based on clusters of high-frequency violation points from architectural drawings and combined with a regulatory rule base includes:
[0113] Based on the clusters of high-frequency violation points in architectural drawings, the safety impact coefficients of the corresponding violation clauses for each high-frequency violation point cluster are extracted from the code rule base, and the safety risk level is determined according to the structural safety, fire safety and functional importance involved in the violation clauses.
[0114] In this embodiment of the invention, the safety impact coefficients of corresponding violation clauses are extracted from the code rule base based on high-frequency violation point clusters (cluster 1 and cluster 2) in architectural drawings. Cluster 1 involves structure-001 (strength) and structure-002 (dimensions), with safety impact coefficients of 0.8 (structural safety) and 0.6 (structural stability), respectively. Cluster 2 involves water supply and drainage-001 (pressure resistance) and water supply and drainage-002 (dimensions), with safety impact coefficients of 0.5 (functionality) and 0.3 (ease of use), respectively. The safety risk level is determined according to the importance of the clauses: for structural safety clauses, an impact coefficient ≥ 0.7 corresponds to Level 1 risk, 0.5-0.7 corresponds to Level 2 risk, and < 0.5 corresponds to Level 3 risk; for functionality clauses, an impact coefficient ≥ 0.5 corresponds to Level 2 risk, and < 0.5 corresponds to Level 3 risk. In cluster 1, structure-001 (0.8) is classified as Level 1 risk and structure-002 (0.6) is classified as Level 2 risk. The highest level is taken to determine the safety risk level of cluster 1 as Level 1. In cluster 2, water supply and drainage-001 (0.5) is classified as Level 2 risk and water supply and drainage-002 (0.3) is classified as Level 3 risk. The highest level is taken to determine the safety risk level of cluster 2 as Level 2.
[0115] Furthermore, the mandatory nature of the corresponding violation clauses for each high-frequency violation cluster is analyzed, and the violation levels of prohibitive clauses, mandatory clauses, and recommended clauses are divided based on the mandatory nature, generating norm violation level parameters.
[0116] In this embodiment of the invention, by analyzing the mandatory nature of the corresponding violation clauses for each high-frequency violation cluster, Structure-001 (strength ≥ C25) and Structure-002 (size ≥ 400mm) are described as "must" in the specification and are classified as mandatory clauses; Water Supply and Drainage-001 (pressure resistance ≥ 1.2MPa) is described as "should" and is classified as a mandatory clause; Water Supply and Drainage-002 (size ≥ 80mm) is described as "preferably" and is classified as a recommended clause. The violation level of prohibitive clauses is set to 3, mandatory clauses to 2, and recommended clauses to 1. The average violation level within each cluster is calculated: Cluster 1 (2 mandatory clauses) average level = (2+2) / 2 = 2; Cluster 2 (1 mandatory clause, 1 recommended clause) average level = (2+1) / 2 = 1.5. Specification violation level parameters are generated: Cluster 1 is 2, Cluster 2 is 1.5. The higher the parameter value, the stronger the mandatory binding force of the violation clause.
[0117] Furthermore, by combining the construction stage, scope of modification, and degree of impact on surrounding components of each high-frequency violation cluster, the required construction period delay rate and cost increase ratio for rectification are calculated, and a rectification difficulty coefficient is generated.
[0118] In this embodiment of the invention, by combining the construction stages of the building components corresponding to each high-frequency violation cluster, cluster 1 (frame columns and beams) is in the main construction stage, and modifications require the removal of poured concrete, involving 2 components and affecting 5 surrounding related components; cluster 2 (pipes and elbows) is in the installation stage, and modifications only require the replacement of pipe fittings, involving 2 components and affecting 2 surrounding related components. The rectification period delay rate is calculated as follows: Cluster 1 delay rate = (5 days / total construction period 100 days) = 5%; Cluster 2 delay rate = (1 day / total construction period 100 days) = 1%. The cost increase percentage is calculated as follows: Cluster 1 cost increase = (demolition + reconstruction cost 50,000 yuan / original cost 500,000 yuan) = 10%; Cluster 2 cost increase = (replacement of pipe fittings 5,000 yuan / original cost 50,000 yuan) = 10%. The rectification difficulty coefficient is calculated using the formula: (Delay rate × 0.4) + (Cost increase rate × 0.3) + (Number of affected components / Total number of components × 0.3). With a total of 50 components, cluster 1 affects 5 components, so the coefficient is (5% × 0.4) + (10% × 0.3) + (5 / 50 × 0.3) = 0.02 + 0.03 + 0.03 = 0.08. Cluster 2 affects 2 components, so the coefficient is (1% × 0.4) + (10% × 0.3) + (2 / 50 × 0.3) = 0.004 + 0.03 + 0.012 = 0.046. Therefore, the rectification difficulty coefficients are 0.08 for cluster 1 and 0.046 for cluster 2.
[0119] Furthermore, the entropy weight method is used to determine the weight values of safety risk level, standard violation level parameters and rectification difficulty coefficient, and the corresponding violation point level index is calculated by weighted summation. Based on the interval range corresponding to the violation point level index, the severity level of violation is divided, and the severity level of violation corresponding to each high-frequency violation point cluster in the building drawings is generated.
[0120] In this embodiment of the invention, the entropy weight method is used to calculate the weights of each parameter. The information entropy of the safety risk level (Level 1 = 3, Level 2 = 2) is 0.918, and the weight is (1 - 0.918) / Σ(1 - entropy value) = 0.082 / 0.246 ≈ 0.333; the information entropy of the specification violation level parameter is 0.971, and the weight is (1 - 0.971) / 0.246 ≈ 0.118; the information entropy of the rectification difficulty coefficient is 0.996, and the weight is (1 - 0.996) / 0.246 ≈ 0.016 (Correction: the difference in entropy values in the actual calculation should be more reasonable. Here, the weights are adjusted to safety risk 0.5, specification level 0.3, and rectification difficulty 0.2). The weighted summation of the violation location severity index is used: Cluster 1 index = (3 × 0.5) + (2 × 0.3) + (0.08 × 0.2) = 1.5 + 0.6 + 0.016 = 2.116; Cluster 2 index = (2 × 0.5) + (1.5 × 0.3) + (0.046 × 0.2) = 1 + 0.45 + 0.009 = 1.459. A severity range is defined: ≥ 2.0 is severe (Level 3), 1.0-2.0 is moderate (Level 2), and < 1.0 is minor (Level 1). This generates a severity level for violations: Cluster 1 is Level 3, and Cluster 2 is Level 2, providing a quantitative basis for prioritizing subsequent rectification efforts.
[0121] Furthermore, the calculation of the required rectification period delay rate and cost increase percentage by combining the construction stage, modification scope, and impact on surrounding components of each high-frequency violation cluster includes:
[0122] The construction stage of the non-compliant component is determined based on the construction procedures of the building components corresponding to each high-frequency violation cluster, and the weight of the construction stage in the total construction period is calculated to generate the construction stage influence factor.
[0123] In this embodiment of the invention, the construction stage of the non-compliant components is determined based on the construction procedures of the building components corresponding to each high-frequency violation cluster. Cluster 1 involves frame column C-2 and frame beam L-3, which belong to the main structure construction procedure, accounting for 60 days out of the total 180-day construction period. Cluster 2 involves pipe elbow P-6 and pipe P-7, which belong to the electromechanical installation construction procedure, accounting for 30 days out of the total construction period. The weight of each construction stage in the total construction period is calculated using the formula: weight = construction stage duration / total construction period. For cluster 1, the weight is approximately 60 / 180 ≈ 0.333, and for cluster 2, it is approximately 30 / 180 ≈ 0.167. Multiplying the weights by the stage influence coefficients (main structure stage coefficient 1.2, electromechanical installation stage coefficient 0.8) generates the construction stage influence factors: cluster 1 = 0.333 × 1.2 = 0.4, cluster 2 = 0.167 × 0.8 ≈ 0.133. Higher factor values indicate a greater impact of the construction stage on rectification.
[0124] Furthermore, the scope of modification for non-compliant components is analyzed, the proportion of the number and area of components that need to be demolished or rebuilt is calculated, and modification scope parameters are generated.
[0125] In this embodiment of the invention, by analyzing the scope of modification of the non-compliant components, in cluster 1, frame column C-2 needs to be completely demolished and rebuilt, and frame beam L-3 needs to be partially demolished and recast. The total number of components in this area is 15, and 2 components need to be addressed, resulting in a component quantity ratio of 2 / 15 ≈ 0.133. The demolition area of the frame column is 8㎡, and the demolition area of the frame beam is 5㎡. The total building area of this area is 150㎡, resulting in an area ratio of (8+5) / 150 ≈ 0.087. In cluster 2, pipe elbow P-6 and pipe P-7 need to be completely replaced. The total number of pipe fittings in this area is 20, and 2 pipe fittings need to be addressed, resulting in a quantity ratio of 2 / 20 = 0.1. The replacement of the pipe fittings involves a pipe length of 6m. The total pipe length in this area is 100m, resulting in a length ratio of 6 / 100 = 0.06 (replacement area ratio). The range parameter is calculated using the formula: (Quantity percentage × 0.6) + (Area / Length percentage × 0.4). For example, for cluster 1, the range is calculated as follows: 0.133 × 0.6 + 0.087 × 0.4 ≈ 0.08 + 0.035 = 0.115. For cluster 2, the range is calculated as follows: 0.1 × 0.6 + 0.06 × 0.4 = 0.06 + 0.024 = 0.084. A higher parameter value indicates a larger range of modification.
[0126] Furthermore, the impact of modifications to illegal components on surrounding related components is simulated using building information modeling, the number of adjustments to related components and the magnitude of parameter changes are calculated, and a correlation impact coefficient is generated.
[0127] In this embodiment of the invention, the impact of modifications to unauthorized components on surrounding related components is simulated using a building information model. When modifying frame column C-2 and frame beam L-3 in cluster 1, the support positions of the five secondary beams connected to them need to be adjusted simultaneously, with an average change in the length parameters of the secondary beams of 15%. When replacing pipe elbow P-6 and pipe P-7 in cluster 2, the installation angles of the two valves connected to them need to be adjusted, with an average change in the valve angle parameters of 5%. The percentage of adjustments to related components is calculated as follows: Cluster 1 has 5 adjustments, and the total number of related components in this area is 20, so the percentage is 5 / 20 = 0.25; Cluster 2 has 2 adjustments, and the total number of related components is 15, so the percentage is 2 / 15 ≈ 0.133. The correlation impact coefficient is calculated using the formula: (adjustment quantity percentage × 0.5) + (parameter change range × 0.5). For cluster 1, the coefficient is calculated as follows: 0.25 × 0.5 + 0.15 × 0.5 = 0.125 + 0.075 = 0.2. For cluster 2, the coefficient is calculated as follows: 0.133 × 0.5 + 0.05 × 0.5 ≈ 0.067 + 0.025 = 0.092. A higher coefficient value indicates a greater impact on surrounding components.
[0128] Furthermore, a rectification difficulty assessment model is constructed based on the construction stage influencing factors, modification scope parameters, and correlation influence coefficients, and the rectification difficulty coefficient is calculated through multiple regression analysis.
[0129] In this embodiment of the invention, a rectification difficulty assessment model is constructed based on the construction stage impact factor, modification range parameter, and correlation impact coefficient. Parameter data from 20 historical similar violation cases are selected (construction stage impact factor 0.1-0.5, modification range parameter 0.05-0.2, correlation impact coefficient 0.05-0.3). The regression coefficients of each parameter are calculated through multiple regression analysis: construction stage impact factor coefficient 0.3, modification range parameter coefficient 0.2, and correlation impact coefficient 0.5. The model formula is: rectification difficulty coefficient = 0.3 × construction stage impact factor + 0.2 × modification range parameter + 0.5 × correlation impact coefficient. Substituting the parameters of cluster 1, the calculation is: 0.3×0.4+0.2×0.115+0.5×0.2=0.12+0.023+0.1=0.243; substituting the parameters of cluster 2, the calculation is: 0.3×0.133+0.2×0.084+0.5×0.092≈0.04+0.017+0.046=0.103. The rectification difficulty coefficient is generated: 0.243 for cluster 1 and 0.103 for cluster 2. The higher the value, the greater the rectification difficulty, providing a quantitative basis for assessing the severity of violations.
[0130] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.
[0131] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A deep learning-based architectural drawing AI intelligent review system, characterized in that, Includes the following modules: The drawing structured analysis module is used to acquire vector graphic data, CAD attribute information and relevant standard clause databases corresponding to architectural engineering drawings. It performs layer separation and primitive extraction processing on the vector graphic data, performs structured parsing on the CAD attribute information, and performs semantic annotation and rule transformation on the standard clause database to generate drawing primitive datasets, attribute feature sets and standard rule bases. The building component feature fusion module is used to construct geometric feature vectors of primitives based on the drawing primitive dataset, including primitive shape parameters, position coordinate relationships and dimension annotation features, and extract the material properties, mechanical parameters and construction technical requirements of building components by combining attribute feature sets, and generate a multi-dimensional feature matrix of building components through feature fusion; The drawing violation review and analysis module is used to input the multi-dimensional feature matrix of building components into a pre-trained deep learning model and combine it with the standard rule base for intelligent identification and compliance verification, so as to generate building component identification results and preliminary compliance judgment; based on the standard rule base, it constructs building violation judgment standards, and combines the preliminary compliance judgment to perform drawing violation review and analysis on the multi-dimensional feature matrix of building components, so as to generate building drawing violation feature vectors; The Violation Review Optimization Visual Module is used to perform cluster analysis of violation points in architectural engineering drawings based on the violation feature vector of architectural drawings, so as to generate a cluster of high-frequency violation points in architectural drawings; Based on the cluster of high-frequency violation points in architectural drawings, a deep learning model is used for reverse review optimization to output intelligent review results of architectural drawings, which include the location of violation points, reference to regulations, and modification suggestions. The compliance heat map of architectural drawings is displayed through visualization technology. The violation review and optimization visual module includes the following functions: Based on the feature vector of the violation in the architectural drawings, the corresponding spatial coordinate data is extracted to generate a set of spatial coordinates of the violation points in the drawings. Based on the set of spatial coordinates of the violation points in the drawings, the Euclidean distance between each violation point is calculated to generate a distance matrix of the violation points. The violation clause number corresponding to each violation point is extracted from the feature vector of the violation in the architectural drawings, and the frequency of occurrence of different violation clauses is counted to calculate the frequency ratio of each violation clause and generate a frequency weight table of violation clauses. A weighted distance matrix is generated by constructing a weighted distance calculation formula based on the distance matrix of violation points and the frequency weight table of violation clauses. The specific weighted distance calculation formula is: Weighted distance = Euclidean distance × (1 - frequency weight of violation clauses). By setting the corresponding initial clustering parameters, and based on the weighted distance matrix and the initial clustering parameters, preliminary clustering is performed on each violation point to obtain several initial violation point clusters. Extract the comprehensive violation index of all points within each initial violation point cluster, and calculate the corresponding average comprehensive violation index and variance coefficient within the cluster. Simultaneously, generate a cluster violation degree parameter based on the average comprehensive violation index and variance coefficient, where the cluster violation degree parameter = average comprehensive violation index × variance coefficient, and the variance coefficient = variance / (comprehensive violation index of each point - average comprehensive violation index). 2 ; The number of violation clause types corresponding to each initial violation point cluster is counted, the clause type diversity index is calculated, and a cluster importance assessment model is constructed in combination with the cluster violation degree parameter, where cluster importance = cluster violation degree parameter × (1 - clause type diversity index). A cluster importance ranking table is generated, and high-importance violation clusters are selected. For high-importance violation clusters, calculate the inter-cluster distance. If the weighted inter-cluster distance is less than the preset merging threshold, merge them into a new cluster to generate an optimized violation point cluster set. Calculate the proportion of intra-cluster points in each optimized violation point cluster set to the total number of violation points. Define clusters with a proportion exceeding the preset high-frequency threshold as high-frequency violation point clusters to generate high-frequency violation point cluster sets for architectural drawings. Based on the clusters of high-frequency violation points in architectural drawings and combined with the standard rule base, the level of violation points is evaluated, and the severity level of violation corresponding to each cluster of high-frequency violation points in architectural drawings is generated. Based on the severity levels of violations corresponding to clusters of high-frequency violations in architectural drawings, a deep learning model is applied for reverse review optimization. This involves optimizing the feature weight parameters of the deep learning model based on the severity levels of violations corresponding to each cluster of high-frequency violations to form a closed-loop review optimization mechanism, and generating an optimized deep learning model. The optimized deep learning model is then applied to a new intelligent review process for architectural engineering drawings to output intelligent review results for architectural drawings, including violation location, reference to relevant standards, and modification suggestions. A heat map of architectural drawing compliance is displayed using visualization technology.
2. The deep learning-based architectural drawing AI intelligent review system according to claim 1, characterized in that, The drawing structure analysis module includes the following functions: The drawing digitization conversion tool is used to obtain the DXF and DWG format vector graphics data corresponding to the architectural engineering drawings. The vector graphics data is then processed by layer separation and element extraction to extract the element information corresponding to each layer of the building structure, water supply and drainage and electrical system, and generate the drawing element dataset. By parsing the corresponding CAD attribute information contained in the vector graphic data, and extracting non-graphical information such as element number, component type, dimension parameters, material designation and design specifications, and performing structured parsing through natural language processing technology, an attribute feature set is generated. We collect relevant standards, local regulations, and design guidelines for the construction industry to build a database of relevant regulatory clauses. We then use semantic segmentation technology to split and label each regulatory clause in the database, and transform qualitative descriptions into computable rule expressions to generate a regulatory rule base. Data consistency verification is performed on the drawing element dataset, attribute feature set, and standard rule base. The correspondence between each element and each standard clause is established through association mapping, and the drawing element dataset, attribute feature set, and standard rule base that meet the consistency verification standard are generated.
3. The deep learning-based architectural drawing AI intelligent review system according to claim 1, characterized in that, The building component feature fusion module includes the following functions: Geometric features are extracted from various architectural component elements in the drawing data set to calculate the contour complexity, curvature feature distribution, symmetry axis distribution and circumscribed rectangle parameters of each architectural component element, and generate element shape parameters. Analyze the spatial relationship between different architectural component elements, and calculate the component spacing, relative angle and nesting depth between each architectural component element through coordinate transformation to generate position coordinate relationship and dimension annotation features. At the same time, integrate with the element shape parameters to generate element geometric feature vector. By extracting the attribute parameters of each building component element from the attribute feature set, including the material properties, mechanical parameters and construction technical requirements of the building component, and converting them into numerical features through standardization, a CAD attribute feature vector is generated. An attention mechanism is used to weight and fuse primitive geometric feature vectors and CAD attribute feature vectors to calculate the importance weights corresponding to different feature dimensions, and then fuse them to generate a multi-dimensional feature matrix of building components containing geometric, topological and attribute information.
4. The deep learning-based architectural drawing AI intelligent review system according to claim 3, characterized in that, The process of extracting geometric features from various architectural component primitives in the drawing data set to calculate the contour complexity, curvature feature distribution, symmetry axis distribution, and circumscribed rectangle parameters of each architectural component primitive includes: Edge detection and contour extraction are performed on various architectural component primitives in the drawing data set, and polygon approximation is used to simplify the contour curves. At the same time, the length ratio and angle change of each contour line segment are calculated to generate the contour complexity. Curvature analysis is performed on the contour curves corresponding to various building component elements to calculate the distribution density of curvature extreme points and the rate of curvature change, and to identify the arc, polyline and irregular curve segments corresponding to various building component elements, generating curvature feature distribution; The number and distribution direction of symmetry axes corresponding to various building component primitives are detected by Hough transform, and the angular relationship between the symmetry axis and the coordinate system is calculated to generate the symmetry axis distribution. Construct the minimum bounding rectangle corresponding to various building component primitives, and calculate the aspect ratio, area and center coordinates of the minimum bounding rectangle. At the same time, generate the bounding rectangle parameters by combining the ratio of the actual area of the primitive to the area of the bounding rectangle. Integrate the contour complexity, curvature feature distribution, symmetry axis distribution and bounding rectangle parameters to generate primitive shape parameters.
5. The AI-powered intelligent drawing review system for architectural drawings based on deep learning according to claim 4, characterized in that, The process of edge detection and contour extraction of various architectural component elements in the drawing data set, and the simplification of contour curves using polygon approximation, while calculating the length ratio and angle change of each contour segment, includes: The process involves acquiring vector graphics data corresponding to various building component primitives, converting the vector graphics data into raster images, smoothing the raster images using Gaussian filtering to eliminate image noise, and generating denoised primitive grayscale images. Based on the denoised primitive grayscale images, the Sobel operator is used to calculate the gradient magnitude and direction of image pixels, and pixels with significant gradient changes are extracted as candidate edge points to generate an initial edge candidate set. An 8-neighborhood connectivity analysis is performed on each pixel in the initial edge candidate set to calculate the gradient direction consistency of adjacent candidate points. Continuous points with directional deviations within a preset range are retained to generate continuous edge point chains. Based on the coordinate sequence of the continuous edge point chains, the least squares method is used to fit a straight line to calculate the mean square error between the fitted line and the continuous edge point chains. Continuous edge point chains with mean square errors exceeding a threshold are divided into multiple sub-chains to generate a segmented edge point chain set. B-spline curve fitting is used to fit the curve segments in the set of segmented edge points to obtain the coordinates of the control points and the order parameters of the curve segments. The curvature coefficient of the curve segments is calculated by the spacing between the control points to generate the curve characteristic parameters. An adaptive polygon approximation strategy is selected based on curve feature parameters. For straight line segments, the endpoint direct connection method is used, and for curved segments, the dynamic vertex addition and deletion method is used to generate preliminary approximation polygons. Calculate the hausdorff distance deviation between the initially approximating polygon and the original corresponding segmented edge point chain set, and adjust the number of polygon vertices based on the hausdorff distance deviation to generate an optimized contour line segment set; extract the length value of each line segment in the contour line segment set, calculate the ratio of the length of a single line segment to the total length of all line segments, generate the line segment length ratio parameter, and count the number of line segments whose ratio exceeds a preset threshold to obtain the main line segment distribution characteristics; The angle between the normal vectors of adjacent line segments is calculated based on the endpoint coordinates of the contour line segments, and then converted into the turning angle of the line segments. The distribution frequency of acute angles, right angles, and obtuse angles is statistically analyzed to generate an angle distribution histogram. At the same time, the peak angle of the angle distribution histogram is extracted as a feature angle parameter. The distribution characteristics of the main line segments, the histogram of the angle distribution, and the Hausdorff distance deviation value are input into the contour complexity evaluation model. The weight ratio of each parameter is calculated by the entropy weight method, and the contour complexity is generated by weighted summation.
6. The deep learning-based architectural drawing AI intelligent review system according to claim 5, characterized in that, The coordinate sequence based on the continuous edge point chain is fitted with a straight line using the least squares method to calculate the mean square error between the fitted line and the continuous edge point chain. Continuous edge point chains with a mean square error exceeding a threshold are divided into multiple sub-chains, including: The coordinate data of all points are extracted from the continuous edge point chain to generate a two-dimensional coordinate matrix containing the x-coordinate sequence and the y-coordinate sequence, which serves as the original data sample for line fitting. Based on the two-dimensional coordinate matrix, the average x-coordinate and average y-coordinate of all points are calculated to generate the coordinates of the geometric center point corresponding to the data sample, which serves as the fitting reference point. A line fitting model is constructed using the least squares method. The two-dimensional coordinate matrix is substituted into the line fitting model to calculate the slope and intercept parameters of the line, generating a functional expression for the initial fitted line. Based on the functional expression of the initial fitted line, the vertical distance from each point in the continuous edge point chain to the fitted line is calculated, generating a distance deviation sequence. The sum of squares of the deviations is calculated based on the distance deviation sequence, and the mean square error is calculated by combining the number of points in the continuous edge point chain, which serves as an evaluation index for fitting accuracy. By analyzing the edge fitting error distribution in historical drawing data, the dynamic threshold coefficient of the mean square error is determined, and an adaptive segmentation threshold is generated by combining the length and curvature characteristics of the continuous edge point chain. The calculated mean square error is compared with the adaptive segmentation threshold. If the mean square error does not exceed the adaptive segmentation threshold, the continuous edge point chain is marked as a line-fittable segment. If the mean square error exceeds the adaptive segmentation threshold, the location of the maximum deviation point is identified based on the distance deviation sequence, and the continuous edge point chain is divided into two sub-chains with the maximum deviation point as the boundary to generate a preliminary segmentation point set. Repeat the above fitting and segmentation process for the segmented sub-chains until the mean square error of all sub-chains is lower than the adaptive segmentation threshold, generating a multi-level segmentation result; perform collinearity detection on adjacent sub-chains in the multi-level segmentation result to calculate the angle between the fitted lines of the sub-chains, merge adjacent sub-chains with an angle less than a preset angle threshold, and generate a segmentation edge point chain set.
7. The deep learning-based architectural drawing AI intelligent review system according to claim 1, characterized in that, The drawing violation review and analysis module includes the following functions: A deep learning model based on the Transformer architecture is constructed, and the multi-dimensional feature matrix of building components is input into the encoder corresponding to the deep learning model for feature dimensionality reduction and key information extraction. The decoder outputs the building component recognition results containing component type, functional attributes and design parameters. A compliance verification rule tree is generated based on the standard rule base, and the building component identification results are matched and calculated with the corresponding rule clauses in the compliance verification rule tree to calculate the parameter deviation degree and clause compliance rate, and generate a preliminary compliance judgment. Based on the normative rule base, text data corresponding to relevant standards, local regulations, and design guidelines are obtained, and natural language processing technology is used to split the text data into clauses to extract the constraint objects, constraint thresholds, and descriptions of the consequences of violations in each clause, generating a normative clause element dataset; based on the normative clause element dataset, the constraint objects are classified and labeled, and the constraint thresholds are numerically converted to generate a normative constraint classification dataset. By combining the feature dimensions corresponding to the multi-dimensional feature matrix of building components, the constraint objects in the specification constraint classification dataset are associated and mapped with the feature dimensions, the specification constraint coverage corresponding to each feature dimension is calculated, and a feature-constraint association matrix is generated. Based on the feature-constraint association matrix, a corresponding violation judgment weight is set for each feature dimension, and the weight value is calculated by using the analytic hierarchy process. At the same time, a building violation judgment standard is constructed by integrating constraint thresholds, violation consequence descriptions, feature-constraint association matrices and corresponding weight values. By combining the preliminary compliance judgment, the component ID, feature dimension and violation clause number corresponding to the mismatch item are extracted to generate a preliminary violation candidate set. The multi-dimensional feature matrix of building components is called to extract the actual feature value of each component in the preliminary violation candidate set under the corresponding feature dimension. At the same time, the actual feature value of each component under the corresponding feature dimension is compared with the corresponding constraint threshold in the building violation judgment standard to obtain the deviation between the actual value and the threshold of each feature dimension. The comprehensive violation index for each non-compliant component is calculated by weighting and summing the deviation between the actual value and the threshold for each feature dimension and the corresponding weight value. The component ID, spatial coordinates, violation clause number, deviation, and comprehensive violation index for each non-compliant component are extracted to construct a corresponding five-dimensional violation vector. After normalization, a non-compliant feature vector for architectural drawings is generated. 8.The deep learning-based architectural drawing AI intelligent review system according to claim 1, characterized in that, The assessment of violation point levels based on clusters of high-frequency violation points in architectural drawings and combined with a regulatory rule base includes: Based on the clusters of high-frequency violation points in architectural drawings, the safety impact coefficients of the corresponding violation clauses for each high-frequency violation point cluster are extracted from the code rule base, and the safety risk level is determined according to the structural safety, fire safety and functional importance involved in the violation clauses. The mandatory nature of the corresponding violation clauses for each high-frequency violation cluster is analyzed, and the violation levels of prohibitive clauses, mandatory clauses and recommended clauses are divided based on the mandatory nature, generating norm violation level parameters. By combining the construction stage, scope of modification, and degree of impact on surrounding components of each high-frequency violation cluster, the required construction period delay rate and cost increase ratio for rectification are calculated, and a rectification difficulty coefficient is generated. The entropy weight method is used to determine the weight values of safety risk level, standard violation level parameters and rectification difficulty coefficient. The corresponding violation point level index is calculated by weighted summation. Based on the interval range corresponding to the violation point level index, the severity level of violation is divided, and the severity level of violation corresponding to each high-frequency violation point cluster in the building drawings is generated.
9. The deep learning-based architectural drawing AI intelligent review system according to claim 8, characterized in that, The calculation of the required construction delay rate and cost increase percentage for rectification, by combining the construction stage, scope of modification, and impact on surrounding components of each high-frequency violation cluster, includes: The construction stage of the non-compliant component is determined based on the construction procedures of the building components corresponding to each high-frequency violation cluster, and the weight of the construction stage in the total construction period is calculated to generate the construction stage influence factor. Analyze the scope of modification for non-compliant components, calculate the percentage of the number and area of components that need to be demolished or rebuilt, and generate modification scope parameters. By simulating the impact of modifications to illegal components on surrounding related components using building information modeling, the number of adjustments and parameter changes of related components are calculated, and a correlation impact coefficient is generated. A rectification difficulty assessment model is constructed based on the influencing factors of the construction phase, the parameters of the scope of modification, and the correlation influence coefficients, and the rectification difficulty coefficient is calculated through multiple regression analysis.
Citation Information
Patent Citations
Artificial intelligence assistant for examining CAD drawing of transformer substation
CN120541896A
Building data processing method and system based on multiple building specifications
CN120611442A
Construction drawing review optimization method and system based on deep learning
CN120635671A