A method, device, equipment and medium for compressing building models

Through deep compression processing of BIM models, including graphical element merging and rendering optimization, the performance problem of BIM data on devices with limited hardware is solved, fast loading and use on the web and mobile terminals is achieved, and the port trend of 3D models is adapted to .

CN112926119BActive Publication Date: 2024-09-10XIAMEN FANZHUO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110248746.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-05
Publication Date
2024-09-10
Estimated Expiration
2041-03-05

AI Technical Summary

Technical Problem

Due to the large volume of existing Building Information Model (BIM) data, it is difficult to effectively use it on devices with limited hardware. In particular, the performance on the web and mobile terminals is poor, and the volume increases after the integration of multi-professional models, resulting in stringent hardware requirements. .

Method used

Through deep compression processing of the 3D building information model, including importing model diagrams, analyzing component information to generate lists, merging graphics elements, performing secondary processing and rendering optimization, and outputting lightweight model files, it is suitable for use on the web and mobile terminals.

Benefits of technology

It realizes a lightweight building model with small size and high flexibility, allowing it to be loaded and used quickly, reducing equipment hardware requirements and adapting to the trend of 3D models moving from desktop to web and mobile.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112926119B
    Figure CN112926119B
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for compressing and processing a building model. The method includes importing a designed three-dimensional building information model diagram; traversing and analyzing the building component information in the three-dimensional building information model diagram to generate a list of building components; describing the multi-dimensional parameter information of each building component in the list of building components, merging the building components according to the multi-dimensional parameter information, and drawing and generating a lightweight building model; performing secondary processing on the lightweight building model, and storing the processed model file locally; rendering the lightweight building model, and outputting the rendered lightweight model effect diagram. Advantages of the present invention: Through the technical solution of the present invention, it is possible to output a lightweight building model with a small volume and high flexibility, so that it can be quickly loaded and used on the web and mobile terminals to adapt to the trend of three-dimensional models moving from the desktop to the web and mobile terminals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for compressing and processing a building model. Background Art

[0002] Building Information Modeling (BIM) is a three-dimensional building model based on various relevant information data of construction projects. It simulates the real information of the building through digital information simulation. It has the characteristics of information completeness, information relevance, information consistency, visualization, coordination, simulation, optimization and plotting. It is a model data from macro to micro, outdoor to indoor, and the final expression is a visual multi-dimensional, multi-purpose and multi-functional computer graphic model.

[0003] The greatest value of BIM lies in collaboration. Collaboration is required between different positions, different professions, and multiple participants. Integrating models of multiple professions into a full-professional model is the most basic work. BIM constructs the professional technical parameters of each floor through a real model, so that various professions such as architecture, structure, water supply and drainage, HVAC, and electrical can work based on the same model, thereby achieving an optimized design architectural effect. In terms of data format, BIM software is diverse, and the software data format is complex and numerous. Due to the lack of a unified and open data format, it is difficult to ensure the data flow between various software and the data value cannot be maximized. On the other hand, in the implementation of process construction, a large amount of complex engineering data information needs to be processed. How to effectively organize and use this information to achieve information exchange and sharing between various units related to the project and different professional application systems is also a difficult practical problem. Since BIM data accurately and comprehensively displays the external and internal models of the building, the original design model retains a lot of information in the design process, which makes the model large in size. After integrating the models of multiple professions, the size will increase by an order of magnitude, and the requirements for hardware will be very harsh, resulting in the performance of BIM data in the use scenario to be improved. For example, in the case of Wanda Plaza, the BIM model consists of 78 files in 11 disciplines, about 8G; with such a large BIM model, even on a high-configuration computer, only one or two professional models can be opened at a time. However, with the help of cloud-based model lightweight processing technology and model dynamic loading technology, the BIM platform can open the full professional model of Wanda Plaza in the browser in an average of about 20 seconds, greatly reducing the threshold for users to access the BIM model.

