Multi-scale block space indexing method based on WH-MSDM

By sorting the W-Hilbert codes and removing invalid codes of the WH-MSDM model, the low query efficiency problem of multi-scale 3D geological models is solved, and efficient spatial indexing and query are achieved.

CN120804224APending Publication Date: 2025-10-17WUHAN DIDA KUNDI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510718045.0
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

Technical Problem

Existing technologies make it difficult to efficiently manage and index multi-scale three-dimensional geological models based on block representation, resulting in inefficient queries and redundant calculations, especially insufficient performance when querying cross-scale or large-scale block data.

Method used

A multi-scale block spatial indexing method based on WH-MSDM is adopted. By constructing a WH-MSDM model, calculating the W-Hilbert code within the query space, sorting and removing invalid codes, sequential access to the WH-MSDM model and efficient spatial query are achieved.

Benefits of technology

The efficiency of block coordinate encoding within the query space is improved, the number of disk I/O times is reduced, and the query speed and system performance are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804224A_ABST
    Figure CN120804224A_ABST
Patent Text Reader

Abstract

The invention provides a multi-scale block spatial indexing method based on WH-MSDM, and relates to the field of spatial data management and indexing.The method comprises the steps that a WH-MSDM model is constructed; obtaining a query space range; determining the total number of all scale blocks in the query space range through the query space range and a WH-MSDM model; initializing an array; calculating a code of each block in a coordinate range in all hierarchies of the WH-MSDM model and adding the code into an array; sorting the elements in the array; and traversing and processing each code of the array to obtain an effective identifier of each current code in the WH-MSDM model, reading attribute data of the effective identifier, and completing spatial query of the WH-MSDM model. According to the technical scheme, the block coordinates in the query space range are coded, so that all blocks which do not meet the query conditions are directly removed, and the space screening efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of spatial data management and indexing, in particular to a multi-scale block spatial indexing method based on WH-MSDM. BACKGROUND

[0002] With the rapid development of the fields of earth science, resource exploration and engineering construction, the demand for fine cognition and efficient management of complex geological bodies is increasingly urgent. Multi-scale three-dimensional geological model data based on block representation has great potential in simulating complex underground structures because it can flexibly express the spatial heterogeneity and hierarchical relationship of geological bodies. These models usually contain a large number of block units, and their data volume is huge and their structure is complex. How to efficiently store, query and update them has become a key bottleneck restricting their widespread application.

[0003] Although there are various spatial indexing methods in the prior art, such as octree, R-tree, etc., they often fail to provide ideal performance when faced with such multi-scale and block-based geological models.

[0004] The main problem is that traditional indexing methods generally have complex index structures, low query efficiency and large I / O overhead when dealing with cross-scale queries or large-scale block data. Especially for application scenarios that require quick positioning of specific regional or specific scale geological blocks, existing indexing methods cannot effectively exclude irrelevant data, resulting in a large amount of redundant calculation and transmission, which seriously affects the query response speed and overall system performance. Therefore, there is an urgent need for a new method that can efficiently manage and index multi-scale three-dimensional geological models based on block representation to overcome the limitations of existing technology. SUMMARY

[0005] The purpose of the present application is to solve the problem of low efficiency of traditional spatial indexing methods in cross-scale or large-scale block data queries due to the large data volume and complex structure of multi-scale three-dimensional geological models based on blocks, and to provide a multi-scale block spatial indexing method based on WH-MSDM.

[0006] The above-mentioned purpose of the present application is achieved by the following technical solution: S1: Construct a WH-MSDM model; S2: Obtain a query spatial range; S3: Determine the total number of all scale blocks of the query spatial range by querying the WH-MSDM model and the query spatial range; S4: Initialize an array; S5: Calculate the encoding of each block within the coordinate range in all levels of the WH-MSDM model and add it to the array; S6: sort the elements in the array; traverse each code in the array and process it to get the effective identification of each code in the WH-MSDM model, read its attribute data, and complete the spatial query of the WH-MSDM model.

[0007] Optionally, step S2 includes: inputting the query spatial range, including the minimum value in each direction and the maximum value in each direction .

[0008] Optionally, step S3 includes: performing the following operations at scale 0 to scale of the WH-MSDM model; step S31: calculating the difference value between the current scale and the query spatial range, the formula being as follows:

[0009] step S32: calculating the coordinate range of the current scale, the calculation formula being as follows:

[0010]

[0011] wherein represents the minimum coordinate of the current scale; represents the maximum coordinate of the current scale; step S33: counting the total number of multi-scale block bodies , the calculation formula being as follows:

[0012] wherein, respectively represent the specific coordinates of the coordinate points in three directions; represents A = A + B, i.e. , represents the total number of block bodies at scale .

