Volume element model generation method and device based on three-dimensional geologic body general model

By transforming the general three-dimensional geological model into multiple triangle faces and building AABBTree structure and bounding box, the problem of large memory usage of the voxel generation algorithm in the existing technology is solved, and a high-precision and low-consumption three-dimensional geological model generation is achieved.

CN119693575APending Publication Date: 2025-03-25EASY WISDOM RUI CHINA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411813793.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, linear voxel generation algorithm based on regular mesh takes up a lot of memory when generating complex geological models, resulting in limited later application and storage optimization.

Method used

The voxel model generation method based on the three-dimensional geological universal model is adopted. By transforming the three-dimensional geological universal model into multiple triangle surfaces, the AABBTree structure is constructed, and the bounding box is determined using the light source and light density, and finally the octree is node-processed to generate the voxel model.

Benefits of technology

It realizes the rapid generation of high-precision and low-consumption three-dimensional geological model, reducing the amount of data storage and ensuring the accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693575A_ABST
    Figure CN119693575A_ABST
Patent Text Reader

Abstract

The invention provides a voxel model generation method and device based on a three-dimensional geologic body general model, and the method comprises the steps: converting the three-dimensional geologic body general model into a plurality of triangular surfaces according to the type of a geologic body, and obtaining a three-dimensional geologic voxel space and the precision of a three-dimensional geologic voxel substrate; determining a root node of the octree according to the vertex of the three-dimensional geologic voxel space, and determining a leaf node of the octree according to the base precision of the three-dimensional geologic voxel; constructing an AABBTree structure according to the plurality of triangular facets; setting at least one light source and a light direction according to the vertex of the three-dimensional geologic volume element space; determining a plurality of bounding boxes according to intersection points of light rays emitted by the light source according to the light ray orientation and the light ray density and the plurality of triangular surfaces; and performing node processing on the octree according to the matching relationship between the bounding box and the voxel to generate a voxel model. According to the voxel model generation method and device based on the three-dimensional geologic body general model provided by the embodiment of the invention, the data storage amount is reduced while the precision is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of geological body modeling, and in particular to a method and device for generating a volume element model based on a three-dimensional geological body universal model. Background Art

[0002] Voxel data is an important form of data expression in 3D GIS, and has great advantages in expressing the internal characteristics of spatial objects. Voxel data can carry information such as lithology, porosity, density, etc., and is widely used in geological body modeling, which can well reflect the geological information of each section of the geological body.

[0003] At present, the generation algorithm of voxel data is mainly based on the linear voxel generation method of regular grid. This generation algorithm constructs the voxel space according to the spatial area of ​​the three-dimensional geological body, and judges the ownership of the voxel units in the voxel space one by one. The volume of general geological volume data is huge, and this linear voxel generation algorithm based on regular grid takes up a lot of memory, which is not conducive to the generation of voxels in complex geological scenarios. Later application and storage optimization are severely limited. Summary of the invention

[0004] In order to solve the above problems, the purpose of the embodiments of the present application is to provide a method and device for generating a voxel model based on a three-dimensional geological body universal model.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a voxel model based on a three-dimensional geological body universal model, comprising: The three-dimensional geological body universal model is converted into multiple triangular faces according to the geological body type, and the three-dimensional geological body element space and the three-dimensional geological body element base accuracy are obtained; The root node of the octree is determined according to the vertices of the three-dimensional geological volume element space, and the leaf nodes of the octree are determined according to the base accuracy of the three-dimensional geological volume element; Construct AABBTree structure based on multiple triangles; At least one light source and a light direction are set according to the vertices of the three-dimensional geological volume space, and the three-dimensional geological volume base accuracy is determined as the light density of the light source; Multiple bounding boxes are determined according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces; the octree is node-processed according to the matching relationship between the bounding boxes and the voxels to generate a voxel model.