[0004] On the other hand, with the development of the Internet, it is an inevitable trend to move from desktop to Web and mobile. In particular, the development of HTML 5 / Web GL technology has caused disruptive changes in various industries. As the Web GL standard is widely accepted, many open source 3D engines based on HTML 5 have emerged, such as three.js and scene.js. Due to the influence of computer capabilities and memory limitations, the data organization and loading methods of the desktop-based model must be adjusted accordingly, that is, more 3D model lightweight technology needs to be used to deeply process the model. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for compressing and processing a building model, so as to perform deep compression processing on the building model to reduce the hardware requirements of the device and facilitate its use on the web and mobile terminals.

[0006] In a first aspect, the present invention provides a method for compressing a building model, the method comprising:

[0007] Import the designed 3D building information model;

[0008] Traverse and analyze the building component information in the 3D building information model diagram to generate a building component list;

[0009] Describe the multi-dimensional parameter information of each building component in the building component list, merge the building components according to the multi-dimensional parameter information, and draw and generate a lightweight building model;

[0010] Perform secondary processing on the lightweight building model and store the processed model file locally;

[0011] Render the lightweight building model and output the rendered lightweight model rendering.

[0012] Furthermore, the traversal and analysis of the building component information in the three-dimensional building information model diagram to generate a building component list includes:

[0013] After the three-dimensional building information model diagram is successfully imported, each building component in the three-dimensional building information model diagram is traversed, all node data of each building component is analyzed, and valid building component information is extracted to generate a building component list; wherein the node data includes at least geometric data, material data and attribute data.

[0014] Furthermore, the multi-dimensional parameter information describing each building component in the building component list and performing graphic element merging processing on the building components according to the multi-dimensional parameter information include:

[0015] A series of parameters are used to describe each building component in the building component list to obtain multi-dimensional parameter information of the building component; based on the obtained multi-dimensional parameter information, all the building components in the building component list are classified by family and category, and the building components belonging to the same category are merged, specifically including at least one of the following merging processes:

[0016] Merge and reduce the surface of building components of the same type;

[0017] For two or more building components with exactly the same structure but different positions, keep one building component and record only one reference + spatial coordinate for the other identical building components;

[0018] The intersections of adjacent building components are merged and reduced.

[0019] Furthermore, after the building components are processed for graphic element merging according to the multi-dimensional parameter information, the method further includes: batch drawing component models of the building components in the same state.

[0020] Furthermore, after drawing and generating the lightweight building model, it also includes:

[0021] According to the accuracy requirements of different application scenarios, the triangle data in the generated lightweight building model is processed by triangulation method to obtain a lightweight building model that meets different precision requirements.

[0022] Furthermore, the secondary processing of the lightweight building model includes:

[0023] Compress the ifc format file of the lightweight building model into a dae format file, then compress the dae format file into a gltf format file, and finally compress the gltf format file into a json format file and output it for saving.

[0024] Furthermore, the rendering operation of the lightweight building model includes:

[0025] The lightweight building model is rendered using the occlusion culling algorithm. During the rendering process, the building components with the same status are merged into one drawing call, and the drawing calls are performed in batches. At the same time, multi-threaded scheduling and first-frame rendering optimization are used to accelerate rendering efficiency.

[0026] In a second aspect, the present invention provides a building model compression processing device, the device comprising a drawing import module, a component traversal module, a graphic element merging module, a processing and saving module and a rendering output module;

[0027] The drawing import module is used to import the designed three-dimensional building information model drawing;

[0028] The component traversal module is used to traverse and analyze the building component information in the three-dimensional building information model diagram to generate a building component list;

[0029] The graphic element merging module is used to describe the multi-dimensional parameter information of each building component in the building component list, perform graphic element merging processing on the building components according to the multi-dimensional parameter information, and draw and generate a lightweight building model;

[0030] The processing and saving module is used to perform secondary processing on the lightweight building model and store the processed model file locally;

[0031] The rendering output module is used to render the lightweight building model and output a rendered rendering of the lightweight model.

[0032] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0034] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

