Method and device for comparing room graph model consistency of engineering drawing

By extracting and aligning the room information in PDF drawings and IFC model files and evaluating their consistency, the problem of single drawing format and incomplete review results in the prior art is solved, and a comprehensive consistency review between design drawings and architectural models is achieved.

CN120182994APending Publication Date: 2025-06-20TSINGHUA UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510242966.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The prior art processes drawing formats in construction projects in single construction formats and incomplete review results, making it difficult to ensure a high degree of consistency between design drawings and BIM models.

Method used

By obtaining PDF format drawings and IFC model files, the enclosure box information and label information of the room are extracted, and aligned under the same coordinate system. Combining the coordinate alignment results and label information, the consistency of the room information is evaluated, and the graph model consistency evaluation results are obtained.

Benefits of technology

It realizes effective review of the consistency between design drawings and architectural models in spatial layout and function, and solves the problem of single drawing format and incomplete review results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182994A_ABST
    Figure CN120182994A_ABST
Patent Text Reader

Abstract

The invention relates to a room graph model consistency comparison method and device of an engineering drawing. Comprising the steps of extracting first bounding box information and first room label information of a room based on a PDF format drawing, and extracting second bounding box information and second room label information of the room based on an IFC model file; and aligning the first bounding box information and the second bounding box information in the same coordinate system, and evaluating the consistency of the room information of the PDF format drawing and the IFC model file based on a coordinate alignment result, the first and second bounding box information and the first and second room label information to obtain a drawing-model consistency evaluation result. Therefore, by identifying and comparing the room information in the PDF drawing and the corresponding room information data in the IFC model, the problems that in the prior art, the format of the processed drawing is single, and the review result is incomplete are solved, and effective review of consistency of the design drawing and the building model in spatial layout and function is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of construction engineering, and particularly relates to a method and device for comparing the consistency of room drawing models in engineering drawings. Background Art

[0002] In the field of construction engineering, drawing-model consistency refers to the consistency between design drawings and Building Information Modeling (BIM for short). This consistency is crucial for ensuring the accuracy and efficiency of the design, construction, and operation and maintenance stages of construction projects. With the development of digital technology, BIM technology has become an indispensable part of the construction industry. It provides a three-dimensional model containing all the information of a construction project, including the geometric shape, spatial layout, material properties, etc. of the building. At the same time, design drawings, as a traditional design expression method, still play an important role in construction projects. Therefore, ensuring a high degree of consistency between design drawings and BIM models is the key to the steady progress of construction projects.

[0003] In the related art, drawing-model consistency review mainly relies on CAD (Computer Aided Design) drawings, which exist in vector format.

[0004] However, this method has a single drawing format for processing and is limited to the component level, lacking the review of the "space" dimension, resulting in incomplete review results, which urgently need to be solved. Summary of the Invention

[0005] This application provides a method and device for comparing the consistency of room drawing models to solve the problems of single drawing format processing and incomplete review results in the prior art, and to achieve an effective review of the consistency of design drawings and building models in terms of spatial layout and function.

[0006] To achieve the above object, the first aspect embodiment of this application proposes a method for comparing the consistency of room drawing models in engineering drawings, including the following steps:

[0007] Obtain the PDF (Portable Document Format) format drawings and IFC (Industry Foundation Classes) model files of the current project;

[0008] Extract the first bounding box information and the first room label information of the room based on the PDF format drawings, and extract the second bounding box information and the second room label information of the room based on the IFC model file;

[0009] Align the first bounding box information and the second bounding box information in the same coordinate system, and evaluate the consistency of the room information in the PDF format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, to obtain the drawing-model consistency evaluation result.

[0010] According to an embodiment of the present application, the aligning the first bounding box information and the second bounding box information in the same coordinate system includes:

[0011] Based on the first bounding box information and the second bounding box information, establish multiple groups of elevation corresponding relationships between the PDF format drawing and the IFC model file;

[0012] Obtain the number of vertices and the shape similarity of the space of the current project, and use the space alignment function to group and match the spaces in the PDF format drawing and the IFC model file according to the multiple groups of elevation corresponding relationships, the number of vertices of the space, and the shape similarity of the space, to obtain multiple planar space groups and a BIM model space matching list;

[0013] Generate multiple groups of space matching pairs based on the multiple planar space groups and the BIM model space matching list, and based on the multiple groups of space matching pairs, use the optimal transformation matrix to align the spaces in the PDF format drawing and the spaces in the IFC model file.

[0014] According to an embodiment of the present application, the using the space alignment function to group and match the spaces in the PDF format drawing and the IFC model file according to the multiple groups of elevation corresponding relationships, the number of vertices of the space, and the shape similarity of the space, to obtain multiple planar space groups and a BIM model space matching list includes:

[0015] Traverse the multiple groups of elevation corresponding relationships, and respectively obtain the PDF room bounding box data list and the IFC room bounding box data list for each floor of the current project;

[0016] Based on the PDF room bounding box data list, sort the spaces in the PDF format drawing according to the number of vertices of the space, and determine the planar spaces with the number of vertices in the same preset interval as the same group of planar spaces, to obtain the multiple planar space groups;

[0017] Traverse each BIM model space in the IFC room bounding box data list, determine the number of vertices of each BIM model space, determine at least one target BIM model space based on the number of vertices of each BIM model space and the preset interval, and obtain an initial screening list of BIM model spaces based on the at least one target BIM model space;

[0018] Traverse each planar space in each planar space group, and perform a reverse traversal on the initial screening list of BIM model spaces, and compare the shape similarity between each planar space in each planar space group and each target BIM model space in the initial screening list of BIM model spaces;

[0019] Use the target BIM model space whose shape similarity meets the preset conditions as the BIM model space matching the corresponding planar space, and obtain a BIM model space matching list based on the BIM model space matching the corresponding planar space.

[0020] According to an embodiment of the present application, before aligning the spaces in the PDF format drawing and the spaces in the IFC model file by using the optimal transformation matrix based on the multiple groups of space matching pairs, it further includes:

[0021] Traverse the multiple groups of space matching pairs, and respectively calculate the OBB (Oriented Bounding Box) bounding box of each planar space and the OBB bounding box of each matching BIM model space;

[0022] Calculate a transformation matrix corresponding to each group of space matching pairs according to the OBB bounding box of each planar space and the OBB bounding box of each matching BIM model space;

[0023] Use the transformation matrix to transform the OBB bounding box of the planar space in the corresponding space matching pair to the position and orientation of the OBB bounding box of the matching BIM model space to obtain the transformed planar space;

[0024] Calculate the current similarity score between the transformed planar space in each group of space matching pairs and the matching BIM model space, and respectively determine whether the current similarity score of each group of space matching pairs is greater than the historical highest score of the corresponding space matching pair;

[0025] In the case that the current similarity score of the space matching pair is greater than the historical highest score of the corresponding space matching pair, update the historical highest score to the current similarity score, and determine the transformation matrix corresponding to the space matching pair as the optimal transformation matrix.

[0026] According to an embodiment of the present application, evaluating the consistency of the room information in the PDF format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information to obtain a drawing-model consistency evaluation result includes:

[0027] Based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, evaluate the consistency of the room function names and the consistency of the room spatial positions between the PDF format drawing and the IFC model file, respectively, to obtain a room function name consistency evaluation result and a room spatial position consistency evaluation result;

[0028] According to the room function name consistency evaluation result and the room spatial position consistency evaluation result, obtain the drawing-model consistency evaluation result.

[0029] According to an embodiment of the present application, the evaluating the consistency of the room function names and the consistency of the room spatial positions between the PDF format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information to obtain a room function name consistency evaluation result and a room spatial position consistency evaluation result includes:

[0030] Determine a plurality of PDF text label bounding boxes based on the first bounding box information, and determine a plurality of IFC room bounding boxes based on the second bounding box information, and store the plurality of PDF text label bounding boxes and the plurality of IFC room bounding boxes into a preset data structure;

[0031] Traverse each IFC room bounding box in the IFC model file, and determine a target PDF text label bounding box that intersects with the current IFC room bounding box in the preset data structure;

[0032] Judge whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in a preset room function name mapping configuration file, and judge whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or calculate the length of the longest continuous common subsequence between the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box by using a dynamic programming algorithm, and judge whether the length of the longest continuous common subsequence is greater than a preset length threshold;

[0033] If the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in the preset room function name mapping configuration file, and the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or the length of the longest consecutive common subsequence is greater than the preset length threshold, it is determined that the room function names corresponding to the target PDF text label bounding box and the current IFC room bounding box are consistent.

[0034] According to an embodiment of the present application, based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, the consistency of the room function names and the consistency of the room spatial positions between the PDF format drawing and the IFC model file are evaluated, and the room function name consistency evaluation result and the room spatial position consistency evaluation result are obtained respectively. It further includes:

[0035] Determine a plurality of PDF room bounding boxes based on the first room label information, and determine the plurality of IFC room bounding boxes based on the second room label information, and store the plurality of PDF room bounding boxes and the plurality of IFC room bounding boxes into the preset data structure;

[0036] Traverse each IFC room bounding box in the IFC model file, determine the target PDF room bounding box that intersects with the current IFC room bounding box in the preset data structure, calculate the first similarity score between the target PDF room bounding box and the current IFC room bounding box, and determine whether the first similarity score is greater than the first preset threshold;

[0037] If the first similarity score is greater than the first preset threshold, it is determined that the spatial positions of the rooms corresponding to the target PDF room bounding box and the current IFC room bounding box are consistent; otherwise, compare the first similarity score with the second preset threshold, and retain the target PDF room bounding box corresponding to the first similarity score greater than the second preset threshold to obtain the retained PDF rooms.