[0006] In a second aspect, the embodiment of the present application further provides a device for generating a voxel model based on a three-dimensional geological body universal model, the device comprising: A triangular face generation module is used to convert the 3D geological body general model into multiple triangular faces according to the geological body type, and obtain the 3D geological body element space and the 3D geological body element base accuracy; An octree construction module is used to determine the root node of the octree according to the vertices of the three-dimensional geological volume space, and to determine the leaf nodes of the octree according to the base accuracy of the three-dimensional geological volume; AABBTree building module, used to build AABBTree structure based on multiple triangles; The bounding box generation module is used to set at least one light source and light direction according to the vertices of the three-dimensional geological volume space, determine the three-dimensional geological volume base accuracy as the light density of the light source; determine multiple bounding boxes according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces; The node processing module is used to process the nodes of the octree according to the matching relationship between the bounding box and the voxel to generate a voxel model.

[0007] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in the first aspect are executed.

[0008] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and one or more programs, wherein the one or more programs are stored in the memory and configured so that the processor executes the steps of the method of the first aspect described above.

[0009] In the scheme provided in the first aspect of the embodiment of the present application, the three-dimensional geological body general model is converted into multiple triangular faces according to the geological body type, and the three-dimensional geological body element space and the three-dimensional geological body element base accuracy are obtained; the root node of the octree is determined according to the vertex of the three-dimensional geological body element space, and the leaf node of the octree is determined according to the three-dimensional geological body element base accuracy; the AABBTree structure is constructed according to multiple triangular faces; at least one light source and light direction are set according to the vertex of the three-dimensional geological body element space, and the three-dimensional geological body element base accuracy is determined as the light density of the light source; multiple bounding boxes are determined according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces; the octree is node processed according to the matching relationship between the bounding box and the body element to generate a body element model. Compared with the method of generating linear body elements based on regular grids in the related art, the three-dimensional geological body element model generation algorithm is designed by introducing the AABBTree structure, the setting of the light source position and the multi-threaded parallel acceleration strategy, which can quickly generate a high-precision and low-consumption three-dimensional geological body model. While ensuring accuracy, the data storage volume is greatly reduced.

[0010] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 A flow chart of a method for generating a voxel model based on a three-dimensional geological body general model provided in Example 1 of the present application is shown; Figure 2 A schematic diagram showing a method for generating a voxel model based on a three-dimensional geological body universal model provided in an embodiment of the present application, in which a light source is arranged on one surface of an outer bounding box; Figure 3 A schematic diagram showing the arrangement of light sources on two surfaces of an outer bounding box in a method for generating a voxel model based on a three-dimensional geological body universal model provided in an embodiment of the present application is shown; Figure 4 A schematic diagram of intersection points in a method for generating a voxel model based on a three-dimensional geological body universal model provided in an embodiment of the present application is shown; Figure 5 A schematic diagram of effective voxels in a voxel model generation method based on a three-dimensional geological body general model provided in an embodiment of the present application is shown; Figure 6 A schematic diagram of the data structure and octave number before and after matching in a method for generating a voxel model based on a three-dimensional geological body universal model provided in an embodiment of the present application is shown; Figure 7 A schematic structural diagram of a volume element model generating device based on a three-dimensional geological body general model provided in Example 2 of the present application is shown; Figure 8 A schematic diagram of the structure of an electronic device provided in Example 1 of the present application is shown. DETAILED DESCRIPTION

[0013] The execution subject of the method for generating a volume element model based on a three-dimensional geological body universal model provided by the present invention is a processor that can generate a volume element model based on a three-dimensional geological body universal model. Example

[0014] See also Figure 1 The flowchart of a method for generating a voxel model based on a three-dimensional geological body universal model provided by the present embodiment is shown. The method for generating a voxel model based on a three-dimensional geological body universal model provided by the present embodiment includes the following specific steps: Step 101: converting the 3D geological body universal model into multiple triangular faces according to the geological body type, and obtaining the 3D geological body element space and the 3D geological body element base accuracy.

[0015] In the above step 101, the three-dimensional geological body general model includes but is not limited to TIN, TriangularPrismVolume, RectifiedGrid, TetrahedronVolume, CuboidVolume, TruncatedRegularGrid and other geometric types in geo3dml and other common geometric expressions.

[0016] The geological body type includes multiple expressions, for example, triangulated expression, formulated expression, and result voxel expression.

