Position information processing method and device, electronic equipment, medium and program product

By dividing the geographic region into sub-regions for parallel processing and using the ear-cutting method and DP algorithm to simplify the boundary vertices, the problem of high computational complexity of Geohash blocks in irregular geographic regions is solved, and efficient location information processing is achieved.

CN114706929BActive Publication Date: 2025-11-18ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210114261.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-30
Publication Date
2025-11-18
Estimated Expiration
2042-01-30

AI Technical Summary

Technical Problem

Geohash blocks have high computational complexity when dealing with irregular geographical regions, resulting in low computational efficiency, especially when dealing with multiple geographical regions.

Method used

The specified geographic region is divided into multiple sub-regions. The boundary vertices are simplified using the ear-cutting method and dynamic programming algorithm. The positional relationship between blocks and sub-regions is determined by triangular sub-regions and outer rectangles. The MapReduce framework is used for parallel processing.

Benefits of technology

It significantly reduces computational complexity, improves computational efficiency, and can quickly determine the locational relationship between blocks and specified geographical areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114706929B_ABST
    Figure CN114706929B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a position information processing method and device, electronic equipment, medium and program product. The position information processing method comprises: obtaining position information of a specified geographical area boundary vertex; dividing the specified geographical area into a plurality of sub-areas according to the position information of the specified geographical area boundary vertex; determining a plurality of blocks according to the position information of the sub-area boundary vertex; and determining the position relationship between the blocks and the specified geographical area according to the position relationship between the blocks and the sub-areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of geographic information processing technology, specifically to a location information processing method, apparatus, electronic device, medium, and program product. Background Technology

[0002] Location information services have experienced rapid growth in recent years and have become a hot topic in application and research. Both general public and industry users have a wide demand for location information and related services.

[0003] Location-based services (LBS) utilize various positioning technologies to determine the current location of electronic devices, enabling the provision of information resources and other services via the mobile internet. In many LBS applications, when obtaining the location information of vehicles such as cars and ships, it's necessary to know which large area the vehicle is located in—for example, which province or city the car is traveling in, or which island the ship is docked at. A relatively quick method is to pre-calculate all Geohash values ​​within all large areas and store them in a database. Geohash is an address encoding method that encodes two-dimensional spatial latitude and longitude data into a string. A Geohash uses a string to represent two coordinates, latitude and longitude; it doesn't represent a single point, but rather a region. In other words, each Geohash code can correspond to a Geohash block, which contains multiple geographic locations.

[0004] When a geographic region has an irregular shape and many boundary vertices, the computational complexity of determining the Geohash blocks within that geographic region will be very high, and the computational efficiency will be very low when there are many geographic regions to be processed. Summary of the Invention

[0005] To address the problems in the related technologies, embodiments of this disclosure provide a location information processing method, apparatus, electronic device, medium, and program product.

[0006] In a first aspect, embodiments of this disclosure provide a location information processing method, including:

[0007] Get the location information of the boundary vertices of a specified geographic region;

[0008] Based on the location information of the boundary vertices of the specified geographical region, the specified geographical region is divided into multiple sub-regions;

[0009] Based on the position information of the boundary vertices of the sub-region, multiple blocks are determined;

[0010] The positional relationship between the block and the specified geographical region is determined based on the positional relationship between the block and the sub-region.

[0011] According to embodiments of this disclosure, dividing the designated geographical region into multiple sub-regions based on the location information of the boundary vertices of the designated geographical region includes:

[0012] Based on the location information of the boundary vertices of the specified geographical region, the specified geographical region is divided into multiple triangular sub-regions using the ear-cutting method.

[0013] According to embodiments of this disclosure, dividing the designated geographical region into multiple triangular sub-regions using the ear-cutting method based on the position information of the boundary vertices of the designated geographical region includes:

[0014] Based on the location information of the boundary vertices of the specified geographic region, the DP algorithm is used to delete the boundary vertices of the specified geographic region.

[0015] Based on the location information of the boundary vertices of the specified geographic region that have not been deleted, a simplified specified geographic region is obtained, and the simplified specified geographic region is divided into multiple triangular sub-regions using the ear-cutting method.

