A lightweight method for real-time adaptive digital twin models

Through the real-time adaptive digital twin model lightweighting method, combined with model accuracy setting, accuracy mapping and adjacent model processing modules, the problem of model lightweighting in the existing technology is solved, the storage is not friendly and large models is not applicable, and efficient and real-time model lightweighting and rendering are achieved.

CN119251370BActive Publication Date: 2025-05-02JIANGXI TONGRUI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411783594.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-05-02
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The existing digital twin model lightweight method cannot be effectively carried out in real-time dynamic systems, resulting in insufficient accuracy or insufficient optimization in some scenarios, resulting in lag. The LOD method needs to be loaded at one time before importing into the system, and the storage is unfriendly, and is not suitable for large models.

Method used

The real-time adaptive digital twin model lightweighting method is adopted. Through the model accuracy setting module, the accuracy mapping module and the adjacent model processing module, the screen pixel percentage is bound to the model point and surface number and texture streaming map resolution to achieve real-time model lightweighting, and multiple models are combined into a single HLOD proxy model, and dynamic surface reduction processing is performed to process the obscured part.

Benefits of technology

Real-time model lightweighting is achieved, reducing resource usage and rendering time, suitable for various scenarios and model sizes, and improving operational efficiency and display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251370B_ABST
    Figure CN119251370B_ABST
Patent Text Reader

Abstract

The present invention discloses a real-time adaptive digital twin model lightweight method, which relates to the technical field of model lightweighting. The method adopts a model lightweight system to work, and the system includes a model accuracy setting module, an accuracy mapping module, and an adjacent model processing module. The model accuracy setting module is used to bind the model point and surface number and the texture streaming map resolution according to the screen pixel percentage. The accuracy mapping module is used to obtain the model point and surface accuracy reduction ratio under the model screen pixel ratio by mapping. The adjacent model processing module is used to combine multiple models in the scene into a single HOLD proxy model, and dynamically reduce the surface of the blocked part. The accuracy mapping module includes a model import module, a model information acquisition module, a point and surface quantity judgment module, a ratio optimization binding module, a difference filling module, and a sphere boundary construction module. The present invention has the characteristics of self-adaptation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of model lightweighting, and in particular to a real-time adaptive digital twin model lightweighting method. Background Art

[0002] 3D model lightweighting refers to a technology that optimizes 3D models to reduce their storage space and computing resources, thereby improving processing speed and system performance. In practical applications, since 3D models contain a large amount of data such as vertices, faces, and textures, it is necessary to use 3D model lightweighting technology to reduce the amount of data in order to better adapt to various scenarios and needs.

[0003] At present, there are many solutions for lightweighting digital twin models, which are lightweighting of BIM models before the application of digital twin systems, that is, manual processing through point cloud data compression-triangle simplification-texture data compression-model structure optimization. This processing method belongs to offline optimization. Another common model lightweighting method is to use the LOD (Level of Detail) method to lightweight the model. Before the digital twin system uses the model, multiple levels of LOD are set. The model points, surfaces, textures and precision between the levels decrease step by step. Users can select the corresponding LOD level for display according to their needs.

[0004] For offline BIM model lightweighting, the model cannot be lightweighted according to the real-time dynamics of the system. In some scenes that require fine display, the accuracy may be insufficient, and in some scenes that need to save costs, the optimization may be insufficient and cause jamming. The LOD-based model lightweighting method will contain multiple LOD levels before importing the digital twin system, and all of them need to be loaded into the system at one time. It is not friendly to the system storage and model preservation, and the switching between levels is relatively stiff. In addition, most LOD model lightweighting methods are based on the distance of the model in the scene, which is not applicable to larger models such as buildings and factories. For some models that are blocked in the current scene or some hidden internal structures of the model, many digital twin systems will still display and render them, which greatly increases the load capacity of the computer. Therefore, it is necessary to design a real-time adaptive digital twin model lightweighting method. Summary of the invention

[0005] The purpose of the present invention is to provide a real-time adaptive digital twin model lightweight method to solve the problems raised in the above background technology.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a real-time adaptive digital twin model lightweight method, which adopts a model lightweight system to work, and the system includes a model accuracy setting module, an accuracy mapping module, and an adjacent model processing module. The model accuracy setting module is used to bind the model point and surface number and the texture streaming resolution according to the screen pixel percentage. The accuracy mapping module is used to obtain the model point and surface accuracy reduction ratio under the model screen pixel ratio through mapping. The adjacent model processing module is used to combine multiple models in the scene into a single HOLD proxy model, and to dynamically reduce the surface of the occluded part.

