Three-dimensional simulation automatic modeling method and system based on grid division
By employing laser scanning, mesh generation, and texture mapping, the problem of insufficient accuracy and realism in automatic 3D simulation modeling has been solved, achieving an efficient and accurate 3D simulation modeling process and improving the visual realism and resource utilization efficiency of the model.
Patent Information
- Application Number
- CN202410258396.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2026-01-27
AI Technical Summary
Existing 3D simulation automatic modeling methods suffer from low accuracy, low efficiency, and low realism. In particular, they struggle to accurately capture details when dealing with complex scenes, and their mesh generation and texture mapping techniques are inadequate.
The target point cloud is acquired using a laser scanner. Based on the object attributes, it is divided and combined. An initial model is constructed by mesh generation and minimum convex polyhedron allocation. Preliminary simulation is performed by combining kernel functions and optimization strategies. Finally, texture mapping is performed to improve the realism and accuracy of the model.
It improves the accuracy and efficiency of 3D simulation models, enhances the visual realism and immersion of the models, optimizes resource utilization and the efficiency of the simulation process, and shortens the adjustment time of simulation models.
Smart Images

Figure CN121413166A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, specifically to a method and system for automatic modeling of three-dimensional simulation based on mesh generation. Background Technology
[0002] In recent years, with the rapid development of computer science and graphics processing technology, 3D simulation technology has been widely applied in many fields, including but not limited to engineering design, game development, education, medical care, and military training. 3D simulation technology can provide highly realistic visual effects, helping users accurately simulate, analyze, and predict various real-world situations in a virtual environment. Based on this, automated modeling methods, as an important component of 3D simulation technology, aim to reduce the tedious process of manual modeling and improve the efficiency and accuracy of model creation. Traditional 3D modeling methods often rely on manual operation by professionals, which is not only time-consuming and labor-intensive but also has limitations in reproducing complex scenes. Therefore, automated 3D modeling technology has become a hot topic of research and development.
[0003] While automated 3D modeling technology has improved modeling efficiency to some extent, existing technologies still have many shortcomings in terms of accuracy, efficiency, and realism. First, current automated modeling methods often struggle to accurately capture all details when dealing with complex scenes, resulting in deviations between the generated model and the actual scene. Second, existing technologies often lack sufficient intelligent support in key steps such as model meshing and parameter extraction, failing to effectively optimize the modeling process and thus affecting modeling efficiency and accuracy. Finally, existing texture mapping technologies still have limitations in improving the realism of models, often failing to achieve highly realistic visual effects, which is particularly evident in applications requiring high realism. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by this invention is that existing automatic 3D simulation modeling methods suffer from low accuracy, low efficiency, and low realism, as well as the problem of how to perform automatic 3D simulation modeling based on mesh generation.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a three-dimensional simulation automatic modeling method based on mesh generation, comprising constructing an initial simulation model, performing mesh generation on the initial simulation model to obtain a mesh generation model; extracting preset calculation parameters, performing preliminary simulation on the mesh generation model to obtain a preliminary simulation model; and performing texture mapping on the simulation model to obtain a three-dimensional simulation automatic model.
[0007] As a preferred embodiment of the automatic modeling method for 3D simulation based on mesh generation described in this invention, the construction of the initial simulation model includes scanning the scene to be displayed using a laser scanner to obtain the target point cloud of the scene to be displayed. The scene to be displayed includes towers, lines, live conductors, and green ring environment in the scene.
[0008] Import the target point cloud into the 3D modeling tool, and split the target point cloud file into groups based on the object attributes, with each group of target point clouds representing a different object.
[0009] For each group of target point clouds, a 3D model is created. The sub-models obtained from the 3D modeling are then combined based on the spatial relationship between the objects to obtain the initial simulation model.
[0010] As a preferred embodiment of the automatic modeling method for 3D simulation based on mesh generation described in this invention, the method of obtaining the mesh generation model includes receiving preset simulation requirements, and dynamically allocating memory space includes making a comprehensive dynamic estimate of the storage space of simulation data based on simulation parameters, and allocating memory space for simulation data.
[0011] A comprehensive dynamic estimate of the storage space required for the simulation data is performed, and the comprehensive dynamic estimate R is calculated. f Represented as:
[0012]
[0013] W(s,i,c)=σ s ·s+λ i ·i+μ c ·c
[0014] Where A is the adjustment coefficient, U(xq) is the user requirement parsing function, quantifying requirement complexity, xq is the complexity index of the requirement description provided by the user, V(t,Δ) is the requirement change adaptation function, t is time, Δ is the requirement change parameter, L(C,r) is the resource constraint adaptation function, C is the real-time available resource amount, r is the resource increase / decrease ratio, y is the evaluation adjustment parameter, and H(P) is the user requirement adjustment function. pk Let P be the peak-period resource demand function. pk For the estimated additional resource demand during peak periods, s is the impact coefficient of the difference in evaluation criteria, i is the impact coefficient of incomplete or ambiguous information, c is the impact coefficient of demand changes, W(s,i,c) is the function for evaluating the impact of s, i, and c on resource demand, D is the comprehensive metric of user description, and σ is the additional resource demand estimated during peak periods. s λ is the weighting coefficient for evaluating differences in standards. i The weighting coefficient μ is used to assess the incompleteness or ambiguity of information. c The weighting coefficients are used to evaluate changes in requirements.
[0015] As a preferred embodiment of the mesh-based automatic modeling method for 3D simulation described in this invention, the method for obtaining the mesh model further includes dividing the memory space into two parts: a first memory block of fixed size, denoted as nc1; and a second memory block of fixed size, denoted as nc2. The sum of the first memory block space nc1 and the second memory block space nc2 is nc. sum When the comprehensive dynamic forecast value R f When the memory size is less than the first memory block space nc1, space is allocated within the first memory block space nc1. When the comprehensive dynamic estimate R... f When the value is greater than or equal to the first memory block space nc1, space is requested from both the first memory block space nc1 and the second memory block space nc2. If the memory space occupied by the cache task cannot be requested from the first memory block space nc1, memory is requested from the second memory block space nc2. When the comprehensive dynamic estimated value R... f Greater than or equal to nc sum When the first memory block space nc1 and the second memory block space nc2 cannot be requested, the simulation task is distributed to different computing nodes or servers through load balancing.
[0016] When simulation calculations are in high demand and the first memory block space nc1 and the second memory block space nc2 cannot allocate memory space, the simulation tasks are distributed to different computing nodes or servers through load balancing, or resources are dynamically allocated based on task priority.
[0017] The initial simulation model is meshed, and the 3D geometric data of each sub-model is extracted from the initial simulation model. The sub-model vertices, edges, and surfaces are recorded. The extracted 3D geometric data is preprocessed with data smoothing. The Quickhull algorithm is used to calculate the minimum convex polyhedron that encloses all vertices for each set of 3D geometric data.
[0018] Based on the size, shape, orientation, and spatial position of the minimum convex polyhedron, the minimum convex polyhedron is assigned to different layers. Based on the spatial position and physical properties of the convex polyhedron, the convex polyhedra in the layers are combined to obtain a mesh generation model.
[0019] As a preferred embodiment of the automatic modeling method for 3D simulation based on mesh generation described in this invention, the preliminary simulation model includes initializing preset calculation parameters, extracting preset calculation parameters, performing preliminary simulation on the mesh generation model, and obtaining a preliminary simulation model.
[0020] The model P(X) with initialized preset calculation parameters is represented as:
[0021]
[0022] Where α is the adjustment x β In the parameter of influence of P(X), β is the parameter for adjusting the response of P(X), δ is the attenuation coefficient, and λ is the parameter for adjusting ln(ξ+x). 2 In P(X), the weight parameters ξ, ρ, and η are parameters adjusted based on simulation requirements, X is the set of output simulation parameters, and x is a single parameter of the simulation parameter set. n Let N be the nth parameter in the simulation parameter set, where N is the total number of parameters in the simulation parameter set.
[0023] The extraction of preset calculation parameters includes obtaining the initialized preset calculation parameters based on simulation parameters, and extracting the kernel function of the mesh generation model from the preset calculation parameters.
[0024] The kernel function K(P) of the mesh generation model is expressed as:
[0025]
[0026] Where P is the preset set of calculation parameters, p is the preset value of the calculation parameters, φ(p) is the simulation environment function, and h, θ, ω i and σ i These are parameters adjusted based on simulation requirements, where M is the number of parameters and P is the parameter value. i Let i be the i-th parameter that is weighted from P.
[0027] The preliminary simulation of the mesh generation model includes performing simulation calculations through kernel functions, and obtaining the preliminary simulation model S by calculating the spatial relationships and structural positions of the mesh generation model.
[0028] As a preferred embodiment of the mesh-based automatic 3D simulation modeling method described in this invention, the preliminary simulation model further includes adjustment and optimization of the preliminary simulation model. The optimization of the preliminary simulation model includes an optimization strategy O(K(P),S), expressed as:
[0029] O(K(P),S)=S+ΔS(K(P),S)
[0030] ΔS(K(P),S)=ψ(∫K(P)·SdV-λ target )
[0031] Where ΔS(K(P),S) is the adjustment amount based on the kernel function K(P) and the initial simulation model S, ψ is the adjustment coefficient, dV is the integral in the simulation space, and λ targetThis represents the expected simulation target value.
[0032] Collect deviation data between the simulation model and the expected experimental results in the simulation case, and calculate the maximum acceptable value D of the deviation based on the accuracy requirements of the simulation task. max , is represented as:
[0033] D max =E base ·Z xs
[0034] Among them, E base Z is the average error value obtained from historical data. xs This is the adjustment factor for the average error value.
[0035] Choose a safety factor Z that is greater than 0 and less than 1. aq The threshold yz is calculated and expressed as:
[0036] yz=Z aq ·D max
[0037] When the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is greater than the set threshold yz, or when the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is less than the set threshold yz, the parameter ω in the kernel function K(P) is adjusted. i and σ i Recalculate O(K(P),S).
[0038] No action is taken when the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is less than or equal to the set threshold yz and the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is greater than or equal to the set threshold yz.
[0039] Collect the preset calculation parameters of the historical monitoring simulation model, record the change ΔP of the preset calculation parameters over time Δt, and the rate of change of the preset calculation parameters, expressed as:
[0040]
[0041] Where dP is the change in the preset calculation parameters, and dt is the change in time.
[0042] Sensitivity threshold θ s , is represented as:
[0043]
[0044] Where jd and jx are adjustment coefficients for the accuracy of the preliminary simulation model. To monitor the maximum absolute value of the preset calculation parameters.
[0045] When the monitoring of P(X) displays the preset calculation parameters When adjusting the h and θ parameters in K(P), dP' is the change in the real-time preset calculation parameters, and dt' is the change in the real-time time.
[0046] As a preferred embodiment of the automatic modeling method for 3D simulation based on mesh generation described in this invention, the automatic 3D simulation model includes texture mapping of the simulation model to obtain an automatic 3D simulation model.
[0047] Based on the preliminary simulation model, the target points of color information in the preliminary simulation model are obtained, and the three-dimensional centroid coordinates of the target points of color information in the preliminary simulation model are obtained. The three-dimensional centroid coordinates of the target points of color information in the preliminary simulation model are projected into a preset spatial coordinate system to obtain the point projection of color information in the preliminary simulation model. Based on the point projection of color information in the preliminary simulation model, a color texture point map is generated.
[0048] The color texture dot map is filled with a local color, and a 3D simulation automatic modeling model is generated based on the filled map.
[0049] Another objective of this invention is to provide a mesh-based automatic 3D simulation modeling system that can perform preliminary simulations on mesh-based models by extracting preset calculation parameters, thereby obtaining a preliminary simulation model. This solves the problem of low efficiency in current mesh-based automatic 3D simulation modeling.
[0050] As a preferred embodiment of the 3D simulation automatic modeling system based on mesh generation described in this invention, the system includes a mesh generation module, a preliminary simulation module, and a texture mapping module. The mesh generation module is used to construct an initial simulation model and perform mesh generation on the initial simulation model to obtain a mesh-generated model. The preliminary simulation module is used to extract preset calculation parameters and perform preliminary simulation on the mesh-generated model to obtain a preliminary simulation model. The texture mapping module is used to perform texture mapping on the simulation model to obtain a 3D simulation automatic model.
[0051] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a mesh-based automatic modeling method for 3D simulation.
[0052] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a mesh-based automatic modeling method for 3D simulation.
[0053] The beneficial effects of this invention are as follows: This invention provides a 3D simulation automatic modeling method based on mesh generation. It constructs an initial simulation model, divides the initial model into meshes to obtain a meshed model, collects target point clouds of the scene using a laser scanner, and classifies and combines these point clouds based on object attributes using 3D modeling tools. Through comprehensive dynamic estimation of simulation data storage requirements and dynamic allocation of memory space based on simulation parameters, efficient resource allocation and utilization are achieved. High-precision scene reconstruction and efficient resource management not only ensure the realism and accuracy of the simulation model but also optimize the use of computing resources and improve the efficiency of the simulation process. Pre-set computational parameters are extracted, and preliminary simulations are performed on the meshed model to obtain preliminary results. The simulation model, through complex mathematical functions to initialize and extract simulation parameters, utilizes kernel functions to simulate the mesh-generated model, achieving highly accurate initialization of the simulation process and ensuring the reliability of the simulation results. Furthermore, the rapid feedback from the initial simulation makes iterative optimization of the model more efficient, shortening the adjustment time. Texture mapping is then applied to the simulation model to obtain an automatic 3D simulation model. Based on the initial simulation model, further texture mapping enhances the model's visual details and realism, significantly improving its visual realism and immersion. This results in a model that is not only accurate in shape but also highly realistic in color and texture. This invention achieves superior results in terms of realism, accuracy, and efficiency. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 The first embodiment of the present invention provides an overall flowchart of a three-dimensional simulation automatic modeling method based on mesh generation.
[0056] Figure 2 The following is an overall flowchart of a three-dimensional simulation automatic modeling system based on mesh generation, provided for the third embodiment of the present invention. Detailed Implementation
[0057] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0058] Example 1
[0059] Reference Figure 1 As an embodiment of the present invention, a method for automatic modeling of three-dimensional simulation based on mesh generation is provided, comprising:
[0060] S1: Construct the initial simulation model, perform mesh generation on the initial simulation model, and obtain the meshed model.
[0061] Furthermore, constructing the initial simulation model involves using a laser scanner to scan the scene to be displayed, obtaining the target point cloud of the scene to be displayed, which includes towers, lines, live conductors, and the green ring environment in the scene.
[0062] Import the target point cloud into the 3D modeling tool, and split the target point cloud file into groups based on the object attributes, with each group of target point clouds representing a different object.
[0063] For each group of target point clouds, a 3D model is created. The sub-models obtained from the 3D modeling are then combined based on the spatial relationship between the objects to obtain the initial simulation model.
[0064] It should be noted that the green ring environment refers to the environment surrounding the tower, including grasslands, trees, rivers, bridges, and other structures. A laser scanner is a device that uses laser technology for precise distance and velocity measurement. It can quickly capture the geometric shape and spatial location information of a target scene, generating high-precision point cloud data. Point cloud data is a collection of data consisting of coordinates of a large number of points in space. Each point contains location information (usually X, Y, and Z coordinates), which can accurately describe the shape and structure of objects. Object attributes refer to the characteristics and features of objects, such as material, color, and geometric shape, used to distinguish and identify different objects or elements in a scene. A laser scanner is used to perform a high-precision scan of the scene to be displayed, obtaining point cloud data containing scene details. Then, using 3D modeling tools, the point cloud data is grouped based on the object attributes, and 3D models are created for each group. Finally, based on the spatial relationships between objects, the sub-models are combined into a complete initial simulation model. This process improves the accuracy and efficiency of model construction. Laser scanning technology ensures high-precision capture of scene data, laying the foundation for the realism of the model. Through intelligent data grouping and 3D modeling, the efficiency of modeling is significantly improved, while ensuring the richness and accuracy of the model's details.
[0065] It should also be noted that obtaining the mesh generation model includes receiving preset simulation requirements, and dynamically allocating memory space includes making a comprehensive dynamic estimate of the storage space for simulation data based on simulation parameters, and allocating memory space for simulation data.
[0066] A comprehensive dynamic estimate of the storage space required for the simulation data is performed, and the comprehensive dynamic estimate R is calculated. f Represented as:
[0067]
[0068] W(s,i,c)=σ s ·s+λ i ·i+μ c ·c
[0069] Where A is the adjustment coefficient, U(xq) is the user requirement parsing function, quantifying requirement complexity, xq is the complexity index of the requirement description provided by the user, V(t,Δ) is the requirement change adaptation function, t is time, Δ is the requirement change parameter, L(C,r) is the resource constraint adaptation function, C is the real-time available resource amount, r is the resource increase / decrease ratio, y is the evaluation adjustment parameter, and H(P) is the user requirement adjustment function. pk Let P be the peak-period resource demand function. pk For the estimated additional resource demand during peak periods, s is the impact coefficient of the difference in evaluation criteria, i is the impact coefficient of incomplete or ambiguous information, c is the impact coefficient of demand changes, W(s,i,c) is the function for evaluating the impact of s, i, and c on resource demand, D is the comprehensive metric of user description, and σ is the additional resource demand estimated during peak periods.s λ is the weighting coefficient for evaluating differences in standards. i The weighting coefficient μ is used to assess the incompleteness or ambiguity of information. c The weighting coefficients are used to evaluate changes in requirements.
[0070] It should also be noted that the user demand analysis function U(xq) is a quantitative analysis method that analyzes the complexity index xq of the user demand description and the resource constraint adaptation function L(C,r) to adjust the resource demand based on the current resource quantity c and the resource increase / decrease ratio r.
[0071] It should also be noted that obtaining the mesh generation model also includes dividing the memory space into two parts: the first part is a fixed-size first memory block, denoted as nc1; the second part is a fixed-size second memory block, denoted as nc2; and the sum of the first and second memory block spaces nc1 is nc. sum When the comprehensive dynamic forecast value R f When the memory size is less than the first memory block space nc1, space is allocated within the first memory block space nc1. When the comprehensive dynamic estimate R... f When the value is greater than or equal to the first memory block space nc1, space is requested from both the first memory block space nc1 and the second memory block space nc2. If the memory space occupied by the cache task cannot be requested from the first memory block space nc1, memory is requested from the second memory block space nc2. When the comprehensive dynamic estimated value R... f Greater than or equal to nc sum When the first memory block space nc1 and the second memory block space nc2 cannot be requested, the simulation task is distributed to different computing nodes or servers through load balancing.
[0072] When simulation calculations are in high demand and the first memory block space nc1 and the second memory block space nc2 cannot allocate memory space, the simulation tasks are distributed to different computing nodes or servers through load balancing, or resources are dynamically allocated based on task priority.
[0073] The initial simulation model is meshed, and the three-dimensional geometric data of each sub-model is extracted from the initial simulation model. The sub-model vertices, edges and surfaces are recorded. The extracted three-dimensional geometric data is preprocessed with data smoothing. The Quickhull algorithm is used to calculate the minimum convex polyhedron that encloses all vertices for each set of three-dimensional geometric data.
[0074] Based on the size, shape, orientation, and spatial position of the minimum convex polyhedron, the minimum convex polyhedron is assigned to different layers. Based on the spatial position and physical properties of the convex polyhedron, the convex polyhedra in the layers are combined to obtain a mesh generation model.
[0075] It should also be noted that the main purpose of mesh generation is to decompose the complex initial 3D simulation model into small, manageable units or sub-models. This improves the computational efficiency of the simulation and facilitates detailed analysis of local areas of the model, extracting the 3D geometric data of each sub-model from the initial simulation model. This data includes the basic geometric features of the model, such as vertices, edges, and faces, providing a foundation for subsequent geometric calculations and analysis. The minimum convex polyhedron is the smallest convex envelope that can completely contain the original geometry. Its calculation aims to simplify the external shape of the model, reduce unnecessary geometric complexity, and thus optimize subsequent simulation calculations. The minimum convex polyhedron is determined by its size, shape, orientation, and its position within the overall model. The spatial location of convex polyhedra is determined, and they are assigned to different layers. This step aims to categorize convex polyhedra with similar features or functions, simplifying subsequent processing. After layer differentiation, similar or related convex polyhedra are further combined within their respective layers. This step is based on the relative positions and physical properties of the convex polyhedra in space, aiming to reduce model complexity while maintaining simulation accuracy. The combination process may include adjusting the position and rotation angle of the convex polyhedra, as well as merging adjacent convex polyhedra. Meshing is a technique in 3D modeling that optimizes the computation and rendering process by decomposing the model into smaller, more manageable units (i.e., meshes). Minimal convex polyhedron calculation involves mathematics and... Geometric methods are used to determine the smallest convex wrapping shape that a set of points can form in three-dimensional space. This is crucial for the accurate simulation and analysis of geometric shapes. Layer differentiation and combination, when dealing with complex geometries, involves distinguishing and optimizing different geometric layers, and then recombine these optimized layers into a unified model. This effectively improves the utilization of computing resources and the execution efficiency of simulation tasks. When simulation task demands increase, the system can flexibly allocate memory resources to ensure efficient simulation computation. Especially during peak simulation computation periods, load balancing and dynamic resource allocation avoid computational latency and resource bottlenecks, significantly improving the processing capacity of simulation tasks. Combined with the calculation of the smallest convex polyhedron... This significantly improves the accuracy and expressiveness of the model. Mesh generation makes the processing of complex models more efficient, while the calculation of the minimum convex polyhedron ensures that the model's geometry is accurately captured and expressed. This step is crucial for reproducing complex structures and shapes in the real world, especially in fields such as engineering design and virtual reality, providing users with a highly realistic and accurate 3D visual experience. By differentiating layers and combining them with subsequent processing of convex polyhedron geometry, the model's detail and rendering efficiency are further optimized. This method not only improves the visual realism of the model but also optimizes the data processing, enabling the model to maintain high accuracy while also having better rendering performance and lower resource consumption.
[0076] S2: Extract the preset calculation parameters, perform preliminary simulation on the mesh generation model, and obtain a preliminary simulation model.
[0077] Furthermore, the preliminary simulation model includes initializing the preset calculation parameters, extracting the preset calculation parameters, and performing a preliminary simulation of the mesh generation model to obtain the preliminary simulation model.
[0078] The model P(X) with initialized preset calculation parameters is represented as:
[0079]
[0080] Where α is the adjustment x β In the parameter of influence of P(X), β is the parameter for adjusting the response of P(X), δ is the attenuation coefficient, and λ is the parameter for adjusting ln(ξ+x). 2 In P(X), the weight parameters ξ, ρ, and η are parameters adjusted based on simulation requirements, X is the set of output simulation parameters, and x is a single parameter of the simulation parameter set. n Let N be the nth parameter in the simulation parameter set, where N is the total number of parameters in the simulation parameter set.
[0081] The extraction of preset calculation parameters includes obtaining the initialized preset calculation parameters based on simulation parameters, and extracting the kernel function of the mesh generation model from the preset calculation parameters.
[0082] The kernel function K(P) of the mesh generation model is expressed as:
[0083]
[0084] Where P is the preset set of calculation parameters, p is the preset value of the calculation parameters, φ(p) is the simulation environment function, and h, θ, ω i and σ i These are parameters adjusted based on simulation requirements, where M is the number of parameters and P is the parameter value. i Let i be the i-th parameter that is weighted from P.
[0085] The preliminary simulation of the mesh generation model includes performing simulation calculations through kernel functions, and obtaining the preliminary simulation model S by calculating the spatial relationships and structural positions of the mesh generation model.
[0086] It should be noted that the preset calculation parameter initialization is used to set the initial conditions and parameters before the simulation model runs. Through precise calculation, it ensures that the basic data of the simulation process has high accuracy and adaptability. The kernel function K(P) is a method for handling data transformation. It is specifically used to process the parameters of the mesh generation model to optimize the geometric representation and computational efficiency of the simulation model. The mesh generation model refers to a model that divides three-dimensional space or objects into smaller, more manageable, and computationally efficient mesh units to improve the accuracy and efficiency of simulation calculations. The preset calculation parameters are initialized through a series of mathematical formulas. This process not only provides precise starting conditions for the simulation model, but also... Furthermore, through in-depth analysis and processing of these parameters, the simulation process is ensured to be efficient and accurate, demonstrating a meticulous ability to handle complex simulation environments. This significantly improves the accuracy and reliability of the simulation model. Through kernel functions, the computational efficiency of the mesh generation model can be optimized while maintaining high accuracy. This step not only reduces the computational resources required for simulation but also significantly improves the simulation efficiency and performance of the model through precise mesh generation and parameter optimization. After completing the initialization and extraction of the preset computational parameters, this invention further verifies the accuracy of the model parameters and the adaptability to the simulation environment by conducting preliminary simulations of the mesh generation model.
[0087] It should also be noted that the preliminary simulation model includes adjustments and optimizations. The optimization of the preliminary simulation model includes an optimization strategy O(K(P),S), expressed as:
[0088] O(K(P),S)=S+ΔS(K(P),S)
[0089] ΔS(K(P),S)=ψ(∫K(P)·SdV-λ target )
[0090] Where ΔS(K(P),S) is the adjustment amount based on the kernel function K(P) and the initial simulation model S, ψ is the adjustment coefficient, dV is the integral in the simulation space, and λ target This represents the expected simulation target value.
[0091] Collect deviation data between the simulation model and the expected experimental results in the simulation case, and calculate the maximum acceptable value D of the deviation based on the accuracy requirements of the simulation task. max , is represented as:
[0092] D max =E base ·Z xs
[0093] Among them, E base Z is the average error value obtained from historical data. xs This is the adjustment factor for the average error value.
[0094] Choose a safety factor Z that is greater than 0 and less than 1. aq The threshold yz is calculated and expressed as:
[0095] yz=Z aq ·D max
[0096] When the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is greater than the set threshold yz, or when the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is less than the set threshold yz, the parameter ω in the kernel function K(P) is adjusted. i and σ i Recalculate O(K(P),S).
[0097] No action is taken when the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is less than or equal to the set threshold yz and the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is greater than or equal to the set threshold yz.
[0098] Collect the preset calculation parameters of the historical monitoring simulation model, record the change ΔP of the preset calculation parameters over time Δt, and the rate of change of the preset calculation parameters, expressed as:
[0099]
[0100] Where dP is the change in the preset calculation parameters, and dt is the change in time.
[0101] Sensitivity threshold θ s , is represented as:
[0102]
[0103] Where jd and jx are adjustment coefficients for the accuracy of the preliminary simulation model. To monitor the maximum absolute value of the preset calculation parameters.
[0104] When the monitoring of P(X) displays the preset calculation parameters When adjusting the h and θ parameters in K(P), dP' is the change in the real-time preset calculation parameters, and dt' is the change in the real-time time.
[0105] It should also be noted that Z xs This is an adjustment coefficient for the average error value, greater than 0 and less than 1, and is achieved by adjusting the parameter ω in the kernel function K(P). i and σ iTo enhance the model's sensitivity to key variables, the optimization strategy O(K(P),S) is an adjustment method based on the kernel function and the initial simulation model S. By calculating and applying the adjustment amount ΔS(K(P),S), the deviation between the model and the expected target is reduced, improving the accuracy of the simulation. The adjustment coefficient ψ is a coefficient used in the optimization process to control the scale of the adjustment amount calculated based on the deviation between the kernel function and the simulation model, ensuring the stability and reliability of the optimization process. The simulation model is analyzed in depth and precisely adjusted to ensure that the model can more accurately reflect the expected results. By introducing the kernel function and the adjustment coefficient, not only can highly customized model adjustments be made for specific simulation environments and needs, but simulation parameters can also be dynamically optimized based on experimental data, greatly improving the adaptability and accuracy of the simulation model. By dynamically adjusting the simulation parameters, this invention can also effectively improve the efficiency of the simulation process and reduce unnecessary consumption of computational resources.
[0106] S3: Perform texture mapping on the simulation model to obtain an automatic 3D simulation model.
[0107] Furthermore, the automatic 3D simulation model includes texture mapping of the simulation model to obtain an automatic 3D simulation model.
[0108] Based on the preliminary simulation model, the target points of color information in the preliminary simulation model are obtained, and the three-dimensional centroid coordinates of the target points of color information in the preliminary simulation model are obtained. The three-dimensional centroid coordinates of the target points of color information in the preliminary simulation model are projected into a preset spatial coordinate system to obtain the point projection of color information in the preliminary simulation model. Based on the point projection of color information in the preliminary simulation model, a color texture point map is generated.
[0109] The color texture dot map is filled with a local color, and a 3D simulation automatic modeling model is generated based on the filled map.
[0110] It should be noted that, based on the initial simulation model, further texture mapping is performed on the model to increase its visual details and realism. This greatly enhances the model's visual realism and immersion, making the model not only accurate in shape but also highly realistic in color and texture. This is especially important for application scenarios that require visual analysis and display, such as product design and environmental demonstrations.
[0111] Example 2
[0112] One embodiment of the present invention provides a three-dimensional simulation automatic modeling method based on mesh generation. To verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0113] First, a typical urban power network is selected as the scene to be displayed, including substations, transmission lines, power distribution equipment and the surrounding environment. A laser scanner is used to perform a high-precision scan of this scene to obtain target point cloud data.
[0114] The scanned point cloud data is imported into professional 3D modeling software. The point cloud data is classified according to the object's attributes, and 3D modeling is performed for each category. Based on the spatial relationship between the models, these sub-models are combined into a complete initial simulation model. Next, based on the simulation requirements, the initial simulation model is meshed, and the requirement data of historical simulation projects are collected. Through data preprocessing, preset calculation parameters are formed. The extracted preset calculation parameters and kernel functions are used to perform preliminary simulation on the meshed model to obtain a preliminary simulation model. Based on the simulation results, the model parameters or structure are adjusted to optimize the simulation model. Texture mapping is performed on the optimized simulation model to increase the model's visual details and realism, and the final automatic 3D simulation model is constructed. Refer to Table 1 for comparison with existing technologies.
[0115] Table 1 Comparison with Existing Technologies
[0116]
[0117] Based on the data in the table above, compared with the existing technology, the simulation accuracy is improved by 15%, the simulation efficiency is improved by 20%, the memory usage is reduced by 500MB, and the simulation time is shortened by 60 seconds. It can be clearly seen that the invention has significant improvements over the existing technology in terms of improving simulation accuracy and efficiency, as well as in resource utilization and time cost. While solving the problems of the existing technology, the invention has higher innovation and advantages. Therefore, our invention is inventive.
[0118] Example 3
[0119] Reference Figure 2 As an embodiment of the present invention, a three-dimensional simulation automatic modeling system based on mesh generation is provided, including a mesh generation module, a preliminary simulation module, and a texture mapping module.
[0120] The mesh generation module is used to construct the initial simulation model, divide the initial simulation model into meshes, and obtain the meshed model. The preliminary simulation module is used to extract preset calculation parameters, perform preliminary simulation on the meshed model, and obtain the preliminary simulation model. The texture mapping module is used to perform texture mapping on the simulation model and obtain the automatic 3D simulation model.
[0121] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0123] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0124] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc. It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0125] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for automatic modeling of 3D simulation based on mesh generation, characterized in that, include: Construct an initial simulation model, then mesh the initial simulation model to obtain a meshed model; The preset calculation parameters are extracted, and a preliminary simulation of the mesh generation model is performed to obtain a preliminary simulation model; Texture mapping is performed on the simulation model to obtain an automatic 3D simulation model.
2. The automatic modeling method for 3D simulation based on mesh generation as described in claim 1, characterized in that: The construction of the initial simulation model includes scanning the scene to be displayed using a laser scanner to obtain the target point cloud of the scene to be displayed. The scene to be displayed includes towers, lines, live conductors and green ring environment in the scene. Import the target point cloud into the 3D modeling tool, and split the target point cloud file into groups based on the object properties, with each group of target point clouds representing a different object; For each group of target point clouds, a 3D model is created. The sub-models obtained from the 3D modeling are then combined based on the spatial relationship between the objects to obtain the initial simulation model.
3. The automatic modeling method for 3D simulation based on mesh generation as described in claim 2, characterized in that: The process of obtaining the mesh partitioning model includes receiving preset simulation requirements and dynamically allocating memory space, which includes making a comprehensive dynamic estimate of the storage space for simulation data based on simulation parameters and allocating memory space for simulation data. A comprehensive dynamic estimate of the storage space required for the simulation data is performed, and the comprehensive dynamic estimate R is calculated. f Represented as: W(s,i,c)=σ s ·s+λ i ·i+μ c ·c Where A is the adjustment coefficient, U(xq) is the user requirement parsing function, quantifying requirement complexity, xq is the complexity index of the requirement description provided by the user, V(t,Δ) is the requirement change adaptation function, t is time, Δ is the requirement change parameter, L(C,r) is the resource constraint adaptation function, C is the real-time available resource amount, r is the resource increase / decrease ratio, y is the evaluation adjustment parameter, and H(P) is the user requirement adjustment function. pk Let P be the peak-period resource demand function. pk For the estimated additional resource demand during peak periods, s is the impact coefficient of the difference in evaluation criteria, i is the impact coefficient of incomplete or ambiguous information, c is the impact coefficient of demand changes, W(s,i,c) is the function for evaluating the impact of s, i, and c on resource demand, D is the comprehensive metric of user description, and σ is the additional resource demand estimated during peak periods. s λ is the weighting coefficient for evaluating the differences in standards. i The weighting coefficient μ is used to assess the incompleteness or ambiguity of information. c The weighting coefficients are used to evaluate changes in requirements.
4. The automatic modeling method for 3D simulation based on mesh generation as described in claim 3, characterized in that: The method for obtaining the mesh partitioning model further includes dividing the memory space into two parts: a first memory block of fixed size, denoted as nc1, and a second memory block of fixed size, denoted as nc2. The sum of the first and second memory block spaces nc1 is nc2. sum When the comprehensive dynamic forecast value R f When the memory size is less than the first memory block space nc1, space is allocated within the first memory block space nc1. When the comprehensive dynamic estimate R... f When the value is greater than or equal to the first memory block space nc1, space is requested from both the first memory block space nc1 and the second memory block space nc2. If the memory space occupied by the cache task cannot be requested from the first memory block space nc1, memory is requested from the second memory block space nc2. When the comprehensive dynamic estimated value R... f Greater than or equal to nc sum When the first memory block space nc1 and the second memory block space nc2 cannot be allocated, the simulation task is distributed to different computing nodes or servers through load balancing. When the simulation calculation is in a peak period and the memory space of the first memory block space nc1 and the second memory block space nc2 cannot be requested, the simulation task is distributed to different computing nodes or servers through load balancing, or resources are dynamically allocated based on the priority of the task. The initial simulation model is meshed, and the three-dimensional geometric data of each sub-model is extracted from the initial simulation model. The sub-model vertices, edges and surfaces are recorded. The extracted three-dimensional geometric data is preprocessed with data smoothing. The Quickhull algorithm is used to calculate the minimum convex polyhedron that encloses all vertices for each set of three-dimensional geometric data. Based on the size, shape, orientation, and spatial position of the minimum convex polyhedron, the minimum convex polyhedron is assigned to different layers. Based on the spatial position and physical properties of the convex polyhedron, the convex polyhedra in the layers are combined to obtain a mesh generation model.
5. The automatic modeling method for 3D simulation based on mesh generation as described in claim 4, characterized in that: The preliminary simulation model includes initializing preset calculation parameters, extracting preset calculation parameters, and performing preliminary simulation on the mesh generation model to obtain a preliminary simulation model; The model P(X) with initialized preset calculation parameters is represented as: Where α is the adjustment x β In the parameter of influence of P(X), β is the parameter for adjusting the response of P(X), δ is the attenuation coefficient, and λ is the parameter for adjusting ln(ξ)+x. 2 In P(X), the weight parameters ξ, ρ, and η are parameters adjusted based on simulation requirements, X is the set of output simulation parameters, and x is a single parameter of the simulation parameter set. n Let N be the nth parameter in the simulation parameter set, where N is the total number of parameters in the simulation parameter set. The extraction of preset calculation parameters includes obtaining the initialized preset calculation parameters based on simulation parameters, and extracting the kernel function of the mesh generation model from the preset calculation parameters; The kernel function K(P) of the mesh generation model is expressed as: Where P is the preset set of calculation parameters, p is the preset value of the calculation parameters, φ(p) is the simulation environment function, and h, θ, ω i and σ i These are parameters adjusted based on simulation requirements, where M is the number of parameters and P is the parameter value. i Let i be the i-th parameter extracted from P; The preliminary simulation of the mesh generation model includes performing simulation calculations through kernel functions, and obtaining the preliminary simulation model S by calculating the spatial relationships and structural positions of the mesh generation model.
6. The automatic modeling method for 3D simulation based on mesh generation as described in claim 5, characterized in that: The preliminary simulation model also includes adjustments and optimizations. The optimization of the preliminary simulation model includes an optimization strategy O(K(P),S), expressed as: O(K(P),S)=S+ΔS(K(P),S) ΔS(K(P),S)=ψ(∫K(P)·SdV-λ target ) Where ΔS(K(P),S) is the adjustment amount based on the kernel function K(P) and the initial simulation model S, ψ is the adjustment coefficient, dV is the integral in the simulation space, and λ target This represents the expected simulation target value; Collect deviation data between the simulation model and the expected experimental results in the simulation case, and calculate the maximum acceptable value D of the deviation based on the accuracy requirements of the simulation task. max , is represented as: D max =E base ·Z xs Among them, E base Z is the average error value obtained from historical data. xs This is an adjustment factor for the average error value; Choose a safety factor Z that is greater than 0 and less than 1. aq The threshold yz is calculated and expressed as: yz=Z aq ·D max When the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is greater than the set threshold yz, or when the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is less than the set threshold yz, the parameter ω in the kernel function K(P) is adjusted. i and σ i Recalculate O(K(P),S); When the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is less than or equal to the set threshold yz and the deviation ΔS(K(P),S) between the preliminary simulation model and the expected target is greater than or equal to the set threshold yz, no processing is performed. Collect the preset calculation parameters of the historical monitoring simulation model, record the change ΔP of the preset calculation parameters over time Δt, and the rate of change of the preset calculation parameters, expressed as: Where dP is the change in the preset calculation parameters, and dt is the change in time; Sensitivity threshold θ s , is represented as: Where jd and jx are adjustment coefficients for the accuracy of the preliminary simulation model. To monitor the maximum absolute value of preset calculation parameters; When the monitoring of P(X) displays the preset calculation parameters When adjusting the h and θ parameters in K(P), dP' is the change in the real-time preset calculation parameters, and dt' is the change in the real-time time.
7. The automatic modeling method for 3D simulation based on mesh generation as described in claim 6, characterized in that: The automatic 3D simulation model includes texture mapping of the simulation model to obtain an automatic 3D simulation model. Based on the preliminary simulation model, the target points of color information in the preliminary simulation model are obtained, and the three-dimensional centroid coordinates of the target points of color information in the preliminary simulation model are obtained. The three-dimensional centroid coordinates of the target points of color information in the preliminary simulation model are projected into preset spatial coordinates to obtain the point projection of color information in the preliminary simulation model. Based on the point projection of color information in the preliminary simulation model, a color texture point map is generated. The color texture dot map is filled with a local color, and a 3D simulation automatic modeling model is generated based on the filled map.
8. A system employing the automatic modeling method for 3D simulation based on mesh generation as described in any one of claims 1 to 7, characterized in that: Includes a mesh generation module, a preliminary simulation module, and a texture mapping module; The mesh generation module is used to construct the initial simulation model, and to perform mesh generation on the initial simulation model to obtain the mesh generation model. The preliminary simulation module is used to extract preset calculation parameters, perform preliminary simulation on the mesh generation model, and obtain a preliminary simulation model. The texture mapping module is used to perform texture mapping on the simulation model to obtain an automatic 3D simulation model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the automatic modeling method for three-dimensional simulation based on mesh generation as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the automatic modeling method for three-dimensional simulation based on mesh generation as described in any one of claims 1 to 7.