[0016] According to embodiments of this disclosure, determining multiple blocks based on the position information of the sub-region boundary vertices includes:

[0017] The outer rectangle of the sub-region is determined based on the position information of the boundary vertices of the sub-region.

[0018] Based on the position information of the vertices of the outer rectangle, the plurality of blocks are determined, and any one of the plurality of blocks is wholly or partially located within the outer rectangle.

[0019] According to embodiments of this disclosure, each block is a Geohash encoded region.

[0020] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the positional relationship between the block and the sub-region includes:

[0021] Obtain the number of intersections between a ray with the vertex of the block as its vertex and passing through a point within the sub-region and the boundary of the sub-region;

[0022] The positional relationship between the block and the specified geographical region is determined based on the number of intersections.

[0023] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the number of intersections includes:

[0024] The number of intersections between the ray with the vertex of the block as the vertex and passing through a point in the sub-region and the boundary of the sub-region determines whether the block is at least partially located within the sub-region.

[0025] If the block is at least partially located within the sub-region, then the block is at least partially located within the specified geographic region.

[0026] According to embodiments of this disclosure, the operation of determining the positional relationship between the block and the specified geographic region is performed in parallel for the plurality of sub-regions.

[0027] Secondly, this disclosure provides a location information processing device, including:

[0028] The acquisition module is configured to acquire the location information of the boundary vertices of a specified geographic region.

[0029] The partitioning module is configured to divide the specified geographic region into multiple sub-regions based on the location information of the boundary vertices of the specified geographic region.

[0030] The first determining module is configured to determine multiple blocks based on the position information of the boundary vertices of the sub-region;

[0031] The second determining module is configured to determine the positional relationship between the block and the specified geographical region based on the positional relationship between the block and the sub-region.

[0032] According to embodiments of this disclosure, dividing the designated geographical region into multiple sub-regions based on the location information of the boundary vertices of the designated geographical region includes:

[0033] Based on the location information of the boundary vertices of the specified geographical region, the specified geographical region is divided into multiple triangular sub-regions using the ear-cutting method.

[0034] According to embodiments of this disclosure, dividing the designated geographical region into multiple triangular sub-regions using the ear-cutting method based on the position information of the boundary vertices of the designated geographical region includes:

[0035] Based on the location information of the boundary vertices of the specified geographic region, the DP algorithm is used to delete the boundary vertices of the specified geographic region.

[0036] Based on the location information of the boundary vertices of the specified geographic region that have not been deleted, a simplified specified geographic region is obtained, and the simplified specified geographic region is divided into multiple triangular sub-regions using the ear-cutting method.

[0037] According to embodiments of this disclosure, determining multiple blocks based on the position information of the sub-region boundary vertices includes:

[0038] The outer rectangle of the sub-region is determined based on the position information of the boundary vertices of the sub-region.

[0039] Based on the position information of the vertices of the outer rectangle, the plurality of blocks are determined, and any one of the plurality of blocks is wholly or partially located within the outer rectangle.

[0040] According to embodiments of this disclosure, each block is a Geohash encoded region.

[0041] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the positional relationship between the block and the sub-region includes:

[0042] Obtain the number of intersections between a ray with the vertex of the block as its vertex and passing through a point within the sub-region and the boundary of the sub-region;

[0043] The positional relationship between the block and the specified geographical region is determined based on the number of intersections.

[0044] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the number of intersections includes:

[0045] The number of intersections between the ray with the vertex of the block as the vertex and passing through a point in the sub-region and the boundary of the sub-region determines whether the block is at least partially located within the sub-region.

[0046] If the block is at least partially located within the sub-region, then the block is at least partially located within the specified geographic region.

[0047] According to embodiments of this disclosure, the operation of determining the positional relationship between the block and the specified geographic region is performed in parallel for the plurality of sub-regions.

[0048] Thirdly, embodiments of this disclosure provide an electronic device including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method as described in any of the first aspects.

[0049] Fourthly, this disclosure provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the method described in the first aspect.

[0050] Fifthly, this disclosure provides a computer program product including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect.

