+

CN114048204A - Beidou grid space indexing method and device based on database inverted index - Google Patents

Beidou grid space indexing method and device based on database inverted index Download PDF

Info

Publication number
CN114048204A
CN114048204A CN202111143748.3A CN202111143748A CN114048204A CN 114048204 A CN114048204 A CN 114048204A CN 202111143748 A CN202111143748 A CN 202111143748A CN 114048204 A CN114048204 A CN 114048204A
Authority
CN
China
Prior art keywords
grid
beidou
spatial
level
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111143748.3A
Other languages
Chinese (zh)
Other versions
CN114048204B (en
Inventor
杨光辉
张建学
王焰辉
张敬亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongke Star Map Co ltd
Original Assignee
Zhongke Star Map Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Star Map Co ltd filed Critical Zhongke Star Map Co ltd
Priority to CN202111143748.3A priority Critical patent/CN114048204B/en
Publication of CN114048204A publication Critical patent/CN114048204A/en
Application granted granted Critical
Publication of CN114048204B publication Critical patent/CN114048204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开实施例提供一种基于数据库倒排索引的北斗网格空间索引方法和装置,所述方法包括:获取目标查询范围,确定所述目标查询范围对应的北斗网格集合;对所述北斗网格集合中的每一个北斗网格,基于GIN倒排索引,在关系型数据库中确定该北斗网格对应的空间对象,遍历所述北斗网格集合中的全部北斗网格,确定对应的空间对象,生成空间对象集合。以此方式,能够在查询空间对象的过程中减小索引数据量,降低计算开销。

Figure 202111143748

Embodiments of the present disclosure provide a Beidou grid spatial indexing method and device based on database inverted index, the method includes: acquiring a target query range, determining a Beidou grid set corresponding to the target query range; For each Beidou grid in the grid set, based on the GIN inverted index, determine the spatial object corresponding to the Beidou grid in the relational database, traverse all the Beidou grids in the Beidou grid set, and determine the corresponding spatial object , which generates a collection of spatial objects. In this way, the amount of index data can be reduced in the process of querying spatial objects, and the computational overhead can be reduced.

Figure 202111143748

Description

Beidou grid space indexing method and device based on database inverted index
Technical Field
The embodiment of the disclosure relates to the technical field of geographic information processing, and more particularly to a Beidou grid spatial indexing method and device based on database inverted index.
Background
A traditional spatial database is combined with an R-Tree to construct an index method aiming at spatial data types (geometry), so that the requirement for improving the retrieval performance is met.
The core idea of the R-Tree index is to aggregate nodes with similar distances and represent the nodes as the minimum bounding rectangles of the nodes at the upper layer of the Tree structure, and the minimum bounding rectangles become the nodes of the upper layer. Since all nodes are in their minimum bounding rectangle, queries that are disjoint from a rectangle must be disjoint from all nodes in that rectangle. Each rectangle on a leaf node represents an object, the nodes are aggregates of objects, and the more objects aggregated up the top level.
All the R-Tree index table records are stored on leaf nodes, the space occupied by the leaf nodes reaches one page in the database, the leaf nodes are divided to generate intermediate nodes, the space occupied by the intermediate nodes reaches one page in the database, and the intermediate nodes are continuously divided, so that more intermediate nodes are generated along with the increase of the data volume, and the index is gradually increased.
Meanwhile, the minimum circumscribed rectangle can only estimate the relationship between spatial data with coarse granularity, and has a certain precision error, so that in order to meet the requirement of correctness, recheck operation needs to be further executed to accurately position the relationship between the calculated data, which increases the calculation overhead and reduces the retrieval performance.
Disclosure of Invention
According to the embodiment of the disclosure, the Beidou grid spatial index scheme based on the database inverted index is provided, and the index data volume is small, and the calculation cost is low.
In a first aspect of the disclosure, a Beidou grid space indexing method based on database inverted index is provided, which includes:
acquiring a target query range, and determining a Beidou grid set corresponding to the target query range;
and for each Beidou grid in the Beidou grid set, determining a space object corresponding to the Beidou grid in a relational database based on a GIN inverted index, traversing all the Beidou grids in the Beidou grid set, determining the corresponding space object, and generating a space object set.
In some embodiments, the Beidou grid set corresponding to the target query range comprises grids of the same and/or different grid levels.
In some embodiments, the coordinate information in the relational database is stored in a grid cell form, the grid cell form is stored by using a tb _ location table as a model, the tb _ location table includes longitude and latitude and elevation fields of a coordinate system and grid fields, and the grid fields include a grid level field level, a longitude and latitude subdivision coding field code and an elevation subdivision coding field zcode.
In some embodiments, the method further comprises:
the spatial objects in the relational database are stored in the form of grid unit sets, wherein the grid unit sets include longitude and latitude subdivision coding fields code and grid level field level of grid units in corresponding two-dimensional spatial objects, or the longitude and latitude subdivision coding fields code, the grid level field level and the elevation subdivision coding field zcode of the grid units in three-dimensional spatial objects.
In some embodiments, the method further comprises:
the method comprises the steps of establishing indexes of space objects and grid cells in advance, and establishing GIN (graphic information network) inverted indexes of the space objects and the grid cells based on grid cells gridcell.
In some embodiments, the pre-indexing spatial objects and the index for establishing grid cells, and the establishing of the GIN inverted index for spatial objects and grid cells based on grid cells gridcell includes:
the method comprises the steps of determining a minimum grid level grid unit contained in each space object in advance, establishing indexes of the space objects and the minimum grid level grid unit, and establishing GIN (graphic information network) inverted indexes of the space objects and the grid units based on the minimum grid level grid unit.
In some embodiments, the method further comprises:
and establishing indexes among grid cells gridcell based on a hierarchical relationship in an interval range corresponding to the grid level corresponding to the minimum grid level grid cell.
In a second aspect of the present disclosure, a Beidou grid spatial indexing device based on database inverted index is provided, including:
the query request receiving module is used for acquiring a target query range and determining a Beidou grid set corresponding to the target query range;
and the space object set generation module is used for determining a space object corresponding to each Beidou grid in the Beidou grid set in a relational database based on the GIN inverted index, traversing all the Beidou grids in the Beidou grid set, determining the corresponding space object and generating a space object set.
In a third aspect of the present disclosure, an electronic device is provided, comprising a memory having stored thereon a computer program and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method as set forth above.
According to the Beidou grid space indexing method based on the database inverted index, the index data volume can be reduced, and the calculation cost is reduced.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
fig. 1 shows a flowchart of a first method for indexing a Beidou grid space based on an inverted database index according to an embodiment of the present disclosure;
fig. 2 shows a flowchart of a method for generating a spatial database based on a Beidou grid relational database according to a second embodiment of the disclosure;
fig. 3 shows a schematic structural diagram of a third example of the present disclosure, which is based on a Beidou grid spatial indexing device with inverted database indexing;
fig. 4 shows a schematic structural diagram of a Beidou grid spatial indexing device based on database inverted index in the fourth embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
According to the Beidou grid space indexing method based on the inverted index of the database, the index data volume can be reduced in the process of inquiring the space object, and the calculation cost is reduced. Specifically, as shown in fig. 1, the method is a flowchart of a first method for indexing a Beidou grid space based on a database inverted index according to an embodiment of the present disclosure. As can be seen from fig. 1, the Beidou grid space indexing method based on the database inverted index of the embodiment may include the following steps:
s101: and acquiring a target query range, and determining a Beidou grid set corresponding to the target query range.
The method of this embodiment may be applied to query space objects in a certain area range, such as how many schools are in a certain urban area, or how many cells are in the same area. The urban area is the target query range mentioned in this embodiment, and the school (or cell) is the space object mentioned in this embodiment. The method of this embodiment is based on a pre-constructed Beidou grid relational database, and when constructing the Beidou grid relational database, reference may be made to a flowchart of a method for generating a spatial database based on the Beidou grid relational database shown in fig. 2, and specifically includes the following steps:
s201: acquiring two-dimensional coordinate information or three-dimensional coordinate information in a relational database, wherein the two-dimensional coordinate information or the three-dimensional coordinate information is stored in the relational database in a tb _ location table form.
The method comprises the steps of firstly obtaining two-dimensional coordinate information or three-dimensional coordinate information in a relational database, wherein the two-dimensional coordinate information or the three-dimensional coordinate information is stored in the relational database in a tb _ location table form.
S202: and determining the corresponding Beidou subdivision grid code hierarchy according to the actual application scene of the two-dimensional coordinate information or the three-dimensional coordinate information, and generating a corresponding hierarchy field level.
After the two-dimensional coordinate information or the three-dimensional coordinate information in the relational database is obtained, the corresponding Beidou subdivision grid code hierarchy needs to be further determined, and a corresponding hierarchy field level is generated.
S203: and converting the two-dimensional coordinate information or the three-dimensional coordinate information into Beidou subdivision grid codes of corresponding levels, and generating corresponding longitude and latitude subdivision code fields and elevation subdivision code fields zcode.
S204: and packaging the level field level, the longitude and latitude subdivision coding field code and the elevation subdivision coding field zcode into a same field grid, storing the field grid in a tb _ location table corresponding to two-dimensional coordinate information or three-dimensional coordinate information in the relational database, and generating grid cells.
The grid cells gridcell are of a composite type and are used for representing a 2D or 3D unit grid in the Beidou subdivision, and the 2D or 3D unit grid is coordinate information in the relational data. The Beidou subdivision grid is divided into a 2D grid and a 3D grid, wherein the 2D grid is subjected to binary subdivision through latitude and longitude respectively, and then combined into one-dimensional binary codes through Morton codes. The grid level is from 1-32 levels, each level is expressed by 2 binary bits, and 32-level two-dimensional codes can be stored by using 64-bit unsigned Long shape (unsigned Long). The 3D grid is added with elevation subdivision codes on the basis of the 2D grid, the range of elevation subdivision is also 1-32 levels, and 1 binary bit represents the first-level subdivision. A 32-bit unsigned Int may be used to store a 32-level program code. The hierarchy ranges from 1 to 32, and an unscheduled char can be used to store the hierarchy; since gridcell is compatible with 2D/3D, a type mark dim needs to be specified to distinguish two-dimensional grids from three-dimensional grids.
In summary, the structure of gridcell data types is as follows:
Figure BDA0003284946490000061
the variables in the structure are as follows:
Figure BDA0003284946490000062
Figure BDA0003284946490000071
in either 32-bit or 64-bit operating systems, after memory alignment, the memory space occupied by a gridcell object is 16 bytes.
And two three-dimensional gridcell generating functions are respectively realized, and the prototype is as follows:
gridcell ST_AsGridcell(double lng,double lat,integer level)
gridcell ST _ AsGridcell3D (double ng, double lat, double height, integer level) takes ST _ AsGridcell3D as an example to illustrate the calculation steps:
tb _ location is a table in the relational database, and long, lat, height are coordinates longitude, latitude, elevation, respectively.
2. Adding a field named grid with the type of gridcell to the tb _ location table
3. Determining the level of the grid according to the business requirement
4. The grid field in tb _ location is updated by the update statement.
Update tb_location set grid=st_AsGridcell(lng,lat,height,level)。
5. And in st _ AsGridcell, for the lng, lat, height and level transmitted into each group, generating a corresponding longitude and latitude subdivision code and an elevation subdivision code zcode through a Beidou mesh subdivision algorithm, and packaging the longitude and latitude subdivision code and the elevation subdivision code together with the level into a gridcell object to return.
Serializing each gridcell object by an Update statement and writing the serialized gridcell object into a grid field
7. The execution loops until all rows in the table are executed.
By the method, the coordinate information in the relational database can be converted into the form of the Beidou subdivision grid code and stored. And the coordinate information in the Beidou grid code form and the original coordinate information in the relational database are packaged together, so that the data packaging property and consistency are ensured, the data management is convenient, and meanwhile, the conversion technology of the coordinate information coding form is completed in the database, so that the parallel computing capability of the database can be fully utilized.
And in addition, a space object is further defined in the Beidou grid relational database, the space object in the relational database is stored in a form of grid unit sets georgrid, and the grid unit sets georgrid comprise longitude and latitude subdivision coding fields code and grid level fields level of grid units in corresponding two-dimensional space objects, or the longitude and latitude subdivision coding fields code, the grid level fields level and the elevation subdivision coding fields zcode of the grid units in the three-dimensional space objects. Different levels of unit grids may exist in a grid unit set georgrid, and the level of the grid unit with the highest level is the level of the georgrid object and is called detailLevel. That is, in the beidou grid relational database, the spatial objects are in one-to-one correspondence with the grid cell sets georgrids. In order to realize the one-to-one correspondence between the space object and the grid cell set georgrid, indexes of the space object and the grid cells can be established, and GIN inverted indexes of the space object and the grid cells are established based on the grid cells gridcell. Specifically, a minimum grid level grid unit contained in each space object is predetermined, indexes of the space objects and the minimum grid level grid unit are established, and GIN inverted indexes of the space objects and the grid units are established based on the minimum grid level grid unit. And establishing indexes among grid cells gridcell based on a hierarchical relationship in the interval range corresponding to the grid level corresponding to the minimum grid level grid cell.
In short, one spatial data record corresponds to one piece of georgrid data, one piece of georgrid data corresponds to a plurality of pieces of gridcell data, and each piece of gridcell data and grid data related to the gridcell are stored in the index structure as key values of the GIN index.
After the description of the data structure in the Beidou grid relational database, a specific example is taken as an example below to further describe the scheme of the embodiment of the present disclosure. Firstly, establishing an association relation between a space object and a grid unit set georgrid, wherein the space object is not limited to schools and cells, but also can be other objects such as districts, lakes, overpasses and the like. Taking schools as an example, the Beidou grids included in each school are determined, and the included Beidou grids are the grids with the lowest hierarchy, for example, an 8-level grid includes 4 9-level grids, and the 8-level grid and the 4 9-level grids included in the 8-level grid are all in the region of the school, only the association relationship between the school and the 8-level grid is established, and the association relationship between the school and the other 4 9-level grids is not established, that is, the region in the school is represented by codes corresponding to the 8-level grids, and the region in the school is represented by codes corresponding to the 4 9-level grids. Through the mode, the Beidou grids contained in all schools are established, and similarly, the Beidou grids contained in all cells can be determined. Then according to the same method, Beidou grids contained in a region larger than a school region, such as a city, a village and a town, a county, a city, a province and other prefectures, or Beidou grids contained in a region smaller than the school region, such as a dormitory, a dining room, a teaching building and the like, can be established, and Beidou grids contained in parking spaces, green belts and the like can be established in a cell. Then, indexes of the space objects and the minimum grid level grid units are established, and GIN inverted indexes of the space objects and the grid units are established based on the minimum grid level grid units. And establishing indexes among grid cells gridcell based on a hierarchical relationship in the interval range corresponding to the grid level corresponding to the minimum grid level grid cell. GIN (Generalized Inverted Index) is an Index structure that stores a set of pairs (keys), where a key is a key value and a nesting list is a set of TIDs (thread control symbols) in which the key has occurred. For each attribute in the table, each item may be resolved into multiple keys when the index is built, the same TID may appear in multiple posting lists, and each key value is stored only once, so the GIN index is very compact in the case that the same key appears in the item multiple times.
S102: and for each Beidou grid in the Beidou grid set, determining a space object corresponding to the Beidou grid in a relational database based on a GIN inverted index, traversing all the Beidou grids in the Beidou grid set, determining the corresponding space object, and generating a space object set.
In this embodiment, the target query range may be one spatial object or a set of several spatial objects, or may be one region, and after the Beidou grid set corresponding to the target query range is determined, for each Beidou grid (the Beidou grid is the Beidou grid of the minimum grid level) in the Beidou grid set, based on the GIN inverted index, the spatial object corresponding to the Beidou grid, that is, the spatial object having an index relationship with the grid is determined in the relational database, for example, if the grid is in one spatial object, the spatial object having an index relationship is one, the grid is partially in one spatial object, and is partially in another spatial object, the spatial objects having an index relationship are two, and similarly, the spatial objects having an index relationship with the grid may also be multiple. And traversing all the Beidou grids in the Beidou grid set according to the same mode, determining corresponding spatial objects, and generating a spatial object set so as to determine the pre-query spatial objects existing in the target query range.
The above process of this embodiment is only an illustration of the principle of the query process, and for querying different types of spatial objects, for example, how to determine whether the queried spatial object is a cell or a school, a field may be added in the grid cell set georgrid corresponding to the spatial object, where the field represents the attribute of the control object, such as a school, a cell, and the like, so that, in the process of querying the spatial object, the query may be performed only from the school or only from the cell.
Because the number of the grid units in the whole world is also fixed and unchanged, the phenomenon of abrupt increase of index data can not occur along with the increase of data volume, so that the index data volume can be reduced, the accurate judgment on the Beidou split code grid index relationship can be realized, the data relationship can be accurately matched through a binary bit operation method of shaping data in the index retrieval process, further relationship judgment is not needed, the calculation cost is reduced, and the query performance is improved.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily essential to the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
As shown in fig. 3, is a schematic structural diagram of a third example of the present disclosure of a Beidou grid spatial indexing device based on database inverted index. The big dipper grid space indexing means based on database inverted index of this embodiment includes:
the query request receiving module 301 is configured to obtain a target query range, and determine a Beidou grid set corresponding to the target query range.
The spatial object set generating module 302 is configured to determine, based on the GIN inverted index, a spatial object corresponding to each beidou mesh in the beidou mesh set in the relational database, traverse all beidou meshes in the beidou mesh set, determine a corresponding spatial object, and generate a spatial object set.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 4 shows a schematic block diagram of an electronic device 400 that may be used to implement an embodiment method of the present disclosure. As shown, the arrangement 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)402 or loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, or the like; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408 such as a magnetic disk, optical disk, or the like; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Processing unit 401 performs the various methods and processes described above, and is tangibly embodied in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by CPU 401, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the CPU 401 may be configured to perform the above-described method in any other suitable manner (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1.一种基于数据库倒排索引的北斗网格空间索引方法,其特征在于,包括:1. a Beidou grid space indexing method based on database inverted index, is characterized in that, comprises: 获取目标查询范围,确定所述目标查询范围对应的北斗网格集合;Obtain the target query range, and determine the Beidou grid set corresponding to the target query range; 对所述北斗网格集合中的每一个北斗网格,基于GIN倒排索引,在关系型数据库中确定该北斗网格对应的空间对象,遍历所述北斗网格集合中的全部北斗网格,确定对应的空间对象,生成空间对象集合。For each Beidou grid in the Beidou grid set, based on the GIN inverted index, determine the spatial object corresponding to the Beidou grid in the relational database, and traverse all the Beidou grids in the Beidou grid set, Determine the corresponding space object, and generate a space object set. 2.根据权利要求1所述的基于数据库倒排索引的北斗网格空间索引方法,其特征在于,所述目标查询范围对应的北斗网格集合包括相同和/或不同网格层级的网格。2 . The Beidou grid spatial indexing method based on database inverted index according to claim 1 , wherein the Beidou grid set corresponding to the target query range includes grids of the same and/or different grid levels. 3 . 3.根据权利要求1所述的基于数据库倒排索引的北斗网格空间索引方法,其特征在于,所述关系型数据库中的坐标信息以网格单元gridcell的形式存储,所述网格单元gridcell以tb_location表为模型进行存储,tb_location表中包括坐标系的经纬度和高程字段以及grid字段,其中,grid字段包括网格层级字段level、经纬度剖分编码字段code和高程剖分编码字段zcode。3. the Big Dipper grid space indexing method based on database inverted index according to claim 1, is characterized in that, the coordinate information in described relational database is stored in the form of grid cell gridcell, and described grid cell gridcell The tb_location table is used as the model for storage. The tb_location table includes the latitude, longitude and elevation fields of the coordinate system and the grid field. The grid field includes the grid level field level, the latitude and longitude division coding field code, and the elevation division coding field zcode. 4.根据权利要求3所述的基于数据库倒排索引的北斗网格空间索引方法,其特征在于,所述方法还包括:4. The Beidou grid spatial index method based on database inverted index according to claim 3, wherein the method further comprises: 所述关系型数据库中的空间对象以网格单元集合geomgrids的形式存储,所述网格单元集合geomgrids包括对应的二维空间对象中的网格单元的经纬度剖分编码字段code和网格层级字段level,或者,三维空间对象中的网格单元的经纬度剖分编码字段code、网格层级字段level和高程剖分编码字段zcode。The spatial objects in the relational database are stored in the form of grid cell collection geomgrids, and the grid cell collection geomgrids includes the latitude and longitude division coding field code and grid level field of the grid cell in the corresponding two-dimensional space object level, or, the latitude and longitude division coding field code, the grid level field level, and the elevation division coding field zcode of the grid cells in the three-dimensional space object. 5.根据权利要求4所述的基于数据库倒排索引的北斗网格空间索引方法,其特征在于,所述方法还包括:5. The Beidou grid spatial indexing method based on database inverted index according to claim 4, wherein the method further comprises: 预先建立空间对象与网格单元的索引,基于网格单元gridcell建立空间对象与网格单元的GIN倒排索引。Indexes of spatial objects and grid cells are established in advance, and GIN inverted indexes of spatial objects and grid cells are established based on grid cells gridcell. 6.根据权利要求5所述的基于数据库倒排索引的北斗网格空间索引方法,其特征在于,所述预先空间对象与建立网格单元的索引,基于网格单元gridcell建立空间对象与网格单元的GIN倒排索引,包括:6. The Big Dipper grid spatial indexing method based on database inverted index according to claim 5, is characterized in that, described pre-spatial object and the index of establishing grid cell, establish spatial object and grid based on grid cell gridcell The GIN inverted index of the cell, including: 预先确定每个空间对象中包含的最小网格层级网格单元,建立空间对象与所述最小网格层级网格单元的索引,基于所述最小网格层级网格单元,建立空间对象与网格单元的GIN倒排索引。Predetermining the minimum grid-level grid unit included in each spatial object, establishing an index between the spatial object and the minimum grid-level grid unit, and establishing the spatial object and the grid based on the minimum grid-level grid unit The GIN inverted index of the cell. 7.根据权利要求6所述的基于数据库倒排索引的北斗网格空间索引方法,其特征在于,所述方法还包括:7. The Beidou grid spatial index method based on database inverted index according to claim 6, wherein the method further comprises: 在所述最小网格层级网格单元对应的网格层级对应的区间范围内,基于层级关系建立网格单元gridcell之间的索引。Within the interval range corresponding to the grid level corresponding to the grid cell of the minimum grid level, an index between grid cells is established based on the hierarchical relationship. 8.一种基于数据库倒排索引的北斗网格空间索引装置,其特征在于,包括:8. A Beidou grid space indexing device based on database inverted index is characterized in that, comprising: 查询请求接收模块,用于获取目标查询范围,确定所述目标查询范围对应的北斗网格集合;a query request receiving module, configured to obtain a target query range, and determine the Beidou grid set corresponding to the target query range; 空间对象集合生成模块,用于对所述北斗网格集合中的每一个北斗网格,基于GIN倒排索引,在关系型数据库中确定该北斗网格对应的空间对象,遍历所述北斗网格集合中的全部北斗网格,确定对应的空间对象,生成空间对象集合。The spatial object set generation module is used for each Beidou grid in the Beidou grid set, based on the GIN inverted index, determine the spatial object corresponding to the Beidou grid in the relational database, and traverse the Beidou grid All the Beidou grids in the collection, determine the corresponding space objects, and generate a space object collection. 9.一种电子设备,包括存储器和处理器,所述存储器上存储有计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1~7中任一项所述的方法。9 . An electronic device, comprising a memory and a processor, wherein a computer program is stored on the memory, wherein the processor implements the method according to any one of claims 1 to 7 when the processor executes the program . 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1~7中任一项所述的方法。10 . A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
CN202111143748.3A 2021-09-28 2021-09-28 Beidou grid spatial indexing method and device based on database inverted index Active CN114048204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111143748.3A CN114048204B (en) 2021-09-28 2021-09-28 Beidou grid spatial indexing method and device based on database inverted index

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111143748.3A CN114048204B (en) 2021-09-28 2021-09-28 Beidou grid spatial indexing method and device based on database inverted index

Publications (2)

Publication Number Publication Date
CN114048204A true CN114048204A (en) 2022-02-15
CN114048204B CN114048204B (en) 2025-02-14

Family

ID=80204998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111143748.3A Active CN114048204B (en) 2021-09-28 2021-09-28 Beidou grid spatial indexing method and device based on database inverted index

Country Status (1)

Country Link
CN (1) CN114048204B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114238384A (en) * 2022-02-24 2022-03-25 阿里云计算有限公司 Area positioning method, device, equipment and storage medium
CN114820989A (en) * 2022-06-24 2022-07-29 中国空气动力研究与发展中心计算空气动力研究所 Method for quickly establishing non-structural grid coplanar relation based on inverted index
CN115374237A (en) * 2022-10-26 2022-11-22 北京数字政通科技股份有限公司 Vector space data storage and query method based on Beidou grid code
CN118364040A (en) * 2024-05-16 2024-07-19 深圳计算科学研究院 Method, device, equipment and medium for constructing spatial index

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225665A1 (en) * 2003-05-09 2004-11-11 Microsoft Corporation System and method for employing a grid index for location and precision encoding
US20100114905A1 (en) * 2008-11-03 2010-05-06 Elvin Slavik Method, System, and Product for Managing Spatial Data in a Database
CN103714145A (en) * 2013-12-25 2014-04-09 中国地质大学(武汉) Relational and Key-Value type database spatial data index method
CN106225791A (en) * 2016-08-03 2016-12-14 福建工程学院 A kind of GPS based on stress and strain model location and road matching method
CN107153711A (en) * 2017-05-19 2017-09-12 北京旋极伏羲大数据技术有限公司 Geographic information data processing method and processing device
CN109992636A (en) * 2019-03-22 2019-07-09 中国人民解放军战略支援部队信息工程大学 Spatiotemporal coding method, spatiotemporal index and query method and device
CN110147377A (en) * 2019-05-29 2019-08-20 大连大学 General polling algorithm based on secondary index under extensive spatial data environment
CN112347118A (en) * 2021-01-08 2021-02-09 阿里云计算有限公司 Data storage, query and generation method, database engine and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225665A1 (en) * 2003-05-09 2004-11-11 Microsoft Corporation System and method for employing a grid index for location and precision encoding
US20100114905A1 (en) * 2008-11-03 2010-05-06 Elvin Slavik Method, System, and Product for Managing Spatial Data in a Database
CN103714145A (en) * 2013-12-25 2014-04-09 中国地质大学(武汉) Relational and Key-Value type database spatial data index method
CN106225791A (en) * 2016-08-03 2016-12-14 福建工程学院 A kind of GPS based on stress and strain model location and road matching method
CN107153711A (en) * 2017-05-19 2017-09-12 北京旋极伏羲大数据技术有限公司 Geographic information data processing method and processing device
CN109992636A (en) * 2019-03-22 2019-07-09 中国人民解放军战略支援部队信息工程大学 Spatiotemporal coding method, spatiotemporal index and query method and device
CN110147377A (en) * 2019-05-29 2019-08-20 大连大学 General polling algorithm based on secondary index under extensive spatial data environment
CN112347118A (en) * 2021-01-08 2021-02-09 阿里云计算有限公司 Data storage, query and generation method, database engine and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李剑锋等: "一种支持范围查询的云数据空间索引研究", 小型微型计算机系统, 31 May 2018 (2018-05-31) *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114238384A (en) * 2022-02-24 2022-03-25 阿里云计算有限公司 Area positioning method, device, equipment and storage medium
CN114820989A (en) * 2022-06-24 2022-07-29 中国空气动力研究与发展中心计算空气动力研究所 Method for quickly establishing non-structural grid coplanar relation based on inverted index
CN115374237A (en) * 2022-10-26 2022-11-22 北京数字政通科技股份有限公司 Vector space data storage and query method based on Beidou grid code
CN115374237B (en) * 2022-10-26 2023-01-03 北京数字政通科技股份有限公司 Vector space data storage and query method based on Beidou grid code
CN118364040A (en) * 2024-05-16 2024-07-19 深圳计算科学研究院 Method, device, equipment and medium for constructing spatial index

Also Published As

Publication number Publication date
CN114048204B (en) 2025-02-14

Similar Documents

Publication Publication Date Title
CN114048204B (en) Beidou grid spatial indexing method and device based on database inverted index
CN103425772B (en) A kind of mass data inquiry method with multidimensional information
CN104199986B (en) Vector data space index method based on hbase and geohash
CN111475597B (en) Non-rigid grid coding, unique identification of spatial objects, query method and device
CN103714145B (en) Relationship type and Key-Value type database spatial data index method
CN110147377B (en) General query method based on secondary index under large-scale spatial data environment
CN114048203B (en) Beidou grid spatial indexing and retrieval method and device based on database B-tree index
CN110175175B (en) A Distributed Spatial Secondary Index and Range Query Algorithm Based on SPARK
CN106844534B (en) GeoHash encoding method for one-dimensional geospatial data for NoSQL database
CN110297952B (en) Grid index-based parallelization high-speed railway survey data retrieval method
CN114048271A (en) Storage method and device of Beidou grid data model in database
CN108009265A (en) A kind of space data index method under cloud computing environment
CN112214472A (en) Meteorological grid point data storage and query method, device and storage medium
CN112380302B (en) Thermal map generation method, device, electronic device and storage medium based on trajectory data
Zhang et al. Improving NoSQL storage schema based on Z-curve for spatial vector data
US20230281182A1 (en) R-tree index merging and updating method and apparatus based on hilbert curve, and medium
CN116126942B (en) Multi-dimensional space meteorological grid data distributed storage query method
CN106250457A (en) The inquiry processing method of big data platform Materialized View and system
CN106991149A (en) A kind of magnanimity spatial object storage method for merging coding and multi-edition data
Li et al. Method for managing and querying geo-spatial data using a grid-code-array spatial index
CN113485638B (en) Access optimization system for massive astronomical data
CN116775661A (en) Big space data storage and management method based on Beidou grid technology
CN118171515A (en) A method for constructing a digital twin system
CN114357097A (en) Map annotation construction method and device, computer equipment and storage medium
CN117971837A (en) Method for constructing spatial index of live-action three-dimensional model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载