[0017] A triangular face refers to a data structure for voxel construction operations and a data structure for triangulated expression.

[0018] The three-dimensional geological volume element space refers to the local space where the three-dimensional geological volume general model or the converted model is located.

[0019] The 3D geological volume element base accuracy refers to the expected accuracy of the 3D geological volume element base, which is obtained by the volume array of the geological volume cluster. The 3D geological volume general model is constructed based on the 3D geological volume element base accuracy.

[0020] The embodiment of the present invention converts the three-dimensional geological body universal model into a model of hexahedral data structure to characterize the geological body according to the base accuracy of the three-dimensional geological body element.

[0021] Step 102: determining the root node of the octree according to the vertices of the three-dimensional geological volume element space, and determining the leaf nodes of the octree according to the three-dimensional geological volume element base accuracy.

[0022] In the above step 102, an outer bounding box is determined according to the vertices of the three-dimensional geological voxel space, and the outer bounding box is used as the root node of the octree. The outer bounding box is cut according to the three-dimensional geological voxel base accuracy to obtain multiple voxels, thereby determining the leaf nodes of the octree.

[0023] Optionally, the above step 102 may include steps (1) to (3): Step (1): construct an outer bounding box based on the vertices of the three-dimensional geological volume space; and use the outer bounding box as the root node of the octree.

[0024] Step (2): The base accuracy of the 3D geological volume is used as the cutting density.

[0025] Step (3): Cut the outer bounding box according to the grid rule and cutting density to obtain multiple voxels of the three-dimensional grid structure; the multiple voxels are leaf nodes of the octree.

[0026] In the above step (3), a regular grid is used for voxel construction, which is expressed by the center point coordinates and length, width and height. Since each length, width and height are consistent, the length, width and height are normalized to 1, and the center point coordinates are expressed in the local coordinate system, that is, the index in the X, Y, and Z directions. This expression method is called a grid structure in the embodiment of the present invention. In order to merge nodes, the embodiment of the present invention converts the grid structure into an octree structure, that is, each voxel represents a leaf node of the octree. The child nodes are merged when the subtree is full, and the final leaf end point is the merged voxel data.

[0027] Step 103: Construct an AABBTree structure based on multiple triangular faces.

[0028] Optionally, the above step 103 may include steps (1) to (3): Step (1): Use multiple triangular faces as leaf nodes of AABBTree to generate an AABBTree structure.

[0029] Step (2): Calculate the relative distances between multiple triangular facets based on the coordinates of the triangular facets in the three-dimensional geological volume element space.

[0030] Step (3): Merge each pair of adjacent leaf nodes into a parent node of AABBTree based on the relative distances of multiple triangles.

[0031] The process of building a tree includes initializing leaf nodes, merging nodes, and recursively building until all leaf nodes are merged into a root node, thereby generating an AABBTree structure.

[0032] In the above step (2), the relative distance refers to the distance between different axes of the triangle relative to the three-dimensional coordinate axis.

[0033] In the above step (3), the distance variances of multiple triangular facets relative to different axes of the three-dimensional coordinate axis are calculated, and the axis with the smallest distance variance is used as the merging direction of the merging node. Each pair of adjacent leaf nodes is merged into a parent node along the merging direction.

[0034] Step 104: at least one light source and a light direction are set according to the vertices of the three-dimensional geological volume space, and the three-dimensional geological volume base accuracy is determined as the light density of the light source.

[0035] In the above step 104, the light source is arranged outside the three-dimensional geological body, that is, the light source is arranged on the surface of the bounding box outside the three-dimensional geological body.

[0036] The light direction of a light source refers to the direction in which the light source shines.

[0037] The light density of a light source refers to the fact that the light source emits multiple beams of parallel light, and the light density of the light source is represented by the distance between adjacent parallel lights. The smaller the distance between adjacent parallel lights, the greater the light density of the light source, and the higher the accuracy of the 3D geological voxel base.

[0038] Optionally, the above step 104 may include steps (1) to (3): Step (1): Construct an outer bounding box based on the vertices of the three-dimensional geological volume space.

[0039] Step (2): Take the vertex of the three-dimensional geological volume element space as the origin and establish a three-dimensional coordinate axis based on the three-dimensional geological volume.