[0051] According to the technical solution provided in the embodiments of this disclosure, a specified geographical area is divided into multiple sub-regions, and the positional relationship between the block and the sub-regions is determined respectively, thereby determining the positional relationship between the block and the specified geographical area. Since the number of boundary vertices of the sub-regions is much smaller than that of the specified area, the computational complexity is significantly reduced and the computational efficiency is improved.

[0052] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0053] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:

[0054] Figure 1 A flowchart illustrating a location information processing method according to an embodiment of the present disclosure is shown.

[0055] Figure 2 The principle of the DP algorithm is shown.

[0056] Figure 3A A schematic diagram is shown illustrating how multiple blocks are determined based on the position information of the boundary vertices of the sub-regions, according to an embodiment of this disclosure.

[0057] Figure 3B The diagram illustrates the principle of determining the positional relationship between a block and a specified geographic region based on the positional relationship between the block and its sub-regions, according to an embodiment of the present disclosure.

[0058] Figure 4 A flowchart illustrating location information processing according to an embodiment of this disclosure is shown.

[0059] Figure 5 A structural block diagram of a location information processing apparatus according to an embodiment of the present disclosure is shown.

[0060] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0061] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing the method according to embodiments of the present disclosure is shown. Detailed Implementation

[0062] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of exemplary embodiments have been omitted from the drawings.

[0063] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.

[0064] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0065] In this disclosure, the acquisition of user information or user data is done with the user's authorization or confirmation, or by the user's active choice.

[0066] As mentioned above, Location-Based Services (LBS) utilizes various positioning technologies to obtain the current location of electronic devices, enabling the provision of information resources and other services to these devices via the mobile internet. In many LBS applications, when obtaining the location information of vehicles such as cars and ships, it's necessary to know which large area the vehicle is located in, for example, which province or city the car is traveling in, or which island the ship is docked at. A relatively quick method is to pre-calculate all Geohash values ​​within all large areas and store them in a database. Geohash is an address encoding method that encodes two-dimensional spatial latitude and longitude data into a string. Geohash uses a string to represent two coordinates, latitude and longitude; it doesn't represent a single point, but rather a region. In other words, each Geohash code can correspond to a Geohash block, which contains multiple geographic locations.

[0067] When a geographic region has an irregular shape and many boundary vertices, the computational complexity of determining the Geohash blocks within that geographic region will be very high, and the computational efficiency will be very low when there are many geographic regions to be processed.

[0068] This disclosure provides a location information processing method, including: obtaining location information of the boundary vertices of a specified geographic region; dividing the specified geographic region into multiple sub-regions based on the location information of the boundary vertices of the specified geographic region; determining multiple blocks based on the location information of the boundary vertices of the sub-regions; and determining the location relationship between the blocks and the specified geographic region based on the location relationship between the blocks and the sub-regions.

[0069] According to embodiments of this disclosure, a specified geographical region is divided into multiple sub-regions, and the positional relationship between the block and the sub-regions is determined respectively, thereby determining the positional relationship between the block and the specified geographical region. Since the number of boundary vertices of the sub-regions is much smaller than that of the specified region, the computational complexity is significantly reduced and the computational efficiency is improved.

[0070] Figure 1 A flowchart illustrating a location information processing method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the location information processing method includes the following steps S101-S104:

[0071] In step S101, the location information of the boundary vertices of the specified geographical region is obtained;

[0072] In step S102, the specified geographical region is divided into multiple sub-regions based on the location information of the boundary vertices of the specified geographical region;

[0073] In step S103, multiple blocks are determined based on the position information of the boundary vertices of the sub-region;

[0074] In step S104, the positional relationship between the block and the designated geographical region is determined based on the positional relationship between the block and the sub-region.

[0075] According to embodiments of this disclosure, the designated geographical region can be any geographical region of interest, such as an island, province, city, county, district, etc. The boundary of the designated geographical region can form a regular or irregular polygon, and the boundary can have multiple vertices. Based on the position information of the boundary vertices of the designated geographical region, the designated geographical region can be divided into multiple sub-regions. The number of boundary vertices of each sub-region is less than the number of boundary vertices of the designated geographical region. The entire set of the multiple sub-regions constitutes the designated geographical region, and there is no intersection between the multiple sub-regions.

