A subgrid updating method, system and terminal for three-dimensional grid model

By constructing a tree structure and using an optimized bidirectional breadth priority algorithm, the three-dimensional grid model is updated in sub-mesh, which solves the problem of long tilting time in the existing technology and improves processing efficiency.

CN117593484BActive Publication Date: 2025-03-07SHENZHEN INSTITUTE OF INFORMATION TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311704527.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-03-07
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

In the prior art, it takes a lot of time to cut a three-dimensional grid model, resulting in inefficient processing.

Method used

By obtaining the patches in the three-dimensional grid as the starting patches, a tree structure is constructed, and a two-way traversal operation is performed using the optimized bidirectional breadth priority algorithm at the same level is updated until all sub-grids are updated.

Benefits of technology

It significantly accelerates the tiling speed of the three-dimensional grid model, improves processing efficiency, and reduces dependence on ordinary GPUs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117593484B_ABST
    Figure CN117593484B_ABST
Patent Text Reader

Abstract

The present invention discloses a sub-grid updating method, system and terminal of a three-dimensional grid model, the method comprising: obtaining a three-dimensional grid, and randomly selecting a facet from the three-dimensional grid as the starting facet of the first sub-grid; obtaining all co-edge neighboring facets of the starting facet, and constructing a tree structure according to the starting facet and all the co-edge neighboring facets; performing a bidirectional traversal operation on each layer of the tree structure according to an optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets, and updating the first sub-grid according to all the first sub-facets; obtaining the ending facet of the updated first sub-grid, and updating the next adjacent sub-grid according to the ending co-edge neighboring facet corresponding to the ending facet, until all sub-grids in the three-dimensional grid are updated. The present invention accelerates the speed of slicing the three-dimensional grid model and improves the efficiency of processing the three-dimensional grid model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer graphics technology, and in particular to a sub-grid updating method, system, terminal and computer-readable storage medium of a three-dimensional grid model. Background Art

[0002] With the development of science and technology, graph neural networks (GNN) have been widely used in many fields of social sciences, such as social networks, natural sciences, protein-protein interaction networks, knowledge graphs, and many other research fields. Graph neural networks are neural networks that capture the dependencies between graph node features through message passing between graph nodes. As a unique non-Euclidean data structure machine learning and graph analysis tool, it is suitable for tasks such as node classification, prediction, and clustering. Graph neural networks have become a widely used graph analysis method.

[0003] As a non-Euclidean spatial data, the three-dimensional mesh model is very suitable for algorithm research using graph neural networks. Before conducting algorithm research on the three-dimensional mesh model, the three-dimensional mesh model needs to be preprocessed and cut into smaller sub-grids to suit batch graph neural network learning. However, the number of triangles in the three-dimensional mesh model is in the order of hundreds of thousands or even tens of millions, which makes it difficult to process with ordinary GPUs. Cutting the three-dimensional mesh model into pieces takes a lot of time and is inefficient.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The main purpose of the present invention is to provide a sub-grid updating method, system, terminal and computer-readable storage medium for a three-dimensional grid model, aiming to solve the problem in the prior art that it takes a lot of time to slice the three-dimensional grid model, resulting in low efficiency in processing the three-dimensional grid model.

[0006] To achieve the above object, the present invention provides a sub-grid updating method for a three-dimensional grid model, the sub-grid updating method for a three-dimensional grid model comprising the following steps:

[0007] Acquire a three-dimensional grid, and randomly select a face from the three-dimensional grid as a starting face of a first sub-grid;

[0008] Acquire all co-edge neighboring face patches of the starting face patch, and construct a tree structure according to the starting face patch and all the co-edge neighboring face patches;

[0009] Performing a bidirectional traversal operation on each layer of the tree structure according to the optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-faces, and updating the first sub-grid according to all the first sub-faces;

[0010] The end face patch of the updated first sub-mesh is obtained, and the next adjacent sub-mesh is updated according to the end common edge neighbor face patch corresponding to the end face patch, until all sub-meshes in the three-dimensional mesh are completely updated.

[0011] Optionally, the sub-grid updating method of the three-dimensional grid model, wherein the acquiring all co-edge neighboring facets of the starting facet and constructing a tree structure according to the starting facet and all the co-edge neighboring facets, specifically comprises:

[0012] Acquire all co-edge neighboring face patches corresponding to the starting face patch based on the clockwise direction;

[0013] Using the starting face as the starting root node of the tree structure;

[0014] According to the acquisition order of all the co-edge neighboring face patches, all the co-edge neighboring face patches are used from left to right as the second-layer child nodes corresponding to the starting root node in the tree structure to complete the construction of the tree structure.

[0015] Optionally, the sub-grid updating method of the three-dimensional grid model, wherein the bidirectional traversal operation is performed on each layer of the tree structure according to the optimized same-level bidirectional breadth-first algorithm to obtain a preset number of first sub-faces, specifically includes:

[0016] Based on the optimized same-level bidirectional breadth-first algorithm, the first co-edge neighboring face patches corresponding to each of the second-layer child nodes are simultaneously obtained in the order of leftmost to middle and rightmost to middle, and the third-layer child nodes of the tree structure are constructed according to all the first co-edge neighboring face patches;

