Grid encryption method based on grid topological connection

Through the method based on grid topological connection, grid cells are quickly encrypted, which solves the problem of low grid encryption efficiency in the existing technology, and achieves efficient calculation and accuracy improvement in engineering simulation.

CN119203846AInactive Publication Date: 2024-12-27NANJING TIANFU SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411676460.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, grid encryption technology is difficult to quickly and effectively encrypt grid cells in engineering simulation, resulting in waste of computing resources and reduced resolution accuracy, especially in the analysis of complex geometric shapes and flow phenomena.

Method used

Adopt the grid encryption method based on mesh topology connection, and realize the grid's topology connection structure by constructing the grid topology connection structure, initializing the encryption level, adding newly generated grid nodes and faces, dividing grid cells and faces, updating topology connection relationships, and realizing the grid's Fast encryption.

Benefits of technology

It realizes fast encryption based on the original grid, saves computing resources, and is suitable for grid units of various shapes, improving the application range and accuracy of adaptive encryption technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203846A_ABST
    Figure CN119203846A_ABST
Patent Text Reader

Abstract

The invention relates to the field of grid encryption in computational fluid mechanics simulation, and provides a grid topological connection-based grid encryption method, which comprises the following steps of: constructing a grid topological connection structure based on grid node coordinates and a grid topological connection relationship; initializing encryption levels respectively corresponding to each grid unit and each surface, each edge and each node; expanding the initial to-be-encrypted grid unit to obtain a target to-be-encrypted grid unit, and enabling the encryption grade difference between the target to-be-encrypted grid unit and the adjacent grid unit to be not greater than a preset grade threshold value; newly generated nodes are added, and encryption levels of the newly generated nodes are initialized; determining an anchor point according to the topological connection relationship between the target to-be-encrypted grid unit and each node and the corresponding encryption level, and adding a newly generated grid unit according to the anchor point; and according to the topological connection relationship between the target to-be-encrypted grid unit and each surface, each node and each edge and the corresponding encryption level, adding a newly generated grid surface. According to the invention, rapid encryption can be realized, and computing resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of mesh encryption in computational fluid dynamics simulation, and in particular to a mesh encryption method based on mesh topology connection, which can be applied to various engineering simulation application scenarios such as external aerodynamic simulation, engine internal flow simulation, etc. in the automotive, aviation, aerospace and other industries. Background Art

[0002] With the rapid improvement of computer performance and the continuous development of numerical calculation methods, computational fluid dynamics (CFD) has been widely used in flow field analysis and design optimization in various engineering simulation application scenarios, such as automobile external aerodynamic simulation, aircraft lift and drag simulation, engine internal flow simulation, etc. The popularization of this technology has greatly reduced the analysis difficulty and design cost of fluid mechanics problems in related application scenarios, and provided strong support for solving fluid mechanics problems in engineering practice.

[0003] The traditional CFD simulation method is based on the control equation of the flow, which discretizes the flow field solution domain in space, and uses the space-time numerical format to convert the continuous partial differential equation into algebraic equations of discrete points for solution. In the process of discretization of differential equations, the finite volume method is often used, and the solution area needs to be discretized into a series of control volumes through the grid generation tool. Therefore, the quality of grid generation and the number of grids are directly related to the solution accuracy of CFD. An excellent set of grids requires the simulator to have a relatively in-depth understanding of the simulation problem, so that in the process of grid division, local encryption can be performed on important watersheds. In the absence of relevant experience, blindly encrypting the grid is a waste of limited computing resources. However, if the grid is not encrypted, the sparse grid will not only reduce the accuracy of the solution, but also cause some flow phenomena to be indistinguishable.

[0004] At present, the more efficient way to encrypt meshes is to use adaptive encryption technology: in the CFD simulation process, by analyzing the simulation results, the mesh in the calculation process is dynamically adjusted to achieve the effect of automatic encryption, thereby making full use of computing resources. The core of adaptive encryption technology lies in the mesh encryption algorithm, that is, given the information of the mesh unit to be encrypted, the target mesh unit is quickly divided to generate a new mesh. The mesh encryption algorithm will directly affect the application scope of adaptive encryption technology. Therefore, how to expand the application scope of adaptive encryption technology and realize the rapid encryption of mesh units has become a problem to be solved in the field of engineering simulation. Summary of the invention

[0005] The present disclosure aims to solve at least one of the problems existing in the prior art and provide a grid encryption method based on grid topology connection.

[0006] In one aspect of the present disclosure, a mesh encryption method based on mesh topology connection is provided, which is applied to engineering simulation application scenarios; the mesh encryption method comprises: Based on the grid node coordinates and the grid topological connection relationship, a corresponding grid topological connection structure is constructed; Initializing the encryption level corresponding to each grid unit and each grid face, each grid edge, and each grid node in the grid topological connection structure; Expanding the initial grid unit to be encrypted to obtain a target grid unit to be encrypted, so that the encryption level difference between the target grid unit to be encrypted and its adjacent grid units is not greater than a preset level threshold; Adding a newly generated grid node to the grid topology connection structure and initializing its corresponding encryption level; Determine an anchor point on the target mesh unit to be encrypted according to the topological connection relationship between the target mesh unit to be encrypted and each mesh node and the corresponding encryption level, and add a newly generated mesh unit to the mesh topological connection structure according to the anchor point; According to the topological connection relationship between the target mesh unit to be encrypted and each mesh surface, each mesh node, each mesh edge and their corresponding encryption levels, a newly generated mesh surface is added to the mesh topological connection structure.

[0007] Optionally, initializing the encryption level corresponding to each grid unit and each grid surface, each grid edge, and each grid node in the grid topological connection structure includes: Initializing the encryption levels corresponding to each of the grid units and each of the grid nodes to a first level value; Initialize the encryption level of each grid surface to the larger encryption level value of the two adjacent grid cells where it is located; The encryption level of each mesh edge is initialized to the larger encryption level of the two mesh nodes involved.

[0008] Optionally, the initial grid unit to be encrypted is expanded to obtain a target grid unit to be encrypted, so that the encryption level difference between the target grid unit to be encrypted and its adjacent grid units is not greater than a preset level threshold, including: Traverse each of the initial grid cells to be encrypted, take each of the initial grid cells to be encrypted as the current cell in turn, obtain the adjacent grid cells of the current cell, if the encryption level difference between the adjacent grid cell and the current cell is greater than the preset level threshold, then mark the adjacent grid cell as the new initial grid cell to be encrypted, repeat the above process until no new initial grid cells to be encrypted are generated, and take each of the initial grid cells to be encrypted at this time as the target grid cells to be encrypted.

