Spatial data retrieval method, device, storage medium and equipment

By encoding the search conditions entered by the user, and using grid coded search tables and inverted index tables, rapid query of spatial data in the spatial data warehouse is achieved, solving the problem of low search efficiency in the existing technology, and improving the accuracy of the search results.

CN115048593BActive Publication Date: 2025-04-15BEIJING SUPERMAP SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210718258.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-04-15
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

The prior art is less efficient when retrieving spatial data in spatial data warehouses and is limited by spatial data types and data structures.

Method used

By encoding the search conditions entered by the user, encoding intervals are generated, and a pre-constructed grid-encoded search table and inverted index table can be used to quickly query and feedback spatial data.

Benefits of technology

It improves the retrieval efficiency of spatial data, shortens query time, and is not restricted by spatial data types and data structures, and improves the accuracy of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048593B_ABST
    Figure CN115048593B_ABST
Patent Text Reader

Abstract

The present application discloses a spatial data retrieval method, device, storage medium and equipment. The method comprises: after receiving the retrieval conditions input by the user, encoding the spatial address interval indicated by the retrieval conditions to obtain the encoding interval; obtaining the row address that meets the preset conditions from the index table. According to the position indicated by the row address, the target unit row is queried from the grid code retrieval table; according to the object identifier and source information indicated by the target unit row, the spatial data stored in the target unit row is queried from the spatial data warehouse, and the queried spatial data is fed back to the user. The method encodes each spatial data to obtain the grid code array column in the grid code retrieval table, and creates an inverted index based on the grid code array column to obtain the index table, thereby using the index table and the grid code retrieval table to realize fast query of spatial data. Compared with the prior art, the spatial data retrieval speed is faster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data retrieval, and in particular to a spatial data retrieval method, device, storage medium and equipment. Background Art

[0002] There are many types of spatial data stored in the spatial data warehouse, and the data structure is not uniform. When searching for spatial data in the spatial data warehouse, most of the existing technologies use the positioning query method to search, that is, to search according to the spatial address range given by the user. However, due to the different types and data structures of various spatial data, it takes a long time to query, and the retrieval efficiency is low.

[0003] Therefore, how to improve the retrieval efficiency of spatial data has become an urgent problem to be solved in this field. Summary of the invention

[0004] The present application provides a spatial data retrieval method, apparatus, storage medium and device, aiming to improve the retrieval efficiency of spatial data.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A spatial data retrieval method, comprising:

[0007] After receiving the search condition input by the user, encoding the space address interval indicated by the search condition to obtain the encoding interval;

[0008] Obtaining a row address that meets a preset condition from an index table; the index table is obtained by creating an inverted index in advance based on a grid code array column of a grid code retrieval table; the grid code retrieval table includes a plurality of unit rows; each unit row is used to store a grid code array, an object identifier and source information of each spatial data in a spatial data warehouse; the grid code array column is used to store a grid code array of each spatial data; the grid code array includes a plurality of grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the coding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code retrieval table;

[0009] According to the position indicated by the row address, a target cell row is queried from the grid code search table; the target cell row is: a cell row including a grid code array corresponding to the row address;

[0010] According to the object identification and source information shown in the target cell row, the spatial data stored in the target cell row is queried from the spatial data warehouse, and the queried spatial data is fed back to the user.

[0011] Optionally, after querying and obtaining the spatial data stored in the target cell row from the spatial data warehouse according to the object identifier and source information shown in the target cell row, the method further includes:

[0012] Converting the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image;

[0013] The spatial geometric image is displayed to the user through a preset interface.

[0014] Optionally, the process of creating an inverted index based on the grid code array column of the grid code search table in advance to obtain the index table includes:

[0015] Pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data;

[0016] Setting an object identifier for each of the spatial data;

[0017] Parsing each of the spatial data to obtain source information of each of the spatial data;