[0017] At the same time, the second co-edge neighboring patches corresponding to each of the third-layer sub-nodes are obtained in the order from the leftmost to the middle and from the rightmost to the middle, and the fourth-layer sub-nodes of the tree structure are constructed according to all the second co-edge neighboring patches, ... until the number of nodes in the tree structure reaches a preset number, and the patches corresponding to all the nodes in the tree structure are respectively used as the first sub-patches.

[0018] Optionally, in the sub-grid updating method of the three-dimensional grid model, the step of constructing a third-layer sub-node of a tree structure according to all the first co-edge neighboring face patches specifically includes:

[0019] Construct multiple second-layer subtrees according to all the second-layer child nodes, and use each of the second-layer child nodes as a second root node of the second-layer subtree;

[0020] According to the order of obtaining the first co-edge neighboring facets corresponding to each of the second-layer sub-nodes, the first co-edge neighboring facets corresponding to each of the second-layer sub-nodes are used from left to right as the third-layer sub-nodes corresponding to each second root node.

[0021] Optionally, in the sub-grid updating method of the three-dimensional grid model, the step of obtaining the end face of the first sub-grid specifically includes:

[0022] Obtaining a tree structure corresponding to the first sub-grid;

[0023] Obtain the rightmost node of the bottom layer of the tree structure and use it as the end node;

[0024] Acquire a corresponding end patch from the first sub-grid according to the end node.

[0025] Optionally, in the sub-grid updating method of the three-dimensional grid model, the method of repeating the three-dimensional grid slicing according to the ending common edge neighboring facets corresponding to the ending facets further comprises:

[0026] Obtain a plurality of co-edge neighboring face patches corresponding to the end face patch;

[0027] Deduplication is performed on all the co-edge neighboring facets corresponding to the end facets, and the co-edge neighboring facets that are not in the first sub-grid are retained to obtain a set of optional co-edge neighboring facets;

[0028] If the number of co-edge neighboring face patches in the optional co-edge neighboring face patch set is one, taking the co-edge neighboring face patches in the optional co-edge neighboring face patch set as the ending co-edge neighboring face patch;

[0029] If the number of co-edge neighboring face patches in the optional co-edge neighboring face patch set is greater than one, the co-edge neighboring face patch with the earliest acquisition order is selected and used as the ending co-edge neighboring face patch.

[0030] Optionally, the sub-grid updating method of the three-dimensional grid model, wherein the three-dimensional grid slicing method is repeated according to the ending common edge neighboring facets corresponding to the ending facets until all the facets in the three-dimensional grid are allocated to the corresponding sub-grids, thereby completing the slicing of the three-dimensional grid, specifically comprising:

[0031] Using the ending common edge neighborhood patch as the starting patch of the second sub-mesh, updating the second sub-mesh according to the same-level bidirectional breadth-first algorithm and the starting patch of the second sub-mesh, and obtaining the ending patch of the second sub-mesh;

[0032] The starting face of the third sub-mesh is obtained according to the ending face of the second sub-mesh, the third sub-mesh is updated according to the same-level bidirectional breadth-first algorithm and the starting face of the third sub-mesh, and the ending face of the third sub-mesh is obtained, ... until all sub-meshes in the three-dimensional mesh are updated.

[0033] In addition, to achieve the above-mentioned purpose, the present invention further provides a sub-grid updating system for a three-dimensional grid model, wherein the sub-grid updating system for a three-dimensional grid model comprises:

[0034] A tree structure building module, used for acquiring all co-edge neighboring face patches of the starting face patch, and building a tree structure according to the starting face patch and all the co-edge neighboring face patches;

[0035] A first sub-grid updating module, configured to perform a bidirectional traversal operation on each layer of the tree structure according to an optimized same-level bidirectional breadth-first algorithm to obtain a preset number of first sub-faces, and update the first sub-grid according to all the first sub-faces;

[0036] The three-dimensional mesh slicing module is used to obtain the end face of the updated first sub-mesh, and update the next adjacent sub-mesh according to the end common edge neighborhood face corresponding to the end face, until all sub-meshes in the three-dimensional mesh are updated.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a sub-mesh update program of a three-dimensional mesh model stored in the memory and executable on the processor, and when the sub-mesh update program of the three-dimensional mesh model is executed by the processor, the steps of the sub-mesh update method of the three-dimensional mesh model as described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a sub-mesh update program for a three-dimensional mesh model, and when the sub-mesh update program for the three-dimensional mesh model is executed by a processor, the steps of the sub-mesh update method for the three-dimensional mesh model as described above are implemented.

[0039] In the present invention, a three-dimensional grid is obtained, and a patch is randomly selected from the three-dimensional grid as the starting patch of the first sub-grid; all co-edge neighbor patches of the starting patch are obtained, and a tree structure is constructed according to the starting patch and all the co-edge neighbor patches; a bidirectional traversal operation is performed on each layer of the tree structure according to an optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-patterns, and the first sub-grid is updated according to all the first sub-patterns; the ending patch of the updated first sub-grid is obtained, and the adjacent next sub-grid is updated according to the ending co-edge neighbor patch corresponding to the ending patch, until all sub-grids in the three-dimensional grid are updated. The present invention speeds up the speed of slicing the three-dimensional grid model and improves the efficiency of processing the three-dimensional grid model. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flow chart of a preferred embodiment of a sub-grid updating method of a three-dimensional grid model of the present invention;