[0009] Optionally, adding a newly generated mesh node to the mesh topology connection structure and initializing its corresponding encryption level includes: The center of the target grid cell to be encrypted is used as a newly generated grid node, and the newly generated grid node is added to the target grid cell to be encrypted, and the encryption level of the newly generated grid node is initialized to be one level higher than the encryption level of the target grid cell to be encrypted; Traversing all mesh surfaces of the target mesh unit to be encrypted, if the encryption level of a mesh surface is not greater than the encryption level of the target mesh unit to be encrypted where it is located, taking the center of the mesh surface as a newly generated mesh node, and adding it to the target mesh unit to be encrypted where it is located, and initializing the encryption level of the newly generated mesh node to be one level higher than the encryption level of the mesh surface where it is located; All mesh edges of the target mesh unit to be encrypted are traversed. If the encryption level of a certain mesh edge is not greater than the encryption level of the target mesh unit to be encrypted, the midpoint of the mesh edge is used as a newly generated mesh node and added to the target mesh unit to be encrypted. The encryption level of the newly generated mesh node is initialized to be one level higher than the encryption level of the mesh edge.

[0010] Optionally, according to the topological connection relationship between the target mesh unit to be encrypted and each mesh node and the corresponding encryption level, an anchor point on the target mesh unit to be encrypted is determined, and according to the anchor point, a newly generated mesh unit is added to the mesh topological connection structure, including: Traversing all grid nodes of the target grid unit to be encrypted, and taking a grid node whose encryption level is less than or equal to the encryption level of the target grid unit to be encrypted as an anchor point; The target grid unit to be encrypted is encrypted according to the anchor points to generate new grid units, so that each anchor point corresponds to a new grid unit.

[0011] Optionally, according to the topological connection relationship between the target mesh unit to be encrypted and each mesh surface, each mesh node, each mesh edge and their corresponding encryption levels, adding a newly generated mesh surface to the mesh topological connection structure includes: Classify and mark the mesh faces of the target mesh unit to be encrypted to obtain Class I faces and Class II faces; wherein the Class I faces include mesh faces to be segmented, and the Class II faces include mesh faces to be segmented, mesh faces with changed mesh nodes, and mesh faces with changed adjacent mesh units; Based on the type I surface and the type II surface, the grid surface on the target grid unit to be encrypted is segmented, the grid surface of the grid node that has changed and the grid surface of the adjacent grid unit that has changed are updated, and the newly generated grid surface is added to the inside of the target grid unit to be encrypted.

[0012] Optionally, the mesh faces of the target mesh unit to be encrypted are classified and marked to obtain Class I faces and Class II faces, including: Traversing all mesh surfaces of the target mesh unit to be encrypted, and marking them as the type II surfaces; Traversing all mesh surfaces of the target mesh unit to be encrypted, if the encryption level of a certain mesh surface is not greater than the encryption level of the target mesh unit to be encrypted where it is located, marking the mesh surface as the Class I surface; All mesh edges on each mesh surface marked as the type I surface are traversed respectively, and the adjacent mesh surfaces where each mesh edge is located are marked as the type II surface.

[0013] Optionally, segmenting the mesh surface on the target mesh unit to be encrypted based on the type I surface and the type II surface includes: Taking each mesh surface in the type I surface as the current mesh surface in turn, traversing the mesh nodes on the current mesh surface, and taking the mesh nodes whose encryption level is not higher than the encryption level of the current mesh surface as anchor points; Select an anchor point on the current mesh surface as the starting anchor point and add the starting anchor point to the sub-mesh surface; Start the search from the starting anchor point, and search for the next grid node along the grid nodes on the current grid surface in sequence. If the found grid node belongs to the anchor point, add the midpoint of the grid edge corresponding to the found grid node and the starting anchor point to the sub-grid surface, and end the search; if the found grid node does not belong to the anchor point, add the found grid node to the sub-grid surface, and repeat the search for the next grid node along the grid nodes on the current grid surface in sequence, and add the corresponding grid node to the sub-grid surface until a grid node with an encryption level one level higher than the encryption level of the current grid surface is found, and add the grid node to the sub-grid surface, and end the current sub-grid surface point search process; Add the center of the current mesh face to the sub-mesh face; Starting from the starting anchor point, search in reverse order along the grid nodes on the current grid surface to find the next grid node. If the found grid node belongs to the anchor point, the search ends; if the found grid node does not belong to the anchor point, search for the next grid node in reverse order along the grid nodes on the current grid surface repeatedly until a grid node with an encryption level one level higher than the encryption level of the current grid surface is found; starting from the found anchor point or the grid node with an encryption level one level higher than the encryption level of the current grid surface, traverse each grid node in order along the grid nodes on the current grid surface, and add the traversed grid nodes and the corresponding midpoints of the newly generated grid edges to the sub-grid surface in turn until returning to the starting anchor point; After the sub-grid surface is constructed, two adjacent grid cells corresponding to the sub-grid surface are searched in the current grid cell and the adjacent grid cells corresponding to the current grid surface through the anchor point corresponding to the sub-grid surface; After the sub-mesh surfaces corresponding to all anchor points on the current mesh surface are divided, the current mesh surface is removed from the type I surface and the type II surface.

[0014] Optionally, updating the changed mesh surface of the mesh node and the changed mesh surface of the adjacent mesh unit where the mesh node is located includes: According to the marked mesh edges to be segmented, through the topological connection relationship between the mesh edges and the mesh faces, traverse the mesh faces in which the number of mesh nodes in the type II faces changes; For each mesh surface with a changed number of mesh nodes, traverse each mesh node in the order of the mesh nodes on it, add the current mesh node to the temporary surface, and query whether the mesh edge formed by the current mesh node and its next mesh node is split: if so, add the midpoint of the mesh edge to the temporary surface; if not, continue to traverse the mesh nodes until all mesh nodes on the mesh surface are traversed; at this time, the temporary surface is constructed, and the original mesh surface is replaced by the temporary surface, and the mesh surface is removed from the Class II surface; For the remaining grid surfaces marked as the Class II surfaces, all grid nodes on the grid surface are traversed to find the grid node with the smallest encryption level on the grid surface. The two adjacent grid cells where the grid node is located are obtained through the grid surface where the grid node is located. The sub-grid cell corresponding to the grid node with the smallest encryption level is searched in the two adjacent grid cells. If the two adjacent grid cells are not encrypted, they themselves are used as the searched sub-grid cells.