[0018] Based on the object identification, source information and grid code array of each of the spatial data, the grid code retrieval table is constructed; the grid code retrieval table includes an object identification column, a source information column and a grid code array column; the object identification column is used to store the object identification of each of the spatial data; the source information column is used to store the source information of each of the spatial data;

[0019] An inverted index is created based on the grid code array columns to obtain the index table; the index table includes each of the grid code arrays and a row address corresponding to each of the grid code arrays.

[0020] Optionally, the step of pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data includes:

[0021] Pre-encoding each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data; the original grid code set includes original grid codes of multiple grids occupied by the spatial data in a preset grid space;

[0022] For each of the spatial data, grid degeneration processing is performed on each original grid code of the spatial data to obtain each valid grid code; the grid level of the valid grid code is smaller than the grid level of the original grid code;

[0023] Based on each of the valid grid code arrays, a grid code array of the spatial data is constructed.

[0024] A spatial data retrieval device, comprising:

[0025] An encoding unit, configured to, after receiving a search condition input by a user, encode the space address interval indicated by the search condition to obtain a coding interval;

[0026] An acquisition unit is used to acquire a row address that meets a preset condition from an index table; the index table is obtained by creating an inverted index in advance based on a grid code array column of a grid code retrieval table; the grid code retrieval table includes a plurality of unit rows; each unit row is used to store a grid code array, an object identifier and source information of each spatial data in a spatial data warehouse; the grid code array column is used to store a grid code array of each spatial data; the grid code array includes a plurality of grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the encoding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code retrieval table;

[0027] A first query unit is used to query and obtain a target cell row from the grid code search table according to the position indicated by the row address; the target cell row is: a cell row including a grid code array corresponding to the row address;

[0028] The second query unit is used to query the spatial data stored in the target cell row from the spatial data warehouse according to the object identifier and source information shown in the target cell row, and feed back the queried spatial data to the user.

[0029] Optionally, also include:

[0030] A conversion unit, used for converting the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image;

[0031] A display unit is used to display the spatial geometric image to the user through a preset interface.

[0032] Optionally, the acquiring unit is specifically used for:

[0033] Pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data;

[0034] Setting an object identifier for each of the spatial data;

[0035] Parsing each of the spatial data to obtain source information of each of the spatial data;

[0036] Based on the object identification, source information and grid code array of each of the spatial data, the grid code retrieval table is constructed; the grid code retrieval table includes an object identification column, a source information column and a grid code array column; the object identification column is used to store the object identification of each of the spatial data; the source information column is used to store the source information of each of the spatial data;

[0037] An inverted index is created based on the grid code array columns to obtain the index table; the index table includes each of the grid code arrays and a row address corresponding to each of the grid code arrays.

[0038] Optionally, the acquiring unit is specifically used for:

[0039] Pre-encoding each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data; the original grid code set includes original grid codes of multiple grids occupied by the spatial data in a preset grid space;

[0040] For each of the spatial data, grid degeneration processing is performed on each original grid code of the spatial data to obtain each valid grid code; the grid level of the valid grid code is smaller than the grid level of the original grid code;

[0041] Based on each of the valid grid code arrays, a grid code array of the spatial data is constructed.

[0042] A computer-readable storage medium includes a stored program, wherein the program executes the spatial data retrieval method.

[0043] A spatial data retrieval device comprises: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0044] The memory is used to store programs, and the processor is used to run programs, wherein the spatial data retrieval method is executed when the program is run.

[0045] The technical solution provided by the present application, after receiving the search conditions input by the user, encodes the spatial address interval shown in the search conditions to obtain the coding interval. Obtain the row address that meets the preset conditions from the index table. According to the position shown in the row address, query the target unit row from the grid code retrieval table. According to the object identifier and source information shown in the target unit row, query the spatial data stored in the target unit row from the spatial data warehouse, and feed back the queried spatial data to the user. The present application encodes each spatial data to obtain the grid code array column in the grid code retrieval table, and creates an inverted index based on the grid code array column to obtain the index table, thereby using the index table and the grid code retrieval table to realize fast query of spatial data. Compared with the prior art, the spatial data retrieval speed is faster, and is not restricted by the type and data structure of the spatial data, and the accuracy of the retrieval results is higher. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1a A schematic diagram of a flow chart of a spatial data retrieval method provided in an embodiment of the present application;