[0041] Figure 2 It is a first schematic diagram of a tree structure of a preferred embodiment of a sub-grid updating method for a three-dimensional grid model of the present invention;

[0042] Figure 3 It is a schematic diagram of a three-dimensional mesh facet of a preferred embodiment of a sub-mesh updating method of a three-dimensional mesh model of the present invention;

[0043] Figure 4 is a second schematic diagram of a tree structure of a preferred embodiment of the sub-grid updating method of a three-dimensional grid model of the present invention;

[0044] Figure 5 is a third schematic diagram of a tree structure of a preferred embodiment of the method for updating a sub-grid of a three-dimensional grid model of the present invention;

[0045] Figure 6 It is an algorithm processing effect diagram of a preferred embodiment of the sub-grid updating method of the three-dimensional grid model of the present invention;

[0046] Figure 7 It is a specific use flow chart of a preferred embodiment of the sub-grid updating method of the three-dimensional grid model of the present invention;

[0047] Figure 8 It is a schematic diagram of the principle of a preferred embodiment of a sub-grid updating system for a three-dimensional grid model of the present invention;

[0048] Fig. 9 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0050] A three-dimensional mesh (three-dimensional mesh model) is actually composed of multiple triangular facets. The present invention proposes a fast dilation and cutting algorithm (FDCA). The three-dimensional mesh is processed by FDCA to achieve fast slicing of the three-dimensional mesh (that is, sub-mesh updating). This solves the problem that the traditional two-way breadth-first search algorithm cannot determine the end point facet when slicing the three-dimensional model, and also greatly shortens the slicing processing time of the three-dimensional model.

[0051] The sub-grid updating method of the three-dimensional grid model described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the sub-grid updating method of the three-dimensional grid model includes the following steps:

[0052] Step S10: Obtain a three-dimensional grid, and randomly select a face from the three-dimensional grid as a starting face of the first sub-grid.

[0053] Specifically, the three-dimensional mesh that needs to be sub-mesh updated (cut) is first obtained as input by the user, and then a patch is arbitrarily selected from a plurality of triangular patches contained in the three-dimensional mesh as the starting patch of the first sub-mesh.

[0054] Step S20: Acquire all co-edge neighboring patches of the starting patch, and construct a tree structure based on the starting patch and all the co-edge neighboring patches.

[0055] Specifically, according to the three edges of the starting patch (because the patch is a triangular patch), all the co-edge neighbor patches that share edges with the starting patch are obtained, which are actually three co-edge neighbor patches. Then, a tree structure corresponding to the first sub-mesh is constructed based on the starting patch and the three co-edge neighbor patches.

[0056] Furthermore, the acquiring of all co-edge neighboring facets of the starting facet and constructing a tree structure according to the starting facet and all the co-edge neighboring facets specifically includes:

[0057] Based on the clockwise direction, all the co-edge neighboring facets corresponding to the starting facet are obtained; the starting facet is used as the starting root node of the tree structure; according to the order in which all the co-edge neighboring facets are obtained, all the co-edge neighboring facets are used from left to right as the second-layer child nodes corresponding to the starting root node in the tree structure to complete the construction of the tree structure

[0058] Specifically, in a preferred embodiment of the present invention, when obtaining the corresponding co-edge neighboring facets according to the starting facet, an edge is arbitrarily selected to start obtaining, and the acquisition is performed in a clockwise direction, so as to obtain the corresponding three co-edge neighboring facets; when constructing the tree structure corresponding to the first sub-grid, such as Figure 2 As shown, the starting face is used as the starting root node of the tree structure (such as Figure 2 A in the figure), and then the three co-edge neighboring faces are used as child nodes of the second layer of the tree structure in the order of acquisition (for example, according to the order of acquisition, the three co-edge neighboring faces are used as Figure 2 A1, A2 and A3 in ), thereby completing the construction of the tree structure.

[0059] Step S30: performing a bidirectional traversal operation on each layer of the tree structure according to the optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets, and updating the first sub-grid according to all the first sub-facets.

[0060] Specifically, after the tree structure is constructed, it is necessary to use the optimized same-level bidirectional breadth-first algorithm (that is, the fast dilation cut algorithm FDCA) to perform a bidirectional traversal of the tree structure. Here, the second layer is actually first traversed bidirectionally by FDCA, and then the third layer of the tree structure is updated according to the traversal results, and then the third layer of the attribute structure is traversed bidirectionally according to FDCA. This process is repeated until a preset number of first sub-patches (that is, the patches corresponding to the first sub-mesh) are obtained, thereby completing the update of the first sub-mesh.

[0061] In a preferred embodiment of the present invention, Nsm is used to represent the preset number (the number of expansion cuts). When a common GPU (12G-24G video memory) is used to perform denoising and feature learning tasks on a three-dimensional mesh model, Nsm=1024 is set; however, the preset number can be set accordingly according to the needs of the three-dimensional mesh deep learning task performed by the user and the terminal GPU memory size, and is not limited here.

[0062] Furthermore, the bidirectional traversal operation is performed on each layer of the tree structure according to the optimized same-level bidirectional breadth-first algorithm to obtain a preset number of first sub-facets, specifically including:

