A POI data partitioning method and apparatus

By performing spatial index coding and division of POI data, combined with GeoHash algorithm and inverted indexing technology, the problem of low map search efficiency is solved, and more efficient data processing and user services are achieved.

CN111382220BActive Publication Date: 2025-06-24BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201811646087.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-29
Publication Date
2025-06-24
Estimated Expiration
2038-12-29

AI Technical Summary

Technical Problem

When the prior art processes the growing POI data, map search efficiency is difficult to improve and cannot effectively meet users' needs for efficient geographic information query.

Method used

By calculating the spatial index encoding of the coordinate information of the POI data, determining the area it falls into, dividing the POI data falling into the same area into a container, and further dividing and filtering the data using GeoHash algorithm and inverted indexing technology.

Benefits of technology

It improves the efficiency of map search, facilitates subsequent identification and judgment of divided data, and provides users with better services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111382220B_ABST
    Figure CN111382220B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for partitioning POI data. The method includes: calculating a corresponding spatial index code for the obtained POI data according to the coordinate information of the POI data; determining the area into which the POI data falls according to the spatial index code, and partitioning each POI data falling into the same area into a container. In the POI data partitioning method and device according to the embodiments of the present invention, by calculating the spatial index code corresponding to the POI data, determining the area into which the POI data falls, and partitioning each POI data falling into the same area into a container, since the POIs falling into the same area are similar or have a parent-child relationship, the embodiments of the present invention achieve the effect of aggregating similar or parent-child relationship POIs, facilitating subsequent provision of better services to users based on the partitioned POIs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technologies, and particularly to a method and device for partitioning POI data. Background Art

[0002] In daily life, people's dependence on geographical information is increasing. How to accurately and quickly find the information required by users from geographical information data is an important task of map search engines. During the process of information search, map search engines will use indexing technology. An index is essentially a data structure. Between algorithms and objects, an index excludes a large number of irrelevant objects through screening, thereby improving the speed and efficiency of operations. However, compared with the continuously growing POI (Point Of Interest) data, this improvement in efficiency is insignificant. Therefore, it is necessary to further improve map search efficiency to provide better services to users. Summary of the Invention

[0003] In view of the above problems, the present invention is proposed to provide a method and device for partitioning POI data that overcome the above problems or at least partially solve the above problems.

[0004] According to one aspect of the present application, a method for partitioning POI data is provided, including:

[0005] For the obtained POI data, calculate the corresponding spatial index code according to the coordinate information of the POI data;

[0006] Determine the area where the POI data falls according to the spatial index code, and partition each POI data that falls into the same area into a container.

[0007] Optionally, calculating the corresponding spatial index code according to the coordinate information of the POI data includes:

[0008] Calculate the GeoHash coding string corresponding to the coordinate information of the POI data through the GeoHash algorithm.

[0009] Optionally, determining the area where the POI data hits according to the spatial index code includes:

[0010] Determine the positioning block where the POI data hits according to the GeoHash coding string, and use the positioning block and the eight surrounding blocks as the area where the POI data falls.

[0011] Optionally, partitioning each POI data that falls into the same area into a container includes: partitioning each POI data that falls into the same area into a container, and the container includes a hash bucket having a plurality of hash units.

[0012] Optionally, the method further includes:

[0013] Establishing an inverted index for the POI data in the hash bucket to partition the POI data in the hash bucket into each hash sub - bucket.

[0014] Optionally, establishing an inverted index for the POI data in the hash bucket includes:

[0015] Extracting the name text of the POI data, performing word segmentation on the name text to obtain a plurality of word - segmented fragments, establishing an inverted index using the word - segmented fragments, and partitioning the POI data containing the same word - segmented fragments into one hash sub - bucket.

[0016] Optionally, the method further includes: filtering the POI data in the hash bucket using a preset variety of filtering conditions.

[0017] According to another aspect of the present application, there is provided a POI data partitioning device, including:

[0018] A calculation unit, adapted to calculate a corresponding spatial index code for the acquired POI data according to the coordinate information of the POI data;