[0040] Step (3): a light source is arranged on at least one surface of the outer bounding box; the light direction of the light source is parallel to an axis of the three-dimensional coordinate axis, and the axis is perpendicular to the surface where the light source is located.

[0041] In the above step (3), the outer bounding box is a hexagon, and the six faces of the outer bounding box each have two planes parallel to the X-axis, the Y-axis, and the Z-axis. For the convenience of description, the embodiment of the present invention uses the X-plane, the Y-plane, and the Z-plane to represent the planes parallel to the X-axis, the Y-axis, and the Z-axis, respectively. The embodiment of the present invention can set a light source on any one of the X-plane, the Y-plane, and the Z-plane. Figure 2 As shown, a light source is set on the X plane. A light source can also be set on any two planes of the X plane, the Y plane and the Z plane. Figure 3 As shown, light sources are arranged on the X plane and the Y plane. Light sources may also be arranged on the X plane, the Y plane and the Z plane.

[0042] Step 105: Determine multiple bounding boxes according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces; perform node processing on the octree according to the matching relationship between the bounding boxes and the voxels to generate a voxel model.

[0043] In the above step 105, the intersection points include intersection points and tangent points.

[0044] The light is projected from end to end from the bounding box outside the geological body. During the penetration process, it will intersect with many triangular facets inside the three-dimensional geological body. During the calculation process, the triangular facets are treated as three-dimensional grids, and one projection can calculate all triangular faces within a distance range. Compared with the traditional judgment of the intersection between triangular faces and geological bodies, the amount of calculation is reduced exponentially.

[0045] The intersection point can be determined by the parity rule in computer graphics. In computer graphics, the determination of inside and outside points is a basic task, which involves determining the position of a point on a two-dimensional plane relative to a polygon. The parity principle is a common method to solve this problem. According to this principle, we can determine whether a point is inside a polygon by checking the number of intersections between a ray starting from infinity and passing through the point and the edge of the polygon. If the number of intersections is odd, then the point is determined to be an inside point; conversely, if the number of intersections is even, then the point is an outside point. Here, the inside point is the intersection point, and the outside point is the tangent point.

[0046] The three-dimensional geological volume element space is segmented according to the light density along the direction of the light azimuth, and each segmented subspace is a bounding box. The bounding box is an axis-aligned cube or cuboid, whose faces are parallel to the coordinate axes.

[0047] The intersection points include intersection points and tangent points. The step 105 of determining multiple bounding boxes according to the intersection points of the light emitted by the light source according to the light direction and light density and the multiple triangular faces may include steps (1) to (2): Step (1): Through the CUDA parallel computing strategy, the spatial geometry based on the AABBTree structure is quickly retrieved to obtain the intersection points and tangent points of the light emitted by the light source according to the light direction and light density and multiple triangular faces.

[0048] Step (2): Connect two adjacent odd and even intersection points that pass through the triangular surface to construct a geological element and determine it as a bounding box.

[0049] In the above step (1), the spatial geometry fast retrieval capability of the AABBTree structure can detect the intersection and tangency points of a ray with multiple triangular faces. With the help of CUDA parallel computing strategy, the AABBTree structure can detect multiple rays at the same time and obtain the intersection and tangency points of each ray with multiple triangular faces.

[0050] By adopting the CUDA parallel computing strategy and benefiting from the fast spatial geometry retrieval capability of the AABBTree structure, the process of obtaining intersection points is very efficient.

[0051] In the above step (2), the odd-even intersection point refers to the odd-numbered intersection point and the adjacent even-numbered intersection point, such as the first and second intersection points are odd-even intersection points, while the second and third intersection points are not odd-even intersection points. Figure 4As shown in the figure, the irregular shape is the geological body, and the outer bounding box is slightly larger than the geological body. The arrowed lines along the X-axis and Y-axis are rays. Taking the third ray along the X-axis as an example, there are four intersections between the ray and the geological body. The intersections 1 and 2 are the two adjacent odd and even intersections passing through the triangular face, and the geological volume element is constructed between the intersections 1 and 2; the intersections 3 and 4 are the two adjacent odd and even intersections passing through the triangular face, and the geological volume element is constructed between the intersections 3 and 4. The intersection point of the first ray along the X-axis and the first triangular face is the tangent point.