[0063] Based on the optimized same-level bidirectional breadth-first algorithm, the first co-edge neighboring facets corresponding to each of the second-layer child nodes are obtained simultaneously in the order from the leftmost to the middle and from the rightmost to the middle, and the third-layer child nodes of the tree structure are constructed according to all the first co-edge neighboring facets; at the same time, the second co-edge neighboring facets corresponding to each of the third-layer child nodes are obtained in the order from the leftmost to the middle and from the rightmost to the middle, and the fourth-layer child nodes of the tree structure are constructed according to all the second co-edge neighboring facets, ... until the number of nodes in the tree structure reaches the preset number, and the facets corresponding to all the nodes in the tree structure are respectively used as the first sub-facets.

[0064] Specifically, the present invention performs a bidirectional traversal operation on each layer of the attribute structure based on an optimized same-level breadth-first algorithm (FDCA). The purpose of the bidirectional traversal is to obtain the co-edge neighborhood facets corresponding to each node, thereby realizing the expansion and growth (expansion and growth) of the co-edge neighborhood; first, Figure 2 As shown, a bidirectional traversal operation is performed on the second layer of the tree structure, and the co-edge neighboring facets corresponding to the first sub-facet corresponding to each node are obtained simultaneously in the direction from A1 to A2 and in the order from A3 to A1, until the processes of the bidirectional traversal operation meet (or when the bidirectional traversal operation processes the same facet or), it stops, which means that the bidirectional traversal operation has been completed on the second layer of the tree structure (if the same facet is processed, wait for the traversal operation of this facet to be completed), combined with Figure 2 , that is, to obtain the first co-edge neighboring facets corresponding to A1 and A3 at the same time, and then traverse to the middle at the same time to obtain the first co-edge neighboring facets corresponding to A2.