[0015] Optionally, adding a newly generated mesh surface to the target mesh unit to be encrypted includes: Traverse the mesh surface on the target mesh unit to be encrypted and determine the midpoint of the equivalent surface on the mesh surface: count the number of anchor points on the mesh surface. If a mesh surface has only one anchor point, start from the anchor point on the mesh surface and search forward along the node sequence on the mesh surface. The next mesh node with an encryption level one level higher than the current mesh unit is used as the midpoint of the equivalent surface. If the number of anchor points on a mesh surface is greater than 1, the center of the mesh surface is used as the midpoint of the equivalent surface. After determining the equivalent surface midpoint of the current mesh surface, traverse the anchor points on the current mesh surface, and search forward along the node sequence on the mesh surface through the current anchor point. If the next mesh node found belongs to the anchor point, the midpoint of the mesh edge formed by the current anchor point and the searched mesh node is used as the equivalent edge midpoint, and the equivalent edge midpoint is associated with the current anchor point and the current equivalent surface midpoint; if the next mesh node found does not belong to the anchor point, continue to search forward along the node sequence on the mesh surface through the current anchor point, and use the first mesh node found whose encryption level is one level higher than the encryption level of the current mesh unit as the equivalent edge midpoint, and associate the equivalent edge midpoint with the current anchor point and the current equivalent surface midpoint. The current anchor point is used to search backward along the node sequence of the mesh surface. If the next mesh node found belongs to the anchor point, the midpoint of the mesh edge formed by the current anchor point and the found mesh node is used as the midpoint of the equivalent edge, and the midpoint of the equivalent edge is associated with the current anchor point and the current midpoint of the equivalent surface. If the next mesh node found does not belong to the anchor point, the current anchor point is used to search backward along the node sequence of the mesh surface, and the first mesh node found whose encryption level is one level higher than the encryption level of the current mesh unit is used as the midpoint of the equivalent edge, and the midpoint of the equivalent edge is associated with the current anchor point and the current midpoint of the equivalent surface. When all mesh surfaces of the target mesh cell to be encrypted are traversed, the internal surface is constructed by connecting the center of the target mesh cell to be encrypted, the midpoint of the equivalent edge and the midpoint of the associated equivalent surface; the corresponding encrypted sub-mesh cell is searched in the target mesh cell to be encrypted through the two associated anchor points to determine the two adjacent mesh cells where the internal surface is located.

[0016] The grid encryption method based on grid topology connection provided by the present disclosure has the following beneficial effects compared with the prior art: 1. Combining the grid topology connection relationship information and grid encryption characteristics, using the original connection relationship of the grid, the grid encryption in the engineering simulation application scenario is converted into segmentation of specified grid units, and further converted into updated topology connection relationships, avoiding the re-division of the new grid, realizing rapid encryption based on the original grid, and saving computing resources.

[0017] 2. The mesh encryption process is only related to the topological connection relationship of the mesh, blurring the mesh unit type. It can be applied to engineering simulation application scenarios, especially mesh units of various shapes in fluid simulation processes, including tetrahedrons, pyramids, triangular prisms, hexahedrons and polyhedrons, etc., providing strong support for mesh encryption in the adaptive process, making it applicable to various types of meshes such as polyhedral meshes, hybrid meshes containing boundary layers, etc., enhancing the potential of adaptive encryption technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0019] Figure 1 A flowchart of a grid encryption method based on grid topology connection provided by an embodiment of the present disclosure; Figure 2 A flowchart of a grid encryption method based on grid topology connection provided by another embodiment of the present disclosure; Figure 3 A schematic diagram of encryption levels of typical grid units to be encrypted and their grid nodes provided in another embodiment of the present disclosure; Figure 4 A schematic diagram of the encryption level of a mesh surface provided by another embodiment of the present disclosure; Figure 5 A schematic diagram of mesh edge encryption levels provided for another embodiment of the present disclosure; Figure 6 A schematic diagram of adding a grid unit center provided in another embodiment of the present disclosure; Figure 7 A schematic diagram of adding a mesh surface center provided in another embodiment of the present disclosure; Figure 8 A schematic diagram of adding a midpoint of a grid edge provided in another embodiment of the present disclosure; Fig. 9 A schematic diagram of dividing a grid unit to generate a sub-grid unit provided by another embodiment of the present disclosure; Fig.10 One of the schematic diagrams of the process of splitting a mesh surface to generate a sub-mesh surface provided by another embodiment of the present disclosure; Fig.11 A second schematic diagram of a process of splitting a mesh surface to generate a sub-mesh surface provided by another embodiment of the present disclosure; Fig.12 A schematic diagram of the result of splitting a mesh surface to generate sub-mesh surfaces provided by another embodiment of the present disclosure; Fig.13 A schematic diagram of updating a mesh surface with a changed number of mesh nodes provided by another embodiment of the present disclosure; Fig.14 A schematic diagram of a grid surface with changes in adjacent cells of an updated grid provided by another embodiment of the present disclosure; Fig.15 A schematic diagram of adding an internal mesh surface provided in another embodiment of the present disclosure; Fig.16A schematic diagram of an application of mesh encryption based on a simulation analysis of an intake manifold of an automobile engine provided in another embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In engineering practice, some actual fluid mechanics problems usually involve more complex geometric shapes. In order to obtain more accurate results, it is necessary to use more grids and smaller grid units in relevant simulation application scenarios to capture complex shapes and key flow areas as much as possible. In the absence of experience, technicians often perform grid division by global encryption, which will cause a waste of computing resources. At present, the commonly used solution is to encrypt the grid according to the calculation results through adaptive encryption technology. The more critical part of adaptive encryption technology is the grid encryption method, which will directly affect the scope of use of adaptive encryption technology. Therefore, the present disclosure proposes a grid encryption method based on grid topology connection to expand the application scope of adaptive encryption technology and save computing resources.

[0021] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. However, it can be understood by those skilled in the art that in each embodiment of the present disclosure, many technical details are proposed in order to enable readers to better understand the present disclosure. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed for protection in the present disclosure can also be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present disclosure. The various embodiments can be combined and referenced with each other without contradiction.

[0022] One embodiment of the present disclosure relates to a grid encryption method based on grid topology connection, which is applied to various engineering simulation application scenarios such as automobile external aerodynamic simulation, aircraft lift and drag simulation, and engine internal flow simulation. The process is as follows: Figure 1 As shown, including: Step S110: constructing a corresponding mesh topology connection structure based on the mesh node coordinates and the mesh topology connection relationship.

[0023] Specifically, combined with Figure 2, step S110 is mainly used to read the grid and construct the topological relationship. Step S110 can obtain the coordinates of each grid node related to the grid to be encrypted and the grid topological connection relationship by reading the grid file storing the grid node coordinates and the grid topological connection relationship, and construct the corresponding grid topological connection structure according to the obtained coordinates of each grid node related to the grid to be encrypted and the grid topological connection relationship. Among them, the grid topological connection relationship includes the connection relationship between the grid unit and the grid node, the connection relationship between the grid unit and the grid surface, the connection relationship between the grid surface and the grid node, the connection relationship between the grid surface and the grid edge, the connection relationship between the grid edge and the grid node, etc.

[0024] Step S120 , initializing the encryption level corresponding to each grid unit and each grid face, each grid edge, and each grid node in the grid topological connection structure.

[0025] Specifically, combined with Figure 2 Step S120 is mainly used to initialize the encryption level of each grid unit and grid node. Step S120 can first initialize the encryption level of each grid unit and each grid node, and then derive the encryption level of each grid surface and each grid edge according to the encryption level of each grid unit and each grid node.

[0026] Step S130, expanding the initial grid unit to be encrypted to obtain a target grid unit to be encrypted, so that the encryption level difference between the target grid unit to be encrypted and its adjacent grid units is not greater than a preset level threshold.