[0007] According to the above technical solution, the model accuracy setting module includes a model import module, a model information acquisition module, a point and surface quantity judgment module, a proportion optimization binding module, a difference filling module, and a sphere boundary construction module. The model information acquisition module is electrically connected to the point and surface quantity judgment module and the proportion optimization binding module, the model import module is electrically connected to the model information acquisition module, the proportion optimization binding module is electrically connected to the difference filling module, and the difference filling module is electrically connected to the sphere boundary construction module;

[0008] The model import module is used to import the model into the UE4 engine, the model information acquisition module is used to obtain the number of points and faces of the model and the resolution of the texture streaming map as the accuracy when the screen pixel ratio is 100%, the point and face number judgment module is used to judge whether the number of points and faces of the model is greater than a threshold, the proportion optimization binding module is used to bind the screen pixel ratio with a large demand for model precision reduction to the model point and face precision, the difference filling module is used to interpolate the intermediate data using the cubic spline interpolation method to obtain the binding sequence of the two, and the sphere boundary construction module is used to determine the model size;

[0009] The precision mapping module includes a distance calculation module, a projection diameter acquisition module, a screen pixel ratio calculation module, and a ratio determination module. The distance calculation module and the projection diameter acquisition module are electrically connected to the screen pixel ratio calculation module, and the screen pixel ratio calculation module is electrically connected to the ratio determination module.

[0010] The distance calculation module is used to calculate the distance from the model to the camera in the world space, the projection diameter acquisition module is used to obtain the diameter of the sphere boundary projected into the screen space, the screen pixel ratio calculation module is used to use the ratio of the diameter of the sphere boundary projected into the screen space to the height / width of the screen viewport as the current model screen pixel ratio, and the ratio determination module is used to obtain the model point and surface precision reduction ratio under the model screen pixel ratio through mapping;

[0011] The adjacent model processing module includes a package placement module, a dynamic and static merging module, a proxy model combination module, an occlusion part judgment module, a triangle removal module, and a shell hiding module. The dynamic and static merging module is electrically connected to the proxy model combination module, the occlusion part judgment module is electrically connected to the triangle removal module, and the occlusion part judgment module is electrically connected to the shell hiding module.

[0012] The wrapping and placement module is used to use layered volume domains to wrap adjacent models and place them in the scene respectively. The dynamic and static merging module is used to merge multiple adjacent models according to dynamic and static conditions. The proxy model combination module is used to combine multiple adjacent models into a single HLOD proxy model. The occluded part judgment module is used to judge the occluded part of the model. The triangle removal module is used to delete all occluded triangles in the model mesh. The shell hiding module is used to place the occluded model in a new layer.

[0013] According to the above technical solution, it includes:

[0014] S0, import the model into the UE4 engine, obtain the number of points and faces of the model at this time and the resolution of the texture streaming map as the accuracy when the screen pixel accounts for 100%, and determine whether the number of points and faces of the model is greater than the threshold. If so, enter S1;

[0015] S1. Due to the jump between the visual perception of screen pixel ratio and model accuracy, that is, the screen pixel ratio is - The need for reducing model accuracy is small. - There is a great need to reduce the model accuracy, and the screen pixel ratio is Model point and surface accuracy Binding, screen pixel ratio Model point and surface accuracy Bind to the model pixel ratio Bind to 0 points and faces and 0 texture streaming resolution;

[0016] S2. Use cubic spline interpolation to interpolate the intermediate data to obtain a binding sequence of the screen pixel ratio, the number of points and faces of the model, and the resolution of the texture streaming map, and pass it to the model as a mapping parameter;

[0017] S3. A spherical boundary is constructed on the outer layer of each model. The spherical boundary is obtained by calculating the contour of the model at its original size.

[0018] According to the above technical solution, it also includes:

[0019] S4. Obtain the spatial size of the current screen viewport, calculate the distance from the model to the camera in the world space, and obtain the scaling ratio of the model projected to the screen space according to the projection matrix scaling factor;

[0020] S5. Obtain the radius of the model projection in the screen space, and obtain the diameter of the sphere boundary projection in the screen space;