[0065] It should be noted that since the facets in the processed three-dimensional mesh are all triangular facets, when obtaining the co-edge neighbor facets for any child node in the tree structure, the three co-edge neighbor facets obtained must include a facet that is the same as the parent node corresponding to the child node, such as Figure 3 As shown, A's co-edge neighboring faces are A1, A2, and A3, and A1's co-edge neighboring faces are A11, A12, and A. In the tree structure, A is the parent node of A1 (e.g. Figure 2 As shown in the figure, in order to avoid repeatedly obtaining the same face patch, a label is assigned to the face patch each time it is obtained, so as to avoid obtaining duplicate faces in subsequent bidirectional traversal operations. Therefore, for the second-level child nodes A1, A2 and A3 of the tree structure, each second-level child node obtains only two first co-edge neighboring faces (all subsequent bidirectional traversal operations are similar).

[0066] Furthermore, the step of constructing the third-layer child nodes of the tree structure according to all the first co-edge neighboring face patches specifically includes:

[0067] Construct multiple second-layer subtrees based on all the second-layer subnodes, and use each of the second-layer subnodes as the second root node of the second-layer subtree; according to the acquisition order of the first co-edge neighboring patches corresponding to each of the second-layer subnodes, use the first co-edge neighboring patches corresponding to each of the second-layer subnodes from left to right as the third-layer subnodes corresponding to each second root node.

[0068] Specifically, Figure 4 As shown in the figure, after obtaining the two first co-edge neighboring facets corresponding to each second-layer child node (that is, a total of six first co-edge neighboring facets), it is necessary to construct the third layer of the tree structure based on all the first co-edge neighboring facets, so each second-layer child node is used as the second root node of the second-layer subtree. For example, A1, A11 and A12 constitute the second-layer subtree, and A1 is the second root node of the second-layer subtree; then, according to the order of obtaining the first co-edge neighboring facets, from left to right, the third-layer child nodes corresponding to each second root node are used. For example, in the second-layer subtrees A1, A11 and A12, the order of obtaining A11 takes precedence over A12, so A11 is on the left and A12 is on the right, and the same is true for other second-layer subtrees; after all the first co-edge neighboring facets are filled in the tree structure, the construction of the third-layer child nodes of the tree structure is completed. The third-layer child nodes of the tree structure are actually Figure 4 A11, A12, A21, A22, A31 and A32 shown.

[0069] After constructing the third-level child nodes of the tree structure, continue to use FDCA to perform a bidirectional traversal operation on the third-level child nodes, that is, perform a bidirectional traversal from A11 to the right and A32 to the left at the same time. In fact, it is to obtain the second co-edge neighboring patches of A11 and A32 at the same time, obtain the second co-edge neighboring patches of A12 and A31 at the same time, and obtain the second co-edge neighboring patches of A21 and A22 at the same time, and then construct the fourth-level child nodes of the tree structure according to all the second co-edge neighboring patches. The construction logic is the same as the logic of constructing the third-level child nodes mentioned above, and will not be repeated here.

[0070] Repeat the above steps, perform a bidirectional traversal operation on the fourth-layer sub-nodes, obtain the third co-edge neighboring patches, construct the fifth-layer sub-nodes of the tree structure according to the third co-edge neighboring patches, ..., until the number of nodes in the tree structure reaches the preset number Nsm. At this time, the patches corresponding to all nodes in the tree structure are all the first sub-patches in the first sub-grid, thereby completing the update (cutting) of the first sub-grid. The bidirectional traversal operation through FDCA greatly reduces the search space, improves the sub-grid update speed of the three-dimensional grid, and also improves the accuracy of the update processing.

[0071] Step S40: Obtain the updated end face of the first sub-mesh, and update the next adjacent sub-mesh according to the end common edge neighborhood face corresponding to the end face, until all sub-meshes in the three-dimensional mesh are updated.

[0072] Specifically, after completing the update of the first sub-mesh, the end patch of the first sub-mesh will be obtained, and then the corresponding end co-edge neighbor patch will be obtained based on the end patch, wherein the end co-edge neighbor patch represents the co-edge neighbor patch of the end patch, and then this end co-edge neighbor patch is used as the start patch of the next sub-mesh (second sub-mesh) adjacent to the first sub-mesh, and the second sub-mesh is updated until all sub-meshes in the three-dimensional mesh are updated, that is, all triangular patches in the three-dimensional mesh are assigned to the corresponding sub-meshes.

[0073] Furthermore, the obtaining of the end face of the first sub-grid specifically includes:

[0074] Obtain a tree structure corresponding to the first sub-grid; obtain the rightmost node of the bottom layer of the tree structure and use it as the end node; and obtain a corresponding end face from the first sub-grid according to the end node.

[0075] Specifically, Figure 5 As shown, Figure 5 To complete the updated tree structure corresponding to the first sub-mesh, the labels in each node of the bottom layer are only used for display. Get the rightmost node of the bottom layer, such as A32N, and use A32N as the end node of the first sub-mesh. Get the first sub-patch corresponding to A32N in the first sub-mesh, and use this first sub-patch as the end patch of the first sub-mesh.

[0076] Furthermore, the method for repeatedly slicing the three-dimensional grid according to the ending co-edge neighboring facets corresponding to the ending facets also includes:

[0077] Acquire multiple co-edge neighboring patches corresponding to the end patch; perform deduplication operation on the co-edge neighboring patches corresponding to all the end patches, retain the co-edge neighboring patches that are not in the first sub-grid, and obtain an optional co-edge neighboring patch set; if the number of co-edge neighboring patches in the optional co-edge neighboring patch set is one, use the co-edge neighboring patches in the optional co-edge neighboring patch set as the end co-edge neighboring patch; if the number of co-edge neighboring patches in the optional co-edge neighboring patch set is greater than one, select the co-edge neighboring patch with the earliest acquisition order and use it as the end co-edge neighboring patch.

[0078] Specifically, after obtaining the end patch corresponding to the first sub-mesh, multiple co-edge neighbor patches corresponding to the end patch are obtained. At this time, the end patch also has three co-edge neighbor patches, but at least one co-edge neighbor patch is in the first sub-mesh, so it is necessary to deduplicate the co-edge neighbor patches, remove the co-edge neighbor patches in the first sub-mesh, and retain the co-edge neighbor patches in the first sub-mesh to obtain the corresponding optional co-edge neighbor patch set. If the number of remaining co-edge neighbor patches in the optional co-edge neighbor patch set is one, that is, the end patch has only one co-edge neighbor patch that is not in the first sub-mesh, this unique co-edge neighbor patch is used as the end co-edge neighbor patch; if the number of co-edge neighbor patches in the optional co-edge neighbor patch set is greater than one (that is, equal to two), the co-edge neighbor patch with the earliest acquisition order is selected as the end co-edge neighbor patch.

[0079] Further, the method of dicing the three-dimensional mesh according to the ending common edge neighboring facets corresponding to the ending facets is repeated until all the facets in the three-dimensional mesh are allocated to corresponding sub-grids, thereby completing dicing of the three-dimensional mesh, which specifically includes:

[0080] The end common edge neighborhood patch is used as the start patch of the second sub-mesh, and the update of the second sub-mesh is completed according to the same-level bidirectional breadth-first algorithm and the start patch of the second sub-mesh, and the end patch of the second sub-mesh is obtained; the start patch of the third sub-mesh is obtained according to the end patch of the second sub-mesh, and the update of the third sub-mesh is completed according to the same-level bidirectional breadth-first algorithm and the start patch of the third sub-mesh, and the end patch of the third sub-mesh is obtained, ..., until all sub-meshes in the three-dimensional mesh are updated.

[0081] Specifically, the obtained ending common edge neighboring face is used as the starting face of the second sub-mesh, and then the relevant steps from S20 to S30 are repeated to complete the update of the second sub-mesh, and the ending common edge neighboring face corresponding to the ending face of the second sub-mesh is obtained (the specific method is as described above and will not be repeated here), and is used as the starting face of the third sub-mesh, and steps from S20 to S30 are repeated, ..., until the three-dimensional mesh is divided into multiple sub-meshes, and all triangular facets in the three-dimensional mesh are assigned to corresponding sub-meshes, such as Figure 6 As shown, the three-dimensional grid is divided into a plurality of blocks of different colors, wherein each block is actually each sub-grid in the three-dimensional grid.

[0082] It should be emphasized that the number of sub-facets in a sub-grid may not be the preset number Nsm, but this will not affect the operation of the FDCA algorithm proposed in the present invention and the subsequent neural network for processing the three-dimensional grid, because FDCA is essentially a greedy algorithm that strives to reach the preset number under possible conditions. If there is only one undivided area in a three-dimensional grid, and the number of facets in this area does not reach the preset number, FDCA will also process this area and update it as a sub-grid; and the facets in each sub-grid cut by the FDCA algorithm are connected, thereby better retaining the geometric characteristics of the three-dimensional grid.

[0083] Furthermore, if Figure 7 As shown, Figure 7 It represents the application of FDCA in 3D mesh neural network denoising, specifically Figure 7 The data preprocessing on the far left can be performed by cutting the preprocessed three-dimensional grid through the FDCA proposed in the present invention to obtain multiple sub-block three-dimensional grids, and then the neural network performs denoising processing on each sub-block three-dimensional grid respectively, thereby completing the denoising processing of the entire three-dimensional grid and reducing the computational load of the neural network.

[0084] Furthermore, if Figure 8 As shown, based on the above-mentioned sub-grid updating method of the three-dimensional grid model, the present invention also provides a sub-grid updating system of the three-dimensional grid model, wherein the sub-grid updating system of the three-dimensional grid model comprises:

[0085] A starting face acquisition module 51 is used to acquire a three-dimensional grid and randomly select a face from the three-dimensional grid as a starting face of a first sub-grid;

[0086] A tree structure building module 52 is used to obtain all co-edge neighboring face patches of the starting face patch, and build a tree structure according to the starting face patch and all the co-edge neighboring face patches;

[0087] A first sub-grid updating module 53 is configured to perform a bidirectional traversal operation on each layer of the tree structure according to an optimized same-level bidirectional breadth-first algorithm to obtain a preset number of first sub-faces, and update the first sub-grid according to all the first sub-faces;

[0088] The three-dimensional mesh slicing module 54 is used to obtain the end face of the updated first sub-mesh, and update the next adjacent sub-mesh according to the end common edge neighbor face corresponding to the end face, until all sub-meshes in the three-dimensional mesh are updated.

[0089] Furthermore, if Fig. 9As shown, based on the above-mentioned sub-grid updating method and system of the three-dimensional grid model, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Fig. 9 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0090] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a sub-grid update program 40 of a three-dimensional grid model is stored on the memory 20, and the sub-grid update program 40 of the three-dimensional grid model can be executed by the processor 10, thereby realizing the sub-grid update method of the three-dimensional grid model in the present application.

