Distributed construction method and device of grid model, equipment and medium
Through distributed construction methods and graph division methods, the grid model of complex geometric models is decomposed and processed, which solves the problem of building high-quality grid models in the existing technology, and improves the computing efficiency and parallel computing efficiency.
Patent Information
- Application Number
- CN202411140911.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing mesh model construction methods are difficult to build a mesh model corresponding to a high-quality geometric model, especially for geometric models with complex structures or large components, and the computing efficiency of the construction platform is low.
Using a distributed construction method, the grid model construction of the target geometric model is divided into multiple subtasks, and these subtasks are performed on multiple computing nodes in a serial and parallel manner through a distributed construction device, using the graph division method and network Grid generation method builds a high-quality sub-mesh model and fuses it to obtain the final mesh model.
The high-quality mesh model construction of complex geometric models is realized, which improves the computing efficiency of the construction process, and improves the parallel computing efficiency through load balancing and communication minimization strategies.
Smart Images

Figure CN119048712A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer-aided engineering (CAE) numerical simulation, and in particular to a distributed construction method, device, equipment and medium for a grid model. Background Art
[0002] The construction of mesh models is a key step in numerical simulation fields such as computational fluid dynamics (CFD) and finite element analysis (FEA). The simulation process involves dividing the computational parameters (i.e., computational domain) simulation object or physical space corresponding to the geometric model into a series of smaller and more manageable meshes (these meshes usually have simple geometric shapes, such as triangles, quadrilaterals, hexahedrons, etc.) for numerical solution. Therefore, the quality of the divided meshes directly affects the accuracy and efficiency of the numerical simulation, thereby affecting the quality of the mesh model corresponding to the constructed geometric model.
[0003] In the current research work on mesh model construction, the traditional mesh generation method is usually used to construct the mesh model corresponding to the geometric model. However, when using the traditional mesh generation method to construct the mesh model corresponding to the geometric model, since the traditional mesh generation method can only perform simple and low-quality mesh division on the calculation parameters corresponding to the geometric model with a simple structure or small components, it is impossible to divide the mesh corresponding to the high-quality geometric model when constructing the mesh model of the geometric model with a complex structure or large components, and thus it is impossible to construct the mesh model corresponding to the high-quality geometric model; at the same time, the existing mesh model construction platform for geometric models adopts a serial execution method, which results in low computational efficiency of the construction platform when constructing the mesh model.
[0004] In summary, for geometric models with complex structures or large components, the existing methods for constructing mesh models corresponding to geometric models cannot construct high-quality mesh models corresponding to geometric models. At the same time, the computational efficiency of the construction platform when constructing mesh models is also low.
[0005] Therefore, there is an urgent need for a method that can efficiently construct a mesh model corresponding to a geometric model, and this method can construct a high-quality mesh model corresponding to the geometric model. Summary of the invention
[0006] The present application provides a distributed construction method, device, equipment and medium for a grid model to solve the problem that for geometric models with complex structures or large component units, the existing method for constructing grid models corresponding to geometric models cannot construct high-quality grid models corresponding to geometric models, and at the same time, the construction platform has low computational efficiency when constructing grid models.
[0007] A first aspect of the present application provides a distributed construction method of a grid model, wherein the distributed construction method of the grid model is implemented based on a distributed construction device, wherein the distributed construction device includes a plurality of distributedly arranged computing nodes, and the method includes the following steps:
[0008] Acquire a target geometric model, and map the target geometric model into a two-dimensional space to obtain calculation parameters corresponding to the target geometric model;
[0009] The construction of the mesh model corresponding to the target geometric model is divided into multiple subtasks, wherein the multiple subtasks include an initial mesh model construction subtask, an initial mesh model division subtask, multiple sub-mesh model construction subtasks and a fine sub-mesh model fusion subtask; wherein the initial mesh model construction subtask is a subtask for dividing the calculation parameters corresponding to the target geometric model to construct the initial mesh model corresponding to the target geometric model; the initial mesh model division subtask is a subtask for dividing the initial mesh model corresponding to the target geometric model and mapping the division result to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model; each sub-mesh construction subtask is a subtask for processing a sub-network model of the mesh model corresponding to the target geometric model to obtain a fine sub-mesh model corresponding to the sub-mesh model; the fine sub-mesh model fusion subtask is a subtask for fusing all fine sub-mesh models to obtain the mesh model corresponding to the target geometric model;
[0010] configuring each computing node of the distributed build device to perform one or more subtasks;
[0011] All subtasks are assigned to all computing nodes of the distributed construction device, and all computing nodes are made to execute all subtasks in a serial and parallel manner to obtain a mesh model corresponding to the target geometric model.
[0012] In some embodiments of the present application, the initial mesh model division subtask is to divide the initial mesh model corresponding to the target geometric model using a graph partitioning method, and map the division result to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model.
[0013] In some embodiments of the present application, the initial mesh model corresponding to the target geometric model includes a plurality of meshes, each mesh has a connection relationship, and the graph partitioning method is:
[0014] Taking each mesh in the initial mesh model corresponding to the target geometric model as a node, constructing a dual weight graph corresponding to the initial mesh model based on the connection relationship between the meshes in the initial mesh model, wherein each node has an edge with other nodes with which it has a connection relationship;
[0015] Using a mesh quality assessment method to perform quality assessment on each mesh in the initial mesh model corresponding to the target geometric model, and presetting a corresponding weight for each edge in the dual weight graph corresponding to the initial mesh model based on the quality assessment result of each mesh;
[0016] Performing a cutting process on the dual weight graph corresponding to the initial grid model to obtain a plurality of subgraphs corresponding to the dual weight graph, wherein the number of the subgraphs is greater than the number of computing nodes of the distributed construction device;
[0017] The initial mesh model corresponding to the target geometric model is divided based on the multiple sub-graphs corresponding to the dual weight graph, and the division result is mapped to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model.
[0018] In some embodiments of the present application, the distributed construction device includes a main computing node and multiple working computing nodes, wherein:
[0019] The main computing node is configured to perform an initial grid model construction subtask, an initial grid model division subtask, and a fine subgrid model fusion subtask;
[0020] The plurality of working computing nodes are configured to execute all sub-grid model building subtasks.
[0021] In some embodiments of the present application, the initial grid model construction subtask, the initial grid model division subtask, and the fine sub-grid model fusion subtask are assigned to the main computing node, and the main computing node is made to serially execute the initial grid model construction subtask, the initial grid model division subtask, and the fine sub-grid model fusion subtask according to a preset execution order;
[0022] All sub-grid model construction subtasks are assigned to the multiple working computing nodes, and all the working computing nodes are made to execute all the sub-grid model construction subtasks in parallel, wherein after each working computing node completes executing a sub-grid model construction subtask, other unexecuted sub-grid model execution subtasks are assigned to the working computing node, so that the working computing node continues to execute its corresponding sub-grid model construction subtasks in parallel with other working computing nodes.
[0023] A second aspect of the present application provides a distributed construction device for implementing the method described in the above embodiment, which is used to construct a corresponding mesh model based on a target geometric model, and the distributed construction device includes:
[0024] The main computing node is used to serially execute the initial grid model construction subtask, the initial grid model division subtask, and the fine subgrid model fusion subtask in a preset execution order;
[0025] Multiple working computing nodes are used to execute all sub-grid model building subtasks in parallel.
[0026] In some embodiments of the present application, the main computing node is configured to perform the initial grid model construction subtask, the initial grid model division subtask, and the fine subgrid model fusion subtask in the following manner:
[0027] Responding to a grid model building request initiated by a user;
[0028] Get the preset parameters required to execute each subtask;
[0029] Based on the parameters required for executing the initial grid model construction subtask, the initial grid model division subtask and the fine sub-grid model fusion subtask, after serially executing the initial grid model construction subtask and the initial grid model division subtask in a preset execution order, an instruction for executing the sub-grid model construction subtask and the parameters required for executing the sub-grid model construction subtask are sent to all working computing nodes;
[0030] The fine subgrid model fusion subtask is executed based on the parameters required for executing the fine subgrid model fusion subtask and the results from multiple computing nodes after executing all subgrid model construction subtasks.
[0031] In some embodiments of the present application, the plurality of working computing nodes are configured to perform all sub-grid model construction subtasks in the following manner:
[0032] Responding to an instruction sent from the main computing node to execute a subgrid model building subtask;
[0033] Based on the parameters required for executing all sub-grid model construction subtasks from the main computing node, all sub-grid model construction subtasks are executed in parallel, wherein after each working computing node executes a sub-grid model construction subtask, other unexecuted sub-grid model construction subtasks are assigned to the working computing node so that the working computing node continues to execute its corresponding sub-grid model construction subtask in parallel with other working computing nodes;
[0034] The execution results of all sub-grid model building subtasks are fed back to the main computing node.
[0035] The third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the above embodiments when executing the computer program.
[0036] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any one of the above embodiments.
[0037] The present application has the following beneficial effects: the distributed construction method of the mesh model of the present application performs a preliminary division of the target geometric model to obtain an initial mesh model corresponding to the target geometric model, then divides the initial mesh model corresponding to the target geometric model, and maps the division result to the target geometric model to obtain a plurality of high-quality sub-mesh models of the mesh model corresponding to the target geometric model, and further obtains a fine sub-mesh model corresponding to each sub-mesh model based on the plurality of sub-mesh models of the mesh model corresponding to the high-quality target geometric model, and then fuses all the fine sub-mesh models to obtain a mesh model corresponding to the high-quality geometric model; at the same time, the construction of the mesh model corresponding to the geometric model is divided into a plurality of sub-tasks, and a distributed construction device is used to execute all sub-tasks in a serial-parallel combination manner to complete the construction of the mesh model corresponding to the geometric model, thereby improving the computational efficiency when constructing the mesh model corresponding to the geometric model. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0039] Figure 1 It is a flow chart of an embodiment of a distributed construction method of a grid model provided by the present application;
[0040] Figure 2 It is a flowchart of an embodiment of a graph partitioning method provided by the present application;
[0041] Figure 3 It is a schematic diagram of an example process of constructing a weighted dual graph corresponding to an initial mesh model based on an initial mesh model corresponding to a target geometric model provided by the present application;
[0042] Figure 4 It is a schematic diagram of an embodiment of the present application using a graph generation method and a graph partitioning method to partition a geometric model with holes;
[0043] Figure 5 It is a schematic diagram of the framework of an embodiment of a distributed construction device provided by the present application;
[0044] Figure 6 It is a schematic diagram of the execution flow of an embodiment of a distributed construction device for constructing a grid model provided by the present application;
[0045] Figure 7 It is a schematic diagram of a framework of an embodiment of an electronic device provided by the present application;
[0046] Figure 8 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0047] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0048] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0049] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0050] As described in the background technology, when using traditional mesh generation methods to construct a mesh model corresponding to a geometric model, since the traditional mesh generation method can only perform simple and low-quality mesh division on the calculation parameters corresponding to the geometric model with a simple structure or small components, when constructing a mesh model of a geometric model with a complex structure or large components, it is impossible to divide the mesh corresponding to the high-quality geometric model, and thus it is impossible to construct a mesh model corresponding to the high-quality geometric model; at the same time, the existing mesh model construction platform for geometric models adopts a serial execution method, which results in low computational efficiency of the construction platform when constructing the mesh model.
[0051] In order to solve the above problems, the present application provides a distributed construction method of a mesh model, which divides the target geometric model multiple times to construct multiple subtasks, thereby completing the execution of multiple subtasks to realize the construction of the mesh model corresponding to the target geometric model. In summary, the present application performs a preliminary division on the target geometric model to obtain an initial mesh model corresponding to the target geometric model, then divides the initial mesh model corresponding to the target geometric model, and maps the division results to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model with high quality, and further obtains a fine sub-mesh model corresponding to each sub-mesh model based on the multiple sub-mesh models of the mesh model corresponding to the high-quality target geometric model, and then fuses all the fine sub-mesh models to obtain a mesh model corresponding to the high-quality geometric model; at the same time, the construction of the mesh model corresponding to the geometric model is divided into multiple sub-tasks, and a distributed construction device is used to execute all sub-tasks in a serial and parallel manner to complete the construction of the mesh model corresponding to the geometric model, thereby improving the computational efficiency when constructing the mesh model corresponding to the geometric model.
[0052] In order to better understand the present application, the present application is described in detail below with reference to the accompanying drawings and embodiments.
[0053] According to one embodiment of the present application, Figure 1As shown, the present application provides a distributed construction method for a grid model, which is implemented based on a distributed construction device, which includes a plurality of computing nodes arranged in a distributed manner, and the method includes the following steps: S1, acquiring a target geometric model, and mapping the target geometric model to a two-dimensional space to obtain computing parameters corresponding to the target geometric model; S2, dividing the construction of a grid model corresponding to the target geometric model into a plurality of subtasks, wherein the plurality of subtasks include an initial grid model construction subtask, an initial grid model division subtask, a plurality of sub-grid model construction subtasks, and a fine sub-grid model fusion subtask; wherein the initial grid model construction subtask is a subtask for dividing the computing parameters corresponding to the target geometric model to construct an initial grid model corresponding to the target geometric model; the initial grid model The type division subtask is to divide the initial mesh model corresponding to the target geometric model and map the division result to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model; each sub-mesh construction subtask is to process a sub-network model of the mesh model corresponding to the target geometric model to obtain a fine sub-mesh model corresponding to the sub-mesh model; the fine sub-mesh model fusion subtask is to fuse all fine sub-mesh models to obtain a mesh model corresponding to the target geometric model; S3, configure each computing node of the distributed construction device to execute one or more subtasks; S4, assign all subtasks to all computing nodes of the distributed construction device, and enable all computing nodes to execute all subtasks in a serial and parallel manner to obtain the mesh model corresponding to the target geometric model.
[0054] It can be seen from the above embodiments that by using the method of the above embodiments of the present application to divide a geometric model with a complex structure or large component units multiple times, a mesh model corresponding to a high-quality geometric model can be constructed, while improving the computational efficiency when constructing a mesh model corresponding to the geometric model.
[0055] In order to more intuitively understand the mesh model construction process corresponding to the target geometric model, the contents of the above steps S1-S4 are described in detail below.
[0056] 1. Step S1
[0057] In step S1, a target geometric model is obtained, and the target geometric model is mapped into a two-dimensional space to obtain calculation parameters corresponding to the target geometric model. For example, three-dimensional information of the target geometric model is obtained from 3D scanning, CAD software or a 3D model library, and the three-dimensional information of the target geometric model is mapped into a two-dimensional space using a preset mapping method to obtain calculation parameters corresponding to the target geometric model, and these calculation parameters include coordinate information of the target three-dimensional model in the two-dimensional space, etc.
[0058] Step S2
[0059] In step S2, the construction of the mesh model corresponding to the target geometric model is divided into multiple subtasks, wherein the multiple subtasks include an initial mesh model construction subtask, an initial mesh model division subtask, multiple sub-mesh model construction subtasks and a fine sub-mesh model fusion subtask; wherein the initial mesh model construction subtask is a subtask of dividing the calculation parameters corresponding to the target geometric model to construct the initial mesh model corresponding to the target geometric model; the initial mesh model division subtask is a subtask of dividing the initial mesh model corresponding to the target geometric model and mapping the division result to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model; each sub-mesh construction subtask is a subtask of processing a sub-network model of the mesh model corresponding to the target geometric model to obtain a fine sub-mesh model corresponding to the sub-mesh model; the fine sub-mesh model fusion subtask is a subtask of fusing all fine sub-mesh models to obtain the mesh model corresponding to the target geometric model.
[0060] Among them, according to one embodiment of the present application, the initial mesh model construction subtask is to divide the calculation parameters corresponding to the target geometric model by using the mesh generation method to construct the subtask of the initial mesh model corresponding to the target geometric model. And according to another embodiment of the present application, the mesh generation method is Delaunay triangulation, or quadtree, or octree, or frontier advancement method. For example, when the Delaunay triangulation method is used to construct the initial mesh model corresponding to the target geometric model, a size larger than the target mesh size is used to perform Delaunay triangulation discretization inside and at the boundary of the target geometric model to generate the initial mesh model corresponding to the target geometric model. It should be noted that in this embodiment, the mesh generation method can be selected based on multiple factors such as the complexity of the target geometric model, the calculation accuracy requirements, the calculation efficiency requirements, and the specific requirements of the subsequent numerical analysis. In addition, with the continuous development of the mesh generation method, the mesh generation method in this embodiment can also be replaced by other mesh generation methods with better performance, which is not specifically limited here.
[0061] In addition, the inventors have discovered through research that the graph partitioning method is a parallel task allocation method commonly used in distributed scenarios. This method excels in load balancing and communication minimization in task allocation, and helps to improve the efficiency of parallel computing. At the same time, the method is used to further process the initial mesh model generated by the traditional mesh generation method to construct a mesh model corresponding to a high-quality geometric model. To this end, according to one embodiment of the present application, the initial mesh model partitioning subtask is to partition the initial mesh model corresponding to the target geometric model using the graph partitioning method, and map the partitioning result to the target geometric model to obtain a subtask of multiple sub-mesh models of the mesh model corresponding to the target geometric model. Among them, according to one embodiment of the present application, Figure 2 As shown, the initial mesh model corresponding to the target geometric model includes a plurality of meshes, each mesh has a connection relationship, and the graph partitioning method includes steps S21 to S24. Steps S21 to S24 are described in detail below.
[0062] In step S21, each mesh in the initial mesh model corresponding to the target geometric model is taken as a node, and a dual weight graph corresponding to the initial mesh model is constructed based on the connection relationship between the meshes in the initial mesh model, wherein each node has an edge with other nodes with which it has a connection relationship.
[0063] Indicatively, if Figure 3 As shown, it shows the process of constructing the weighted dual graph corresponding to the initial mesh model based on the initial mesh model corresponding to the target geometric model, where: Figure 3 (a) is a schematic diagram of the three meshes in the initial mesh model of the target geometric model and the connection relationship between the three meshes. Each mesh is regarded as a node, and the nodes corresponding to the three meshes are A, B, and C. Then, according to the connection relationship between the three meshes in the initial mesh model, the three nodes A, B, and C are connected to construct Figure 3 The weighted dual graph corresponding to the initial mesh model in part (b). It should be noted that this is just an example for intuitively understanding the probability derivation of the weighted dual graph. The initial mesh model corresponding to the specific target geometric model and the shape of the mesh model vary according to the requirements of the task and are not specifically limited here.
[0064] In step S22, a mesh quality assessment method is used to assess the quality of each mesh in the initial mesh model corresponding to the target geometric model, and a corresponding weight is preset for each edge in the dual weight graph corresponding to the initial mesh model based on the quality assessment result of each mesh. After the mesh quality assessment is completed, a higher weight is assigned to the edge corresponding to the low-quality mesh boundary (such as a smaller edge angle, dihedral angle).
[0065] In step S23, the dual weight graph corresponding to the initial grid model is cut to obtain a plurality of subgraphs corresponding to the dual weight graph, wherein the number of the subgraphs is greater than the number of computing nodes of the distributed construction device. When the dual weight graph corresponding to the initial grid model is cut, the dual weight graph is divided into a plurality of subgraphs with the minimum sum of the weights of the cut edges as the optimization goal.
[0066] In the step S24, the initial mesh model corresponding to the target geometric model is divided based on the multiple sub-graphs corresponding to the dual weight graph, and the division result is mapped to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model.
[0067] For example, Figure 4 As shown, it demonstrates the use of a graph generation method and a graph partitioning method to partition a geometric model with holes. When the surface is segmented using the above-mentioned embodiment of the present application, the segmentation quality of the area near the hole directly affects the segmentation quality of the geometric model. The combination of the graph generation method and the graph partitioning method of the above-mentioned embodiment can avoid the low-quality grid boundaries (i.e., the area near the hole) to segment out a high-quality sub-grid model, thereby obtaining a grid model corresponding to the high-quality geometric model.
[0068] It can be seen from the above embodiments that since the number of sub-grid models is greater than the number of computing nodes, the allocation strategy of allocating sub-tasks to the distributed construction device in the present application can ensure the dynamic balance of the task load of the computing nodes. At the same time, when the above-mentioned graph partitioning method is used to partition the grid model corresponding to the target geometric model, the communication between different computing nodes can be effectively reduced because the low-quality grid intersection is avoided.
[0069] Step S3
[0070] In step S3, each computing node of the distributed construction device is configured to execute one or more subtasks. Figure 5 As shown, the distributed construction device includes a main computing node and multiple working computing nodes (i.e., working computing nodes 1, 2, 3, ..., n), wherein the main computing node is configured to perform the initial grid model construction subtask, the initial grid model division subtask, and the fine subgrid model fusion subtask; and the multiple working computing nodes are configured to perform all subgrid model construction subtasks. At the same time, each computing node independently refines and optimizes the grid model for its assigned subtask, and during the grid model construction process, the computing nodes exchange necessary information through minimized communication volume to ensure the continuity and consistency of the grid model.
[0071] It can be seen from the above embodiments that configuring different computing nodes in the distributed construction device to execute subtasks corresponding to the mesh model corresponding to the target geometric model can improve the computational efficiency when constructing the mesh model corresponding to the geometric model.
[0072] Step S4
[0073] In the step S4, all subtasks are assigned to all computing nodes of the distributed construction device, and all computing nodes are made to execute all subtasks in a serial-parallel combination to obtain a mesh model corresponding to the target geometric model. According to one embodiment of the present application, the initial mesh model construction subtask, the initial mesh model division subtask, and the fine sub-mesh model fusion subtask are assigned to the main computing node, and the main computing node is made to serially execute the initial mesh model construction subtask, the initial mesh model division subtask, and the fine sub-mesh model fusion subtask according to a preset execution order; all sub-mesh model construction subtasks are assigned to the multiple working computing nodes, and all working computing nodes are made to execute all sub-mesh model construction subtasks in parallel, wherein, after each working computing node executes a sub-mesh model construction subtask, other unexecuted sub-mesh model execution subtasks are assigned to the working computing node, so that the working computing node and other working computing nodes continue to execute their corresponding sub-mesh model construction subtasks in parallel. It should be noted that the above embodiment in which the subtasks are assigned to each computing node of the distributed construction device for execution is only one embodiment. The specific subtask allocation method can be comprehensively evaluated and allocated based on multiple factors such as task nature, computing node capabilities, system load balancing, etc.
[0074] It can be seen from the above embodiments that all computing nodes of the distributed construction device execute all subtasks in a serial and parallel manner to obtain a mesh model corresponding to the target geometric model, which further improves the computational efficiency when constructing the mesh model corresponding to the geometric model.
[0075] In addition, some simple parallel strategies based on geometric bodies and geometric surfaces are often difficult to achieve load balancing in practical applications, and thus cannot achieve high parallel efficiency. Figure 5As shown, the present application provides a distributed construction device for implementing the method in the above embodiment, which is used to construct a corresponding grid model based on a target geometric model, and is used to construct a corresponding grid model based on a target geometric model, characterized in that the distributed construction device includes: a main computing node, which is used to serially execute the initial grid model construction subtask, the initial grid model division subtask and the fine sub-grid model fusion subtask according to a preset execution order; a plurality of working computing nodes (i.e., working computing nodes 1-n), which are used to execute all sub-grid model construction subtasks in parallel. It should be noted that the number of main computing nodes in the above embodiment is only an example, and the number of main computing nodes and working computing nodes is determined according to multiple factors such as the complexity of the computing task, the demand for computing resources, the scalability, fault tolerance and cost of the system, and is not specifically limited here. The workflow of the main computing node and the working computing node is described in detail below.
[0076] (1) Workflow of the main computing node
[0077] According to an embodiment of the present application, the master computing node is configured to execute the initial grid model construction subtask, the initial grid model division subtask, and the fine subgrid model fusion subtask in the following manner: responding to a grid model construction request initiated by a user; obtaining preset parameters required for executing each subtask; based on the parameters required for executing the initial grid model construction subtask, the initial grid model division subtask, and the fine subgrid model fusion subtask, after serially executing the initial grid model construction subtask and the initial grid model division subtask in a preset execution order, sending instructions for executing the subgrid model construction subtask and the parameters required for executing the subtask to all working computing nodes; executing the fine subgrid model fusion subtask based on the parameters required for executing the fine subgrid model fusion subtask and the results from multiple computing nodes after executing all subgrid model construction subtasks.
[0078] (2) Workflow of working computing nodes
[0079] According to one embodiment of the present application, the multiple working computing nodes are configured to execute all sub-grid model construction subtasks in the following manner: in response to an instruction to execute a sub-grid model construction subtask sent from the main computing node; executing all sub-grid model construction subtasks in parallel based on the parameters required to execute all sub-grid model construction subtasks from the main computing node, wherein after each working computing node completes executing a sub-grid model construction subtask, other unexecuted sub-grid model construction subtasks are assigned to the working computing node so that the working computing node continues to execute its corresponding sub-grid model construction subtask in parallel with other working computing nodes; and the execution results of all sub-grid model construction subtasks are fed back to the main computing node.
[0080] In order to more clearly understand the construction process of the distributed construction device of the above embodiment to construct the mesh model corresponding to the target geometric model, Figure 6 Detailed description of the interaction process of all computing nodes of the distributed construction device.
[0081] like Figure 6 As shown, it shows the execution process of the distributed construction device to construct a grid model, and the execution process is as follows: first, the user end (i.e., client) initiates a grid model construction request and configures the parallel parameters required for executing all subtasks to complete the construction of the grid model; secondly, the main computing node (i.e., master computing node) calculates the initial grid model (i.e., background grid) corresponding to the target geometric model, and according to the parallel parameters required for completing all subtasks to be executed by the user end to build the grid model, uses a graph partitioning method to partition the initial grid model corresponding to the target geometric model and maps the partitioning result to the target geometric model to obtain multiple sub-grid models of the grid model corresponding to the target geometric model, each sub-grid model forms a sub-grid construction subtask, forming a task pool (or task queue); then, the working computing node (i.e., worker computing node) cyclically obtains unexecuted subtasks from the task pool and executes them in parallel until all subtasks in the task pool have been executed, wherein a single working computing node calls the corresponding grid generation program to complete the execution of the subtask and returns the result to the main computing node; finally, the main computing node performs fusion processing on the execution results of all subtasks and returns the result to the user end. (Merge the sub-grids obtained from each working computing node, that is, align and merge the grids originally at the boundaries of each sub-grid to form a final overall grid as the grid model corresponding to the target geometric model; or combine with the existing parallel solver, directly input the sub-grids obtained from each working computing node into the solver to form a fully parallel numerical simulation calculation process.).
[0082] Based on the inventive concept of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the above embodiments when executing the computer program. Figure 7 Provide detailed explanation.
[0083] like Figure 7 As shown, it shows the electronic device of the present application, which may specifically include a processor 110 and a memory 120. The memory 120 is coupled to the processor 110.
[0084] The processor 110 is used to control the operation of the electronic device. The processor 110 may also be referred to as a CPU (Central Processing Unit). The processor 110 may be an integrated circuit chip having the ability to process signals. The processor 110 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 110 may also be any conventional processor, etc.
[0085] The memory 120 is used to store computer programs, and may be a RAM, a ROM, or other types of storage terminals. Specifically, the memory 120 may include one or more computer-readable storage media, which may be non-transitory or transient. The memory 120 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage terminals, flash memory storage terminals. In some embodiments, the non-transitory computer-readable storage medium in the memory 120 is used to store at least one program code.
[0086] The processor 110 is used to execute the computer program stored in the memory 120 to implement the methods described in the various method embodiments of the present application.
[0087] In some embodiments, the electronic device may further include: a peripheral terminal interface 130 and at least one peripheral terminal. The processor 110, the memory 120 and the peripheral terminal interface 130 may be connected via a bus or a signal line. Each peripheral terminal may be connected to the peripheral terminal interface 130 via a bus, a signal line or a circuit board. Specifically, the peripheral terminal includes: at least one of a radio frequency circuit 140, a display screen 150, an audio circuit 160 and a power supply 170.
[0088] The peripheral terminal interface 130 may be used to connect at least one peripheral terminal related to I / O (Input / output) to the processor 110 and the memory 120. In some embodiments, the processor 110, the memory 120, and the peripheral terminal interface 130 are integrated on the same chip or circuit board; in some other implementations, any one or two of the processor 110, the memory 120, and the peripheral terminal interface 130 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0089] The radio frequency circuit 140 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 140 communicates with the communication network and other IoT devices through electromagnetic signals, and the radio frequency circuit 140 is the communication circuit of the electronic device. The radio frequency circuit 140 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 140 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operator identity module card, and the like. The radio frequency circuit 140 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 140 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0090] The display screen 150 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 150 is a touch display screen, the display screen 150 also has the ability to collect touch signals on the surface or above the surface of the display screen 150. The touch signal can be input to the processor 110 as a control signal for processing. At this time, the display screen 150 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 150 can be one, set on the front panel of the electronic device; in other embodiments, the display screen 150 can be at least two, respectively set on different surfaces of the electronic device or in a folding design; in other embodiments, the display screen 150 can be a flexible display screen, set on a curved surface or a folding surface of the electronic device. Even, the display screen 150 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 150 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light Emitting Diode, organic light-emitting diode).
[0091] The audio circuit 160 may include a microphone and a speaker. The microphone is used to collect sound waves from the operator and the environment, and convert the sound waves into electrical signals and input them into the processor 110 for processing, or input them into the radio frequency circuit 140 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there can be multiple microphones, which are respectively arranged in different parts of the electronic device. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 110 or the radio frequency circuit 140 into sound waves. The speaker can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 160 may also include a headphone jack.
[0092] The power supply 170 is used to power various components in the electronic device. The power supply 170 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 170 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0093] For a detailed description of the functions and execution processes of each functional module or component in the electronic device embodiment of the present application, reference can be made to the description in the above-mentioned method embodiments of the present application, which will not be repeated here.
[0094] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the various embodiments of the electronic devices described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0097] Based on the inventive concept of the above embodiment, the present application also provides a computer-readable storage medium storing a computer program, which can be executed by a processor to implement the above projection area calculation method. Figure 8 The execution process of the above-mentioned embodiment in a computer-readable storage medium is described.
[0098] like Figure 8 As shown, it shows the computer-readable storage medium of the present application. If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium 200. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions / computer programs to enable an IoT device (which can be a personal computer, server, or network terminal, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and electronic terminals such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above-mentioned storage medium.
[0099] The description of the execution process of the program data in the computer-readable storage medium can refer to the description in the above-mentioned method embodiments of the present application, which will not be repeated here.
[0100] To summarize, compared with the existing traditional mesh generation method which can only perform simple and low-quality mesh division on the calculation parameters corresponding to the geometric model with simple structure and small component units, the above-mentioned embodiment of the present application adopts the combination of the traditional mesh generation method and the graph division method to divide the mesh corresponding to the high-quality geometric model when processing the construction of the mesh model of the geometric model with complex structure or large component units, thereby constructing the mesh model corresponding to the high-quality geometric model; at the same time, compared with the existing mesh model construction platform of the geometric model which adopts the serial execution method, the distributed construction device in the above-mentioned embodiment of the present application executes all subtasks in a serial-parallel combination to complete the construction of the mesh model corresponding to the geometric model, thereby improving the computational efficiency when constructing the mesh model corresponding to the geometric model, and the task allocation method of each computing node in the distributed construction device performs excellently in load balancing and communication minimization to construct the mesh model, which also helps to improve the efficiency of parallel computing.
[0101] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
[0102] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
Claims
1. A distributed construction method for a grid model, characterized in that: The distributed construction method of the grid model is implemented based on a distributed construction device, the distributed construction device includes a plurality of distributedly arranged computing nodes, and the method includes the following steps: Acquire a target geometric model, and map the target geometric model into a two-dimensional space to obtain calculation parameters corresponding to the target geometric model; The construction of the mesh model corresponding to the target geometric model is divided into multiple subtasks, wherein the multiple subtasks include an initial mesh model construction subtask, an initial mesh model division subtask, multiple sub-mesh model construction subtasks and a fine sub-mesh model fusion subtask; wherein the initial mesh model construction subtask is a subtask for dividing the calculation parameters corresponding to the target geometric model to construct the initial mesh model corresponding to the target geometric model; the initial mesh model division subtask is a subtask for dividing the initial mesh model corresponding to the target geometric model and mapping the division result to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model; each sub-mesh construction subtask is a subtask for processing a sub-network model of the mesh model corresponding to the target geometric model to obtain a fine sub-mesh model corresponding to the sub-mesh model; the fine sub-mesh model fusion subtask is a subtask for fusing all fine sub-mesh models to obtain the mesh model corresponding to the target geometric model; configuring each computing node of the distributed build device to perform one or more subtasks; All subtasks are assigned to all computing nodes of the distributed construction device, and all computing nodes are made to execute all subtasks in a serial and parallel manner to obtain a mesh model corresponding to the target geometric model.
2. The distributed construction method of the grid model according to claim 1, characterized in that: The initial mesh model division subtask is to divide the initial mesh model corresponding to the target geometric model using a graph division method, and map the division result to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model.
3. The distributed construction method of the grid model according to claim 2, characterized in that: The initial mesh model corresponding to the target geometric model includes a plurality of meshes, each of which has a connection relationship, and the graph partitioning method is: Taking each mesh in the initial mesh model corresponding to the target geometric model as a node, constructing a dual weight graph corresponding to the initial mesh model based on the connection relationship between the meshes in the initial mesh model, wherein each node has an edge with other nodes with which it has a connection relationship; Using a mesh quality assessment method to perform quality assessment on each mesh in the initial mesh model corresponding to the target geometric model, and presetting a corresponding weight for each edge in the dual weight graph corresponding to the initial mesh model based on the quality assessment result of each mesh; Performing a cutting process on the dual weight graph corresponding to the initial grid model to obtain a plurality of subgraphs corresponding to the dual weight graph, wherein the number of the subgraphs is greater than the number of computing nodes of the distributed construction device; The initial mesh model corresponding to the target geometric model is divided based on the multiple sub-graphs corresponding to the dual weight graph, and the division result is mapped to the target geometric model to obtain multiple sub-mesh models of the mesh model corresponding to the target geometric model.
4. The distributed construction method of the grid model according to claim 1, characterized in that: The distributed construction device includes a main computing node and multiple working computing nodes, wherein: The main computing node is configured to perform an initial grid model construction subtask, an initial grid model division subtask, and a fine subgrid model fusion subtask; The plurality of working computing nodes are configured to execute all sub-grid model building subtasks.
5. The distributed construction method of the grid model according to claim 4, characterized in that: Assigning the initial grid model construction subtask, the initial grid model division subtask, and the fine sub-grid model fusion subtask to the main computing node, and making the main computing node execute the initial grid model construction subtask, the initial grid model division subtask, and the fine sub-grid model fusion subtask in series according to a preset execution order; All sub-grid model construction subtasks are assigned to the multiple working computing nodes, and all the working computing nodes are made to execute all the sub-grid model construction subtasks in parallel, wherein after each working computing node completes executing a sub-grid model construction subtask, other unexecuted sub-grid model execution subtasks are assigned to the working computing node, so that the working computing node continues to execute its corresponding sub-grid model construction subtasks in parallel with other working computing nodes.
6. A distributed construction device for implementing the method according to any one of claims 1 to 5, for constructing a corresponding mesh model based on a target geometric model, characterized in that: The distributed construction device comprises: The main computing node is used to serially execute the initial grid model construction subtask, the initial grid model division subtask, and the fine subgrid model fusion subtask in a preset execution order; Multiple working computing nodes are used to execute all sub-grid model building subtasks in parallel.
7. The distributed construction device according to claim 6, characterized in that: The main computing node is configured to perform the initial grid model construction subtask, the initial grid model division subtask and the fine subgrid model fusion subtask in the following manner: Responding to a grid model building request initiated by a user; Get the preset parameters required to execute each subtask; Based on the parameters required for executing the initial grid model construction subtask, the initial grid model division subtask and the fine sub-grid model fusion subtask, after serially executing the initial grid model construction subtask and the initial grid model division subtask in a preset execution order, an instruction for executing the sub-grid model construction subtask and the parameters required for executing the sub-grid model construction subtask are sent to all working computing nodes; The fine subgrid model fusion subtask is executed based on the parameters required for executing the fine subgrid model fusion subtask and the results from multiple computing nodes after executing all subgrid model construction subtasks.
8. The distributed construction device according to claim 7, characterized in that: The plurality of working computing nodes are configured to execute all sub-grid model construction subtasks in the following manner: Responding to an instruction sent from the main computing node to execute a subgrid model building subtask; Based on the parameters required for executing all sub-grid model construction subtasks from the main computing node, all sub-grid model construction subtasks are executed in parallel, wherein after each working computing node executes a sub-grid model construction subtask, other unexecuted sub-grid model construction subtasks are assigned to the working computing node so that the working computing node continues to execute its corresponding sub-grid model construction subtask in parallel with other working computing nodes; The execution results of all sub-grid model building subtasks are fed back to the main computing node.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Tetrahedral mesh generation method and device for three-dimensional solid model
CN104063903A
Grid model data generation method
CN106548512A
Method and device for constructing three-dimensional grid model
CN113128095A
Multi-user-oriented distributed large-scale multi-scene multi-source three-dimensional reconstruction method
CN116843856A
Image rendering processing method and apparatus, storage medium, and electronic device
WO2022095714A1
Cited By
Super-large-scale high-expandability grid generation method and device and storage medium
CN119885694A