[0021] S6. The ratio of the diameter of the sphere boundary projected into the screen space to the height / width of the screen viewport is taken as the current model screen pixel ratio;

[0022] S7. The model screen pixel ratio in the current screen viewport is passed to the model each time the screen is refreshed, and the reduction ratio of the model point and surface accuracy under the average model screen pixel ratio is obtained through mapping.

[0023] According to the above technical solution, it also includes:

[0024] S8. For multiple adjacent models, use volume domains to wrap them separately and place them in the scene before running. Select the volume domain and place it around the models that need to be placed in the same cluster. Set the corresponding model screen pixel ratio threshold. When it is less than this value, multiple adjacent models in the volume domain will be dynamically and statically merged and combined into a single HLOD proxy model.

[0025] S9. When the model is blocked, the blocked part inside the model is processed by the sphere boundary with triangles as basic units, and all blocked triangles in the model mesh are deleted;

[0026] S10, after ensuring that the model is completely blocked, remove the triangles of the completely blocked part, keep all visible triangles as they are, and remove the triangles of the internal details. If the triangles of multiple models overlap, only keep the outer triangles of the top layer;

[0027] S11. Put the obscured models in a new layer and add a shell hidden label to these models so that the mesh of this part of the model can be ignored during real-time rendering;

[0028] S12. Each time the screen is refreshed, the above S4-S7 and S8-S11 processes are repeated to achieve real-time adaptive lightweight processing of the digital twin model.

[0029] According to the above technical solution, in S8, the specific method of dynamically and statically merging multiple adjacent models in the volume domain is:

[0030] S8-1. For static merging, generate new clusters for these grouped models using the generated clusters of the hierarchical volume domain to generate HLOD proxy models;

[0031] S8-2. For dynamic merging, set the boundary radius required for dynamic merging, that is, the radius for clustering model meshes together, so as to calculate the volume filling range used for clustering, and generate the HLOD proxy model within the filling range.

[0032] According to the above technical solution, in S7, the specific method for mapping the model point and surface precision reduction ratio under the model screen pixel ratio is: before recording the start time of screen refresh, calculate the diameter of the sphere boundary projected into the screen space. Height of screen viewport and the screen viewport width The ratio of , specifically ; When the screen starts to refresh, record the diameter of the sphere boundary projected into the screen space at multiple moments over a period of time ,in is the number of records, and the screen viewport height and the screen viewport width The ratio of the average model screen pixel ratio change is obtained. , by Substitute the binding sequence to obtain the reduction ratio of model point and surface accuracy.

[0033] According to the above technical solution, in S8, the method for setting the screen pixel ratio threshold is: first, the screen pixel ratio threshold is set to , it was set Recording cycle, is the average model screen pixel ratio change value of the first recording period, and the average model screen pixel ratio change value of the last recording period Compared with the average model screen pixel ratio change in the second to last period For comparison, if ,and When , it means that the model proportion decreases continuously and is less than the initial value, and the model screen pixel proportion threshold When the number of adjacent models increases, the model accuracy needs to be reduced.

[0034] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention calculates the screen pixel percentage of the scene and each model in the screen in real time according to the user's current operation, binds the screen pixel percentage with the number of model points and faces, and the texture streaming map resolution, to achieve real-time model lightweighting, and combines the screen pixel percentage of multiple models with point cloud data at the same time, combines multiple models in the scene into a single HOLD proxy model, speeds up rendering, reduces resource usage, dynamically determines the layer position of the model in the scene and the screen in real time, and dynamically reduces the surface of the obscured part in time, thereby improving operating efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0036] Figure 1 It is a schematic diagram of the workflow of the model accuracy setting module of the present invention;

[0037] Figure 2 It is a schematic diagram of the workflow of the accuracy mapping module of the present invention;

[0038] Figure 3 It is a schematic diagram of the module composition of the present invention. DETAILED DESCRIPTION

[0039] 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.

[0040] See also Figure 1-Figure 3 The present invention provides a technical solution: a real-time adaptive digital twin model lightweight method, the method adopts a model lightweight system to work, the system includes a model accuracy setting module, an accuracy mapping module, and an adjacent model processing module. The model accuracy setting module is used to bind the number of model points and faces and the texture streaming resolution according to the screen pixel percentage. The accuracy mapping module is used to obtain the model point and face accuracy reduction ratio under the model screen pixel ratio by mapping. The adjacent model processing module is used to combine multiple models in the scene into a single HOLD proxy model, and to perform dynamic face reduction of the blocked part;