[0038] According to an embodiment of the present application, after obtaining the retained PDF rooms, it further includes:

[0039] Determine whether the number of the retained PDF rooms is greater than the preset number;

[0040] If the number of the retained PDF rooms is greater than the preset number, take the union of the retained PDF rooms to obtain the first union result;

[0041] Traverse each IFC room bounding box in the IFC model file, calculate the second similarity score between the first union result and each IFC room bounding box respectively, compare the second similarity score with the first preset threshold, and determine that the spatial positions of the IFC rooms corresponding to the second similarity scores greater than the first preset threshold are consistent with the spatial positions of the reserved PDF rooms.

[0042] According to an embodiment of the present application, after determining whether the number of the reserved PDF rooms is greater than the preset number, it further includes:

[0043] If the number of the reserved PDF rooms is equal to the preset number, determine the target IFC room bounding boxes that intersect with the reserved PDF rooms based on the preset data structure, calculate the third similarity score between the target IFC room bounding boxes and the reserved PDF rooms, compare the third similarity score with the second preset threshold, and retain the target IFC room bounding boxes corresponding to the third similarity scores greater than the second preset threshold to obtain the reserved IFC rooms;

[0044] Determine whether the number of the reserved IFC rooms is greater than the preset number;

[0045] If the number of the reserved IFC rooms is greater than the preset number, take the union of the reserved IFC rooms to obtain a second union result, calculate the fourth similarity score between the second union result and the reserved PDF rooms, and determine whether the fourth similarity score is greater than the first preset threshold;

[0046] If the fourth similarity score is greater than the first preset threshold, it is determined that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are consistent.

[0047] According to an embodiment of the present application, after determining whether the number of the reserved IFC rooms is greater than the preset number, it further includes:

[0048] If the number of the reserved IFC rooms is equal to the preset number, it is determined that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are not consistent.

[0049] According to the room drawing - model consistency comparison method of the engineering drawing proposed in the embodiments of the present application, by obtaining the PDF drawing and the IFC model file from the current project, the first bounding box and the first room label information of the room in the PDF drawing, as well as the second bounding box and the second room label information of the room in the IFC model can be extracted. After aligning the first bounding box information and the second bounding box information in the same coordinate system, combining the coordinate alignment result, the bounding box information, and the room label information, the room information consistency between the PDF drawing and the IFC model is evaluated to obtain the drawing - model consistency evaluation result. Thus, by identifying and comparing the room information in the PDF drawing with the corresponding room information data in the IFC model, the problems of the single drawing format processed in the prior art and the incomplete review results are solved, and an effective review of the consistency of the design drawing and the building model in terms of spatial layout and function is realized.

[0050] To achieve the above - mentioned object, an embodiment of the second aspect of the present application proposes a room drawing - model consistency comparison device for engineering drawings, including:

[0051] An acquisition module, configured to acquire the PDF - format drawing and the IFC model file of the current project;

[0052] An extraction module, configured to extract the first bounding box information and the first room label information of the room based on the PDF - format drawing, and extract the second bounding box information and the second room label information of the room based on the IFC model file;

[0053] An evaluation module, configured to align the first bounding box information and the second bounding box information in the same coordinate system, and evaluate the consistency of the room information of the PDF - format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, so as to obtain the drawing - model consistency evaluation result.

[0054] According to an embodiment of the present application, the evaluation module includes:

[0055] A establishing unit, configured to establish multiple groups of elevation corresponding relationships between the PDF - format drawing and the IFC model file based on the first bounding box information and the second bounding box information;

[0056] A first obtaining unit, configured to obtain the number of vertices of the space of the current project and the shape similarity of the space, and use the space alignment function to group and match the spaces in the PDF - format drawing and the IFC model file according to the multiple groups of elevation corresponding relationships, the number of vertices of the space, and the shape similarity of the space, so as to obtain multiple plane - space groups and a BIM - model space matching list;

[0057] An alignment unit, configured to generate multiple groups of space matching pairs based on the multiple grouped planar spaces and the BIM model space matching list, and align the spaces in the PDF format drawing and the spaces in the IFC model file based on the multiple groups of space matching pairs by using an optimal transformation matrix.

[0058] According to an embodiment of the present application, the first obtaining unit is specifically configured to:

[0059] Traverse the multiple groups of elevation corresponding relationships, and respectively obtain the PDF room bounding box data list and the IFC room bounding box data list for each floor of the current project;

[0060] Based on the PDF room bounding box data list, sort the spaces in the PDF format drawing according to the number of vertices of the spaces, and determine the planar spaces with the number of vertices in the same preset interval as the same group of planar spaces, so as to obtain the multiple grouped planar spaces;

[0061] Traverse each BIM model space in the IFC room bounding box data list, determine the number of vertices of each BIM model space, determine at least one target BIM model space based on the number of vertices of each BIM model space and the preset interval, and obtain an initial screening list of BIM model spaces based on the at least one target BIM model space;

[0062] Traverse each planar space in each group of planar spaces, and perform a reverse traversal on the initial screening list of BIM model spaces, and compare the shape similarity between each planar space in each group of planar spaces and each target BIM model space in the initial screening list of BIM model spaces;

[0063] Use the target BIM model space whose shape similarity meets the preset condition as the BIM model space matching the corresponding planar space, and obtain a BIM model space matching list based on the BIM model space matching the corresponding planar space.

[0064] According to an embodiment of the present application, before aligning the spaces in the PDF format drawing and the spaces in the IFC model file by using the optimal transformation matrix based on the multiple groups of space matching pairs, the alignment unit is further configured to:

[0065] Traverse the multiple groups of space matching pairs, and respectively calculate the OBB bounding box of each planar space and the OBB bounding box of each matching BIM model space;

[0066] Calculate a transformation matrix corresponding to each group of space matching pairs according to the OBB bounding box of each planar space and the OBB bounding box of each matching BIM model space;

[0067] Using the transformation matrix, transform the OBB bounding box of the planar space in the corresponding space matching pair into the position and orientation of the OBB bounding box of the BIM model space that matches it, obtaining the transformed planar space;

[0068] Calculate the current similarity score between the transformed planar space in each group of space matching pairs and the corresponding BIM model space, and respectively determine whether the current similarity score of each group of space matching pairs is greater than the historical highest score of the corresponding space matching pair;

[0069] In the case where the current similarity score of the space matching pair is greater than the historical highest score of the corresponding space matching pair, update the historical highest score to the current similarity score, and determine the transformation matrix corresponding to the space matching pair as the optimal transformation matrix.

[0070] According to an embodiment of the present application, the evaluation module includes:

[0071] An evaluation unit, configured to evaluate the consistency of the room function names and the consistency of the room spatial positions between the PDF format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, respectively obtaining a room function name consistency evaluation result and a room spatial position consistency evaluation result;

[0072] A second obtaining unit, configured to obtain the drawing-model consistency evaluation result according to the room function name consistency evaluation result and the room spatial position consistency evaluation result.

[0073] According to an embodiment of the present application, the evaluation unit includes:

[0074] A first determination subunit, configured to determine a plurality of PDF text label bounding boxes based on the first room label information, and determine a plurality of IFC room bounding boxes based on the second room label information, and store the plurality of PDF text label bounding boxes and the plurality of IFC room bounding boxes into a preset data structure;

[0075] A first judgment subunit, configured to traverse each IFC room bounding box in the IFC model file, and determine a target PDF text label bounding box that intersects the current IFC room bounding box in the preset data structure;

[0076] A second judgment subunit, configured to determine whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in a preset room function name mapping configuration file, and determine whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or calculate the length of the longest continuous common subsequence between the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box by using a dynamic programming algorithm, and determine whether the length of the longest continuous common subsequence is greater than a preset length threshold;

[0077] A determination subunit, configured to determine that the room function names corresponding to the target PDF text label bounding box and the room function name corresponding to the current IFC room bounding box are consistent when the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in the preset room function name mapping configuration file, and the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or when the length of the longest continuous common subsequence is greater than the preset length threshold.

[0078] According to an embodiment of the present application, the evaluation unit further includes:

[0079] A second determination subunit, configured to determine a plurality of PDF room bounding boxes based on the first bounding box information, determine the plurality of IFC room bounding boxes based on the second bounding box information, and store the plurality of PDF room bounding boxes and the plurality of IFC room bounding boxes into the preset data structure;

[0080] A third judgment subunit, configured to traverse each IFC room bounding box in the IFC model file, determine a target PDF room bounding box having an intersection with the current IFC room bounding box in the preset data structure, calculate a first similarity score between the target PDF room bounding box and the current IFC room bounding box, and determine whether the first similarity score is greater than a first preset threshold;

[0081] A processing subunit, configured to determine that the spatial positions of the rooms corresponding to the target PDF room bounding box and the current IFC room bounding box are consistent when the first similarity score is greater than the first preset threshold, otherwise compare the first similarity score with a second preset threshold, and retain the target PDF room bounding boxes corresponding to the first similarity scores greater than the second preset threshold to obtain the retained PDF rooms.

[0082] According to an embodiment of the present application, after obtaining the reserved PDF rooms, the processing subunit is further configured to:

[0083] Determine whether the number of the reserved PDF rooms is greater than a preset number;

[0084] If the number of the reserved PDF rooms is greater than the preset number, take the union of the reserved PDF rooms to obtain a first union result;

[0085] Traverse each IFC room bounding box in the IFC model file, calculate a second similarity score between the first union result and each IFC room bounding box respectively, compare the second similarity score with the first preset threshold, and determine that the IFC room corresponding to the second similarity score greater than the first preset threshold has a consistent spatial position with the reserved PDF rooms.

[0086] According to an embodiment of the present application, after determining whether the number of the reserved PDF rooms is greater than the preset number, the processing subunit is further configured to:

[0087] When the number of the reserved PDF rooms is equal to the preset number, determine a target IFC room bounding box that intersects with the reserved PDF rooms based on the preset data structure, calculate a third similarity score between the target IFC room bounding box and the reserved PDF rooms, and compare the third similarity score with the second preset threshold, and retain the target IFC room bounding box corresponding to the third similarity score greater than the second preset threshold to obtain reserved IFC rooms;

[0088] Determine whether the number of the reserved IFC rooms is greater than the preset number;

[0089] If the number of the reserved IFC rooms is greater than the preset number, take the union of the reserved IFC rooms to obtain a second union result, calculate a fourth similarity score between the second union result and the reserved PDF rooms, and determine whether the fourth similarity score is greater than the first preset threshold;

[0090] If the fourth similarity score is greater than the first preset threshold, determine that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are consistent.

[0091] According to an embodiment of the present application, after determining whether the number of the reserved IFC rooms is greater than the preset number, the processing subunit is further configured to:

[0092] When the number of reserved IFC rooms is equal to the preset number, it is determined that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are not consistent.

[0093] The room drawing model consistency comparison device for engineering drawings according to the embodiments of the present application can extract the first bounding box and the first room label information of the rooms in the PDF drawing, as well as the second bounding box and the second room label information of the rooms in the IFC model by obtaining the PDF drawing and the IFC model file from the current project. After aligning the first bounding box information and the second bounding box information in the same coordinate system, combining the coordinate alignment result, the bounding box information and the room label information, the room information consistency between the PDF drawing and the IFC model is evaluated, and the drawing-model consistency evaluation result is obtained. Thus, by identifying and comparing the room information in the PDF drawing with the corresponding room information data in the IFC model, the problems of single drawing format and incomplete review results in the prior art are solved, and an effective review of the consistency of the design drawing and the building model in terms of spatial layout and function is realized.

[0094] To achieve the above object, an electronic device is proposed in the third aspect embodiment of the present application, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the room drawing model consistency comparison method for engineering drawings as described in the above embodiments.

[0095] To achieve the above object, a computer-readable storage medium is proposed in the fourth aspect embodiment of the present application, on which a computer program is stored, and the program is executed by a processor to be used to implement the room drawing model consistency comparison method for engineering drawings as described in the above embodiments.

[0096] To achieve the above object, a computer program product is proposed in the fifth aspect embodiment of the present application, which includes a computer program, and when the computer program is executed by a processor, it is used to implement the room drawing model consistency comparison method for engineering drawings as described in the above embodiments.

[0097] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:

[0099] Figure 1 FIG. is a flowchart of a method for comparing the consistency of room drawing models of engineering drawings according to an embodiment of the present application;

[0100] Figure 2 Flow chart of a consistency evaluation method according to an embodiment of the present application;

[0101] Figure 3 Flow chart of a method for comparing room function names according to an embodiment of the present application;

[0102] Figure 4 Flow chart of a method for comparing room spatial positions according to an embodiment of the present application;

[0103] Figure 5 Block diagram of a device for comparing the consistency of room drawing models in an engineering drawing provided according to an embodiment of the present application;

[0104] Figure 6 Structural diagram of an electronic device provided according to an embodiment of the present application. Detailed implementation manners

[0105] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described by referring to the drawings below are exemplary and are intended to explain the present application, but should not be construed as limiting the present application.

[0106] The method and device for comparing the consistency of room drawing models in an engineering drawing proposed according to an embodiment of the present application will be described below with reference to the drawings. First, the method for comparing the consistency of room drawing models in an engineering drawing proposed according to an embodiment of the present application will be described with reference to the drawings.

[0107] Figure 1 Flow chart of a method for comparing the consistency of room drawing models in an engineering drawing according to an embodiment of the present application.

[0108] Before introducing the method for comparing the consistency of room drawing models in an engineering drawing proposed according to an embodiment of the present application, the limitations of the related technologies will be introduced first.

[0109] Most of the drawing model consistency comparison methods only support CAD drawings in terms of the format of engineering drawings and cannot process PDF drawings, thus limiting the scope of application of the review and making many design drawings in PDF format unable to be effectively utilized;

[0110] In a construction project, a room is the basic unit that makes up a building and is clearly represented in both design drawings and BIM models. The consistency review of rooms not only involves the spatial position of the rooms but also includes the review of the function names of the rooms. The existing drawing model consistency comparison methods and systems mainly conduct reviews at the component level and fail to cover the spatial dimension, resulting in incomplete review results and further leading to deviations between the design intent and the actual construction in actual construction and operation and maintenance.

[0111] Based on the above problems, the embodiment of the present application proposes a method for comparing the consistency between the room diagrams and models of engineering drawings. By identifying and comparing the room information in the PDF drawings with the corresponding room information data in the IFC model, the problems of single drawing format and incomplete review results in the prior art are solved, and an effective review of the consistency between the design drawings and the building model in terms of spatial layout and function is achieved.

[0112] Exemplarily, as Figure 1 shown, the method for comparing the consistency between the room diagrams and models of the engineering drawings includes the following steps:

[0113] In step S101, obtain the PDF format drawings and IFC model files of the current project.

[0114] It can be understood that PDF is a file format used to display and print documents on different platforms and devices while maintaining their original formats. In the field of construction engineering, PDF format drawings are often used to display design drawings and related documents. IFC is an open international standard for BIM data exchange. IFC files contain detailed information about buildings, such as geometric shapes, material properties, construction processes, etc.

[0115] In step S102, extract the first bounding box information and the first room label information of the room based on the PDF format drawings, and extract the second bounding box information and the second room label information of the room based on the IFC model files.

[0116] It can be understood that in computer graphics, a bounding box is a data structure used to simplify the representation of graphical objects, usually represented by the smallest rectangular box to indicate the position and size of an object. In the embodiment of the present application, the bounding boxes of rooms are mostly polygons. When identifying the rooms in the project, the bounding boxes can clearly define the scope of the rooms. The room label information refers to the room identifier or name, such as "bedroom", "kitchen", etc. By identifying this text information, the purpose and function of each room can be understood.

[0117] Specifically, after obtaining the PDF format drawings and IFC model files of the current project, the user can upload the compressed package of the PDF format drawings and IFC model files of the current project. After the system program receives these files, it starts to extract the corresponding room information. For the PDF format drawings, the embodiments of the present application can use AI (Artificial Intelligence) recognition technology to recognize and extract the bounding box information of the room (i.e., the first bounding box information) and the room label information (i.e., the first room label information), and display the first bounding box information and the first room label information in a structured data format (such as JSON (JavaScript Object Notation, data exchange format)). Among them, the first bounding box information is presented in the form of a list of a series of coordinate points, and the text content of the first room label information is presented in the form of a string. For the IFC model files, the embodiments of the present application can parse the IFC file structure through IFC2JSON (an open-source project aiming to convert the IFC data format into the JSON format), extract the bounding box information of the room (i.e., the second bounding box information) and the room label information (i.e., the second room label information), and the second bounding box information and the second room label information are also displayed in a structured data format.

[0118] In addition, after obtaining the first bounding box information, the first room label information, the second bounding box information, and the second room label information, the corresponding relationships between the elevations (floor heights) of the PDF format drawings and the room information and between the elevations of the IFC model files and the room information can be constructed respectively. That is, by establishing a chart respectively, the different floor heights (elevations) are associated with the position information of each room, so as to facilitate understanding which floor of the building each room in the PDF format drawings and the IFC model files is located on and their specific positions in the vertical direction.

[0119] In step S103, the first bounding box information and the second bounding box information are aligned in the same coordinate system, and based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, the consistency of the room information in the PDF format drawings and the IFC model files is evaluated to obtain the drawing-model consistency evaluation result.

[0120] That is to say, during the process of evaluating the drawing-model consistency, it is first necessary to align the first bounding box information and the second bounding box information in the same coordinate system. After the alignment is completed, based on the coordinate alignment result, combined with the first bounding box information, the second bounding box information, the first room label information, and the second room label information, comparison and analysis are carried out to evaluate the consistency degree between the room information described in the PDF format drawing and the room information recorded in the IFC model file. Finally, according to the results of the evaluation and analysis, a drawing-model consistency evaluation report is obtained, providing an important reference basis for subsequent design, construction, and management.

[0121] For ease of understanding, how to align the first bounding box information and the second bounding box information in the same coordinate system will be described in detail below.

[0122] As a possible implementation method, in some embodiments, aligning the first bounding box information and the second bounding box information in the same coordinate system includes: establishing multiple groups of elevation corresponding relationships between the PDF format drawing and the IFC model file based on the first bounding box information and the second bounding box information; obtaining the number of vertices of the space of the current project and the shape similarity of the space, and using the space alignment function, according to the multiple groups of elevation corresponding relationships, the number of vertices of the space, and the shape similarity of the space, grouping and matching the spaces in the PDF format drawing and the IFC model file to obtain multiple planar space groups and a BIM model space matching list; generating multiple groups of space matching pairs based on the multiple planar space groups and the BIM model space matching list, and based on the multiple groups of space matching pairs, using the optimal transformation matrix to align the spaces in the PDF format drawing and the spaces in the IFC model file.

[0123] Among them, the elevation corresponding relationship refers to the corresponding relationship between different floors or different height positions in a building. The number of vertices of the space refers to the number of each vertex that constitutes the space in a 3D model, which is one of the parameters describing the geometric shape of the space. The shape similarity refers to the similarity degree of the shapes of two spaces, usually used to compare the approximation degree of the geometric characteristics of two spaces. In geometric transformation, a matrix can be used to represent operations such as rotation, scaling, and translation of objects in space. The optimal transformation matrix refers to the matrix that can maximize the similarity between the spaces in the PDF format drawing and the spaces in the IFC model file after alignment.