[0048] Figure 1b A schematic diagram of a flow chart of a spatial data retrieval method provided in an embodiment of the present application;

[0049] Figure 1c A schematic diagram of a spatial geometric image provided in an embodiment of the present application;

[0050] Figure 2 A schematic diagram of a flow chart of another spatial data retrieval method provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of the architecture of a spatial data retrieval device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] like Figure 1a and Figure 1b FIG. 1 is a flow chart of a spatial data retrieval method provided in an embodiment of the present application, comprising the following steps:

[0054] S101: Pre-encode each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data.

[0055] The so-called spatial data includes but is not limited to: 2D and 3D points, lines, surfaces, BIM, fine models and other data with spatial attributes. In the embodiment of the present application, the original grid code set includes the original grid codes of multiple grids occupied by the spatial data in the preset grid space. Specifically, assuming that the spatial data occupies 4 grids in the preset grid space, such as Figure 1b As shown, the grid code array will contain the grid codes of 4 grids.

[0056] It should be noted that the specific implementation process of encoding each spatial data is common knowledge familiar to those skilled in the art. Specifically, the grid coding algorithm used in this embodiment includes but is not limited to: GeoSOT, Beidou grid code or GeoHash, etc. The specific implementation logic can be:

[0057] select smid,ST_GeoSOTGrid(smgeometry,22)as grids frombuilding_line2d.

[0058] In the above specific implementation logic, ST_GeoSOTGrid(smgeometry,22) represents a function for calculating grid coding, smgeometry represents a geometric object, and 22 represents a grid level.

[0059] S102: For each piece of spatial data, grid degradation processing is performed on each original grid code of the spatial data to obtain each valid grid code, and a grid code array of the spatial data is constructed based on each valid grid code.

[0060] Among them, the grid level of the effective grid code is smaller than the grid level of the original grid code.

[0061] Specifically, the grid degradation function can be called to perform grid degradation processing on each original grid code of the spatial data. The specific implementation logic can be:

[0062] select ST_Degenerate(grid,18)grid,idGeo frombuilding_region2d_grid22_

[0063] In the above specific implementation logic, ST_Degenerate(grid,18) represents the grid degradation function, 22 represents the grid level of the original grid code, and 18 represents the grid level of the effective grid code.

[0064] It should be noted that the purpose of performing grid degradation processing on each original grid code of spatial data is to improve the query accuracy of spatial data. The smaller the grid level, the higher the query accuracy. In the embodiment of the present application, the grid level of the effective grid code can be set by the technician according to the actual situation, that is, the query accuracy of spatial data can be set by the technician according to the actual situation.

[0065] S103: Setting an object identifier for each piece of spatial data.

[0066] The object identifier of each spatial data is different, that is, the object identifier of each spatial data is unique. Specifically, the object identifier may include the table name of the original table and the ID of the spatial data in the original table. The so-called original table is a database table used to store spatial data in the spatial data warehouse.

[0067] S104: Analyze each piece of spatial data to obtain source information of each piece of spatial data.

[0068] The source information is used to indicate the file name of the file where the spatial data is located. In addition, since most of the spatial data is graphic data, the source information can also be used to indicate the layer name of the layer where the spatial data is located.

[0069] S105: Constructing a grid code retrieval table based on the object identification, source information and grid code array of each spatial data.