[0052] The above step 105 processes nodes of the octree according to the matching relationship between the bounding box and the voxel to generate the voxel model, which may include steps (1) to (3): Step (1): Match each bounding box with the voxel of the octree at the same position in the three-dimensional geological voxel space.

[0053] Step (2): If the bounding box and the voxel are successfully matched, the voxel is retained as a leaf node of the octree; if the bounding box and the voxel are not successfully matched, the voxel is removed from the octree.

[0054] Step (3): Merge the leaf nodes of the octree to generate a voxel model.

[0055] In the above step (1), a bounding box is a grid. Since the base precision of the 3D geological voxel is the same as the light density, the size of the bounding box is the same as the size (precision) of the voxel.

[0056] In the above step (2), the bounding box and the voxel at the same position can represent the same voxel.

[0057] Since the outer bounding box is larger than the geological body, some corners of the outer bounding box are not in the geological body. The elements in the geological body are valid elements, and the elements in the outer bounding box but outside the geological body are invalid elements. The bounding box is matched with the element. If the match is successful, it means that the element is valid, and if the match is unsuccessful, it means that the element is invalid. Figure 5 As shown, the voxels between 12 and 34 are valid voxels, and the voxels between 23 are invalid voxels. The leaf nodes corresponding to the invalid voxels in the octree are removed.

[0058] After matching, a corresponding relationship is established between the bounding box and the voxel.

[0059] like Figure 6 As shown in the figure, the left side is a schematic diagram of the data structure of the grid structure before matching and the octree after matching. The right side is the octree before matching. Null nodes are invalid nodes. The octree after removing the Null nodes in the octree is the octree after matching. Among them, the subtree N3 is a full tree. After merging into N3, N3 becomes a leaf node.

[0060] In the above step (3), the embodiment of the present invention is to use as few bounding boxes as possible to characterize the geological body inside the geological body. After the matching is completed, the octree structure after deleting the invalid voxels is merged. The embodiment of the present invention adopts a deep post-order first traversal algorithm, so the node merging only needs to meet two conditions: 1. All sibling nodes of the current node exist, that is, the parent node of the node is a local full tree; 2. All sibling nodes belong to the same type of geological body. The adaptive sparse voxel model obtained after the merger is all the leaf nodes of the current tree. At the same time, because the tree structure is retained, spatial analysis also has a strong advantage. After the merger, the larger geological voxels are close to the center of the geological body.

[0061] The embodiment of the present invention converts a three-dimensional geological body general model into an adaptive sparse volume element model that conforms to an octree structure.

[0062] The embodiment of the present invention uses AABBTree for collision detection during the process of traversing the line. The voxel construction rule is based on the three-dimensional grid rule. Finally, the voxel is aggregated using the octree rule after it is constructed. By adopting a variety of data structures, an efficient correlation space analysis algorithm has been implemented. By merging nodes of the octree structure after deleting invalid voxels, the granularity of geological voxels under complex geological conditions such as faults and folds is fine, and the rough areas are merged into coarse-grained geological voxels. The amount of data storage can be reduced to varying degrees according to the data characteristics, and while ensuring accuracy, an exponential reduction in data reserves is achieved.

[0063] In summary, the embodiment of the present invention provides a voxel model generation method based on a three-dimensional geological body general model, which converts the three-dimensional geological body general model into multiple triangular faces according to the geological body type, and obtains a three-dimensional geological voxel space and a three-dimensional geological voxel base accuracy; determines the root node of an octree according to the vertices of the three-dimensional geological voxel space, and determines the leaf nodes of the octree according to the three-dimensional geological voxel base accuracy; constructs an AABBTree structure according to multiple triangular faces; At least one light source and light direction are set according to the vertices of the three-dimensional geological volume element space, and the base accuracy of the three-dimensional geological volume element is determined as the light density of the light source; multiple bounding boxes are determined according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces; the octree is processed according to the matching relationship between the bounding box and the volume element to generate the volume element model. Compared with the linear volume element generation method based on regular grids in related technologies, the three-dimensional geological volume element model generation algorithm is designed by introducing the AABBTree structure, setting the light source position and multi-threaded parallel acceleration strategy, which can quickly generate high-precision and low-consumption three-dimensional geological body models. While ensuring accuracy, the amount of data storage is greatly reduced. Example

