Lightweight loading method for linear engineering model, computer device and readable storage medium

By building a model structure tree and dynamically loading or unloading node data according to the visual range, the problems of long loading time and large memory usage of linear engineering models are solved, improving user experience and rendering efficiency.

CN118819683BActive Publication Date: 2024-12-31FUJIAN CHENXI INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411295867.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-31
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

When loading linear engineering models, the existing technology causes the model to be loaded for a long time, occupy a lot of memory and CPU resources, affect the user experience, and may even cause browser crashes.

Method used

By building a model structure tree, the component data of the linear engineering model is stored separately according to nodes, and the required node component data is dynamically loaded or unloaded according to changes in the visual range. Screen space error calculation is used to determine whether to load or unload node data. Files, reduce memory usage and improve loading efficiency.

Benefits of technology

It realizes efficient loading of linear engineering models, reduces memory usage, improves user operation experience, and avoids browser crashes, ensuring normal loading and rendering of models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819683B_ABST
    Figure CN118819683B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of building modeling, and specifically to a lightweight loading method, computer equipment and readable storage medium for a linear engineering model. The method of the present application includes the following steps: extracting component information from a linear engineering model and constructing a model structure tree; generating a node data file for each node in the model structure tree and a data organization file for the model structure tree; the rendering engine loads the data organization file and the node data file of the root node to initialize the linear engineering model; calculating the screen space error SSE of all classified nodes; traversing all classified nodes for processing, if the screen space error SSE of the current classified node is less than a preset screen space error threshold, then loading the node data file of the current classified node, otherwise unloading the node data file of the current classified node. The technical solution of the present application can dynamically load or unload node geometry data according to changes in the visible range, avoiding crashes caused by excessive memory usage and CPU overload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of building modeling, and in particular to a lightweight loading method of a linear engineering model, a computer device, and a readable storage medium. Background Art

[0002] Linear Engineering refers to a series of infrastructure projects that present linear characteristics in time and space, such as railways, highways, oil and gas pipelines, channels, pipelines, urban integrated pipe networks, transmission lines and cableway projects. In the engineering field, there are many modeling models that are linear projects, such as bridge models, rail models, etc.

[0003] Since linear engineering models usually contain a large amount of vertex information, normal vector information, and texture information to form static resource files, the data files of the models are usually huge. The existing web page loading linear engineering model technology usually loads all components and displays them at once, which significantly increases the loading time of the model, occupies a large amount of memory and CPU resources, and causes page response delays until the browser crashes, which not only seriously affects the user experience, but may also cause the model to fail to load normally and become unusable.

[0004] Therefore, how to efficiently load linear engineering models to improve user operating experience is an urgent problem to be solved. Summary of the invention

[0005] One of the purposes of the present invention is to overcome the above shortcomings and provide a lightweight loading method for a linear engineering model, which can dynamically load node data according to changes in the visible range, reduce memory usage, and improve user operation experience.

[0006] In order to solve the above technical problems, the present invention provides a lightweight loading method for a linear engineering model, comprising the following steps:

[0007] S1. extracting all component information from the linear engineering model, wherein the component information includes attribute information, geometric information and material information;

[0008] S2. construct a model structure tree according to the component information, wherein the model structure tree consists of a root node and multi-level classification nodes under the root node;

[0009] S3, generating a node data file corresponding to each node in the model structure tree;

[0010] S4, generating a data organization file of the model structure tree;

[0011] S5, the rendering engine loads the data organization file to initialize the linear engineering model; the rendering engine loads the node data file corresponding to the root node of the model structure tree;

[0012] S6. The rendering engine calculates the screen space error SSE of all classification nodes. The calculation formula is:

[0013] SSE = ( g * h ) / ( d * s ),in, g Indicates the preset geometric metric error value of the current classification node. h Indicates the height pixel value of the screen. s Indicates fixed parameter values; d Indicates the distance from the center of the screen to the center of the bounding box of the current classification node;

[0014] S7, traverse all classification nodes for processing, if the screen space error SSE of the current classification node is less than the preset screen space error threshold, load the node data file corresponding to the current classification node, otherwise, unload the node data file of the current classification node.