[0035] The method, device, equipment and medium provided in the embodiment of the present application can significantly reduce the number of graphic elements of building components by traversing and analyzing the building component information in the three-dimensional building information model diagram, describing each building component through a series of parameters, and merging the graphic elements of the same type of building components, so that the volume of the processed three-dimensional building information model is greatly reduced, and the effect of a lightweight model is produced; at the same time, the lightweight building model is processed for secondary processing, and the obtained model file is stored locally, which can reduce the time of BIM Server network interactive download, thereby effectively shortening the loading time of the lightweight building model. Therefore, the technical solution of the present invention can realize the output of a lightweight building model with small volume and high flexibility, so that it can be quickly loaded and used on the web and mobile terminals to adapt to the trend of three-dimensional models moving from desktop terminals to web and mobile terminals.

[0036] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0038] Figure 1 This is a flow chart of an execution of a building model compression processing method in Embodiment 1 of the present invention;

[0039] Figure 2 This is a structural schematic diagram of a building model compression processing device in Embodiment 2 of the present invention;

[0040] Figure 3 This is a schematic diagram of the structure of an electronic device in Embodiment 3 of the present invention;

[0041] Figure 4 Schematic diagram of the structure of the medium in the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0042] The embodiments of the present application provide a method, device, equipment and medium for compressing and processing a building model to perform deep compression processing on the building model, thereby reducing the hardware requirements of the device and facilitating its use on the web and mobile terminals, thereby solving the problem that existing three-dimensional models are difficult to use on the web and mobile terminals.

[0043] The technical solution in the embodiment of the present application has the following general idea: traverse and analyze the building components in the three-dimensional building information model diagram to generate a list of building components; use a series of parameters to describe the multi-dimensional parameter information of each building component in the list of building components, and merge the elements of the same type of building components to obtain a lightweight building model; compress the lightweight building model and output a lightweight building model with small size and high flexibility, so that it can be loaded and used on the web and mobile terminals to adapt to the trend of three-dimensional models moving from desktop terminals to web and mobile terminals. In order to facilitate a better understanding of the technical solution of the present invention, the technical solution of the present invention is described in detail in conjunction with specific embodiments.

[0044] Embodiment 1

[0045] This embodiment provides a method for compressing a building model. Figure 1 As shown, the method includes:

[0046] Import the designed 3D building information model;

[0047] Traverse and analyze the building component information in the 3D building information model diagram to generate a building component list;

[0048] Describe the multi-dimensional parameter information of each building component in the building component list, merge the building components according to the multi-dimensional parameter information, and draw and generate a lightweight building model;

[0049] Perform secondary processing on the lightweight building model and store the processed model file locally;

[0050] Render the lightweight building model and output the rendered lightweight model rendering.

[0051] The present invention traverses and analyzes the building component information in the three-dimensional building information model diagram, describes each building component through a series of parameters, and merges the elements of the same type of building components, which can greatly reduce the number of elements of the building components, greatly reduce the volume of the processed three-dimensional building information model, and produce the effect of a lightweight model; at the same time, the lightweight building model is processed twice, and the obtained model file is stored locally, which can reduce the time for BIM Server network interactive download, thereby effectively shortening the loading time of the lightweight building model. Therefore, the technical solution of the present invention can realize the output of a lightweight building model with small volume and high flexibility, so that it can be quickly loaded and used on the web and mobile terminals, so as to adapt to the trend of three-dimensional models moving from desktop terminals to web and mobile terminals.

[0052] In the present invention, before importing the three-dimensional building information model diagram into the BIM software, it is necessary to use BIM technology to design and construct the three-dimensional building information model diagram from the ideas in the brain, and record the various professional and technical parameters of each floor through the real model, so that each profession such as architecture, structure, water supply and drainage, HVAC, and electrical can work based on the same model, thereby achieving the architectural effect of optimized design. Since BIM data accurately and comprehensively displays the external and internal models of the building, the original design model retains a lot of information in the design process, making the model volume large, especially after integrating multiple professional models, the volume will increase by an order of magnitude, so the requirements for hardware will be very harsh, resulting in the performance of BIM data in the use scenario to be improved. In addition, in the specific design, an interlaced structure is used for design to prohibit the generation of overlapping surfaces.

