Methods, systems, and electronic devices for rendering Building Information Modeling (BIM)
By using segmented requests and data transmission methods, combined with optimized storage of structural databases and file storage services, the processing pressure problem of large-scale BIM rendering was solved, achieving efficient data management and rendering effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 上海维搭信息科技有限公司
- Filing Date
- 2022-10-28
- Publication Date
- 2026-06-30
Smart Images

Figure CN115905745B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rendering technology, and more specifically, to a method, system, and electronic device for rendering Building Information Modeling (BIM). Background Technology
[0002] BIM (Building Information Modeling) technology is a data-driven tool applied to engineering design, construction, and management, primarily used in architecture, engineering, and civil engineering. BIM generally refers to a building information model, which is a building model built based on various relevant information and data of a building project. Through digital information simulation, it simulates the real-world information of the building.
[0003] Currently, due to the increasingly widespread application of BIM technology, the requirements for the level of detail and scale of building models are becoming increasingly stringent. Consequently, the data volume of BIM 3D models is growing larger and larger. When loading and rendering BIM data, it is impossible to efficiently manage the large amount of data involved in BIM, thus hindering the successful loading and rendering of BIM data.
[0004] Therefore, how to provide an efficient technical solution for rendering Building Information Modeling (BIM) has become an urgent technical problem to be solved. Summary of the Invention
[0005] The purpose of some embodiments of this application is to provide a method, system, and electronic device for rendering Building Information Model (BIM). The technical solutions of the embodiments of this application can achieve efficient storage, loading, and rendering of large amounts of BIM data, and realize effective data management.
[0006] In a first aspect, some embodiments of this application provide a method for rendering a Building Information Model (BIM), comprising: receiving a request sent by a browser; reading node structure data corresponding to the request from a structure database, wherein the node structure data includes: a portion of nodes in the BIM; reading a target component set file corresponding to the node structure data from a file storage service; and sending the node structure data and the target component set file to the browser, wherein the node structure data and the target component set file are used by the browser to render the portion of nodes in the BIM.
[0007] In some embodiments of this application, the server receives requests from the browser and reads the corresponding node structure data and target component set file, sending them to the browser. Embodiments of this application can send large amounts of Building Information Modeling (BIM) data in segments based on requests (i.e., only sending a portion of the BIM nodes corresponding to the request), thereby enabling the browser to partially load and render the BIM data. This reduces the data reading and transmission pressure on the server and the computer loading and rendering pressure on the browser, achieving efficient management of BIM data.
[0008] In some embodiments, the request is any one of multiple requests sent by the browser, and the node structure data corresponding to different requests are different. The set of all target components of the node structure data corresponding to the different requests is used by the browser to render the complete BIM model.
[0009] Some embodiments of this application send multiple requests from the browser to the server, with different requests corresponding to different data. This enables segmented transmission of BIM data, reducing the pressure on the server for data reading and transmission, as well as the pressure on the browser for receiving and storing data. This effectively avoids browser memory crashes due to large amounts of data.
[0010] In some embodiments, the structure database stores the structure data of all nodes related to the BIM, and the file storage service stores compressed files of component sets of all nodes. The structure data of a node includes: a node number and a node component set file number bound to the node number, and a node component set file number corresponds to a component set compressed file.
[0011] Some embodiments of this application store structural data and component set compressed files separately, with the structural database storing only the relevant numbering and binding information, and the file storage service storing compressed files. This effectively reduces the storage memory of BIM data and facilitates the retrieval of the corresponding data, thus achieving efficient data management.
[0012] In some embodiments, reading the target component set file corresponding to the node structure data from the file storage service includes: obtaining the component set file number bound to the node number in the node structure data; and searching for the file corresponding to the component set file number in the file storage service to obtain the target component set file.
[0013] Some embodiments of this application can obtain the target component set file by binding the node number to the component set file number, which can reduce the storage pressure on the server side and also quickly find the corresponding data.
[0014] In some embodiments, before reading the target component set file corresponding to the node structure data from the file storage service, the method further includes: receiving a file request sent by the browser to obtain the file corresponding to the node structure data, wherein the file request carries a file size threshold to be read; sending the node structure data and the target component set file to the browser includes: dividing the target component set file according to the file size threshold to be read to obtain at least one file stream; and sequentially sending the at least one file stream to the browser.
[0015] Some embodiments of this application receive file requests from the browser and send files of the corresponding size to the browser according to the file size threshold to be read until the target component set file is sent, thereby realizing the segmented sending of files and reducing the transmission pressure on the server.
[0016] Secondly, some embodiments of this application provide a method for rendering a Building Information Model (BIM), comprising: sending a request to a server; receiving node structure data sent by the server in response to the request, wherein the node structure data includes: a portion of nodes in the BIM; receiving a target component set file corresponding to the node structure data sent by the server; loading the node structure data and the target component set file, and rendering a portion of the BIM model structure.
[0017] In some embodiments of this application, the browser sends a request to the server and receives node structure data and target component set files returned by the server in response to the request. Embodiments of this application can receive large amounts of Building Information Modeling (BIM) data in segments based on the request (i.e., only receiving a portion of the BIM nodes corresponding to the request), thereby enabling the browser to partially load and render the BIM data. This reduces the data reading and transmission pressure on the server and the computer loading and rendering pressure on the browser, achieving efficient management of BIM data.
[0018] In some embodiments, before sending the request to the server, the method further includes: setting a preset number of nodes to be obtained for the BIM to be rendered; and generating the request carrying information about the preset number of nodes.
[0019] Some embodiments of this application can achieve segmented acquisition of BIM data by setting a preset number of nodes to be acquired each time and generating a corresponding request, thereby reducing the data transmission pressure.
[0020] In some embodiments, the request is any one of multiple requests, and the server returns different node structure data for different requests. The set of all target components of the node structure data returned by the different requests is used to render the complete BIM model.
[0021] Some embodiments of this application send multiple requests from the browser to the server, with different requests corresponding to different data. This enables segmented transmission of BIM data, reducing the pressure on the server for data reading and transmission, as well as the pressure on the browser for receiving and storing data. This effectively avoids browser memory crashes due to large amounts of data.
[0022] In some embodiments, before receiving the target component set file corresponding to the node structure data sent by the server, the method further includes: sending a file request corresponding to the node structure data to the server, wherein the file request carries a file size threshold to be read; receiving the target component set file corresponding to the node structure data sent by the server includes: receiving at least one file stream sent by the server in response to the file request, wherein the at least one file stream is obtained by the server dividing the target component set file according to the file size threshold to be read.
[0023] Some embodiments of this application achieve segmented file reception by sending file requests to the server and receiving files of the corresponding size sent by the server according to the file size threshold to be read, until the target component set file is received. This can reduce the storage, loading and rendering pressure on the browser.
[0024] In some embodiments, loading the node structure data and the target component set file includes: obtaining the node numbers of the partial nodes in the node structure data, and the component set file numbers bound to the node numbers; decompressing the files corresponding to the component set file numbers from the target component set file to obtain the node component identification files; and loading the partial nodes and the node component identification files.
[0025] Some embodiments of this application can quickly obtain the corresponding file by binding the file number of each component set to the node number, and then decompress the file to obtain the information required for loading, thereby realizing the rendering of BIM.
[0026] Thirdly, some embodiments of this application provide a method for rendering a Building Information Model (BIM), comprising: obtaining compressed files of component sets for each node in the BIM's directory tree, and identifying the compressed files of each component set to obtain file numbers for each node's component set; binding and storing the compressed files of each component set and the file numbers of each node's component set to a file storage service; binding the node numbers of each node with the file numbers of each node's component set, and storing them in a structural database in a linear structure.
[0027] In some embodiments of this application, the server can also store the BIM directory tree to obtain file storage services and a structure database. The file storage service stores compressed files, and the structure database stores the relationships between nodes in the directory tree. This can effectively reduce the memory required for data storage when the data volume is large, thus achieving efficient storage and management of BIM.
[0028] In some embodiments, before obtaining the compressed files of each component set of each node in the BIM directory tree, the method further includes: obtaining the model structure information and component identification information of the BIM; creating the directory tree corresponding to the model structure information, and determining the component identification files of each node associated with each node from the component identification information; obtaining the compressed files of each component set of each node in the BIM directory tree includes: compressing the component identification files of each node to obtain the compressed files of each component set.
[0029] Some embodiments of this application can create a corresponding directory tree using the model structure information and component identification information of BIM, thereby obtaining the relationship between each node and the component identification file of each node, providing data support for subsequent data storage.
[0030] Fourthly, some embodiments of this application provide a system for rendering a Building Information Model (BIM), comprising: a browser for sending a request to a server; receiving node structure data sent by the server in response to the request, wherein the node structure data includes a subset of nodes in the BIM; receiving a target component set file corresponding to the node structure data sent by the server; loading the node structure data and the target component set file, and rendering a portion of the BIM model structure; and a server for receiving the request sent by the browser and reading node structure data corresponding to the request from a structure database. According to the data, the server reads the target component set file corresponding to the node structure data from the file storage service; sends the node structure data and the target component set file to the browser; or, the server obtains the compressed file of each component set of each node in the BIM directory tree, identifies the compressed file of each component set to obtain the file number of each node component set; binds the compressed file of each component set and the file number of each node component set to the file storage service; binds the node number of each node with the file number of each node component set and stores it in the structure database in a linear structure.
[0031] Fifthly, some embodiments of this application provide a server-side component, comprising: a first receiving module for receiving a request sent by a browser; a first reading module for reading node structure data corresponding to the request from a structure database, wherein the node structure data includes a subset of nodes in a BIM; a second reading module for reading a target component set file corresponding to the node structure data from a file storage service; and a first sending module for sending the node structure data and the target component set file to the browser, wherein the node structure data and the target component set file are used by the browser to render the subset of nodes in the BIM.
[0032] Sixthly, some embodiments of this application provide a server-side component, comprising: an acquisition module for acquiring compressed files of component sets for each node in a BIM directory tree, and identifying the compressed files of each component set to obtain the file number of the component set for each node; a file storage service module for binding and storing the compressed files of each component set and the file number of the component set for each node in a file storage service; and a structure database module for binding the node number of each node with the file number of the component set for each node, and storing them in a linear structure in a structure database.
[0033] Seventhly, some embodiments of this application provide a browser client, including: a second sending module for sending a request to a server; a second receiving module for receiving node structure data sent by the server in response to the request, wherein the node structure data includes: some nodes in BIM; a third receiving module for receiving a target component set file corresponding to the node structure data sent by the server; and a rendering module for loading the node structure data and the target component set file, and rendering a portion of the BIM model structure.
[0034] Eighthly, some embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0035] Ninth aspect, some embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, can implement the method as described in any embodiment of the first aspect.
[0036] In a tenth aspect, some embodiments of this application provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of some embodiments of this application, the accompanying drawings used in some embodiments of this application will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 A system diagram for rendering BIM is provided for some embodiments of this application;
[0039] Figure 2 One of the method flowcharts for rendering BIM provided for some embodiments of this application;
[0040] Figure 3 A schematic diagram of a directory tree structure provided for some embodiments of this application;
[0041] Figure 4 This is the second flowchart of a method for rendering BIM provided for some embodiments of this application;
[0042] Figure 5Flowchart 3 of a method for rendering BIM provided for some embodiments of this application;
[0043] Figure 6 Interactive flowcharts for rendering BIM provided for some embodiments of this application;
[0044] Figure 7 One of the server-side component block diagrams provided for some embodiments of this application;
[0045] Figure 8 A second block diagram of server-side components provided for some embodiments of this application;
[0046] Figure 9 A block diagram of the browser-side components provided for some embodiments of this application;
[0047] Figure 10 A schematic diagram of an electronic device provided for some embodiments of this application. Detailed Implementation
[0048] The technical solutions of some embodiments of this application will now be described with reference to the accompanying drawings.
[0049] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0050] First, some terms used in some embodiments of this application will be explained to facilitate understanding by those skilled in the art.
[0051] Large scale: First, the building itself is large in size; second, the amount of information and data associated with the building is enormous. In fact, in most scenarios, the sheer size of the building leads to the massive amount of information and data associated with it.
[0052] Components: The basic building blocks of BIM; components are the actual replaceable parts that exist in the system, and they are the constituent elements of the model.
[0053] Directory node (also called node): The basic building block of a directory tree. A node can be associated with multiple components or multiple child nodes.
[0054] Number: A unique identifier that can identify a model, node, or component; a model scene can contain multiple models, and each model has a model number.
[0055] Component ID (Identity document): A unique identifier that can identify a component.
[0056] HTTP request: refers to a request message from the client to the server. It includes: the request method for the resource, the resource identifier, and the protocol used, in the first line of the message.
[0057] In traditional BIM management for smaller projects, model information is typically read directly from a server-side database in real-time and assembled into a directory tree within the server's business processing service. The browser sends HTTP requests to the server, receives response data, and renders and displays the data based on this response. However, as the model size increases dramatically, real-time reading of model information and the assembly of the directory tree within the server's business processing service can easily lead to server memory shortages and service crashes. Furthermore, excessively large amounts of data returned via HTTP requests can cause browser crashes, thus impacting BIM display and management.
[0058] In view of this, some embodiments of this application provide a method for rendering Building Information Modeling (BIM). The method involves sending a request from a browser to a server. The server can read the node structure data of a portion of the BIM corresponding to the request, as well as the target component set file corresponding to the node structure data, and then send it to the browser. The request can be any one of multiple requests. This method of sending requests from the browser to the server allows for the acquisition of partial data each time, achieving segmented acquisition of relevant data from the BIM to be rendered. This reduces the pressure on data transmission and ensures normal operation of the browser. Furthermore, it enables efficient storage, loading, and rendering of large amounts of BIM data, achieving effective data management.
[0059] Please see Figure 1 , Figure 1 An overall structural diagram for rendering Building Information Model (BIM) is provided for some embodiments of this application.
[0060] like Figure 1 As shown, some embodiments of this application provide a system for rendering Building Information Modeling (BIM). The system includes a server 100 and a browser 200. The browser 200 can send multiple requests to the server 100. The server 100 can read relevant BIM data (e.g., node structure data and target component set files) corresponding to each request and send it to the browser 200. After receiving the data returned by the server 100, the browser 200 can load the data and render it to obtain a partial or complete BIM model.
[0061] In some embodiments of this application, the server-side 100 further includes a business processing service, a file storage service, a BIM data storage database, and a BIM structure storage database (as a specific example of a structure database). The BIM data storage database stores BIM model file information, model structure information, and component information (i.e., component identification information). Model file information includes the BIM name, format, or other remarks. Model structure information includes specific structures in the BIM and the relationships between structures, such as doors, pipes, or decorations. Each specific structure can be considered a node. Component information includes all component IDs. The file storage service provides functions such as storing and retrieving compressed files of each node's associated component sets, and generating file numbers for each node's component sets. The business processing service provides functions such as reading model information (e.g., node structure data and target component set files), constructing the BIM directory tree, generating a set of component IDs for each node (as a specific example of node component identification files), and tree structure conversion. The BIM structure storage database stores information related to the BIM directory tree structure.
[0062] In some embodiments of this application, the browser 200 can be a general-purpose browser used for rendering BIM. For example, Baidu Browser, Google Chrome, or 360 Browser, etc. This application is not limited to this.
[0063] The following example illustrates... Figure 1 The relevant functions of each unit.
[0064] In some embodiments of this application, the browser client 200 is at least used for: sending a request to the server; receiving node structure data sent by the server in response to the request, wherein the node structure data includes: some nodes in the building information model; receiving a target component set file corresponding to the node structure data sent by the server; loading the node structure data and the target component set file, and rendering a portion of the BIM model structure;
[0065] For example, in some embodiments of this application, the browser 200 can communicate with the server using HTTP requests. That is, after sending an HTTP request to the server, the browser subsequently receives response data (e.g., node structure data and target component collection files) returned by the server 100. Finally, the browser 200 can load the response data and render and display the BIM.
[0066] In some embodiments of this application, the server 100 is at least configured to: receive a request sent by the browser; read node structure data corresponding to the request from a structure database; read a target component set file corresponding to the node structure data from a file storage service; and send the node structure data and the target component set file to the browser.
[0067] For example, in some embodiments of this application, after receiving an HTTP request, the server 100 will use the business processing service to read the corresponding data for the HTTP request and return it to the browser 200.
[0068] In other embodiments of this application, the server 100 may also be used to: obtain compressed files of each component set of each node in the BIM directory tree, identify each compressed file of each component set, and obtain the component set file number of each node; bind and store the compressed files of each component set and the component set file number of each node in the file storage service; bind each node number of each node with the component set file number of each node, and store them in the structure database in a linear structure.
[0069] For example, in some embodiments of this application, the business processing service of server 100 can create a BIM directory tree based on data in the BIM data storage database, and obtain compressed files of each component set corresponding to each node. Finally, the compressed files of each component set and the file numbers of each node component set are stored in the file storage service. The node number and the file number of each node component set are bound and stored in the structural database.
[0070] Before the server-side 100 and browser-side 200 can interact with each other on BIM data, the server-side 100 needs to first generate BIM-related data stored in the file storage service and structural database. Therefore, the following, in conjunction with the appendix... Figure 2 The present application provides an exemplary embodiment of the implementation process for rendering a Building Information Model (BIM) executed by a server 100.
[0071] Please see the appendix Figure 2 , Figure 2 A flowchart of a method for rendering a Building Information Model (BIM) is provided for some embodiments of this application. The method for rendering a Building Information Model (BIM) may include:
[0072] In some embodiments of this application, before performing S210, the method for rendering a Building Information Model (BIM) may further include: obtaining model structure information and component identification information of the BIM; creating the directory tree corresponding to the model structure information; and determining the node component identification file associated with each node from the component identification information.
[0073] For example, in some embodiments of this application, model scene information can be retrieved from the BIM data storage database of server 100 based on the unique model scene number. This model scene information includes model file information, model structure (i.e., model structure information), and component information. For example, model file information includes basic information such as model name (e.g., house) and model format. The model structure can include various structures, such as doors, pipes, living rooms, kitchens, bedrooms, etc. Doors can also include door panels, door handles, etc. Each structure can be considered a node within the house. A directory tree corresponding to the model can be created based on multiple nodes, such as... Figure 3 A specific example is shown.
[0074] It should be noted that, Figure 3 In this diagram, A, B, C, D, E, F, G, H, I, and J each represent a node. Component information refers to all the components contained in nodes H, I, and J. Since each node contains thousands or tens of thousands of components, they are represented using component identifiers. That is, node H corresponds to a set of component IDs: {component id, component id, component id, ...}.
[0075] Depend on Figure 3 As we can see, each node is associated with a set of component IDs, which contains the sets of component IDs associated with all its child nodes. The higher the node, the larger its associated set of component IDs. For example, nodes H and I are children of node D. Therefore, the set of component IDs associated with node D includes not only the component IDs of node D itself but also the component IDs of nodes H and I. Similarly, the set of component IDs associated with node B includes the sets of component IDs associated with nodes D, E, H, and I. This continues until the root node A, which contains the set of component IDs associated with nodes B, C, D, E, F, G, H, I, and J. Thus, the entire directory tree contains a very large set of component IDs.
[0076] Because the component ID set data of the model is too large, it is not suitable to persist it to the BIM structure storage database. Therefore, in order to facilitate the optimization of data storage persistence of the directory tree, in some embodiments of this application, S210 may include: compressing the component identification files of each node to obtain compressed files of each component set.
[0077] For example, in some embodiments of this application, a corresponding node component identifier file is generated from the set of component IDs corresponding to each node. The node component identifier file corresponding to each node is then compressed to obtain a compressed file containing the set of components corresponding to each node. For example, GZIP compression of the node component identifier file corresponding to each node into a binary stream can significantly save memory space. The data in the binary stream is stored in a binary encoded format. The compressed data is smaller, facilitating network transmission.
[0078] As a specific example of this application Figure 3 Each of the root node A, node B, node C, node D, node E, node F, node G, node H, node I, and node J corresponds to a component set compressed file. That is to say, there are 10 component set compressed files.
[0079] To facilitate the differentiation of different files, in some embodiments of this application, S210, the compressed files of each component set of each node in the BIM directory tree are obtained, and the compressed files of each component set are identified to obtain the file number of each node component set.
[0080] For example, in some embodiments of this application, a unique file number is assigned to the compressed file of the component set corresponding to each node. The number can be in the form of Arabic numerals or random strings, and this application does not make specific limitations here.
[0081] As a specific example of this application, the component set compressed file corresponding to each of the root node A, node B, node C, node D, node E, node F, node G, node H, node I and node J is identified so that each component set compressed file is given a unique number.
[0082] S220, bind and store the compressed files of each component set and the file numbers of each node component set to the file storage service.
[0083] For example, in some embodiments of this application, the component set compressed file of each node and the node component set file number are bound and stored in a file storage service.
[0084] As a specific example of this application, the node component set file number and the component set compressed file of node A are stored in a file storage service. The principle for other nodes is the same as that for node A, and will not be described in detail here.
[0085] In order to reduce the storage pressure on the BIM structure storage database, in some embodiments of this application, S230 may include: binding the node number of each node with the component set file number of each node, and storing it in the structure database in the form of a linear structure.
[0086] For example, compared to existing methods that directly store the directory tree in the BIM structure storage database, in some embodiments of this application, each node is assigned a corresponding node number, and each node number and its corresponding node component set file number are bound and stored in the BIM structure storage database. Furthermore, to further persist the directory tree to the BIM structure storage database, the node number and its corresponding node component set file number are stored in a linear structure for persistence.
[0087] It should be noted that a linear structure is a one-to-one structure, a flat structure. A tree structure is a one-to-many structure, a more complex non-linear structure. This application transforms a tree structure into a linear structure, that is, it converts a one-to-many node relationship from one node to one node within a larger network, thus saving memory space in the BIM structure storage database.
[0088] The following is in conjunction with the appendix Figure 4 The present application provides an exemplary embodiment of the implementation process for rendering a Building Information Model (BIM) executed by a server 100.
[0089] Please see the appendix Figure 4 , Figure 4 A flowchart of a method for rendering a Building Information Model (BIM) is provided for some embodiments of this application. The method for rendering a Building Information Model (BIM) may include:
[0090] S410 receives requests sent from the browser.
[0091] In some embodiments of this application, the request is any one of multiple requests sent by the browser, and the node structure data corresponding to different requests are different. The set of all target components of the node structure data corresponding to the different requests is used by the browser to render the complete model of the BIM.
[0092] For example, in some embodiments of this application, when the number of levels in the BIM directory tree is large, segmented loading can be performed. That is, when the BIM contains a large number of nodes, the browser can send multiple requests to the server to obtain a portion of the BIM nodes each time. This allows the server to read the data corresponding to the BIM nodes in segments, reducing the data reading and transmission pressure on the server.
[0093] In some embodiments of this application, the structure database stores the structure data of all nodes related to the BIM, and the file storage service stores the component collection compressed file of all nodes. The structure data of a node includes: a node number and a node component collection file number bound to the node number, and a node component collection file number corresponds to a component collection compressed file.
[0094] S420, Read the node structure data corresponding to the request from the structure database, wherein the node structure data includes: some nodes in the BIM.
[0095] For example, in some embodiments of this application, the business processing service can read the corresponding node structure data from the BIM structure storage database in response to a request. The node structure data includes: node numbers of some nodes and the node component set file number corresponding to each node number.
[0096] S430, Read the target component set file corresponding to the node structure data from the file storage service.
[0097] In some embodiments of this application, S430 may include: obtaining the component set file number bound to the node number in the node structure data; searching for the file corresponding to the component set file number in the file storage service to obtain the target component set file.
[0098] For example, as a concrete example, some nodes consist of 3 nodes. The node numbers of these 3 nodes can be used to quickly find the corresponding file numbers of the 3 component sets. Then, the files corresponding to these 3 component set file numbers are retrieved to form the target component set file.
[0099] To further balance the service pressure on the server side, in some embodiments of this application, before executing S430, the method for rendering the Building Information Model (BIM) may further include: receiving a file request sent by the browser to obtain the file corresponding to the node structure data, wherein the file request carries a threshold for the size of the file to be read.
[0100] For example, as a concrete example, server 100 can receive a file request from a browser to retrieve three nodes. This request carries the size of the binary file stream to be read in a single operation (as a concrete example of a threshold for the file size to be read), thus enabling segmented transmission.
[0101] S440, send the node structure data and the target component set file to the browser, wherein the node structure data and the target component set file are used by the browser to render the partial nodes of the BIM.
[0102] In some embodiments of this application, the target component set file is divided according to the file size threshold to be read to obtain at least one file stream; the at least one file stream is sent to the browser in sequence.
[0103] For example, as a concrete example, the target component collection file is 20MB, and the size of the binary stream read in a single operation is 5MB. In this case, the target component collection file can be divided into 4 sub-files, and then sent to the browser sequentially.
[0104] In other embodiments of this application, after receiving a file request, S430 may also perform segmented reading in the file storage service according to the size of the binary stream of the file read in a single read. Each 5MB read is sent to the browser until the target component collection file is completely sent.
[0105] The following is in conjunction with the appendix Figure 5 The present application provides an exemplary embodiment of the implementation process for rendering a Building Information Model (BIM) executed by a browser 200.
[0106] Please see the appendix Figure 5 , Figure 5 A flowchart of a method for rendering a Building Information Model (BIM) is provided for some embodiments of this application. The method for rendering a Building Information Model (BIM) may include:
[0107] S510 sends a request to the server.
[0108] In some embodiments of this application, before executing S510, the method for rendering a Building Information Model (BIM) may include: setting a preset number of nodes to be obtained for the BIM to be rendered; and generating the request carrying information about the preset number of nodes.
[0109] Since the number of components in BIM can exceed tens of millions or even hundreds of millions, in order to reduce the pressure on the browser to receive and store data, in some embodiments of this application, the number of nodes loaded at one time can be set (as a specific example of the preset number of nodes in the BIM to be rendered). That is, each time the browser 200 sends an HTTP request to the server 100, the HTTP request carries the number of nodes to be read this time.
[0110] In some embodiments of this application, the request is any one of multiple requests, and the server returns different node structure data for different requests. The set of all target components of the node structure data returned by the different requests is used to render the complete model of the BIM.
[0111] It should be noted that each request carries the number of nodes to be read in this instance. For example, if there are 100 nodes in the BIM to be rendered, and each load is 10 nodes, then 10 HTTP requests can be sent to the server.
[0112] S520, Receive node structure data sent by the server in response to the request, wherein the node structure data includes some nodes in the BIM.
[0113] For example, in some embodiments of this application, the node structure data received by the browser 200 includes: node numbers of some nodes and node component set file numbers corresponding to each node number.
[0114] S530, receive the target component set file corresponding to the node structure data sent by the server.
[0115] In some embodiments of this application, before executing S530, the method for rendering a Building Information Model (BIM) may further include: sending a file request corresponding to the node structure data to the server, wherein the file request carries a threshold for the size of the file to be read.
[0116] For example, in some embodiments of this application, after receiving node structure data, a file request can be sent to server 100 to obtain the file corresponding to the node structure data. To reduce the loading pressure on the browser, the file can be loaded incrementally, that is, the file request carries a threshold for the size of the file to be read, until the file corresponding to the node structure data is obtained.
[0117] In some embodiments of this application, S530 may include: receiving at least one file stream sent by the server in response to the file request, wherein the at least one file stream is obtained by the server dividing the target component set file according to the file size threshold to be read.
[0118] For example, in some embodiments of this application, based on the file size threshold to be read in the file request (that is, the file binary stream size for a single read as described above), the browser 200 can sequentially receive file streams sent by the server 100 until the complete target component set file is obtained.
[0119] S540, Load the node structure data and the target component set file, and render a portion of the BIM model structure.
[0120] For example, in some embodiments of this application, the browser 200 can load the data after receiving the response data corresponding to a request, that is, load and render the data while receiving it. After obtaining all the BIM data to be rendered, the browser can also complete the loading and rendering of the BIM data and display the complete BIM structure.
[0121] In some embodiments of this application, S540 may include: obtaining the node number of each of the partial nodes in the node structure data, and the component set file number bound to each node number; decompressing the file corresponding to each component set file number from the target component set file to obtain the node component identification file; and loading the partial nodes and the node component identification files.
[0122] For example, in some embodiments of this application, since the received target component set file is a compressed file, it is necessary to decompress the file corresponding to the number of each component set file to obtain the component identifier file of each node in some nodes, which can then be loaded.
[0123] The following is in conjunction with the appendix Figure 6 The present application provides an exemplary embodiment of the interaction process for rendering BIM performed by the server 100 and the browser 200.
[0124] Please see the appendix Figure 6 , Figure 6 This document provides interactive flowcharts for rendering BIM based on some embodiments of this application. It should be noted that during the interaction between the server-side 100 and the browser-side 200, the server-side 100 has already obtained file storage services and a structural database based on the BIM model structure information and component information. For details, please refer to the above. Figure 2 The provided embodiments are omitted here to avoid repetition. The BIM to be rendered comprises 100 nodes. The following exemplifies the interactive process for rendering the BIM.
[0125] S610, browser 200 sends the i-th request to server 100.
[0126] For example, as a specific example of this application, the value of i is a positive integer. When the first request is sent, i = 1, and so on. The i-th request carries the preset number of nodes to be read, for example, 10 nodes. It can be inferred that the maximum value of i is 10. That is, the browser 200 needs to send 10 requests to the server 100 to obtain all the nodes of the BIM to be rendered.
[0127] S620, server 100 receives the i-th request.
[0128] S630, Server 100 reads the node structure data corresponding to the i-th request from the structure database.
[0129] For example, as a specific example of this application, server 100 reads node structure data corresponding to 10 nodes from a structure database. The node structure data corresponding to the 10 nodes includes: 10 node numbers and corresponding 10 node component set file numbers.
[0130] S640, server 100 sends node structure data to browser 200.
[0131] S650, browser 200 sends a file request corresponding to the node structure data to server 100.
[0132] For example, as a specific example of this application, the file request sent by the browser 200 to the server 100 carries a threshold for the size of the file to be read.
[0133] S660, the server 100 reads the target component set file corresponding to the node structure data from the file storage service.
[0134] For example, as a specific example of this application, the server 100 can read 10 node component set files corresponding to 10 node component set file numbers in segments according to the file size threshold to be read. These 10 node component set files are the target component set files that need to be transmitted this time.
[0135] S670, server 100 sends the target component set file to browser 200.
[0136] For example, as a specific example of this application, server 100 can send a collection file of 10 node components to browser 200 in segments according to a threshold for the size of the file to be read. This can reduce the data transmission pressure on server 100 and also reduce the storage and loading pressure on browser 200.
[0137] S680, the browser 200 loads and renders the node structure data and the data in the target component collection file to display the BIM structure.
[0138] For example, as a specific example of this application, when the browser 200 receives the target component collection file, it can load it in segments according to the segmented sending by the server 100, thereby reducing the loading pressure on the browser 200 and realizing the segmented loading and rendering of the BIM to be rendered.
[0139] S690: If i = 10, then end; otherwise, let i = i + 1 and return to S610.
[0140] As can be seen from the above embodiments of this application, for scenarios with a large amount of model data, the browser client 200 can send multiple HTTP requests to the server client 100 in segments. The business processing service reads the node structure data of the model stored in the BIM structure storage database of the server client 100 in segments and sends it to the browser client 200. After the browser client 200 receives the node structure data of each segment of the model, it sends another HTTP request to the server client 100. The business processing service requests the file storage service to obtain the binary stream of the component ID set (that is, the node component set file) based on the file number of the node component set in the model structure data and sends it to the browser client 200. The browser client 200 can directly render the component ID set after receiving the binary stream of the component ID set, thus realizing the segmented loading and rendering of the model.
[0141] Please refer to Figure 7 , Figure 7 A block diagram illustrating the composition of a server-side 100 provided in some embodiments of this application is shown. It should be understood that this server-side 100 is similar to the one described above. Figure 2 Corresponding to the method embodiments, it can execute the various steps involved in the above method embodiments. The specific functions of the server 100 can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here.
[0142] Figure 7 The server-side 100 includes at least one software function module that can be stored in a memory or embedded in the server-side 100 in the form of software or firmware. The server-side 100 includes: an acquisition module 710, used to acquire compressed files of each component set of each node in the BIM directory tree, and identify each compressed file of each component set to obtain the file number of each node component set; a file storage service module 720, used to bind and store the compressed files of each component set and the file numbers of each node component set to the file storage service; and a structure database module 730, used to bind each node number of each node to the file number of each node component set and store them in the structure database in the form of a linear structure.
[0143] In some embodiments of this application, before the acquisition module 710, the server 100 further includes a creation module (not shown in the figure), which is used to acquire the model structure information and component identification information of the BIM; create the directory tree corresponding to the model structure information, and determine the node component identification file associated with each node from the component identification information; the acquisition module 710 is specifically used to: compress the node component identification file to obtain the compressed file of the component set.
[0144] Please refer to Figure 8 , Figure 8 A block diagram illustrating the composition of a server-side 100 provided in some other embodiments of this application is shown. It should be understood that this server-side 100 is similar to the one described above. Figure 4 Corresponding to the method embodiments, it can execute the various steps involved in the above method embodiments. The specific functions of the server 100 can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here.
[0145] Figure 8 The server-side 100 includes at least one software functional module that can be stored in a memory or embedded in the server-side 100 in the form of software or firmware. The server-side 100 includes: a first receiving module 810 for receiving a request sent by a browser; a first reading module 820 for reading node structure data corresponding to the request from a structure database, wherein the node structure data includes some nodes in the BIM; a second reading module 830 for reading a target component set file corresponding to the node structure data from a file storage service; and a first sending module 840 for sending the node structure data and the target component set file to the browser, wherein the node structure data and the target component set file are used by the browser to render the some nodes of the BIM.
[0146] In some embodiments of this application, the request is any one of multiple requests sent by the browser, and the node structure data corresponding to different requests are different. The set of all target components of the node structure data corresponding to the different requests is used by the browser to render the complete model of the BIM.
[0147] In some embodiments of this application, the structure database stores the structure data of all nodes related to the BIM, and the file storage service stores the component collection compressed file of all nodes. The structure data of a node includes: a node number and a node component collection file number bound to the node number, and a node component collection file number corresponds to a component collection compressed file.
[0148] In some embodiments of this application, the second reading module 830 is used to obtain the component set file number bound to the node number in the node structure data; and to search for the file corresponding to the component set file number in the file storage service to obtain the target component set file.
[0149] In some embodiments of this application, the second reading module 830 is used to receive a file request sent by the browser to obtain the file corresponding to the node structure data, wherein the file request carries a file size threshold to be read; the target component set file is divided according to the file size threshold to be read to obtain at least one file stream; and the first sending module 840 is used to send the at least one file stream to the browser in sequence.
[0150] Please refer to Figure 9 , Figure 9 The diagram illustrates a block diagram of a browser client 200 provided in some embodiments of this application. It should be understood that this browser client 200 is similar to the one described above. Figure 5 Corresponding to the method embodiments, it can execute the various steps involved in the above method embodiments. The specific functions of the browser client 200 can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here.
[0151] Figure 9 The browser client 200 includes at least one software function module that can be stored in a memory or embedded in the browser client 200 in the form of software or firmware. The browser client 200 includes: a second sending module 910 for sending a request to a server; a second receiving module 920 for receiving node structure data sent by the server in response to the request, wherein the node structure data includes some nodes in the BIM; a third receiving module 930 for receiving a target component set file corresponding to the node structure data sent by the server; and a rendering module 940 for loading the node structure data and the target component set file, and rendering a portion of the BIM model structure.
[0152] In some embodiments of this application, the second sending module 910 is used to set a preset number of nodes to be obtained from the BIM to be rendered; and to generate the request carrying information about the preset number of nodes.
[0153] In some embodiments of this application, the request is any one of multiple requests, and the server returns different node structure data for different requests. The set of all target components of the node structure data returned by the different requests is used to render the complete model of the BIM.
[0154] In some embodiments of this application, before the third receiving module 930, the browser side further includes a sending module (not shown in the figure) for sending a file request corresponding to the node structure data to the server side, wherein the file request carries a file size threshold to be read; the third receiving module 930 is used to receive at least one file stream sent by the server side in response to the file request, wherein the at least one file stream is obtained by the server side dividing the target component set file according to the file size threshold to be read.
[0155] In some embodiments of this application, the rendering module 940 is used to obtain the node number of each of the partial nodes in the node structure data, and the component set file number bound to each node number; decompress the file corresponding to each component set file number from the target component set file to obtain the node component identification file; and load the partial nodes and the node component identification files.
[0156] Some embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can perform the operation of any of the methods corresponding to the methods provided in the above embodiments.
[0157] Some embodiments of this application also provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operation of any of the methods corresponding to the above embodiments provided in the above embodiments.
[0158] like Figure 10 As shown, some embodiments of this application provide an electronic device 1000, which includes a memory 1010, a processor 1020, and a computer program stored in the memory 1010 and executable on the processor 1020. When the processor 1020 reads the program from the memory 1010 via a bus 1030 and executes the program, it can implement the methods of any of the above embodiments.
[0159] Processor 1020 can process digital signals and can include various computing architectures. For example, it can be a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements multiple instruction set combinations. In some examples, processor 1020 can be a microprocessor.
[0160] The memory 1010 can be used to store instructions executed by the processor 1020 or data related to the execution of instructions. These instructions and / or data may include code for implementing some or all of the functions of one or more modules described in the embodiments of this application. The processor 1020 of this disclosure embodiment can be used to execute instructions in the memory 1010 to implement the methods shown above. The memory 1010 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memories well known to those skilled in the art.
[0161] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0162] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0163] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for rendering a building information model, BIM, c h a r a c t e r i s e d i n that, Applied to the server side, including: Receive requests sent from the browser; Read the node structure data corresponding to the request from the structure database, wherein the node structure data includes: some nodes in the BIM; Read the target component set file corresponding to the node structure data from the file storage service; The node structure data and the target component set file are sent to the browser, wherein the node structure data and the target component set file are used by the browser to render the partial nodes of the BIM. The file storage service stores the binding relationship between the compressed files of each component set of each node in the BIM directory tree and the file numbers of each node's component set; the file number of each node's component set is obtained by identifying each component set compressed file; the node numbers of each node and the file numbers of each node's component set are stored in the structure database in a linear structure. The directory tree is created based on the model structure information, and the node component identification files associated with each node in the directory tree are determined from the component identification information. The compressed file of each component set of each node in the directory tree is obtained by compressing the component identification file of each node.
2. The method of claim 1, wherein, The request is any one of multiple requests sent by the browser. The node structure data corresponding to different requests are different. The set of all target components of the node structure data corresponding to the different requests is used by the browser to render the complete BIM model.
3. The method as described in claim 1 or 2, characterized in that, The structure database stores the structure data of all nodes related to the BIM, and the file storage service stores compressed files of component sets of all nodes. The structure data of a node includes: a node number and a node component set file number bound to the node number. A node component set file number corresponds to a component set compressed file.
4. The method as described in claim 1 or 2, characterized in that, The step of reading the target component set file corresponding to the node structure data from the file storage service includes: Obtain the component set file number bound to the node number in the node structure data; The file corresponding to the file number of the component set is located in the file storage service to obtain the target component set file.
5. The method as described in claim 1 or 2, characterized in that, Before reading the target component set file corresponding to the node structure data from the file storage service, the method further includes: Receive a file request sent by the browser to obtain the file corresponding to the node structure data, wherein the file request carries a threshold for the size of the file to be read; Sending the node structure data and the target component set file to the browser includes: The target component set file is divided according to the file size threshold to be read, resulting in at least one file stream. At least one file stream is sent sequentially to the browser.
6. A method for rendering Building Information Model (BIM), characterized in that, Applied to the browser, including: Send a request to the server; Receive node structure data sent by the server in response to the request, wherein the node structure data includes some nodes in the BIM; Receive the target component set file corresponding to the node structure data sent by the server; The node structure data and the target component set file are loaded, and a portion of the BIM model structure is rendered. The loading of the node structure data and the target component set file includes: Obtain the node number of each node in the node structure data, and the component set file number bound to each node number; Decompress the files corresponding to the file numbers of each component set file from the target component set file to obtain the identification files of each node component; Load the identifier files of the aforementioned nodes and each node component.
7. The method as described in claim 6, characterized in that, Before sending the request to the server, the method further includes: Set the preset number of nodes to obtain the BIM file to be rendered; Generate the request carrying information about the preset number of nodes.
8. The method as described in claim 7, characterized in that, The request can be any one of multiple requests. The server returns different node structure data for different requests. The set of all target components of the node structure data returned by the different requests is used to render the complete BIM model.
9. The method according to any one of claims 6-8, characterized in that, Before receiving the target component set file corresponding to the node structure data sent by the server, the method further includes: Send a file request corresponding to the node structure data to the server, wherein the file request carries a threshold for the size of the file to be read; The step of receiving the target component set file corresponding to the node structure data sent by the server includes: The server receives at least one file stream in response to the file request, wherein the at least one file stream is obtained by the server dividing the target component set file according to the file size threshold to be read.
10. The method as described in claim 1, characterized in that, include: Obtain the compressed files of each component set of each node in the BIM directory tree, and identify each compressed file of the component set to obtain the file number of each node component set. The compressed files of each component set and the file numbers of each node component set are bound and stored in the file storage service. The node number of each node is bound to the file number of each node component set, and stored in the structure database in the form of a linear structure.
11. The method as described in claim 10, characterized in that, Before obtaining the compressed file of each component set of each node in the BIM directory tree, the method further includes: Obtain the model structure information and component identification information of the BIM; Create the directory tree corresponding to the model structure information, and determine the node component identifier files associated with each node from the component identifier information; The compressed file containing the collection of components for each node in the BIM directory tree includes: The identification files of each node component are compressed to obtain a compressed file of each component set.
12. A system for rendering Building Information Model (BIM), characterized in that, include: On the browser side, it is used to send requests to the server. The system receives node structure data sent by the server in response to the request, wherein the node structure data includes some nodes in the building information model; it receives a target component set file corresponding to the node structure data sent by the server; it loads the node structure data and the target component set file, and renders a portion of the BIM model structure. On the server side, it is used to receive requests sent by the browser; read node structure data corresponding to the request from the structure database; read target component set file corresponding to the node structure data from the file storage service; and send the node structure data and the target component set file to the browser. The server is used to obtain the compressed files of each component set of each node in the BIM directory tree, identify each compressed file of each component set to obtain the file number of each node component set; bind the compressed files of each component set and the file number of each node component set to the file storage service; bind each node number of each node to the file number of each node component set and store them in the structure database in a linear structure.
13. A server-side component, characterized in that, include: The first receiving module is used to receive requests sent by the browser. The first reading module is used to read node structure data corresponding to the request from the structure database, wherein the node structure data includes some nodes in the BIM; The second reading module is used to read the target component set file corresponding to the node structure data from the file storage service; The first sending module is used to send the node structure data and the target component set file to the browser terminal, wherein the node structure data and the target component set file are used by the browser terminal to render the partial nodes of the BIM; The file storage service stores the binding relationship between the compressed files of each component set of each node in the BIM directory tree and the file numbers of each node's component set; the file number of each node's component set is obtained by identifying each component set compressed file; the node numbers of each node and the file numbers of each node's component set are stored in the structure database in a linear structure. The directory tree is created based on the model structure information, and the node component identification files associated with each node in the directory tree are determined from the component identification information. The compressed file of each component set of each node in the directory tree is obtained by compressing the component identification file of each node.
14. The server-side as described in claim 13, characterized in that, Also includes: The acquisition module is used to acquire the compressed files of each component set of each node in the BIM directory tree, and to identify each compressed file of the component set to obtain the file number of each node component set. The file storage service module is used to bind and store the compressed files of each component set and the file numbers of each node component set to the file storage service. The structure database module is used to bind the node number of each node to the file number of the component set of each node, and store them in the structure database in the form of a linear structure.
15. A browser client, characterized in that, include: The second sending module is used to send requests to the server. The second receiving module is used to receive node structure data sent by the server in response to the request, wherein the node structure data includes: some nodes in the BIM; The third receiving module is used to receive the target component set file corresponding to the node structure data sent by the server. The rendering module is used to load the node structure data and the target component collection file, and render a portion of the BIM model structure. The rendering module is used to obtain the node numbers of the partial nodes in the node structure data, and the component collection file numbers bound to the node numbers; decompress the files corresponding to the component collection file numbers from the target component collection file to obtain the node component identification files; and load the partial nodes and the node component identification files.
16. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program is executed by the processor to perform the method as claimed in any one of claims 1-11.