[0091] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing a sub-grid update method of the three-dimensional grid model.

[0092] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0093] In one embodiment, when the processor 10 executes the sub-grid updating program 40 of the three-dimensional grid model in the memory 20, the following steps are implemented:

[0094] Acquire a three-dimensional grid, and randomly select a face from the three-dimensional grid as a starting face of a first sub-grid;

[0095] Acquire all co-edge neighboring face patches of the starting face patch, and construct a tree structure according to the starting face patch and all the co-edge neighboring face patches;

[0096] Performing a bidirectional traversal operation on each layer of the tree structure according to the optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-faces, and updating the first sub-grid according to all the first sub-faces;

[0097] The end face patch of the updated first sub-mesh is obtained, and the next adjacent sub-mesh is updated according to the end common edge neighbor face patch corresponding to the end face patch, until all sub-meshes in the three-dimensional mesh are completely updated.

[0098] The step of acquiring all co-edge neighboring facets of the starting facet and constructing a tree structure according to the starting facet and all the co-edge neighboring facets specifically includes:

[0099] Acquire all co-edge neighboring face patches corresponding to the starting face patch based on the clockwise direction;

[0100] Using the starting face as the starting root node of the tree structure;

[0101] According to the acquisition order of all the co-edge neighboring face patches, all the co-edge neighboring face patches are used from left to right as the second-layer child nodes corresponding to the starting root node in the tree structure to complete the construction of the tree structure.

[0102] The step of performing a bidirectional traversal operation on each layer of the tree structure according to the optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets specifically includes:

[0103] Based on the optimized same-level bidirectional breadth-first algorithm, the first co-edge neighboring face patches corresponding to each of the second-layer child nodes are simultaneously obtained in the order of leftmost to middle and rightmost to middle, and the third-layer child nodes of the tree structure are constructed according to all the first co-edge neighboring face patches;

[0104] At the same time, the second co-edge neighboring patches corresponding to each of the third-layer sub-nodes are obtained in the order from the leftmost to the middle and from the rightmost to the middle, and the fourth-layer sub-nodes of the tree structure are constructed according to all the second co-edge neighboring patches, ... until the number of nodes in the tree structure reaches a preset number, and the patches corresponding to all the nodes in the tree structure are respectively used as the first sub-patches.

[0105] The step of constructing a third-layer child node of a tree structure according to all the first co-edge neighboring face patches specifically includes:

[0106] Construct multiple second-layer subtrees according to all the second-layer child nodes, and use each of the second-layer child nodes as a second root node of the second-layer subtree;

[0107] According to the order of obtaining the first co-edge neighboring facets corresponding to each of the second-layer sub-nodes, the first co-edge neighboring facets corresponding to each of the second-layer sub-nodes are used from left to right as the third-layer sub-nodes corresponding to each second root node.

[0108] The step of obtaining the end face of the first sub-grid specifically includes:

[0109] Obtaining a tree structure corresponding to the first sub-grid;

[0110] Obtain the rightmost node of the bottom layer of the tree structure and use it as the end node;

[0111] Acquire a corresponding end patch from the first sub-grid according to the end node.