[0053] In order to lightweight the designed 3D building information model, it is necessary to import the designed 3D building information model diagram into the BIM software; when opening the BIM software to import the 3D building information model diagram, you need to first select the storage location of the 3D building information model diagram, and select basic information such as color, positioning, and unit. After saving successfully, you can import the 3D building information model diagram into the project to prepare for model drawing.

[0054] In the example of the present invention, the traversal and analysis of the building component information in the three-dimensional building information model diagram to generate a building component list includes:

[0055] After the 3D building information model diagram is successfully imported, each building component in the 3D building information model diagram is traversed, all node data of each building component is analyzed, and valid building component information is extracted to generate a building component list; wherein the node data at least includes geometric data (such as vertices, normal vectors, UV coordinate planes, etc.), material data (such as color, material, ambient light, transparency, etc.) and attribute data (such as subset attributes, data, etc.). In the generated building component list, various information items such as the name, number, geometric data, material data, attribute data, etc. of the building component can be included to facilitate the subsequent parameter description of the building component.

[0056] In the example of the present invention, the multi-dimensional parameter information describing each building component in the building component list and performing primitive merging processing on the building components according to the multi-dimensional parameter information include:

[0057] Use a series of parameters to describe each building component in the building component list to obtain multi-dimensional parameter information of the building component; in specific implementation, the geometric parameters, attribute parameters, material parameters, category parameters, functional parameters, etc. of each building component can be described, thereby obtaining multi-dimensional parameter information of the building component; for example, taking the building component as a window, the multi-dimensional parameter information of the window such as material, light transmittance, color, vertex coordinates, size, number, etc. can be described; with the help of parameter description, it is possible to well realize the merging of graphics elements of structures of the same type to achieve the purpose of lightweight model;

[0058] According to the obtained multi-dimensional parameter information, all building components in the building component list are classified by family and category, and building components belonging to the same category are merged, specifically including at least one of the following merging processes:

[0059] Merge and reduce the surface of the same type of building components. In specific implementation, for doors, windows, load-bearing columns, plates, structural beams and other types, you can merge and reduce the surface of building components belonging to the same category and family. For example, on the same floor, at the junction of walls, you can merge the redundant walls, and finally merge multiple walls into one. By merging and reducing the surface of building components of the same category, the number of building component elements can be greatly reduced, the model volume can be greatly reduced, and the effect of lightweight model can be produced;

[0060] For two or more building components with exactly the same structure but different positions, one building component is retained, and only one reference + spatial coordinate is recorded for the other identical building components; in specific implementation, for some doors, windows, load-bearing columns, plates, structural beams, etc. that only differ in position, only one building component data can be retained, and only one reference + spatial coordinate is recorded for the other identical building components. Through the reference, it is clear which retained building component data is referenced, and the specific position of the building component can be known through the spatial coordinate; for example, if there are 8 doors with exactly the same structure but different positions in the model, the data of one of the doors can be retained, and only one reference + spatial coordinate information is recorded for the other 7 doors; by retaining the data of only one building component for multiple building components with exactly the same structure but different positions, the number of building components can be reduced and the model volume can be reduced;

[0061] The intersections of adjacent building components are merged and reduced. For example, some repeated vertices can be directly removed. By merging and reducing the intersections of adjacent building components, the vertices and faces that intersect on adjacent faces and intersection lines can be removed, thereby achieving the effect of a lightweight model.

[0062] Since the initially imported 3D building information model is a large model with a relatively complex structure and a lot of retained data information, the number of building components can be effectively reduced and the volume of the model can be reduced by merging the building components belonging to the same category. In addition, in the specific implementation of the present invention, a similarity algorithm can be used to merge the building components belonging to the same category.