[0015] The technical solution of the present application organizes the component data of the linear engineering model into the form of a model structure tree, and stores the component data separately according to the nodes. When the model is rendered, the required node component data can be dynamically loaded or unloaded according to the changes in the visible range, thereby reducing memory usage and improving loading efficiency.

[0016] Furthermore, constructing the model structure tree according to the component information includes the following steps:

[0017] S21, creating a root node of the model structure tree; calculating and allocating components contained in the root node;

[0018] S22, creating a classification root node of each type under the root node according to the number of component types;

[0019] S23, generating a classification child node for each classification root node according to the number of unassigned components of each type;

[0020] S24, assigning each type of unassigned component to each corresponding classification node;

[0021] S25. Calculate the bounding box volume of each classification node, where the bounding box of the classification node refers to the smallest cuboid containing all components assigned to the classification node.

[0022] The technical solution of the present application organizes the component data of the linear engineering model into the form of a model structure tree, and generates subtrees according to the component type. Each classification subnode only processes components of the same type, which can improve the storage and retrieval efficiency of the same component data.

[0023] Furthermore, the calculation and distribution of the components contained in the root node are specifically:

[0024] S211, calculating the bounding box volume of each component, where the bounding box refers to the smallest cuboid containing all vertices of the component;

[0025] S212, calculating the volume of the total bounding box, where the total bounding box refers to the smallest cuboid that contains all components;

[0026] S213, sorting the components in descending order according to the volume of their bounding boxes;

[0027] S214, assigning a component whose bounding box volume is larger than half of the total bounding box volume to the root node;

[0028] S215: If the number of components allocated to the root node is less than a preset first threshold, allocate the insufficient number of components to the root node according to the volumes of the bounding boxes from large to small.

[0029] The technical solution of the present application preferentially allocates large components to the root node after sorting them according to the size of the component bounding boxes, so that the components loaded into the root node during model initialization can display the main outline of the entire model.

[0030] Furthermore, generating a classification child node for each classification root node according to the number of unassigned components of each type is specifically as follows:

[0031] S231. Calculate the number of components assigned to each classification node q , the calculation formula is: q=m / n ,in, m is the number of unassigned components of the current type, n is the number of classification nodes of the current type;

[0032] S232: Determine the number of the distribution components q Is it less than the second threshold? If so, execute step S234; otherwise, execute step S233;

[0033] S233, generating a next-level child node for the last-level classification node; jumping to step S231 to continue execution;

[0034] S234. End the process.

[0035] Furthermore, the node data file corresponding to each node in the model structure tree is generated, specifically:

[0036] S31, generating an instantiated component data file for components with the same geometric information and material information in the node; the instantiated component data file includes the geometric information, material information and displacement matrix information of each component;

[0037] S32, generating non-instantiated component data files for other components respectively;

[0038] S33: Aggregate the instantiated component data file and the non-instantiated component data file into a node data file.

[0039] According to the technical solution of the present application, if the geometric information and material information of the components within a node are the same, the geometric information data and material information only need to be stored once. Subsequently, each instantiated component can be generated by adding the geometric data, material information and displacement matrix information, thereby reducing data transmission and storage overhead.

[0040] Furthermore, the lightweight loading method of the linear engineering model further includes the following steps:

[0041] The instantiated component data file and the non-instantiated component data file are compressed using a geometry information compression algorithm.

[0042] Accordingly, the present application also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the lightweight loading method of the linear engineering model described in any one of the above items when executing the computer program.

[0043] Accordingly, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the lightweight loading method of the linear engineering model described in any one of the above items are implemented.

[0044] Compared with the prior art, the advantages of the technical solution of the present application include:

[0045] 1. Organize the component data of the linear engineering model into the form of a model structure tree, and store the component data separately according to the nodes. When the model is rendered, the required node component data can be dynamically loaded or unloaded according to the changes in the visible range, thereby reducing memory usage and improving loading efficiency.

[0046] 2. The model structure tree generates subtrees according to the component type. Each classification subnode only processes components of the same type, which can improve the storage and retrieval efficiency of the same component data. If the geometric information and material information of the components in the node are the same, only the geometric information data and material information need to be stored once. Subsequently, each instantiated component can be generated by adding the geometric data, material information and displacement matrix information, thereby reducing data transmission and storage overhead.