[0124] Specifically, based on the first bounding box information of the PDF format drawing and the second bounding box information of the IFC model file, an elevation correspondence relationship (correspondence relationship between floors) is established between the PDF format drawing and the IFC model file. That is, the elevation content format extracted from the PDF format drawing is "Elevation <floor number>", and the elevation content of the IFC model file contains various text of a note nature due to modifications during the use of the modeling software, but the matching between the PDF format drawing and the IFC model file can be achieved through this key information of the floor number, thereby obtaining a correspondence dictionary elevation_list, which includes key-value pairs of (PDF elevation, IFC elevation).

[0125] Next, using the advanced technology of the spatial alignment function, combined with multiple groups of elevation correspondence relationships, and combining the number of vertices and shape similarity of the space, the spaces in the PDF format drawing and the IFC model file can be effectively grouped and matched, thereby generating a series of planar space groupings and BIM model space matching lists. Based on the planar space groupings and BIM model space matching lists, multiple groups of space matching pairs can be further created. Using the optimal transformation matrix, align the spaces in the PDF format drawing with the spaces in the IFC model file to ensure the consistency of the drawing information and the model information in the spatial position, providing accurate spatial data support for subsequent analysis and applications.

[0126] Next, how to obtain multiple planar space groupings and BIM model space matching lists will be introduced in detail.

[0127] As a possible implementation, in some embodiments, a spatial alignment function is used to group and match spaces in a PDF format drawing and an IFC model file according to multiple groups of elevation correspondence relationships, the number of vertices of the space, and the shape similarity of the space, obtaining multiple grouped planar spaces and a BIM model space matching list, including: traversing multiple groups of elevation correspondence relationships to respectively obtain a PDF room bounding box data list and an IFC room bounding box data list for each floor of the current project; based on the PDF room bounding box data list, sorting the spaces in the PDF format drawing according to the number of vertices of the space, and determining planar spaces with the number of vertices in the same preset interval as the same group of planar spaces, obtaining multiple grouped planar spaces; traversing each BIM model space in the IFC room bounding box data list, determining the number of vertices of each BIM model space, and based on the number of vertices of each BIM model space and the preset interval, determining at least one target BIM model space, and obtaining an initial BIM model space screening list based on the at least one target BIM model space; traversing each planar space in each grouped planar space and traversing the initial BIM model space screening list in reverse order, comparing the shape similarity between each planar space in each grouped planar space and each target BIM model space in the initial BIM model space screening list; using the target BIM model space whose shape similarity meets the preset condition as the BIM model space matching the corresponding planar space, and obtaining a BIM model space matching list based on the BIM model space matching the corresponding planar space.

[0128] Specifically, by traversing the correspondence dictionary elevation_list (i.e., multiple groups of elevation correspondences), for each floor of the current project, a PDF room bounding box data list pdf_space_data_list and an IFC room bounding box data list model_space_data_list for each floor can be obtained. These two lists are input into the spatial alignment function pdf_model_alignment function, and the spatial alignment function starts running. First, by calling the simplify function of Polygon in the Shapely library (a Python library dedicated to operating and analyzing planar geometric objects), the outline of the spatial result can be pre-simplified, that is, on the basis of trying to maintain its shape characteristics, the number of vertices of the polygon is reduced. Considering that the more vertices a space has, the more personalized features it has, the spaces in the floor plan of the PDF format drawing and the BIM model of the IFC model file are sorted by the number of vertices of the space, and the spaces in the floor plan of the PDF format drawing are grouped according to the number of vertices of the space. For example, different intervals of the number of vertices [min_num, max_num] can be set, and the planar spaces with the number of vertices within the same preset interval are grouped into the same group, thus obtaining multiple planar space groups.

[0129] Next, initialize tmp_select_model_space_list as an empty list to store the preliminarily screened BIM model spaces (i.e., target BIM model spaces). Traverse each BIM model space in the IFC room bounding box data list model_space_data_list, calculate the number of vertices of each BIM model space. If the number of vertices of the current BIM model space is within any of the preset intervals of the number of vertices of the PDF planar space, then add the current BIM model space as a target BIM model space to tmp_select_model_space_list. If the number of vertices of the current BIM model space is less than the minimum value of all preset intervals of the number of vertices of the PDF planar space and exceeds a certain threshold, then terminate the screening process of the target BIM model space to obtain the initial screening list tmp_select_model_space_list of the BIM model space.

[0130] Initialize the tmp_model_space_list as an empty list to store the finally matched BIM model spaces (i.e., the BIM model spaces that match the corresponding planar spaces). Traverse each planar space pdf_space_item in the same planar space group where the number of vertices of the space is located, and then traverse the initial screening list of BIM model spaces tmp_select_model_space_list in reverse order. For each planar space pdf_space_item, use the compute_similarity_two_space function to compare the shape similarity between each planar space pdf_space_item in each planar space group and each target BIM model space in the initial screening list of BIM model spaces tmp_select_model_space_list. The compute_similarity_two_space function takes two space bounding boxes space1 (planar space) and space2 (target BIM model space) as inputs. When making the comparison, the function first calculates the transformation matrix from space1 to space2 based on the OBB of the two space bounding boxes. Then, use this transformation matrix to transform space1 and calculate the similarity between the transformed space1 and space2. For the calculation of similarity, the embodiment of the present application can use the discrete Hausdorff distance to calculate the similarity value of the two bounding boxes. If the similarity comparison result is True, add the target BIM model space as the BIM model space that matches the corresponding planar space to the tmp_model_space_list, and remove this space from the initial screening list of BIM model spaces tmp_select_model_space_list, thus obtaining the BIM model space matching list tmp_model_space_list. Finally, if the BIM model space matching list tmp_model_space_list is not empty, add the matching result to the result list, and this result is in dictionary form, containing multiple planar space groups and the BIM model space matching list.

[0131] Next, a detailed description of how to obtain the optimal transformation matrix will be given.

[0132] Optionally, in some embodiments, before aligning the spaces in the PDF format drawing and the spaces in the IFC model file using the optimal transformation matrix based on multiple sets of spatial matching pairs, it further includes: traversing the multiple sets of spatial matching pairs, respectively calculating the OBB bounding boxes of each planar space and the OBB bounding boxes of each matching BIM model space; calculating the transformation matrix corresponding to each set of spatial matching pairs according to the OBB bounding boxes of each planar space and the OBB bounding boxes of each matching BIM model space; using the transformation matrix to transform the position and orientation of the OBB bounding box of the planar space in the corresponding spatial matching pair into the position and orientation of the OBB bounding box of the matching BIM model space, obtaining the transformed planar space; calculating the current similarity score between the transformed planar space and the matching BIM model space in each set of spatial matching pairs, and respectively determining whether the current similarity score of each set of spatial matching pairs is greater than the historical highest score of the corresponding spatial matching pair; in the case where the current similarity score of the spatial matching pair is greater than the historical highest score of the corresponding spatial matching pair, updating the historical highest score to the current similarity score, and determining the transformation matrix corresponding to the spatial matching pair as the optimal transformation matrix.

[0133] Specifically, first initialize final_evaluate_score to store the current highest historical similarity score corresponding to each set of spatial matching pairs, and initialize final_matrix to store the transformation matrix corresponding to the current highest historical similarity score, with the initial value being the identity matrix. Next, traverse the multiple sets of spatial matching pairs, and calculate the OBB bounding boxes of each planar space and the OBB bounding boxes of each BIM model space that matches the corresponding planar space. Using the compute_two_obb_matrix function, a series of all possible transformation matrices can be generated by calculating the center point, long side vector, included angle, and scaling ratio of the OBB bounding box of the current planar space and the OBB bounding box of the BIM model space that matches the current planar space. Using these transformation matrices, the position and orientation of the OBB bounding box of the current planar space can be transformed into the position and orientation of the OBB bounding box of the BIM model space that matches the current planar space.

[0134] For each calculated transformation matrix, apply it sequentially to the OBB bounding box in the corresponding planar space, and use the evaluate_similarity_two_multipolygon function to evaluate the similarity between the transformed planar space and the matching BIM model space. That is, use the evaluate_similarity_two_multipolygon function to calculate the Intersection over Union (IoU) between two MultiPolygon objects, and this IoU is used to measure their similarity. To improve the calculation efficiency, an RTree (a spatial index structure) can also be used to accelerate the spatial query operation. For each polygon in the smaller MultiPolygon, the algorithm can find the polygons in the larger MultiPolygon that intersect with it and calculate the area of their intersection. By comparing the ratio of these intersection areas to the areas of their respective polygons and taking the minimum of these ratios and accumulating them, an IoU score is obtained, and this score is used as an index to measure the similarity between the two spaces. If the similarity score obtained from the current transformation matrix is higher than the previously recorded highest historical similarity score, the similarity score obtained from the current transformation matrix can be set as the new historical highest similarity score. At the same time, the current transformation matrix can be determined as the optimal transformation matrix to ensure the best matching effect can be used in subsequent processing.

[0135] The following will elaborate on how to obtain the drawing-model consistency evaluation result.

[0136] As a possible implementation, in some embodiments, based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, evaluate the consistency of the room information in the PDF format drawing and the IFC model file to obtain the drawing-model consistency evaluation result, including: based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, evaluate the consistency of the room function names and the room spatial positions in the PDF format drawing and the IFC model file, and obtain the room function name consistency evaluation result and the room spatial position consistency evaluation result respectively; according to the room function name consistency evaluation result and the room spatial position consistency evaluation result, obtain the drawing-model consistency evaluation result.