[0063] In the example of the present invention, after the building components are merged according to the multi-dimensional parameter information, the method further includes: batch drawing component models of building components with the same state (i.e., the same category) to improve the drawing efficiency of the model. For example, for walls of the same material, batch drawing can be performed to quickly build a batch of building models with the same state.

[0064] In the example of the present invention, after drawing and generating the lightweight building model, the method further includes:

[0065] According to the accuracy requirements of different application scenarios, the triangle data in the generated lightweight building model is processed by triangulation method to obtain a lightweight building model that meets different precision requirements.

[0066] The more triangles used to describe a three-dimensional model of a geometric body (called triangulated geometric description), the finer the model will look, and vice versa. At the same time, due to the different requirements for model precision in different scenarios during specific use, a low degree of refinement is required when viewing a panoramic mode at a long distance, and a high degree of refinement is required when viewing a single primitive at a close distance. The present invention obtains triangle data in the generated lightweight building model, and processes the obtained triangle data using a triangulation method according to the accuracy requirements of different application scenarios, thereby greatly improving the flexibility of subsequent use, and can generate models of corresponding precision according to the precision requirements of different application scenarios.

[0067] In the example of the present invention, the secondary processing of the lightweight building model includes:

[0068] The ifc format file of the lightweight building model is compressed into a dae format file, and then the dae format file is compressed into a gltf format file, and finally the gltf format file is compressed into a json format file and output and saved. In the present invention, the lightweight building model is processed twice, and finally output in the json file format, and the output model file is stored locally, which can effectively reduce the time of BIM Server network interactive download, thereby effectively shortening the loading time of the lightweight building model, and facilitating the loading and use of the web terminal and the mobile terminal.

[0069] In the example of the present invention, the rendering operation of the lightweight building model includes:

[0070] Use the occlusion culling algorithm to render lightweight building models. The so-called occlusion culling algorithm is to delete objects that will not be seen or hidden in the actual scene, thereby reducing the amount of data submitted to the rendering pipeline per frame, which can enhance the rendering effect and improve rendering efficiency;

[0071] In the rendering process, building components with the same status are merged into one draw call, and the draw call is performed in batches; in specific rendering, the CPU issues an instruction to notify the GPU to execute a specified rendering task, which is a draw call (Draw Call), and the instruction exists in the command buffer; the command buffer is like a corridor, and each unit Draw Call is a postman holding a letter running from the CPU room to the GPU room. If there are too many Draw Calls, the corridor will become crowded, and a batch of letters that can be delivered quickly will take longer to arrive, which will eventually lead to a longer frame rendering time; in the present invention, by merging building components to reduce draw calls, it is possible to achieve an optimized performance effect; in specific implementation, static batches of draw calls can be formed through preprocessing, or dynamic adjustments can be made when drawing each frame, which is called dynamic batch merging;

[0072] At the same time, multi-threaded scheduling and first-frame rendering optimization are used to accelerate rendering efficiency and ensure smooth display of the rendered lightweight building model.

[0073] Based on the same inventive concept, the present application also provides a device corresponding to the method in Example 1, see Example 2 for details.

[0074] Embodiment 2

[0075] In this embodiment, a building model compression processing device is provided. Figure 2 As shown, the device includes a drawing import module, a component traversal module, a graphic element merging module, a processing and saving module, and a rendering output module;

[0076] The drawing import module is used to import the designed three-dimensional building information model drawing;

[0077] The component traversal module is used to traverse and analyze the building component information in the three-dimensional building information model diagram to generate a building component list;

[0078] The graphic element merging module is used to describe the multi-dimensional parameter information of each building component in the building component list, perform graphic element merging processing on the building components according to the multi-dimensional parameter information, and draw and generate a lightweight building model;

[0079] The processing and saving module is used to perform secondary processing on the lightweight building model and store the processed model file locally;

[0080] The rendering output module is used to render the lightweight building model and output a rendered rendering of the lightweight model.