[0047] 3. After sorting according to the size of the component bounding box, the large components are assigned to the root node first, so that the components loaded into the root node during model initialization can display the main outline of the entire model. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of the steps of a lightweight loading method for a linear engineering model of the present invention.

[0049] Figure 2 It is a flow chart of the steps of constructing a model structure tree according to component information of the present invention.

[0050] Figure 3 It is a flow chart of the steps of calculating and distributing the components contained in the root node of the present invention.

[0051] Figure 4 It is a flow chart of the steps of generating classification child nodes for each classification root node of the present invention.

[0052] Figure 5 It is a schematic diagram of the structure tree of the model of the present invention.

[0053] Figure 6 It is a flow chart of the steps of generating a node data file for each node in the model structure tree of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1

[0055] like Figure 1 FIG. 1 is a flowchart of a lightweight loading method for a linear engineering model of the present invention, comprising the following steps:

[0056] S1. extracting all component information from the linear engineering model, wherein the component information includes attribute information, geometric information and material information;

[0057] In the field of architectural modeling technology, linear engineering models are usually Revit models, which are composed of multiple components. The information of each component includes attribute information, geometric information and material information. Among them, the attribute information includes basic information such as component type, family type component elevation, displacement matrix, etc. Components of the same type have the same characteristics, because components of the same type often use the same materials and processes in buildings, such as building structure type, electromechanical structure type, building interior type, general type, door and window structure type, and curtain wall structure type. Geometric information consists of vertices, normal vectors, and UV coordinates. Vertex is the basic unit of geometric shape. A vertex is usually represented by three-dimensional coordinates (x, y, z), which describes its position in space. Multiple vertices can be connected by edges and faces to form complex geometric shapes. The normal vector is a vector perpendicular to the surface or vertex, which is usually used to describe the orientation of the surface. The normal vector of each vertex or face helps determine how light affects the color and brightness of the surface. UV coordinates are used to map two-dimensional textures onto the surface of a three-dimensional model. UV coordinates are usually in the range of [0, 1] and represent the two-dimensional position of the texture image. Material information describes the visual and physical properties of the model surface to simulate the material properties in the real world.

[0058] S2. Construct a model structure tree based on the component information. The model structure tree consists of a root node and multiple levels of classification nodes under the root node. Figure 2 As shown, it is a flowchart of the steps of constructing a model structure tree according to the component information of the present invention, which includes the following steps:

[0059] S21, creating a root node of the model structure tree; calculating and allocating components contained in the root node.

[0060] like Figure 3 As shown, it is a flowchart of the steps of calculating and allocating the components contained in the root node of the present invention, specifically:

[0061] S211. Calculate the bounding box volume of each component, where the bounding box refers to the smallest cuboid containing all vertices of the component.

[0062] In the present application, the bounding box is obtained by traversing all vertex coordinate information of the component to find the maximum and minimum values ​​of x, y, and z respectively, calculating the distance between them in the direction of the spatial coordinate axis, and then obtaining the volume of the bounding box through the volume calculation formula V = length * width * height.

[0063] S212: Calculate the volume of the total bounding box, where the total bounding box refers to the smallest cuboid that contains all components.

[0064] Since the total bounding box is a bounding box that can contain all components, it is necessary to traverse the vertex coordinate information of all components to find the maximum and minimum values ​​of x, y, and z, calculate the distance between each in the direction of the spatial coordinate axis, and then use the volume calculation formula V = length * width * height to get the volume of the total bounding box.

[0065] S213, sort the components in descending order according to the volume of their bounding boxes.

[0066] S214: Allocate a component whose bounding box volume is larger than half of the total bounding box volume to the root node.

[0067] S215, if the number of components allocated to the root node is less than a preset first threshold, the insufficient number of components are allocated to the root node according to the volume of the bounding box from large to small. In a preferred embodiment, the first threshold can be set to 10 to ensure that the number of components loaded by the browser is not too large when the geometric information and material information are initially loaded, thereby ensuring the smoothness of browsing the model.

[0068] The technical solution of the present application preferentially allocates a certain number of larger components to the root node after sorting the sizes of all component bounding boxes, so that the components loaded into the root node when the model is initialized can display the main outline of the entire model. The components allocated to the root node here can include multiple different types of components.