[0137] Specifically, based on the coordinate alignment result, the embodiments of the present application can evaluate the consistency of room function names and the consistency of room spatial positions between the PDF format drawing and the IFC model file based on the first bounding box information, the second bounding box information, the first room label information, and the second room label information, and respectively obtain the evaluation result regarding the consistency of room function names and the evaluation result regarding the consistency of room spatial positions. Finally, by combining these two evaluation results, the evaluation result of the drawing-model consistency of the current project can be comprehensively judged, thereby providing a reference basis for subsequent building design and construction.

[0138] First, how to evaluate the consistency of room function names between the PDF format drawing and the IFC model file will be described in detail below.

[0139] Optionally, in some embodiments, based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, evaluating the consistency of room function names and the consistency of room spatial positions between the PDF format drawing and the IFC model file, and respectively obtaining the evaluation result of the consistency of room function names and the evaluation result of the consistency of room spatial positions, including: determining a plurality of PDF text label bounding boxes based on the first room label information, and determining a plurality of IFC room bounding boxes based on the second room label information, and storing the plurality of PDF text label bounding boxes and the plurality of IFC room bounding boxes into a preset data structure; traversing each IFC room bounding box in the IFC model file, and determining a target PDF text label bounding box that intersects with the current IFC room bounding box in the preset data structure; judging whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in the preset room function name mapping configuration file, and judging whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or calculating the length of the longest continuous common subsequence between the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box by using the dynamic programming algorithm, and judging whether the length of the longest continuous common subsequence is greater than a preset length threshold; if the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in the preset room function name mapping configuration file, and the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or the length of the longest continuous common subsequence is greater than the preset length threshold, then it is determined that the room function name corresponding to the target PDF text label bounding box and the room function name corresponding to the current IFC room bounding box are consistent.

[0140] Specifically, combining Figure 2 and Figure 3As shown in the figure, the embodiment of the present application can use the first room label information and the second room label information as the input of the system program, establish multiple PDF text label bounding boxes and multiple IFC room bounding boxes, and at the same time create an empty RTree named tree (i.e., a preset data structure), and insert the multiple PDF text label bounding boxes and the multiple IFC room bounding boxes into the empty RTree respectively for bounding box collision, so as to find the first room label information and the second room bounding box information that intersect in space more efficiently, and then find the corresponding second room label information according to the second room bounding box information.

[0141] By traversing each IFC room bounding box ifc_rp in the IFC model file, the tree.intersection(ifc_rp) method can be called to use the high spatial indexing efficiency of the RTree to find all target PDF text label bounding boxes pdf_lps that intersect with the current IFC room bounding box ifc_rp. At the same time, for each target PDF text label bounding box pdf_lp, it is judged whether it is completely contained in the IFC room bounding box ifc_rp (that is, the target PDF text label bounding box is completely within the boundary of the IFC room bounding box and does not overlap with the outside of the IFC room bounding box). If it is satisfied, the corresponding target PDF text label bounding box pdf_lp is retained, otherwise it is deleted.

[0142] Retrieve the IFC room ifc_r corresponding to each IFC room bounding box ifc_rp and obtain its room function name ifc_rn. Traverse each retained target PDF text label bounding box pdf_lp and retrieve its corresponding room function name pdf_ln. Input the text label content pdf_ln corresponding to each retained target PDF text label bounding box and the room function name ifc_rn of the current IFC room bounding box into the check_name function in the form of a string to judge whether the text label content pdf_ln corresponding to each retained target PDF text label bounding box is consistent with the room function name ifc_rn of the current IFC room bounding box, that is, check whether there is a retained target PDF text label bounding box whose room function name is consistent with the room function name of the current IFC room bounding box.

[0143] When determining whether the text label content pdf_ln corresponding to each reserved target PDF text label bounding box is the same as the room function name ifc_rn of the current IFC room bounding box, first, it can be determined whether the combination (pdf_ln, ifc_rn) of the text label content pdf_ln corresponding to each reserved target PDF text label bounding box and the room function name ifc_rn of the current IFC room bounding box exists in the room function name mapping configuration file formed by domain knowledge (i.e., the preset room function name mapping configuration file). For example, the text label content corresponding to a reserved target PDF text label bounding box is "Wei", and the room function name of the current IFC room bounding box is "Toilet", and this situation is a combination recorded in the preset room function name mapping configuration file. In addition, it is also necessary to determine whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept. For example, the text label content corresponding to a reserved target PDF text label bounding box is "Elevator Hall", and the room function name of the current IFC room bounding box is "Fire Elevator Hall". The latter contains the important fire concept of "Fire Elevator Hall" while the former does not. Therefore, it is comprehensively determined that the room function name of the reserved target PDF text label bounding box is inconsistent with the room function name of the current IFC room bounding box, and vice versa.

[0144] In addition, if it is still impossible to determine whether the room function name of the reserved target PDF text label bounding box is the same as the room function name of the current IFC room bounding box through the above strategy, that is, the room function name of the current IFC room bounding box does not exist in the preset room function name mapping configuration file, or the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box do not contain the same preset specific concept, then the embodiment of this application can also calculate the length of the longest consecutive common subsequence seq of the room function name of the reserved target PDF text label bounding box and the room function name of the current IFC room bounding box by using the dynamic programming algorithm (Dynamic Programming, abbreviated as DP) to measure the similarity between the two. If the length of the longest consecutive common subsequence seq is greater than the specified threshold epsilon (i.e., the preset length threshold, which is not specifically limited here), then it can be determined that the room function name of the reserved target PDF text label bounding box is the same as the room function name of the current IFC room bounding box, and vice versa.

[0145] It should be noted that for the text label content corresponding to the bounding boxes of the target PDF text labels that have not been matched and compared in the above process, the system program can use forward matching and reverse matching methods to identify all room name labels therein, so as to determine whether there are inconsistencies between the drawings and the model. In this way, in the case where there is no corresponding modeling on the IFC model and the room where the label (that is, the text label content corresponding to the bounding box of the target PDF text label that has not been matched and compared) is located is missed in the PDF format drawing, the result of drawing-model inconsistency can be given.

[0146] In addition, in the process of checking whether the room function names are consistent, a preliminary step needs to be carried out first. That is, check a specific list pdf_ls, which contains all PDF text labels located inside the IFC room. If this list is not empty, then the system program can perform a filtering operation to ensure that only the part belonging to the room label is finally retained. This filtering process is divided into two stages: forward screening and reverse screening. In the forward screening stage, the system program first loads a configuration file rn_config, which contains two types of room label confirmation rules. The first is the exact match of the room function name. For example, if the text label contains the word "corridor", then it can be determined that this label is the room function name. The second is to use regular expressions for matching. If the text label content conforms to the pattern defined by the regular expression. For example, "r’elevator hall[0-9]?" then this label can also be confirmed as the room function name. The purpose of forward screening is to identify all possible room function name labels. In the reverse screening stage, the system program can delete the text that is definitely not a room name label. For example, if the text label does not contain any Chinese characters, then this text label can be deleted. After these two screening steps, the remaining text labels are the PDF room function name labels of the rooms that have no corresponding modeling on the IFC model.

[0147] Next, a detailed introduction will be given on how to evaluate the consistency of the room space positions between the PDF format drawing and the IFC model file.

[0148] Optionally, in some other embodiments, based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, the consistency of the room function names and the consistency of the room spatial positions between the PDF format drawing and the IFC model file are evaluated to obtain the room function name consistency evaluation result and the room spatial position consistency evaluation result respectively. It further includes: determining a plurality of PDF room bounding boxes based on the first bounding box information, determining a plurality of IFC room bounding boxes based on the second bounding box information, and storing the plurality of PDF room bounding boxes and the plurality of IFC room bounding boxes into a preset data structure; traversing each IFC room bounding box in the IFC model file, determining a target PDF room bounding box that intersects with the current IFC room bounding box in the preset data structure, calculating a first similarity score between the target PDF room bounding box and the current IFC room bounding box, and determining whether the first similarity score is greater than a first preset threshold; if the first similarity score is greater than the first preset threshold, it is determined that the spatial positions of the rooms corresponding to the target PDF room bounding box and the rooms corresponding to the current IFC room bounding box are consistent, otherwise, the first similarity score is compared with a second preset threshold, and the target PDF room bounding boxes corresponding to the first similarity scores greater than the second preset threshold are retained to obtain the retained PDF rooms.

[0149] Specifically, as shown in combination with Figure 2 and Figure 4 in the embodiments of the present application, the first bounding box information and the second bounding box information can be used as the input of the system program to establish a plurality of PDF room bounding boxes and a plurality of IFC room bounding boxes. Similarly, an empty RTree named tree (i.e., the preset data structure) is created, and the plurality of PDF room bounding boxes and the plurality of IFC room bounding boxes are respectively inserted into the empty RTree for bounding box collision, so as to more efficiently find the PDF rooms and IFC rooms that intersect in space.

[0150] Furthermore, by traversing each IFC room bounding box ifc_rp in the IFC model file, the tree.intersection(ifc_rp) method can be called to search for all PDF room bounding boxes (i.e., target PDF room bounding boxes) pdf_rps that have intersections with the current IFC room bounding box ifc_rp in the established RTree. For each searched target PDF room bounding box pdf_rp, the intersection and union of each target PDF room bounding box pdf_rp and the current IFC room bounding box ifc_rp are calculated, and then the intersection-and-union ratio (ratio of the intersection intersection to the union union) of the two is calculated as the first similarity score score=intersection.area / union.area. The first similarity score score is compared with the first preset threshold first_threshold, the first preset threshold is set larger, and the first preset threshold has different setting values ​​for rooms of different areas, because for small-area rooms shaped like electric wells, very small deviations will lead to large changes in score. If the first similarity score score is greater than the first preset threshold, it can be said that the spatial position of the room corresponding to the current target PDF room bounding box is consistent with the spatial position of the room corresponding to the current IFC room bounding box. Otherwise, the first similarity score score can be compared with the second preset threshold second_threshold, and only the target PDF room bounding boxes corresponding to the first similarity score greater than the second preset threshold are retained, thereby determining at least one retained PDF room pdf_rps. This step takes into account the possible slight errors in coordinate alignment and the fact that the IFC room cannot be completely aligned with the PDF room in actual modeling. The second preset threshold is set to be small in order to remove all target PDF room bounding boxes pdf_rp that have only a very small intersection with the current IFC room bounding box ifc_rp, so as to avoid interference with subsequent steps.