[0070] The grid code retrieval table includes an object identification column, a source information column, and a grid code array column. The object identification column is used to store the object identification of each spatial data, the source information column is used to store the source information of each spatial data, and the grid code array column is used to store the grid code array of each spatial data. In addition, the grid code retrieval table also includes a plurality of unit rows, each unit row is used to store the grid code array, object identification, and source information of each spatial data in the spatial data warehouse. The number of unit rows is consistent with the number of spatial data.

[0071] Specifically, the storage structure of the grid code retrieval table can be seen in Table 1 below.

[0072] Table 1

[0073]

[0074]

[0075] It should be noted that the contents shown in Table 1 above are only for illustration. In addition, the storage structure of each grid code included in the grid code array can be seen in Table 2.

[0076] Table 2

[0077]

[0078] In the above Table 2, Level represents the grid level of the grid code, Dim represents the grid dimension value of the grid code, n represents that the grid code has n Code codes, and Code_x (x=1, 2, ..., n) represents the code value of each dimension.

[0079] S106: Create an inverted (Gin) index based on the grid code array column of the grid code search table to obtain an index table.

[0080] The index table includes each grid code array and a row address corresponding to each grid code array. The so-called row address is used to indicate the position of the unit row of the grid code array corresponding to the row address in the grid code search table.

[0081] Specifically, the specific implementation logic of creating a Gin index based on a grid-coded array column is as follows:

[0082]

[0083]

[0084] It should be noted that the above implementation logic is only used for illustration. Of course, other logic implementations can also be used to create the Gin index of the grid coded array column, which will not be repeated here.

[0085] S107: After receiving the search condition input by the user, grid coding is performed on the spatial address interval indicated by the search condition to obtain a coding interval.

[0086] The so-called spatial address interval can be understood as: a spatial range in a preset spatial coordinate system. For example, taking the geographic coordinate system as an example, the spatial address interval can be set to: longitude 0 to 30°, latitude 60° to 90°.

[0087] S108: Obtaining row addresses that meet preset conditions from the index table.

[0088] The preset condition is that the grid code contained in the grid code array corresponding to the row address is within the coding interval.

[0089] It should be noted that the coding interval and the index table may be directly subjected to a sub-operation, thereby obtaining a row address that meets a preset condition from the index table.

[0090] S109: According to the position indicated by the row address, query and obtain the target unit row from the grid code search table.

[0091] The target cell row is a cell row of a grid coding array corresponding to a row address.

[0092] S110: According to the object identifier and source information shown in the target cell row, the spatial data stored in the target cell row is queried from the spatial data warehouse, and the queried spatial data is fed back to the user.

[0093] S111: converting the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image.

[0094] The specific implementation logic of the spatial transformation process is common knowledge familiar to those skilled in the art and will not be described in detail here. In addition, the so-called spatial geometric image can be simply understood as a gridded graphic. For details, please refer to Figure 1c shown.

[0095] S112: Displaying a spatial geometric image to a user through a preset interface.

[0096] To summarize, this embodiment encodes each spatial data to obtain a grid code array column in a grid code retrieval table, and creates an inverted index based on the grid code array column to obtain an index table, thereby using the index table and the grid code retrieval table to achieve fast query of spatial data. Compared with the prior art, the spatial data retrieval speed is faster and is not restricted by the type and data structure of the spatial data, and the accuracy of the retrieval results is higher.

[0097] It should be noted that S101 mentioned in the above embodiment is an optional implementation of the spatial data retrieval method described in this application. In addition, S111 mentioned in the above embodiment is also an optional implementation of the spatial data retrieval method described in this application. To this end, the process mentioned in the above embodiment can be summarized as follows: Figure 2 The method shown.

[0098] like Figure 2 FIG. 1 is a flow chart of another spatial data retrieval method provided in an embodiment of the present application, comprising the following steps:

[0099] S201: After receiving the search condition input by the user, encode the spatial address interval indicated by the search condition to obtain an encoded interval.

[0100] S202: Obtaining row addresses that meet preset conditions from the index table.