[0019] A first partitioning unit, adapted to determine the area into which the POI data falls according to the spatial index code, and partition each POI data falling into the same area into one container.

[0020] Optionally, the calculation unit is specifically adapted to calculate a GeoHash encoded string corresponding to the coordinate information of the POI data through the GeoHash algorithm.

[0021] Optionally, the first partitioning unit is adapted to determine the positioning block hit by the POI data according to the GeoHash encoded string, and use the positioning block and the eight blocks around the positioning block as the area into which the POI data falls.

[0022] Optionally, the first partitioning unit is specifically adapted to partition each POI data falling into the same area into one container, and the container includes a hash bucket having a plurality of hash units.

[0023] Optionally, the device further includes: a second partitioning unit, adapted to establish an inverted index for the POI data in the hash bucket to partition the POI data in the hash bucket into each hash sub - bucket.

[0024] Optionally, the second partitioning unit is specifically adapted to extract the name text of the POI data, perform word segmentation on the name text to obtain a plurality of word - segmented fragments, establish an inverted index using the word - segmented fragments, and partition the POI data containing the same word - segmented fragments into one hash sub - bucket.

[0025] Optionally, the device further includes: a filtering unit, configured to filter the POI data in the hash bucket by using a plurality of preset filtering conditions.

[0026] According to another aspect of the present application, there is provided an electronic device, where the electronic device includes: a processor, and a memory storing a computer program that can run on the processor; the processor is configured to execute the method according to one aspect of the present application when executing the computer program in the memory.

[0027] According to still another aspect of the present application, there is provided a computer-readable storage medium, on which a computer program is stored, where the computer program implements the method according to one aspect of the present application when being executed by a processor.

[0028] Applying the technical solution of the embodiment of the present invention, calculating a corresponding spatial index code according to the coordinate information of the POI data, where the spatial index code indicates the area where the POI data falls, and dividing each POI data falling into the same area into a container. By partitioning the POI data, this technical solution can group POI data with similar relationships or dependencies together, thereby facilitating subsequent judgment and identification of the partitioned data, reducing the calculation amount, improving the map search efficiency, and providing better services for users.

[0029] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. Description of the Drawings

[0030] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0031] Figure 1 Flowchart of the POI data partitioning method in the embodiment of the present invention;

[0032] Figure 2 Schematic diagram of the process of the POI data partitioning method in the embodiment of the present invention;

[0033] Figure 3 Block diagram of the POI data partitioning device in the embodiment of the present invention;

[0034] Figure 4It is a schematic structural diagram of an electronic device in an embodiment of the present invention;

[0035] Figure 5 It is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present invention. Detailed implementation manners

[0036] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be completely conveyed to those skilled in the art.

[0037] Figure 1 The flowchart of the POI data partitioning method in an embodiment of the present invention is shown in Figure 1 The POI data partitioning method of the embodiment of the present invention includes the following steps:

[0038] Step S101: For the obtained POI data, calculate the corresponding spatial index code according to the coordinate information of the POI data;

[0039] Step S102: Determine the area into which the POI data falls according to the spatial index code, and partition each piece of POI data that falls into the same area into a container.

[0040] As can be seen from Figure 1 In the POI data partitioning method of this embodiment, the corresponding spatial index code is obtained by calculating and converting the coordinate information of the POI data, and the area into which the POI data falls is determined according to the spatial index code, and each piece of POI data that falls into the same area is partitioned into a container. Since the spatial index code distances of POI data with similar relationships or dependencies are relatively close and can fall into the same area in practical applications, therefore, this POI data partitioning method of this embodiment can partition similar POIs or POIs with dependency relationships such as parent-child relationships together, which is convenient for subsequent identification and determination of the partitioned POI data and improves the map search efficiency.