[0064] The above describes in detail a method for generating a voxel model based on a three-dimensional geological body general model provided by Example 1 of the present invention. This method can also be implemented by a corresponding device. The following describes in detail a device for generating a voxel model based on a three-dimensional geological body general model provided by Example 2 of the present invention.

[0065] The second embodiment provides a device for generating a voxel model based on a universal model of a three-dimensional geological body, which is used to execute the method for generating a voxel model based on a universal model of a three-dimensional geological body proposed in the first embodiment.

[0066] See also Figure 7 FIG. 1 is a schematic diagram showing the structure of a volume element model generation device based on a three-dimensional geological body universal model provided by an embodiment of the present invention. Figure 4 As shown, the volume element model generation device based on the three-dimensional geological body universal model includes: The triangular face generation module 400 is used to convert the three-dimensional geological body general model into multiple triangular faces according to the geological body type, and obtain the three-dimensional geological body element space and the three-dimensional geological body element base accuracy.

[0067] The octree construction module 401 is used to determine the root node of the octree according to the vertices of the three-dimensional geological volume space, and determine the leaf nodes of the octree according to the three-dimensional geological volume base accuracy.

[0068] The AABBTree construction module 402 is used to construct an AABBTree structure according to a plurality of triangular faces.

[0069] The bounding box generation module 403 is used to set at least one light source and light direction according to the vertices of the three-dimensional geological volume space, determine the three-dimensional geological volume base accuracy as the light density of the light source; and determine multiple bounding boxes according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces.

[0070] The node processing module 404 is used to perform node processing on the octree according to the matching relationship between the bounding box and the voxel to generate a voxel model.

[0071] Optionally, the octree construction module 401 includes: The root node determination submodule 4011 is used to construct an outer bounding box according to the vertices of the three-dimensional geological volume element space; and use the outer bounding box as the root node of the octree; The leaf node determination submodule 4012 is used to use the base accuracy of the three-dimensional geological voxel as the cutting density; cut the outer bounding box according to the grid rule and the cutting density to obtain multiple voxels of the three-dimensional grid structure; the multiple voxels are leaf nodes of the octree.

[0072] Optionally, the AABBTree construction module 402 includes: The leaf node determination submodule 4021 is used to use multiple triangular faces as leaf nodes of AABBTree to generate an AABBTree structure; The node merging submodule 4022 is used to calculate the relative distance of multiple triangular facets according to the coordinates of the triangular facets in the three-dimensional geological volume element space; and merge each pair of adjacent leaf nodes into a parent node of the AABBTree according to the relative distance of the multiple triangular facets.

[0073] Optionally, the bounding box generation module 403 includes: The intersection point calculation submodule 4031 is used to obtain the intersection points and tangent points of the light emitted by the light source according to the light direction and multiple triangular faces through the spatial geometry fast retrieval based on the AABBTree structure through the CUDA parallel computing strategy; The bounding box determination submodule 4032 is used to connect two adjacent odd and even intersection points passing through the triangular surface to construct a geological volume element and determine it as a bounding box.

[0074] Optionally, the node processing module 404 includes: Each bounding box is matched with the voxel of the octree at the same position in the three-dimensional geological voxel space; if the bounding box and the voxel are matched successfully, the voxel is retained as the leaf node of the octree; if the bounding box and the voxel are matched unsuccessfully, the voxel is removed from the octree; the leaf nodes of the octree are merged to generate a voxel model.

[0075] Optionally, the bounding box generation module 403 includes: An outer bounding box is constructed according to the vertices of the three-dimensional geological volume element space; a three-dimensional coordinate axis is established according to the three-dimensional geological body with the vertices of the three-dimensional geological volume element space as the origin; a light source is arranged on at least one face of the outer bounding box; the light direction of the light source is parallel to an axis of the three-dimensional coordinate axis, and the axis is perpendicular to the face where the light source is located.