[0013] Optionally, step S4 includes: initializing an array of type with a length of , the array being used to record the codes of all multi-scale block bodies satisfying the spatial query range.

[0014] Optionally, step S5 includes: ​Traverse each block in the coordinate range of each level of the WH-MSDM model, calculate the encoding of each block, and add the encoding to the array In the formula, the following formula is used

[0015] In the formula, the following formula is used W-Hilbert encoding corresponding to the current block Hilbert encoding corresponding to the current block at the L level Dimension of the model

[0016] Optionally, step S6 includes: Sort the elements in the array from small to large Traverse each W-Hilbert encoding in the array from small to large and process it, and the steps are as follows: Step S61: Remove all invalid encodings before the current W-Hilbert encoding, and convert the W-Hilbert encoding into the storage location of the current block, and the formula is as follows:

[0017] In the formula, the following formula is used Storage location of the current block Step S62: Locate the valid identifier of the current block in the WH-MSDM model and read it, if invalid, jump to step S61 and traverse the next block; if valid, continue to execute step S63 Step S63: Locate all attribute values of the current block in the WH-MSDM model and read them, and complete the spatial query of the WH-MSDM model.

[0018] An electronic device includes a processor, a memory, a user interface, and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to make the electronic device execute a WH-MSDM-based multi-scale block spatial indexing method.

[0019] A computer-readable storage medium stores instructions, when the instructions are executed, a WH-MSDM-based multi-scale block spatial indexing method is executed.

[0020] The technical scheme provided by the present application has the following beneficial effects: 1. Encode the block coordinates in the query space range, thereby directly removing all blocks that do not meet the query conditions, and have high spatial filtering efficiency.

[0021] 2. The WH-MSDM model is accessed after the obtained code set is sorted, which realizes sequential access of the WH-MSDM and accelerates the access efficiency.

[0022] 3. The W-Hilbert code is adopted, and the invalid code is removed, so that the spatial clustering performance of the W-Hilbert curve can be efficiently exerted, and the number of disk I / O times can be effectively reduced. BRIEF DESCRIPTION OF DRAWINGS

[0023] The present application will be further described below in conjunction with the drawings and embodiments. In the drawings: Figure 1 is a step diagram in the embodiments of the present application; Figure 2 is an algorithm flowchart in the embodiments of the present application; Figure 3 is a schematic diagram of an electronic device structure in the embodiments of the present application; Figure 4 is a data structure design diagram of a multi-scale three-dimensional geological block data model in the embodiments of the present application; Figure 5 is a flowchart of a multi-scale three-dimensional geological block data model construction method in the embodiments of the present application. DETAILED DESCRIPTION

[0024] In order to have a clearer understanding of the technical features, objectives and effects of the present application, the specific embodiments of the present application will be described in detail with reference to the drawings.

[0025] The embodiments of the present application provide a multi-scale block spatial index method based on WH-MSDM.

[0026] Please refer to Figure 1 , Figure 1 is a step diagram of a multi-scale block spatial index method based on WH-MSDM in the embodiments of the present application, comprising: S1: constructing a WH-MSDM model; In an embodiment of the present application, the WH-MSDM model is a multi-scale three-dimensional geological block data model.

[0027] S2: obtaining a query space range; Step S2 comprises: inputting the query space range, including the minimum value and the maximum value in each direction.

[0028] S3: determining the total number of all scale blocks of the query space range through the query space range and the WH-MSDM model; Step S3 includes: At scale 0 to scale The following operations are performed below; Step S31: Calculate the coordinate range of the current scale The difference value between the query space range and the current scale , the formula is as follows:

[0029] Step S32: Calculate the coordinate range of the current scale, the calculation formula is as follows:

[0030]

[0031] Wherein represents the minimum coordinate of the current scale; represents the maximum coordinate of the current scale; Step S33: Count the total number of multi-scale blocks , the calculation formula is as follows;

[0032] Wherein, respectively represent the specific coordinates of the three directions of the coordinate point; represents A=A+B, that is , represents the total number of blocks at scale .

[0033] S4: Initialize an array; Step S4 includes: Initialize an array of type with a length of , and the array is used to record the encoding of all multi-scale blocks that meet the spatial query range.

[0034] S5: Calculate the encoding of each block within the coordinate range in all levels of the WH-MSDM model and add it to the array; Step S5 includes: Traverse each block within the coordinate range in each level of the WH-MSDM model, calculate the encoding of each block, and add the encoding to the array , the formula is as follows;

[0035] Wherein represents the W-Hilbert encoding corresponding to the current block; represents the Hilbert code corresponding to the current block in the L level; represents the dimension of the model.

[0036] S6: sort the elements in the array; traverse each code in the array and process it to obtain the effective identifier of each code in the WH-MSDM model, read its attribute data, and complete the spatial query of the WH-MSDM model.