[0041] In an embodiment of the present invention, Figure 1In step S101 shown above, calculating the corresponding spatial index code according to the coordinate information of the POI data specifically includes calculating the GeoHash code string corresponding to the coordinate information of the POI data through the GeoHash algorithm. Here, GeoHash does not represent a single point, but a region, that is, each GeoHash string represents a certain rectangular region. GeoHash uses a string to represent the longitude and latitude coordinates of the POI data. Generally, the calculation process of GeoHash is divided into three steps: converting longitude and latitude into binary, merging the binary of latitude and longitude, and encoding according to Base32 to obtain the encoded result (such as wx4g0ec1).

[0042] It should be noted that Geohash is only one way of spatial indexing. In other embodiments, other algorithms can also be used to establish spatial indexing, and this embodiment does not limit this.

[0043] Figure 2 The flowchart of the POI data partitioning method in the embodiment of the present invention is as follows Figure 2 As shown, in this embodiment, the POI name segmentation fragment and coordinates are extracted as partitioning features. Specifically, for a piece of POI data obtained, the POI coordinates calculate the spatial index number (that is, the spatial index code) through the GeoHash algorithm to establish a spatial index.

[0044] Determine the positioning block hit by the POI data according to the GeoHash code string (such as Figure 2 the black-filled block in), and use the positioning block and the eight surrounding blocks as the area where the POI data falls. That is to say, the area in this embodiment is an area in the format of a nine-square grid, and the center of the nine-square grid is the positioning block, which is determined corresponding to the GeoHash code string of the POI data. The reason for using the positioning block and the eight surrounding blocks as the area where the POI data falls in this embodiment is that when determining the search result in a map search, in addition to using the GeoHash code of the positioning point (the POI corresponding to the keyword entered by the user) for matching, the GeoHash codes of its surrounding 8 blocks are also used for joint matching to avoid incorrect judgment problems caused by the GeoHash code of a POI far away being the same as the GeoHash code of the positioning point (because they are on the same GeoHash block and share a GeoHash code), while the GeoHash code of a closer POI is inconsistent with the GeoHash code of the positioning point.

[0045] It can be understood that the POI data obtained in this embodiment at least includes the coordinate information and name information of the POI data.

[0046] In this embodiment, POI data falling into the same area is divided into a container. For example, POI data falling into the same area is divided into a container, and the container includes a hash bucket with multiple hash units. In other words, in the embodiment of the present invention, POI data hitting the same area is placed in a hash bucket to achieve the division of similar POI or POI data with a parent-child relationship.