[0151] Furthermore, in some embodiments, after obtaining the reserved PDF rooms, it also includes: determining whether the number of reserved PDF rooms is greater than a preset number; if the number of reserved PDF rooms is greater than the preset number, taking a union of the reserved PDF rooms to obtain a first union result; traversing each IFC room bounding box in the IFC model file, respectively calculating a second similarity score between the first union result and each IFC room bounding box, comparing the second similarity score with a first preset threshold, and determining that the spatial position of the IFC room corresponding to the second similarity score greater than the first preset threshold is consistent with the spatial position of the reserved PDF room.

[0152] Specifically, for at least one reserved PDF room pdf_rps obtained, it is determined whether the number of reserved PDF rooms is greater than a preset number (i.e., 1). If there are multiple reserved PDF rooms, then it can be considered that the current IFC room is a combination of multiple PDF rooms. In this case, the union of all reserved PDF rooms needs to be taken, and then the similarity score (i.e., the second similarity score) between the result of this union (i.e., the first union result) and the bounding box of each IFC room in the IFC model file is calculated. If the second similarity score is greater than the first preset threshold, then it can be determined that the spatial position of the IFC room corresponding to the second similarity score greater than the first preset threshold is consistent with the combined spatial position of the reserved PDF rooms.

[0153] Further, in some embodiments, after determining whether the number of reserved PDF rooms is greater than the preset number, it further includes: if the number of reserved PDF rooms is equal to the preset number, then based on a preset data structure, the target IFC room bounding box that intersects with the reserved PDF rooms is determined, the third similarity score between the target IFC room bounding box and the reserved PDF rooms is calculated, and the third similarity score is compared with the second preset threshold, and the target IFC room bounding box corresponding to the third similarity score greater than the second preset threshold is retained to obtain the reserved IFC rooms; it is determined whether the number of reserved IFC rooms is greater than the preset number; if the number of reserved IFC rooms is greater than the preset number, then the union of the reserved IFC rooms is taken to obtain the second union result, the fourth similarity score between the second union result and the reserved PDF rooms is calculated, and it is determined whether the fourth similarity score is greater than the first preset threshold; if the fourth similarity score is greater than the first preset threshold, then it is determined that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are consistent.

[0154] Specifically, if there is only one reserved PDF room, then it can be considered that this reserved PDF room is a combination of multiple IFC rooms. In this case, the tree.intersection(pdf_rp) method can be called, and all IFC room bounding boxes that intersect with the reserved PDF room pdf_rp are found using the preset data structure RTree as the target IFC room bounding boxes n_ifc_rps. At the same time, for the search results, all possible interfering IFC room bounding boxes are filtered out using the second preset threshold, that is, the similarity score (i.e., the third similarity score) between each target IFC room bounding box n_ifc_rp in the search results and the reserved PDF room pdf_rp is calculated, and the third similarity score is compared with the second preset threshold, and only the target IFC room bounding boxes corresponding to the third similarity scores greater than the second preset threshold are retained, so as to obtain at least one reserved IFC room.

[0155] Next, determine the number of reserved IFC rooms. If there are multiple reserved IFC rooms, then the union of all reserved IFC rooms can be taken, and then the similarity score (i.e., the fourth similarity score) between the result of this union (i.e., the second union result) and the reserved PDF rooms can be calculated. If this fourth similarity score is greater than the first preset threshold, then it can be indicated that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are consistent.

[0156] It can be understood that the process design of this step can ensure that even if multiple rooms are merged into one room during PDF room recognition due to reasons such as component misrecognition and wall misrecognition, the correct drawing-model consistency review result can still be obtained.

[0157] Furthermore, in some embodiments, after determining whether the number of reserved IFC rooms is greater than the preset number, it further includes: if the number of reserved IFC rooms is equal to the preset number, then it is determined that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are not consistent.

[0158] That is to say, if there is only one reserved IFC room, then it can be directly determined that the spatial position of the reserved IFC room and the spatial position of the reserved PDF room are not consistent.

[0159] It should be noted that for all PDF room bounding boxes o_pdf_rps that are not traversed and matched in the above process, there are two possibilities. The first possibility is that the AI technology wrongly defines a non-room area as an independent space during the recognition process. The other possibility is that although the room has been designed on the PDF format drawing, it has not been modeled accordingly in the IFC model file. In this regard, first, all misrecognized rooms can be filtered out. Then, traverse the remaining PDF room bounding boxes o_pdf_rps. If the current PDF room bounding box o_pdf_rp is smaller than the set threshold area_threshold and does not contain any room text labels inside, then the current PDF room bounding box o_pdf_rp can be deleted. The remaining PDF room bounding boxes thus retained are the rooms without corresponding modeling on the IFC model. Therefore, it is determined that the spatial positions are not consistent.

[0160] Finally, the results of the drawing-model consistency evaluation can be output in the form of structured data. Before formatting the results of the drawing-model consistency evaluation, deduplication and merging need to be performed first. That is, for the cases where the rooms designed on the PDF-format drawings detected in the above process do not have corresponding modeling in the IFC model file and the AI fails to recognize the PDF rooms, and the cases where the rooms designed on the PDF-format drawings detected do not have corresponding modeling in the IFC model file, merging and deduplication are required. In addition, for the process of evaluating the consistency of the room function names between the PDF-format drawings and the IFC model file, the room function name tags of the PDF rooms that do not have corresponding modeling in the IFC model are recorded as pdf_els. For the process of evaluating the consistency of the spatial positions of the rooms between the PDF-format drawings and the IFC model file, the room function names of the bounding boxes of the PDF rooms that do not have corresponding modeling in the IFC model are recorded as pdf_ers. Traverse the pdf_ers in pdf_ers. If there is a pdf_el in pdf_els that is included inside the bounding box of pdf_er, then the two are merged into one consistency result, corresponding to the case where a room is designed on the PDF-format drawing but not modeled in the IFC model file and the AI can correctly recognize the room. The remaining pdf_el that has not been traversed corresponds to the case where a room is designed on the PDF-format drawing but not modeled in the IFC model file and the AI fails to recognize the room. These two steps of design can ensure correct consistency results in the case of missed recognition by the DF algorithm. Each result is JSONified and the results are also stored in JSON format for easy parsing by the front-end code.

[0161] In addition, the embodiment of the present application also provides an interactive review result display platform. The platform can visually display the spatial recognition results of the PDF-format drawings uploaded by the user and the IFC model file. Through hierarchical management, the user can select to display only the PDF-format drawing spaces and the IFC model of a specific layer. Through the drawing element attribute and model element attribute panels, the attributes of the currently selected PDF-format drawing rooms and the attributes of the rooms selected on the IFC model can be seen. The inspection result list also supports filtering the results. Through the comparison type, consistent and inconsistent results can be filtered out. Through the drawing ID and model ID, results related only to the rooms on the specified PDF-format drawing or the rooms on the IFC model file can be filtered out.

[0162] Thus, (1) the embodiment of the present application can process engineering drawings in the non-traditional CAD format of PDF-format drawings, expanding the scope of application of drawing-model consistency review.

[0163] (2) The embodiment of the present application can perform drawing-model consistency review at the room level, rather than just at the component level, providing more comprehensive review results.

[0164] (3) The embodiments of the present application can combine coordinate alignment technology and RTree spatial index, improving the comparison efficiency and accuracy.

[0165] (4) The embodiments of the present application can provide an interactive review result display platform, enhancing the readability and usability of the review results.

[0166] According to the room drawing-model consistency comparison method for engineering drawings proposed by the embodiments of the present application, by obtaining PDF drawings and IFC model files from the current project, the first bounding box and the first room label information of the rooms in the PDF drawings, as well as the second bounding box and the second room label information of the rooms in the IFC model, can be extracted. After aligning the first bounding box information and the second bounding box information in the same coordinate system, combining the coordinate alignment results, the bounding box information, and the room label information, the room information consistency between the PDF drawings and the IFC model is evaluated, and a drawing-model consistency evaluation result is obtained. Thus, by identifying and comparing the room information in the PDF drawings with the corresponding room information data in the IFC model, the problems of single drawing format and incomplete review results in the prior art are solved, and an effective review of the consistency between the design drawings and the building model in terms of spatial layout and function is achieved.

[0167] Next, a room drawing-model consistency comparison device for engineering drawings proposed by the embodiments of the present application is described with reference to the accompanying drawings.

[0168] Figure 5 It is a block diagram of a room drawing-model consistency comparison device for engineering drawings according to an embodiment of the present application.

[0169] As Figure 5 shown, the room drawing-model consistency comparison device 10 for engineering drawings includes: an acquisition module 100, an extraction module 200, and an evaluation module 300.

[0170] Among them, the acquisition module 100 is used to acquire PDF format drawings and IFC model files of the current project;

[0171] The extraction module 200 is used to extract the first bounding box information and the first room label information of the rooms based on the PDF format drawings, and extract the second bounding box information and the second room label information of the rooms based on the IFC model files;