[0081] The present invention traverses and analyzes the building component information in the three-dimensional building information model diagram, describes each building component through a series of parameters, and merges the elements of the same type of building components, which can greatly reduce the number of elements of the building components, greatly reduce the volume of the processed three-dimensional building information model, and produce the effect of a lightweight model; at the same time, the lightweight building model is processed twice, and the obtained model file is stored locally, which can reduce the time for BIM Server network interactive download, thereby effectively shortening the loading time of the lightweight building model. Therefore, the technical solution of the present invention can realize the output of a lightweight building model with small volume and high flexibility, so that it can be quickly loaded and used on the web and mobile terminals, so as to adapt to the trend of three-dimensional models moving from desktop terminals to web and mobile terminals.

[0082] In the present invention, before importing the three-dimensional building information model diagram into the BIM software, it is necessary to use BIM technology to design and construct the three-dimensional building information model diagram from the ideas in the brain, and record the various professional and technical parameters of each floor through the real model, so that each profession such as architecture, structure, water supply and drainage, HVAC, and electrical can work based on the same model, thereby achieving the architectural effect of optimized design. Since BIM data accurately and comprehensively displays the external and internal models of the building, the original design model retains a lot of information in the design process, making the model volume large, especially after integrating multiple professional models, the volume will increase by an order of magnitude, so the requirements for hardware will be very harsh, resulting in the performance of BIM data in the use scenario to be improved. In addition, in the specific design, an interlaced structure is used for design to prohibit the generation of overlapping surfaces.

[0083] In order to lightweight the designed 3D building information model, it is necessary to import the designed 3D building information model diagram into the BIM software; when opening the BIM software to import the 3D building information model diagram, you need to first select the storage location of the 3D building information model diagram, and select basic information such as color, positioning, and unit. After saving successfully, you can import the 3D building information model diagram into the project to prepare for model drawing.

[0084] In the example of the present invention, the traversal and analysis of the building component information in the three-dimensional building information model diagram to generate a building component list includes:

[0085] After the 3D building information model diagram is successfully imported, each building component in the 3D building information model diagram is traversed, all node data of each building component is analyzed, and valid building component information is extracted to generate a building component list; wherein the node data at least includes geometric data (such as vertices, normal vectors, UV coordinate planes, etc.), material data (such as color, material, ambient light, transparency, etc.) and attribute data (such as subset attributes, data, etc.). In the generated building component list, various information items such as the name, number, geometric data, material data, attribute data, etc. of the building component can be included to facilitate the subsequent parameter description of the building component.

[0086] In the example of the present invention, the multi-dimensional parameter information describing each building component in the building component list and performing primitive merging processing on the building components according to the multi-dimensional parameter information include:

[0087] Use a series of parameters to describe each building component in the building component list to obtain multi-dimensional parameter information of the building component; for example, in specific implementation, the geometric parameters, attribute parameters, material parameters, category parameters, functional parameters, etc. of each building component can be described, thereby obtaining multi-dimensional parameter information of the building component; for example, taking the building component as a window, the multi-dimensional parameter information of the window such as material, light transmittance, color, vertex coordinates, size, number, etc. can be described; with the help of parameter description, it is possible to well realize the merging of graphic elements of structures of the same type to achieve the purpose of lightweight model;

[0088] According to the obtained multi-dimensional parameter information, all building components in the building component list are classified by family and category, and building components belonging to the same category are merged, specifically including at least one of the following merging processes:

[0089] Merge and reduce the surface of the same type of building components. In specific implementation, for doors, windows, load-bearing columns, plates, structural beams and other types, you can merge and reduce the surface of building components belonging to the same category and family. For example, on the same floor, at the junction of walls, you can merge the redundant walls, and finally merge multiple walls into one. By merging and reducing the surface of building components of the same category, the number of building component elements can be greatly reduced, the model volume can be greatly reduced, and the effect of lightweight model can be produced;