[0069] S22. Create a classification root node of each type under the root node according to the number of component types.

[0070] After creating the root node of the model structure tree, the solution of the present application needs to create a classification root node of each type under the root node according to the number of component types not assigned to the node. For example, if the types of unassigned components are two types, namely, building structure type and electromechanical structure type, two classification root nodes are created under the root node, one for the building structure type and the other for the electromechanical structure type.

[0071] S23. Generate a classification child node for each classification root node according to the number of unassigned components of each type.

[0072] like Figure 4 As shown, it is a flowchart of the steps of generating classification child nodes for each classification root node of the present invention, specifically:

[0073] S231. Calculate the number of components assigned to each classification node q , the calculation formula is: q=m / n ,in, m is the number of unassigned components of the current type, n The number of classification nodes of the current type.

[0074] S232: Determine the number of the distribution components q Is it less than the second threshold? If so, execute step S234; otherwise, execute step S233. In a preferred embodiment, the second threshold can be set to 1000.

[0075] S233, generate the next level of child nodes for the last level classification node; jump to step S231 to continue. Usually, the number of child nodes generated for the classification root node is 4, and the number of next level child nodes generated for each subsequent classification node is twice the total number of classification nodes at that level.

[0076] S234. End the process.

[0077] For example, there are 2000 unassigned components of the building structure type. According to the above steps, if all 2000 components are assigned to the classification root node, it exceeds the second threshold, and 4 child nodes are generated for the building structure type classification root node. At this time, it is calculated that the number of components assigned to each classification node is 400, which is less than the second threshold, and the process of assigning child nodes is terminated.

[0078] S24. Allocate each type of unassigned component to each corresponding classification node.

[0079] Usually, the unassigned components are sorted according to the size of the bounding box, and then assigned to each level of classification nodes in order from top to bottom according to the average number.

[0080] S25. Calculate the bounding box volume of each classification node, where the bounding box of the classification node refers to the smallest cuboid containing all components assigned to the classification node.

[0081] like Figure 5 The figure is a schematic diagram of the model structure tree of the present invention, wherein the model structure tree includes a root node, and a classification root node of multiple types of components at a level below the root node. There may also be multiple levels of child nodes under the classification root node of each component type.

[0082] S3. Generate a node data file corresponding to each node in the model structure tree.

[0083] like Figure 6 As shown, it is a flowchart of the steps of generating a node data file corresponding to each node in the model structure tree of the present invention, specifically:

[0084] S31, generating an instantiated component data file for components with the same geometric information and material information in a node; the instantiated component data file includes the geometric information, material information and displacement matrix information of each component.

[0085] If the geometric information and material information of different components in the same node are the same, it is only necessary to store the geometric information and material information once, and save the displacement matrix information of each component at the same time. Each component instance can be generated later through the geometric information, material information and their respective displacement matrices (describing position, rotation, and scaling). In this case, the technical solution of the present application exports the component as an instantiated component data file, usually a file with the suffix i3dm. The i3dm format is used to instantiate multiple 3D models, so that the same model can be displayed in different positions, rotations, and scales in the scene, reducing data transmission and storage overhead. The instantiated component data file mainly consists of the suffix name, version, file length, specific header information, and model data.

[0086] S32. Generate non-instantiated component data files for other components respectively.

[0087] After removing components with the same geometric information, the geometric information is stored separately for each component remaining in the node, and each component is exported as a non-instantiated component data file, usually a file with the suffix b3dm. The b3dm format is used to batch transmit multiple 3D models, packaging multiple independent models into a batch to reduce the number of requests and data transmission. The non-instantiated component data file mainly consists of the suffix name, version, file length, specific header information and model data.

[0088] S33: Aggregate the instantiated component data file and the non-instantiated component data file into a node data file.

[0089] The technical solution of the present application finally aggregates the instantiated component data file and the non-instantiated component data file into a node data file, which is usually a file with the suffix cmpt. The cmpt format is used to combine component data in multiple formats (such as b3dm, i3dm, etc.), so that a cmpt file can contain multiple different types of data. The file consists of several parts such as file suffix name, version, total file length, number of embedded files, and embedded files. Through this structure, the cmpt file can efficiently transmit and display different types of 3D model data.