[0027] Specifically, the preset level threshold can be set according to actual needs. For example, the preset level threshold can be set to 1. At this time, step S130 can be expanded by obtaining adjacent cells of each initial grid cell to be encrypted, so that the encryption level difference between the target grid cell to be encrypted and its adjacent grid cell is not greater than 1, that is, the encryption level difference does not exceed 1 level.

[0028] Step S140: adding a newly generated mesh node to the mesh topology connection structure and initializing its corresponding encryption level.

[0029] Specifically, combined with Figure 2 Step S140 is mainly used to add newly generated mesh nodes. The newly generated mesh nodes may include the center of the target mesh unit to be encrypted, the center of each mesh surface on the target mesh unit to be encrypted, and the midpoint of each mesh edge on the target mesh unit to be encrypted.

[0030] Step S150, determining the anchor point on the target mesh unit to be encrypted according to the topological connection relationship between the target mesh unit to be encrypted and each mesh node and their corresponding encryption level, and adding the newly generated mesh unit to the mesh topological connection structure according to the anchor point.

[0031] Specifically, combined with Figure 2 , step S150 is mainly used to split the grid unit to generate sub-grid units. An anchor point refers to a grid node whose encryption level is less than or equal to the encryption level of the grid unit where it is located. In the process of grid unit segmentation, the number of sub-grid units obtained by segmenting a target grid unit to be encrypted is the same as the number of anchor points on the target grid unit to be encrypted. The sub-grid units obtained by segmenting each target grid unit to be encrypted according to the anchor point are newly generated grid units added to the grid topology connection structure according to the anchor point.

[0032] Step S160, adding a newly generated mesh surface to the mesh topological connection structure according to the topological connection relationship between the target mesh unit to be encrypted and each mesh surface, each mesh node, each mesh edge and their corresponding encryption levels.

[0033] Specifically, combined with Figure 2 , step S160 is mainly used to split the mesh surface to generate sub-mesh surfaces, update the mesh surfaces of the changed mesh nodes, update the mesh surfaces of the changed adjacent units such as the left and right units, and add the newly generated mesh surfaces inside the mesh units. Among them, step S160 can first classify and mark the mesh surfaces to be split as affected mesh surfaces, and then split, update, and add the corresponding mesh surfaces according to the results of the classification and marking. It should be noted that the process of classifying and marking the affected mesh surfaces can be after the mesh units are split to generate sub-mesh units in step S150, or before the mesh units are split to generate sub-mesh units in step S150. Figure 2 An example is given only of the process of classifying and marking the affected mesh faces before splitting the mesh cells to generate sub-mesh cells.

[0034] When adding a newly generated mesh surface to the network topology connection structure, step S160 can first determine the mesh surface to be encrypted on the target mesh unit to be encrypted according to the encryption level of the target mesh unit to be encrypted and its adjacent mesh units, then determine the anchor points on the mesh surface to be encrypted according to the encryption level of the mesh nodes on the mesh surface to be encrypted, divide the mesh surface to be encrypted according to the anchor points on the mesh surface to be encrypted, generate sub-mesh surfaces of the mesh surface to be encrypted, then update the mesh surfaces with changed mesh nodes and the mesh surfaces with changed adjacent units such as left and right units, and add the newly generated mesh surface inside the corresponding mesh unit. In the mesh surface segmentation process, the number of sub-mesh surfaces obtained by dividing a mesh surface is the same as the number of anchor points on the mesh surface.

[0035] Exemplarily, step S120 includes: initializing the encryption level corresponding to each grid unit and each grid node to a first level value; initializing the encryption level of each grid surface to the larger encryption level value of its two adjacent grid cells; initializing the encryption level of each grid edge to the larger encryption level value of its two involved grid nodes.

[0036] Specifically, the first level value can be set to 0. At this time, for the initially encrypted grid unit, i.e., the target grid unit to be encrypted, its encryption level and the encryption level of each grid node in the target grid unit to be encrypted can be initialized to 0. On this basis, the encryption levels of the corresponding grid faces and grid edges can also be derived.

[0037] For example, Figure 3 A typical mesh unit with an encryption level of 0 is shown, and the encryption level of each mesh node is given by a red number. In the previous round of mesh encryption, this mesh unit was not encrypted, but the mesh unit adjacent to the right of this mesh unit was encrypted, which resulted in the appearance of mesh surfaces and mesh nodes with higher encryption levels on the right side of this mesh unit.

[0038] The encryption level of the grid surface is the larger value of the encryption levels of the two adjacent grid cells, such as the left and right cells. Figure 4 exist Figure 3 Based on the encryption level of the grid cell and its adjacent grid cells, the encryption level of each grid surface on the grid cell is derived. The red numbers represent the encryption level of the corresponding grid surface, and the black numbers represent the encryption level of the corresponding grid node. Figure 4 It can be seen that the grid surface on the right side of the grid unit shown includes 4 grid surfaces with an encryption level of level 1.

[0039] The encryption level of a mesh edge is the larger one among the two mesh nodes above it. Figure 5 exist Figure 3 Based on the encryption level of each mesh node, the encryption level of each mesh edge is derived. The black numbers represent the encryption level of the corresponding mesh surface and mesh node, and the red numbers represent the encryption level of the corresponding mesh edge.

[0040] This embodiment initializes the corresponding encryption level for each grid unit, grid node, grid surface, and grid edge, so that the grid encryption process in the engineering simulation application scenario can be performed based on the corresponding topological connection relationship and encryption level without obtaining the type of relevant grid units, and can be further applied to grid units of various shapes.

[0041] Exemplarily, step S130 includes: traversing each initial grid cell to be encrypted, taking each initial grid cell to be encrypted as the current cell in turn, obtaining the adjacent grid cell of the current cell, and if the encryption level difference between the adjacent grid cell and the current cell is greater than a preset level threshold, marking the adjacent grid cell as a new initial grid cell to be encrypted, repeating the above process until no new initial grid cells to be encrypted are generated, and taking each initial grid cell to be encrypted at this time as each target grid cell to be encrypted.

[0042] Specifically, when the preset level threshold is 1, step S130 can ensure that the encryption level difference between each target mesh unit to be encrypted and its adjacent mesh unit is not greater than 1 through the above steps, so as to ensure the security of mesh information and the stability of the system.

[0043] Exemplarily, step S140 includes: taking the center of the target grid cell to be encrypted as a newly generated grid node, adding it to the target grid cell to be encrypted, and initializing the encryption level of the newly generated grid node to be one level higher than the encryption level of the target grid cell to be encrypted; traversing all grid surfaces of the target grid cell to be encrypted, if the encryption level of a certain grid surface is not greater than the encryption level of the target grid cell to be encrypted, taking the center of the grid surface as a newly generated grid node, adding it to the target grid cell to be encrypted, and initializing the encryption level of the newly generated grid node to be one level higher than the encryption level of the grid surface; traversing all grid edges of the target grid cell to be encrypted, if the encryption level of a certain grid edge is not greater than the encryption level of the target grid cell to be encrypted, taking the midpoint of the grid edge as a newly generated grid node, adding it to the target grid cell to be encrypted, and initializing the encryption level of the newly generated grid node to be one level higher than the encryption level of the grid edge.

