Building model data compression method and device, equipment, storage medium and product
By decomposing and targeted compression of BIM data, combining spatial data compression and traditional data compression algorithms, the problem of unbalanced resource consumption and processing efficiency in the existing technology is solved, and efficient data compression and simplified data management are achieved.
Patent Information
- Application Number
- CN202411807647.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-11
AI Technical Summary
When the prior art compresses BIM data, it cannot balance resource consumption and processing efficiency. Lossless compression is complex and time-consuming, while lossy compression will lead to data loss and accuracy reduction.
By decomposing the building model data into geometric data and attribute data, a spatial data compression algorithm is used for geometric data, combined with lossless and lossy compression algorithms, non-core geometric data is lost; a traditional data compression algorithm is used for attribute data, and the compressed data is merged and stored.
It improves the processing efficiency of BIM data, reduces resource consumption, simplifies data management and access, and improves data transmission and storage efficiency.
Smart Images

Figure CN119814041A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment, storage medium and product for compressing building model data. Background Art
[0002] Building Information Modeling (BIM) integrates various information in the entire life cycle of building design, construction and operation and maintenance, including rich geometric information (such as the shape, size and location of the building), attribute information (such as material type, equipment specifications and room functions) and association relationships (such as the connection method and spatial relationship between components). Building information models are stored in digital form, allowing all participants in the construction project to work together on a common information platform, thereby improving the efficiency and quality of the project. Since BIM data contains a lot of detailed information, its file size is usually large, resulting in high consumption of computing resources, network bandwidth and storage space. In addition, during the data transmission and storage process, the huge BIM files will not only increase the transmission time, but also take up a lot of storage space, thus affecting the progress and cost of the entire project.
[0003] Currently, BIM data can be compressed using lossless compression and lossy compression to reduce resource consumption during the transmission and storage of BIM data. However, the compression and decompression processes of the lossless compression algorithm are complex and time-consuming, and the processing efficiency of BIM data is low. Although the lossy compression algorithm performs better in processing efficiency, it will cause data loss and reduced precision during the compression process, reducing the accuracy of BIM data.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a building model data compression method, device, equipment, storage medium and product, aiming to solve the technical problem of being unable to balance resource consumption and processing efficiency when compressing BIM data.
[0006] To achieve the above purpose, the present application proposes a method for compressing building model data, the method comprising:
[0007] Acquire building model data, and perform data decomposition on the building model data to obtain geometric data and attribute data;
[0008] Compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data;
[0009] The compressed geometric data and the compressed attribute data are combined into combined compressed data, and the combined compressed data is stored in a preset database.
[0010] In one embodiment, before the step of compressing the geometric data by using a spatial data compression algorithm to obtain compressed geometric data, the method further includes:
[0011] Performing geometric optimization on the geometric data to obtain optimized geometric data;
[0012] Performing a duplicate element removal process on the optimized geometric data to obtain processed geometric data;
[0013] The step of compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data comprises:
[0014] The processed geometric data is compressed by a spatial data compression algorithm to obtain compressed geometric data.
[0015] In one embodiment, the step of geometrically optimizing the geometric data to obtain optimized geometric data includes:
[0016] Determine redundant vertices from each vertex of the geometric data according to a preset screening rule, and delete the redundant vertices to obtain intermediate geometric data;
[0017] According to the position of each vertex in the intermediate geometric data and the adjacent relationship between each vertex in the intermediate geometric data, the model edge and the model surface are constructed to obtain the optimized geometric data.
[0018] In one embodiment, the step of compressing the geometric data by using a spatial data compression algorithm to obtain compressed geometric data includes:
[0019] Determine core geometric data and non-core geometric data in the geometric data;
[0020] The core geometric data is compressed by a lossless spatial data compression algorithm to obtain first compressed data, and the non-core geometric data is compressed by a lossy spatial data compression algorithm to obtain second compressed data. The first compressed data and the second compressed data are used as compressed geometric data.
[0021] In one embodiment, after the step of compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data, the step further includes:
[0022] Verifying whether the compressed geometric data and the compressed attribute data match each other;
[0023] In the case where the compressed geometric data and the compressed attribute data match, the compressed geometric data and the compressed attribute data are merged into merged compressed data, the merged compressed data is stored in a preset database, and a data decompression interface corresponding to the merged compressed data is generated.
[0024] In one embodiment, after the step of merging the compressed geometric data and the compressed attribute data into combined compressed data and storing the combined compressed data in a preset database, the method further includes:
[0025] Generating a data decompression interface corresponding to the combined compressed data, and storing the data decompression interface in a preset server;
[0026] If a model viewing request sent by a front-end application is received, a target decompression interface corresponding to the model viewing request is determined from the preset server;
[0027] The target compressed data corresponding to the model reference request is retrieved from the preset database based on the target decompression interface, the target compressed data is decompressed through the target decompression interface to obtain decompressed model data, and the decompressed model data is sent to the front-end application.
[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a building model data compression device, the building model data compression device comprising:
[0029] An acquisition module is used to acquire building model data and perform data decomposition on the building model data to obtain geometric data and attribute data;
[0030] A compression module, used to compress the geometric data by using a spatial data compression algorithm to obtain compressed geometric data, and to compress the attribute data by using a traditional data compression algorithm to obtain compressed attribute data;
[0031] The merging module is used to merge the compressed geometric data and the compressed attribute data into merged compressed data, and store the merged compressed data in a preset database.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a building model data compression device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the building model data compression method described above.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the building model data compression method described above are implemented.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the building model data compression method described above are implemented.
[0035] In the present application, building model data is acquired and data decomposition is performed on the building model data to obtain geometric data and attribute data; the geometric data is compressed by a spatial data compression algorithm to obtain compressed geometric data, and the attribute data is compressed by a traditional data compression algorithm to obtain compressed attribute data; the compressed geometric data and the compressed attribute data are merged into merged compressed data, and the merged compressed data is stored in a preset database.
[0036] In this application, by decomposing the building model data into geometric data and attribute data, a spatial data compression algorithm is used to compress the geometric data. Since the spatial data compression algorithm is usually optimized for geographic spatial data or three-dimensional model data, the spatial data compression algorithm can efficiently compress the geometric data while maintaining the accuracy and integrity of the geometric data as much as possible. The attribute data is compressed using a traditional data compression algorithm. The attribute data usually includes data of types such as text and numerical values. The use of traditional data compression methods can have a higher efficiency and compression ratio.
[0037] In summary, the present application avoids the complexity of lossless compression and the data loss of lossy compression by decomposing the data and adopting different targeted compression methods for different data, thereby improving the processing efficiency of BIM data and reducing resource consumption.
[0038] In addition, the compressed geometric data and attribute data are combined into combined compressed data and stored, which simplifies data management and access and can improve data transmission and storage efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A schematic diagram of a flow chart provided for Embodiment 1 of the building model data compression method of the present application;
[0042] Figure 2 A schematic diagram of the architecture of a building model data compression system provided in one embodiment of the present application;
[0043] Figure 3 A schematic diagram of the application process of the building model data compression method provided in one embodiment of the present application;
[0044] Figure 4 This is a schematic diagram of the module structure of the building model data compression device according to an embodiment of the present application;
[0045] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the building model data compression method in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of the embodiment of the present application is: obtaining building model data, and decomposing the building model data to obtain geometric data and attribute data; compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data; merging the compressed geometric data and the compressed attribute data into merged compressed data, and storing the merged compressed data in a preset database.
[0050] In this embodiment, for ease of description, the following description is made by taking the building data model compression device as the execution subject.
[0051] Currently, BIM data can be compressed using lossless compression and lossy compression to reduce resource consumption during the transmission and storage of BIM data. However, the compression and decompression processes of the lossless compression algorithm are complex and time-consuming, and the processing efficiency of BIM data is low. Although the lossy compression algorithm performs better in processing efficiency, it will cause data loss and reduced precision during the compression process, reducing the accuracy of BIM data.
[0052] The present application provides a solution by decomposing the building model data into geometric data and attribute data, and using a spatial data compression algorithm to compress the geometric data. Since the spatial data compression algorithm is usually optimized for geographic spatial data or three-dimensional model data, the spatial data compression algorithm can efficiently compress the geometric data while maintaining the accuracy and integrity of the geometric data as much as possible. The attribute data is compressed using a traditional data compression algorithm. The attribute data usually includes data of types such as text and numbers. The use of traditional data compression methods can have higher efficiency and compression ratio. In summary, the present application avoids the complexity of lossless compression and the data loss of lossy compression by decomposing the data and using different targeted compression methods for different data, thereby improving the processing efficiency of BIM data and reducing resource consumption.
[0053] In addition, the compressed geometric data and attribute data are combined into combined compressed data and stored, which simplifies data management and access and can improve data transmission and storage efficiency.
[0054] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a building model data compression device, etc. The following takes the building model data compression device as an example to illustrate this embodiment and the following embodiments.
[0055] Based on this, the embodiment of the present application provides a method for compressing building model data, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the building model data compression method of the present application.
[0056] In this embodiment, the building model data compression method includes steps S10 to S30:
[0057] Step S10, acquiring building model data, and performing data decomposition on the building model data to obtain geometric data and attribute data;
[0058] BIM data contains the physical and functional characteristics of building facilities, including but not limited to geometric information (such as shape, size, location), and non-geometric information (such as materials, cost, performance, maintenance, etc.). In this embodiment, in order to effectively process BIM data, BIM data is decomposed into two main parts: geometric data and attribute data. Geometric data refers to data that describes the physical characteristics of each element in the building model (such as walls, columns, windows, etc.), such as shape, size, location, etc., and is used to generate a three-dimensional representation of the building. Attribute data is opposite to geometric data. Attribute data contains non-geometric information associated with building model elements, such as material type, color, manufacturer information, cost estimation, etc.
[0059] By decomposing the data into two parts, geometry and attributes, different compression algorithms can be applied to different types of data, effectively reducing the data size and improving data processing efficiency.
[0060] Step S20, compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data;
[0061] Geometric data usually has spatial characteristics, such as redundancy, correlation, and pattern, so it is processed using spatial data compression algorithms, while attribute data is more similar to traditional text or digital data and is suitable for compression using traditional data compression algorithms. It should be noted that spatial data compression algorithms can use the characteristics of spatial data (such as redundancy, correlation, etc.) to reduce data size while maintaining data accuracy and interpretability. Traditional data compression algorithms are widely used general compression methods that are not specific to any data type, but are based on the statistical characteristics or patterns of data to reduce data size. Traditional data compression algorithms can include lossless compression algorithms (such as Huffman coding, LZ77 / LZ78 algorithms) and lossy compression algorithms (such as JPEG, MP3).
[0062] By applying appropriate compression algorithms, the storage space required for geometry and attribute data can be significantly reduced, and subsequent data access speed can be increased, thereby improving overall performance. When transmitting data, compressed data can be transmitted faster, reducing bandwidth consumption and transmission time.
[0063] In a feasible implementation, the geometric data can be divided into a plurality of geometric sub-data according to a preset division rule, and then each geometric sub-data is compressed by a spatial data compression algorithm to obtain first compressed sub-data, and each first compressed sub-data is merged into compressed geometric data; the attribute data can be divided into a plurality of attribute sub-data according to the division rule, and then each attribute sub-data is compressed by a traditional data compression algorithm to obtain second compressed sub-data, and each second compressed sub-data is merged into compressed attribute data. By dividing a large data set into smaller sub-data, these sub-data can be processed in parallel, thereby accelerating the compression process and significantly improving the compression efficiency.
[0064] Step S30: merge the compressed geometry data and the compressed attribute data into merged compressed data, and store the merged compressed data in a preset database.
[0065] After the geometry data and attribute data are compressed separately, they are merged into a whole (i.e., merged compressed data) for subsequent processing and analysis. The merged compressed data can be stored in a preset database for quick access when needed. It can be understood that merging compressed data integrates geometry and attribute data into a whole, which is convenient for subsequent data processing and analysis, simplifies the data management process, and improves the convenience of data access.
[0066] In a feasible implementation manner, after the step S30 of merging the compressed geometric data and the compressed attribute data into combined compressed data and storing the combined compressed data in a preset database, the step further includes:
[0067] Step S40, generating a data decompression interface corresponding to the combined compressed data, and storing the data decompression interface in a preset server;
[0068] The data decompression interface is a programming interface that allows front-end applications or other system components to access and decompress the merged compressed data stored in the database through a specific request format and protocol. The data decompression interface defines how to obtain the merged compressed data from the database and apply the appropriate decompression algorithm to restore its original geometry and attribute information. This interface usually contains a series of functions and methods for processing data reading, decompression, and format conversion operations, so that the front-end application does not need a specific decompression process, but only needs to obtain the decompressed data by calling the interface. It can be understood that the data decompression interface simplifies the complexity of data decompression and improves the scalability and maintainability of the system. Through the interface, the front-end application can easily obtain the required decompressed model data without directly processing the complex decompression logic.
[0069] Step S50: if a model viewing request sent by the front-end application is received, a target decompression interface corresponding to the model viewing request is determined from the preset server, and target compressed data is obtained from the preset database based on the target decompression interface;
[0070] The front-end application is the main channel for users to interact with the system, providing an intuitive and easy-to-use user interface so that users can easily view and manipulate data. In building model data compression, the front-end application may be a BIM data viewer or a BIM data renderer, which is not limited here. When a user requests to view a building model through a front-end application, the system will receive a model viewing request. The request contains the model identification information (such as model identification number, version number, etc.) of the model that the user wants to view. Based on the model viewing request, the corresponding decompression interface is determined from the preset server, hereinafter referred to as the target decompression interface for distinction. The target decompression interface can be a data decompression interface or a decompression interface corresponding to other BIM compressed data, which is not limited here.
[0071] Step S60, based on the target decompression interface, retrieve the target compressed data corresponding to the model reference request from the preset database, decompress the target compressed data through the target decompression interface to obtain decompressed model data, and send the decompressed model data to the front-end application.
[0072] Based on the model identification information carried by the model reference request, the corresponding compressed data (hereinafter referred to as target compressed data for distinction) is retrieved from the database through the data decompression interface, and the target compressed data is decompressed through the target decompression interface to obtain the decompressed model data. That is, the decompressed model data refers to the data obtained by restoring the target compressed data to the original geometric data and attribute data through the decompression algorithm, and the decompressed model data is sent to the front-end application.
[0073] By providing a data decompression and display mechanism, it ensures that the front-end application can correctly display and operate the building model data, reduces the burden on the front-end application and reduces potential errors and failure points, and enhances the scalability and maintainability of the system.
[0074] In some feasible implementations, in a building information model (BIM) management system, in order to improve the reliability of the system and the efficiency of data access, the architecture of the main server and the backup server is adopted, that is, the preset server includes the main server and the backup server. The architecture of the main server and the backup server can ensure that the data decompression interface is still available when the main server fails, and provide a backup and fault switching mechanism for the data decompression interface. In this implementation, after the step of generating the data decompression interface corresponding to the merged compressed data, it also includes: copying the data decompression interface to obtain a backup decompression interface, storing the data decompression interface to the main server, and storing the backup decompression interface to the backup server. The main server is a server that bears the main workload in a server cluster or a high-availability system, responsible for processing most of the client requests, executing key business logic, and providing data storage and retrieval services; the backup server is a device that serves as a backup or redundant server of the main server in a server cluster or a high-availability system. The backup server serves as a redundant storage point for data to prevent data loss and take over the work of the main server when the main server fails, thereby improving the continuity of business services.
[0075] In this embodiment, before the step of obtaining the target compressed data from the preset database through the data decompression interface, it also includes: obtaining the target decompression interface from the main server and detecting whether the target decompression interface is normal; if the target decompression interface is normal, obtaining the target compressed data from the preset storage space through the target decompression interface; if the target decompression interface is abnormal, obtaining the backup decompression interface from the backup server, and obtaining the target compressed data from the preset storage space based on the backup decompression interface.
[0076] In this embodiment, by decomposing the building model data into geometric data and attribute data, a spatial data compression algorithm is used to compress the geometric data. Since the spatial data compression algorithm is usually optimized for geographic spatial data or three-dimensional model data, the spatial data compression algorithm can efficiently compress the geometric data while maintaining the accuracy and integrity of the geometric data as much as possible. The attribute data is compressed using a traditional data compression algorithm. The attribute data usually includes text, numerical data and other types of data. The use of traditional data compression methods can have higher efficiency and compression ratio. In summary, this embodiment avoids the complexity of lossless compression and the data loss of lossy compression by decomposing the data and using different targeted compression methods for different data, thereby improving the processing efficiency of BIM data and reducing resource consumption.
[0077] In addition, the compressed geometric data and attribute data are combined into combined compressed data and stored, which simplifies data management and access and can improve data transmission and storage efficiency.
[0078] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. On this basis, before the step S20: compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, it also includes:
[0079] Step S01, performing geometric optimization on the geometric data to obtain optimized geometric data;
[0080] The original geometric data may contain a large amount of redundant information and unnecessary details. This information will not only increase the amount of calculation in the subsequent compression process, but may also affect the compression effect. Therefore, these redundant information is removed through geometric optimization, and the data obtained after geometric optimization is called optimized geometric data. Geometric optimization refers to the process of processing geometric data to reduce its complexity, improve data quality or optimize its storage and rendering efficiency while keeping the basic characteristics of the geometric shape unchanged, including but not limited to the rearrangement, merging, simplification or smoothing of elements such as vertices, edges, and faces of geometric bodies. It can be understood that through geometric optimization processing, the storage requirements of data can be reduced, storage efficiency can be improved, a better data foundation can be provided for the subsequent compression process, and the compression ratio and compression efficiency can be improved.
[0081] Step S02, performing a process of removing duplicate elements on the optimized geometric data to obtain processed geometric data;
[0082] Although geometry optimization removes some redundant information, there may still be some duplicate elements. Duplicate elements will not only increase the storage space requirements of the data, but may also affect the subsequent compression effect and rendering performance. Therefore, duplicate element removal is used to further reduce data redundancy. The geometry data after duplicate element removal is called processed geometry data. Duplicate element removal refers to the process of identifying and removing duplicate vertices, edges, faces or other geometric elements in geometry data. It can be understood that by removing duplicate geometric elements, the storage space requirements of the data are reduced, the compactness of the data is improved, and thus the compression ratio and efficiency are improved.
[0083] The step S20: compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, comprises:
[0084] Step S201 : compressing the processed geometric data by a spatial data compression algorithm to obtain compressed geometric data.
[0085] The processed geometric data is compressed by a spatial data compression algorithm to obtain compressed geometric data. After geometric optimization and repeated element removal, the data has become more compact and consistent. The application of spatial data compression algorithm can further reduce the storage space requirement of the data while maintaining its key features and accuracy.
[0086] In a feasible implementation manner, the step S02: performing geometric optimization on the geometric data to obtain optimized geometric data, comprises:
[0087] Step S021, determining redundant vertices from each vertex of the geometric data according to a preset screening rule, and deleting the redundant vertices to obtain intermediate geometric data;
[0088] Preset screening rules refer to rules for screening and identifying redundant or unnecessary elements (such as vertices, edges, faces, etc.) according to certain standards or conditions when processing geometric data. These rules are usually formulated based on the characteristics of geometric data, application requirements or algorithm requirements, and are not limited here. Each vertex of geometric data refers to the basic points that constitute the geometric shape. In three-dimensional geometric data, each vertex usually has three coordinate values (x, y, z) to indicate its position in three-dimensional space. Redundant vertices refer to vertices in geometric data that do not contribute substantially to the description of the geometric shape or can be replaced by other vertices. Redundant vertices may be caused by errors in the data generation process, repeated operations or unnecessary subdivisions.
[0089] Traverse all vertices of the geometric data and determine whether each vertex is a redundant vertex according to the preset filtering rules. For example, if the distance between two vertices is less than a certain threshold and their normal angle is also within the tolerance range, then one of the two vertices may be regarded as a redundant vertex; then delete all vertices identified as redundant to obtain intermediate geometric data.
[0090] Step S022, constructing model edges and model faces according to the positions of the vertices in the intermediate geometric data and the adjacent relationships between the vertices in the intermediate geometric data to obtain optimized geometric data.
[0091] It should be noted that the position of each vertex in the intermediate geometric data refers to the coordinate value of the remaining vertices in three-dimensional space after removing redundant vertices. The position information is used for the subsequent construction of model edges and model faces. The adjacent relationship between each vertex in the intermediate geometric data refers to the spatial connection relationship between the remaining vertices after removing redundant vertices. The adjacent relationship can be represented by an edge, that is, if there is an edge between two vertices, the two vertices are adjacent. A model edge refers to a line segment connecting two vertices and used to construct the boundary or internal structure of a geometric shape. In three-dimensional geometric data, a model edge is usually determined by the coordinate values of two vertices. A model face refers to a polygonal area enclosed by three or more vertices, which is used to represent the surface of a geometric shape. In three-dimensional geometric data, a model face is usually determined by the coordinate values and adjacent relationships of the vertices.
[0092] According to the position and adjacent relationship of each vertex in the intermediate geometric data, determine which vertices should be connected to form an edge, which can be determined based on factors such as the distance between vertices and the direction of the normal line, which are not limited here; construct the face of the model based on the connected vertices; optimize and adjust the constructed model edges and model faces to further improve the accuracy and rendering effect of the geometric data, including but not limited to edge smoothing, face subdivision and other operations. In this embodiment, the edges and faces of the model are reconstructed according to the position and adjacent relationship of the remaining vertices in the intermediate geometric data to ensure that the optimized geometric data still retains the key features of the original geometric shape. The optimization adjustment can further improve the accuracy and smoothness of the geometric data, making it more consistent with the appearance of the actual object, and providing a more efficient and accurate data foundation for subsequent data compression, rendering, analysis and other applications.
[0093] In one feasible implementation, the step S201: compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, comprises:
[0094] Step S201, determining core geometric data and non-core geometric data in the geometric data;
[0095] Core geometric data refers to the part of geometric data that plays a decisive role in describing the overall shape, structure and key features. It may include vertices, edges and faces that constitute the main outline, key details and key connection points of geometric shapes. Core geometric data is the foundation and skeleton of geometric shapes and is essential to maintaining the accuracy and integrity of geometric shapes. Non-core geometric data refers to the part of geometric data that does not play a decisive role in describing the overall shape, structure and key features, or that can be approximated or omitted without affecting the overall visual effect. It may include some detail vertices, redundant edges or faces, etc. Non-core geometric data plays an auxiliary role in describing geometric shapes.
[0096] In this implementation, there is no limitation on the method of determining core geometric data and non-core geometric data. For example, which parts belong to core geometric data can be determined based on the complexity, detail level, and rendering requirements of the model. By distinguishing between core and non-core geometric data, compression algorithms and parameters can be selected more specifically, thereby improving compression efficiency and maintaining key features and accuracy of geometric shapes after compression.
[0097] Step S202, compressing the core geometric data by a lossless spatial data compression algorithm to obtain first compressed data, and compressing the non-core geometric data by a lossy spatial data compression algorithm to obtain second compressed data, and using the first compressed data and the second compressed data as compressed geometric data.
[0098] The core geometry data is compressed using a lossless compression algorithm to obtain the first compressed data, to ensure that no key information is lost during the compression process; the non-core geometry data is compressed using a lossy compression algorithm to obtain the second compressed data, to further improve the compression ratio and compression efficiency. By combining lossless and lossy compression algorithms, the overall compression ratio can be further improved while maintaining the integrity of the core geometry data. The compressed geometry data takes up less resources during storage and transmission, which helps to improve rendering efficiency and reduce system load.
[0099] In a feasible implementation manner, after the step S20: compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data, the step further includes:
[0100] Step S70, checking whether the compressed geometric data and the compressed attribute data match each other;
[0101] In the data compression process, checking the matching between compressed geometric data and compressed attribute data can ensure that the association between geometric data and attribute data is not destroyed during the data compression process, and the two remain consistent in logic and structure. It should be noted that before data compression, a clear association index is first established between geometric data and attribute data. The association index can be a unique identifier, spatial location, timestamp or other related attributes to ensure that each geometric element can be accurately matched with its corresponding attribute data through the association index. After compression is completed, the previously established association index is used to check the matching of the compressed geometric data and attribute data. Specifically, the verification can be performed by comparing the association identifiers, data quantity, structural consistency, etc. of the two; if the association indexes of the compressed geometric data and the compressed attribute data match, it is determined that the compressed geometric data and the compressed attribute data match; if the association indexes of the compressed geometric data and the compressed attribute data do not match, it is determined that the compressed geometric data and the compressed attribute data do not match.
[0102] Step S80, when the compressed geometric data and the compressed attribute data match, execute the merging of the compressed geometric data and the compressed attribute data into merged compressed data, store the merged compressed data in a preset database, and generate a data decompression interface corresponding to the merged compressed data.
[0103] After confirming that the compressed geometry data and compressed attribute data match correctly, the two are merged into a whole data package, that is, the merged compressed data, and the merged compressed data is stored in a preset database for subsequent data use or processing. In order to facilitate the subsequent data decompression and use, a data decompression interface corresponding to the merged compressed data can be generated. The interface can provide functions such as decompression algorithm, parameter setting, and data format conversion, so that users can easily decompress and use the merged compressed data.
[0104] In this embodiment, by decomposing the building model data into geometric data and attribute data, a spatial data compression algorithm is used to compress the geometric data. Since the spatial data compression algorithm is usually optimized for geographic spatial data or three-dimensional model data, the spatial data compression algorithm can efficiently compress the geometric data while maintaining the accuracy and integrity of the geometric data as much as possible. The attribute data is compressed using a traditional data compression algorithm. The attribute data usually includes text, numerical data and other types of data. The use of traditional data compression methods can have higher efficiency and compression ratio. In summary, this embodiment avoids the complexity of lossless compression and the data loss of lossy compression by decomposing the data and using different targeted compression methods for different data, thereby improving the processing efficiency of BIM data and reducing resource consumption.
[0105] In addition, the compressed geometric data and attribute data are combined into combined compressed data and stored, which simplifies data management and access and can improve data transmission and storage efficiency.
[0106] For example, to help understand the implementation process of the building model data compression method obtained by combining the first embodiment and the second embodiment, please refer to Figure 2 ,The system architecture of building model data compression can include three core ,components: cloud server, user front-end interface and 3D rendering library. The cloud server serves as the backend support, including a file upload module, a data parsing module, a data preprocessing module, a data compression module, a data display module and a data decompression interface gateway. The file upload module designs and implements a file upload system, allowing users to upload BIM model files; the data parsing module parses the uploaded files and extracts necessary data, including geometric data, attribute data and other related information. The parsed data will be used for subsequent data preprocessing and compression processing; the data preprocessing module implements the data cleaning function, including eliminating redundant data and correcting data errors. At the same time, the data is standardized to adapt to the subsequent compression algorithm; the data compression module integrates and customizes the compression algorithm library to compress the preprocessed data. For geometric data, spatial data compression algorithm can be used for compression, and for attribute data, traditional data compression algorithm can be used for compression. In addition, lossless or lossy compression methods can be selected according to user needs; the data display module displays the compressed BIM model or the original model in the front-end application; the data decompression interface gateway implements a data decompression interface, allowing users to download or directly view the original and compressed BIM models online. The interface is responsible for obtaining compressed data from the database and decompressing it, and then transmitting the decompressed data to the front end for display. The user front-end interface provides a user interface to upload files, set compression parameters and view models. It integrates a 3D view library (such as Three.js) to allow users to view the 3D rendering effect of the BIM model online. Through interaction with the back-end service, it realizes functions such as file upload, parameter setting and model viewing. The 3D rendering library is used to render 3D BIM models in the browser, providing rich rendering effects and interactive functions such as rotation, zooming, panning, etc. It works with the back-end service to receive the decompressed BIM model data and perform rendering processing.
[0107] Based on the above system architecture, refer to Figure 3 , the building model data compression process can be:
[0108] Parse the content of IFC files. IFC files (Industry Foundation Classes) are a data format commonly used in building information models, which contain various information of building projects, such as geometry, materials, properties, etc. Parsing the content of IFC files means reading and understanding the data in IFC files and converting them into a format that can be processed and used by the system or application.
[0109] Data preprocessing is a series of preparation work for data before formal data processing, aiming to improve data quality, reduce redundancy, correct errors, etc. In the compression processing method of BIM building model data, data preprocessing may include operations such as eliminating redundant data, correcting data errors, and standardizing data formats. The purpose of data preprocessing is to provide clean, accurate, and uniformly formatted data for subsequent compression processing, thereby improving compression efficiency and quality.
[0110] Separation of geometry and attribute data (that is, obtaining building model data, and decomposing the building model data to obtain geometry data and attribute data): the geometry data and attribute data of the model are processed separately, and the spatial data compression algorithm is selected for the geometry data, and the traditional data compression technology is selected for the attribute data. Large BIM data is decomposed into multiple smaller modules, and each module is independently compressed and decompressed.
[0111] Geometry optimization (ie, performing geometric optimization on geometric data to obtain optimized geometric data) reduces the complexity of the model by reducing the number of vertices in the model while maintaining the appearance and accuracy of the model.
[0112] Duplicate element processing: Duplicate elements are removed from the optimized geometric data to obtain processed geometric data.
[0113] Geometric data compression divides BIM data into multiple levels according to the importance of the data, adopts a lossless compression algorithm for core geometric data to ensure accuracy, and adopts lossy compression for non-core data (such as some textures, annotations, etc.) to balance the compression rate and data quality (that is, determining the core geometric data and non-core geometric data in the geometric data; compressing the core geometric data through a lossless spatial data compression algorithm to obtain the first compressed data, and compressing the non-core geometric data through a lossy spatial data compression algorithm to obtain the second compressed data, and using the first compressed data and the second compressed data as compressed geometric data).
[0114] Attribute data compression: compressing attribute data using traditional data compression algorithms to obtain compressed attribute data.
[0115] Coding compression, encoding and compressing attribute data. Coding compression is a data compression technology that converts original data into a format that is more suitable for storage or transmission to reduce the amount of data. The conversion can be lossless or lossy.
[0116] Merge compressed data to merge compressed geometry data and compressed attribute data into merged compressed data.
[0117] Store the compressed data in the database and store the merged compressed data in the preset database.
[0118] Provide a data decompression interface, generate a data decompression interface corresponding to the merged compressed data, and save the data decompression interface in the preset server.
[0119] The front end displays the compressed model. If a model viewing request is received from the front-end application, the target decompression interface corresponding to the model viewing request is determined from the preset server, and the target compressed data corresponding to the model viewing request is retrieved from the preset database based on the target decompression interface. The target compressed data is decompressed through the target decompression interface to obtain the decompressed model data, and the decompressed model data is sent to the front-end application.
[0120] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the architectural model data compression method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0121] This application also provides a building model data compression device, please refer to Figure 4 , the building model data compression device comprises:
[0122] The acquisition module 10 is used to acquire the building model data and perform data decomposition on the building model data to obtain geometric data and attribute data;
[0123] A compression module 20, configured to compress the geometric data using a spatial data compression algorithm to obtain compressed geometric data, and to compress the attribute data using a traditional data compression algorithm to obtain compressed attribute data;
[0124] The merging module 30 is used to merge the compressed geometric data and the compressed attribute data into merged compressed data, and store the merged compressed data in a preset database.
[0125] Optionally, the device further comprises a processing module, configured to:
[0126] Performing geometric optimization on the geometric data to obtain optimized geometric data;
[0127] Performing a duplicate element removal process on the optimized geometric data to obtain processed geometric data;
[0128] The compression module 20 is also used for:
[0129] The processed geometric data is compressed by a spatial data compression algorithm to obtain compressed geometric data.
[0130] Optionally, the processing module is further used for:
[0131] Determine redundant vertices from each vertex of the geometric data according to a preset screening rule, and delete the redundant vertices to obtain intermediate geometric data;
[0132] According to the position of each vertex in the intermediate geometric data and the adjacent relationship between each vertex in the intermediate geometric data, the model edge and the model surface are constructed to obtain the optimized geometric data.
[0133] Optionally, the compression module 20 is further used for:
[0134] Determine core geometric data and non-core geometric data in the geometric data;
[0135] The core geometric data is compressed by a lossless spatial data compression algorithm to obtain first compressed data, and the non-core geometric data is compressed by a lossy spatial data compression algorithm to obtain second compressed data. The first compressed data and the second compressed data are used as compressed geometric data.
[0136] Optionally, the compression module 20 is further used for:
[0137] Verifying whether the compressed geometric data and the compressed attribute data match each other;
[0138] In the case where the compressed geometric data and the compressed attribute data match, the compressed geometric data and the compressed attribute data are merged into merged compressed data, the merged compressed data is stored in a preset database, and a data decompression interface corresponding to the merged compressed data is generated.
[0139] Optionally, the device further comprises a storage module, configured to:
[0140] Generating a data decompression interface corresponding to the combined compressed data, and storing the data decompression interface in a preset server;
[0141] If a model viewing request sent by a front-end application is received, a target decompression interface corresponding to the model viewing request is determined from the preset server;
[0142] The target compressed data corresponding to the model reference request is retrieved from the preset database based on the target decompression interface, the target compressed data is decompressed through the target decompression interface to obtain decompressed model data, and the decompressed model data is sent to the front-end application.
[0143] The building model data compression device provided by the present application adopts the building model data compression method in the above embodiment, which can solve the technical problem that resource consumption and processing efficiency cannot be balanced when compressing BIM data. Compared with the prior art, the beneficial effects of the building model data compression device provided by the present application are the same as the beneficial effects of the building model data compression method provided by the above embodiment, and other technical features in the building model data compression device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0144] The present application provides a building model data compression device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the building model data compression method in the above-mentioned embodiment 1.
[0145] Reference below Figure 5 , which shows a schematic diagram of the structure of a building model data compression device suitable for implementing the embodiment of the present application. The building model data compression device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), etc., and fixed terminals such as desktop computers, etc. Figure 5 The building model data compression device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0146] like Figure 5As shown, the building model data compression device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the building model data compression device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. The following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the building model data compression device to communicate with other devices wirelessly or by wire to exchange data. Although the building model data compression device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0147] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0148] The building model data compression device provided by the present application adopts the building model data compression method in the above embodiment, which can solve the technical problem that resource consumption and processing efficiency cannot be balanced when compressing BIM data. Compared with the prior art, the beneficial effects of the building model data compression device provided by the present application are the same as the beneficial effects of the building model data compression method provided by the above embodiment, and the other technical features in the building model data compression device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0149] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0151] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the building model data compression method in the above-mentioned embodiment.
[0152] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0153] The computer-readable storage medium may be included in the building model data compression device; or may exist independently without being assembled into the building model data compression device.
[0154] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the building model data compression device, the building model data compression device: (exclusive solution).
[0155] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0157] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0158] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned building model data compression method, and can solve the technical problem of not being able to balance resource consumption and processing efficiency when compressing BIM data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the building model data compression method provided by the above-mentioned embodiment, and will not be repeated here.
[0159] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned building model data compression method are implemented.
[0160] The computer program product provided by the present application can solve the technical problem of not being able to balance resource consumption and processing efficiency when compressing BIM data. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the building model data compression method provided by the above embodiment, which will not be elaborated here.
[0161] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for compressing building model data, characterized in that: The building model data compression method comprises: Acquire building model data, and perform data decomposition on the building model data to obtain geometric data and attribute data; Compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data; The compressed geometric data and the compressed attribute data are combined into combined compressed data, and the combined compressed data is stored in a preset database.
2. The building model data compression method according to claim 1, characterized in that: Before the step of compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, the method further includes: Performing geometric optimization on the geometric data to obtain optimized geometric data; Performing a duplicate element removal process on the optimized geometric data to obtain processed geometric data; The step of compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data comprises: The processed geometric data is compressed by a spatial data compression algorithm to obtain compressed geometric data.
3. The building model data compression method according to claim 2, characterized in that: The step of geometrically optimizing the geometric data to obtain optimized geometric data comprises: Determine redundant vertices from each vertex of the geometric data according to a preset screening rule, and delete the redundant vertices to obtain intermediate geometric data; According to the position of each vertex in the intermediate geometric data and the adjacent relationship between each vertex in the intermediate geometric data, the model edge and the model surface are constructed to obtain the optimized geometric data.
4. The building model data compression method according to claim 2, characterized in that: The step of compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data comprises: Determine core geometric data and non-core geometric data in the geometric data; The core geometric data is compressed by a lossless spatial data compression algorithm to obtain first compressed data, and the non-core geometric data is compressed by a lossy spatial data compression algorithm to obtain second compressed data. The first compressed data and the second compressed data are used as compressed geometric data.
5. The building model data compression method according to claim 1, characterized in that: After the steps of compressing the geometric data by a spatial data compression algorithm to obtain compressed geometric data, and compressing the attribute data by a traditional data compression algorithm to obtain compressed attribute data, the method further includes: Verifying whether the compressed geometric data and the compressed attribute data match each other; In the case where the compressed geometric data and the compressed attribute data match, the compressed geometric data and the compressed attribute data are merged into merged compressed data, the merged compressed data is stored in a preset database, and a data decompression interface corresponding to the merged compressed data is generated.
6. The building model data compression method according to any one of claims 1 to 5, characterized in that: After the step of merging the compressed geometric data and the compressed attribute data into combined compressed data and storing the combined compressed data in a preset database, the method further includes: Generating a data decompression interface corresponding to the combined compressed data, and storing the data decompression interface in a preset server; If a model viewing request sent by a front-end application is received, a target decompression interface corresponding to the model viewing request is determined from the preset server; The target compressed data corresponding to the model reference request is retrieved from the preset database based on the target decompression interface, the target compressed data is decompressed through the target decompression interface to obtain decompressed model data, and the decompressed model data is sent to the front-end application.
7. A building model data compression device, characterized in that: The building model data compression device comprises: An acquisition module is used to acquire building model data and perform data decomposition on the building model data to obtain geometric data and attribute data; A compression module, used to compress the geometric data by using a spatial data compression algorithm to obtain compressed geometric data, and to compress the attribute data by using a traditional data compression algorithm to obtain compressed attribute data; The merging module is used to merge the compressed geometric data and the compressed attribute data into merged compressed data, and store the merged compressed data in a preset database.
8. A building model data compression device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the building model data compression method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the building model data compression method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the building model data compression method according to any one of claims 1 to 6 are implemented.