[0090] S4. Generate a data organization file of the model structure tree.

[0091] The data organization file exports the hierarchical relationship between each node and the description content of each node according to the model structure tree. Each node description content includes node bounding box information, geometric metric error value, loading form, and the path of the node data file corresponding to the structure tree node. The data organization file is usually implemented as a json file.

[0092] S5. The rendering engine loads the data organization file to initialize the linear engineering model; the rendering engine loads the node data file corresponding to the root node of the model structure tree.

[0093] When the model rendering is initialized, the rendering engine allows the browser to load the model in a tree structure according to the information provided by the data organization file, and at the same time, by loading the node data file corresponding to the root node of the model structure tree, the main outline of the entire model can be displayed.

[0094] S6. The rendering engine calculates the screen space error SSE (ScreeSpaceError) of all classification nodes. The calculation formula is:

[0095] SSE = ( g * h ) / ( d * s ),in, g Indicates the preset geometric metric error value of the current classification node. h Indicates the height pixel value of the screen. s Indicates fixed parameter values; d Indicates the distance from the center of the screen to the center of the bounding box of the current classification node.

[0096] The preset geometric metric error value of the current classification node is calculated according to the level of the current classification node, and the preset geometric metric error value of each node may be different. s Indicates a fixed parameter value, usually 0.5629165.

[0097] S7, traverse all classification nodes for processing, if the screen space error SSE of the current classification node is less than the preset screen space error threshold, load the node data file corresponding to the current classification node, otherwise, unload the node data file of the current classification node.

[0098] When the model is initialized, the screen space error threshold MSSE (MaxScreeSpaceError) defaults to 16. This solution uses MSSE to decide when to load and display models at different levels of detail. When the user zooms or moves the view, the screen space error SSE of each classified node in the model tree is recalculated, and the model node needs to be loaded and unloaded based on the new viewpoint position. For example, when the viewpoint is closer to the component when the model is zoomed in, the model node may be loaded to maintain visual details, while when the viewpoint is farther away from the component when the model is zoomed out, the geometric data of the current node may be unloaded to improve performance. The process of adjusting rendering details involves calculating the SSE of each node and comparing it with the MSSE. If the calculated SSE is less than the MSSE, a higher level of detail will be selected to improve the visual effect; if the SSE is greater than or equal to the MSSE, the current model node may be unloaded to provide rendering efficiency. This method effectively balances the visual accuracy and rendering efficiency of the model under different view conditions. Since the node data is organized according to the classification of the data organization file, the dynamic loading and unloading of the model nodes can be effectively managed. Therefore, the problem of insufficient dynamic memory of the browser will not occur during dynamic loading, thus avoiding the failure of loading the model. This classification method enables the rendering engine to load only the details required within the view range, maintaining reasonable memory usage and improving rendering efficiency.

[0099] In a preferred embodiment, the lightweight loading method of the linear engineering model of the present invention further includes the following steps:

[0100] The instantiated component data file and the non-instantiated component data file are compressed using a geometry information compression algorithm, for example, using a Draco compression algorithm to compress the geometry information to reduce the file size as much as possible.

[0101] In summary, the technical solution of the present application organizes the component data of the linear engineering model into the form of a model structure tree, and stores the component data separately according to the nodes. When the model is rendered, the required node component data can be dynamically loaded or unloaded according to the change of the visual range, thereby reducing memory usage and improving loading efficiency. The model structure tree generates subtrees according to the component type, and each classification subnode only processes components of the same type, which can improve the storage and retrieval efficiency of the same component data. If the geometric information and material information of the components in the node are the same, the geometric information data and material information only need to be stored once, and each instantiated component can be generated later by adding the geometric data, material information and displacement matrix information, thereby reducing data transmission and storage overhead. Embodiment 2

[0102] The present embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including independent servers, or server clusters composed of multiple servers) that can execute programs. The computer device of the present embodiment at least includes, but is not limited to: a memory and a processor that can be connected to each other through a system bus. In some embodiments, the memory can be an internal storage unit of the computer device, such as a hard disk or memory of the computer device, or an external storage device of the computer device, such as a plug-in hard disk, a smart memory card, etc. equipped on the computer device. The processor can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, which is used to control the overall operation of the computer device. Specifically, in the present embodiment, the processor is used to run a computer program stored in the memory, and the processor implements the steps of the lightweight loading method of any of the above-mentioned linear engineering models when executing the computer program. Embodiment 3