[0112] The method of repeating the three-dimensional mesh slicing according to the ending common edge neighboring facets corresponding to the ending facets also includes:

[0113] Obtain a plurality of co-edge neighboring face patches corresponding to the end face patch;

[0114] Deduplication is performed on all the co-edge neighboring facets corresponding to the end facets, and the co-edge neighboring facets that are not in the first sub-grid are retained to obtain a set of optional co-edge neighboring facets;

[0115] If the number of co-edge neighboring face patches in the optional co-edge neighboring face patch set is one, taking the co-edge neighboring face patches in the optional co-edge neighboring face patch set as the ending co-edge neighboring face patch;

[0116] If the number of co-edge neighboring face patches in the optional co-edge neighboring face patch set is greater than one, the co-edge neighboring face patch with the earliest acquisition order is selected and used as the ending co-edge neighboring face patch.

[0117] The method of repeating the three-dimensional mesh dicing method according to the ending co-edge neighboring facets corresponding to the ending facets until all the facets in the three-dimensional mesh are assigned to corresponding sub-grids to complete dicing of the three-dimensional mesh specifically includes:

[0118] Using the ending common edge neighborhood patch as the starting patch of the second sub-mesh, updating the second sub-mesh according to the same-level bidirectional breadth-first algorithm and the starting patch of the second sub-mesh, and obtaining the ending patch of the second sub-mesh;

[0119] The starting face of the third sub-mesh is obtained according to the ending face of the second sub-mesh, the third sub-mesh is updated according to the same-level bidirectional breadth-first algorithm and the starting face of the third sub-mesh, and the ending face of the third sub-mesh is obtained, ... until all sub-meshes in the three-dimensional mesh are updated.

[0120] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a sub-mesh update program for a three-dimensional mesh model, and when the sub-mesh update program for the three-dimensional mesh model is executed by a processor, the steps of the sub-mesh update method for the three-dimensional mesh model as described above are implemented.

[0121] In summary, the present invention provides a sub-grid updating method, system and terminal for a three-dimensional grid model, the method comprising: obtaining a three-dimensional grid, and randomly selecting a facet from the three-dimensional grid as the starting facet of the first sub-grid; obtaining all co-edge neighboring facets of the starting facet, and constructing a tree structure according to the starting facet and all the co-edge neighboring facets; performing a bidirectional traversal operation on each layer of the tree structure according to an optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets, and updating the first sub-grid according to all the first sub-facets; obtaining the ending facet of the updated first sub-grid, and updating the next adjacent sub-grid according to the ending co-edge neighboring facet corresponding to the ending facet, until all sub-grids in the three-dimensional grid are updated. The present invention speeds up the speed of slicing the three-dimensional grid model and improves the efficiency of processing the three-dimensional grid model.

[0122] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0123] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.

[0124] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A sub-grid updating method for a three-dimensional grid model, characterized in that: The sub-grid updating method of the three-dimensional grid model comprises: Acquire a three-dimensional grid, and randomly select a face from the three-dimensional grid as a starting face of a first sub-grid, wherein the three-dimensional grid is a three-dimensional grid model obtained by modeling an object or a human body; Acquiring all co-edge neighboring face patches of the starting face patch, and constructing a tree structure according to the starting face patch and all the co-edge neighboring face patches, specifically including: Acquire all co-edge neighboring face patches corresponding to the starting face patch based on the clockwise direction; Using the starting face as the starting root node of the tree structure; According to the acquisition order of all the co-edge neighboring face patches, all the co-edge neighboring face patches are used from left to right as the second-layer child nodes corresponding to the starting root node in the tree structure to complete the construction of the tree structure; Acquire all co-edge neighboring face patches of the starting face patch, and construct a tree structure according to the starting face patch and all the co-edge neighboring face patches; Performing a bidirectional traversal operation on each layer of the tree structure according to the optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets, and updating the first sub-grid according to all the first sub-facets, wherein the preset number is set according to the requirements and memory size of a three-dimensional network deep learning task performed by a user, and the three-dimensional network deep learning task is modeling based on the object or the human body; Obtaining the end face of the updated first sub-mesh, and updating the next adjacent sub-mesh according to the end common edge neighbor face corresponding to the end face, until all sub-meshes in the three-dimensional mesh are updated, thereby speeding up the updating of the three-dimensional mesh model and improving the efficiency of processing the three-dimensional mesh model; The updated three-dimensional mesh model is used to capture the dependency relationship between the graph node features of the object or the human body.

2. The sub-grid updating method of a three-dimensional grid model according to claim 1, characterized in that: The step of performing a bidirectional traversal operation on each layer of the tree structure according to the optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets specifically includes: Based on the optimized same-level bidirectional breadth-first algorithm, the first co-edge neighboring face patches corresponding to each of the second-layer child nodes are simultaneously obtained in the order of leftmost to middle and rightmost to middle, and the third-layer child nodes of the tree structure are constructed according to all the first co-edge neighboring face patches; At the same time, the second co-edge neighboring patches corresponding to each of the third-layer sub-nodes are obtained in the order from the leftmost to the middle and from the rightmost to the middle, and the fourth-layer sub-nodes of the tree structure are constructed according to all the second co-edge neighboring patches, ... until the number of nodes in the tree structure reaches a preset number, and the patches corresponding to all the nodes in the tree structure are respectively used as the first sub-patches.