[0041] The model accuracy setting module includes a model import module, a model information acquisition module, a point and surface quantity judgment module, a proportion optimization binding module, a difference filling module, and a sphere boundary construction module. The model information acquisition module is electrically connected to the point and surface quantity judgment module and the proportion optimization binding module, the model import module is electrically connected to the model information acquisition module, the proportion optimization binding module is electrically connected to the difference filling module, and the difference filling module is electrically connected to the sphere boundary construction module;

[0042] The model import module is used to import the model into the UE4 engine. The model information acquisition module is used to obtain the number of points and faces of the model at this time and the resolution of the texture streaming map as the accuracy when the screen pixel ratio is 100%. The point and surface number judgment module is used to judge whether the number of points and surfaces of the model is greater than the threshold. The proportion optimization binding module is used to bind the screen pixel ratio with the model point and surface accuracy when the model accuracy is reduced. The difference filling module is used to interpolate the intermediate data using the cubic spline interpolation method to obtain the binding sequence of the two. The sphere boundary construction module is used to determine the model size;

[0043] The precision mapping module includes a distance calculation module, a projection diameter acquisition module, a screen pixel ratio calculation module, and a ratio determination module. The distance calculation module and the projection diameter acquisition module are electrically connected to the screen pixel ratio calculation module, and the screen pixel ratio calculation module is electrically connected to the ratio determination module.

[0044] The distance calculation module is used to calculate the distance from the model to the camera in the world space. The projection diameter acquisition module is used to obtain the diameter of the sphere boundary projected into the screen space. The screen pixel ratio calculation module is used to use the ratio of the diameter of the sphere boundary projected into the screen space to the screen viewport height / width as the current model screen pixel ratio. The ratio determination module is used to obtain the model point and surface precision reduction ratio under the model screen pixel ratio through mapping.

[0045] The adjacent model processing module includes a package placement module, a dynamic static merging module, a proxy model combination module, an occlusion part judgment module, a triangle removal module, and a shell hiding module. The dynamic static merging module is electrically connected to the proxy model combination module, the occlusion part judgment module is electrically connected to the triangle removal module, and the occlusion part judgment module is electrically connected to the shell hiding module.

[0046] The wrapping and placement module is used to wrap adjacent models in the scene using layered volumes. The dynamic and static merging module is used to merge multiple adjacent models according to dynamic and static conditions. The proxy model combination module is used to combine multiple adjacent models into a single HLOD proxy model. The occluded part judgment module is used to judge the occluded part of the model. The triangle removal module is used to delete all occluded triangles in the model mesh. The shell hiding module is used to place the occluded model in a new layer.

[0047] include:

[0048] S0, import the model into the UE4 engine, obtain the number of points and faces of the model at this time and the resolution of the texture streaming map as the accuracy when the screen pixel accounts for 100%, and determine whether the number of points and faces of the model is greater than the threshold. If so, enter S1;

[0049] S1. Due to the jump between the visual perception of screen pixel ratio and model accuracy, that is, the screen pixel ratio is - The need for reducing model accuracy is small. - There is a great need to reduce the model accuracy, and the screen pixel ratio is Model point and surface accuracy Binding, screen pixel ratio Model point and surface accuracy Bind to the model pixel ratio Bind to 0 points and faces and 0 texture streaming resolution;

[0050] S2. Use cubic spline interpolation to interpolate the intermediate data to obtain a binding sequence of the screen pixel ratio, the number of points and faces of the model, and the resolution of the texture streaming map, and pass it to the model as a mapping parameter;

[0051] S3, constructing a spherical boundary for each model outer layer, and the spherical boundary is obtained by calculating the contour of the model at its original size;

[0052] Also includes:

[0053] S4. Obtain the spatial size of the current screen viewport, calculate the distance from the model to the camera in the world space, and obtain the scaling ratio of the model projected to the screen space according to the projection matrix scaling factor;

[0054] S5. Obtain the radius of the model projection in the screen space, and obtain the diameter of the sphere boundary projection in the screen space;

[0055] S6. The ratio of the diameter of the sphere boundary projected into the screen space to the height / width of the screen viewport is taken as the current model screen pixel ratio;