[0103] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored. When the program is executed by a processor, the steps of the lightweight loading method of the linear engineering model as described in any of the above items are implemented.

[0104] The above specific implementation modes are only detailed explanations of the technical solutions of the present invention. The present invention is not limited to the above embodiments. Any improvement or replacement based on the principles of the present invention should be within the protection scope of the present invention.

Claims

1. A lightweight loading method for a linear engineering model, characterized in that: The following steps are involved: S1. extracting all component information from the linear engineering model, wherein the component information includes attribute information, geometric information and material information; S2, constructing a model structure tree according to the component information, the model structure tree consists of a root node and multi-level classification nodes under the root node; the construction of the model structure tree according to the component information includes the following steps: S21, creating a root node of the model structure tree; calculating and assigning the components contained in the root node; S22, creating a classification root node of each type under the root node according to the number of component types; S23, generating a classification child node for each classification root node according to the number of unassigned components of each type; S24, assigning each type of unassigned components to each corresponding classification node; S25, calculating the bounding box volume of each classification node, the bounding box of the classification node refers to the smallest cuboid containing all components assigned to the classification node; S3, generating a node data file corresponding to each node in the model structure tree, specifically: S31, generating an instantiated component data file for components with the same geometric information and material information in the node; the instantiated component data file includes the geometric information, material information and displacement matrix information of each component; S32, generating non-instantiated component data files for other components respectively; S33, aggregating the instantiated component data file and the non-instantiated component data file into a node data file; S4, generating a data organization file of the model structure tree; S5, the rendering engine loads the data organization file to initialize the linear engineering model; the rendering engine loads the node data file corresponding to the root node of the model structure tree; S6. The rendering engine calculates the screen space error SSE of all classification nodes. The calculation formula is: SSE = (g·h) / (d·s), where g represents the preset geometric metric error value of the current classification node, h represents the height pixel value of the screen, s represents the fixed parameter value; d represents the distance from the center point of the screen to the center point of the bounding box of the current classification node; S7, traverse all classification nodes for processing, if the screen space error SSE of the current classification node is less than the preset screen space error threshold, load the node data file corresponding to the current classification node, otherwise, unload the node data file of the current classification node.

2. The lightweight loading method of a linear engineering model according to claim 1, characterized in that: The calculation and distribution of the components contained in the root node are specifically: S211, calculating the bounding box volume of each component, where the bounding box refers to the smallest cuboid containing all vertices of the component; S212, calculating the volume of the total bounding box, where the total bounding box refers to the smallest cuboid that contains all components; S213, sorting the components in descending order according to the volume of their bounding boxes; S214, assigning a component whose bounding box volume is larger than half of the total bounding box volume to the root node; S215: If the number of components allocated to the root node is less than a preset first threshold, allocate the insufficient number of components to the root node according to the volumes of the bounding boxes from large to small.

3. The lightweight loading method of a linear engineering model according to claim 1, characterized in that: The method of generating a classification child node for each classification root node according to the number of unassigned components of each type is as follows: S231, calculating the number q of allocated components of each classification node, the calculation formula is: q = m / n, where m is the number of unallocated components of the current type, and n is the number of classification nodes of the current type; S232, determining whether the number q of the allocation components is less than a second threshold value, if so, executing step S234, otherwise executing step S233; S233, generating a next-level child node for the last-level classification node; jumping to step S231 to continue execution; S234. End the process.

4. The lightweight loading method of a linear engineering model according to claim 1, characterized in that: The following steps are also included: The instantiated component data file and the non-instantiated component data file are compressed using a geometry information compression algorithm.

5. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the lightweight loading method for the linear engineering model described in any one of claims 1 to 4 when executing the computer program.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the lightweight loading method of the linear engineering model as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Three-dimensional visualization engine and WEB application calling method based on BIM model

    CN107193911A

  • Lightweight description method and loading method for nuclear power three-dimensional model

    CN113868861A

  • LOD-based BIM model lightweight construction and display method

    CN114283231A

  • BIM model space decomposition method and system

    CN118470223A