[0044] For example, Figure 6 , Figure 7 , Figure 8 The following diagrams show the process of generating different types of new mesh nodes during mesh encryption. Figure 6 The grid cell centers that are newly generated grid nodes are shown by red dots. Figure 7 The red dots show the centers of the mesh faces that are newly generated mesh nodes, and the black dots show the centers of the mesh cells. Figure 8 The red dots show the midpoints of each mesh edge as the newly generated mesh nodes, and the black dots show the centers of the mesh cells and the centers of each mesh face. Figure 5 It can be seen that since the encryption level of the illustrated grid unit is 0, the center of the grid surface with an encryption level of 1 and the midpoint of the grid edge with an encryption level of 1 are not added to the grid unit as newly generated grid nodes.

[0045] Exemplarily, step S150 includes: traversing all grid nodes of the target grid unit to be encrypted, and taking the grid nodes whose encryption level is less than or equal to the encryption level of the target grid unit to be encrypted as anchor points; encrypting the target grid unit to be encrypted according to the anchor points, generating new grid units, so that each anchor point corresponds to a new grid unit.

[0046] For example, Fig. 9 The process of splitting a grid unit to generate a sub-unit is shown, that is, the process of generating a new grid unit based on the target grid to be encrypted. Fig. 9 The red dots in the figure represent anchor points, and the spheres correspond to the subgrid units, i.e., the areas where the newly generated grid units are located. Since the subgrid units have not yet established a connection with the grid surface or the grid sub-surfaces obtained by segmenting the grid surface, the specific shape of the subgrid units cannot be described at this time.

[0047] When splitting a grid cell to generate a sub-cell, we first need to search for the anchor point. Fig. 9 ,when Fig. 9 When the encryption level of the grid unit is 0, it can be seen that the encryption level of each anchor point is 0. It should be noted that the encryption level of the anchor point does not have to be equal to the encryption level of the grid unit where it is located, but the encryption level of the anchor point must be less than or equal to the encryption level of the grid unit where it is located. Fig. 9 The anchor points shown can divide the grid unit in the figure into 8 sub-grid units. Since the sub-grid unit has not yet established a connection relationship with the relevant grid surface or sub-grid surface, the 8 sub-grid units obtained by segmentation are still virtual sub-grid units at this time. The corresponding connection relationship will be completed in the subsequent operation process involving the grid surface.

[0048] Exemplarily, step S160 includes: classifying and marking the mesh surfaces of the target mesh unit to be encrypted to obtain Class I surfaces and Class II surfaces; wherein Class I surfaces include mesh surfaces to be segmented, and Class II surfaces include mesh surfaces to be segmented, mesh surfaces whose mesh nodes have changed, and mesh surfaces whose adjacent mesh units have changed; based on Class I surfaces and Class II surfaces, segmenting the mesh surfaces on the target mesh unit to be encrypted, updating the mesh surfaces whose mesh nodes have changed and the mesh surfaces whose adjacent mesh units have changed, and adding the newly generated mesh surfaces to the inside of the target mesh unit to be encrypted.

[0049] Specifically, the mesh surface to be segmented refers to the mesh surface that needs to be split into a series of sub-mesh surfaces. Class II surfaces include all affected mesh surfaces, including mesh surfaces to be segmented, mesh surfaces with changed mesh nodes, and mesh surfaces with changed adjacent mesh units.

[0050] Exemplarily, the mesh faces of the target mesh unit to be encrypted are classified and marked to obtain Class I faces and Class II faces, including: traversing all mesh faces of the target mesh unit to be encrypted and marking them as Class II faces; traversing all mesh faces of the target mesh unit to be encrypted, and if the encryption level of a certain mesh face is not greater than the encryption level of the target mesh unit to be encrypted, marking the mesh face as a Class I face; traversing all mesh edges on each mesh face marked as a Class I face, and marking the adjacent mesh faces where each mesh edge is located as a Class II face.

[0051] By classifying and marking Class I surfaces and Class II surfaces according to encryption levels, the division of Class I surfaces and Class II surfaces can be made more scientific and reasonable.

[0052] Exemplarily, based on Class I and Class II surfaces, the mesh surfaces on the target mesh unit to be encrypted are segmented, including: taking each mesh surface in Class I surface as the current mesh surface in turn, traversing the mesh nodes on the current mesh surface, and taking the mesh nodes whose encryption level is not higher than the encryption level of the current mesh surface as anchor points; selecting an anchor point on the current mesh surface as the starting anchor point, and adding the starting anchor point to the sub-mesh surface; searching from the starting anchor point, and sequentially searching for the next mesh node along the mesh nodes on the current mesh surface, if the found mesh node belongs to the anchor point, then adding the midpoint of the mesh edge corresponding to the found mesh node and the starting anchor point to the sub-mesh surface, and ending the search; if the found mesh node does not belong to the anchor point, then adding the found mesh node to the sub-mesh surface, repeatedly searching for the next mesh node along the mesh nodes on the current mesh surface, adding the corresponding mesh node to the sub-mesh surface, until a mesh node whose encryption level is one level higher than the encryption level of the current mesh surface is found, adding the mesh node to the sub-mesh surface, and ending the current sub-mesh surface point search process; The center of the previous mesh surface is added to the sub-mesh surface; starting from the starting anchor point, the search is conducted in reverse order along the mesh nodes on the current mesh surface to find the next mesh node, and if the found mesh node belongs to the anchor point, the search is terminated; if the found mesh node does not belong to the anchor point, the search is repeated in reverse order along the mesh nodes on the current mesh surface to find the next mesh node until a mesh node with an encryption level one level higher than that of the current mesh surface is found; starting from the found anchor point or the mesh node with an encryption level one level higher than that of the current mesh surface, each mesh node is sequentially traversed along the mesh nodes on the current mesh surface, and the traversed mesh nodes and the corresponding midpoints of the newly generated mesh edges are sequentially added to the sub-mesh surface until the start anchor point is returned; after the sub-mesh surface is constructed, the adjacent two mesh cells corresponding to the sub-mesh surface are searched in the current mesh cell and the adjacent mesh cells corresponding to the current mesh surface through the anchor point corresponding to the sub-mesh surface; after the sub-mesh surfaces corresponding to all anchor points on the current mesh surface are divided, the current mesh surface is removed from the Class I surface and the Class II surface.