[0076] After determining the multiple sub-regions, several blocks can be identified that are entirely within the sub-regions, partially within the sub-regions (referred to as "intersecting with the sub-regions"), or surrounding the sub-regions, and their positional relationships with the sub-regions can be determined. Since the number of boundary vertices in a sub-region is less than that in a specified region, the size and shape complexity of the sub-region are lower than those of the specified region. Therefore, the computational complexity of determining the positional relationships between the blocks and sub-regions is significantly reduced compared to directly calculating the positional relationships between blocks and a specified geographic region, resulting in a significant improvement in efficiency.

[0077] Since a sub-region is part of a designated region, if any block is wholly or partially located within a sub-region, then that block must also be wholly or partially located within the designated region. Conversely, if any block is neither located within nor intersects with any sub-region, then that block is considered to be located outside any sub-region, and therefore, it is also located outside the designated region.

[0078] According to an embodiment of this disclosure, dividing the specified geographical region into multiple sub-regions based on the position information of the boundary vertices of the specified geographical region includes: dividing the specified geographical region into multiple triangular sub-regions using the ear-cutting method based on the position information of the boundary vertices of the specified geographical region.

[0079] Ear clipping, in the field of computer graphics, is a classic algorithm for transforming simple polygons into a set of triangles. The "ear" of a simple polygon refers to a triangle formed by consecutive vertices V0, V1, and V2, containing no other vertices inside. In computer geometry terminology, the line connecting V0 and V2 is called the diagonal of the polygon, and point V1 is called the "ear tip."

[0080] The computational complexity of the ear-cutting method is O(N). 2 The following are its algorithm steps:

[0081] 1) Store the polygons using a doubly linked list, which allows for quick removal of ears. The list construction complexity is O(N);

[0082] 2) Traverse the vertices to find the ear. For each vertex V... i and the triangle <V around that vertex i-1 V i V i+1 The algorithm checks if any other vertices are in the current triangle. If any vertex is inside the triangle, it's not an ear. Only when no vertex is in the current triangle is an ear considered found. Once the linked lists of convex vertices and ears are successfully constructed, one ear is removed on each traversal. Assume the current V... i If it is an ear and is removed, then the adjacent point V of the edge structure... i-1 V i+1 Then it will change. If the adjacent point is a convex vertex, then it remains convex. If the adjacent point is an ear, then when V... i Removing a vertex V does not guarantee the preservation of the ear's shape. If the adjacent point is concave, it may become convex or even an ear. Therefore, when removing vertex V... i Then, if the adjacent point is a convex point, the relevant vertices must be traversed to check if it contains other points in order to test whether it is an ear.

[0083] If there are N ears, each update will trigger an ear detection, and each update operation takes O(N) steps. Therefore, the complexity of the ear removal process is O(N). 2 ).

[0084] The ear-cutting method can divide a specified area into multiple triangular sub-regions.

[0085] Since the boundaries of the specified region may be very irregular, the boundaries of the specified region can be simplified before performing the ear-cutting method, that is, the number of its vertices can be reduced.

[0086] According to an embodiment of this disclosure, dividing the specified geographical region into multiple triangular sub-regions using the ear-cutting method based on the position information of the boundary vertices of the specified geographical region includes: deleting the boundary vertices of the specified geographical region using the DP algorithm based on the position information of the boundary vertices of the specified geographical region; obtaining a simplified specified geographical region based on the position information of the not-deleted boundary vertices of the specified geographical region; and dividing the simplified specified geographical region into multiple triangular sub-regions using the ear-cutting method.

[0087] According to embodiments of this disclosure, when there are many boundary points in a specified geographical area, such as the densely packed gear-shaped boundary lines at the boundaries of some provinces and cities, compressing the boundary data can effectively extract the feature points of the boundary, significantly reduce invalid vertices, and simplify the computational complexity of the algorithm.

[0088] The Douglas-Peucker algorithm (DP algorithm for short) takes into account spatial distance and is widely used in cartography and computer graphics. It is considered by many cartographers to be one of the most accurate line generalization algorithms.