[0047] For example, the following two POI data: The first POI: Sun and Moon Restaurant [90.026485, 43.957804] ----> Sun and Moon || Restaurant, [2048#2023] and 8 surrounding blocks. The second POI: Shunxin Restaurant [90.026461, 43.956088] ----> Shunxin || Restaurant, [2048#2023] and 8 surrounding blocks. After being processed by the method of this application, the two POIs can be divided into the same bucket. Note: Sun and Moon Restaurant is the name information of the first POI, [90.026485, 43.957804] is the coordinate information of the first POI, i.e., longitude and latitude information, and Sun and Moon || Restaurant is the segmented fragment of the name of the first POI. It can be seen that a POI name is divided into two segments. [2048#2023] represents the rectangular block hit by the first POI, and [2048#2023] and 8 surrounding blocks represent the area where the first POI falls. The structure of Shunxin Restaurant is the same as that of Sun and Moon Restaurant and will not be elaborated.

[0048] Here, the hash bucket uses a sequential list to store the head nodes of the linked lists of keys with the same hash value. Using this head node, other keys can be found, which is applicable to handle hash conflicts in the case where space needs to be saved.

[0049] To further reduce the storage space, the POI data division method in the embodiment of this application further includes establishing an inverted index for the POI data in the hash bucket to divide the POI data in the hash bucket into each hash sub-bucket.

[0050] Specifically, refer to Figure 2, building an inverted index for the POI data in the hash bucket includes: extracting the name text of the POI data, segmenting the name text to obtain multiple segmented fragments, building an inverted index using the segmented fragments, and dividing the POI data containing the same segmented fragment into a hash sub-bucket. An inverted index (or reverse index, inverted index) is an index method opposite to the forward index. In a search engine, each POI corresponds to an ID, and a POI is represented as a set of a series of keywords (in fact, in the search engine index library, the keywords have also been converted into keyword IDs). The general search process is to find the value (POI) through the key (keyword). However, due to the large number of POIs collected in the search engine, the forward index structure may not be able to meet the requirement of real-time returning of ranking results, so the inverted index came into being. The search engine converts the mapping of the POI ID corresponding to the keyword into the mapping of the keyword to the POI ID. It can be understood that each keyword corresponds to a series of POIs, and this keyword appears in these POIs. Through the inverted index, a list of POIs containing this keyword can be quickly obtained according to the keyword.

[0051] In this embodiment, after dividing the POI data into a hash bucket, an inverted index is built in the hash bucket using the segmented fragments and further divided into smaller sub-buckets. At the same time, a variety of preset filtering conditions are combined to filter the POI data, reducing the storage space and the amount of calculation. The filtering conditions here include distance filtering conditions, etc.

[0052] So far, the POI data division method of the embodiment of the present invention uses a spatial index + inverted index to divide POIs with similar relationships or dependencies, which is convenient for various identification and determination within the group later, and provides better services for users based on the divided POI data.

[0053] The embodiment of the present invention also provides a POI data division device. Figure 3 The block diagram of the POI data division device in the embodiment of the present invention is as Figure 3 shown. The POI data division device 300 includes:

[0054] A calculation unit 301, adapted to calculate the corresponding spatial index code for the obtained POI data according to the coordinate information of the POI data;

[0055] A first division unit 302, adapted to determine the area where the POI data falls according to the spatial index code, and divide each POI data falling into the same area into a container.

[0056] In an embodiment of the present invention, the computing unit 301 is specifically adapted to calculate the GeoHash encoded string corresponding to the coordinate information of the POI data through the GeoHash algorithm.

[0057] In an embodiment of the present invention, the first partitioning unit 302 is adapted to determine the positioning block hit by the POI data according to the GeoHash encoded string, and use the positioning block and the eight surrounding blocks as the area where the POI data falls.

[0058] In an embodiment of the present invention, the first partitioning unit 302 is specifically adapted to partition each POI data falling into the same area into a container, and the container includes a hash bucket having a plurality of hash units.

[0059] In an embodiment of the present invention, the device 300 further includes: a second partitioning unit, adapted to establish an inverted index for the POI data in the hash bucket to partition the POI data in the hash bucket into each hash sub-bucket.

[0060] In an embodiment of the present invention, the second partitioning unit is specifically adapted to extract the name text of the POI data, perform word segmentation on the name text to obtain a plurality of word segmentation segments, establish an inverted index using the word segmentation segments, and partition the POI data containing the same word segmentation segment into a hash sub-bucket.

[0061] In an embodiment of the present invention, the device 300 further includes: a filtering unit, adapted to filter the POI data in the hash bucket using a plurality of preset filtering conditions.

[0062] Regarding Figure 3 The illustrative explanations of the steps performed by each unit in the shown POI data partitioning device are the same as those in the foregoing method embodiment and will not be elaborated here one by one.

[0063] It should be noted that:

[0064] The algorithms and displays provided herein are not inherently related to any specific computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the teachings herein. The structure required to construct such a device is obvious from the above description. In addition, the present invention is not directed to any specific programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the description of the specific language above is to disclose the best implementation manner of the present invention.

[0065] In the specification provided herein, a number of specific details are set forth. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

[0066] Similarly, it should be understood that in order to streamline this disclosure and assist in understanding one or more of the various inventive aspects, in the foregoing description of exemplary embodiments of the invention, the various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.

[0067] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from those of the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) can be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0068] In addition, those skilled in the art will be able to understand that although some of the embodiments described herein include certain features included in other embodiments but not other features, the combination of the features of different embodiments means that it is within the scope of the invention and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.