[0101] Among them, the index table is obtained by creating an inverted index in advance based on the grid code array column of the grid code retrieval table; the grid code retrieval table includes multiple unit rows; each unit row is used to store the grid code array, object identifier and source information of each spatial data in the spatial data warehouse; the grid code array column is used to store the grid code array of each spatial data; the grid code array includes multiple grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the encoding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code retrieval table.

[0102] S203: According to the position indicated by the row address, query and obtain the target unit row from the grid code search table.

[0103] The target cell row is a cell row of a grid coding array corresponding to a row address.

[0104] S204: According to the object identifier and source information shown in the target cell row, query the spatial data stored in the target cell row from the spatial data warehouse, and feed back the queryed spatial data to the user.

[0105] To summarize, this embodiment encodes each spatial data to obtain a grid code array column in a grid code retrieval table, and creates an inverted index based on the grid code array column to obtain an index table, thereby using the index table and the grid code retrieval table to achieve fast query of spatial data. Compared with the prior art, the spatial data retrieval speed is faster and is not restricted by the type and data structure of the spatial data, and the accuracy of the retrieval results is higher.

[0106] Corresponding to the spatial data retrieval method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a spatial data retrieval device.

[0107] like Figure 3 FIG. 1 is a schematic diagram of the architecture of a spatial data retrieval device provided in an embodiment of the present application, including:

[0108] The encoding unit 100 is used to encode the space address interval indicated by the search condition after receiving the search condition input by the user to obtain the encoding interval.

[0109] The acquisition unit 200 is used to obtain a row address that meets preset conditions from an index table; the index table is obtained by creating an inverted index in advance based on the grid code array column of the grid code retrieval table; the grid code retrieval table includes multiple unit rows; each unit row is used to store the grid code array, object identifier and source information of each spatial data in the spatial data warehouse; the grid code array column is used to store the grid code array of each spatial data; the grid code array includes multiple grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the encoding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code retrieval table.

[0110] Optionally, the acquisition unit 200 is specifically used to: pre-encode each spatial data in the spatial data warehouse to obtain a grid code array of each spatial data; set an object identifier for each spatial data; parse each spatial data to obtain source information of each spatial data; construct a grid code retrieval table based on the object identifier, source information and grid code array of each spatial data; the grid code retrieval table includes an object identifier column, a source information column and a grid code array column; the object identifier column is used to store the object identifier of each spatial data; the source information column is used to store the source information of each spatial data; create an inverted index based on the grid code array column to obtain an index table; the index table includes each grid code array and the row address corresponding to each grid code array.

[0111] The acquisition unit 200 is specifically used for: pre-encoding each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data; the original grid code set includes the original grid codes of multiple grids occupied by the spatial data in a preset grid space; for each spatial data, performing grid degradation processing on each original grid code of the spatial data to obtain each valid grid code; the grid level of the valid grid code is smaller than the grid level of the original grid code; based on each valid grid code array, constructing a grid code array of the spatial data.

[0112] The first query unit 300 is used to query and obtain a target cell row from the grid code search table according to the position indicated by the row address; the target cell row is: a cell row containing a grid code array corresponding to the row address.

[0113] The second query unit 400 is used to query the spatial data stored in the target cell row from the spatial data warehouse according to the object identifier and source information shown in the target cell row, and feed back the queried spatial data to the user.

[0114] The conversion unit 500 is used to convert the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image.

[0115] The display unit 600 is used to display the spatial geometric image to the user through a preset interface.

[0116] To summarize, this embodiment encodes each spatial data to obtain a grid code array column in a grid code retrieval table, and creates an inverted index based on the grid code array column to obtain an index table, thereby using the index table and the grid code retrieval table to achieve fast query of spatial data. Compared with the prior art, the spatial data retrieval speed is faster and is not restricted by the type and data structure of the spatial data, and the accuracy of the retrieval results is higher.

[0117] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the spatial data retrieval method provided by the present application.