[0053] For example, Fig.10 and Fig.11 The process of generating corresponding sub-grid surfaces for different grid surfaces is shown. Fig.10 and Fig.11 In the figure, red dots represent anchor points. Black dots represent grid nodes. Blue dots represent newly added grid nodes. Orange arrows are used to indicate the search direction, showing the process of traversing the grid nodes on the grid surface through anchor points. Black arrows are used to indicate the sub-grid surface construction process. The process of building a sub-grid requires finding the corresponding midpoint, among which the midpoint of the grid edge and the grid node with an encryption level one level higher than the current grid unit, that is, the grid node with an encryption level of 1, can be used as the midpoint found. Among them, Fig.10 and Fig.11 The difference is that Fig.10 The displayed mesh face to be split, i.e., the mesh parent face, contains a mesh node with a higher encryption level than the mesh parent face in the search direction. Fig.11 The displayed mesh parent surface has the same encryption level of each mesh node in the search direction as the mesh parent surface. This difference leads to the difference in the mesh surface subdivision process. Fig.12 Displays the mesh surface segmentation results of the current mesh cell.

[0054] Exemplarily, updating a mesh surface where a mesh node has changed and a mesh surface where an adjacent mesh unit has changed includes: traversing the mesh surface where the number of mesh nodes has changed in the type II surface according to the marked mesh edge to be split through the topological connection relationship between the mesh edge and the mesh surface; for each mesh surface where the number of mesh nodes has changed, traversing each mesh node in the order of the mesh nodes on it, adding the current mesh node to a temporary surface, and querying whether a mesh edge formed by the current mesh node and its next mesh node has been split: if so, adding the midpoint of the mesh edge to the temporary surface; if not, continuing to traverse the mesh surface. Grid nodes are traversed until all grid nodes on the grid surface are traversed; at this time, the temporary surface is constructed, and the original grid surface is replaced by the temporary surface, and the grid surface is removed from the Class II surface; for the remaining grid surfaces marked as Class II surfaces, all grid nodes on the grid surface are traversed to find the grid node with the smallest encryption level on the grid surface, and the two adjacent grid cells where the grid node is located are obtained through the grid surface where the grid node is located, and the sub-grid cell corresponding to the grid node with the smallest encryption level is searched in the two adjacent grid cells. If the two adjacent grid cells are not encrypted, they themselves are used as the searched sub-grid cells.

[0055] For example, Fig.13The figure shows the mesh surface with the changed number of updated mesh nodes. The red dots represent anchor points. The blue dots represent newly added mesh nodes. The black numbers represent the encryption level of the corresponding mesh nodes. The orange arrows represent the search direction, showing the process of traversing the mesh nodes on the mesh surface. The black dotted arrows show the construction process of the sub-mesh surface, i.e. the newly generated mesh surface. The blue mesh surface shows a mesh surface on the mesh cell adjacent to the illustrated mesh cell. Since the illustrated mesh cell has been encrypted, assuming that the adjacent cell on the left side of the mesh cell has not been encrypted, the number of mesh nodes on the mesh surface on the front side of the adjacent cell on the left side has changed. It is necessary to check whether each mesh edge has been added with a midpoint in turn, and add the midpoint corresponding to the mesh edge to the mesh surface.

[0056] Fig.14 The adjacent cells of the updated mesh surface are shown. The red dots represent anchor points, the green mesh surface represents the mesh surface where the adjacent mesh cells on the left and right have changed, and the sphere corresponds to the area where the sub-mesh cells are located. Assuming that the adjacent cells on the right side of the larger mesh cell in the figure have not been encrypted, it can be seen from the green mesh surface that the encryption level of the adjacent cells on the left side of the current mesh surface has changed from 0 to 1 due to the encryption of the current mesh surface. Therefore, when updating the adjacent cells of the current mesh surface, it is necessary to first search for the anchor point on the current mesh surface, and use the searched anchor point to find the corresponding sub-mesh cell in the original adjacent mesh cells of the current mesh surface, and use the found sub-mesh cell as the new adjacent cell of the current mesh surface.

[0057] Exemplarily, adding a newly generated mesh surface to the target mesh unit to be encrypted includes: traversing the mesh surface on the target mesh unit to be encrypted, determining the midpoint of the equivalent surface on the mesh surface; counting the number of anchor points on the mesh surface, if a mesh surface has only one anchor point, starting from the anchor point on the mesh surface, searching forward along the node sequence on the mesh surface, and taking the next mesh node with an encryption level one level higher than the encryption level of the current mesh unit as the midpoint of the equivalent surface; if the number of anchor points on a mesh surface is greater than 1, taking the center of the mesh surface as the equivalent surface. midpoint; after determining the center of the current mesh surface, traverse the anchor points on the current mesh surface, and search forward along the node sequence on the mesh surface through the current anchor point. If the next mesh node found belongs to the anchor point, the midpoint of the mesh edge formed by the current anchor point and the searched mesh node is used as the midpoint of the equivalent edge, and the equivalent edge midpoint is associated with the current anchor point and the current equivalent surface midpoint; if the next mesh node found does not belong to the anchor point, continue to search forward along the node sequence on the mesh surface through the current anchor point, and associate the first mesh node found with a higher encryption level than the current mesh node. The mesh node with a higher encryption level of the unit is used as the midpoint of the equivalent edge, and the midpoint of the equivalent edge is associated with the current anchor point and the current midpoint of the equivalent surface; the node sequence along the mesh surface is searched backward through the current anchor point. If the next mesh node found belongs to the anchor point, the midpoint of the mesh edge formed by the current anchor point and the searched mesh node is used as the midpoint of the equivalent edge, and the midpoint of the equivalent edge is associated with the current anchor point and the current midpoint of the equivalent surface; if the next mesh node found does not belong to the anchor point, the search continues backward along the node sequence of the mesh surface through the current anchor point. Search, take the first grid node whose encryption level is one level higher than the current grid cell as the midpoint of the equivalent edge, and associate the midpoint of the equivalent edge with the current anchor point and the midpoint of the current equivalent surface; when all grid surfaces of the target grid cell to be encrypted are traversed, construct the internal surface by connecting the center of the target grid cell to be encrypted, the midpoint of the equivalent edge and its associated midpoint of the equivalent surface; search for the corresponding encrypted sub-grid cell in the target grid cell to be encrypted through the two associated anchor points, so as to determine the two adjacent grid cells where the internal surface is located.