[0076] In summary, the embodiment of the present invention provides a voxel model generation device based on a three-dimensional geological body general model, which converts the three-dimensional geological body general model into multiple triangular faces according to the geological body type, and obtains a three-dimensional geological voxel space and a three-dimensional geological voxel base accuracy; determines the root node of an octree according to the vertices of the three-dimensional geological voxel space, and determines the leaf nodes of the octree according to the three-dimensional geological voxel base accuracy; and constructs an AABBTree structure according to multiple triangular faces; At least one light source and light direction are set according to the vertices of the three-dimensional geological volume element space, and the base accuracy of the three-dimensional geological volume element is determined as the light density of the light source; multiple bounding boxes are determined according to the intersection points of the light emitted by the light source according to the light direction and light density and multiple triangular faces; the octree is processed according to the matching relationship between the bounding box and the volume element to generate the volume element model. Compared with the linear volume element generation method based on regular grids in related technologies, the three-dimensional geological volume element model generation algorithm is designed by introducing the AABBTree structure, setting the light source position and multi-threaded parallel acceleration strategy, which can quickly generate high-precision and low-consumption three-dimensional geological body models. While ensuring accuracy, the amount of data storage is greatly reduced.

[0077] In addition, see Figure 8 The structure diagram of an electronic device shown in FIG. 1 is a schematic diagram of a structure of an electronic device. This embodiment further provides an electronic device, which includes a bus 51 , a processor 52 , a transceiver 53 , a bus interface 54 , a memory 55 and a user interface 56 . The electronic device includes a memory 55 .

[0078] In this embodiment, the electronic device further includes: one or more programs stored in the memory 55 and executable on the processor 52, configured so that the processor executes the one or more programs to perform steps 100 to 106.

[0079] The transceiver 53 is used to receive and send data under the control of the processor 52.

[0080] Among them, the bus architecture (represented by bus 51), bus 51 can include any number of interconnected buses and bridges, and bus 51 links various circuits including one or more processors represented by processor 52 and memory represented by memory 55. Bus 51 can also link various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, so this embodiment will not be further described. Bus interface 54 provides an interface between bus 51 and transceiver 53. Transceiver 53 can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. For example: transceiver 53 receives external data from other devices. Transceiver 53 is used to send data processed by processor 52 to other devices. Depending on the nature of the computing system, a user interface 56, such as a keypad, display, speaker, microphone, joystick, can also be provided.

[0081] The processor 52 is responsible for managing the bus 51 and general processing, such as running the general operating system 551 as mentioned above. The memory 55 can be used to store data used by the processor 52 when performing operations.

[0082] Optionally, the processor 52 may be, but is not limited to: a central processing unit, a single-chip microcomputer, a microprocessor or a programmable logic device.

[0083] It can be understood that the memory 55 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The memory 55 of the system and method described in the present embodiment is intended to include, but is not limited to, these and any other suitable types of memory.

[0084] In some implementations, the memory 55 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 551 and application programs 552 .

[0085] Among them, the operating system 551 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 552 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 552.

[0086] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for generating a volume element model based on a three-dimensional geological body universal model, characterized in that: include: The three-dimensional geological body universal model is converted into multiple triangular faces according to the geological body type, and the three-dimensional geological body element space and the three-dimensional geological body element base accuracy are obtained; Determine the root node of the octree according to the vertices of the three-dimensional geological volume element space, and determine the leaf nodes of the octree according to the three-dimensional geological volume element base accuracy; Constructing an AABBTree structure according to the plurality of triangular faces; At least one light source and a light direction are set according to the vertices of the three-dimensional geological volume element space, and the three-dimensional geological volume element base accuracy is determined as the light density of the light source; A plurality of bounding boxes are determined according to intersection points between the light emitted by the light source according to the light direction and the light density and the plurality of triangular faces; and nodes of the octree are processed according to a matching relationship between the bounding boxes and the voxels to generate a voxel model.