[0118] The present application also provides a spatial data retrieval device, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is run, the spatial data retrieval method provided by the present application is executed, including the following steps:

[0119] After receiving the search condition input by the user, encoding the space address interval indicated by the search condition to obtain the encoding interval;

[0120] Obtaining a row address that meets a preset condition from an index table; the index table is obtained by creating an inverted index in advance based on a grid code array column of a grid code retrieval table; the grid code retrieval table includes a plurality of unit rows; each unit row is used to store a grid code array, an object identifier and source information of each spatial data in a spatial data warehouse; the grid code array column is used to store a grid code array of each spatial data; the grid code array includes a plurality of grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the coding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code retrieval table;

[0121] According to the position indicated by the row address, a target cell row is queried from the grid code search table; the target cell row is: a cell row including a grid code array corresponding to the row address;

[0122] According to the object identification and source information shown in the target cell row, the spatial data stored in the target cell row is queried from the spatial data warehouse, and the queried spatial data is fed back to the user.

[0123] Specifically, based on the above embodiment, after querying and obtaining the spatial data stored in the target unit row from the spatial data warehouse according to the object identifier and source information shown in the target unit row, the method further includes:

[0124] Converting the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image;

[0125] The spatial geometric image is displayed to the user through a preset interface.

[0126] Specifically, based on the above embodiment, the process of creating an inverted index based on the grid code array column of the grid code search table in advance to obtain the index table includes:

[0127] Pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data;

[0128] Setting an object identifier for each of the spatial data;

[0129] Parsing each of the spatial data to obtain source information of each of the spatial data;

[0130] Based on the object identification, source information and grid code array of each of the spatial data, the grid code retrieval table is constructed; the grid code retrieval table includes an object identification column, a source information column and a grid code array column; the object identification column is used to store the object identification of each of the spatial data; the source information column is used to store the source information of each of the spatial data;

[0131] An inverted index is created based on the grid code array columns to obtain the index table; the index table includes each of the grid code arrays and a row address corresponding to each of the grid code arrays.

[0132] Specifically, based on the above embodiment, the above-mentioned pre-encoding processing is performed on each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data, including:

[0133] Pre-encoding each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data; the original grid code set includes original grid codes of multiple grids occupied by the spatial data in a preset grid space;

[0134] For each of the spatial data, grid degeneration processing is performed on each original grid code of the spatial data to obtain each valid grid code; the grid level of the valid grid code is smaller than the grid level of the original grid code;

[0135] Based on each of the valid grid code arrays, a grid code array of the spatial data is constructed.

[0136] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0137] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0138] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A spatial data retrieval method, characterized in that: include: After receiving the search condition input by the user, encoding the space address interval indicated by the search condition to obtain the encoding interval; Obtaining row addresses that meet preset conditions from an index table; the index table is obtained by pre-creating an inverted index based on a grid code array column of a grid code retrieval table; the grid code retrieval table includes a plurality of unit rows; each of the unit rows is used to store a grid code array, an object identifier, and source information of each spatial data in a spatial data warehouse; The grid code array column is used to store the grid code array of each of the spatial data; The grid code array includes a plurality of grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the encoding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code search table; According to the position indicated by the row address, a target cell row is queried from the grid code search table; the target cell row is: a cell row including a grid code array corresponding to the row address; According to the object identification and source information shown in the target cell row, the spatial data stored in the target cell row is queried from the spatial data warehouse, and the queried spatial data is fed back to the user.

2. The method according to claim 1, characterized in that After querying and obtaining the spatial data stored in the target cell row from the spatial data warehouse according to the object identifier and source information shown in the target cell row, the method further includes: Converting the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image; The spatial geometric image is displayed to the user through a preset interface.