[0089] Figure 2 The principle of the DP algorithm is shown.

[0090] Draw a straight line connecting the two points at the beginning and end of a specified curve (referred to as anchor point A1 and floating point An, respectively). Calculate the projected distances of all other points on the specified curve to this line. Compare the largest distance to a threshold. If the distance is greater than the threshold, retain the point with the largest projected distance to the line as the split point An-p; otherwise, discard all points between the two ends of the line. Based on the retained split point An-p, divide the specified curve into two parts (from anchor point A1 to floating point / anchor point An-p, and from floating point / anchor point An-p to floating point An), and repeat the above calculation. In the part from anchor point A1 to floating point / anchor point An-p, retain the split point An-pq; in the part from floating point / anchor point An-p to floating point An, discard all points before the two ends.

[0091] Then, based on the retained split point An-pq, the portion from anchor point A1 to floating point / anchor point An-p is divided into two parts (anchor point A1 to floating point / anchor point An-pq, and floating point / anchor point An-pq to floating point / anchor point An-pq), and the above operation is repeated.

[0092] Assuming a specified geographic region has 100 vertices, these 100 vertices can be divided into 10 groups, each containing 10 adjacent vertices. DP algorithm is then executed on each group to compress the number of vertices. Finally, the vertices that were not deleted from the 10 groups after DP compression are connected to obtain a simplified specified geographic region. Then, the ear-cutting method is used to obtain the simplified specified geographic region based on the position information of the boundary vertices of the not deleted specified geographic region. The ear-cutting method is then used to divide the simplified specified geographic region into multiple triangular sub-regions.

[0093] According to an embodiment of this disclosure, determining multiple blocks based on the position information of the boundary vertices of the sub-region includes: determining the outer rectangle of the sub-region based on the position information of the boundary vertices of the sub-region; determining the multiple blocks based on the position information of the vertices of the outer rectangle, wherein any one of the multiple blocks is wholly or partially located within the outer rectangle.

[0094] Figure 3A A schematic diagram is shown illustrating how multiple blocks are determined based on the position information of the boundary vertices of the sub-regions, according to an embodiment of this disclosure.

[0095] like Figure 3A As shown, the triangle represents an example of any sub-region. The rectangle enclosed by the solid line is the outer rectangle of the sub-region. The square region enclosed by the dashed line is a block, and any block is wholly or partially located within the outer rectangle. Figure 3 shows a total of 9*6=54 blocks.

[0096] According to embodiments of this disclosure, blocks can be divided according to actual needs; for example, each block is a Geohash encoded region.

[0097] According to an embodiment of this disclosure, determining the positional relationship between the block and the designated geographical region based on the positional relationship between the block and the sub-region includes: obtaining the number of intersection points between a ray with the vertex of the block as its vertex and passing through a point in the sub-region and the boundary of the sub-region; and determining the positional relationship between the block and the designated geographical region based on the number of intersection points.

[0098] According to an embodiment of this disclosure, determining the positional relationship between the block and the designated geographical region based on the number of intersection points includes: determining whether the block is at least partially located within the sub-region based on the number of intersection points of the ray with the vertex of the block as the vertex and passing through a point in the sub-region and the boundary of the sub-region; if the block is at least partially located within the sub-region, then the block is at least partially located within the designated geographical region.

[0099] Figure 3BThe diagram illustrates the principle of determining the positional relationship between a block and a specified geographic region based on the positional relationship between the block and its sub-regions, according to an embodiment of the present disclosure.

[0100] like Figure 3B As shown, P1 is a point within the sub-region. A ray passing through vertex Q1 of block B1 intersects the boundary of the sub-region at two points; therefore, Q1 is located outside the sub-region. In this way, it can be determined that all four vertices of block B1 are located outside the sub-region; therefore, block B1 is located outside the sub-region.