[0090] For two or more building components with exactly the same structure but different positions, one building component is retained, and only one reference + spatial coordinate is recorded for the other identical building components; in specific implementation, for some doors, windows, load-bearing columns, plates, structural beams, etc. that only differ in position, only one building component data can be retained, and only one reference + spatial coordinate is recorded for the other identical building components. Through the reference, it is clear which retained building component data is referenced, and the specific position of the building component can be known through the spatial coordinate; for example, if there are 8 doors with exactly the same structure but different positions in the model, the data of one of the doors can be retained, and only one reference + spatial coordinate information is recorded for the other 7 doors; by retaining the data of only one building component for multiple building components with exactly the same structure but different positions, the number of building components can be reduced and the model volume can be reduced;

[0091] The intersections of adjacent building components are merged and reduced. For example, some repeated vertices can be directly removed. By merging and reducing the intersections of adjacent building components, the vertices and faces that intersect on adjacent faces and intersection lines can be removed, thereby achieving the effect of a lightweight model.

[0092] Since the initially imported 3D building information model is a large model with a relatively complex structure and a lot of retained data information, the number of building components can be effectively reduced and the volume of the model can be reduced by merging the building components belonging to the same category. In addition, in the specific implementation of the present invention, a similarity algorithm can be used to merge the building components belonging to the same category.

[0093] In the example of the present invention, after the building components are merged according to the multi-dimensional parameter information, the method further includes: batch drawing component models of building components with the same state (i.e., the same category) to improve the drawing efficiency of the model. For example, for walls of the same material, batch drawing can be performed to quickly build a batch of building models with the same state.

[0094] In the example of the present invention, after drawing and generating the lightweight building model, the method further includes:

[0095] According to the accuracy requirements of different application scenarios, the triangle data in the generated lightweight building model is processed by triangulation method to obtain a lightweight building model that meets different precision requirements.

[0096] The more triangles used to describe a three-dimensional model of a geometric body (called triangulated geometric description), the finer the model will look, and vice versa. At the same time, due to the different requirements for model precision in different scenarios during specific use, a low degree of refinement is required when viewing a panoramic mode at a long distance, and a high degree of refinement is required when viewing a single primitive at a close distance. The present invention obtains triangle data in the generated lightweight building model, and processes the obtained triangle data using a triangulation method according to the accuracy requirements of different application scenarios, thereby greatly improving the flexibility of subsequent use, and can generate models of corresponding precision according to the precision requirements of different application scenarios.

[0097] In the example of the present invention, the secondary processing of the lightweight building model includes:

[0098] The ifc format file of the lightweight building model is compressed into a dae format file, and then the dae format file is compressed into a gltf format file, and finally the gltf format file is compressed into a json format file and output and saved. In the present invention, the lightweight building model is processed twice, and finally output in the json file format, and the output model file is stored locally, which can effectively reduce the time of BIM Server network interactive download, thereby effectively shortening the loading time of the lightweight building model, and facilitating the loading and use of the web terminal and the mobile terminal.

[0099] In the example of the present invention, the rendering operation of the lightweight building model includes:

[0100] Use the occlusion culling algorithm to render lightweight building models. The so-called occlusion culling algorithm is to delete objects that will not be seen or hidden in the actual scene, thereby reducing the amount of data submitted to the rendering pipeline per frame, which can enhance the rendering effect and improve rendering efficiency;

[0101] In the rendering process, building components with the same status are merged into one draw call, and the draw call is performed in batches; in specific rendering, the CPU issues an instruction to notify the GPU to execute a specified rendering task, which is a draw call (Draw Call), and the instruction exists in the command buffer; the command buffer is like a corridor, and each unit Draw Call is a postman holding a letter running from the CPU room to the GPU room. If there are too many Draw Calls, the corridor will become crowded, and a batch of letters that can be delivered quickly will take longer to arrive, which will eventually lead to a longer frame rendering time; in the present invention, by merging building components to reduce draw calls, it is possible to achieve an optimized performance effect; in specific implementation, static batches of draw calls can be formed through preprocessing, or dynamic adjustments can be made when drawing each frame, which is called dynamic batch merging;