3. The method according to claim 1, characterized in that The process of creating an inverted index based on the grid code array column of the grid code search table in advance to obtain the index table includes: Pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data; Setting an object identifier for each of the spatial data; Parsing each of the spatial data to obtain source information of each of the spatial data; Based on the object identification, source information and grid code array of each of the spatial data, the grid code retrieval table is constructed; the grid code retrieval table includes an object identification column, a source information column and a grid code array column; the object identification column is used to store the object identification of each of the spatial data; the source information column is used to store the source information of each of the spatial data; An inverted index is created based on the grid code array columns to obtain the index table; the index table includes each of the grid code arrays and a row address corresponding to each of the grid code arrays.

4. The method according to claim 3, characterized in that The step of pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data includes: Pre-encoding each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data; the original grid code set includes original grid codes of multiple grids occupied by the spatial data in a preset grid space; For each of the spatial data, grid degeneration processing is performed on each original grid code of the spatial data to obtain each valid grid code; the grid level of the valid grid code is smaller than the grid level of the original grid code; Based on each of the valid grid code arrays, a grid code array of the spatial data is constructed.

5. A spatial data retrieval device, characterized in that: include: An encoding unit, configured to, after receiving a search condition input by a user, encode the space address interval indicated by the search condition to obtain a coding interval; An acquisition unit is used to acquire a row address that meets a preset condition from an index table; the index table is obtained by creating an inverted index based on a grid code array column of a grid code retrieval table in advance; the grid code retrieval table includes a plurality of unit rows; each of the unit rows is used to store a grid code array, an object identifier, and source information of each spatial data in the spatial data warehouse; The grid code array column is used to store the grid code array of each of the spatial data; The grid code array includes a plurality of grid codes; the grid code is obtained by encoding the spatial data; the preset condition is: the grid code contained in the grid code array corresponding to the row address is within the encoding interval; the row address indicates: the position of the unit row of the grid code array corresponding to the row address in the grid code search table; A first query unit is used to query and obtain a target cell row from the grid code search table according to the position indicated by the row address; the target cell row is: a cell row including a grid code array corresponding to the row address; The second query unit is used to query the spatial data stored in the target cell row from the spatial data warehouse according to the object identifier and source information shown in the target cell row, and feed back the queried spatial data to the user.

6. The device according to claim 5, characterized in that Also includes: A conversion unit, used for converting the grid codes contained in the grid code array in the target unit row to obtain a spatial geometric image; A display unit is used to display the spatial geometric image to the user through a preset interface.

7. The device according to claim 5, characterized in that The acquisition unit is specifically used for: Pre-encoding each spatial data in the spatial data warehouse to obtain a grid encoding array of each spatial data; Setting an object identifier for each of the spatial data; Parsing each of the spatial data to obtain source information of each of the spatial data; Constructing the grid code retrieval table based on the object identification, source information and grid code array of each of the spatial data; The grid code search table includes an object identification column, a source information column and the grid code array column; The object identification column is used to store the object identification of each of the spatial data; The source information column is used to store the source information of each of the spatial data; An inverted index is created based on the grid code array columns to obtain the index table; the index table includes each of the grid code arrays and a row address corresponding to each of the grid code arrays.

8. The device according to claim 7, characterized in that The acquisition unit is specifically used for: Pre-encoding each spatial data in the spatial data warehouse to obtain an original grid code set of each spatial data; the original grid code set includes original grid codes of multiple grids occupied by the spatial data in a preset grid space; For each of the spatial data, performing grid degradation processing on each original grid code of the spatial data to obtain each valid grid code; The grid level of the effective grid code is smaller than the grid level of the original grid code; Based on each of the valid grid code arrays, a grid code array of the spatial data is constructed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the spatial data retrieval method according to any one of claims 1 to 4.

10. A spatial data retrieval device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program executes the spatial data retrieval method according to any one of claims 1 to 4 when running.

Citation Information

Patent Citations

  • Address processing method and system, address determining method, server and terminal

    CN108306871A

  • Parallel high-speed railway survey data retrieval method based on grid indexes

    CN110297952A