[0101] Similarly, it can be determined that vertex Q2 of blocks B2 and B3 is located inside the sub-region. Specifically, the ray with vertex Q2 passing through P1 intersects the boundary of the sub-region at only one point, therefore Q2 is located inside the sub-region. For any block, if any one of its vertices is located inside a sub-region, then the region is at least partially located within the sub-region. Therefore, blocks B2 and B3 are at least partially located within this sub-region, and correspondingly, blocks B2 and B3 are at least partially located within the specified geographical region.

[0102] According to embodiments of this disclosure, the location is within a certain area, including the case where it is located on the boundary of that area.

[0103] If a block is located outside all sub-regions of a specified geographic region, then the block is located outside the specified geographic region.

[0104] According to embodiments of this disclosure, operations to determine the positional relationship between the block and the specified geographic region are performed in parallel for the plurality of sub-regions.

[0105] After dividing a specified geographic region into multiple sub-regions, operations determining the positional relationship between the defined blocks and the specified geographic region can be performed in parallel across these sub-regions. For example, this operation can be performed using the MapReduce framework.

[0106] MapReduce is a parallel computing and execution software framework. It provides a large but well-designed parallel computing software framework that can automatically complete the parallel processing of computing tasks, automatically divide computing data and computing tasks, automatically allocate and execute tasks on cluster nodes, and collect computing results. It entrusts the system with handling many complex underlying details of parallel computing, such as data distribution and storage, data communication, and fault tolerance.

[0107] According to embodiments of this disclosure, multiple triangular sub-regions segmented using the ear-cutting method are taken as input. The MapReduce framework is used for parallel computation to determine the positional relationship between corresponding blocks and a specified geographic region based on each triangular sub-region. The final calculated positional relationships between all blocks and the specified geographic region are then summarized and deduplicated to obtain the final result. The final result displays the positional relationship between each block and the specified geographic region; for example, any block is at least partially located within or outside the specified geographic region.

[0108] Figure 4 A flowchart illustrating location information processing according to an embodiment of this disclosure is shown.

[0109] like Figure 4 As shown, the process first obtains the position information of the boundary vertices of a specified geographic region. Then, the dynamic programming (DP) algorithm is used to simplify the boundary shape of the specified geographic region. Next, the ear-cutting method is used to divide the simplified specified geographic region into multiple triangular sub-regions. These triangular sub-regions, obtained using the ear-cutting method, are used as input, and the MapReduce framework is used for parallel computation. Based on the positional relationship between the corresponding blocks in each triangular sub-region and the specified geographic region, the final calculated positional relationships between all blocks and the specified geographic region are summarized and deduplicated to obtain the final result.

[0110] According to embodiments of this disclosure, a specified geographical region with a complex shape is divided into sub-regions with simple shapes and then processed in parallel, which significantly reduces computational complexity while improving computational efficiency.

[0111] Figure 5 A structural block diagram of a location information processing apparatus according to an embodiment of the present disclosure is shown. This apparatus can be implemented as part or all of an electronic device through software, hardware, or a combination of both.

[0112] like Figure 5 As shown, the location information processing device 500 includes an acquisition module 510, a division module 520, a first determination module 530, and a second determination module 540.

[0113] The acquisition module 510 is configured to acquire the location information of the boundary vertices of a specified geographic region;

[0114] The partitioning module 520 is configured to divide the specified geographic region into multiple sub-regions based on the location information of the boundary vertices of the specified geographic region.

[0115] The first determining module 530 is configured to determine multiple blocks based on the position information of the boundary vertices of the sub-region;

[0116] The second determining module 540 is configured to determine the positional relationship between the block and the specified geographical region based on the positional relationship between the block and the sub-region.

[0117] According to embodiments of this disclosure, dividing the designated geographical region into multiple sub-regions based on the location information of the boundary vertices of the designated geographical region includes:

[0118] Based on the location information of the boundary vertices of the specified geographical region, the specified geographical region is divided into multiple triangular sub-regions using the ear-cutting method.

[0119] According to embodiments of this disclosure, dividing the designated geographical region into multiple triangular sub-regions using the ear-cutting method based on the position information of the boundary vertices of the designated geographical region includes:

[0120] Based on the location information of the boundary vertices of the specified geographic region, the DP algorithm is used to delete the boundary vertices of the specified geographic region.