[0056] S7, passing the model screen pixel ratio in the current screen viewport to the model each time the screen is refreshed, and obtaining the model point and surface precision reduction ratio under the average model screen pixel ratio through mapping;

[0057] Also includes:

[0058] S8. For multiple adjacent models, use volume domains to wrap them separately and place them in the scene before running. Select the volume domain and place it around the models that need to be placed in the same cluster. Set the corresponding model screen pixel ratio threshold. When it is less than this value, multiple adjacent models in the volume domain will be dynamically and statically merged and combined into a single HLOD proxy model.

[0059] S9. When the model is blocked, the blocked part inside the model is processed by the sphere boundary with triangles as basic units, and all blocked triangles in the model mesh are deleted;

[0060] S10, after ensuring that the model is completely blocked, remove the triangles of the completely blocked part, keep all visible triangles as they are, and remove the triangles of the internal details. If the triangles of multiple models overlap, only keep the outer triangles of the top layer;

[0061] S11. Put the obscured models in a new layer and add a shell hidden label to these models so that the mesh of this part of the model can be ignored during real-time rendering;

[0062] S12. Each time the screen is refreshed, the above S4-S7, S8-S11 processes are repeated to achieve lightweight processing of the real-time adaptive digital twin model;

[0063] In S8, the specific method for dynamically and statically merging multiple adjacent models in the volume domain is:

[0064] S8-1. For static merging, generate new clusters for these grouped models using the generated clusters of the hierarchical volume domain to generate HLOD proxy models;

[0065] S8-2. For dynamic merging, set the boundary radius required for dynamic merging, that is, the radius for clustering model meshes together, so as to calculate the volume filling range for clustering, and generate the HLOD proxy model within the filling range;

[0066] In S7, the specific method for mapping the model point and surface precision reduction ratio under the model screen pixel ratio is as follows: before recording the start time of screen refresh, calculate the diameter of the sphere boundary projected into the screen space Height of screen viewport and the screen viewport width The ratio of , specifically ; When the screen starts to refresh, record the diameter of the sphere boundary projected into the screen space at multiple moments over a period of time ,in is the number of records, and the screen viewport height and the screen viewport width The ratio of the average model screen pixel ratio change is obtained. , by Substitute the binding sequence to obtain the reduction ratio of model point and surface accuracy;

[0067] In S8, the method for setting the screen pixel ratio threshold is as follows: first, the screen pixel ratio threshold is set to , it was set Recording cycle, is the average model screen pixel ratio change value of the first recording period, and the average model screen pixel ratio change value of the last recording period Compared with the average model screen pixel ratio change in the second to last period For comparison, if ,and When , it means that the model proportion decreases continuously and is less than the initial value, and the model screen pixel proportion threshold When the number of adjacent models increases, the model accuracy needs to be reduced.

[0068] Example:

[0069] 1. Set the relationship between the screen pixel ratio and the model point and surface accuracy, automatically interpolate to obtain the relationship sequence, and perform model lightweighting in real time according to the relationship sequence and screen ratio when the system is running ( Figure 1 , Figure 2 ):

[0070] 1. In UE4, batch select the 3D models that need to be displayed in the digital twin. First, filter the models that need to be lightweight and select models with more than 500 faces.

[0071] 2. The selected models are all single models, which contain their physical size information, structure information, material, texture, etc., as well as their assembly information and positioning points for complex models;

[0072] 3. Use the script editor to obtain the specific number of points and faces of each model, and use it as the initial value when the screen pixel ratio is 100%. At the same time, bind the screen pixel ratio of 50% to the model point and face accuracy of 90%, the screen pixel ratio of 20% to the model point and face accuracy of 50%, and the model pixel ratio of 0% to the number of points and faces of 0 and the texture streaming map resolution of 0;

[0073] 4. Use cubic spline interpolation to interpolate the intermediate data to obtain the binding sequence of screen pixel ratio, model accuracy and texture streaming map resolution, and pass it to the 3D model as mapping parameters;

[0074] 5. Use the attribute matrix method in the UE4 editor to perform batch operations on the selected models to automatically calculate their sizes and generate the Sphere Bounds that wrap them;

[0075] When the digital twin system is running, the screen space size of the current viewport is obtained, and the distance from the model to the camera is calculated in the world space;

[0076] 6. Get the scaling ratio of the screen space according to the projection matrix scaling factor;