[0037] Step S6 includes: sorting the elements in the array from small to large; traversing each W-Hilbert code in the array from small to large and processing it, the steps being as follows: Step S61: remove all invalid codes before the current W-Hilbert code, and convert the W-Hilbert code into the storage location of the current block, the formula being:

[0038] wherein represents the storage location of the current block; Step S62: locate the effective identifier of the current block in the WH-MSDM model and read it, if invalid, jump to step S61 and traverse the next block; if valid, continue to execute step S63; Step S63: locate all attribute values of the current block in the WH-MSDM model and read them, and complete the spatial query of the WH-MSDM model.

[0039] The present application provides an embodiment as shown in Figure 2 The technical scheme of the present application is mainly used to solve the problem of spatial indexing in the WH-MSDM model (the WH-MSDM model is particularly suitable for multi-region, multi-dimensional, and cross-time zone operation scenarios), by calculating the multi-scale W-Hilbert codes within the spatial query range, directly excluding those blocks that do not meet the spatial query requirements. Then, by sorting these W-Hilbert codes, sequential access to the WH-MSDM model can be achieved, thereby speeding up the access. In addition, using the random access capability of the WH-MSDM to the W-Hilbert codes, the multi-scale blocks that meet the spatial query requirements can be accurately located, thereby realizing efficient spatial query.

[0040] As shown in Figure 4As shown, the WH-MSDM model structure is composed of three parts: (1) basic information part: a total of 688 bytes, containing the following fields - model name (Name, 32 bytes), model unique identifier (UUID, 36 bytes), model boundary axis-aligned bounding box (AABB, a total of 6 double type values 48 bytes), model maximum level (Lmax, 4 bytes), maximum level block size (LmaxBlockSize, a total of 3 double values 24 bytes), maximum level block number in each direction (LmaxBlockNum, a total of 3 long type integers 24 bytes), total block number (totalBlockNum, 8 bytes), and attribute list (propertyList, using String type, each attribute name in the list is separated by a tab character "\t", a total of 512 bytes); (2) validity identification part: located after the basic information part, all blocks in the model are marked for validity in W-Hilbert curve order one by one, each mark is 1 char character, where "T" represents a valid block, and "F" represents an invalid block; (3) attribute data part: located after the validity identification, the attribute information of each block is stored in units of attributes, that is, all block attribute 1 data is stored first, then all block attribute 2 data is stored, and so on. Within each attribute data, the attribute values of each block are arranged in W-Hilbert encoding order; the order of data segments of different attributes refers to the order of the attribute list in the basic information part. Through the above data organization method, all invalid blocks in the WH-MSDM file are marked as "F" in the validity identification and their attribute data is filled with 0 in the attribute data part; the valid blocks are marked as "T" in the validity identification and the corresponding attribute values are filled in, so that the overall data remains continuous and compact.

[0041] The embodiment provides a multi-scale three-dimensional geological block data model construction method, that is, a multi-scale block integration algorithm based on WH-MSDM, as shown in Figure 5 As shown, the following processes are included: (1) read the original file of each scale, and calculate the basic information of the WH-MSDM model, mainly including the following steps; (1-1) according to the scale currently traversed, obtain the file path in the original file path Map, and open the file; (1-2) read the current scale block number through the file channel, and accumulate to calculate the total number of blocks; (1-3) read the validity of all blocks of the current scale at one time, save it to the bitmap Bitset, and add it to the validity bitmap list; (1-4) Determine whether the level corresponding to the current scale is the maximum level. If not, continue to traverse the next scale and jump to step (1-1); if it is the maximum level, continue to step (1-5).

[0042] (1-5) Read the model bounding box (AABB) of the maximum scale file, the model maximum level block size (LmaxBlockSize), the model maximum level block number in each direction (LmaxBlockNum), and the model property list (propertyList); (2) Obtain the WH-MSDM multi-scale file name based on the original file path Map and create the corresponding file; (3) Generate the multi-scale model name (Name) and unique identifier (UUID), and combine them with the previously obtained data to form the basic information of the WH-MSDM model and write them into the file; (4) Traverse each block in the original file scale by scale and perform the following operations; (4-1) Use the sequence number of the current block , and the current level , calculate the W-Hilbert code of the block, the formula is:

[0043] Where, Represents the W-Hilbert code of the block with level L and sequence number i; D Indicates the coordinate dimension, and its value is fixed to 3 in this application; Indicates the maximum number of levels, and the number of levels starts from 0. For example, when a block model integration of 3 scales is involved, The value is 2.

[0044] (4-2) Remove all invalid codes before the current W-Hilbert code and convert the W-Hilbert code into the storage location of the block. The formula is:

[0045] Where, Indicates the storage location of the block with level L and sequence number i; Indicates that the level is L and the sequence number is i W-Hilbert coding of the block; D Indicates the coordinate dimension, and its value is fixed to 3 in this application; Indicates the maximum number of levels, and the number of levels starts from 0. For example, when a block model integration of 3 scales is involved, The value is 2.

[0046] (4-3) Get the validity of the current block from the Bitset obtained in step (1-3). If valid, continue to step (4-4); if invalid, jump to step (4-5); (4-4) Write valid "T" in the corresponding position of the validity identification part, read its attribute data, and write its attribute in the corresponding position. Jump to step (4-1) to continue traversing the next block body; (4-5) Write invalid "F" in the corresponding position of the validity identification part, and fill its attribute value with 0. Jump to step (4-1) to continue traversing the next block body.

[0047] The application provides an implementation example as follows, and the subscript is the pseudo code of the index algorithm of the technical solution of the application.

[0048]

[0049] The application also discloses an electronic device. Referring to Figure 3 , Figure 3 is a structural schematic diagram of an electronic device disclosed by the embodiment of the application. The electronic device 500 can include at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.

[0050] The communication bus 502 is configured to realize the connection and communication between the components.

[0051] The user interface 503 can include a display screen, and optionally, the user interface 503 can further include a standard wired interface and a wireless interface.

[0052] The network interface 504 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0053] The application also discloses a computer readable storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the multi-scale block space index method based on WH-MSDM.

[0054] The above are only exemplary embodiments of the disclosure, and cannot limit the scope of the disclosure. That is, any equivalent changes and modifications made according to the teachings of the disclosure are still within the scope of the disclosure.

[0055] The application is intended to cover any variations, uses, or adaptive changes of the disclosure, which follow the general principles of the disclosure and include common knowledge or conventional technical means in the technical field not recorded in the disclosure. The scope and spirit of the disclosure are defined by the claims. The specification and examples are only considered as exemplary, and the scope and spirit of the disclosure are defined by the claims.

Claims

1. A multi-scale block space indexing method based on WH-MSDM, characterized in that: The method comprises the following steps: S1: Construct the WH-MSDM model; S2: Get the query space range; S3: Determine the total number of all scale blocks in the query space range through the query space range and the WH-MSDM model; S4: Initialize an array; S5: Calculate the code of each block within the coordinate range in all levels of the WH-MSDM model and add it to the array; S6: Sort the elements in the array; traverse each code in the array and process it to obtain the valid identifier of each current code in the WH-MSDM model, read its attribute data, and complete the spatial query of the WH-MSDM model.

2. The multi-scale block space indexing method based on WH-MSDM according to claim 1, characterized in that: Step S2 includes: Enter the query space range, including the minimum value in each direction and the maximum value in each direction .

3. The multi-scale block space indexing method based on WH-MSDM according to claim 2, characterized in that: Step S3 includes: In the WH-MSDM model, scale 0 to scale Do the following: Step S31: Calculate the current scale The difference between the query space and the , the following: Step S32: Calculate the coordinate range of the current scale. The calculation formula is as follows: in Indicates the minimum coordinate of the current scale; Indicates the maximum coordinate of the current scale; Step S33: Count the total number of multi-scale blocks , the calculation formula is as follows; in, Respectively represent the specific coordinates of the coordinate point in three directions; It means A=A+B, that is , Representation scale The total number of blocks below.

4. The multi-scale block space indexing method based on WH-MSDM according to claim 3, characterized in that: Step S4 includes: The initial length is of Array of type , array Used to record the encoding of all multi-scale blocks that meet the spatial query range.

5. The multi-scale block space indexing method based on WH-MSDM according to claim 4, characterized in that: Step S5 includes: Traverse each block within the coordinate range of each level of the WH-MSDM model, calculate the code of each block, and add the code to the array In the formula, the following is: in Indicates the W-Hilbert code corresponding to the current block; Indicates the Hilbert code corresponding to the current block at the L level; Represents the dimensions of the model.

6. The multi-scale block space indexing method based on WH-MSDM according to claim 5, characterized in that: Step S6 includes: Pair Array Sort the elements in from small to large; Traverse the array from small to large Each W-Hilbert code in is processed as follows: Step S61: Remove all invalid codes before the current W-Hilbert code and convert the W-Hilbert code into the storage location of the current block. The formula is: in Indicates the storage location of the current block; Step S62: Locate and read the valid identifier of the current block in the WH-MSDM model. If it is invalid, jump to step S61 and traverse the next block; if it is valid, continue to step S63; Step S63: Locate and read all attribute values ​​of the current block in the WH-MSDM model, completing the spatial query of the WH-MSDM model.

7. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 6 is executed.