3. The sub-grid updating method of a three-dimensional grid model according to claim 2, characterized in that: The step of constructing the third-layer child nodes of the tree structure according to all the first co-edge neighboring face patches specifically includes: Construct multiple second-layer subtrees according to all the second-layer child nodes, and use each of the second-layer child nodes as a second root node of the second-layer subtree; According to the order of obtaining the first co-edge neighboring facets corresponding to each of the second-layer sub-nodes, the first co-edge neighboring facets corresponding to each of the second-layer sub-nodes are used from left to right as the third-layer sub-nodes corresponding to each second root node.

4. The sub-grid updating method of a three-dimensional grid model according to claim 2, characterized in that: The obtaining of the end face of the first sub-grid specifically includes: Obtaining a tree structure corresponding to the first sub-grid; Obtain the rightmost node of the bottom layer of the tree structure and use it as the end node; Acquire a corresponding end patch from the first sub-grid according to the end node.

5. The sub-grid updating method of a three-dimensional grid model according to claim 4, characterized in that: The method for repeatedly slicing the three-dimensional grid according to the ending co-edge neighboring facets corresponding to the ending facets also includes: Obtain a plurality of co-edge neighboring face patches corresponding to the end face patch; Deduplication is performed on all the co-edge neighboring facets corresponding to the end facets, and the co-edge neighboring facets that are not in the first sub-grid are retained to obtain a set of optional co-edge neighboring facets; If the number of co-edge neighboring face patches in the optional co-edge neighboring face patch set is one, taking the co-edge neighboring face patch in the optional co-edge neighboring face patch set as the ending co-edge neighboring face patch; If the number of co-edge neighboring face patches in the optional co-edge neighboring face patch set is greater than one, the co-edge neighboring face patch with the earliest acquisition order is selected and used as the ending co-edge neighboring face patch.

6. The sub-grid updating method of a three-dimensional grid model according to claim 1, characterized in that: The method of repeating the three-dimensional mesh dicing according to the ending co-edge neighboring facets corresponding to the ending facets until all the facets in the three-dimensional mesh are allocated to corresponding sub-grids, and the dicing of the three-dimensional mesh is completed, specifically includes: Using the ending common edge neighborhood patch as the starting patch of the second sub-mesh, updating the second sub-mesh according to the same-level bidirectional breadth-first algorithm and the starting patch of the second sub-mesh, and obtaining the ending patch of the second sub-mesh; The starting face of the third sub-mesh is obtained according to the ending face of the second sub-mesh, the third sub-mesh is updated according to the same-level bidirectional breadth-first algorithm and the starting face of the third sub-mesh, and the ending face of the third sub-mesh is obtained, ... until all sub-meshes in the three-dimensional mesh are updated.

7. A sub-grid updating system for a three-dimensional grid model, characterized in that: The subgrid updating system of the three-dimensional grid model comprises: A starting face acquisition module, used to acquire a three-dimensional grid and randomly select a face from the three-dimensional grid as a starting face of a first sub-grid, wherein the three-dimensional grid is a three-dimensional grid model obtained by modeling an object or a human body; Acquiring all co-edge neighboring face patches of the starting face patch, and constructing a tree structure according to the starting face patch and all the co-edge neighboring face patches, specifically including: Acquire all co-edge neighboring face patches corresponding to the starting face patch based on the clockwise direction; Using the starting face as the starting root node of the tree structure; According to the acquisition order of all the co-edge neighboring face patches, all the co-edge neighboring face patches are used from left to right as the second-layer child nodes corresponding to the starting root node in the tree structure to complete the construction of the tree structure; A tree structure building module, used for acquiring all co-edge neighboring face patches of the starting face patch, and building a tree structure according to the starting face patch and all the co-edge neighboring face patches; A first sub-grid updating module, configured to perform a bidirectional traversal operation on each layer of the tree structure according to an optimized bidirectional breadth-first algorithm of the same level to obtain a preset number of first sub-facets, and update the first sub-grid according to all the first sub-facets, wherein the preset number is set according to the requirements and memory size of a three-dimensional network deep learning task performed by a user, and the three-dimensional network deep learning task is modeling based on the object or the human body; A three-dimensional mesh slicing module is used to obtain the end face of the updated first sub-mesh, and update the next adjacent sub-mesh according to the end common edge neighbor face corresponding to the end face, until all sub-meshes in the three-dimensional mesh are updated, thereby speeding up the update of the three-dimensional mesh model and improving the efficiency of processing the three-dimensional mesh model; The updated three-dimensional mesh model is used to capture the dependency relationship between the graph node features of the object or the human body.

8. A terminal, characterized in that: The terminal includes: a memory, a processor, and a sub-grid update program of a three-dimensional mesh model stored in the memory and executable on the processor. When the sub-grid update program of the three-dimensional mesh model is executed by the processor, the steps of the sub-grid update method of the three-dimensional mesh model as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a sub-grid update program for a three-dimensional mesh model, and when the sub-grid update program for a three-dimensional mesh model is executed by a processor, the steps of the sub-grid update method for a three-dimensional mesh model as described in any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Animation compression method based on local cylinder coordinates

    CN107093197A

  • Grid deformation optimization method for cutting simulation of deformable object in virtual surgery

    CN108537797A