[0077] 7. Get the radius of the projection in the screen space;

[0078] 8. Return the diameter projected to the screen space;

[0079] 9. The ratio of the diameter of the Sphere Bounds sphere boundary in the screen space to the height / width of the screen viewport is used as the current model screen pixel ratio;

[0080] 10. Each time the screen is refreshed, the model screen pixel ratio in the current viewport is passed to the model. The model point and surface reduction ratio under the screen pixel ratio is obtained through mapping, and real-time optimization is performed.

[0081] This method adopts a real-time online adaptive model lightweight method, which does not require tedious surface reduction optimization work before the digital twin system is run, saving a lot of manpower and material resources; this method only needs to import the original precision of the three-dimensional model, and does not need to design and import a multi-level LOD model at one time, which is more friendly to the system storage occupancy, and the digital twin system has a faster initial loading speed; this method uses an interpolation method to compensate for the jump changes caused by surface reduction under different screen pixel ratios, making the model lightweight visually smoother and more real-time, and the display effect is better; this method calculates the screen ratio, so that for models that are too large, the precision will not be insufficient due to the distance from the screen, and for models that are too small, the model precision redundancy will not be too close to the screen, resulting in hardware resource occupation.

[0082] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0083] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A real-time adaptive digital twin model lightweight method, characterized by: The method uses a model lightweight system to work, which includes a model precision setting module, a precision mapping module, and an adjacent model processing module. The model precision setting module is used to bind the number of model points and faces and the texture streaming resolution according to the screen pixel ratio. The precision mapping module is used to obtain the model point and face precision reduction ratio under the model screen pixel ratio through mapping. The adjacent model processing module is used to combine multiple models in the scene into a single HLOD proxy model and perform dynamic face reduction of the blocked part. The model accuracy setting module includes a model import module, a model information acquisition module, a point and surface quantity judgment module, a proportion optimization binding module, a difference filling module, and a sphere boundary construction module. The model information acquisition module is electrically connected to the point and surface quantity judgment module and the proportion optimization binding module, the model import module is electrically connected to the model information acquisition module, the proportion optimization binding module is electrically connected to the difference filling module, and the difference filling module is electrically connected to the sphere boundary construction module; The model import module is used to import the model into the UE4 engine, the model information acquisition module is used to obtain the number of points and faces of the model and the resolution of the texture streaming map as the accuracy when the screen pixel ratio is 100%, the point and face number judgment module is used to judge whether the number of points and faces of the model is greater than a threshold, the proportion optimization binding module is used to bind the screen pixel ratio with a large demand for model precision reduction to the model point and face precision, the difference filling module is used to interpolate the intermediate data using the cubic spline interpolation method to obtain the binding sequence of the two, and the sphere boundary construction module is used to determine the model size; The precision mapping module includes a distance calculation module, a projection diameter acquisition module, a screen pixel ratio calculation module, and a ratio determination module. The distance calculation module and the projection diameter acquisition module are electrically connected to the screen pixel ratio calculation module, and the screen pixel ratio calculation module is electrically connected to the ratio determination module. The distance calculation module is used to calculate the distance from the model to the camera in the world space, the projection diameter acquisition module is used to obtain the diameter of the sphere boundary projected into the screen space, the screen pixel ratio calculation module is used to use the ratio of the diameter of the sphere boundary projected into the screen space to the height / width of the screen viewport as the current model screen pixel ratio, and the ratio determination module is used to obtain the model point and surface precision reduction ratio under the model screen pixel ratio through mapping; The adjacent model processing module includes a package placement module, a dynamic and static merging module, a proxy model combination module, an occlusion part judgment module, a triangle removal module, and a shell hiding module. The dynamic and static merging module is electrically connected to the proxy model combination module, the occlusion part judgment module is electrically connected to the triangle removal module, and the occlusion part judgment module is electrically connected to the shell hiding module. The wrapping and placing module is used to wrap adjacent models in the scene using a layered volume domain, the dynamic and static merging module is used to merge multiple adjacent models according to dynamic and static conditions, the proxy model combination module is used to combine multiple adjacent models into a single HLOD proxy model, the occluded part judgment module is used to judge the occluded part of the model, the triangle removal module is used to delete all occluded triangles in the model mesh, and the shell hiding module is used to place the occluded model in a new layer; include: S0, import the model into the UE4 engine, obtain the number of points and faces of the model and the resolution of the texture streaming map as the accuracy when the screen pixel accounts for 100%, and determine whether the number of points and faces of the model is greater than the threshold. If so, enter S1; S1. Due to the jump between the visual perception of screen pixel ratio and model accuracy, that is, the screen pixel ratio is - The need for reducing model accuracy is small. - There is a great need to reduce the model accuracy, and the screen pixel ratio is Model point and surface accuracy Binding, screen pixel ratio Model point and surface accuracy Bind to the model pixel ratio Bind to 0 points and faces and 0 texture streaming resolution; S2. Use cubic spline interpolation to interpolate the intermediate data to obtain a binding sequence of the screen pixel ratio, the number of points and faces of the model, and the resolution of the texture streaming map, and pass it to the model as a mapping parameter; S3, constructing a spherical boundary for each model outer layer, and the spherical boundary is obtained by calculating the contour of the model at its original size; Also includes: S4. Obtain the spatial size of the current screen viewport, calculate the distance from the model to the camera in the world space, and obtain the scaling ratio of the model projected to the screen space according to the projection matrix scaling factor; S5. Obtain the radius of the model projection in the screen space, and obtain the diameter of the sphere boundary projection in the screen space; S6. The ratio of the diameter of the sphere boundary projected into the screen space to the height / width of the screen viewport is taken as the current model screen pixel ratio; S7, passing the model screen pixel ratio in the current screen viewport to the model each time the screen is refreshed, and obtaining the model point and surface precision reduction ratio under the average model screen pixel ratio through mapping; Also includes: S8. For multiple adjacent models, use volume domains to wrap them separately and place them in the scene before running. Select the volume domain and place it around the models that need to be placed in the same cluster. Set the corresponding model screen pixel ratio threshold. When it is less than this value, multiple adjacent models in the volume domain will be dynamically and statically merged and combined into a single HLOD proxy model. S9. When the model is blocked, the blocked part inside the model is processed by the sphere boundary with triangles as basic units, and all blocked triangles in the model mesh are deleted; S10, after ensuring that the model is completely blocked, remove the triangles of the completely blocked part, keep all visible triangles as they are, and remove the triangles of the internal details. If the triangles of multiple models overlap, only keep the outer triangles of the top layer; S11. Put the obscured models in a new layer and add a shell hidden label to these models so that the mesh of this part of the model can be ignored during real-time rendering; S12. Each time the screen is refreshed, the above S4-S7, S8-S11 processes are repeated to achieve lightweight processing of the real-time adaptive digital twin model; In S8, the specific method of dynamically and statically merging multiple adjacent models in the volume domain is: S8-1. For static merging, generate new clusters for these grouped models using the generated clusters of the hierarchical volume domain to generate HLOD proxy models; S8-2. For dynamic merging, set the boundary radius required for dynamic merging, that is, the radius for gathering the model meshes together, so as to calculate the volume filling range for calculating clustering, and generate the HLOD proxy model within the filling range; In S7, the specific method of mapping the model point and surface precision reduction ratio under the model screen pixel ratio is: before recording the start time of screen refresh, calculate the diameter of the sphere boundary projected into the screen space Height of screen viewport and the screen viewport width The ratio of , specifically ; When the screen starts to refresh, record the diameter of the sphere boundary projected into the screen space at multiple moments over a period of time ,in is the number of records, and the screen viewport height and the screen viewport width The ratio of the average model screen pixel ratio change is obtained. , by Substitute the binding sequence to obtain the reduction ratio of model point and surface accuracy.

2. A real-time adaptive digital twin model lightweight method according to claim 1, characterized in that: In S8, the method for setting the screen pixel ratio threshold is as follows: first, the screen pixel ratio threshold is set to , it was set Recording cycle, is the average model screen pixel ratio change value of the first recording period, and the average model screen pixel ratio change value of the last recording period Compared with the average model screen pixel ratio change in the second to last period For comparison, if ,and When , it means that the model proportion decreases continuously and is less than the initial value, and the model screen pixel proportion threshold When the number of adjacent models increases, the model accuracy needs to be reduced.

Citation Information

Patent Citations

  • Visual rendering method for digital twinborn flood flow field

    CN117237567A

  • Digital factory-oriented three-dimensional real-time rapid display method and system

    CN117496065A