[0069] Each component embodiment of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the page performance testing device according to the embodiments of the present invention. The present invention can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0070] For example, Figure 4 is a schematic structural diagram of an electronic device in an embodiment of the present invention. The electronic device 400 includes: a processor 410, and a memory 420 storing a computer program that can run on the processor 410. The processor 410 is configured to execute the steps of the method in the present invention when executing the computer program in the memory 420. The memory 420 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. The memory 420 has a storage space 430 for storing a computer program 431 for executing any method step in the above method. The computer program 431 can be read from or written into one or more computer program products. These computer program products include program code carriers such as hard disks, compact discs (CDs), memory cards, or floppy disks. Such computer program products are usually, for example Figure 5 the computer-readable storage medium described above.

[0071] Figure 5 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present invention. The computer-readable storage medium 500 stores a computer program 431 for executing the method steps according to the present invention, and can be read by the processor 410 of the electronic device 400. When the computer program 431 runs on the electronic device 400, it causes the electronic device 400 to execute each step of the method described above. Specifically, the computer program 431 stored in the computer-readable storage medium can execute the method shown in any of the above embodiments. The computer program 431 can be compressed in an appropriate form.

[0072] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names.

Claims

1. A method for partitioning POI data, wherein, including: For the obtained POI data, calculate the corresponding spatial index code according to the coordinate information of the POI data; Determine the area where the POI data falls according to the spatial index code, and divide each POI data falling into the same area into a container; wherein, the container includes a hash bucket with multiple hash units; Create an inverted index for the POI data in the hash bucket to divide the POI data in the hash bucket into each hash sub-bucket; The creating an inverted index for the POI data in the hash bucket includes: Extract the name text of the POI data, perform word segmentation on the name text to obtain multiple word segmentation fragments, create an inverted index using the word segmentation fragments, and divide the POI data containing the same word segmentation fragment into a hash sub-bucket.

2. The method according to claim 1, wherein, Calculating the corresponding spatial index code according to the coordinate information of the POI data includes: Calculate the GeoHash coding string corresponding to the coordinate information of the POI data through the GeoHash algorithm.

3. The method according to any one of claims 1-2, wherein, Determining the area where the POI data hits according to the spatial index code includes: Determine the positioning block where the POI data hits according to the GeoHash coding string, and use the positioning block and the eight blocks around the positioning block as the area where the POI data falls.

4. The method according to claim 1, wherein The method further includes: filtering the POI data in the hash bucket using a preset variety of filtering conditions.

5. A POI data partitioning device, wherein, including: A calculation unit, adapted to calculate the corresponding spatial index code for the obtained POI data according to the coordinate information of the POI data; A first division unit, adapted to determine the area where the POI data falls according to the spatial index code, and divide each POI data falling into the same area into a container; wherein, the container includes a hash bucket with multiple hash units; The device further includes: a second division unit, adapted to create an inverted index for the POI data in the hash bucket to divide the POI data in the hash bucket into each hash sub-bucket; The second division unit is specifically adapted to extract the name text of the POI data, perform word segmentation on the name text to obtain multiple word segmentation fragments, create an inverted index using the word segmentation fragments, and divide the POI data containing the same word segmentation fragment into a hash sub-bucket.

6. The device according to claim 5, wherein, The calculation unit is specifically adapted to calculate the GeoHash coding string corresponding to the coordinate information of the POI data through the GeoHash algorithm.

7. The device according to any one of claims 5-6, wherein, The first division unit is adapted to determine the positioning block where the POI data hits according to the GeoHash coding string, and use the positioning block and the eight blocks around the positioning block as the area where the POI data falls.

8. The device according to claim 5, wherein The device further includes: a filtering unit, adapted to filter the POI data in the hash bucket using a preset variety of filtering conditions.

9. An electronic device, wherein, The electronic device includes: a processor, and a memory storing a computer program that can run on the processor; wherein, the processor is used to execute the method according to any one of claims 1-4 when executing the computer program in the memory.

10. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by the processor, it implements the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Method for depicting electronic navigation map and server

    CN102141406A

  • Data block processing method

    CN102567434A

  • Determination of authority stations and building method and device of authority station database

    CN105677804A

  • Space keyword query method and device based on geohash and Patricia Trie

    CN108846013A