Multi-scale geological block cross-scale indexing method, medium, equipment and product
The continuous encoding of multi-scale geological blocks through the W-Hilbert curve solves the problem of low efficiency of traditional indexing methods in multi-scale scenarios, realizes efficient cross-scale indexing and fast query, and is suitable for the management and analysis of large-scale three-dimensional geological data.
Patent Information
- Application Number
- CN202510722183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies make it difficult to efficiently manage and cross-level query large-scale three-dimensional geological data in multi-scale scenarios. Traditional indexing methods such as Geohash coding, octrees, and voxelized structures have high construction costs and low query efficiency for massive data.
The W-Hilbert curve is used to continuously encode multi-scale geological blocks, generating globally unique codes for parent block codes and child block codes. The mapping relationship between blocks of different scales is established through the hierarchical offset relationship of the codes, realizing efficient cross-scale indexing.
It realizes efficient cross-scale indexing of multi-scale geological blocks, improves the efficiency of spatial indexing and query response speed, and is suitable for unified management and rapid retrieval of large-scale three-dimensional geological data.
Smart Images

Figure CN120804226A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of spatial index, in particular to a multi-scale geological block cross-scale index method, medium, equipment and product. BACKGROUND
[0002] For large-scale three-dimensional geological data, discrete global grid system (DGGS) and other methods are often used to index multi-dimensional spatial data in one dimension to achieve efficient retrieval and storage. Space-filling curves (such as Morton Z curve, Hilbert curve) are widely used in spatial indexing because they can map multi-dimensional space into one-dimensional sequence. However, the traditional Hilbert curve has problems such as clustering decline and high computational complexity of sub-block coding in the multi-scale scenario, which leads to a decrease in index efficiency when performing cross-scale queries. Existing spatial indexing methods such as Geohash coding, octree or VDB structure usually have difficulty in directly supporting the unified management and cross-level query of multi-scale data. Although Geohash coding is simple in structure, it has limited support for irregularly partitioned multi-scale data; octree and voxelization structure have high construction cost under massive data and may face a large number of useless nodes during query. Therefore, there is currently a lack of an index method that can uniformly manage geological blocks of different resolutions and support efficient cross-scale retrieval. SUMMARY
[0003] The purpose of the present application is to solve the problems of low multi-scale index efficiency and complex cross-scale query, and to provide a multi-scale geological block cross-scale index method, comprising the following steps:
[0004] S1, mapping geological blocks of different scales into a unified data structure, and continuously coding the blocks of the same spatial region at different levels along the W-Hilbert curve to generate globally unique parent block codes and sub-block codes;
[0005] S2, storing the multi-scale blocks according to the W-Hilbert coding, and establishing the mapping relationship between the parent block codes and the sub-block codes of the blocks of different scales through the level offset relationship of the codes.
[0006] Further, project all geological blocks at each scale level onto the W-Hilbert curve, and determine the corresponding linear code value according to the three-dimensional coordinates of the blocks, and combine the scale level prefix or level offset to generate globally unique parent block codes and sub-block codes.
[0007] Further, the mapping relationship between the parent block codes and the sub-block codes includes querying the sub-block codes under the parent block according to the parent block code and querying the parent block code on the sub-block according to the sub-block code.
[0008] Furthermore, the specific steps for querying the sub-block code under the parent block based on the parent block code are as follows:
[0009] (1) Enter the parent block code to be queried Maximum level L max , query sub-block level CL, dimension D;
[0010] (2) Calculate the level L of the parent block to be queried;
[0011] (3) Calculate the coding offset of level L L And the encoding offset of the level CL CL , the calculation formula is as follows:
[0012]
[0013] (4) Calculate the parent block code to be queried At level L max The smallest sub-block coding and maximum sub-block coding The calculation formula is as follows:
[0014]
[0015] (5) Calculate the minimum sub-block code of the block code to be queried at level CL and maximum sub-block coding The calculation formula is as follows:
[0016]
[0017] (6) Calculate the coding interval δ on the level CL CL , the calculation formula is:
[0018]
[0019] (7) In the interval On, with δ CL As interval, traverse to get the parent block code to be queried All sub-blocks at level CL are coded.
[0020] Furthermore, the specific steps for calculating the level L of the parent block to be queried are:
[0021] Encode the parent block to be queried Perform a bitwise AND operation with 1. If the result is 0, the level L of the parent block to be queried is equal to L max ; If the result is not 0, calculate and Perform bitwise XOR on the two to get code, shift code right by n bits to make code = 1, and calculate the level L of the parent block to be queried. The calculation formula is as follows:
[0022]
[0023] Furthermore, the specific steps for querying the parent block code on the sub-block according to the sub-block code are as follows:
[0024] (1) Input the sub-block code to be queried Maximum level L max ,queried parent block level PL, dimension D;
[0025] (2) Calculate the parent block code of the query result At level L max Minimum sub-block coding on The calculation formula is:
[0026]
[0027] (3) Calculate the coding offset of the PL level PL , the calculation formula is as follows:
[0028]
[0029] (4) Calculate the parent block code of the query result The formula is as follows:
[0030]
[0031] The present invention also provides a computer-readable storage medium storing a computer program, which implements the above-mentioned multi-scale geological block cross-scale indexing method when executed by a processor.
[0032] The present invention also proposes an electronic device, comprising a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the above-mentioned multi-scale geological block cross-scale indexing method.
[0033] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned multi-scale geological block cross-scale indexing method when executed by a processor.
[0034] The beneficial effects brought about by the technical solution provided by the present invention are:
[0035] The present application firstly encodes different scale geological blocks along the W-Hilbert curve by the WH-MSDM model to generate globally unique encoding of parent block encoding and child block encoding, and uses the superior clustering characteristics of the W-Hilbert curve in the multi-scale space to ensure that different scale blocks have continuous encoding distribution in the same space region. According to the child block query algorithm and the parent block query algorithm, the W-Hilbert encoding is used to quickly calculate the parent-child encoding, the random access ability of the WH-MSDM to the encoding is used to accurately locate the cross-scale blocks, and the efficient cross-scale index of the multi-scale geological blocks is realized. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 is a flowchart of the multi-scale geological block cross-scale indexing method of the embodiment of the present application;
[0037] Figure 2 is a flowchart of the child block query algorithm based on WH-MSDM of the embodiment of the present application;
[0038] Figure 3 is a flowchart of the parent block query algorithm based on WH-MSDM of the embodiment of the present application;
[0039] Figure 4 is a block diagram of an electronic device in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0040] To make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described below with reference to the drawings.
[0041] The flowchart of the multi-scale geological block cross-scale indexing method of the embodiment of the present application is as shown in Figure 1 , and specifically includes the following steps:
[0042] S1, map different scale geological blocks to a unified data structure, and continuously encode the blocks at different levels in the same space region along the W-Hilbert curve to generate globally unique encoding of parent block encoding and child block encoding.
[0043] The geological data sources include different scale data, such as high resolution data: drilling data (lithology, logging curve), three-dimensional seismic exploration (reflected wave data), LiDAR terrain data, outcrop measurement, etc. Low resolution data: regional geological map, gravity / magnetic method exploration data, remote sensing image, etc. According to the requirements, different resolution (different scale) blocks can be generated based on grid division. The multi-scale geological block model from kilometer level (regional structure) to centimeter level (rock slice) is generated to meet the requirements of different application scenarios.
[0044] Firstly, the multi-scale data is preprocessed according to the WH-MSDM (W-Hilbert based Multi-Scale Data Model). For each scale level L, all the geological blocks at this level are projected onto the W-Hilbert curve, and the corresponding linear encoding value is determined according to the three-dimensional coordinates of the block. The encoding rule can adopt the existing W-Hilbert curve algorithm to map the three-dimensional coordinates into a Hilbert sequence number, and then combine it with the scale level prefix or level offset to generate a globally unique encoding of the parent block and child block encoding. The blocks at all levels are stored in a unified data structure from small to large according to the encoding, and a level offset table is established to calculate the encoding mapping relationship between different levels.
[0045] The specific steps of continuous encoding of the parent block and the child block in the same spatial area along the curve are as follows:
[0046] (1) For the cell point P(x, y, z) corresponding to the block to be encoded, layer-by-layer subdivision and arrangement are performed on the preset level depth l. At the initialization, the Hilbert code H0 is set to zero, and an initial state vector s1 is assigned. Starting from the first layer, the entire space is uniformly divided into eight sub-cells, and the sub-cell number r e {0,..., 7} into which P falls is quickly located according to the coordinates of P. Since the access order of the sub-cells is different in different states, the number r is converted into the access sequence number i of the current layer l by querying the sub-cell traversal table, and it is spliced to the end of the current Hilbert code, i.e. H l l-1 × 8 + i.
[0047] (2) The state transition table is used to calculate the state vector s k of the next layer according to the current state s k+1 and the sub-cell sequence number i just accessed, so as to ensure the continuity and rotation consistency of the global path. With the layer index k increasing from 1 to l, the step (1) is cycled until the processing of the lth layer is completed. The final output H l is the one-dimensional linear encoding of P(x, y, z) on the lth layer Hilbert curve, denoted as H(x, y, z).
[0048] (3) The parent-child continuous encoding of the block at each scale level is performed through the calculation formula of the W-Hilbert encoding, and the formula is as follows:
[0049]
[0050] In the formula, W-Hilbert encoding of the block with level L and sequence number H(x,y,z) (denoted by the i-th block); D represents the coordinate dimension; L represents the maximum level number max The maximum level number, in the multi-scale block integration model, the maximum level refers to the level with the minimum length, width and height of a single block, which is the most detailed scale.
[0051] S2, storing the multi-scale block according to the W-Hilbert encoding, in the unified data structure, the multi-scale block is stored in order according to the W-Hilbert encoding. For each block, record its encoding, spatial coordinate range and associated information. Through the level offset relationship of the encoding, the mapping relationship between the parent block encoding and the child block encoding of different scale blocks is established.
[0052] The mapping relationship between the parent block encoding and the child block encoding includes: querying the child block encoding under the parent block according to the parent block encoding and querying the parent block encoding on the child block according to the child block encoding.
[0053] For the query requirement from the parent block to its child block in the cross-scale query, the following steps are designed: according to the input parent block encoding and the target query scale, the scale difference value is calculated; according to the scale difference value and the spatial dimension, the encoding offset is calculated; then all child block encodings in the query parent block encoding range are traversed. The flow chart of the child block query algorithm of the WH-MSDM embodiment of the present application is shown in Figure 2 The specific steps of querying the child block encoding under the parent block according to the parent block encoding are as follows:
[0054] (1) input the parent block encoding to be queried i represents the i-th encoding, and the maximum level L max , the level CL of the queried child block, and the dimension D.
[0055] (2) calculate the level L of the parent block to be queried, and the specific steps are as follows:
[0056] perform a bitwise AND operation on the parent block encoding to be queried and 1, if the result is 0, the level L of the parent block to be queried is equal to L max ; if the result is not 0, calculate and , and perform a bitwise XOR operation on the two, to obtain code, and right shift code by n bits, so that code = 1, calculate the level L of the parent block to be queried, and the calculation formula is as follows:
[0057]
[0058] (3) calculate the encoding offset offset L of the level L and the encoding offset offset CL, the coding offset is the difference between the coding of a certain hierarchical block and the minimum (or maximum) coding of all sub-blocks contained in it. The calculation formula is as follows:
[0059]
[0060] (4) Calculate the parent block coding to be queried The minimum sub-block coding max and the maximum sub-block coding in the hierarchical level L The calculation formula is as follows:
[0061]
[0062] (5) Calculate the minimum sub-block coding and the maximum sub-block coding of the block to be queried in the hierarchical level CL The calculation formula is as follows:
[0063]
[0064] (6) Calculate the coding interval δ CL in the hierarchical level CL
[0065] The calculation formula is as follows:
[0066] (7) Traverse the interval with the interval δ CL to obtain all sub-block codings of the parent block coding in the hierarchical level CL
[0067] Use all sub-block codings in the hierarchical level CL to query all information in WH-MSDM.
[0068] For the requirement of querying the parent block from the sub-block, the following steps are designed: according to the input sub-block coding and target scale, calculate the scale difference; use the right shift operation or integer division to calculate the parent block coding, obtain the unique coding of the parent block, and quickly locate the corresponding parent block. The specific steps of querying the parent block coding on the sub-block according to the sub-block coding are as follows:
[0069] (1) Input the sub-block coding to be queried The maximum hierarchical level L max , the parent block hierarchical level PL to be queried, and the dimension D.
[0070] (2) Calculate the minimum sub-block coding of the parent block coding to be queried in the hierarchical level L max The calculation formula is as follows:
[0071]
[0072] (3) Calculate the encoding offset of the hierarchical PL PL , the calculation formula is as follows:
[0073]
[0074] (4) Calculate the parent block encoding of the query result The formula is as follows:
[0075]
[0076] Using the obtained parent block encoding, the entire information is queried in the WH-MSDM.
[0077] Through the above technical scheme, the present application can realize efficient cross-scale indexing of multi-scale geological blocks. By using the superior clustering characteristics of the W-Hilbert curve in the multi-scale space, the method ensures that the blocks of different scales have continuous encoding distribution in the same spatial region, and the sub-block and parent block query algorithm based on the encoding offset has the characteristics of simple calculation and efficient query, significantly reducing the traversal range and calculation amount. Compared with the traditional method, the present application realizes unified management and fast retrieval of multi-scale blocks, significantly improves the efficiency and query response speed of spatial indexing, and is suitable for organization and analysis of large-scale three-dimensional geological data.
[0078] In an exemplary embodiment, a computer readable storage medium is included, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the above-mentioned multi-scale geological block cross-scale indexing method.
[0079] Please refer to Figure 4 In an exemplary embodiment, an electronic device is also included, which includes at least one processor, at least one memory, and at least one communication bus.
[0080] The memory stores a computer program, and the computer program includes computer readable instructions. The processor calls the computer readable instructions stored in the memory through the communication bus, and executes the above-mentioned multi-scale geological block cross-scale indexing method.
[0081] In an exemplary embodiment, a computer program product is proposed, which includes computer program / instructions. The computer program / instructions are executed by a processor to implement the steps of the above-mentioned multi-scale geological block cross-scale indexing method.
[0082] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the appended claims are intended to cover all such modifications that do not depart from the true spirit and scope of the application. Therefore, the application is not limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A multi-scale geological block cross-scale indexing method, characterized in that: The following steps are involved: S1. Map geological blocks of different scales into a unified data structure. Blocks at different levels in the same spatial region are continuously coded along the W-Hilbert curve to generate globally unique codes for parent block codes and child block codes. S2. Multi-scale blocks are stored according to W-Hilbert coding, and a mapping relationship between parent block coding and child block coding between blocks of different scales is established through the hierarchical offset relationship of the coding.
2. A multi-scale geological block cross-scale indexing method according to claim 1, characterized in that: All geological blocks at each scale level are projected onto the W-Hilbert curve, and the corresponding linear code values are determined according to the three-dimensional coordinates of the blocks. They are combined according to the scale level prefix or level offset to generate a globally unique code for the parent block code and the child block code.
3. A multi-scale geological block cross-scale indexing method according to claim 1, characterized in that: The mapping relationship between the parent block code and the sub-block code includes: querying the sub-block code under the parent block according to the parent block code and querying the parent block code on the sub-block according to the sub-block code.
4. A multi-scale geological block cross-scale indexing method according to claim 3, characterized in that: The specific steps for querying the sub-block code under the parent block according to the parent block code are as follows: (1) Enter the parent block code to be queried Maximum level L max , query sub-block level CL, dimension D; (2) Calculate the level L of the parent block to be queried; (3) Calculate the coding offset of level L L And the encoding offset of the level CL CL , the calculation formula is as follows: (4) Calculate the parent block code to be queried At level L max Minimum sub-block coding and maximum sub-block coding The calculation formula is as follows: (5) Calculate the minimum sub-block code of the block code to be queried at level CL and maximum sub-block coding The calculation formula is as follows: (6) Calculate the coding interval δ on the level CL CL , the calculation formula is: (7) In the interval On, with δ CL For the interval, traverse to get the parent block code to be queried All sub-blocks at level CL are coded.
5. A multi-scale geological block cross-scale indexing method according to claim 4, characterized in that: The specific steps for calculating the level L of the parent block to be queried are: Encode the parent block to be queried Perform a bitwise AND operation with 1. If the result is 0, the level L of the parent block to be queried is equal to L max ; If the result is not 0, calculate and Perform bitwise XOR on the two to get code, shift code right by n bits to make code = 1, and calculate the level L of the parent block to be queried. The calculation formula is as follows:
6. A multi-scale geological block cross-scale indexing method according to claim 3, characterized in that: The specific steps for querying the parent block code on the sub-block according to the sub-block code are: (1) Input the sub-block code to be queried Maximum level L max ,queried parent block level PL, dimension D; (2) Calculate the parent block code of the query result At level L max Minimum sub-block coding on The calculation formula is: (3) Calculate the coding offset of the PL level PL , the calculation formula is as follows: (4) Calculate the parent block code of the query result The formula is as follows:
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the method according to any one of claims 1 to 6.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Non-rigid grid coding method and device, spatial object unique identification method and device and query method and device
CN111475597A
Geographic grid model-based mining area ecological evolution big data multi-scale query method
CN114090714A