[0102] At the same time, multi-threaded scheduling and first-frame rendering optimization are used to accelerate rendering efficiency and ensure smooth display of the rendered lightweight building model.

[0103] Since the device introduced in the second embodiment of the present invention is a device used to implement the method of the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the device based on the method introduced in the first embodiment of the present invention, so it is not described here in detail. All devices used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.

[0104] Based on the same inventive concept, the present application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.

[0105] Embodiment 3

[0106] This embodiment provides an electronic device, such as Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.

[0107] Since the electronic device introduced in this embodiment is a device used to implement the method in the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the device used by the method in the embodiment of the present application, it belongs to the scope of protection of the present application.

[0108] Based on the same inventive concept, the present application provides a storage medium corresponding to the first embodiment, see the fourth embodiment for details.

[0109] Embodiment 4

[0110] This embodiment provides a computer-readable storage medium, such as Figure 4 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, any implementation method in Example 1 can be implemented.

[0111] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0113] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0115] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A method for compressing a building model, Features: The method comprises: Import the designed 3D building information model; Traverse and analyze the building component information in the 3D building information model diagram to generate a building component list; Describe the multi-dimensional parameter information of each building component in the building component list, merge the building components according to the multi-dimensional parameter information, and draw and generate a lightweight building model; the multi-dimensional parameter information of each building component in the building component list and merge the building components according to the multi-dimensional parameter information include: using a series of parameters to describe each building component in the building component list to obtain the multi-dimensional parameter information of the building component; according to the obtained multi-dimensional parameter information, classify all the building components in the building component list by family and category, and merge the building components belonging to the same category, specifically including at least one of the following merging processes: merge and reduce the surface of the same type of building components, merge and reduce the surface of the intersection of adjacent building components; The lightweight building model is subjected to secondary processing, and the processed model file is stored locally; the secondary processing of the lightweight building model comprises: compressing the ifc format file of the lightweight building model into a dae format file, then compressing the dae format file into a gltf format file, and finally compressing the gltf format file into a json format file and outputting and saving it; Render the lightweight building model and output the rendered lightweight model effect diagram; After the building components are processed by merging the graphic elements according to the multi-dimensional parameter information, the method further includes: batch drawing component models of the building components with the same status.

2. A method for compressing a building model according to claim 1, Features: The traversal and analysis of the building component information in the three-dimensional building information model diagram to generate a building component list includes: After the three-dimensional building information model diagram is successfully imported, each building component in the three-dimensional building information model diagram is traversed, all node data of each building component is analyzed, and valid building component information is extracted to generate a building component list; wherein the node data includes at least geometric data, material data and attribute data.

3. A method for compressing a building model according to claim 1, Features: After drawing and generating a lightweight building model, it also includes: According to the accuracy requirements of different application scenarios, the triangle data in the generated lightweight building model is processed by triangulation method to obtain a lightweight building model that meets different precision requirements.

4. A method for compressing a building model according to claim 1, Features: The rendering operation of the lightweight building model includes: The lightweight building model is rendered using the occlusion culling algorithm. During the rendering process, the building components with the same status are merged into one drawing call, and the drawing calls are performed in batches. At the same time, multi-threaded scheduling and first-frame rendering optimization are used to accelerate rendering efficiency.

5. A building model compression processing device, used to execute a building model compression processing method according to any one of claims 1 to 4, Features: The device includes a drawing import module, a component traversal module, a graphic element merging module, a processing and saving module, and a rendering output module; The drawing import module is used to import the designed three-dimensional building information model drawing; The component traversal module is used to traverse and analyze the building component information in the three-dimensional building information model diagram to generate a building component list; The graphic element merging module is used to describe the multi-dimensional parameter information of each building component in the building component list, perform graphic element merging processing on the building components according to the multi-dimensional parameter information, and draw and generate a lightweight building model; The processing and saving module is used to perform secondary processing on the lightweight building model and store the processed model file locally; The rendering output module is used to render the lightweight building model and output a rendered rendering of the lightweight model.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.