[0121] Based on the location information of the boundary vertices of the specified geographic region that have not been deleted, a simplified specified geographic region is obtained, and the simplified specified geographic region is divided into multiple triangular sub-regions using the ear-cutting method.

[0122] According to embodiments of this disclosure, determining multiple blocks based on the position information of the sub-region boundary vertices includes:

[0123] The outer rectangle of the sub-region is determined based on the position information of the boundary vertices of the sub-region.

[0124] Based on the position information of the vertices of the outer rectangle, the plurality of blocks are determined, and any one of the plurality of blocks is wholly or partially located within the outer rectangle.

[0125] According to embodiments of this disclosure, each block is a Geohash encoded region.

[0126] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the positional relationship between the block and the sub-region includes:

[0127] Obtain the number of intersections between a ray with the vertex of the block as its vertex and passing through a point within the sub-region and the boundary of the sub-region;

[0128] The positional relationship between the block and the specified geographical region is determined based on the number of intersections.

[0129] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the number of intersections includes:

[0130] The number of intersections between the ray with the vertex of the block as the vertex and passing through a point in the sub-region and the boundary of the sub-region determines whether the block is at least partially located within the sub-region.

[0131] If the block is at least partially located within the sub-region, then the block is at least partially located within the specified geographic region.

[0132] According to embodiments of this disclosure, the operation of determining the positional relationship between the block and the specified geographic region is performed in parallel for the plurality of sub-regions.

[0133] This disclosure also discloses an electronic device. Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0134] like Figure 6 As shown, the electronic device 600 includes a memory 601 and a processor 602, wherein the memory 601 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 602 to implement the method according to embodiments of the present disclosure.

[0135] This disclosure provides a location information processing method, including:

[0136] Get the location information of the boundary vertices of a specified geographic region;

[0137] Based on the location information of the boundary vertices of the specified geographical region, the specified geographical region is divided into multiple sub-regions;

[0138] Based on the position information of the boundary vertices of the sub-region, multiple blocks are determined;

[0139] The positional relationship between the block and the specified geographical region is determined based on the positional relationship between the block and the sub-region.

[0140] According to embodiments of this disclosure, dividing the designated geographical region into multiple sub-regions based on the location information of the boundary vertices of the designated geographical region includes:

[0141] Based on the location information of the boundary vertices of the specified geographical region, the specified geographical region is divided into multiple triangular sub-regions using the ear-cutting method.

[0142] According to embodiments of this disclosure, dividing the designated geographical region into multiple triangular sub-regions using the ear-cutting method based on the position information of the boundary vertices of the designated geographical region includes:

[0143] Based on the location information of the boundary vertices of the specified geographic region, the DP algorithm is used to delete the boundary vertices of the specified geographic region.

[0144] Based on the location information of the boundary vertices of the specified geographic region that have not been deleted, a simplified specified geographic region is obtained, and the simplified specified geographic region is divided into multiple triangular sub-regions using the ear-cutting method.

[0145] According to embodiments of this disclosure, determining multiple blocks based on the position information of the sub-region boundary vertices includes:

[0146] The outer rectangle of the sub-region is determined based on the position information of the boundary vertices of the sub-region.

[0147] Based on the position information of the vertices of the outer rectangle, the plurality of blocks are determined, and any one of the plurality of blocks is wholly or partially located within the outer rectangle.

[0148] According to embodiments of this disclosure, each block is a Geohash encoded region.

[0149] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the positional relationship between the block and the sub-region includes:

[0150] Obtain the number of intersections between a ray with the vertex of the block as its vertex and passing through a point within the sub-region and the boundary of the sub-region;

[0151] The positional relationship between the block and the specified geographical region is determined based on the number of intersections.

[0152] According to embodiments of this disclosure, determining the positional relationship between the block and the designated geographical region based on the number of intersections includes:

[0153] The number of intersections between the ray with the vertex of the block as the vertex and passing through a point in the sub-region and the boundary of the sub-region determines whether the block is at least partially located within the sub-region.

[0154] If the block is at least partially located within the sub-region, then the block is at least partially located within the specified geographic region.