[0172] The evaluation module 300 is used to align the first bounding box information and the second bounding box information in the same coordinate system, and evaluate the room information consistency between the PDF format drawings and the IFC model files based on the coordinate alignment results, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, so as to obtain a drawing-model consistency evaluation result.

[0173] Further, in some embodiments, the evaluation module 300 includes:

[0174] A building unit, configured to establish multiple groups of elevation corresponding relationships between a PDF format drawing and an IFC model file based on first bounding box information and second bounding box information;

[0175] A first obtaining unit, configured to obtain the number of vertices and the shape similarity of the space of the current project, and use a space alignment function to group and match the spaces in the PDF format drawing and the IFC model file according to multiple groups of elevation corresponding relationships, the number of vertices of the space, and the shape similarity of the space, so as to obtain multiple planar space groups and a BIM model space matching list;

[0176] An alignment unit, configured to generate multiple groups of space matching pairs based on multiple planar space groups and the BIM model space matching list, and align the spaces in the PDF format drawing and the spaces in the IFC model file by using an optimal transformation matrix based on the multiple groups of space matching pairs.

[0177] Further, in some embodiments, the first obtaining unit is specifically configured to:

[0178] Traverse multiple groups of elevation corresponding relationships, and respectively obtain a PDF room bounding box data list and an IFC room bounding box data list for each floor of the current project;

[0179] Based on the PDF room bounding box data list, sort the spaces in the PDF format drawing according to the number of vertices of the space, and determine the planar spaces with the number of vertices in the same preset interval as the same group of planar spaces, so as to obtain multiple planar space groups;

[0180] Traverse each BIM model space in the IFC room bounding box data list, determine the number of vertices of each BIM model space, determine at least one target BIM model space based on the number of vertices of each BIM model space and the preset interval, and obtain an initial screening list of BIM model spaces based on the at least one target BIM model space;

[0181] Traverse each planar space in each planar space group, and perform a reverse traversal on the initial screening list of BIM model spaces, and compare the shape similarity between each planar space in each planar space group and each target BIM model space in the initial screening list of BIM model spaces;

[0182] Use the target BIM model space whose shape similarity meets the preset conditions as the BIM model space matching the corresponding planar space, and obtain a BIM model space matching list based on the BIM model space matching the corresponding planar space.

[0183] Further, in some embodiments, before aligning the spaces in the PDF format drawing and the spaces in the IFC model file by using the optimal transformation matrix based on multiple groups of spatial matching pairs, the alignment unit is further configured to:

[0184] Traverse multiple groups of spatial matching pairs, and respectively calculate the OBB bounding boxes of each planar space and the OBB bounding boxes of each matching BIM model space;

[0185] According to the OBB bounding boxes of each planar space and the OBB bounding boxes of each matching BIM model space, calculate the transformation matrix corresponding to each group of spatial matching pairs;

[0186] Use the transformation matrix to transform the OBB bounding box of the planar space in the corresponding spatial matching pair to the position and orientation of the OBB bounding box of the matching BIM model space, and obtain the transformed planar space;

[0187] Calculate the current similarity score between the transformed planar space and the matching BIM model space in each group of spatial matching pairs, and respectively determine whether the current similarity score of each group of spatial matching pairs is greater than the historical highest score of the corresponding spatial matching pair;

[0188] In the case where the current similarity score of the spatial matching pair is greater than the historical highest score of the corresponding spatial matching pair, update the historical highest score to the current similarity score, and determine the transformation matrix corresponding to the spatial matching pair as the optimal transformation matrix.

[0189] Further, in some embodiments, the evaluation module 300 includes:

[0190] An evaluation unit, configured to evaluate the consistency of the room function names and the consistency of the room spatial positions between the PDF format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, and respectively obtain the room function name consistency evaluation result and the room spatial position consistency evaluation result;

[0191] A second obtaining unit, configured to obtain the drawing-model consistency evaluation result according to the room function name consistency evaluation result and the room spatial position consistency evaluation result.

[0192] Further, in some embodiments, the evaluation unit includes:

[0193] A first determining subunit, configured to determine multiple PDF text label bounding boxes based on the first room label information, and determine multiple IFC room bounding boxes based on the second room label information, and store the multiple PDF text label bounding boxes and the multiple IFC room bounding boxes into a preset data structure;

[0194] The first judgment subunit is used to traverse each IFC room bounding box in the IFC model file and determine the target PDF text label bounding box that intersects the current IFC room bounding box in the preset data structure;

[0195] The second judgment subunit is used to determine whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in the preset room function name mapping configuration file, and determine whether the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or calculate the length of the longest continuous common subsequence between the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box by using the dynamic programming algorithm, and determine whether the length of the longest continuous common subsequence is greater than the preset length threshold;

[0196] The determination subunit is used to determine that the function names of the rooms corresponding to the target PDF text label bounding box and the rooms corresponding to the current IFC room bounding box are consistent when the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box exist in the preset room function name mapping configuration file, and the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or when the length of the longest continuous common subsequence is greater than the preset length threshold.

[0197] Further, in some embodiments, the evaluation unit further includes:

[0198] The second determination subunit is used to determine a plurality of PDF room bounding boxes based on the first bounding box information, determine a plurality of IFC room bounding boxes based on the second bounding box information, and store the plurality of PDF room bounding boxes and the plurality of IFC room bounding boxes in the preset data structure;

[0199] The third judgment subunit is used to traverse each IFC room bounding box in the IFC model file, determine the target PDF room bounding box that intersects the current IFC room bounding box in the preset data structure, calculate the first similarity score between the target PDF room bounding box and the current IFC room bounding box, and determine whether the first similarity score is greater than the first preset threshold;

[0200] A processing subunit, configured to determine that the spatial positions of the rooms corresponding to the target PDF room bounding boxes and the rooms corresponding to the current IFC room bounding boxes are consistent when the first similarity score is greater than a first preset threshold; otherwise, compare the first similarity score with a second preset threshold, and retain the target PDF room bounding boxes corresponding to the first similarity scores greater than the second preset threshold to obtain the retained PDF rooms.

[0201] Further, in some embodiments, after obtaining the retained PDF rooms, the processing subunit is further configured to:

[0202] Determine whether the number of the retained PDF rooms is greater than a preset number;

[0203] If the number of the retained PDF rooms is greater than the preset number, take the union of the retained PDF rooms to obtain a first union result;

[0204] Traverse each IFC room bounding box in the IFC model file, calculate the second similarity scores between the first union result and each IFC room bounding box respectively, compare the second similarity scores with the first preset threshold, and determine that the spatial positions of the IFC rooms corresponding to the second similarity scores greater than the first preset threshold are consistent with those of the retained PDF rooms.

[0205] Further, in some embodiments, after determining whether the number of the retained PDF rooms is greater than the preset number, the processing subunit is further configured to:

[0206] When the number of the retained PDF rooms is equal to the preset number, determine the target IFC room bounding boxes that intersect with the retained PDF rooms based on a preset data structure, calculate the third similarity scores between the target IFC room bounding boxes and the retained PDF rooms, and compare the third similarity scores with the second preset threshold, and retain the target IFC room bounding boxes corresponding to the third similarity scores greater than the second preset threshold to obtain the retained IFC rooms;

[0207] Determine whether the number of the retained IFC rooms is greater than the preset number;

[0208] If the number of the retained IFC rooms is greater than the preset number, take the union of the retained IFC rooms to obtain a second union result, calculate the fourth similarity score between the second union result and the retained PDF rooms, and determine whether the fourth similarity score is greater than the first preset threshold;

[0209] If the fourth similarity score is greater than the first preset threshold, determine that the spatial positions of the retained IFC rooms and the retained PDF rooms are consistent.

[0210] Further, in some embodiments, after determining whether the number of reserved IFC rooms is greater than a preset number, the processing subunit is further configured to:

[0211] When the number of reserved IFC rooms is equal to the preset number, it is determined that the spatial positions of the reserved IFC rooms and the reserved PDF rooms are not consistent.

[0212] It should be noted that the foregoing explanation of the embodiment of the method for comparing the room diagram model consistency of engineering drawings also applies to the device for comparing the room diagram model consistency of engineering drawings in this embodiment, and will not be elaborated here.

[0213] According to the device for comparing the room diagram model consistency of engineering drawings provided by the embodiments of the present application, by obtaining the PDF drawing and the IFC model file from the current project, the first bounding box and the first room label information of the rooms in the PDF drawing, and the second bounding box and the second room label information of the rooms in the IFC model can be extracted. After aligning the first bounding box information and the second bounding box information in the same coordinate system, combining the coordinate alignment result, the bounding box information, and the room label information, the room information consistency between the PDF drawing and the IFC model is evaluated, and the diagram model consistency evaluation result is obtained. Thus, by identifying and comparing the room information in the PDF drawing with the corresponding room information data in the IFC model, the problems of single drawing format and incomplete review results in the prior art are solved, and the effective review of the consistency of the design drawing and the building model in terms of spatial layout and function is realized.

[0214] Figure 6 The following is a schematic structural diagram of an electronic device provided by the embodiments of the present application. The electronic device may include:

[0215] A memory 601, a processor 602, and a computer program stored on the memory 601 and executable on the processor 602.

[0216] When the processor 602 executes the program, it implements the method for comparing the room diagram model consistency of engineering drawings provided in the foregoing embodiments.

[0217] Further, the electronic device further includes:

[0218] A communication interface 603 for communication between the memory 601 and the processor 602.

[0219] The memory 601 is used to store a computer program executable on the processor 602.

[0220] The memory 601 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0221] If the memory 601, the processor 602, and the communication interface 603 are implemented independently, the communication interface 603, the memory 601, and the processor 602 can be interconnected through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 6 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0222] Optionally, in specific implementation, if the memory 601, the processor 602, and the communication interface 603 are integrated on a single chip, the memory 601, the processor 602, and the communication interface 603 can communicate with each other through an internal interface.

