Digital twinning-based three-dimensional model lightweight method, device and program product
By calculating the spatial proximity before and after editing the three-dimensional model, and combining the multi-dimensional algorithm to accurately simplify the original model nodes, the problem of low lightweighting accuracy in the existing technology is solved, and efficient and accurate three-dimensional model lightweighting is achieved.
Patent Information
- Application Number
- CN202510566440.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-08-12
Smart Images

Figure CN120472128A_ABST
Abstract
Description
[0001] This case was applied for on January 21, 2025, with application number: 2025100904593, and the patent name is: Divisional application for precise lightweighting method, equipment and program product for three-dimensional models. Technical Field
[0002] The present application relates to the technical field of digital twin three-dimensional model construction, and specifically to a three-dimensional model lightweighting method, equipment and program product based on digital twin. Background Art
[0003] The field of digital twin technology involves mapping and simulating physical entities in the real world. Constructing a virtual 3D model corresponding to the physical model is a key step. Due to the complexity and diversity of 3D models, this construction process inevitably generates massive amounts of data.
[0004] Therefore, lightweighting 3D models is a key technology in the field of digital twin 3D modeling. Traditional 3D model lightweighting methods generally use a "one-size-fits-all" approach, simply performing a standardized lightweighting operation on the 3D model without fully considering the specific characteristics of different 3D models and the diverse needs of users.
[0005] Based on this, lightweighting of three-dimensional models is a technical difficulty in this field, and precise lightweighting is one of the key directions for the development of lightweight technology. Summary of the Invention
[0006] In view of this, in order to solve the problem of low accuracy of three-dimensional model lightweighting, a three-dimensional model lightweighting method, equipment and program product based on digital twin are provided.
[0007] According to one aspect of an embodiment of the present application, a method for lightweighting a three-dimensional model based on digital twins is disclosed, comprising:
[0008] Acquiring incremental data generated by editing the three-dimensional model, wherein the incremental data corresponds to the edited model nodes of the three-dimensional model;
[0009] performing spatial proximity calculation on the original model nodes corresponding to the original data of the three-dimensional model distribution and the edited model nodes to obtain a spatial proximity calculation value; the spatial proximity calculation value is obtained by performing proximity correlation calculation based on the structural correlation between the original model nodes and the edited model nodes;
[0010] Simplifying the original model nodes according to the calculated spatial proximity values to obtain a lightweight three-dimensional model;
[0011] The algorithm of structural correlation includes:
[0012] Obtaining the structural correlation between the original model node and the edited model node, including: the structure of the spatial hierarchy, the topological relationship, and predefined rules; the predefined rules include: the consistency of the family type of the model, the consistency of the spatial belonging of the model, and the consistency of the model material;
[0013] According to the structure of the spatial hierarchy, determine whether the two have the same structure of the spatial hierarchy; if not, they do not belong to the same structure, and output the value S of the structural correlation struc The result is 0;
[0014] If yes, then determine whether the two are consistent at the same time based on the topological relationship; if not, they do not belong to the same structure, and output the value S of the structural correlation. struc The result is 0;
[0015] If yes, then determine whether the two are consistent at the same time according to the predefined rules; if not, they do not belong to the same structure, and output the value S of the structural correlation struc The result is 0; if so, they belong to the same structure, and the value S of the structural correlation is output. struc The result is 1.
[0016] According to one aspect of an embodiment of the present application, the method further includes: assigning a simplified weight to each of the original model nodes according to the calculated spatial proximity value; the method of simplifying the weight includes:
[0017] Obtaining the type of the original model node, and counting the number of the original model nodes of each type;
[0018] Divide the basic levels according to the ratio of the number of the original model nodes of the type to the total number of the original model nodes;
[0019] Obtaining a mean value of the spatial proximity calculation of the original model nodes of the same type, and dividing the calculated value levels according to the ratio of the spatial proximity calculation value of the original model nodes of each type to the mean value;
[0020] The simplification weight is determined according to the product of the basic level of each of the original model nodes and the calculated value level.
[0021] According to one aspect of an embodiment of the present application, the spatial proximity calculation value is obtained by performing proximity correlation calculation based on one or more dimensions of spatial semantic correlation, visual coverage correlation, and volume correlation between the original model node and the edited model node.
[0022] According to one aspect of an embodiment of the present application, the algorithm for spatial semantic relevance includes:
[0023] Constructing a spatial semantic hierarchical relationship between the original model node and the edited model node, wherein the relationship includes a spatial hierarchy, and the root node of the spatial hierarchy is 0;
[0024] Calculate the spatial correlation degree L1=1 / (1+R) between the original model node and the edited model node according to the spatial hierarchy;
[0025] Here, R is the depth value of the spatial level between the original model node and the edited model node.
[0026] According to one aspect of an embodiment of the present application, the relationship further includes an object level and / or a region level; and the algorithm for determining spatial semantic relevance further includes:
[0027] Obtaining an object impact factor d1 at the object level based on prior data, and / or obtaining a region impact factor q1 at the region level;
[0028] Calculate and obtain the value S of the spatial semantic correlation semantic =L1*d1*q1, the S semantic The value range is [0, 1].
[0029] According to one aspect of an embodiment of the present application, the algorithm for visual coverage correlation includes:
[0030] Calculating the minimum bounding box of the original model node and the edited model node respectively;
[0031] Determine whether the minimum bounding box of the original model node intersects with the minimum bounding box of the edited model node;
[0032] If yes, then output the value S of the visual coverage correlation bbox The result is 1;
[0033] If not, then output the value S of the visual coverage correlation bbox The result is 0.
[0034] According to one aspect of the embodiment of the present application, the algorithm for volume correlation constructs an algorithm model for volume correlation:
[0035] I=[log(V max )-l og(V min )] / [l og(V s )-l og(V min )]
[0036] If V s <V min , then V s =V min =0; if Vs >V max , then V s =V max =1;
[0037] Where I: The value of volume correlation is 0 or 1; V s : The total volume of the current three-dimensional model; V max : Maximum volume threshold of the three-dimensional model; V min : The minimum volume threshold of the 3D model.
[0038] According to one aspect of the embodiments of the present application, the algorithm model for calculating spatial proximity is:
[0039] S proximity =w s ·S semantic +(1-w s )·(w b ·(α·S bbox +(1-α)·(1-I))+w c ·(β·S struct +(1-
[0040] β)·(1-I)))
[0041] Among them, S proximity : spatial proximity value, ranging from [0,1]; S semantic : The value of spatial semantic correlation, ranging from [0,1]; S bbox : The value of visual coverage correlation, ranging from [0,1]; S struct : The value of structural correlation, ranging from [0,1]; I: The value of volume correlation is 0 or 1;
[0042] α = 0.75, the basic weight of structural correlation; β = 0.7, the basic weight of visual coverage correlation;
[0043] w s =0.45, the weight of spatial semantic relevance; w b =0.65, weight of visual coverage correlation; w c =0.35, weight of structural correlation.
[0044] A computer device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0045] A computer program product comprises a computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0046] A digital twin-based 3D model lightweighting method accurately categorizes model nodes based on edit results, retaining the complete information of edited model nodes and simplifying the original model nodes using spatial proximity calculations to precisely reduce the 3D model data volume. This lightweight 3D model maintains model accuracy while reducing storage space and computing resource consumption, improving the efficiency of the lightweighting process.
[0047] Furthermore, through spatial proximity calculation, accurate simplification can be achieved based on multi-dimensional information such as semantics, structure, and vision between model nodes, ensuring that the simplified model retains important features and simplifies redundant data, making the lightweight three-dimensional model of this solution cost-effective. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The above and other objects, features and advantages of the present application will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.
[0049] Figure 1 This is a flowchart of a three-dimensional model lightweighting method based on digital twins provided according to an embodiment of the present application.
[0050] Figure 2 The flowchart of a method for assigning a simplified weight to each original model node according to a spatial proximity calculation value is shown according to one embodiment.
[0051] Figure 3 is a flowchart of an algorithm for spatial semantic relevance according to an embodiment.
[0052] Figure 4 FIG. 4 is a schematic diagram showing the relationship between spatial semantic levels according to an embodiment.
[0053] Figure 5 is a flowchart of an algorithm for spatial semantic correlation according to another embodiment.
[0054] Figure 6 FIG. 4 is a flowchart of an algorithm for structural correlation according to an embodiment.
[0055] Figure 7 FIG. 4 is a flowchart of an algorithm for visual coverage correlation according to an embodiment.
[0056] Figure 8 3D model optimization performance parameter comparison diagram according to one embodiment. DETAILED DESCRIPTION
[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of this application will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The accompanying drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. Identical reference numerals in the figures indicate identical or similar parts, and thus repeated descriptions thereof will be omitted.
[0058] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solutions of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the main content and making various aspects of the present application vague.
[0059] The widespread application of digital twin technology relies on modeling physical scenes. This foundational approach involves constructing virtual 3D models of various scenarios, ranging from cities and buildings to interior spaces. For example, a city, a building, and even a room can all be considered 3D models. From the perspective of specific application scenarios, some 3D models focus on fire emergency response, water conservancy, or smart factories. These scenarios require different 3D models.
[0060] On the other hand, 3D model scenes contain many different types of model nodes. For example, 3D architectural models, such as doors, windows, stairs, and ceilings, are model nodes; 3D fire emergency models, such as fire extinguishers, fire hydrants, and fire trucks, are model nodes; 3D water conservancy models, such as dams, water flows, and pipelines, are model nodes; and 3D smart factory models, such as gantry cranes, conveyor lines, and distribution lines, are model nodes. 3D models in different fields define and arrange different model nodes to ensure that each model node accurately reflects the specific requirements of its application scenario and indirectly reflects the spatial proximity between model nodes.
[0061] For different 3D model scenes, various model nodes in the scene are edited. The editing content includes adding, deleting, modifying, and checking model nodes. Specifically, it is the data editing of the geometric structure of the points, lines, surfaces, and bodies of the model nodes. In the process of 3D model editing, it is often necessary to edit a certain part of the model node. This part will form new incremental data (deletion or replacement are both types of "increment"). The corresponding model node mapped by this incremental data is the core content (i.e. the edited model node), and this content will not be simplified.
[0062] Conversely, unedited original data and its corresponding model nodes typically require simplification. This simplification approach uses weights based on the spatial proximity of the original model nodes to the edited nodes, achieving differentiated and precise 3D model simplification. This reduces the overall data volume of the 3D model, making it more lightweight while also preserving the data of the core, important edited model nodes.
[0063] Based on this, combined with the Figure 1 , a lightweight method for three-dimensional models based on digital twins, including:
[0064] Step 100: Acquire incremental data generated by editing the 3D model, where the incremental data corresponds to the edited model nodes of the 3D model;
[0065] Step 200 , performing spatial proximity calculation on the original model nodes corresponding to the original data of the three-dimensional model distribution and the edited model nodes to obtain spatial proximity calculation values;
[0066] Step 300: simplify the original model nodes according to the calculated spatial proximity values to obtain a lightweight three-dimensional model.
[0067] Specifically, during the 3D model editing process, the user performs operations such as adding, deleting, modifying, and checking, such as editing points, lines, surfaces, bodies, or materials, textures, animations, etc. The generated change data is incremental data, and the 3D model node corresponding to the incremental data is the edited model node. Therefore, the identification of the edited model node is determined by comparing the model node status before and after editing.
[0068] Original model data and incremental data are relative and distinct. In the original data of a 3D model, there is a lot of unedited original data, and the nodes corresponding to these original data are original model nodes. It should be noted that for edited model nodes, there may also be unedited original data, but these model nodes are not original model nodes. Therefore, the core difference is: if a model node is the minimum identifiable object and all the data in the model node has not been edited, then the model is an original model node; correspondingly, if the model node contains edited data, then the model node is an edited model node.
[0069] For the determined original model node, the spatial proximity between the original model node and the edited model node is calculated. The algorithm of the spatial proximity includes any one or more combinations of spatial semantic correlation, structural correlation, visual coverage correlation, and volume correlation, thereby obtaining the corresponding spatial proximity calculation value.
[0070] By calculating the spatial proximity value, the complete data of the edited model node is retained, and only the original model node is simplified. Specifically, according to the spatial proximity calculation value of the original model node, the closer the value is to 1, the closer it is to the edited model node, indicating that the original model node and the edited model node have the same importance, and the more complete data needs to be retained. Conversely, the closer the spatial proximity calculation value of the original model node is to 0, the farther it is from the edited model node, indicating that the original model node needs to be simplified, including lightweight processing such as merging and deleting model nodes, to reduce the amount of data of the original model node. Finally, the simplified original model node and the edited model node are updated and saved, and a lightweight three-dimensional model is output.
[0071] In other embodiments, the Figure 2 In step 200, a simplified weight is assigned to each original model node based on the calculated value of spatial proximity. The algorithm strategy includes:
[0072] Step 210: obtaining the type of the original model node and counting the number of original model nodes of each type;
[0073] Step 220 , dividing the basic levels according to the ratio of the number of original model nodes of the corresponding type to the total number of original model nodes;
[0074] Step 230: Obtain the mean value of the spatial proximity calculation of the original model nodes of the same type, and classify the calculated values according to the ratio of the spatial proximity calculation value of the original model nodes of each type to the mean value;
[0075] Step 240 : Determine a simplification weight according to the product of the basic level and the calculated value level of each original model node.
[0076]
[0077]
[0078] The above table illustrates the algorithm strategy for weight simplification. For a 3D model, the number of different types of model nodes determines their position in the data volume of the 3D model and is also an important reference for lightweight and accurate model objects.
[0079] On this basis, each model node of the corresponding type is combined and the value (such as S an 、S bn 、S dn ) and the mean of the spatial proximity calculated for the model nodes of the same type (e.g. S av 、S bv 、S dv ) is calculated, and the calculation value level is divided according to the ratio of the two to reflect the deviation of the model node in the model node of its type.
[0080] Based on this, the product of the basic level and the calculated value level of each original model node is used to obtain the simplified weight Q of each original model node (for example, Q a1 , Q a2 ...Q an ), set a corresponding threshold based on the simplified weight Q, accurately classify the original model nodes based on the threshold, and perform lightweight processing such as merging and deletion. In this solution, a simplified weight Q is assigned to each original model node, which can be used to preprocess the original model nodes and perform preliminary classification of different original model nodes, inputting high-quality data for subsequent spatial proximity calculations.
[0081] A digital twin-based 3D model lightweighting method accurately categorizes model nodes based on edit results, retaining the complete information of edited model nodes. Original model nodes are precisely simplified using spatial proximity calculations, effectively reducing the 3D model's data size. This lightweighting method maintains model accuracy while reducing storage space and computing resource consumption, improving the efficiency of the 3D model lightweighting process.
[0082] In one embodiment, in conjunction with Figure 3 , the algorithms for spatial semantic relevance include:
[0083] Step 410 , constructing a spatial semantic hierarchical relationship between the original model node and the edited model node, wherein the relationship includes a spatial hierarchy, and the root node of the spatial hierarchy is 0;
[0084] Step 420 , calculating the spatial correlation degree L1=1 / (1+R) between the original model node and the edited model node according to the spatial hierarchy;
[0085] Where R is the depth value of the spatial level between the original model node and the edited model node.
[0086] Specifically, combined with Figure 4 , establishes the spatial semantic hierarchy relationship between the original model node and the edited model node. Combined with a specific application example, for example, in a building information scenario, according to the floor 1 / 2 / 3 is the same spatial semantic hierarchy, the corresponding floor structure 1 / 2 / 3 is the same spatial semantic hierarchy, but belongs to the next floor level. The nodes of the corresponding structure on the corresponding floor include unedited nodes / edited nodes (corresponding to the original model node / edited model node), where the arrows represent the spatial proximity of the unedited node and the edited node. Combined with the hierarchy between each node, the unedited node A (original model node A) is selected. Since the root node of the spatial hierarchy is 0, the depth value between the unedited node A (original model node A) and the edited node A (edited model node A) is: unedited node A-["Structure 1-Floor 1-Floor 2-Structure 2"]-Edited node A, that is, from the unedited node A to the edited node A, there are 4 spatial semantic levels in between, so the depth value R from the unedited node A to the edited node A is 4, and its corresponding spatial correlation degree L1=1 / (1+R), that is, L1=1 / 5. The spatial correlation degrees of other original model nodes can be obtained by analogy, and the corresponding spatial correlation degree L1 can be obtained. In other embodiments, the spatial correlation degree L1 can be directly regarded as a spatial proximity calculation value, which is used to simplify the processing of the original model nodes. This method can reduce the complexity of the calculation and improve the lightweight efficiency.
[0087] In one embodiment, in conjunction with Figure 5 , the relationship of the spatial semantic level also includes the object level and / or region level; the algorithm of spatial semantic relevance also includes:
[0088] Step 430 , obtaining an object impact factor d1 at the object level and / or obtaining a region impact factor q1 at the region level based on prior data;
[0089] Step 440: Calculate and obtain the value S of spatial semantic correlation semantic =L1*d1*q1,S semantic The value range is [0, 1].
[0090] Specifically, the object hierarchy is divided according to the spatial semantic hierarchy, and the object influence factor d1 is set according to different types of object hierarchies in combination with prior data: door = 1.2, wall = 1.0, decoration = 0.8, and equipment object = 1.0.
[0091] Furthermore, the regional level is divided according to the spatial semantic level. Combined with the prior data and according to different types of regional levels, the regional impact factor q1 is set as follows: fire protection zone = 0.6, equipment area = 1.2, public area = 1.0, outdoor = 0.5, indoor = 1.0, road = 0.3.
[0092] The spatial semantic relevance score S is obtained based on the spatial correlation degree L1 and the object influence factor d1 and regional influence factor q1 of the two spatial semantic levels. semantic The calculation formula is:
[0093] S semantic =L1*d1*q1; that is, S semantic = spatial correlation degree L1*object impact factor d1*regional impact factor q1; where S semantic >1, S semantic The results are all aggregated to 1.
[0094] In other embodiments, the corresponding object and area hierarchies will adaptively change based on different application scenarios. For example, in a firefighting scenario, the fire partition factor in the regional impact factor q1 will increase to 1.5, while the outdoor factor will decrease to 0.3. Similarly, for a road and bridge application scenario, the factors for doors and walls will decrease, while the factor for equipment objects (e.g., road surface) will increase.
[0095] Based on this, the strategy for adaptively changing the object influence factor d1 and the regional influence factor q1 is: obtaining the scene theme of the 3D model; obtaining objects and regions related to the scene theme through AI big data statistics; and assigning factors to objects and regions based on prior data.
[0096] In one embodiment, in conjunction with Figure 6 , the algorithms for structural correlation include:
[0097] Step 510: Obtain the structural correlation between the original model node and the edited model node. The structural correlation includes the spatial hierarchical structure, topological relationship, and predefined rules. The predefined rules include: consistent family type of the model, consistent spatial belonging of the model, and consistent material of the model.
[0098] Step 520 , judging whether the original model node and the edited model node have a common spatial hierarchical structure based on the spatial hierarchical structure;
[0099] Step 530: If not, they do not belong to the same structure, and the value of the structural correlation S is output. struc The result is 0;
[0100] Step 540: If yes, then determine whether the topological relationship of the original model node and the edited model node is consistent based on the topological relationship; if not, they do not belong to the same structure, then go to step 530, that is, output the value S of the structural correlation. struc The result is 0;
[0101] Step 550: If yes, then determine whether the predefined rules of the original model node and the edited model node are consistent with each other according to the predefined rules; if not, they do not belong to the same structure, then go to step 530, that is, output the value S of the structural correlation. struc The result is 0;
[0102] Step 560: If yes, they belong to the same structure, and the value of the structural correlation S is output. struc The result is 1.
[0103] Specifically, the structure of the spatial hierarchy is consistent with the structure of the spatial hierarchy for spatial semantic relevance in the above-mentioned embodiment. Topological relationships are relationships between spatial data that satisfy the principles of topological geometry. Examples include topological relationships where multiple BIM model elements are spatially close to each other and share boundaries, inclusion relationships where one element completely contains one or more other elements, connection relationships where model elements are interconnected through specific geometric or physical connections, and intersection relationships where model elements partially overlap in space.
[0104] Considering personalized customization, predefined rules are set, including: consistent family types of models, such as building component families including structural components such as columns, beams, and slabs, or enclosure components such as walls, doors, and windows; electromechanical equipment families including water supply and drainage equipment, electrical equipment, and HVAC equipment; and site component families including topography, landforms, and landscape components; consistent spatial ownership of models, such as room ownership, system ownership, and area ownership; and consistent model materials, such as color, texture, glossiness, and transparency.
[0105] Determine whether the original model node and the edited model node belong to the same structure, and output the value of structural relevance S for the spatial hierarchical structure, topological relationship and predefined rules. struc The result is 1 if yes, 0 otherwise.
[0106] Furthermore, in order to control the influence of structural correlation on adjacency, a weight control factor α is introduced, whose constant value range is (0, 1), and the final structural correlation value (N)S is obtained. struct , the calculation formula is:
[0107] (N)S struct =α*S struct
[0108] By sequentially evaluating the spatial hierarchical structure, topological relationships, and predefined rules, this solution can accurately evaluate the structural consistency of model nodes. Furthermore, the multi-dimensional judgment method can deeply analyze the similarity of the model at different levels, improve accuracy, and reduce the risks or errors caused by relying solely on a single dimension.
[0109] In one embodiment, in conjunction with Figure 7 , the algorithms for visual coverage correlation include:
[0110] Step 610 , respectively calculating the minimum bounding boxes of the original model node and the edited model node;
[0111] Step 620 , determining whether the minimum bounding box of the original model node intersects with the minimum bounding box of the edited model node;
[0112] Step 630: If yes, output the value S of the visual coverage correlation bbox The result is 1;
[0113] Step 640: If not, output the value S of the visual coverage correlation bbox The result is 0.
[0114] Specifically, all geometric elements of the original model node are traversed, and for the point set data, its coordinate range in the three-dimensional space is determined, the minimum and maximum values of the x, y, and z coordinates in the point set are found, and the minimum bounding box of the original model node is constructed based on the obtained coordinate range. The coordinate range comparison method is used, that is, for the minimum bounding box of the original model node and the minimum bounding box of the edited model node, their coordinate ranges in the three coordinate axis directions are compared; or the space segmentation method is used, that is, the method of judging the intersection is to divide the three-dimensional space, for example, using an octree structure, and mapping the minimum bounding box of the original model node and the minimum bounding box of the edited model node to the octree space respectively, and judging the intersection between the two. The above intersection judgment method is used to determine the intersection between the minimum bounding box of the original model node and the minimum bounding box of the edited model node. If the two intersect, the value S of the visual coverage correlation is 0. bbox If the two do not intersect, the visual coverage correlation value S is 1. bbox is 0.
[0115] Furthermore, in order to control the influence of visual coverage correlation on adjacency, a weight control factor β is introduced, and the constant value range is (0, 1), and the final visual coverage correlation value (N)S is obtained. bbox , the calculation formula is:
[0116] (N)S bbox =β*S′ bbox
[0117] This solution calculates and compares the minimum bounding boxes of the two models to determine their visual overlap in a simple and efficient manner. In areas of overlap, duplicate data can be deleted, reducing duplication and improving lightweighting. Furthermore, during the subsequent 3D model visualization process, the rendering order can be determined or optimized based on the areas where model nodes may occlude or overlap each other, improving rendering efficiency.
[0118] In one embodiment, the algorithm for volume correlation constructs an algorithm model for volume correlation:
[0119] I=[log(V max )-l og(V min )] / [l og(V s )-l og(V min )]
[0120] If V s <V min , then V s =V min =0; if V s >V max , then V s =V max =1;
[0121] Where I: The value of volume correlation is 0 or 1; V s : The total volume of the current three-dimensional model; V max : Maximum volume threshold of the three-dimensional model; V min : The minimum volume threshold of the 3D model.
[0122] Specifically, in the project practice, the volume of the 3D model involved is huge, and the total volume of the 3D model V s Often spanning multiple orders of magnitude (e.g., from 10 3 Cubic meters to city level 10 9 When using the volume of a 3D model scene to influence spatial proximity, using a single-dimensional linear volume value can cause the calculation to lose sensitivity. Using a logarithmic function can compress this order of magnitude change into a more manageable range, maintaining a smooth response. Based on this, the solution of this embodiment is designed:
[0123] I=[log(V max )-l og(V min )] / [l og(V s )-l og(V min )]
[0124] If V s <V min , then Vs =V min =0; if V s >V max , then V s =V max =1;
[0125] In the case of large-scale 3D models, V s ≈V max , I≈1; in the small volume scene of the 3D model V s ≈V min , I≈0. After using logarithmic scaling, even if V s Across multiple orders of magnitude, the formula can still generate a smooth volume correlation value I. Logarithmic normalization is used to adjust the volume impact factor, which reasonably balances the fault tolerance of large-volume scenarios and the sensitivity of small-volume scenarios.
[0126] In one embodiment, based on the above-mentioned digital twin-based three-dimensional model lightweight method, the algorithm model for spatial proximity calculation is:
[0127] S proximity =w s ·S semantic +(1-w s )·(w b ·(α·S bbox +(1-α)·(1-I))+w c ·(β·S struct +(1-
[0128] β)·(1-I)))
[0129] Among them, S proximity : spatial proximity value, ranging from [0,1]; S semantic : The value of spatial semantic correlation, ranging from [0,1]; S bbox : The value of visual coverage correlation, ranging from [0,1]; S struct : The value of structural correlation, ranging from [0,1]; I: The value of volume correlation is 0 or 1;
[0130] α = 0.75, the basic weight of structural correlation; β = 0.7, the basic weight of visual coverage correlation;
[0131] w s =0.45, the weight of spatial semantic relevance; w b =0.65, weight of visual coverage correlation; w c =0.35, weight of structural correlation.
[0132] Specifically, the algorithm model for spatial proximity calculation involves weight control factors α and β, including the weights of structural correlation and visual coverage correlation, and adjusts the impact of volume correlation.
[0133] In addition, w s is the weight of spatial semantic relevance, ranging from [0,1]; w b is the weight of visual coverage correlation; w c is the weight of structural relevance.
[0134] In other examples, in order to obtain the optimal weight value, the following method can be used to determine it, as follows:
[0135] By manually annotating the proximity value S true , optimize the weights to minimize S proximity With S true The error is the evaluation error, and the mean squared error (MSE) is introduced to optimize the objective function:
[0136]
[0137] For a data point {i}, its error Deviation(i) is defined as:
[0138]
[0139] Where N is the number of data points; 1 / N is the scaling factor for taking the mean to avoid unreasonable optimization caused by error accumulation.
[0140] The proximity value calculated by the formula; S true (i) The true value obtained by manual annotation.
[0141] The gradient descent method is used to optimize the weight parameters. Specifically:
[0142] Assume the initial weight parameter, namely:
[0143] w s =0.5, the initial weight of the spatial semantic relevance; w b =0.6, weight of visual coverage correlation; w c =0.4, weight of structural correlation.
[0144] The initial weights of α and β are set to α = 0.7 and β = 0.8 respectively.
[0145] Based on the above weight combination, S is calculated according to the algorithm model of spatial proximity calculation. proximity .
[0146] Then the weight parameters are iteratively optimized by the gradient descent method. After several iterations, when the value of the objective function no longer decreases significantly, the final weight is output, that is:
[0147] w s ≈0.45; w b ≈0.65;w c ≈0.35;α≈0.75,β≈0.7.
[0148] For ease of calculation, the unified weight value is: w s =0.45; w b =0.65; w c =0.35; α=0.75, β=0.7.
[0149] Combined width Figure 8 We now demonstrate the results of 3D model lightweighting in a specific application example, specifically comparing the performance parameters of a 3D shopping mall scene after optimization using this solution. While retaining key 3D model features, the optimization significantly reduced the number of objects, geometric models, and triangles, with the data volume for some metrics reduced by over 70%, achieving lightweight 3D models. Furthermore, the efficiency of the 3D model's frame rendering time increased significantly by 400%, with virtually no impact on the user's visual experience. This achieves precise lightweighting of the 3D model and comprehensively improves the user experience.
[0150] In one embodiment, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned fusion-driven three-dimensional model rapid construction method.
[0151] In one embodiment, a computer program product includes a computer program, which, when executed by a processor, implements the steps of the above-mentioned fusion-driven three-dimensional model rapid construction method.
[0152] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0153] Furthermore, although the steps of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0154] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. A three-dimensional model lightweighting method based on digital twin, characterized in that: include: Acquiring incremental data generated by editing the three-dimensional model, wherein the incremental data corresponds to the edited model nodes of the three-dimensional model; performing spatial proximity calculation on the original model nodes corresponding to the original data of the three-dimensional model distribution and the edited model nodes to obtain a spatial proximity calculation value; the spatial proximity calculation value is obtained by performing proximity correlation calculation based on the structural correlation between the original model nodes and the edited model nodes; Simplifying the original model nodes according to the calculated spatial proximity values to obtain a lightweight three-dimensional model; The algorithm of structural correlation includes: Obtaining the structural correlation between the original model node and the edited model node, including: the structure of the spatial hierarchy, the topological relationship, and predefined rules; the predefined rules include: the consistency of the family type of the model, the consistency of the spatial belonging of the model, and the consistency of the model material; According to the structure of the spatial hierarchy, determine whether the two have the same structure of the spatial hierarchy; if not, they do not belong to the same structure, and output the value S of the structural correlation struc The result is 0; If yes, then determine whether the two are consistent at the same time based on the topological relationship; if not, they do not belong to the same structure, and output the value S of the structural correlation. struc The result is 0; If yes, then determine whether the two are consistent at the same time according to the predefined rules; if not, they do not belong to the same structure, and output the value S of the structural correlation struc The result is 0; if so, they belong to the same structure, and the value S of the structural correlation is output. struc The result is 1.
2. The three-dimensional model lightweighting method based on digital twin according to claim 1 is characterized in that: Also includes: assigning a simplified weight to each of the original model nodes according to the calculated spatial proximity value; The method for simplifying weights includes: Obtaining the type of the original model node, and counting the number of the original model nodes of each type; Divide the basic levels according to the ratio of the number of the original model nodes of the type to the total number of the original model nodes; Obtaining a mean value of the spatial proximity calculation of the original model nodes of the same type, and dividing the calculated value levels according to the ratio of the spatial proximity calculation value of the original model nodes of each type to the mean value; The simplification weight is determined according to the product of the basic level of each of the original model nodes and the calculated value level.
3. The three-dimensional model lightweighting method based on digital twin according to claim 2 is characterized in that: The spatial proximity calculation value is obtained by performing proximity correlation calculation based on one or more dimensions of spatial semantic correlation, visual coverage correlation, and volume correlation between the original model node and the edited model node.
4. The three-dimensional model lightweighting method based on digital twin according to claim 3 is characterized in that: The algorithm of spatial semantic relevance includes: Constructing a spatial semantic hierarchical relationship between the original model node and the edited model node, wherein the relationship includes a spatial hierarchy, and the root node of the spatial hierarchy is 0; Calculate the spatial correlation degree L1=1 / (1+R) between the original model node and the edited model node according to the spatial hierarchy; Here, R is the depth value of the spatial level between the original model node and the edited model node.
5. The three-dimensional model lightweighting method based on digital twin according to claim 4 is characterized in that: The relationship also includes object level and / or region level; the algorithm of spatial semantic relevance also includes: Obtaining an object impact factor d1 at the object level based on prior data, and / or obtaining a region impact factor q1 at the region level; Calculate and obtain the value S of the spatial semantic correlation semantic =L1*d1*q1, the S semantic The value range is [0, 1].
6. The three-dimensional model lightweighting method based on digital twin according to claim 5 is characterized in that: The algorithm of visual coverage correlation includes: Calculating the minimum bounding box of the original model node and the edited model node respectively; Determine whether the minimum bounding box of the original model node intersects with the minimum bounding box of the edited model node; If yes, then output the value S of the visual coverage correlation bbox The result is 1; If not, then output the value S of the visual coverage correlation bbox The result is 0.
7. The three-dimensional model lightweighting method based on digital twin according to claim 6 is characterized in that: The algorithm of the volume correlation is used to construct the algorithm model of the volume correlation: I=[l and(V max )-l and(V min )] / [l and(V s )-l and(V min )] If V s <V min , then V s =V min =0; if V s >V max , then V s =V max =1; Where I: The value of volume correlation is 0 or 1; V s : The total volume of the current three-dimensional model; V max : Maximum volume threshold of the three-dimensional model; V min : The minimum volume threshold of the 3D model.
8. The three-dimensional model lightweighting method based on digital twin according to claim 7 is characterized in that: The algorithm model for calculating spatial proximity: S proximity =w s ·S semantic +(1-w s )·(w b ·(α·S bbox +(1-a)·(1-I))+w c ·(β·S struct +(1- β)·(1-I))) Among them, S proximity : spatial proximity value, ranging from [0,1]; S semantic : The value of spatial semantic correlation, ranging from [0,1]; S bbox : The value of visual coverage correlation, ranging from [0,1]; S struct : The value of structural correlation, ranging from [0,1]; I: The value of volume correlation is 0 or 1; α = 0.75, the basic weight of structural correlation; β = 0.7, the basic weight of visual coverage correlation; w s =0.45, the weight of spatial semantic relevance; w b =0.65, weight of visual coverage correlation; w c =0.35, weight of structural correlation.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.