Positioning methods and related apparatuses
By establishing a correspondence between region identifiers and data nodes between routing nodes and data nodes, and utilizing polygon index information and routing information, the target data node can be quickly determined, solving the problem of slow response speed in reverse geospatial search and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2021-04-20
- Publication Date
- 2026-07-24
AI Technical Summary
Reverse geospatial search has a slow response time, which affects the user experience.
By establishing a correspondence between area identifiers and data nodes between routing nodes and data nodes, and utilizing polygon index information and routing information, system power consumption is reduced, target data nodes are quickly identified, and geographic location information is provided through the target data nodes.
Improved the response speed of reverse geospatial search, enhancing the user experience.
Smart Images

Figure CN115221159B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic maps, and more specifically, to a positioning method and related apparatus. Background Technology
[0002] Reverse geospatial search enables the determination of location information based on coordinates (such as latitude and longitude). For example, entering latitude and longitude (39.991366, 116.25952) will return reverse geospatial search results that may include: West Gate of Beiwu Park; Beiwu Village Road; Haidian District; Beijing; China.
[0003] Reverse geospatial search has a wide range of applications. Location-based services (LBS) are one of the most common applications of reverse geospatial search. LBS determines a user's location using coordinates uploaded by the user, thus providing relevant services. For example, it can recommend nearby shopping malls, restaurants, and cafes; or determine a user's current location so that ride-hailing drivers can find them.
[0004] The response speed of reverse geospatial search has a significant impact on user experience. Faster response times result in a better user experience. Therefore, the industry aims to improve the response speed of reverse geospatial search. Summary of the Invention
[0005] This application provides a positioning method and related apparatus that can improve the response speed of reverse geospatial search.
[0006] In a first aspect, embodiments of this application provide a positioning method, the method comprising: receiving coordinates from a terminal device; determining a target data node corresponding to the target area identifier based on routing information and a target area identifier corresponding to the coordinates, wherein the routing information is used to indicate the correspondence between the area identifier and the data node, and the target area identifier is used to indicate the area containing the coordinates; sending a positioning request to the target data node, the positioning request including the coordinates; and receiving positioning feedback from the target data node, the positioning feedback including geographic location information, the geographic location information being used to describe the geographic location containing the coordinates.
[0007] In the above technical solution, different data nodes store different region identifiers and their corresponding polygons (i.e., polygon index information). Routing nodes store the correspondence between region identifiers and data nodes (i.e., routing information). Thus, when a routing node receives coordinates from a terminal device, it can determine the corresponding target region identifier based on the coordinates, and then determine the target data node corresponding to that target region identifier based on the routing information. In this way, the routing node can send the received coordinates to the determined target data node without sending the coordinates to all data nodes in the system. Except for the target data node, other data nodes do not need to participate in the calculation of determining the polygon corresponding to the coordinates. This reduces the overall system power consumption. Furthermore, since the polygons stored by the target data node are smaller polygons obtained after segmentation, the target data node can quickly determine the polygon containing the coordinates. This improves the response speed of reverse geospatial search and enhances the user experience.
[0008] In conjunction with the first aspect, in one possible implementation of the first aspect, the routing information includes multiple indices and identifiers of data nodes corresponding to each index, wherein each of the multiple indices is a region identifier or a range of region identifiers. In this case, determining the target data node corresponding to the target region identifier based on the routing information and the target region identifier includes: determining a target index matching the target region identifier from the multiple indices; and determining the data node corresponding to the target index as the target data node.
[0009] In conjunction with the first aspect, in one possible implementation of the first aspect, the positioning feedback further includes at least one point of interest (POI), the distance between the coordinate and each of the at least one POI is less than a preset threshold.
[0010] Secondly, embodiments of this application provide a positioning method, the method comprising: receiving a positioning request from a routing node, the positioning request including coordinates; determining a target polygon corresponding to the coordinates based on polygon index information, the coordinates, and a target area identifier corresponding to the coordinates, wherein the polygon index information is used to indicate the correspondence between the area identifier and the polygon, the target area identifier corresponds to a plurality of first polygons, the target polygon is one of the plurality of first polygons, the plurality of first polygons are partial or complete polygons obtained by segmenting a second polygon, and the coordinates are located within the range of the target polygon; and sending positioning feedback to the routing node, the positioning feedback including geographic location information, the geographic location information being used to describe the geographic location containing the coordinates.
[0011] In the above embodiments, the first polygon is obtained by segmenting the second polygon. The smaller the area of the polygon, the faster the speed at which coordinates are determined within the range of that polygon. Therefore, the above technical solution can improve the response speed of reverse geospatial search.
[0012] In conjunction with the second aspect, in one possible implementation of the second aspect, the polygon index information includes multiple indices and first polygons corresponding to each index, wherein each of the multiple indices is a region identifier; determining the target polygon based on the polygon index information, the target region identifier, and the coordinates includes: determining a target index that matches the target region identifier from the multiple indices; sorting the multiple first polygons corresponding to the target index; and determining the target polygon based on the sorting result and the coordinates.
[0013] In conjunction with the second aspect, in one possible implementation, sorting the plurality of first polygons corresponding to the target index includes: sorting the plurality of first polygons according to their Area of Interest (AOI) levels, wherein the first polygon with a higher AOI level is ranked higher than the first polygon with a lower AOI level. The higher the AOI level of a polygon, the smaller its area; the smaller the polygon's area, the faster the speed at which coordinates are determined within the polygon's range. Therefore, the above technical solution can further improve the response speed of reverse geographic search.
[0014] In conjunction with the second aspect, in one possible implementation of the second aspect, sorting the plurality of first polygons corresponding to the target index further includes: determining N first polygons with the same AOI level among the plurality of first polygons, where N is a positive integer greater than or equal to 2; sorting the N first polygons with the same AOI level according to the distance from the center point of each reference area to the coordinate, wherein the first polygon with the center point closer to the coordinate has a higher ranking than the first polygon with the center point farther from the coordinate. Generally, the closer the coordinate is to the center point of a polygon, the greater the probability that the coordinate belongs to that polygon. Therefore, the above technical solution can further improve the response speed of reverse geographic search.
[0015] In conjunction with the second aspect, in one possible implementation of the second aspect, determining the target polygon based on the sorting result and the coordinates includes: starting from the highest-ranking first polygon among the plurality of first polygons, sequentially determining whether the first polygon contains the coordinates, until the target polygon is determined.
[0016] In conjunction with the second aspect, in one possible implementation of the second aspect, before sending the positioning feedback to the routing node, the method further includes: determining whether the target data node includes a target information point (POI), wherein the target POI is a POI whose distance from the coordinates is less than a preset threshold; if the target data node includes the target POI, the positioning feedback also includes the target POI.
[0017] In conjunction with the second aspect, in one possible implementation of the second aspect, the number of boundary points of the second polygon is greater than a preset boundary point number threshold, and the number of boundary points of the first polygon is less than or equal to the preset boundary point number threshold; or
[0018] The second polygon has a number of boundary points greater than the preset boundary point number threshold and an area greater than the preset area threshold. The first polygon has a number of boundary points less than or equal to the preset boundary point number threshold, or the first polygon has an area less than or equal to the preset area.
[0019] In conjunction with the second aspect, in one possible implementation of the second aspect, the plurality of first polygons are partial or complete polygons obtained by dividing the second polygon according to the center point of the circumscribed figure of the second polygon.
[0020] In conjunction with the second aspect, in one possible implementation of the second aspect, the circumscribed figure is a regular polygon, a trapezoid, a parallelogram, or a circle, wherein the number of sides of the circumscribed regular polygon is less than or equal to 8.
[0021] In conjunction with the second aspect, in one possible implementation of the second aspect, the target region is identified as one of at least one region identifier corresponding to the target polygon.
[0022] Thirdly, embodiments of this application provide a computer device that includes units for implementing the first aspect or any possible implementation of the first aspect.
[0023] Fourthly, embodiments of this application provide a computer device that includes units for implementing the second aspect or any possible implementation of the second aspect.
[0024] Fifthly, embodiments of this application provide a computer device including a processor configured to be coupled to a memory, read and execute instructions and / or program code in the memory to perform the first aspect or any possible implementation thereof.
[0025] In a sixth aspect, embodiments of this application provide a computer device including a processor configured to be coupled to a memory, read and execute instructions and / or program code in the memory to perform the second aspect or any possible implementation thereof.
[0026] In a seventh aspect, embodiments of this application provide a chip system including logic circuitry for coupling with an input / output interface to transmit data via the input / output interface, thereby executing the first aspect or any possible implementation thereof.
[0027] Eighthly, embodiments of this application provide a chip system including logic circuitry for coupling with an input / output interface to transmit data via the input / output interface, thereby executing the second aspect or any possible implementation thereof.
[0028] Ninthly, embodiments of this application provide a computer-readable storage medium storing program code that, when the computer storage medium is run on a computer, causes the computer to perform the first aspect or any possible implementation thereof.
[0029] In a tenth aspect, embodiments of this application provide a computer-readable storage medium storing program code that, when the computer storage medium is run on a computer, causes the computer to perform the second aspect or any possible implementation thereof.
[0030] Eleventhly, embodiments of this application provide a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform as in the first aspect or any possible implementation thereof.
[0031] In a twelfth aspect, embodiments of this application provide a computer program product comprising: computer program code that, when run on a computer, causes the computer to perform as described in the second aspect or any possible implementation thereof. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of a possible application scenario provided according to an embodiment of this application.
[0033] Figure 2 This is a schematic flowchart of the positioning method provided according to the embodiments of this application.
[0034] Figure 3 This is a schematic flowchart of a method for determining a map index according to an embodiment of the application.
[0035] Figure 4 A schematic diagram of polygon A is shown.
[0036] Figure 5 The diagram shows four possible results of segmenting polygon A.
[0037] Figure 6 This is a schematic diagram of the final segmentation result of polygon A.
[0038] Figure 7 This is a schematic flowchart of a positioning method provided according to an embodiment of this application.
[0039] Figure 8 This is a schematic flowchart of a positioning method provided according to an embodiment of this application.
[0040] Figure 9 This is a schematic diagram of a computer device provided according to an embodiment of this application.
[0041] Figure 10 This is a schematic diagram of another computer device provided according to an embodiment of this application.
[0042] Figure 11 This is a schematic diagram of another computer device provided according to an embodiment of this application. Detailed Implementation
[0043] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0044] To facilitate a better understanding of the technical solutions of this application by those skilled in the art, some related technologies and concepts involved in this application will be briefly introduced first.
[0045] 1. Map projection
[0046] Map projection refers to the method of establishing a one-to-one correspondence between points on the Earth's surface (or the surface of other planets or the celestial sphere) and points on the projection plane (i.e., the map plane), that is, establishing mathematical conversion formulas between them. It is a fundamental method of projecting a non-flattenable curved surface (such as the Earth's surface) onto a plane, ensuring the connection and integrity of spatial information within a region. This projection process will produce projection distortion, and different projection methods produce projection distortions of different natures and magnitudes.
[0047] Commonly used projection methods include Mercator projection, Gauss-Kruger projection, oblique axis equal area azimuth projection, double standard parallel conformal conic projection, equal difference parallel polyconic projection, and normal axis azimuth projection.
[0048] The Mercator projection is an conformal tangent cylindrical projection, developed by the Dutch cartographer Gerhardus Mercator in 1569.
[0049] The Mercator projection's "equiangular" property ensures that the shape of objects remains unchanged; a square object will not be projected as a rectangle. "Equiangular" also guarantees the accuracy of direction and relative positions, making it frequently used in navigation and aviation to prevent errors when determining the orientation of landmarks.
[0050] The Mercator projection's cylindrical shape ensures that north-south (parallels of latitude) and east-west (parallels of longitude) lines are parallel and perpendicular to each other. Furthermore, the intervals between meridians are uniform, while the intervals between parallels gradually increase from the standard parallel (here, the equator, but possibly other parallels of latitude) towards the poles.
[0051] In practical applications, to facilitate calculations, some manufacturers (such as Google and Baidu) use a variant of the Mercator projection—the Web Mercator projection. It receives latitude and longitude coordinates from the World Geodetic System (WGS) 84 coordinate system as input, but during projection, it treats the Earth as a standard sphere with a radius of 6,378,137 meters instead of an ellipsoid, thus simplifying calculations.
[0052] 2. Earth coordinate system
[0053] Earth coordinates can be expressed in either Cartesian coordinates or geodetic coordinates.
[0054] The Earth coordinate system expressed in Cartesian coordinates is called the spatial rectangular coordinate system. Its X-axis usually points to a certain primary meridian, the Z-axis is parallel to or coincides with the Earth's rotation axis, and the Y-axis is perpendicular to the X-axis and Z-axis.
[0055] A geodetic coordinate system expressed in geodetic coordinates is called a spatial geodetic coordinate system, or simply a geodetic coordinate system or geographic coordinate system. Spatial geodetic coordinate systems use geodetic latitude, geodetic longitude, and geodetic height to describe the spatial location of objects.
[0056] Because the geoid is irregular, different regions on Earth often need to use different reference ellipsoids to fit the local geoid as closely as possible.
[0057] The reference ellipsoid is a mathematically defined surface of the Earth that approximates the geoid. Because it is a geometric model, it can be determined using its semi-major axis, semi-minor axis, and flattening. Geodetic latitude, geodetic longitude, and geodetic height are all based on it.
[0058] The Beijing 54 coordinate system uses the Krasovsky 1940 reference ellipsoid, while the Xi'an 80 coordinate system uses the reference ellipsoid recommended by the 16th General Conference of the International Union of Geodesy and Geophysics in 1975. Currently, the reference ellipsoid defined by WGS is more widely used worldwide.
[0059] Geodetic latitude, geodetic longitude, and geodetic height can indicate any location on Earth. As mentioned earlier, different regions may use different reference ellipsoids, and even when using the same ellipsoid, its orientation and even size may be adjusted to better fit the local geoid. This necessitates the use of different geodetic datums for identification. Therefore, for any given location on Earth, the coordinates obtained using different geodetic datums will be different.
[0060] The Beijing 54 coordinate system and the Xi'an 80 coordinate system mentioned above are two commonly used coordinate systems. In addition, common coordinate systems include the WGS 84 coordinate system, the State Bureau of Surveying and Mapping Standard No. 02 (GCJ-02) coordinate system, and the Baidu (BD)-09 coordinate system.
[0061] 3. Information areas and information points
[0062] An area of information (AOI) can be an administrative region, a country, a city, etc. An AOI can be represented by a polygon (composed of the latitude and longitude coordinates of the polygon's boundary points).
[0063] A point of information (POI) can be a building, shop, bus stop, etc., and its location is identified by a latitude and longitude coordinate.
[0064] For example, the POI corresponding to the latitude and longitude (39.991366, 116.25952) could be the west gate of Beiwu Park; the corresponding AOI could be Beiwu Village Road; Haidian District; Beijing; China.
[0065] Figure 1 This is a schematic diagram illustrating a possible application scenario based on an embodiment of this application. For example... Figure 1As shown, the positioning system 100 includes a routing node 101, data nodes 102 to 104, and a processing node 105. The terminal device 110 sends acquired coordinates (e.g., latitude and longitude) to the routing node 101 in the positioning system 100. The routing node 101 forwards the coordinates to one of a plurality of data nodes. The data node receiving the coordinates determines its location information based on the coordinates and sends the location information to the routing node 101, which then sends the location information to the terminal device 110. The processing node 105 is responsible for constructing index information and distributing the constructed index information to the corresponding data nodes, so that the data nodes can determine their location information based on the index information.
[0066] It is understandable that, such as Figure 1 The positioning system 100 shown is merely an example of a positioning system. This application does not limit the number of routing nodes and processing nodes included in the positioning system. For example, in other embodiments, the positioning system may include multiple routing nodes and / or multiple processing nodes. The number of data nodes in this application embodiment may be a positive integer greater than or equal to 2. For example, in other embodiments, the positioning system may include two or more data nodes.
[0067] The terminal device referred to in the embodiments of this application can be any terminal device with positioning function, such as a mobile phone, tablet computer, laptop computer, smartwatch, etc.
[0068] Figure 2 This is a schematic flowchart illustrating the positioning method provided in the embodiments of this application. Figure 2 As shown, this positioning method can be divided into offline and online components.
[0069] The offline portion includes steps 201 to 203, which can be implemented by a processing node or a component (such as a chip or circuit) in the processing node.
[0070] The online portion includes steps 204 to 208, wherein steps 204 and 205 can be implemented by the routing node or components (such as chips or circuits) in the routing node, and steps 206 to 208 can be implemented by the data node.
[0071] The functions of the processing node, routing node, and data node are described below. For ease of description, the following examples assume the use of a projected map obtained from the web Mercator projection.
[0072] A projected map obtained from the Web Mercator projection can be divided into multiple regions. These regions, segmented from the Web Mercator projection map, can be called tiles. The identifier used to identify tiles can be called a tile identifier (ID) or tile coordinates.
[0073] Those skilled in the art will understand that the map region obtained by segmenting the projected map can also have other names. Therefore, the term "tile" in the following embodiments can also be replaced by "region," "map region," "map unit," "map block," etc. Correspondingly, the tile ID can also be replaced by map unit coordinates, map block coordinates, etc. In addition, the region identifier can be obtained by geohash encoding the map region to obtain the geohash corresponding to that region.
[0074] Similarly, the following embodiments assume that the coordinate system used is the WGS 84 coordinate system. Coordinates in the WGS 84 coordinate system are expressed in latitude and longitude. It is understood that the coordinates in the following embodiments can also be replaced with coordinates in the Cartesian coordinate system.
[0075] Figure 3 This is a schematic flowchart illustrating a method for determining a map index according to an embodiment of the application. Figure 3 The method shown can be implemented by a processing node or a component within a processing node.
[0076] 301. Divide polygon A into multiple polygons.
[0077] Polygon A can be an administrative region, a country, or a city. For example, Figure 4 A polygon A is shown.
[0078] There are several ways to divide polygon A. For example, polygon A can be divided based on the center point of its circumscribed figure. The circumscribed figure of polygon A can be a regular polygon with 8 or fewer sides (such as a rectangle, a regular hexagon, etc.). The circumscribed figure of polygon A can also be a trapezoid, a parallelogram, or a circle, etc.
[0079] For example, polygon A can be divided based on the midpoints of the sides of its circumscribed figure.
[0080] For example, polygon A can be divided into multiple first polygons.
[0081] Figure 5 The results of four different ways of segmenting polygon A are shown.
[0082] like Figure 5In (a), polygon A is divided into four polygons based on the center of the circumscribed rectangle of polygon A, namely polygon A1, polygon A2, polygon A3 and polygon A4.
[0083] like Figure 5 In (b), polygon A is divided into two polygons, A1 and A2, based on the center of the short side of the circumscribed rectangle of polygon A.
[0084] like Figure 5 In the diagram (c), polygon A is divided into two parts based on the center of the long side of the circumscribed rectangle of polygon A, resulting in the second polygon.
[0085] like Figure 5 In the diagram, (d) represents the four first polygons obtained by equally dividing the circumscribed rectangle of polygon A. These four polygons are polygon A1, polygon A2, polygon A3, and polygon A4.
[0086] 302. Determine whether each polygon in the resulting polygons satisfies a preset condition. For polygons that satisfy the preset condition, proceed to step 303 and subsequent steps. For polygons that do not satisfy the condition, continue segmenting until polygons satisfying the preset condition are obtained. The method for segmenting polygons that do not satisfy the condition is the same as the method for segmenting polygon A. The method for continuing segmentation can be the same as or different from the initial segmentation method.
[0087] Figure 6 This is the final segmentation result of polygon A. Figure 6 In such Figure 5 Based on the segmentation result shown in (a) in the figure, further segmentation was performed to obtain the result.
[0088] like Figure 6 As shown, polygon A1 does not meet the preset conditions. Therefore, polygon A1 is further subdivided to obtain polygons A11, A12, A13, and A14. Polygons A11, A13, and A14 meet the preset conditions. Therefore, polygons A11, A13, and A14 do not need to be further subdivided. Polygon A12 does not meet the preset conditions. Therefore, polygon A12 is further subdivided into polygons A121, A122, A123, and A124.
[0089] Polygon A2 also does not meet the preset conditions. Therefore, polygon A2 is further divided into polygons A21, A22, A23, and A24. Polygons A21, A22, A23, and A24 meet the preset conditions and therefore do not need to be further divided.
[0090] Polygon A3 also does not meet the preset conditions. Therefore, polygon A3 is further divided into polygons A31, A32, A33, and A34. Polygons A31, A32, A33, and A34 meet the preset conditions and therefore do not need to be further divided.
[0091] Polygon A4 also does not meet the preset conditions. Therefore, polygon A4 is further divided into polygons A41, A42, A43, and A44. Polygons A41, A42, A43, and A44 meet the preset conditions and therefore do not need to be further divided.
[0092] In summary, regarding such Figure 4 The final segmentation result of polygon A shown includes: polygon A11, polygon A13, polygon A14, polygon A21, polygon A22, polygon A23, polygon A24, polygon A31, polygon A32, polygon A33, polygon A34, polygon A41, polygon A42, polygon A43, polygon A44, polygon A44, polygon A121, polygon A122, polygon A123, and polygon A124, totaling 19 polygons.
[0093] Optionally, in some embodiments, the preset condition for determining whether a polygon needs to be further segmented is: whether the number of boundary points included in the polygon is less than or equal to a preset threshold for the number of boundary points. If the number of boundary points of the polygon is greater than the preset threshold, then the polygon is determined not to meet the preset condition; if the number of boundary points of the polygon is less than or equal to the preset threshold, then the polygon is determined to meet the preset condition.
[0094] Optionally, in other embodiments, the preset condition for determining whether a polygon needs further segmentation is: determining whether the number of boundary points included in the polygon is less than or equal to a preset boundary point number threshold and determining whether the area of the polygon is less than a preset area threshold. If the number of boundary points of the polygon is greater than the preset boundary point number threshold and the area of the polygon is greater than the preset area threshold, then the polygon is determined not to meet the preset condition. If the number of boundary points of the polygon is less than or equal to the preset boundary point number threshold or the area of the polygon is less than or equal to the preset area threshold, then the polygon is determined to meet the preset condition.
[0095] Optionally, in other embodiments, the preset condition for determining whether a polygon needs further segmentation is: whether the area of the polygon is less than or equal to a preset area threshold. If the area of the polygon is greater than the preset area threshold, then the polygon is determined not to meet the preset condition. If the area of the polygon is less than or equal to the preset area threshold, then the polygon is determined to meet the preset condition.
[0096] Understandably, both excessively high and low preset boundary point thresholds will affect the final determination result. A lower threshold means more polygons need to be segmented, increasing offline processing time and the number of polygons corresponding to user-input coordinates, thus increasing the time required for feedback. Conversely, a higher threshold may result in excessively large polygon areas. This increases the difficulty of determining if the user-input coordinates are included, further increasing the time required for feedback.
[0097] The aforementioned preset threshold for the number of boundary points can be a positive integer greater than or equal to 4 and less than or equal to 1000. Optionally, in some embodiments, the preset threshold for the number of boundary points can be a positive integer greater than or equal to 100 and less than or equal to 300. For example, it can be 200, 180, 220, etc.
[0098] Similarly, both excessively large and small preset area thresholds will affect the final determination result. A smaller preset area threshold means more polygons need to be further segmented, increasing offline processing time and the number of polygons corresponding to the user-input coordinates, thus increasing the time required for feedback. Conversely, a larger preset area threshold may result in excessively large polygon areas. The preset area threshold can be a pre-defined value or a value calculated based on a pre-defined ratio and the initially segmented polygons.
[0099] As mentioned above, for polygons that meet the preset conditions, it is not necessary to further segment the polygons; for polygons that do not meet the preset conditions, it is necessary to continue segmenting until a polygon that meets the preset conditions is obtained.
[0100] For polygons that do not need further subdivision, steps 303 and subsequent steps can be performed. For ease of description, polygons that do not need further subdivision can be referred to as reference polygons.
[0101] 303, Determine the correspondence between the reference polygon and the tile ID.
[0102] Each tile has a unique tile ID. The number of tiles obtained from projected map segmentation is related to the tile level. The number of tiles and tile level are related as follows:
[0103] Num_tile = 4 Level , (Formula 1)
[0104] Where Num_tile represents the number of tiles, Level represents the tile level, and level is a positive integer greater than or equal to 0.
[0105] For example, a world map with a tile level of 0 has only one tile; a world map with a tile level of 1 is divided into four tiles, and the tile IDs of these four tiles can be (0,0), (0,1), (1,0), and (1,1), respectively.
[0106] The tile ID can be calculated based on the tile grade and latitude / longitude. The tile ID consists of two parts, tileX and tileY. tileX can be determined using the following formula:
[0107]
[0108] Where lng represents longitude and Level represents tile grade.
[0109] tileY can be determined using the following formula:
[0110]
[0111] Where lat represents latitude, ln represents the logarithm with base e, tan represents the tangent, sec represents the secant, and π represents the value of pi.
[0112] As can be seen from Formulas 2 and 3, if the latitude and longitude and tile grade of a point on Earth are determined, then the tile ID of that point can be determined.
[0113] In some embodiments, the tile ID corresponding to the reference polygon can be determined based on the coordinates of each point in the reference polygon.
[0114] In other embodiments, the correspondence between a tile and a polygon can be determined based on the points and polygons within the tile. The relationship between points and polygons in a tile can be determined using methods such as vector product, area method, and angle sum method; this application does not limit the specific methods used.
[0115] In other embodiments, JTS can be used to determine the correspondence between tiles and polygons. JTS is Java's application programming interface (API) for processing geographic data. JTS supports a complete set of binary predicate operations. Binary predicate methods take two geometric shapes as arguments and return a Boolean value indicating whether the geometric shapes have a specified spatial relationship. Supported spatial relationships include: equals, disjoint, intersect, touches, crosses, within, contains, and overlaps. It also supports general relation operators.
[0116] Assuming Figure 6 The reference polygons and tile IDs shown have the corresponding relationships as shown in Table 1.
[0117] Table 1
[0118] Tile ID polygon 223,132 A11, A13 223,131 A31, A33 224,132 A121, A122, A123, A124, A14 224,131 A32, A34 225,132 A21, A23 225,131 A41, A42, A43, A44 226,132 A22, A24
[0119] Table 1 shows the correspondence between all reference polygons and tile IDs obtained after segmenting polygon A. This correspondence can be called the total polygon index information.
[0120] 304 distributes the polygon index information to different data nodes.
[0121] Optionally, in some embodiments, after determining the correspondence between a reference polygon and a tile ID, the correspondence between the reference polygon and the tile ID can be sent to a data node.
[0122] Optionally, in other embodiments, after determining the correspondence between all reference polygons and tile IDs (i.e., the total polygon index information), the total polygon index information can be split into multiple polygon index information, and the multiple polygon index information can be sent to multiple data nodes.
[0123] Taking the total polygon index information shown in Table 1 as an example, the total polygon index information shown in Table 1 can be broken down into three polygon index information as shown in Tables 2, 3, and 4.
[0124] Table 2
[0125] Tile ID polygon 223,132 A11, A13 223,131 A31, A33
[0126] Table 3
[0127] Tile ID polygon 224,132 A121, A122, A123, A124, A14 224,131 A32, A34
[0128] Table 4
[0129] Tile ID polygon 225,132 A21, A23 225,131 A41, A42, A43, A44 226,132 A22, A24
[0130] The three polygon index information shown in Tables 2 to 4 can be sent to the three data nodes respectively. Also, as shown in Tables 2 to 4... Figure 1 Taking system 100 as an example, the polygon index information shown in Table 2 can be sent to data node 102, the polygon index information shown in Table 3 can be sent to data node 103, and the polygon index information shown in Table 4 can be sent to data node 104. The data nodes can save the received polygon index information.
[0131] In the polygon index information shown in Table 1, each polygon corresponds to only one tile ID. In other embodiments, a polygon may correspond to multiple tile IDs. For example, one part of a polygon may have a tile ID of 225,131, and another part may have a tile ID of 225,132.
[0132] 305, determine the routing information and send the routing information to the routing node.
[0133] This routing information records the correspondence between tile IDs and data nodes. Taking the distribution rules in Tables 2 to 4 above as an example, the processing node can store the routing information shown in Table 5.
[0134] Table 5
[0135]
[0136] The routing information determined by the processing node can be sent to the routing node so that the routing node can determine the data node corresponding to the coordinates input by the user.
[0137] As shown in Table 5, the tile ID in the mapping between tile IDs and data nodes includes both the tile X and tile Y values. In other embodiments, the mapping between tile IDs and data nodes in the routing information may also include only one of the tile X and tile Y values. For example, the routing nodes may also be as shown in Table 6.
[0138] Table 6
[0139]
[0140] It is understandable that the routing information shown in Tables 5 and 6 may be part of the routing information determined by the processing node.
[0141] The processing node can divide a polygon corresponding to a country, province, city or administrative region into multiple polygons through offline calculation, and save the correspondence between polygons and tile IDs to different data nodes.
[0142] In addition, as mentioned above, each POI also has corresponding coordinates. The processing node can also determine the tile ID of the tile where the POI is located based on the POI's coordinates, and send the mapping relationship between POI and tile ID to the corresponding data node.
[0143] For example, suppose there are ten Points of Interest (POIs), named POI 1 to POI 10. Based on POI 1 to POI 10, the correspondence between POI 1 to POI 10 can be determined as shown in Table 7.
[0144] Table 7
[0145] Tile ID POI 223,132 POI 1 223,131 POI 2 224,132 POI 3 224,131 POI 4 225,132 POI 5 225,131 POI 6, POI 7 226,132 POI 8, POI 9, POI 10
[0146] Similarly, data nodes can also store the mapping between POIs and tile IDs to different data nodes. For example, the mapping between POIs and tile IDs shown in Table 6 can be split into three mappings as shown in Tables 8, 9, and 10.
[0147] Table 8
[0148] Tile ID POI 223,132 POI 1 223,131 POI 2
[0149] Table 9
[0150] Tile ID POI 224,131 POI 4 224,132 POI 3
[0151] Table 10
[0152] Tile ID POI 225,132 POI 5 225,131 POI 6, POI 7 226,132 POI 8, POI 9, POI 10
[0153] The POI and tile ID correspondence shown in Table 8 can be saved to data node 102, the POI and tile ID correspondence shown in Table 9 can be saved to data node 103, and the POI and tile ID correspondence shown in Table 10 can be saved to data node 104.
[0154] After completing such Figure 3 After offline calculation, the routing nodes and data nodes can determine the geographical location information based on the coordinates input by the user.
[0155] Figure 7 This is a schematic flowchart of a positioning method provided according to an embodiment of this application.
[0156] 701, Terminal device obtains coordinates.
[0157] These coordinates can be determined by a chip with positioning capabilities in the terminal device or by a system-on-chip (SoC).
[0158] 702, the terminal device sends the coordinates to the routing node.
[0159] 703. The routing node determines the tile ID corresponding to the coordinates. For ease of description, the tile ID corresponding to the coordinates can be called the target tile ID. This target tile ID is used to indicate the tile containing the coordinates.
[0160] Taking the Web Mercator projection and WGS 84 coordinate system as an example, assuming the latitude and longitude of the coordinates determined by the terminal device are 33.55 and 69.57 respectively, then the tile ID corresponding to these coordinates can be calculated as 225 and 131 according to Formula 2 and Formula 3.
[0161] 704. The routing node determines the data node corresponding to the target tile ID based on the target tile ID and routing information. For ease of description, the data node corresponding to the target tile ID can be referred to as the target data node.
[0162] Suppose the tile ID determined by the routing node is 225,131. Based on the routing information shown in Table 6, the routing node can determine that the target data node corresponding to this tile ID (225,131) is data node 104.
[0163] 705. The routing node can send a location request to the data node 104, which includes the coordinates. Accordingly, the data node 104 receives the location request.
[0164] 706. Data node 104 determines the target polygon based on the polygon index information, the target tile ID, and the coordinates.
[0165] Optionally, in some embodiments, data node 104 can determine the corresponding target tile ID based on the coordinates in the positioning request.
[0166] Optionally, in other embodiments, the routing node has already determined the target tile ID based on the coordinates when identifying the target data node. Therefore, the location request sent by the routing node to the data node 104 can also carry the target tile ID. In this case, the data node 104 can directly use the target tile ID.
[0167] Data node 104 can determine multiple polygons based on the polygon index information and the target tile ID; and determine the target polygon based on the multiple polygons and the coordinates, wherein the coordinates are within the range of the target polygon.
[0168] Taking tile ID (225, 131) as an example again. As mentioned above, data node 104 stores polygon index information as shown in Table 4. Based on the index information shown in Table 4, it can be determined that the polygons corresponding to tile ID (225, 131) include polygon A41, polygon A42, polygon A43, and polygon A44. Then, data node 104 can sequentially determine whether the range of each polygon contains coordinates 33.55, 69.57.
[0169] Optionally, in some embodiments, data node 104 may determine whether the polygon range contains coordinates 33.55, 69.57 in the order of the polygons in the index entries corresponding to tile ID (225, 131) in the polygon index information.
[0170] Optionally, in other embodiments, data node 104 can also determine the distance from coordinates 33.55, 69.57 to the center point of each of the four polygons, and sort the four polygons according to the distance from the coordinates to the center point of each polygon, where the closer the distance to the center point, the higher the ranking. Then, data node 104 determines whether a polygon contains the coordinates according to the ranking from high to low. For example, suppose the distance from coordinates 33.55, 69.57 to the center point of polygon A41 is DIST. 41 The distance from coordinates 33.55, 69.57 to the center point of polygon A42 is DIST. 42 The distance from coordinates 33.55, 69.57 to the center point of polygon A43 is DIST. 43 The distance from coordinates 33.55, 69.57 to the center point of polygon A44 is DIST. 44 Assume that DIST 43 <DIST 44 <DIST 42 <DIST 41 Therefore, the ranking of polygons A41 to A44 from highest to lowest is: polygon A43, polygon A44, polygon A42, and polygon A41. In this case, data node 104 can first determine whether polygon A43 contains coordinates 33.55, 69.57. If polygon A43 contains coordinates 33.55, 69.57, then polygon A43 is the target polygon. If polygon A43 does not contain coordinates 33.55, 69.57, then data node 104 can determine whether polygon A44 contains coordinates 33.55, 69.57; if data node 104 determines that polygon A44 also does not contain coordinates 33.55, 69.57, then it continues to determine whether polygon A42 contains coordinates 33.55, 69.57, and so on.
[0171] As shown in Table 4, the four polygons corresponding to tile ID (225, 131) are all derived from a single polygon A. Therefore, these four polygons have the same AOI level. If multiple polygons corresponding to tile ID (225, 131) have different AOI levels, then the polygon with the higher AOI level ranks higher than the polygon with the lower AOI level. For example, suppose the polygons corresponding to tile ID (225, 131) include: polygon A41, polygon A42, polygon A43, polygon A44, polygon B11, polygon B12, polygon B13, polygon C11, and polygon C12, where polygon C11 and polygon C12 have an AOI level of level 1, polygons B11, B12, and B13 have an AOI level of level 2, and polygons A41, A42, A43, and A44 have an AOI level of level 3. Assume that level 1 has the highest AOI level, level 2 has a lower AOI level than level 1, and level 2 has a higher AOI level than level 3. Therefore, polygons C11 and C12 rank higher than polygons B11, B12, and B13, and polygons B11, B12, and B13 rank higher than polygons A41, A42, A43, and A44. If the number of polygons in the same level is greater than or equal to a preset value, then the distance from the center of each polygon to its coordinates needs to be determined, and then the polygons in the same level are sorted according to the distance. For example, assuming the preset threshold is 3, then polygons B11, B12, and B13 need to be sorted, and polygons A41, A42, A43, and A44 need to be sorted. It can be seen that since the number of polygons in level 1 is less than the preset threshold, it is not necessary to sort polygons C11 and C12 according to the distance from their center points to their coordinates. The order of polygons C11 and C12 can be arbitrary. Assume the final sorting result of the above polygons is (ranked from highest to lowest): C11, C12, B12, B11, B13, A43, A44, A42, and A41. Data node 104 can first determine whether polygon C11 contains coordinates 33.55, 69.57. If polygon C11 contains coordinates 33.55, 69.57, then polygon C11 is the target polygon. If polygon C11 does not contain coordinates 33.55, 69.57, then data node 104 can determine whether polygon C12 contains coordinates 33.55, 69.57; if data node 104 determines that polygon C12 also does not contain coordinates 33.55, 69.57, then it continues to determine whether polygon B12 contains coordinates 33.55, 69.57, and so on.
[0172] In some embodiments, the AOI level can be related to the administrative division type of the polygons that are initially to be segmented. The smaller the administrative division, the higher the AOI level. For example, the AOI level of a country is lower than that of a province, the AOI level of a province is lower than that of a city, and the AOI level of a city is lower than that of a district.
[0173] In other embodiments, the AOI level can also be related to the area of the polygon that initially needs to be segmented. The smaller the area, the higher the AOI level.
[0174] 707, Data node 104 sends a location feedback to the routing node, which includes geographic location information used to describe the target polygon.
[0175] Taking coordinates 33.55, 69.57 as an example, assuming the target polygon determined by coordinates 33.55, 69.57 is polygon A43, and polygon A43 is obtained by segmenting a map of Afghanistan, then the geographical location information used to describe this target polygon is: Afghanistan.
[0176] Optionally, in some embodiments, the location feedback may further include a target POI, which is a POI near the coordinates. In other words, the data node can determine one or more POIs corresponding to a tile ID based on the correspondence between tile IDs and POIs, and then determine the distance from each POI to the coordinates. If the distance from a POI to the coordinates is less than a preset threshold, then that POI can be used as a target POI. It is understood that in some embodiments, all POIs may have a distance greater than the preset threshold from the coordinates. In this case, the location feedback may not include a target POI or may indicate that no target POI was found. In other embodiments, multiple POIs may have a distance less than the preset threshold from the coordinates. In this case, all of these multiple POIs can be used as the target POI.
[0177] 708, the routing node sends the location feedback to the terminal device.
[0178] In the above technical solution, different data nodes store different correspondences between tile IDs and polygons (i.e., polygon index information). Routing nodes store correspondences between tile IDs and data nodes (i.e., routing information). Thus, when a routing node receives coordinates from a terminal device, it can determine the corresponding tile ID based on the coordinates, and then determine the data node corresponding to the tile ID based on the routing information. In this way, the routing node can send the received coordinates to the designated data node (hereinafter referred to as the target data node) without sending the coordinates to all data nodes in the system. Except for the target data node, other data nodes do not need to participate in the calculation of determining the polygon corresponding to the coordinates. This reduces the overall power consumption of the system. Furthermore, since the polygons stored by the target data node are smaller polygons obtained after segmentation, the target data node can quickly determine the polygon containing the coordinates. This improves the response speed of reverse geospatial search and enhances the user experience.
[0179] Furthermore, in some embodiments, during the process of determining the target polygon from multiple polygons, the polygons are first sorted according to their AOI level and / or the distance from the coordinates to the center point. Then, the sorting result is used to determine whether the polygon contains the coordinates. Generally, the closer the coordinates are to the center point of a polygon, the greater the probability that the coordinates belong to that polygon. The higher the AOI level of the polygon, the smaller its area; the smaller the polygon area, the faster it is possible to determine if the coordinates are within the polygon's range. Therefore, the above technical solution can further improve the response speed of reverse geospatial search.
[0180] Figure 8 This is a schematic flowchart of a positioning method provided according to an embodiment of this application. Figure 8 The method shown can be executed by a data node or a component within a data node.
[0181] 801, Receives a location request from a routing node, which includes coordinates.
[0182] 802. Based on the polygon index information, the coordinate, and the target region identifier corresponding to the coordinate, determine the target polygon corresponding to the coordinate. The polygon index information is used to indicate the correspondence between the region identifier and the polygon. The target region identifier corresponds to multiple first polygons. The target polygon is one of multiple first polygons. The multiple first polygons are part or all of the polygons obtained by dividing a second polygon. The coordinate is located within the range of the target polygon.
[0183] For example, assuming the coordinates are 33.55, 69.57, then the target area corresponding to these coordinates can be calculated as 225, 131 according to Formula 2 and Formula 3.
[0184] For example, the polygon index information can be as shown in Table 4. Polygons A41, A42, A43, and A44 can be first polygons, obtained by dividing polygon A4. Polygon A4 can be a second polygon.
[0185] For example, polygons A121, A122, A123, and A124 can be the first polygon, and polygon A12 can be the second polygon.
[0186] For example, polygons A11, A13, and A14 can be the first polygon, and polygon A1 can be the second polygon.
[0187] 803, Send location feedback to the routing node. The location feedback includes geographic location information, which describes the geographic location containing the coordinates.
[0188] The geographic location information can be an Area of Interest (AOI). The geographic location described by this geographic location information can be the target polygon determined in step 802.
[0189] Figure 8 For the specific implementation details of each step of the method shown, please refer to [reference needed]. Figure 7 The methods for determining polygon segmentation, indexing, and routing information in the illustrated embodiment can be referenced. Figure 3 The embodiments shown are not described in detail here for the sake of simplicity.
[0190] Figure 9 This is a schematic diagram of a computer device provided according to an embodiment of this application. Figure 9 The computer device 900 shown can perform the steps executed by the routing node in the above embodiments. For example... Figure 9 The computer device 900 shown includes a receiving unit 901, a processing unit 902, and a transmitting unit 903.
[0191] The receiving unit 901 is used to receive coordinates from the terminal device.
[0192] The processing unit 902 is configured to determine the target data node corresponding to the target area identifier based on the routing information and the target area identifier corresponding to the coordinate, wherein the routing information is used to indicate the correspondence between the area identifier and the data node, and the target area identifier is used to indicate the area containing the coordinate.
[0193] The sending unit 903 is used to send a positioning request to the target data node, the positioning request including the coordinates.
[0194] The receiving unit 901 is also configured to receive positioning feedback from the target data node, the positioning feedback including geographic location information, the geographic location information being used to describe the geographic location containing the coordinates.
[0195] The specific functions and beneficial effects of the receiving unit 901, processing unit 902 and sending unit 903 can be referred to the description of some embodiments of the above method, and will not be repeated here for the sake of brevity.
[0196] It should be understood that Figure 9 This is merely an example and not a limitation; the computer device described above, including the receiving unit, transmitting unit, and processing unit, may be independent of... Figure 9 The structure shown.
[0197] When the computer device 900 is a chip, the chip includes a receiving unit, a transmitting unit, and a processing unit. The receiving and transmitting units can be input / output circuits or communication interfaces; the processing unit is a processor, microprocessor, or integrated circuit integrated on the chip.
[0198] Figure 10 This is a schematic diagram of another computer device provided according to an embodiment of this application. For example... Figure 10 The computer device 1000 shown can perform the steps executed by the data node in the above embodiments. For example... Figure 10 The computer device 1000 shown includes a receiving unit 1001, a processing unit 1002, and a transmitting unit 1003.
[0199] The receiving unit 1001 is used to receive a positioning request from the routing node, the positioning request including coordinates.
[0200] The processing unit 1002 is configured to determine the target polygon corresponding to the coordinate based on the polygon index information, the coordinate and the target region identifier corresponding to the coordinate. The polygon index information is used to indicate the correspondence between the region identifier and the polygon. The target region identifier corresponds to a plurality of first polygons. The target polygon is one of the plurality of first polygons. The plurality of first polygons are part or all of the polygons obtained by dividing a second polygon. The coordinate is located within the range of the target polygon.
[0201] The sending unit 1003 is used to send location feedback to the routing node. The location feedback includes geographic location information, which is used to describe the target polygon.
[0202] The specific functions and beneficial effects of the receiving unit 1001, processing unit 1002 and sending unit 1003 can be referred to the description of some embodiments of the above method, and will not be repeated here for the sake of brevity.
[0203] It should be understood that Figure 10 This is merely an example and not a limitation; the computer device described above, including the receiving unit, transmitting unit, and processing unit, may be independent of... Figure 10 The structure shown.
[0204] When the computer device 1000 is a chip, the chip includes a receiving unit, a transmitting unit, and a processing unit. The receiving unit and transmitting unit can be input / output circuits or communication interfaces; the processing unit is a processor, microprocessor, or integrated circuit integrated on the chip.
[0205] Figure 11 This is a schematic diagram of another computer device provided according to an embodiment of this application. For example... Figure 11 The computer device 1100 shown can perform the steps executed by the processing node in the above embodiments. For example... Figure 11 The computer device 1100 shown includes a processing unit 1101 and a sending unit 1102.
[0206] The processing unit 1101 can be used to segment polygons to obtain multiple polygons.
[0207] The processing unit 1101 can also be used to determine whether each polygon in the multiple polygons obtained by segmentation meets the preset conditions; determine the correspondence between the polygons that meet the conditions and the region identifiers to obtain polygon index information; and continue to segment the polygons that do not meet the preset conditions until polygons that meet the conditions are obtained.
[0208] The sending unit 1102 is used to send multiple index information determined by the processing unit 1101 to multiple data nodes.
[0209] The processing unit 1101 is also used to determine routing information.
[0210] The sending unit 1102 is also used to send the routing information to the routing node.
[0211] The specific functions and beneficial effects of the processing unit 1101 and the sending unit 1102 can be referred to the description of some embodiments of the above method, and will not be repeated here for the sake of brevity.
[0212] It should be understood that Figure 11 This is merely an example and not a limitation; the computer device described above, including the receiving unit, transmitting unit, and processing unit, may be independent of... Figure 11 The structure shown.
[0213] When the computer device 1100 is a chip, the chip includes a transmitting unit and a processing unit. The transmitting unit may be an input / output circuit or a communication interface; the processing unit may be a processor, microprocessor, or integrated circuit integrated on the chip.
[0214] This application also provides a computer device including a processor and a memory. The processor is configured to be coupled to the memory, read and execute instructions and / or program code in the memory to perform the steps executed by the processing node in the above method embodiments.
[0215] This application also provides a computer device including a processor and a memory. The processor is coupled to the memory to read and execute instructions and / or program code in the memory to perform the steps executed by the routing node in the above method embodiments.
[0216] This application also provides a computer device including a processor and a memory. The processor is coupled to the memory to read and execute instructions and / or program code in the memory to perform the steps executed by the data node in the above method embodiments.
[0217] It should be understood that the aforementioned processor can be a single chip. For example, the processor can be a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system-on-chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or other integrated chips.
[0218] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0219] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by the integrated logic circuitry in the processor's hardware or by instructions in software form. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0220] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0221] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to perform the various steps executed by the processing node in the above embodiments.
[0222] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to perform the various steps executed by the routing node in the above embodiments.
[0223] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to perform the various steps of the data node execution in the above embodiments.
[0224] According to the method provided in the embodiments of this application, this application also provides a computer-readable medium storing program code, which, when run on a computer, causes the computer to perform the various steps executed by the processing node in the above embodiments.
[0225] According to the method provided in the embodiments of this application, this application also provides a computer-readable medium storing program code, which, when run on a computer, causes the computer to perform the various steps executed by the data node in the above embodiments.
[0226] According to the method provided in the embodiments of this application, this application also provides a computer-readable medium storing program code, which, when run on a computer, causes the computer to perform the various steps executed by the routing node in the above embodiments.
[0227] According to the method provided in the embodiments of this application, this application also provides a system, which includes the aforementioned processing node, one or more routing nodes, and multiple data nodes.
[0228] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0229] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0230] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0231] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0232] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0233] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0234] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A positioning method, characterized in that, The method includes: Receive coordinates from the terminal device; Based on the routing information and the target area identifier corresponding to the coordinates, a target data node corresponding to the target area identifier is determined, wherein the routing information is used to indicate the correspondence between the area identifier and the data node, and the target area identifier is used to indicate the area containing the coordinates; Send a positioning request to the target data node, the positioning request including the coordinates; The system receives location feedback from the target data node, the location feedback including geographic location information, which describes the geographic location containing the coordinates.
2. The method as described in claim 1, characterized in that, The routing information includes multiple indices and identifiers of data nodes corresponding to each index, wherein each of the multiple indices is a region identifier or a region identifier range.
3. The method as described in claim 1 or 2, characterized in that, The positioning feedback also includes at least one point of interest (POI), and the distance between the coordinates and each of the at least one POI is less than a preset threshold.
4. A positioning method, characterized in that, The method includes: Receive a location request from a routing node, the location request including coordinates; Based on polygon index information, the coordinates, and the target region identifier corresponding to the coordinates, the target polygon corresponding to the coordinates is determined. The polygon index information is used to indicate the correspondence between the region identifier and the polygon. The target region identifier corresponds to a plurality of first polygons. The target polygon is one of the plurality of first polygons. The plurality of first polygons are part or all of the polygons obtained by dividing a second polygon. The coordinates are located within the range of the target polygon. A location feedback is sent to the routing node, the location feedback including geographic location information, the geographic location information being used to describe the geographic location containing the coordinates.
5. The method as described in claim 4, characterized in that, The polygon index information includes multiple indices and a first polygon corresponding to each index, wherein each of the multiple indices is a region identifier. The step of determining the target polygon corresponding to the coordinates based on polygon index information, the coordinates, and the target region identifier corresponding to the coordinates includes: Determine the target index that matches the target region identifier from the plurality of indexes; Sort the plurality of first polygons corresponding to the target index; The target polygon is determined based on the sorting results and the coordinates.
6. The method as described in claim 5, characterized in that, The sorting of the plurality of first polygons corresponding to the target index includes: The multiple first polygons are sorted according to their information area AOI level, wherein the first polygon with a higher AOI level is ranked higher than the first polygon with a lower AOI level.
7. The method as described in claim 6, characterized in that, The step of sorting the plurality of first polygons corresponding to the target index further includes: Identify N first polygons with the same AOI level from among the plurality of first polygons, where N is a positive integer greater than or equal to 2; Based on the distance from the center point of each reference region in one of the N first polygons with the same AOI level to the coordinates, the N first polygons with the same AOI level are sorted, wherein the first polygon with the center point closer to the coordinates is ranked higher than the first polygon with the center point farther from the coordinates.
8. The method according to any one of claims 5 to 7, characterized in that, Determining the target polygon based on the sorting result and the coordinates includes: Starting with the highest-ranking first polygon among the plurality of first polygons, determine in turn whether the first polygons contain the coordinates, until the target polygon is determined.
9. The method according to any one of claims 4 to 7, characterized in that, Before sending the location feedback to the routing node, the method further includes: Determine whether the target polygon includes a target information point (POI), wherein the target POI is a POI whose distance from the coordinates is less than a preset threshold; If the target POI is included in the target polygon, the localization feedback also includes the target POI.
10. The method according to any one of claims 4 to 7, characterized in that, The number of boundary points of the second polygon is greater than a preset boundary point number threshold, and the number of boundary points of the first polygon is less than or equal to the preset boundary point number threshold. or The number of boundary points of the second polygon is greater than the preset boundary point number threshold and the area of the second polygon is greater than the preset area threshold, the number of boundary points of the first polygon is less than or equal to the preset boundary point number threshold, or the area of the first polygon is less than or equal to the preset area.
11. The method according to any one of claims 4 to 7, characterized in that, The plurality of first polygons are partial or complete polygons obtained by dividing the second polygon based on the center point of the circumscribed figure of the second polygon.
12. The method as described in claim 11, characterized in that, The circumscribed shape is a regular polygon, trapezoid, parallelogram, or circle, wherein the number of sides of the circumscribed regular polygon is less than or equal to 8.
13. The method according to any one of claims 4 to 7, characterized in that, The target region identifier is one of at least one region identifier corresponding to the target polygon.
14. A computer device, characterized in that, include: The receiving unit is used to receive coordinates from the terminal device; The processing unit is configured to determine a target data node corresponding to the target area identifier based on routing information and a target area identifier corresponding to the coordinates, wherein the routing information is used to indicate the correspondence between the area identifier and the data node, and the target area identifier is used to indicate the area containing the coordinates; A sending unit is configured to send a positioning request to the target data node, the positioning request including the coordinates; The receiving unit is further configured to receive positioning feedback from the target data node, the positioning feedback including geographic location information, the geographic location information being used to describe the geographic location containing the coordinates.
15. The computer device as claimed in claim 14, characterized in that, The routing information includes multiple indices and identifiers of data nodes corresponding to each index, wherein each of the multiple indices is a region identifier or a region identifier range.
16. The computer device as claimed in claim 14 or 15, characterized in that, The positioning feedback also includes at least one point of interest (POI), and the distance between the coordinates and each of the at least one POI is less than a preset threshold.
17. A computer device, characterized in that, include: A receiving unit is configured to receive a positioning request from a routing node, the positioning request including coordinates; The processing unit is configured to determine the target polygon corresponding to the coordinates based on polygon index information, the coordinates, and a target region identifier corresponding to the coordinates. The polygon index information is used to indicate the correspondence between the region identifier and the polygon. The target region identifier corresponds to a plurality of first polygons. The target polygon is one of the plurality of first polygons. The plurality of first polygons are part or all of the polygons obtained by dividing a second polygon. The coordinates are located within the range of the target polygon. A sending unit is configured to send location feedback to the routing node, the location feedback including geographic location information, the geographic location information being used to describe the geographic location containing the coordinates.
18. The computer device as claimed in claim 17, characterized in that, The polygon index information includes multiple indices and a first polygon corresponding to each index, wherein each of the multiple indices is a region identifier. The processing unit is specifically configured to: determine a target index that matches the target region identifier from the plurality of indices; sort the plurality of first polygons corresponding to the target index; and determine the target polygon based on the sorting result and the coordinates.
19. The computer device as claimed in claim 18, characterized in that, The processing unit is specifically used to sort the plurality of first polygons according to the information area AOI level of the plurality of first polygons, wherein the first polygon with a higher AOI level is ranked higher than the first polygon with a lower AOI level.
20. The computer device as claimed in claim 19, characterized in that, The processing unit is specifically used to determine N first polygons with the same AOI level among the plurality of first polygons, where N is a positive integer greater than or equal to 2; Based on the distance from the center point of each reference region in one of the N first polygons with the same AOI level to the coordinates, the N first polygons with the same AOI level are sorted, wherein the first polygon with the center point closer to the coordinates is ranked higher than the first polygon with the center point farther from the coordinates.
21. The computer device as claimed in any one of claims 18 to 20, characterized in that, The processing unit is specifically used to determine, starting from the highest-ranking first polygon among the plurality of first polygons, whether the first polygon contains the coordinates, until the target polygon is determined.
22. The computer device as claimed in any one of claims 17 to 20, characterized in that, Before sending the location feedback to the routing node, the processing unit is specifically used to determine whether the target polygon includes a target information point (POI), wherein the target POI is a POI whose coordinate distance is less than a preset threshold. If the target POI is included in the target polygon, the localization feedback also includes the target POI.
23. The computer device as claimed in any one of claims 17 to 20, characterized in that, The number of boundary points of the second polygon is greater than a preset boundary point number threshold, and the number of boundary points of the first polygon is less than or equal to the preset boundary point number threshold. or The number of boundary points of the second polygon is greater than the preset boundary point number threshold and the area of the second polygon is greater than the preset area threshold, the number of boundary points of the first polygon is less than or equal to the preset boundary point number threshold, or the area of the first polygon is less than or equal to the preset area.
24. The computer device as claimed in any one of claims 17 to 20, characterized in that, The plurality of first polygons are partial or complete polygons obtained by dividing the second polygon based on the center point of the circumscribed figure of the second polygon.
25. The computer device as claimed in claim 24, characterized in that, The circumscribed shape is a regular polygon, trapezoid, parallelogram, or circle, wherein the number of sides of the circumscribed regular polygon is less than or equal to 8.
26. The computer device as claimed in any one of claims 17 to 20, characterized in that, The target region identifier is one of at least one region identifier corresponding to the target polygon.
27. A computer device, characterized in that, include: A processor configured to be coupled to a memory, read and execute instructions and / or program code in the memory to perform the method as described in any one of claims 1 to 3.
28. A computer device, characterized in that, Includes a processor configured to be coupled to a memory, read and execute instructions and / or program code in the memory to perform the method as described in any one of claims 4 to 13.
29. A chip system, characterized in that, include: A logic circuit for coupling with an input / output interface, through which data is transmitted to perform the method as described in any one of claims 1 to 3.
30. A chip system, characterized in that, include: A logic circuit for coupling with an input / output interface, through which data is transmitted to perform the method as described in any one of claims 4 to 13.
31. A computer-readable medium, characterized in that, The computer-readable medium stores program code that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 3.
32. A computer-readable medium, characterized in that, The computer-readable medium stores program code that, when run on a computer, causes the computer to perform the method as described in any one of claims 4 to 13.