[0155] According to embodiments of this disclosure, the operation of determining the positional relationship between the block and the specified geographic region is performed in parallel for the plurality of sub-regions.

[0156] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing the method according to embodiments of the present disclosure is shown.

[0157] like Figure 7 As shown, the computer system 700 includes a processing unit 701, which can execute various processes described in the above embodiments according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0158] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed. The processing unit 701 can be implemented as a CPU, GPU, TPU, FPGA, NPU, etc.

[0159] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising computer instructions that, when executed by a processor, implement the steps of the methods described above. In such embodiments, the computer program product can be downloaded and installed from a network via communication section 709, and / or installed from removable media 711.

[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0161] The units or modules described in the embodiments of this disclosure can be implemented in software or programmable hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.

[0162] In another aspect, this disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system described above; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in this disclosure.

[0163] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A location information processing method, comprising: Get the location information of the boundary vertices of a specified geographic region; Based on the location information of the boundary vertices of the specified geographic region, the boundary vertices of the specified geographic region are divided into multiple groups, each group containing multiple adjacent boundary vertices of the specified geographic region. For each group, the DP algorithm is executed to delete some of the boundary vertices of the specified geographic region, thereby reducing the number of boundary vertices of the specified geographic region. Connect the vertices that were not deleted from the multiple sets of vertices compressed by the DP algorithm to obtain a simplified specified geographic region. Then, use the ear-cutting method to divide the simplified specified geographic region into multiple triangular sub-regions. Based on the position information of the boundary vertices of the sub-region, multiple blocks are determined; The positional relationship between the block and the specified geographical region is determined based on the positional relationship between the block and the sub-region.

2. The method according to claim 1, wherein, The step of determining multiple blocks based on the position information of the boundary vertices of the sub-region includes: The outer rectangle of the sub-region is determined based on the position information of the boundary vertices of the sub-region. Based on the position information of the vertices of the outer rectangle, the plurality of blocks are determined, and any one of the plurality of blocks is wholly or partially located within the outer rectangle.

3. The method according to claim 2, wherein, Each of the blocks is a Geohash encoded region.

4. The method according to claim 1, wherein, Determining the positional relationship between the block and the designated geographical region based on the positional relationship between the block and the sub-region includes: Obtain the number of intersections between a ray with the vertex of the block as its vertex and passing through a point within the sub-region and the boundary of the sub-region; The positional relationship between the block and the specified geographical region is determined based on the number of intersections.

5. The method according to claim 4, wherein, Determining the positional relationship between the block and the designated geographical region based on the number of intersections includes: The number of intersections between the ray with the vertex of the block as the vertex and passing through a point in the sub-region and the boundary of the sub-region determines whether the block is at least partially located within the sub-region. If the block is at least partially located within the sub-region, then the block is at least partially located within the specified geographic region.

6. The method according to claim 1, wherein, For the multiple sub-regions, the operation of determining the positional relationship between the block and the specified geographical region is performed in parallel.

7. A location information processing device, comprising: The acquisition module is configured to acquire the location information of the boundary vertices of a specified geographic region. The partitioning module is configured to divide the boundary vertices of the specified geographic region into multiple groups based on the location information of the boundary vertices of the specified geographic region, with each group containing multiple adjacent boundary vertices of the specified geographic region. For each group, the DP algorithm is executed to delete some of the boundary vertices of the specified geographic region, thereby reducing the number of boundary vertices of the specified geographic region. Connect the vertices that were not deleted from the multiple sets of vertices compressed by the DP algorithm to obtain a simplified specified geographic region. Then, use the ear-cutting method to divide the simplified specified geographic region into multiple triangular sub-regions. The first determining module is configured to determine multiple blocks based on the position information of the boundary vertices of the sub-region; The second determining module is configured to determine the positional relationship between the block and the specified geographical region based on the positional relationship between the block and the sub-region.

8. An electronic device comprising a memory and a processor; wherein, The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the steps of the method according to any one of claims 1 to 6.

9. A readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product comprising computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for determining interest points in irregular region and electric equipment

    CN109994038A

  • Systems and methods for identifying grids of geographical region in map

    CN110785797A