2. The method according to claim 1, characterized in that The step of determining the root node of the octree according to the vertices of the three-dimensional geological voxel space and determining the leaf nodes of the octree according to the three-dimensional geological voxel base accuracy comprises: Constructing an outer bounding box according to the vertices of the three-dimensional geological volume element space; using the outer bounding box as the root node of the octree; Using the three-dimensional geological volume element base accuracy as cutting density; The outer bounding box is cut according to the grid rule and the cutting density to obtain a plurality of volume elements of a three-dimensional grid structure; the plurality of volume elements are leaf nodes of the octree.

3. The method according to claim 1, characterized in that Constructing an AABBTree structure according to the plurality of triangular faces, including: Using the plurality of triangular faces as leaf nodes of AABBTree to generate an AABBTree structure; Calculating relative distances between a plurality of triangular facets according to coordinates of the triangular facets in the three-dimensional geological volume element space; Each pair of adjacent leaf nodes is merged into a parent node of the AABBTree according to the relative distances of the plurality of triangular facets.

4. The method according to claim 1, characterized in that: The intersection points include intersection points and tangent points, and the determining of multiple bounding boxes according to the intersection points of the light emitted by the light source according to the light direction and the multiple triangular faces includes: The intersection points and tangent points of the light emitted by the light source according to the light direction and the plurality of triangular faces are obtained by fast retrieval of the spatial geometry based on the AABBTree structure through the CUDA parallel computing strategy; The geological volume element constructed by connecting two adjacent odd and even intersection points passing through the triangular surface is determined as a bounding box.

5. The method according to claim 1, characterized in that The step of performing node processing on the octree according to the matching relationship between the bounding box and the voxel to generate a voxel model includes: Matching each of the bounding boxes with the voxels of the octree at the same position in the three-dimensional geological voxel space; In the case where the bounding box matches the voxel successfully, retaining the voxel as a leaf node of the octree; in the case where the bounding box matches the voxel unsuccessfully, removing the voxel from the octree; The leaf nodes of the octree are merged to generate a voxel model.

6. The method according to claim 1, characterized in that Setting at least one light source and a light direction according to the vertices of the three-dimensional geological volume element space includes: Constructing an outer bounding box according to the vertices of the three-dimensional geological volume element space; Taking the vertices of the three-dimensional geological volume element space as the origin, a three-dimensional coordinate axis is established according to the three-dimensional geological volume; A light source is arranged on at least one surface of the outer bounding box; the light ray of the light source is parallel to an axis of the three-dimensional coordinate axis, and the axis is perpendicular to the surface where the light source is located.

7. A volume element model generation device based on a three-dimensional geological body universal model, characterized in that: include: A triangular face generation module is used to convert the 3D geological body general model into multiple triangular faces according to the geological body type, and obtain the 3D geological body element space and the 3D geological body element base accuracy; An octree construction module, used to determine the root node of the octree according to the vertices of the three-dimensional geological volume element space, and to determine the leaf nodes of the octree according to the base accuracy of the three-dimensional geological volume element; AABBTree construction module, used for constructing an AABBTree structure according to the plurality of triangular faces; A bounding box generation module, used to set at least one light source and light direction according to the vertices of the three-dimensional geological volume space, and determine the three-dimensional geological volume base accuracy as the light density of the light source; Determine a plurality of bounding boxes according to intersection points between the light emitted by the light source according to the light direction and the light density and the plurality of triangular faces; A node processing module is used to perform node processing on the octree according to the matching relationship between the bounding box and the voxel to generate a voxel model.

8. The device according to claim 7, characterized in that The octree construction module includes: A root node determination submodule is used to construct an outer bounding box according to the vertices of the three-dimensional geological volume element space; and use the outer bounding box as the root node of the octree; The leaf node determination submodule is used to use the base accuracy of the three-dimensional geological volume element as the cutting density; cut the outer bounding box according to the grid rule and the cutting density to obtain multiple volume elements of the three-dimensional grid structure; and the multiple volume elements are leaf nodes of the octree.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are executed.

10. An electronic device, characterized in that: The electronic device includes a memory, a processor and one or more programs, wherein the one or more programs are stored in the memory and are configured so that the processor executes the steps of the method according to any one of claims 1 to 6.