[0058] For example, Fig.15 The figure shows the process of adding mesh surfaces inside a mesh unit. The red dots represent anchor points. The green dots represent equivalent surface midpoints and equivalent edge midpoints. The blue dots represent newly added mesh nodes. The orange arrows represent the search direction, showing the process of searching for equivalent edge midpoints through anchor points on the mesh surface. The black arrows represent the construction process of the newly generated mesh surface inside the mesh unit. The blue dashed lines show the correspondence between equivalent edge midpoints, equivalent surface midpoints, and anchor points. Fig.15 It can be seen that Fig.15 Side A in Fig.15The midpoint of the equivalent surface of the mesh surface on the upper side of the mesh unit shown is Fig.15 The midpoint of the A surface in the figure is searched forward and backward through the anchor point on the surface. After the equivalent edge midpoint is found, the relationship between the equivalent edge midpoint and the equivalent surface midpoint and the anchor point is established. Fig.15 Side B (located at Fig.15 The mesh surface behind the mesh unit shown), Fig.15 The C surface (located at Fig.15 When we look at the mesh surface on the right side of the mesh unit shown in the figure, we can see that the midpoints of the equivalent surfaces of the two surfaces actually correspond to the mesh nodes on each surface. Fig.15 After similar operations on side A in the figure, you can see that Fig.15 The B side of Fig.15 The midpoints of the equivalent edges of the C surfaces in the figure are related to two anchor points, which are used to determine the left and right cells of the newly generated mesh surface inside the mesh cell. Fig.15 The B side of Fig.15 The midpoints of the equivalent edges of the C surfaces are also related to the midpoints of the two equivalent surfaces, which are used to determine the mesh nodes on the newly generated mesh surface inside the mesh unit.

[0059] Fig.16 The practical application of the mesh encryption method based on mesh topology connection provided by the embodiment of the present disclosure in the simulation scenario of the intake manifold of an automobile engine is shown. Fig.16 (b) shows the initial grid, Fig.16 (a) in the equation is Fig.16 The flow field corresponding to the initial grid shown in (b). Fig.16 (d) shows the mesh encryption method based on mesh topology connection provided by the embodiment of the present disclosure. Fig.16 The result of refining the initial mesh shown in (b). Fig.16 (c) in the equation is Fig.16 The flow field corresponding to the encrypted grid shown in (d) in the figure. As can be seen from the figure, after several rounds of encryption, the grid density corresponding to a specific area in the flow field has been significantly improved.

[0060] The mesh encryption method based on mesh topology connection provided by the embodiments of the present disclosure has the following beneficial effects compared with the prior art: 1. Combining the grid topology connection relationship information and grid encryption characteristics, using the original connection relationship of the grid, the grid encryption in the engineering simulation application scenario is converted into segmentation of specified grid units, and further converted into updated topology connection relationships, avoiding the re-division of the new grid, realizing rapid encryption based on the original grid, and saving computing resources.

[0061] 2. The mesh encryption process is only related to the topological connection relationship of the mesh, blurring the mesh unit type. It can be applied to engineering simulation application scenarios, especially mesh units of various shapes in fluid simulation processes, including tetrahedrons, pyramids, triangular prisms, hexahedrons and polyhedrons, etc., providing strong support for mesh encryption in the adaptive process, making it applicable to various types of meshes such as polyhedral meshes, hybrid meshes containing boundary layers, etc., enhancing the potential of adaptive encryption technology.

[0062] Those skilled in the art will appreciate that the above-mentioned embodiments are specific embodiments for implementing the present disclosure, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present disclosure.

Claims

1. A grid encryption method based on grid topology connection, characterized in that: Applied to engineering simulation application scenarios; the grid encryption method includes: Based on the grid node coordinates and the grid topological connection relationship, a corresponding grid topological connection structure is constructed; Initializing the encryption level corresponding to each grid unit and each grid face, each grid edge, and each grid node in the grid topological connection structure; Expanding the initial grid unit to be encrypted to obtain a target grid unit to be encrypted, so that the encryption level difference between the target grid unit to be encrypted and its adjacent grid units is not greater than a preset level threshold; Adding a newly generated grid node to the grid topology connection structure and initializing its corresponding encryption level; Determine an anchor point on the target mesh unit to be encrypted according to the topological connection relationship between the target mesh unit to be encrypted and each mesh node and the corresponding encryption level, and add a newly generated mesh unit to the mesh topological connection structure according to the anchor point; According to the topological connection relationship between the target mesh unit to be encrypted and each mesh surface, each mesh node, each mesh edge and their corresponding encryption levels, a newly generated mesh surface is added to the mesh topological connection structure.

2. The grid encryption method according to claim 1, characterized in that: Initializing the encryption level corresponding to each grid unit and each grid face, each grid edge, and each grid node in the grid topological connection structure, including: Initializing the encryption levels corresponding to each of the grid units and each of the grid nodes to a first level value; Initialize the encryption level of each grid surface to the larger encryption level value of the two adjacent grid cells where it is located; The encryption level of each mesh edge is initialized to the larger encryption level of the two mesh nodes involved.

3. The grid encryption method according to claim 1, characterized in that: Expanding the initial grid unit to be encrypted to obtain a target grid unit to be encrypted, so that the encryption level difference between the target grid unit to be encrypted and its adjacent grid units is not greater than a preset level threshold, including: Traverse each of the initial grid cells to be encrypted, take each of the initial grid cells to be encrypted as the current cell in turn, obtain the adjacent grid cells of the current cell, if the encryption level difference between the adjacent grid cell and the current cell is greater than the preset level threshold, then mark the adjacent grid cell as the new initial grid cell to be encrypted, repeat the above process until no new initial grid cells to be encrypted are generated, and take each of the initial grid cells to be encrypted at this time as the target grid cells to be encrypted.

4. The grid encryption method according to claim 1, characterized in that: Adding a newly generated grid node to the grid topology connection structure and initializing its corresponding encryption level includes: The center of the target grid cell to be encrypted is used as a newly generated grid node, and the newly generated grid node is added to the target grid cell to be encrypted, and the encryption level of the newly generated grid node is initialized to be one level higher than the encryption level of the target grid cell to be encrypted; Traversing all mesh surfaces of the target mesh unit to be encrypted, if the encryption level of a mesh surface is not greater than the encryption level of the target mesh unit to be encrypted where it is located, taking the center of the mesh surface as a newly generated mesh node, and adding it to the target mesh unit to be encrypted where it is located, and initializing the encryption level of the newly generated mesh node to be one level higher than the encryption level of the mesh surface where it is located; All mesh edges of the target mesh unit to be encrypted are traversed. If the encryption level of a certain mesh edge is not greater than the encryption level of the target mesh unit to be encrypted, the midpoint of the mesh edge is used as a newly generated mesh node and added to the target mesh unit to be encrypted. The encryption level of the newly generated mesh node is initialized to be one level higher than the encryption level of the mesh edge.

5. The grid encryption method according to claim 1, characterized in that: According to the topological connection relationship between the target mesh unit to be encrypted and each mesh node and the corresponding encryption level, an anchor point on the target mesh unit to be encrypted is determined, and according to the anchor point, a newly generated mesh unit is added to the mesh topological connection structure, including: Traversing all grid nodes of the target grid unit to be encrypted, and taking a grid node whose encryption level is less than or equal to the encryption level of the target grid unit to be encrypted as an anchor point; The target grid unit to be encrypted is encrypted according to the anchor points to generate new grid units, so that each anchor point corresponds to a new grid unit.

6. The grid encryption method according to claim 5, characterized in that: According to the topological connection relationship between the target mesh unit to be encrypted and each mesh surface, each mesh node, each mesh edge and their corresponding encryption levels, a newly generated mesh surface is added to the mesh topological connection structure, including: Classify and mark the mesh faces of the target mesh unit to be encrypted to obtain Class I faces and Class II faces; wherein the Class I faces include mesh faces to be segmented, and the Class II faces include mesh faces to be segmented, mesh faces with changed mesh nodes, and mesh faces with changed adjacent mesh units; Based on the type I surface and the type II surface, the grid surface on the target grid unit to be encrypted is segmented, the grid surface of the grid node that has changed and the grid surface of the adjacent grid unit that has changed are updated, and the newly generated grid surface is added to the inside of the target grid unit to be encrypted.

7. The grid encryption method according to claim 6, characterized in that: The mesh surfaces of the target mesh unit to be encrypted are classified and marked to obtain Class I surfaces and Class II surfaces, including: Traversing all mesh surfaces of the target mesh unit to be encrypted, and marking them as the type II surfaces; Traversing all mesh surfaces of the target mesh unit to be encrypted, if the encryption level of a certain mesh surface is not greater than the encryption level of the target mesh unit to be encrypted where it is located, marking the mesh surface as the Class I surface; All mesh edges on each mesh surface marked as the type I surface are traversed respectively, and the adjacent mesh surfaces where each mesh edge is located are marked as the type II surface.

8. The grid encryption method according to claim 6, characterized in that: Based on the type I surface and the type II surface, segmenting the grid surface on the target grid unit to be encrypted includes: Taking each mesh surface in the type I surface as the current mesh surface in turn, traversing the mesh nodes on the current mesh surface, and taking the mesh nodes whose encryption level is not higher than the encryption level of the current mesh surface as anchor points; Select an anchor point on the current mesh surface as the starting anchor point and add the starting anchor point to the sub-mesh surface; Start the search from the starting anchor point, and search for the next grid node along the grid nodes on the current grid surface in sequence. If the found grid node belongs to the anchor point, add the midpoint of the grid edge corresponding to the found grid node and the starting anchor point to the sub-grid surface, and end the search; if the found grid node does not belong to the anchor point, add the found grid node to the sub-grid surface, and repeat the search for the next grid node along the grid nodes on the current grid surface in sequence, and add the corresponding grid node to the sub-grid surface until a grid node with an encryption level one level higher than the encryption level of the current grid surface is found, and add the grid node to the sub-grid surface, and end the current sub-grid surface point search process; Add the center of the current mesh face to the sub-mesh face; Starting from the starting anchor point, search in reverse order along the grid nodes on the current grid surface to find the next grid node. If the found grid node belongs to the anchor point, the search ends; if the found grid node does not belong to the anchor point, search for the next grid node in reverse order along the grid nodes on the current grid surface repeatedly until a grid node with an encryption level one level higher than the encryption level of the current grid surface is found; starting from the found anchor point or the grid node with an encryption level one level higher than the encryption level of the current grid surface, traverse each grid node in order along the grid nodes on the current grid surface, and add the traversed grid nodes and the corresponding midpoints of the newly generated grid edges to the sub-grid surface in turn until returning to the starting anchor point; After the sub-grid surface is constructed, two adjacent grid cells corresponding to the sub-grid surface are searched in the current grid cell and the adjacent grid cells corresponding to the current grid surface through the anchor point corresponding to the sub-grid surface; After the sub-mesh surfaces corresponding to all anchor points on the current mesh surface are divided, the current mesh surface is removed from the type I surface and the type II surface.

9. The grid encryption method according to claim 8, characterized in that: Update the changed mesh faces of the mesh nodes and the changed mesh faces of the adjacent mesh cells, including: According to the marked mesh edges to be segmented, through the topological connection relationship between the mesh edges and the mesh faces, traverse the mesh faces in which the number of mesh nodes in the type II faces changes; For each mesh surface with a changed number of mesh nodes, traverse each mesh node in the order of the mesh nodes on it, add the current mesh node to the temporary surface, and query whether the mesh edge formed by the current mesh node and its next mesh node is split: if so, add the midpoint of the mesh edge to the temporary surface; if not, continue to traverse the mesh nodes until all mesh nodes on the mesh surface are traversed; at this time, the temporary surface is constructed, and the original mesh surface is replaced by the temporary surface, and the mesh surface is removed from the Class II surface; For the remaining grid surfaces marked as the Class II surfaces, all grid nodes on the grid surface are traversed to find the grid node with the smallest encryption level on the grid surface. The two adjacent grid cells where the grid node is located are obtained through the grid surface where the grid node is located. The sub-grid cell corresponding to the grid node with the smallest encryption level is searched in the two adjacent grid cells. If the two adjacent grid cells are not encrypted, they themselves are used as the searched sub-grid cells.

10. The grid encryption method according to claim 9, characterized in that: Adding a newly generated mesh surface to the target mesh unit to be encrypted includes: Traverse the mesh surface on the target mesh unit to be encrypted and determine the midpoint of the equivalent surface on the mesh surface: count the number of anchor points on the mesh surface. If a mesh surface has only one anchor point, start from the anchor point on the mesh surface and search forward along the node sequence on the mesh surface. The next mesh node with an encryption level one level higher than the current mesh unit is used as the midpoint of the equivalent surface. If the number of anchor points on a mesh surface is greater than 1, the center of the mesh surface is used as the midpoint of the equivalent surface. After determining the equivalent surface midpoint of the current mesh surface, traverse the anchor points on the current mesh surface, and search forward along the node sequence on the mesh surface through the current anchor point. If the next mesh node found belongs to the anchor point, the midpoint of the mesh edge formed by the current anchor point and the searched mesh node is used as the equivalent edge midpoint, and the equivalent edge midpoint is associated with the current anchor point and the current equivalent surface midpoint; if the next mesh node found does not belong to the anchor point, continue to search forward along the node sequence on the mesh surface through the current anchor point, and use the first mesh node found whose encryption level is one level higher than the encryption level of the current mesh unit as the equivalent edge midpoint, and associate the equivalent edge midpoint with the current anchor point and the current equivalent surface midpoint. The current anchor point is used to search backward along the node sequence of the mesh surface. If the next mesh node found belongs to the anchor point, the midpoint of the mesh edge formed by the current anchor point and the found mesh node is used as the midpoint of the equivalent edge, and the midpoint of the equivalent edge is associated with the current anchor point and the current midpoint of the equivalent surface. If the next mesh node found does not belong to the anchor point, the current anchor point is used to search backward along the node sequence of the mesh surface, and the first mesh node found whose encryption level is one level higher than the encryption level of the current mesh unit is used as the midpoint of the equivalent edge, and the midpoint of the equivalent edge is associated with the current anchor point and the current midpoint of the equivalent surface. When all mesh surfaces of the target mesh cell to be encrypted are traversed, the internal surface is constructed by connecting the center of the target mesh cell to be encrypted, the midpoint of the equivalent edge and the midpoint of the associated equivalent surface; the corresponding encrypted sub-mesh cell is searched in the target mesh cell to be encrypted through the two associated anchor points to determine the two adjacent mesh cells where the internal surface is located.

Citation Information

Patent Citations

  • High-resolution embedded grid automatic generation method, device, equipment and medium

    CN117131802A

  • Unstructured grid encryption method and system

    CN117390639A

  • Grid model generation method and device and storage medium

    CN118037995A