CN109994038B - Method and device for determining interest points in irregular area and electronic equipment - Google Patents

Method and device for determining interest points in irregular area and electronic equipment Download PDF

Info

Publication number
CN109994038B
CN109994038B CN201910127649.2A CN201910127649A CN109994038B CN 109994038 B CN109994038 B CN 109994038B CN 201910127649 A CN201910127649 A CN 201910127649A CN 109994038 B CN109994038 B CN 109994038B
Authority
CN
China
Prior art keywords
determining
interest
irregular
region
area
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.)
Active
Application number
CN201910127649.2A
Other languages
Chinese (zh)
Other versions
CN109994038A (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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201910127649.2A priority Critical patent/CN109994038B/en
Publication of CN109994038A publication Critical patent/CN109994038A/en
Application granted granted Critical
Publication of CN109994038B publication Critical patent/CN109994038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram
    • G09B29/003Maps
    • G09B29/005Map projections or methods associated specifically therewith
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram
    • G09B29/003Maps
    • G09B29/006Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes
    • G09B29/007Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes using computer methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Educational Technology (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Ecology (AREA)
  • Instructional Devices (AREA)
  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method for determining interest points in an irregular area, belongs to the technical field of searching, and is used for solving the problem that the performance of determining the interest points is low when more or dense points exist in a circumscribed rectangle of the irregular area in the prior art. The method for determining the interest points in the irregular area comprises the following steps: determining a circumscribed rectangular region of the irregular region and candidate interest points in the circumscribed rectangular region; dividing the circumscribed rectangular area into a plurality of geographical areas; determining the geographic region that is within the irregular region and is apart from a boundary of the irregular region; determining a first point of interest from the candidate points of interest based on the geographic region that is within the irregular region and apart from the boundary of the irregular region. According to the method and the device, the circumscribed rectangle of the irregular area is divided into the plurality of geographical areas, and the geographical areas are used as the basic search units to determine the interest points, so that the performance of determining the interest points is effectively improved.

Description

Method and device for determining interest points in irregular area and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and an electronic device for determining a point of interest in an irregular area.
Background
In an interest point search application scenario, for example, an application scenario such as a restaurant, a hotel, a rental house, and the like, in order to improve interest point search efficiency and improve user experience, a preferred scheme is to support a user to specify an interest point search area. For example, in a map-based point of interest search application scenario, a user is enabled to hand-draw an irregular area on a map so that the system searches for points of interest within the irregular area. For example, in the chinese patent application with publication No. CN102663033A entitled "method for searching interest points in designated area of map by hand-drawing", the user can freely designate the area and search for interest points by hand-drawing on the electronic map of the client. However, when searching for an interest point, the patent first needs to determine whether all points in the circumscribed rectangle of the area specified by the user are interest points, and when there are many or dense points in the circumscribed rectangle, the performance of determining the interest point by the method is poor.
Disclosure of Invention
The application provides a method for determining interest points in an irregular area, which is beneficial to improving the performance of determining the interest points.
In order to solve the above problem, in a first aspect, an embodiment of the present application provides a method for determining a point of interest in an irregular area, including:
determining a circumscribed rectangular region of the irregular region and candidate interest points in the circumscribed rectangular region;
dividing the circumscribed rectangular area into a plurality of geographical areas;
determining the geographic region that is within the irregular region and is apart from a boundary of the irregular region;
determining M first interest points from the candidate interest points according to the geographic area which is separated from the boundary of the irregular area and is in the irregular area, wherein M is an integer which is greater than or equal to 0.
In a second aspect, an embodiment of the present application provides an apparatus for determining a point of interest in an irregular area, including:
the device comprises a circumscribed rectangular region and candidate interest point determining module, a candidate interest point determining module and a judging module, wherein the circumscribed rectangular region and the candidate interest point determining module are used for determining a circumscribed rectangular region of an irregular region and candidate interest points in the circumscribed rectangular region;
the geographic zone determining module is used for dividing the circumscribed rectangular area into a plurality of geographic zones;
a geographic region classification module to determine the geographic region within the irregular region and apart from a boundary of the irregular region;
a first interest point determining module, configured to determine M first interest points from the candidate interest points according to the geographic region that is apart from the boundary of the irregular region and within the irregular region, where M is an integer greater than or equal to 0.
In a third aspect, an embodiment of the present application further discloses an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for determining a point of interest in an irregular area according to the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and the method for determining a point of interest in an irregular area includes the steps disclosed in the present application.
The method for determining the interest points in the irregular area, disclosed by the embodiment of the application, solves the problem that the performance of the determined interest points is poor when more points in the circumscribed rectangle of the irregular area are dense in the prior art by determining the circumscribed rectangle area of the irregular area and candidate interest points in the circumscribed rectangle area, then dividing the circumscribed rectangle area into a plurality of geographical blocks, further determining the geographical blocks which are separated from the boundary of the irregular area and are in the irregular area, and finally determining M first interest points from the candidate interest points according to the geographical blocks which are separated from the boundary of the irregular area and are in the irregular area, wherein M is an integer which is greater than or equal to 0. According to the method for determining the interest points in the irregular area, the circumscribed rectangle of the irregular area is divided into the plurality of geographic areas, and then the geographic areas are used for replacing a single interest point to serve as the basic search unit to determine the interest points, so that the performance of determining the interest points is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of a method for determining a point of interest in an irregular area according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of an irregular area and its circumscribed rectangular area in one embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a distribution of geographic zones according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for determining interest points in an irregular area according to a second embodiment of the present application;
FIG. 5 is a second schematic diagram of the distribution of geographic areas according to the second embodiment of the present application;
fig. 6 is a schematic structural diagram of a device for determining interest points in an irregular area according to a third embodiment of the present application;
fig. 7 is a second schematic structural diagram of an apparatus for determining points of interest in an irregular area according to a third embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
As shown in fig. 1, a method for determining a point of interest in an irregular area disclosed in this embodiment includes: step 110 to step 140.
Step 110, determining a circumscribed rectangular region of the irregular region and candidate interest points in the circumscribed rectangular region.
The method for determining the interest points in the irregular area, disclosed by the embodiment of the application, is suitable for the irregular area determined by any method. For example, an irregular area selected on an electronic map displayed on a computer by a mouse, an irregular area selected on an electronic map displayed on a mobile terminal by a user through a touch screen, an irregular area on an electronic map determined by inputting a plurality of vertex geographical position coordinates, and the like. In particular, the irregular region is a fully enclosed region, such as 210 in fig. 2. According to different ways of obtaining the irregular area, a corresponding method is selected, and the position coordinates of each point on the boundary of the irregular area can be determined.
In specific implementation, a unique rectangle may be determined according to four points on the boundary of the irregular area, which are the top, bottom, left, and right points, and the area corresponding to the rectangle is used as a circumscribed rectangular area of the irregular area, such as 220 in fig. 2.
Furthermore, by comparing the coordinates of each interest point in the electronic map with the coordinates of the four vertexes of the circumscribed rectangular area, each interest point in the electronic map corresponding to the circumscribed rectangular area can be determined, and the determined interest points are used as candidate interest points in the circumscribed rectangular area. Or comparing the Geohash code of each interest point in the electronic map with the Geohash code of the circumscribed rectangular area, determining each interest point in the electronic map corresponding to the circumscribed rectangular area, and taking the determined interest point as a candidate interest point in the circumscribed rectangular area.
When the method is specifically implemented, the candidate interest points in the circumscribed rectangular region can be determined in other manners, which is not illustrated in this embodiment.
And step 120, dividing the circumscribed rectangular area into a plurality of geographical areas.
Furthermore, the circumscribed rectangular area is divided according to preset rules, and a plurality of geographical areas can be determined in the circumscribed rectangular area. In some embodiments of the present application, the circumscribed rectangular region may be evenly divided into P × Q small rectangles based on Geohash coding, as shown in fig. 3, each small rectangle being a geographic region. And P and Q are positive integers, and the values of P and Q are determined according to the number of position points in the circumscribed rectangular area. If the number of the position points in the circumscribed rectangular region is small, that is, the position points are sparsely distributed, the values of P and Q can be made smaller, so that each geographic region contains a certain number of candidate interest points.
In other embodiments of the present application, the geographic zones may also be of different sizes, for example, the geographic zone near the center of the circumscribed rectangular area is larger, and the geographic zone near the periphery of the circumscribed rectangular area is smaller. Because the irregular area designated by the user is usually a convex polygonal irregular area, the number of times of determining the intersection of the geographical area and the boundary of the irregular area can be reduced by dividing a larger geographical area at a position close to the center of the circumscribed rectangular area, and the efficiency of determining the interest point is improved. Meanwhile, a smaller geographical block is marked at a position close to the periphery of the circumscribed rectangular area, so that a finer-grained geographical block which is not intersected with the boundary of the irregular area is easily determined, and the interest point determining efficiency is further improved.
In other embodiments of the present application, the circumscribed rectangular area may be further divided into a plurality of geographic areas according to a Geohash code of each position coordinate in the electronic map. The specific implementation of dividing the circumscribed rectangular area into a plurality of geographic zones according to the Geohash codes of the position coordinates in the electronic map is referred to the prior art, and details are not repeated in the application.
Step 130, determining the geographical area that is apart from the border of the irregular area and within the irregular area.
After determining a plurality of geographic areas included in the circumscribed rectangular area, further determining whether the geographic areas are in an intersecting relationship or an departing relationship with the boundary of the irregular area, namely determining the geographic areas intersecting the boundary of the irregular area and the departing geographic areas in the plurality of geographic areas. In specific implementation, the position relationship between the geographic zone and the irregular area may be determined by determining whether the intersection point of the straight line where each geographic zone boundary is located and the irregular area boundary is on the geographic zone boundary, for example, the geographic zones 310 and 320 in fig. 3 are in a separated relationship with the irregular area boundary, and for example, the geographic zone 330 in fig. 3 is in an intersecting relationship with the irregular area boundary.
Further, for geographical areas that are distant from the border of the irregular area, it is determined which are geographical areas within the irregular area. In some embodiments of the present application, a horizontal ray may be taken from any point (including the boundary) on the geographic area to the right, and if the ray intersects the boundary of the irregular area at an odd number of edges, it is determined that the geographic area is within the irregular area, such as geographic area 310. For example, if a horizontal ray is taken from any point on the left side of the geographic area 310 to the right, and the horizontal ray is denoted as a first ray, and the first ray has only one intersection with the boundary of the irregular area, it is determined that the geographic area 310 is within the irregular area.
Step 140, determining M first interest points from the candidate interest points according to the geographical block which is separated from the boundary of the irregular region and is in the irregular region, wherein M is an integer greater than or equal to 0.
Further, M first points of interest are determined from the candidate points of interest based on the determined geographic region (e.g., geographic region 310) that is located apart from the boundary of the irregular region and within the irregular region. For example, all candidate points of interest within the geographic zone 310 are determined to be first points of interest.
In some embodiments of the present application, the first point of interest may also be determined based on a Geohash encoding of the geographic region (e.g., geographic region 310) that is located apart from and within the boundary of the irregular region. For example, for the geographic region 310 in fig. 3, the Geohash code for the geographic region 310 is first determined, assuming that the Geohash code for the geographic region 310 is 123456789. Then, traversing the Geohash codes of the position coordinates of all the candidate interest points, and taking the candidate interest points with the first 9 bits being 123456789 of the Geohash codes of all the position coordinates as the first interest points.
The method for determining the interest points in the irregular area, disclosed by the embodiment of the application, solves the problem that the performance of determining the interest points is poor when a plurality of points in the circumscribed rectangle of the irregular area are dense in the prior art by determining the circumscribed rectangle area of the irregular area and candidate interest points in the circumscribed rectangle area, then dividing the circumscribed rectangle area into a plurality of geographical blocks, further determining the geographical blocks which are separated from the boundary of the irregular area and are in the irregular area, and finally determining M first interest points from the candidate interest points according to the geographical blocks which are separated from the boundary of the irregular area and are in the irregular area, wherein M is an integer greater than or equal to 0. According to the method for determining the interest points in the irregular area, the circumscribed rectangle of the irregular area is divided into the plurality of geographic areas, and then the geographic areas are used for replacing a single interest point to serve as the basic search unit to determine the interest points, so that the performance of determining the interest points is effectively improved.
Example two
As shown in fig. 4, the method for determining a point of interest in an irregular area disclosed in this embodiment includes: step 410 to step 470.
Step 410, determining a circumscribed rectangular region of the irregular region and candidate interest points in the circumscribed rectangular region.
In some embodiments of the present application, the determining a bounding rectangle region of the irregular region and candidate interest points within the bounding rectangle region includes: determining a circumscribed rectangular area of the irregular area; determining an interest point in a circumscribed circle region of the circumscribed rectangular region by calling a geographical position interface preset by Redis application; and determining the interest points positioned in the circumscribed rectangular area as candidate interest points.
Redis is a common distributed storage system framework that stores the full amount of information of a point of interest, including its location coordinates, when electronic map data is stored in a Redis system or application. Generally, the coordinates of the interest points are longitude and latitude coordinates, and in order to improve the efficiency of determining the interest points during specific implementation of the application, the stored information of the interest points further includes a Geohash code of the position coordinates. In specific implementation, the coding length of the Geohash code is determined according to the interest point search precision, for example, a 9-bit Geohash code can be selected to identify the position of the interest point, and the precision of the position of the interest point is 2 meters. In this embodiment, a specific technical solution of a method for determining an interest point in an irregular area is illustrated by determining an interest point stored in Redis.
After the irregular area input by the user is acquired, the circumscribed rectangular area of the irregular area can be determined by the method described in the first embodiment.
And then, determining the interest points in the circumscribed circle region of the circumscribed rectangular region by calling a geographical position interface preset by the Redis application. For example, first, the center of the circumscribed rectangular region is determined; then, determining a circumscribed circle region of the circumscribed rectangular region by taking the center of the circumscribed rectangular region as a circle center; then, the GEORADIUS is called to obtain the information of all the interest points in the determined circumcircle region. The information of the interest points comprises Geohash codes of the position coordinates of the interest points.
Further, filtering out the interest points outside the circumscribed rectangular area from the interest points in the circumscribed circle area, and reserving the interest points in the circumscribed rectangular area as candidate interest points. For a specific implementation of the interest point located in the circumscribed rectangular region, refer to implementation one, which is not described in detail in this embodiment.
Step 420, determining whether the number of the candidate interest points is greater than a preset number threshold, if the number of the candidate interest points is greater than the preset number threshold, jumping to step 440, otherwise, executing jumping to step 430.
In some embodiments of the present application, before dividing the circumscribed rectangular area into a plurality of geographic zones, the method further includes: judging whether the number of the candidate interest points is greater than a preset number threshold value or not; if the number of the candidate interest points is larger than the preset number threshold, skipping to the step of dividing the circumscribed rectangular area into a plurality of geographical blocks, otherwise, determining the interest points in the candidate interest points in the circumscribed rectangular area.
Step 430, determining interest points in the candidate interest points in the circumscribed rectangular region.
In specific implementation, if the number of the candidate interest points is small, the method in the prior art is adopted to determine the interest points, and the influence on the performance of the method for determining the interest points is not large. Therefore, when the number of candidate interest points is smaller than the preset number threshold, the interest points may be determined in the circumscribed rectangular region by using a method in the prior art. The preset number threshold is determined according to the experimental result, and may be set to 100, for example.
And finishing the operation of once determining the interest point and outputting the determined interest point.
The corresponding interest point determining method is judged and selected according to the number of the interest points in the circumscribed rectangular area, when the number of the interest points is small, the interest points are determined and judged one by one, when the number of the interest points is large, the geographic area is firstly used for determining and judging, then the remaining small number of the interest points are determined and judged one by one, and the performance of determining the interest points can be further improved.
Step 440, dividing the circumscribed rectangular area into a plurality of geographic zones.
When the number of the candidate interest points is larger than the preset number threshold, the performance of determining the interest points can be effectively improved by taking the geographical area as the basic comparison unit.
For a specific implementation of dividing the circumscribed rectangular area into a plurality of geographic zones, reference is made to the first embodiment, which is not described again in this embodiment.
Step 450, determining the geographic region that is within the irregular region and is apart from the border of the irregular region.
For a specific implementation of determining the geographical area that is separated from the boundary of the irregular area and is within the irregular area, refer to the first embodiment, which is not described again in this embodiment.
Step 460, determining M first interest points from the candidate interest points according to the geographical block which is separated from the boundary of the irregular region and is in the irregular region, wherein M is an integer greater than or equal to 0.
In some embodiments of the present application, the information of the candidate points of interest comprises a Geohash encoding of location coordinates, said determining M first points of interest from the candidate points of interest based on the geographic region that is apart from and within the boundary of the irregular region, comprising: determining a Geohash encoding of the geographic region that is within the irregular region and that is apart from a boundary of the irregular region; and determining all the candidate interest points with the prefix of the specified digit of the position coordinate Geohash code in the candidate interest points being the same as the Geohash code of the geographic area as a first interest point.
For example, for the geographic region 310 in fig. 3, the Geohash code for the geographic region 310 is first determined, assuming that the Geohash code for the geographic region 310 is 123456789. Then, traversing the Geohash codes of the position coordinates of all the candidate interest points, and taking the candidate interest points with the first 9 bits being 123456789 of the Geohash codes of all the position coordinates as the first interest points. Due to the rule of the Geohash codes, the first few-bit characters of two Geohash codes at two close positions are the same, and the closer the two positions are, the longer the same character string in the prefix of the Geohash codes is, so that when the positions of two interest points are smaller than a preset distance threshold, namely, the precision of the two interest points is smaller than the precision of the Geohash, the Geohash codes of the two interest points are the same. Therefore, through the Geohash coding of the geographic area in the irregular area, it can be determined that the candidate interest points in all the geographic areas (e.g., the geographic area 510 covered by the slashed portion in fig. 5) in the irregular area are the first interest points, i.e., the interest points meeting the search requirement of the user.
Step 470, determining the candidate interest points located in the irregular area among the candidate interest points except the M first interest points as N second interest points, where N is an integer greater than or equal to 0.
In some embodiments of the present application, there are also geographic regions, such as the geographic region 520 in fig. 5, intersecting the boundary of the irregular area, and some of the candidate interest points are located in the irregular area and are interest points that meet the search criteria. In this case, after determining M first interest points from the candidate interest points according to the geographic region that is apart from the boundary with the irregular region and within the irregular region, the method further includes: and determining the candidate interest points positioned in the irregular area from the candidate interest points except the M first interest points as N second interest points, wherein N is an integer greater than or equal to 0.
After a part of the interest points meeting the search condition is determined, another part of the interest points meeting the search condition exists in the irregular area, namely candidate interest points in the irregular area in a geographical area (such as a geographical area 520 not covered by oblique lines in the irregular area shown in fig. 5) intersected with the boundary of the irregular area. In some embodiments of the present application, the interest points in the irregular area, except the first interest point which has been determined, which meet the search condition may be sequentially determined through a PNPOLY algorithm.
In some embodiments of the present application, the step of determining, as N second interest points, the candidate interest points located in the irregular area from among the candidate interest points other than the M first interest points includes: performing the following operations for each candidate interest point except the M first interest points respectively: making a ray from the candidate interest point level to the right or left; and if the ray intersects the boundary of the irregular area at an odd number of edges, determining the candidate interest point as a second interest point. For example, the following operations are respectively performed for each of the candidate interest points except the first interest point: making a ray from the candidate interest point to the right horizontally, if the ray intersects with the boundary of the irregular area at an odd number of edges, determining that the candidate interest point is positioned in the irregular area, and outputting the candidate interest point as a second interest point, wherein the candidate interest point is the interest point meeting the search condition; and if the boundary of the ray and the irregular area is intersected on an even number of edges, determining that the candidate interest point is positioned outside the irregular area and is the interest point which does not accord with the search condition. So doing, N second interest points are determined, where N is an integer greater than or equal to 0.
Through the processing, all the first interest points and the second interest points which meet the search condition are determined.
This is the end of the point of interest determination operation.
In other embodiments of the present application, a point of interest search operation may be further performed based on the determined first point of interest and second point of interest. For example, a point-of-interest search is further performed at the determined first point-of-interest and second point-of-interest based on additional search criteria (e.g., geographic location coordinates and geographic range radius) to determine points-of-interest that meet the additional search criteria.
The method for determining interest points in an irregular area, disclosed by the embodiment of the application, solves the problem that when points in a circumscribed rectangle of the irregular area are more or more dense in the prior art, the prior art is solved by determining a circumscribed rectangle of the irregular area and candidate interest points in the circumscribed rectangle, then dividing the circumscribed rectangle into a plurality of geographical blocks, further determining the geographical blocks which are separated from the boundary of the irregular area and are in the irregular area, and finally determining M first interest points from the candidate interest points according to the geographical blocks which are separated from the boundary of the irregular area and are in the irregular area, and determining the candidate interest points which are positioned in the irregular area and are in the candidate interest points except the M first interest points as N second interest points, wherein N is an integer greater than or equal to 0, and the method for determining the interest points has poor performance. Taking the irregular area shown in fig. 5 as an example, the method for determining the interest points in the irregular area disclosed in the embodiment of the present application divides the circumscribed rectangle of the irregular area into a plurality of geographic regions, and then determines the interest points by using the geographic regions instead of a single interest point as a basic search unit, and the actually determined interest points point by point only have about 1/3 interest points in the circumscribed rectangular area, so that the operation times of comparing the interest points one by one are greatly reduced, and the performance of the method for determining the interest points is effectively improved. When the method for determining the interest points in the irregular area is used for determining the interest points on large-scale data, compared with the method for determining the interest points in the prior art, the performance of the method for determining the interest points in the irregular area can be improved by 1-2 orders of magnitude.
EXAMPLE III
As shown in fig. 6, the apparatus for determining a point of interest in an irregular area disclosed in this embodiment includes:
a circumscribed rectangle region and candidate interest point determining module 610, configured to determine a circumscribed rectangle region of an irregular region and candidate interest points in the circumscribed rectangle region;
a geographic zone determination module 620, configured to divide the circumscribed rectangular area into a plurality of geographic zones;
a geographic region classification module 630 for determining the geographic regions that are within the irregular region and are apart from the border of the irregular region;
a first interest point determining module 640, configured to determine M first interest points from the candidate interest points according to the geographic region that is apart from the boundary of the irregular region and is within the irregular region, where M is an integer greater than or equal to 0.
Optionally, as shown in fig. 7, the apparatus further includes:
a second interest point determining module 650, configured to determine, as N second interest points, the candidate interest points located in the irregular area from the candidate interest points except for the M first interest points, where N is an integer greater than or equal to 0.
Optionally, the determining, as N second interest points, candidate interest points located in the irregular area from among the candidate interest points except for the M first interest points includes:
performing the following operations for each candidate interest point except the M first interest points respectively:
making a ray from the candidate interest point level to the right or left;
and if the ray intersects the boundary of the irregular area at an odd number of edges, determining the candidate interest point as a second interest point.
Optionally, as shown in fig. 7, the apparatus further includes:
a judgment processing module 660, configured to judge whether the number of the candidate interest points is greater than a preset number threshold; and the number of the first and second groups,
a third interest point determining module 670, configured to jump to the geographic block determining module if the number of candidate interest points is greater than the preset number threshold, and otherwise, determine an interest point from the candidate interest points in the circumscribed rectangular area.
The corresponding interest point determining method is judged and selected according to the number of the interest points in the circumscribed rectangular area, when the number of the interest points is small, the interest points are determined and judged one by one, when the number of the interest points is large, the geographic area is firstly used for determining and judging, then the remaining small number of the interest points are determined and judged one by one, and the performance of determining the interest points can be further improved.
Optionally, the information of the candidate interest point includes a Geohash code of the position coordinate, and the first interest point determining module 640 is further configured to:
determining a Geohash encoding of the geographic region that is within the irregular region and that is apart from a boundary of the irregular region;
and determining all the candidate interest points with the prefix of the specified digit of the position coordinate Geohash code in the candidate interest points being the same as the Geohash code of the geographic area as a first interest point.
Optionally, the circumscribed rectangular region and candidate interest point determining module 610 is further configured to:
determining a circumscribed rectangular area of the irregular area;
determining an interest point in a circumscribed circle region of the circumscribed rectangular region by calling a geographical position interface preset by Redis application;
and determining the interest points positioned in the circumscribed rectangular area as candidate interest points.
The device for determining interest points in an irregular area disclosed in the embodiment of the present application is used to implement each step of the method for determining interest points in an irregular area described in the first and second embodiments of the present application, and specific implementation manners of each module of the device refer to the corresponding step, which is not described herein again.
The device for determining the interest points in the irregular area, disclosed by the embodiment of the application, solves the problem that the performance of the determined interest points is poor when more points in the circumscribed rectangle of the irregular area are dense in the prior art by determining the circumscribed rectangle area of the irregular area and candidate interest points in the circumscribed rectangle area, then dividing the circumscribed rectangle area into a plurality of geographical blocks, further determining M first interest points from the candidate interest points, wherein M is an integer greater than or equal to 0, and separating the boundary of the irregular area and the geographical blocks in the irregular area.
Further, in other embodiments of the present application, the method further includes determining, as N second interest points, the candidate interest points located in the irregular area, among the candidate interest points except for the M first interest points, where N is an integer greater than or equal to 0. Taking the irregular area shown in fig. 5 as an example, the device for determining an interest point in an irregular area disclosed in the embodiment of the present application divides an external rectangle of the irregular area into a plurality of geographic regions, and then uses the geographic regions to replace a single interest point as a basic search unit to determine the interest point, and the actually determined interest point by point is only an interest point of about 1/3 in the external rectangular area, so that the operation times of comparing the interest points one by one are greatly reduced, and the performance of determining the interest point is effectively improved. When the device for determining the interest points in the irregular area searches on large-scale data, compared with a method for determining the interest points in the prior art, the performance of the device for determining the interest points in the irregular area can be improved by 1-2 orders of magnitude.
Correspondingly, the application also discloses an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the method for determining the interest points in the irregular area according to the first embodiment and the second embodiment of the application. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer and the like.
The present application also discloses a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method for determining points of interest in an irregular area as described in the first and second embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The method and the device for determining the interest points in the irregular area provided by the application are introduced in detail, a specific example is applied in the method to explain the principle and the implementation of the application, and the description of the embodiment is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Claims (9)

1. A method for determining interest points in an irregular area is characterized by comprising the following steps:
determining a circumscribed rectangular region of the irregular region and candidate interest points in the circumscribed rectangular region;
dividing the circumscribed rectangular area into a plurality of geographical areas, wherein the geographical areas are different in size, and the geographical area in the center of the circumscribed rectangular area is larger than the geographical area close to the periphery of the circumscribed rectangular area;
determining the geographic region that is within the irregular region and is apart from a boundary of the irregular region;
determining M first interest points from the candidate interest points according to the geographic area which is separated from the boundary of the irregular area and is in the irregular area, wherein M is an integer which is greater than or equal to 0;
after the step of determining M first points of interest from the candidate points of interest according to the geographic region that is apart from and within the boundary of the irregular region, further comprising:
and determining the candidate interest points positioned in the irregular area from the candidate interest points except the M first interest points as N second interest points, wherein N is an integer greater than or equal to 0.
2. The method of claim 1, wherein the step of dividing the circumscribed rectangular area into a plurality of geographic zones is preceded by the step of:
judging whether the number of the candidate interest points is greater than a preset number threshold value or not;
if the number of the candidate interest points is larger than the preset number threshold, skipping to the step of dividing the circumscribed rectangular area into a plurality of geographical blocks, otherwise, determining the interest points in the candidate interest points in the circumscribed rectangular area.
3. The method according to any one of claims 1 to 2, wherein the information of the candidate points of interest comprises a Geohash coding of the location coordinates, and wherein the step of determining M first points of interest from the candidate points of interest on the basis of the geographical area located away from the border of the irregular area and within the irregular area comprises:
determining a Geohash encoding of the geographic region that is within the irregular region and that is apart from a boundary of the irregular region;
and determining all the candidate interest points with the prefix of the specified digit of the position coordinate Geohash code in the candidate interest points being the same as the Geohash code of the geographic area as a first interest point.
4. The method of claim 3, wherein the step of determining a bounding rectangle region of the irregular region and candidate points of interest within the bounding rectangle region comprises:
determining a circumscribed rectangular area of the irregular area;
determining an interest point in a circumscribed circle region of the circumscribed rectangular region by calling a geographical position interface preset by Redis application;
and determining the interest points positioned in the circumscribed rectangular area as candidate interest points.
5. The method of claim 1, wherein the determining the candidate interest points located in the irregular area among the candidate interest points other than the M first interest points as N second interest points comprises:
performing the following operations for each candidate interest point except the M first interest points respectively:
making a ray from the candidate interest point level to the right or left;
and if the ray intersects the boundary of the irregular area at an odd number of edges, determining the candidate interest point as a second interest point.
6. An apparatus for determining a point of interest in an irregular area, comprising:
the device comprises a circumscribed rectangular region and candidate interest point determining module, a candidate interest point determining module and a judging module, wherein the circumscribed rectangular region and the candidate interest point determining module are used for determining a circumscribed rectangular region of an irregular region and candidate interest points in the circumscribed rectangular region;
the geographic zone determining module is used for dividing the circumscribed rectangular area into a plurality of geographic zones, wherein the geographic zones are different in size, and the geographic zone in the center of the circumscribed rectangular area is larger than the geographic zone close to the periphery of the circumscribed rectangular area;
a geographic region classification module to determine the geographic region within the irregular region and apart from a boundary of the irregular region;
a first interest point determination module for determining M first interest points from the candidate interest points according to the geographical region that is apart from the boundary of the irregular region and within the irregular region; and a second interest point determining module, configured to determine, as N second interest points, the candidate interest points located in the irregular area from the candidate interest points except for the M first interest points, where N is an integer greater than or equal to 0.
7. The apparatus of claim 6, wherein the information of the candidate interest points comprises a Geohash code of location coordinates, and wherein the determining M first interest points from the candidate interest points according to the geographic region located away from the boundary of the irregular region and within the irregular region comprises:
determining a Geohash encoding of the geographic region that is within the irregular region and that is apart from a boundary of the irregular region;
and determining all the candidate interest points with the prefix of the specified digit of the position coordinate Geohash code in the candidate interest points being the same as the Geohash code of the geographic area as a first interest point.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for determining points of interest in an irregular area according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for determining points of interest in an irregular area according to any one of claims 1 to 5.
CN201910127649.2A 2019-02-20 2019-02-20 Method and device for determining interest points in irregular area and electronic equipment Active CN109994038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910127649.2A CN109994038B (en) 2019-02-20 2019-02-20 Method and device for determining interest points in irregular area and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910127649.2A CN109994038B (en) 2019-02-20 2019-02-20 Method and device for determining interest points in irregular area and electronic equipment

Publications (2)

Publication Number Publication Date
CN109994038A CN109994038A (en) 2019-07-09
CN109994038B true CN109994038B (en) 2020-08-28

Family

ID=67130317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910127649.2A Active CN109994038B (en) 2019-02-20 2019-02-20 Method and device for determining interest points in irregular area and electronic equipment

Country Status (1)

Country Link
CN (1) CN109994038B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783992B (en) * 2019-11-08 2023-10-20 腾讯科技(深圳)有限公司 Map functional area determining method and device based on interest points
CN111125555B (en) * 2019-12-17 2021-09-07 北京金堤科技有限公司 Enterprise information acquisition method and device
CN113129406B (en) * 2019-12-31 2024-03-22 菜鸟智能物流控股有限公司 Data processing method and device and electronic equipment
CN111198927B (en) * 2020-01-02 2020-11-17 平安科技(深圳)有限公司 Geographic position data matching method and device, electronic equipment and storage medium
CN111476768B (en) * 2020-04-02 2021-07-20 推想医疗科技股份有限公司 Image registration method, image registration device, path planning method, path planning device, path planning system and medium
CN111859189A (en) * 2020-07-10 2020-10-30 湖南三一智能控制设备有限公司 Map display device, method, apparatus, and computer-readable storage medium
CN112884514B (en) * 2021-02-19 2023-09-26 平安科技(深圳)有限公司 Method, device, equipment and medium for analyzing activity data based on polygon algorithm
CN113689526B (en) * 2021-07-21 2023-05-26 北京三快在线科技有限公司 Method and device for dividing invalid area in map and electronic equipment
CN113763554A (en) * 2021-09-10 2021-12-07 厦门汇利伟业科技有限公司 Updating method and updating processing unit for terrain height points of irregular area
CN113779046B (en) * 2021-11-15 2022-02-11 亿海蓝(北京)数据技术股份公司 Irregular area index generation method, device, medium and electronic equipment
CN114814802A (en) * 2022-04-18 2022-07-29 北京京东乾石科技有限公司 Positioning method and device
CN116304391B (en) * 2023-05-12 2023-07-25 深圳市前海数据服务有限公司 Method and system for generating recommended selection area after map area frame selection

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663033A (en) * 2012-03-23 2012-09-12 汉海信息技术(上海)有限公司 Method for searching interest points in designated area of map by hand-drawing way
CN106708837A (en) * 2015-08-18 2017-05-24 高德软件有限公司 Interest point search method and device
CN108108489A (en) * 2018-01-12 2018-06-01 阿里巴巴集团控股有限公司 POI search methods and device based on geographical location
CN108572999A (en) * 2017-03-14 2018-09-25 腾讯科技(深圳)有限公司 The searching method and device of interest face AOI profiles
CN108763522A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 POI retrieval orderings method, apparatus and computer readable storage medium
CN108920462A (en) * 2018-06-29 2018-11-30 北京奇虎科技有限公司 Point of interest POI search method and device based on map
CN108920476A (en) * 2018-03-30 2018-11-30 斑马网络技术有限公司 Map retrieval calculates pass and holds up test macro and its test method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090169060A1 (en) * 2007-12-26 2009-07-02 Robert Bosch Gmbh Method and apparatus for spatial display and selection

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663033A (en) * 2012-03-23 2012-09-12 汉海信息技术(上海)有限公司 Method for searching interest points in designated area of map by hand-drawing way
CN106708837A (en) * 2015-08-18 2017-05-24 高德软件有限公司 Interest point search method and device
CN108572999A (en) * 2017-03-14 2018-09-25 腾讯科技(深圳)有限公司 The searching method and device of interest face AOI profiles
CN108108489A (en) * 2018-01-12 2018-06-01 阿里巴巴集团控股有限公司 POI search methods and device based on geographical location
CN108920476A (en) * 2018-03-30 2018-11-30 斑马网络技术有限公司 Map retrieval calculates pass and holds up test macro and its test method
CN108763522A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 POI retrieval orderings method, apparatus and computer readable storage medium
CN108920462A (en) * 2018-06-29 2018-11-30 北京奇虎科技有限公司 Point of interest POI search method and device based on map

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种嵌入式导航终端的兴趣点数据处理方法;任晓霞 等;《计算机应用与软件》;20130930;第30卷(第9期);114-118 *

Also Published As

Publication number Publication date
CN109994038A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109994038B (en) Method and device for determining interest points in irregular area and electronic equipment
CN110990516B (en) Map data processing method, device and server
CN109675309B (en) Construction method and device of game scene
CN109992640B (en) Method, device, equipment and storage medium for determining position grid
CN109815419B (en) Interest point indexing method, device, medium and electronic equipment based on geographic position
CN108229740B (en) Method and device for determining business circle boundary, server and storage medium
CN110633262B (en) Spark-based map intersection area calculation method and system
CN111857704A (en) Code generation method and device for layout relationship
CN116628123B (en) Dynamic slice generation method and system based on spatial database
CN110209748B (en) Method and apparatus for indexing geofences
CN113486638B (en) Table reconstruction method and device, storage medium and electronic device
CN104915053A (en) Position determining method and device for interface controls
CN112245932B (en) Game resource processing method and device and server device
CN110688995B (en) Map query processing method, computer-readable storage medium and mobile terminal
CN111569418A (en) Rendering method, device and medium for content to be output and electronic equipment
CN114048279B (en) Method and device for generating forecast information
CN114116948A (en) Geographic vector data space buffer area analysis method, device, equipment and medium
CN111353007A (en) Geographic element picking method, encoding method and device based on vector slice and electronic equipment
CN113076719B (en) Geo-fence address code determining method, location determining method and device
CN116233743A (en) Electronic fence boundary generation method and device, storage medium and terminal
JP2024507308A (en) Image sample generation method, text recognition method, device, electronic device, storage medium and computer program
CN114238528A (en) Map loading method and device, electronic equipment and storage medium
CN115309850A (en) GeoHash-based map visual range interest point retrieval method and system
JP2014099848A (en) Image division system and image division method
CN113177145A (en) Flow chart sorting method and device, electronic equipment and storage medium

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