[0223] The processor 602 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0224] The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for comparing the consistency of the room diagram model in the engineering drawing as described above is implemented.

[0225] The embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for comparing the consistency of the room diagram model in the engineering drawing as described above is implemented.

[0226] In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0227] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic expressions of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0228] Although the embodiments of this application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting this application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for comparing the consistency of room models of engineering drawings, characterized in that: The following steps are involved: Get the PDF format drawings and IFC model files of the current project; Extracting first bounding box information and first room label information of the room based on the PDF format drawing, and extracting second bounding box information and second room label information of the room based on the IFC model file; The first bounding box information and the second bounding box information are aligned in the same coordinate system, and based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information and the second room label information, the consistency of the room information of the PDF format drawing and the IFC model file is evaluated to obtain a drawing-model consistency evaluation result.

2. The method according to claim 1, characterized in that The aligning the first bounding box information and the second bounding box information in the same coordinate system includes: Based on the first bounding box information and the second bounding box information, establishing a plurality of sets of elevation correspondence relationships between the PDF format drawing and the IFC model file; Obtain the number of vertices of the space of the current project and the shape similarity of the space, and use the space alignment function to group and match the spaces in the PDF format drawing and the IFC model file according to the multiple groups of elevation correspondences, the number of vertices of the space and the shape similarity of the space, to obtain a plurality of plane space groupings and a BIM model space matching list; A plurality of space matching pairs are generated based on the plurality of plane space groups and the BIM model space matching list, and based on the plurality of space matching pairs, the spaces in the PDF format drawing and the spaces in the IFC model file are aligned using an optimal transformation matrix.

3. The method according to claim 2, characterized in that The space alignment function is used to group and match the spaces in the PDF format drawing and the IFC model file according to the multiple groups of elevation correspondences, the number of vertices of the space and the shape similarity of the space, to obtain multiple plane space groupings and BIM model space matching lists, including: Traversing the plurality of sets of elevation correspondence relationships, respectively obtaining a PDF room bounding box data list and an IFC room bounding box data list for each floor of the current project; Based on the PDF room bounding box data list, the spaces in the PDF format drawing are sorted according to the number of vertices of the spaces, and the plane spaces with the number of vertices in the same preset interval are determined as the same group of plane spaces to obtain the plurality of plane space groups; Traversing each BIM model space in the IFC room bounding box data list, determining the number of vertices of each BIM model space, determining at least one target BIM model space based on the number of vertices of each BIM model space and the preset interval, and obtaining an initial screening list of BIM model spaces based on the at least one target BIM model space; Traversing each plane space in each plane space group, and traversing the initial screening list of BIM model spaces in reverse order, and comparing the shape similarity between each plane space in each plane space group and each target BIM model space in the initial screening list of BIM model spaces; The target BIM model space whose shape similarity meets a preset condition is used as the BIM model space that matches the corresponding plane space, and a BIM model space matching list is obtained based on the BIM model space that matches the corresponding plane space.

4. The method according to claim 2, characterized in that: Before aligning the space in the PDF format drawing and the space in the IFC model file using the optimal transformation matrix based on the multiple sets of space matching pairs, the method further includes: Traversing the multiple sets of space matching pairs, respectively calculating the OBB bounding box of each plane space and the OBB bounding box of each matching BIM model space; According to the OBB bounding box of each plane space and the OBB bounding box of each matching BIM model space, a transformation matrix corresponding to each set of space matching pairs is calculated; Using the transformation matrix, transform the OBB bounding box of the plane space in the corresponding space matching pair into the position and direction of the OBB bounding box of the matching BIM model space to obtain the transformed plane space; Calculating the current similarity score between the transformed plane space in each set of space matching pairs and the matched BIM model space, and determining whether the current similarity score of each set of space matching pairs is greater than the highest historical score of the corresponding space matching pair; When the current similarity score of the spatial matching pair is greater than the historical highest score of the corresponding spatial matching pair, the historical highest score is updated as the current similarity score, and the transformation matrix corresponding to the spatial matching pair is determined to be the optimal transformation matrix.

5. The method according to claim 1, characterized in that The step of evaluating the consistency of the room information of the PDF format drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information to obtain a drawing-model consistency evaluation result includes: Based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, the consistency of the room function name and the consistency of the room space position of the PDF format drawing and the IFC model file are evaluated to obtain a room function name consistency evaluation result and a room space position consistency evaluation result, respectively; The image model consistency evaluation result is obtained according to the room function name consistency evaluation result and the room space position consistency evaluation result.

6. The method according to claim 5, characterized in that The step of evaluating the consistency of the room function name and the room space position of the PDF drawing and the IFC model file based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, and obtaining the room function name consistency evaluation result and the room space position consistency evaluation result, respectively, includes: Determine a plurality of PDF text tag bounding boxes based on the first room tag information, determine a plurality of IFC room bounding boxes based on the second room tag information, and store the plurality of PDF text tag bounding boxes and the plurality of IFC room bounding boxes in a preset data structure; Traversing each IFC room bounding box in the IFC model file, and determining a target PDF text label bounding box that intersects with the current IFC room bounding box in the preset data structure; Determine whether the text tag content corresponding to the target PDF text tag bounding box and the room function name of the current IFC room bounding box exist in a preset room function name mapping configuration file, and determine whether the text tag content corresponding to the target PDF text tag bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or calculate the length of the longest continuous common subsequence between the text tag content corresponding to the target PDF text tag bounding box and the room function name of the current IFC room bounding box by using a dynamic programming algorithm, and determine whether the length of the longest continuous common subsequence is greater than a preset length threshold; If the room function name of the current IFC room bounding box exists in the preset room function name mapping configuration file, and the text label content corresponding to the target PDF text label bounding box and the room function name of the current IFC room bounding box contain the same preset specific concept, or the length of the longest continuous common subsequence is greater than the preset length threshold, it is determined that the room function name corresponding to the target PDF text label bounding box and the room function name corresponding to the current IFC room bounding box are consistent.

7. The method according to claim 6, characterized in that Based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information, and the second room label information, the consistency of the room function name and the consistency of the room space position of the PDF format drawing and the IFC model file are evaluated to obtain a room function name consistency evaluation result and a room space position consistency evaluation result, respectively, further comprising: Determine a plurality of PDF room bounding boxes based on the first bounding box information, determine the plurality of IFC room bounding boxes based on the second bounding box information, and store the plurality of PDF room bounding boxes and the plurality of IFC room bounding boxes in the preset data structure; Traversing each IFC room bounding box in the IFC model file, and determining a target PDF room bounding box that intersects with the current IFC room bounding box in the preset data structure, calculating a first similarity score between the target PDF room bounding box and the current IFC room bounding box, and determining whether the first similarity score is greater than a first preset threshold; If the first similarity score is greater than the first preset threshold, it is determined that the spatial position of the room corresponding to the target PDF room bounding box is consistent with the spatial position of the room corresponding to the current IFC room bounding box; otherwise, the first similarity score is compared with the second preset threshold, and the target PDF room bounding box corresponding to the first similarity score greater than the second preset threshold is retained to obtain the retained PDF room.

8. The method according to claim 7, characterized in that After obtaining the reserved PDF room, it also includes: Determine whether the number of the reserved PDF rooms is greater than a preset number; If the number of the reserved PDF rooms is greater than the preset number, taking a union of the reserved PDF rooms to obtain a first union result; Traversing each IFC room bounding box in the IFC model file, respectively calculating a second similarity score between the first union result and each IFC room bounding box, comparing the second similarity score with the first preset threshold, and determining whether a spatial position of an IFC room corresponding to a second similarity score greater than the first preset threshold is consistent with a spatial position of the retained PDF room.

9. The method according to claim 8, characterized in that After determining whether the number of the reserved PDF rooms is greater than the preset number, the method further includes: If the number of the reserved PDF rooms is equal to the preset number, determining a target IFC room bounding box that has an intersection with the reserved PDF room based on the preset data structure, calculating a third similarity score between the target IFC room bounding box and the reserved PDF room, and comparing the third similarity score with the second preset threshold, retaining the target IFC room bounding box corresponding to the third similarity score greater than the second preset threshold, and obtaining the reserved IFC room; Determining whether the number of the reserved IFC rooms is greater than the preset number; If the number of the reserved IFC rooms is greater than the preset number, taking a union of the reserved IFC rooms to obtain a second union result, calculating a fourth similarity score between the second union result and the reserved PDF rooms, and determining whether the fourth similarity score is greater than the first preset threshold; If the fourth similarity score is greater than the first preset threshold, it is determined that the spatial position of the reserved IFC room and the spatial position of the reserved PDF room are consistent.

10. A room model consistency comparison device for an engineering drawing, characterized in that: include: The acquisition module is used to obtain the PDF format drawings and IFC model files of the current project; An extraction module, used to extract first bounding box information and first room label information of the room based on the PDF format drawing, and to extract second bounding box information and second room label information of the room based on the IFC model file; An evaluation module is used to align the first bounding box information and the second bounding box information in the same coordinate system, and based on the coordinate alignment result, the first bounding box information, the second bounding box information, the first room label information and the second room label information, evaluate the consistency of the room information of the PDF format drawing and the IFC model file to obtain a drawing-model consistency evaluation result.

11. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for comparing the consistency of room models of engineering drawings as described in any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method for comparing the consistency of room models of engineering drawings as described in any one of claims 1 to 9.

13. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, is used to implement the method for comparing the consistency of room models of engineering drawings as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Engineering drawing equipment tag matching method and device, electronic equipment and storage medium

    CN121686507A