CN111581324B - Navigation data generation method, device and equipment - Google Patents

Navigation data generation method, device and equipment Download PDF

Info

Publication number
CN111581324B
CN111581324B CN202010523961.6A CN202010523961A CN111581324B CN 111581324 B CN111581324 B CN 111581324B CN 202010523961 A CN202010523961 A CN 202010523961A CN 111581324 B CN111581324 B CN 111581324B
Authority
CN
China
Prior art keywords
grid
point
navigation data
coordinate
point pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010523961.6A
Other languages
Chinese (zh)
Other versions
CN111581324A (en
Inventor
李亚伟
徐小宾
方霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rajax Network Technology Co Ltd
Original Assignee
Rajax Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rajax Network Technology Co Ltd filed Critical Rajax Network Technology Co Ltd
Priority to CN202010523961.6A priority Critical patent/CN111581324B/en
Publication of CN111581324A publication Critical patent/CN111581324A/en
Application granted granted Critical
Publication of CN111581324B publication Critical patent/CN111581324B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Navigation (AREA)

Abstract

The application discloses a navigation data generation method, a navigation data generation device and navigation data generation equipment, and relates to the technical field of navigation. The method comprises the following steps: responding to an acquisition request of navigation data, and extracting point pair information carried by the acquisition request; inquiring whether navigation data mapped with the grid coordinates exist in a local database based on the grid coordinates corresponding to the point pair information; and if the point pair information exists, forming navigation data by the grid data matched with the point pair information.

Description

Navigation data generation method, device and equipment
Technical Field
The present application relates to the field of navigation technologies, and in particular, to a method, an apparatus, and a device for generating navigation data.
Background
With the continuous development of information technology, today's terminals, such as computers and mobile phones, can provide positioning services, and the position plays an increasingly important role. At the same time, map products and their derivatives (e.g., navigation software, distribution software, etc.) are also rapidly evolving.
In the delivery field, before a delivery person selects whether to receive a delivery task, the client typically needs to calculate a distance between a coordinate point of the delivery person and a coordinate point of a target position, and determine whether to receive the delivery task by using the distance as navigation data. For the navigation data, only the straight-line distance between the delivery personnel and the target position can be indicated, and the route distance of the delivery personnel cannot be displayed, so that the delivery personnel can hardly make correct judgment on receiving the delivery task.
In order to provide more accurate navigation data for the distribution personnel, a third-party map service can be used for navigating the route distance, and the navigation data of the third-party map service is requested through the distribution personnel coordinate points and the target position coordinate points to be displayed in a page. However, when there are many delivery tasks, the delivery personnel need to call the third-party map service interfaces one by one to request data, and under the condition of a poor network state, the data request of the interfaces will be delayed seriously, which affects the delivery experience and reduces the delivery efficiency.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, and a device for generating navigation data, and mainly aims to solve the problems in the prior art that interface request data may cause serious delay and distribution efficiency is low.
According to a first aspect of the present application, there is provided a method of generating navigation data, the method comprising:
responding to an acquisition request of navigation data, and extracting point pair information carried by the acquisition request;
based on the corresponding grid coordinate pair of the point pair information in the virtual grid, inquiring whether navigation data mapped with the grid coordinate pair exists in grid data stored in a local database, wherein the navigation data mapped with the grid coordinate pair and stored through a history acquisition request are recorded in the grid data;
and if so, displaying the navigation data mapped with the grid coordinate pair.
In another embodiment of the present invention, after the obtaining request in response to the navigation data extracts the point pair information carried by the obtaining request, the method further includes:
determining the grid areas where the position coordinate pairs of the point pair information are respectively located by utilizing the grid areas pre-divided by the virtual grid;
and acquiring coordinates of a central point in a grid area where the position coordinate pairs are respectively positioned, and taking the coordinates as corresponding grid coordinate pairs of the point pair information in the virtual grid.
In another embodiment of the present invention, the obtaining of coordinates of a center point in a grid area where the position coordinate pairs are respectively located as a grid coordinate pair corresponding to the point pair information in a virtual grid specifically includes:
determining a central point coordinate pair of grid areas where the position coordinate pairs are respectively located and mapped on different grid accuracies based on pre-divided grid accuracies;
and mapping the grid area to a center point coordinate pair with different grid precisions to serve as a grid coordinate pair corresponding to the point pair information in the virtual grid.
In another embodiment of the present invention, the local database stores grid data formed by navigation data of a history acquisition request on a point pair coordinate with a preset grid precision, and the querying whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the local database based on a grid coordinate pair corresponding to the point pair information in a virtual grid specifically includes:
assembling point pair coordinates with different grid precisions according to a point pair format based on corresponding grid coordinate pairs of the point pair information in the virtual grid;
and traversing and matching the point pair coordinates with different grid accuracies with the point pair coordinates corresponding to the preset grid accuracy of the grid data in the local database, and inquiring whether navigation data mapped with the point pair coordinates with different grid accuracies exist in the grid data.
In another embodiment of the present invention, the storing of the point pair coordinates and the navigation data in the grid data in a key-value pair manner, each of the point pair coordinates being mapped with one piece of navigation data, and the querying whether the grid data includes the navigation data mapped to the point pair coordinates with different grid accuracies by matching the point pair coordinates with different grid accuracies to the point pair coordinates with the preset grid accuracy corresponding to the grid data in the local database in a traversal manner includes:
forming matching keywords by the point pair coordinates according to the grid precision from small to large, and setting query conditions of different grid precisions;
and traversing and matching preset grid precision in the grid data in the local database based on the query conditions of different grid precisions, and querying whether navigation data mapped with the point-to-coordinate coordinates in the query conditions of different grid precisions exists in the grid data on the preset grid precision.
In another embodiment of the present invention, the extracting, in response to an acquisition request of navigation data, point pair information carried in the acquisition request specifically includes:
receiving a list request issued by a task channel, and adding the list request to a request thread pool;
and responding to the acquisition request of the navigation data by analyzing the distribution data carried by the list requests in the request thread pool one by one and extracting the point pair information in the distribution data.
In another embodiment of the present invention, the local database is provided with at least one database according to a matching priority order, and the querying whether there is navigation data mapped to a grid coordinate pair from grid data stored in the local database based on a grid coordinate pair corresponding to the point pair information in the virtual grid specifically includes:
generating a query task of a plurality of point pair information by using the point pair information formed by carrying a plurality of distribution data in the list request, wherein the query task records a grid coordinate pair corresponding to the point pair information in a virtual grid;
and judging whether navigation data mapped with the grid coordinate pair exists in the grid data stored in the at least one database based on the query task of the point pair information according to the matching priority sequence set by the database.
In another embodiment of the present invention, the at least one database includes a first database and a second database, the first database has a higher priority order than the second database, and the determining, according to the matching priority order set by the database, whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the at least one database based on a query task of multiple point pair information specifically includes:
the query tasks of the point pair information are put into a task thread pool corresponding to a first database, and the query tasks of the point pair information are traversed to judge whether navigation data mapped to the grid coordinate exists in grid data stored in the first database or not;
if the navigation data exists, returning a query task of the preset point pair information to the main thread to display the navigation data mapped with the grid coordinate pair;
if not, adjusting the query task of the preset point pair information to a task thread pool corresponding to the second database, and judging whether navigation data mapped with the grid coordinate pair exists in the grid data stored in the second database or not based on the query task of the preset point pair information.
In another embodiment of the present invention, after the querying, from the grid data stored in the local database, whether there is navigation data mapped to the grid coordinate pair based on the corresponding grid coordinate pair in the virtual grid of the point pair information, the method further includes:
if the point pair information does not exist, sending an acquisition request of the navigation data to a server so that the server returns the navigation data corresponding to the point pair information according to the point pair information carried by the acquisition request;
carrying out grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid;
and forming grid data by the grid coordinate pair corresponding to the point pair information in the virtual grid and the navigation data corresponding to the point pair information, storing the grid data into a local database, and displaying the navigation data corresponding to the point pair information.
In another embodiment of the present invention, the grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid specifically includes:
mapping the position coordinate pairs of the point pair information to a virtual grid respectively to obtain a grid area where the point pair information is located in the virtual grid;
determining preset grid precision applicable to a grid region where the point pair information is located in a virtual grid from pre-divided grid precision based on positioning precision distributed to the navigation data by the server;
and acquiring the coordinates of the central point of the grid area mapped on the preset grid precision as the corresponding grid coordinate pair of the point pair information in the virtual grid.
According to a second aspect of the present application, an apparatus for generating navigation data, the apparatus comprising:
the extraction unit is used for responding to an acquisition request of navigation data and extracting point pair information carried by the acquisition request;
the query unit is used for querying whether navigation data mapped with the grid coordinate pair exists in grid data stored in a local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid, and the grid data records navigation data mapped with the grid coordinate pair and stored through a history acquisition request;
and the display unit is used for displaying the navigation data mapped with the grid coordinate pair if the navigation data exists.
In another embodiment of the present invention, the apparatus further comprises:
a determining unit, configured to, after extracting the point pair information carried in the request for obtaining in response to the request for obtaining navigation data, determine, by using a grid area pre-divided by the virtual grid, a grid area in which the position coordinate pairs of the point pair information are located respectively;
and the obtaining unit is used for obtaining the coordinates of the central point in the grid area where the position coordinate pairs are respectively positioned as the corresponding grid coordinate pairs of the point pair information in the virtual grid.
In another embodiment of the present invention, the obtaining unit includes:
the first determining module is used for determining a central point coordinate pair of the grid areas where the position coordinate pairs are respectively located and mapped on different grid accuracies based on pre-divided grid accuracies;
and the first acquisition module is used for mapping the grid area to a center point coordinate pair with different grid accuracies as a grid coordinate pair corresponding to the point pair information in a virtual grid.
In another embodiment of the present invention, the local database stores grid data formed by navigation data of the history acquisition request on point-to-coordinate coordinates of a preset grid precision, and the query unit includes:
the assembling module is used for assembling and forming point pair coordinates with different grid precisions according to a point pair format based on the corresponding grid coordinate pairs of the point pair information in the virtual grid;
and the query module is used for querying whether navigation data mapped with the point pair coordinates with different grid accuracies exists in the grid data by traversing and matching the point pair coordinates with different grid accuracies with the point pair coordinates corresponding to the preset grid accuracy in the grid data in the local database.
In another embodiment of the present invention, the point-to-point coordinates in the grid data and the navigation data are stored in a key-value pair form, and each point-to-point coordinate is mapped with one navigation data, and the query module includes:
the setting submodule is used for forming matching keywords for the point pair coordinates according to the grid precision from small to large and setting query conditions of different grid precisions;
and the query submodule is used for traversing and matching the preset grid precision in the grid data in the local database based on the query conditions with different grid precisions, and querying whether navigation data mapped with the point-to-coordinate coordinates in the query conditions with different grid precisions exists in the grid data on the preset grid precision.
In another embodiment of the present invention, the extracting unit includes:
the adding module is used for receiving a list request issued by a task channel and adding the list request to a request thread pool;
and the extraction module is used for responding to the acquisition request of the navigation data by analyzing the distribution data carried by the list requests in the request thread pool one by one and extracting the point pair information in the distribution data.
In another embodiment of the present invention, said local database is provided with at least one database in order of matching priority,
the query unit is specifically configured to generate a query task of multiple point-to-point information from the point-to-point information formed by carrying multiple pieces of distribution data in the list request, where the query task records a grid coordinate pair corresponding to the point-to-point information in a virtual grid;
the query unit is specifically further configured to determine, according to the matching priority order set by the database, whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the at least one database based on a query task of the plurality of point-to-point information.
In another embodiment of the present invention, the at least one database includes a first database and a second database, the first database is set to have a higher priority order than the second database,
the query unit is further specifically configured to place the query tasks of the plurality of point-to-point information into a task thread pool corresponding to a first database, and traverse the query tasks of the plurality of point-to-point information to determine whether navigation data mapped to the grid coordinate pair exists in grid data stored in the first database;
the query unit is specifically configured to, if the query unit exists, return a query task of preset point pair information to a main thread to display the navigation data mapped with the grid coordinate pair;
the query unit is specifically configured to, if the query task does not exist, adjust a query task of preset point pair information to a task thread pool corresponding to the second database, and determine whether navigation data mapped to the grid coordinate exists in the grid data stored in the second database based on the query task of the preset point pair information.
In another embodiment of the present invention, after the grid coordinate pair corresponding to the point-to-point information in the virtual grid is queried from the grid data stored in the local database for whether navigation data mapped to the grid coordinate pair exists, if the navigation data does not exist, sending an acquisition request of the navigation data to a server, so that the server returns the navigation data corresponding to the point-to-point information according to the point-to-point information carried by the acquisition request;
the processing unit is used for carrying out grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid;
and the storage unit is used for forming grid data by the grid coordinate pair corresponding to the point pair information in the virtual grid and the navigation data corresponding to the point pair information, storing the grid data into a local database and displaying the navigation data corresponding to the point pair information.
In another embodiment of the present invention, the processing unit includes:
the mapping module is used for mapping the position coordinate pairs of the point pair information to a virtual grid respectively to obtain a grid area of the point pair information in the virtual grid;
a second determining module, configured to determine, based on the positioning accuracy allocated by the server to the navigation data, a preset grid accuracy applicable to a grid area where the point-to-point information is located in a virtual grid from pre-divided grid accuracies;
and the second acquisition module is used for acquiring the center point coordinates of the grid area mapped on the preset grid precision as the corresponding grid coordinate pair of the point pair information in the virtual grid.
According to a third aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described navigation data generation method.
According to a fourth aspect of the present application, there is provided a navigation data generation device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above navigation data generation method when executing the program.
By the technical scheme, compared with the mode that a third-party map service interface is required to be called one by one to generate navigation data in the existing mode, the navigation data generation method, the navigation data generation device and the navigation data generation equipment provided by the application have the advantages that point pair information carried by the acquisition request is extracted in response to the acquisition request of the navigation data, whether navigation data mapped with grid coordinates exist or not is inquired from the grid data stored in a local database based on the grid coordinates of the point pair information in a virtual grid, the grid data records the navigation data stored by a historical acquisition request, if the navigation data mapped with the grid coordinates exist, the navigation data does not need to be acquired through the third-party map service interface, the navigation data is inquired through the local data, the inquiry speed of the navigation data is increased while network resources are saved, thereby improving the delivery efficiency.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart illustrating a method for generating navigation data according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating another navigation data generation method provided in the embodiment of the present application;
fig. 3 is a schematic flow chart illustrating another navigation data generation method provided by an embodiment of the present application;
FIG. 4 is a timing diagram illustrating another method for generating navigation data according to an embodiment of the present application;
FIG. 5 is a flow chart illustrating task execution in another navigation data generation process provided by the embodiment of the present application;
fig. 6 is a schematic structural diagram illustrating a navigation data generation apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram illustrating another navigation data generation apparatus according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In general, in order to provide more accurate navigation data to the delivery personnel, a third party map service may be used to navigate the route distance, and the navigation data of the third party map service is requested through the delivery personnel coordinate point and the target position coordinate point to be displayed in a page. However, when there are many delivery tasks, the delivery personnel need to deliver the tasks one by one to call the third-party map service interface to perform the data request, and calling the third-party map service interface is a manner with a high delay rate, and particularly under the condition of a poor network status, the navigation data requested by the interface will be delayed seriously, which affects the delivery experience and reduces the delivery efficiency.
In order to solve the problem, the present embodiment provides a method for generating navigation data, as shown in fig. 1, including the following steps:
101. and responding to an acquisition request of navigation data, and extracting point pair information carried by the acquisition request.
The acquisition request of the navigation data can be triggered by any delivery task in the client task list, the delivery tasks issued in the channel are summarized to the task list before the delivery tasks are executed, each delivery task corresponds to delivery data, such as a delivery order number, a delivery position, delivery time and the like, and each delivery task needs to correspond to accurate navigation data in consideration of the distance between the current geographic position and the delivery position of a delivery person so as to select the delivery tasks by the delivery person, so that the delivery time is saved.
In general, the navigation data needs point pair information of a start position and an end position, and specifically, the current position information of the client is acquired by using a GPS positioning function while an acquisition request of the navigation data is triggered, the position information is used as the start position, a distribution position in a distribution task triggered by the acquisition request is used as the end position, and then the point pair information carried by the acquisition request is extracted.
The execution main body of this embodiment may be a generation device or an apparatus of navigation data, and may be configured at the client, and by extracting the point pair information carried in the acquisition request, the point pair information of the start position and the end position of the navigation data may be determined, and then accurate navigation data is acquired based on the point pair information, so as to improve the distribution efficiency.
102. And inquiring whether navigation data mapped with the grid coordinate pair exists in grid data stored in a local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid.
The virtual grid is a virtual area fence divided by coordinate precision in an original map, each virtual area fence can be understood as a grid area, each grid area corresponds to a grid coordinate, the grid coordinate can be a central point coordinate of the grid area, a boundary coordinate of a fixed position of the grid area and the like, and it can be understood that, in order to ensure consistency of the grid coordinates, the coordinate positions selected by each grid coordinate from the grid areas are uniform, for example, top left corner vertex coordinates of the grid areas are selected by all the grid coordinates, and central point coordinates of the grid areas are selected by all the grid coordinates. The point pair information comprises a start position coordinate and an end position coordinate, the start position coordinate corresponds to a grid area in the virtual grid and also corresponds to a grid coordinate, and the end position coordinate corresponds to a grid area in the virtual grid and also corresponds to a grid coordinate. Therefore, the point pair information corresponds to a play coordinate pair in the virtual grid area.
In order to facilitate acquisition of navigation data, grid data is stored in the local database, and navigation data mapped with grid coordinates and stored through a history acquisition request is recorded in the grid data, for example, when no grid data is stored in the local database, the navigation data returned by the acquisition request is sent to the server for the first time, and the grid data needs to be processed to be stored in the local data, so that the navigation data can be reused for the same grid coordinate pair in the following process, and the acquisition request of the navigation data does not need to be sent to the server. Specifically, the grid coordinate pair corresponding to the point pair information in the virtual grid may be matched with the grid coordinate pair recorded by the grid data in the local data, and if a matching consistent grid coordinate pair is found, it is indicated that the grid data in the local database has navigation data mapped with the grid coordinate pair, and the navigation data may be directly obtained from the local database.
103. And if so, displaying the navigation data mapped with the grid coordinate pair.
For the grid data in the local database, navigation data mapped with grid coordinates are recorded, which shows that the navigation data history sends a data acquisition request to the server, and the server needs to call a third-party interface for each acquisition request, so that network resources are consumed, and the navigation data are directly acquired from the local database of the client. Navigation data do not need to be repeatedly acquired from the server, network resources are saved, the generation speed of the navigation data is increased, and the use experience of distribution personnel is improved.
Compared with the prior art that the navigation data is generated by calling a third-party map service interface one by one to request data, the method for generating navigation data extracts point pair information carried by the request in response to the request for acquiring navigation data, inquires whether navigation data mapped with grid coordinates exists in the grid data stored in a local database based on the grid coordinates of the point pair information in a virtual grid, the grid data records navigation data stored by the history acquisition request, if the navigation data exists, the navigation data mapped by the grid coordinate is displayed, the navigation data does not need to be acquired through a third-party map service interface request, and is inquired through local data instead, so that the inquiry speed of the navigation data is increased while network resources are saved, and the distribution efficiency is improved.
Further, as a refinement and an extension of the embodiment in fig. 1, in order to fully describe the implementation process of the embodiment, the embodiment provides another navigation data generation method, as shown in fig. 2, the method includes:
201. and responding to an acquisition request of navigation data, and extracting point pair information carried by the acquisition request.
It can be understood that, the point pair information carried by the acquisition request is usually in the form of coordinates of a start position and an end position, the point pair information is equivalent to real coordinates of a distribution person and real coordinates of a target position, the client acquires the point pair information, and as the client position is continuously changed, the real coordinates of the distribution person in the point pair information are also changed to be changed real coordinates, and the target position information is usually a fixed real coordinate of an entity object position where the user or the task publisher is located.
202. And determining the grid areas where the position coordinate pairs of the point pair information are respectively positioned by utilizing the grid areas pre-divided by the virtual grid.
In the embodiment of the present invention, the grid area pre-divided by the virtual grid may be understood as a grid space, and the grid space corresponds to a coordinate range, where a coordinate range formed by a boundary of the grid space may be used as a coordinate range corresponding to the grid space, and further, for a position coordinate pair of the point pair information, the grid areas where the position coordinate pair of the point pair information is respectively located are queried, for example, a start position coordinate of the point pair information is located in the grid area a, and an end position coordinate of the point pair information is located in the grid area B.
It can be understood that the coordinate range formed by the boundaries of the mesh regions usually consists of coordinates of four vertices of the mesh, and when the mesh regions are recorded, each mesh region corresponds to position information formed by the four vertices of the mesh, specifically, the position information of the four vertices corresponding to the position coordinates in the point pair information is searched from the virtual mesh by mapping the position coordinates in the point pair information into the virtual mesh, and the mesh region corresponding to the position information of the four vertices is the mesh region where the position coordinates of the point pair information are located.
203. And acquiring coordinates of a central point in a grid area where the position coordinate pairs are respectively positioned, and taking the coordinates as corresponding grid coordinate pairs of the point pair information in the virtual grid.
Wherein, the central point coordinate in the grid area can be the average value of the position coordinates of four vertexes in the grid area, each grid area in the virtual grid corresponds to one grid coordinate, because the distance covered by the grid area is limited, in order to relieve the storage pressure of navigation data, the fine offset distance generated in the grid area can be ignored, so that all position coordinates in the grid area are gathered to the same coordinate, the coordinates may be coordinates of a center point within the grid area, may characterize all location coordinates within the grid area, further, in the process of inquiring navigation data, the distances from all position coordinates in the grid area to the same end position coordinate can be converted into the distances from the center point coordinate in the grid area to the same end position coordinate, so that all position coordinates within the grid area are applicable to the same navigation data for the same end position coordinate.
It will be appreciated that the road construction plan differs for the actual area in which the different location coordinates are located, for example, some areas may be more densely planned, and the road building planning of some areas is more dispersed, if the same grid precision is used for all grid areas, for the case of high grid precision, the start position coordinates or the end position coordinates in the grid area are covered too much, so that the wrong navigation data is easy to generate, for the case of low grid precision, too little coverage of the initial position coordinates or the end position coordinates in the grid area easily wastes grid processing resources, in the process of the mesh region into which the virtual mesh is divided in advance, therefore, a plurality of mesh accuracies can be set, and acquiring coordinates of the central point in the grid area where the position coordinate pairs are respectively positioned based on different grid accuracies to form grid coordinate pairs with different grid accuracies.
Specifically, a center point coordinate pair of the grid region where the position coordinate pair is respectively located and mapped on different grid accuracies may be determined based on the grid accuracies divided in advance, and the center point coordinate pair of the grid region mapped on the different grid accuracies may be further determined as a corresponding grid coordinate pair of the point pair information in the virtual grid, where a plurality of grid coordinate pairs may be formed for the number of grid accuracies, for example, if the grid accuracies are respectively set with 10m grid accuracy, 50m grid accuracy, and 100m grid accuracy, a grid coordinate pair (a1, B1) is formed for the 10m grid accuracy, a grid coordinate pair (a2, B2) is formed for the 50m grid accuracy, and a grid coordinate pair (A3, B3) is formed for the 100m grid accuracy.
204. And assembling point pair coordinates with different grid precisions according to the point pair format based on the corresponding grid coordinate pairs of the point pair information in the virtual grid.
The point pair coordinates of different grid precisions assembled and formed according to the point pair format may be point pair coordinates formed by adding connectors between grid coordinate pairs, where the connectors may be represented by symbols &, and, # and the like, for example, if the grid coordinate pair is (a, B), the point pair coordinates formed by adding connectors are a & B, A # B and the like.
To facilitate distinguishing point pair coordinates of different grid accuracies, as an embodiment, for a pair of grid coordinates of the same grid accuracy, in assembling and composing point pair coordinates of different grid accuracies, the same point pair format may be used for assembly, for example, a & B is used for the point pair coordinates of 10m grid accuracy, and a & & B is used for the point pair coordinates of 50m grid accuracy.
It should be noted that, for different grid accuracies, corresponding grid coordinate pairs of point pair information in a virtual grid are also different, in the practical application process, the point pair information may be a coordinate pair formed by any two of a distribution personnel position coordinate, a user position coordinate, and an entity object position coordinate, the point pair coordinates of different grid accuracies formed by specific point pair information may be as shown in table 1 below, in the process of matching the grid coordinate pairs mapped by grid accuracies one by one with grid data in a local database, a grid coordinate mapped by 10m grid accuracies is selected for the distribution personnel position coordinate, a grid coordinate mapped by 50m grid accuracies is selected for the entity object position coordinate, and then the point pair coordinates assembled according to the point pair format to form the grid accuracies may be expressed as: 40.0574,116.3584#40.0755,116.3575.
TABLE 1
Figure BDA0002533143060000131
205. And traversing and matching the point pair coordinates with different grid accuracies with the point pair coordinates corresponding to the preset grid accuracy of the grid data in the local database, and inquiring whether navigation data mapped with the point pair coordinates with different grid accuracies exist in the grid data.
The local database stores grid data formed by navigation data of a historical acquisition request on point-to-coordinate of preset grid precision, in general, a server allocates precision suitable for the navigation data of the historical acquisition request, for example, 10m, 20m and the like, and after receiving the navigation data, a client maps a starting position and an ending position corresponding to the navigation data on the point-to-coordinate of the preset grid precision for the precision of the navigation data, and then forms grid data with the navigation data and stores the grid data in the local database of the client.
In the embodiment of the invention, the point pair coordinates and the navigation data in the grid data are stored in a key-value pair form, and each point pair coordinate is mapped with one piece of navigation data. It is to be understood that the point pair coordinates may represent all position coordinates within the grid area, and the same point pair coordinates, and the same navigation data, are mapped for all position coordinates within the same grid area at both the start position and the focus position.
The preset grid precision corresponding to the grid data stored in the local database cannot be determined, and the lower the grid precision, the higher the positioning precision, in order to facilitate quick query of the navigation data, specifically, the point pairs and the coordinates can be formed into matching keywords according to the grid precision from small to large, query conditions of different grid precisions are set, further, based on the query conditions of different grid precisions, the preset grid precision in the grid data in the local database is traversed and matched, and whether the navigation data mapped to the coordinates by the points in the query conditions of different grid precisions exists in the grid data in the preset grid precision is queried.
It is to be understood that the grid precision in the grid data stored in the local database for one navigation data is assigned by the server and is unique, so that, for the grid coordinate pair corresponding to the point-to-point information, although the query conditions of different grid precisions are set, only at most one navigation data may be queried during the query process.
206a, if the navigation data exists, displaying the navigation data mapped with the grid coordinate pair.
The distribution personnel is mainly responsible for distribution tasks in the limited area in the actual application process, a large amount of navigation data can be requested from the server when the distribution tasks are processed, most of the navigation data in the limited area can be recorded in the local database after the navigation data are deposited within a period of time, and after a subsequent client receives an acquisition request of the navigation data, network resources do not need to be consumed to acquire the navigation data from the server, so that the acquisition speed of the navigation data is improved.
Corresponding to the step 206a, there is a step 206b, and if the navigation data does not exist, sending an acquisition request of the navigation data to a server, so that the server returns the navigation data corresponding to the point-to-point information according to the point-to-point information carried by the acquisition request.
It can be understood that, if the local database does not store navigation data mapped with the point pair coordinates with different grid accuracies, it indicates that the client does not obtain the relevant navigation data from the server for the point pair information, at this time, an obtaining request of the navigation data needs to be sent to the server, so that the server forwards the corresponding point pair information to the server of the third-party navigation application, and then obtains and returns the navigation data corresponding to the point pair information through the server of the third-party navigation application.
207b, performing grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in the virtual grid.
In the embodiment of the invention, the navigation data returned by the server indicates the distance of a route formed between the coordinates of the starting position and the ending position in the point pair information, and for the condition that the navigation data is stored by the client, the navigation data between two coordinate points is difficult to perform the matching of distribution tasks in the subsequent query process, the point information can be processed into a corresponding grid coordinate pair in a virtual grid, and further, for the point pair information near the grid coordinate pair, the corresponding navigation data can be obtained by utilizing the grid coordinate pair.
The above-mentioned process of grid mapping the point pair information is equivalent to determining that a center point of a grid area where a position coordinate in the point pair information is located is marked in the virtual grid, and specifically, the position coordinate pair of the point pair information can be mapped to the virtual grid respectively to obtain the grid area where the point pair information is located in the virtual grid, and further, based on the positioning accuracy allocated to the navigation data by the server, the preset grid accuracy applicable to the grid area where the information is located in the virtual grid is determined from the pre-divided grid accuracy, and the center point coordinate of the grid area mapped on the preset grid accuracy is obtained as the corresponding grid coordinate pair of the point pair information in the virtual grid.
208b, forming grid data by the grid coordinate pair corresponding to the point pair information in the virtual grid and the navigation data corresponding to the point pair information, storing the grid data in a local database, and displaying the navigation data corresponding to the point pair information.
It can be understood that a grid coordinate pair corresponding to the point pair information in the virtual grid is equivalent to a coordinate pair formed by the start position and the end position in the point pair information, and a navigation data is mapped to each grid coordinate pair to form grid data and then stored in the local database, so that a subsequent request for acquiring the navigation data for the grid coordinate pair can be directly inquired from the local database and displayed at the client.
Specifically, in the actual application process, aiming at a time sequence diagram for interaction inside and outside a client in the navigation data generation process, as shown in fig. 3, the client divides a map into grid areas with different grid precisions in advance, each position coordinate in the map is in a certain grid area and is mapped with a grid coordinate, when an acquisition request of navigation data is received, firstly, point pair information carried by the acquisition request is mapped to a grid coordinate pair in a virtual grid, grid data in a memory is inquired, whether navigation data matched with the grid coordinate pair exists in the grid data or not is judged, if yes, the navigation data is displayed, if not, grid data in a database is inquired, whether navigation data matched with the grid coordinate pair exists in the grid data or not is judged, if yes, the navigation data is displayed, if not, the acquisition request is sent to a server, the method comprises the steps that a server forwards an acquisition request to a third-party map API, the third-party map API is connected with a map application server to directly acquire navigation data corresponding to point pair information, the navigation data are returned to a client side to be displayed, meanwhile, point pair information corresponding to the navigation data is extracted, the preset grid precision corresponding to the point pair information is determined and determined based on the positioning precision distributed by the server side, the grid coordinate pair corresponding to the point pair information is calculated, and then the grid coordinate pair and the navigation data corresponding to the grid coordinate pair form grid data and are respectively stored in a memory and a database, so that the subsequent acquisition request of the navigation data around two position coordinates in the point pair information can be directly acquired from the memory or the database without requesting the third-party map API through the server.
For example, when a delivery person needs to request navigation data from a position coordinate in grid a to a position coordinate in grid B, the real coordinate of the delivery person and the real coordinate of a destination are used to request the navigation data from a server for the first time, the server forwards the request to a third-party map API to obtain the navigation data with a real distance of 3.5 and a precision of 10m, and the client calculates a grid coordinate pair formed by grid a and grid B according to the precision after receiving the navigation data, and further stores the grid data formed by the grid coordinate pair and the navigation data into a memory and a database, at this time, the real distance of the navigation data between all position coordinates in grid a and all position coordinates in grid B is 3.5 (ignoring fine deviation distance), when the subsequent delivery person needs to obtain the real distance of the navigation data again, the data is not required to be requested from the server, but can be obtained through a cache or a database.
Further, as a refinement and an extension of the embodiment in fig. 1, in order to fully describe the implementation process of the embodiment, the embodiment provides another navigation data generation method, as shown in fig. 4, the method includes:
301. receiving a list request issued by a task channel, and adding the list request to a request thread pool.
The task channel is equivalent to a network platform for interfacing the entity objects, the specific entity objects can deliver various delivery tasks to the network platform, the network platform can serve as a carrier of the delivery tasks to deliver the delivery tasks required by the entity objects to the client in the form of a list request, the entity objects are usually offline entity stores, and the delivery tasks collected by the network platform and delivered by the entity objects are summarized in the list request.
It is understood that for the case of too many dispatching tasks in the list request, in order to relieve the query pressure, the dispatching tasks in the list request may be added to the requesting thread pool by using a thread pool technique, so that the thread pool reasonably arranges the processing queues of the dispatching tasks.
302. And responding to the acquisition request of the navigation data by analyzing the distribution data carried by the list requests in the request thread pool one by one and extracting the point pair information in the distribution data.
In the embodiment of the present invention, the delivery tasks in the list request carry delivery data, and the delivery data may include location information related to delivery, such as location information of the entity object and location information of the user, delivery time information, and the like, the distribution personnel in the process of screening the distribution tasks preferably considers whether the distributed line distance is in accordance with the expectation, firstly, the line distance between the distribution personnel and the entity object, secondly, navigation data between the entity object and the user, at this time, the position information of the delivery personnel and the position information of the entity object need to be extracted and calculated from the delivery data, specifically for each piece of delivery data, the position information of the distribution personnel can be obtained by utilizing a GPS positioning application, and the position information of the entity object provided by the task channel is extracted by analyzing the distribution data, so that the point pair information in the distribution data is formed.
303. And generating a plurality of query tasks of the point-to-point information by using the point-to-point information formed by carrying a plurality of distribution data in the list request.
In the embodiment of the present invention, the query task records a grid coordinate pair corresponding to the point-to-point information in the virtual grid, and the specific request thread pool needs to create a query task for each delivery task in the process of arranging the processing queue of the delivery task.
It can be understood that, in order to facilitate the queue processing of the delivery tasks in the request thread pool, the delivery tasks may be prioritized according to the delivery time, and then the navigation data corresponding to the delivery tasks before the delivery time is preferentially checked, and the delivery tasks may also be prioritized according to the historical delivery times, and then the navigation data corresponding to the delivery tasks before the delivery times is checked.
304. And judging whether navigation data mapped with the grid coordinate pair exists in the grid data stored in the at least one database based on the query task of the point pair information according to the matching priority sequence set by the database.
The at least one database comprises a first database and a second database, the first data can be a memory database with a higher query speed, the second database can be a common database with a second query speed, the priority order set by the first database is higher than that of the second database, so that the grid data stored in the first database are queried preferentially for each query task, and the grid data stored in the second database are queried under the condition that the grid data are not queried.
It can be understood that, after the server returns the navigation data corresponding to the point-to-point information, the server usually processes the navigation data to form grid data, and stores the grid data into the first database and the second database, respectively, but under the condition of network delay, it cannot be guaranteed that the same navigation data is stored in the first database and the second database at the same time, and the navigation data is not queried in the first database, but the navigation data is queried in the second database.
Specifically, the query tasks of the plurality of point pair information are put into a task thread pool corresponding to a first database, the query tasks of the plurality of point pair information are traversed to judge whether navigation data mapped to a grid coordinate exists in grid data stored in the first database, if yes, the query tasks of the preset point pair information are returned to a main thread to display the navigation data mapped to the grid coordinate, if not, the query tasks of the preset point pair information are adjusted to a task thread pool corresponding to a second database, and whether the navigation data mapped to the grid coordinate exists in the grid data stored in the second database is judged based on the query tasks of the preset point pair information.
305a, if the navigation data exists, displaying the navigation data mapped with the grid coordinate pair.
Step 305b corresponds to step 305a, and if the navigation data does not exist, sending an acquisition request of the navigation data to a server so that the server returns the navigation data corresponding to the point pair information according to the point pair information carried by the acquisition request.
And 306b, carrying out grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in the virtual grid.
307b, forming grid data by the grid coordinate pair corresponding to the point pair information in the virtual grid and the navigation data corresponding to the point pair information, storing the grid data in a local database, and displaying the navigation data corresponding to the point pair information.
In a specific application scenario, under the condition of concurrent processing of multiple list requests, a thread pool technology may be used to relieve data request pressure, as shown in fig. 5, for a flow chart of list task execution in a data acquisition request process, as for a concurrent processing process of multiple delivery tasks in a list request, request pressure is relieved by using the thread pool technology, first, a list request formed by multiple delivery tasks is added as an independent thread task to a request thread pool for summarization, then, the delivery tasks in each list request are processed, delivery data in the delivery tasks are analyzed one by one, the delivery data in each delivery task is generated into query tasks for list circulation, for each query task, memory query is preferentially executed, the query tasks are adjusted to memory threads, matching is performed from small to large according to grid precision, and if matching is successful, and returning to the main thread to display the navigation data, if the matching fails, waiting for the completion (blocking) of the task execution, further executing database query, adjusting the query task to the database thread, matching from small to large according to the grid precision, if the matching succeeds, returning to the main thread to display the navigation data, processing the navigation data and storing the navigation data into a memory, and if the matching fails, sending a navigation data acquisition request to the server.
Further, as a specific implementation of the method in fig. 1 and fig. 2, an embodiment of the present application provides a navigation data generation apparatus, as shown in fig. 6, the apparatus includes: extraction unit 41, extraction unit 42, presentation unit 43.
An extracting unit 41, configured to respond to an acquisition request of navigation data, and extract point pair information carried in the acquisition request;
a query unit 42, configured to query whether navigation data mapped to the grid coordinate pair exists in grid data stored in a local database based on a grid coordinate pair corresponding to the point pair information in the virtual grid, where the navigation data mapped to the grid coordinate pair stored in the history obtaining request is recorded in the grid data;
a presentation unit 43 may be configured to present the navigation data mapped to the grid coordinate pairs, if any.
Compared with the prior art that the navigation data is generated by calling a third-party map service interface one by one to request data, the navigation data generation device provided by the embodiment of the invention extracts point pair information carried by the acquisition request in response to the acquisition request of the navigation data, inquires whether the navigation data mapped with grid coordinates exists in the grid data stored in a local database based on the grid coordinates of the point pair information in a virtual grid, the grid data records navigation data stored by the history acquisition request, if the navigation data exists, the navigation data mapped by the grid coordinate is displayed, the navigation data does not need to be acquired through a third-party map service interface request, and is inquired through local data instead, so that the inquiry speed of the navigation data is increased while network resources are saved, and the distribution efficiency is improved.
In a specific application scenario, as shown in fig. 7, the apparatus further includes:
a determining unit 44, configured to, after extracting the point pair information carried in the request for obtaining the navigation data in response to the request for obtaining the navigation data, determine, by using grid areas pre-divided by the virtual grid, grid areas where the position coordinate pairs of the point pair information are located respectively;
the obtaining unit 45 may be configured to obtain coordinates of a central point in the grid region where the position coordinate pairs are respectively located, as a grid coordinate pair corresponding to the point pair information in the virtual grid.
In a specific application scenario, as shown in fig. 7, the obtaining unit 45 includes:
a first determining module 451, configured to determine, based on pre-divided grid accuracies, center point coordinate pairs of grid regions where the position coordinate pairs are respectively located, where the grid regions are mapped on different grid accuracies;
the first obtaining module 452 may be configured to map the grid region to a center point coordinate pair with different grid accuracies as a corresponding grid coordinate pair of the point pair information in the virtual grid.
In a specific application scenario, as shown in fig. 7, the local database stores grid data formed by navigation data of a history acquisition request on point-to-coordinate with preset grid precision, and the query unit 42 includes:
the assembling module 421 may be configured to assemble, according to a point pair format, point pair coordinates with different grid accuracies based on a grid coordinate pair corresponding to the point pair information in the virtual grid;
the query module 422 may be configured to query whether navigation data mapped to the point pair coordinates with different grid accuracies exists in the grid data by traversing and matching the point pair coordinates with different grid accuracies with the point pair coordinates with the preset grid accuracy corresponding to the grid data in the local database.
In a specific application scenario, as shown in fig. 7, the point-to-point coordinates and the navigation data in the grid data are stored in a key-value pair form, each point-to-point coordinate is mapped with one navigation data, and the query module 422 includes:
the setting submodule 4221 may be configured to form matching keywords from the point pair coordinates according to the grid precision from small to large, and set query conditions of different grid precisions;
the query submodule 4222 may be configured to, based on the query conditions with different grid accuracies, traverse and match a preset grid accuracy in the grid data in the local database, and query whether navigation data mapped to the coordinates in the query conditions with different grid accuracies exists in the grid data at the preset grid accuracy.
In a specific application scenario, as shown in fig. 7, the extracting unit 41 includes:
the adding module 411 may be configured to receive a list request issued by a task channel, and add the list request to a request thread pool;
the extracting module 412 may be configured to respond to the request for obtaining navigation data by analyzing the delivery data carried by the list request in the request thread pool one by one, and extract the point pair information in the delivery data.
In a specific application scenario, the local database is provided with at least one database according to a matching priority order,
the query unit 42 may be specifically configured to generate a query task of multiple point-to-point information from the point-to-point information, where the point-to-point information formed by multiple pieces of distribution data carried in the list request is recorded in the query task, and the query task records a grid coordinate pair corresponding to the point-to-point information in a virtual grid;
the querying unit 42 may be further configured to determine, according to the matching priority order set in the database, whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the at least one database based on a query task of multiple point-to-point information.
In a specific application scenario, the at least one database includes a first database and a second database, the first database is set to have a higher priority order than the second database,
the query unit 42 may be further configured to put the query tasks of the plurality of point-to-point information into a task thread pool corresponding to a first database, and traverse the query tasks of the plurality of point-to-point information to determine whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the first database;
the query unit 42 may be further configured to, if the query task exists, return a query task of the preset point pair information to the main thread to display the navigation data mapped with the grid coordinate pair;
the query unit 42 may be further specifically configured to, if the query task does not exist, adjust the query task of the preset point pair information to the task thread pool corresponding to the second database, and determine whether navigation data mapped to the grid coordinate exists in the grid data stored in the second database based on the query task of the preset point pair information.
In a specific application scenario, as shown in fig. 7, the apparatus further includes:
a sending unit 46, configured to, after querying whether there is navigation data mapped to the grid coordinate pair from the grid data stored in the local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid, if there is no navigation data, send an acquisition request of the navigation data to a server, so that the server returns the navigation data corresponding to the point pair information according to the point pair information carried by the acquisition request;
the processing unit 47 may be configured to perform grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid;
the storage unit 48 may be configured to form grid data of grid coordinate pairs corresponding to the point-to-point information in the virtual grid and navigation data corresponding to the point-to-point information, store the grid data in a local database, and display the navigation data corresponding to the point-to-point information.
In a specific application scenario, as shown in fig. 7, the processing unit 47 includes:
the mapping module 471 may be configured to map the position coordinate pairs of the point pair information to virtual grids respectively, so as to obtain grid areas where the point pair information is located in the virtual grids;
a second determining module 472, configured to determine, from the pre-divided grid precision, a preset grid precision applicable to a grid area where the point-to-point information is located in a virtual grid, based on the positioning precision allocated by the server for the navigation data;
the second obtaining module 473 may be configured to obtain the coordinates of the center point of the grid region mapped on the preset grid precision as the corresponding grid coordinate pair of the point pair information in the virtual grid.
It should be noted that other corresponding descriptions of the functional units related to the navigation data generation apparatus provided in this embodiment may refer to the corresponding descriptions in fig. 1 to fig. 3, and are not described herein again.
Based on the methods shown in fig. 1 to 3, correspondingly, the present application further provides a storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the method for generating navigation data shown in fig. 1 to 3.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1 to fig. 3 and the virtual device embodiment shown in fig. 6 to fig. 7, in order to achieve the above object, an embodiment of the present application further provides a device for generating navigation data, which may specifically be a computer, a smart phone, a tablet computer, a smart watch, or a network device, where the physical device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the method of generating navigation data as described above and illustrated in fig. 1-3.
Optionally, both the two entity devices may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
Those skilled in the art will appreciate that the physical device structure for generating navigation data provided by the present embodiment does not constitute a limitation of the physical device, and may include more or less components, or combine some components, or arrange different components.
The storage medium may further include an operating system and a network communication module. The operating system is a program for managing hardware and software resources of the actual device for store search information processing, and supports the operation of the information processing program and other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. By applying the technical scheme, compared with the prior art, the method and the device for acquiring the navigation data have the advantages that based on the grid coordinates of the point pair information corresponding to the acquisition request in the virtual grid, whether the navigation data mapped with the grid coordinates exist or not is inquired from the grid data stored in the local database, the navigation data stored through the historical acquisition request are recorded in the grid data, if the navigation data exist, the navigation data mapped with the grid coordinates are displayed, the navigation data do not need to be acquired through a third-party map service interface, the navigation data are inquired through the local data instead, network resources are saved, the inquiry speed of the navigation data is increased, and accordingly distribution efficiency is improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (22)

1. A method for generating navigation data, comprising:
responding to an acquisition request of navigation data, and extracting point pair information carried by the acquisition request;
inquiring whether navigation data mapped with the grid coordinate pair exists in grid data stored in a local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid, wherein the grid data records navigation data mapped with the grid coordinate pair stored through a historical acquisition request, the local database stores grid data formed by the navigation data of the historical acquisition request on point pair coordinates with preset grid precision, each point pair coordinate is mapped with one navigation data, the grid coordinate pairs corresponding to the point pair information in the virtual grid are different aiming at different grid precisions, the point pair information comprises coordinates of an initial position and coordinates of a final position, and the coordinates of the initial position and the coordinates of the final position correspond to grid areas in the virtual grid;
and if so, displaying the navigation data mapped with the grid coordinate pair.
2. The method according to claim 1, wherein after the retrieving, in response to the retrieving request for navigation data, point-to-point information carried by the retrieving request is extracted, the method further comprises:
determining the grid areas where the position coordinate pairs of the point pair information are respectively located by utilizing the grid areas pre-divided by the virtual grid;
and acquiring coordinates of a central point in a grid area where the position coordinate pairs are respectively positioned, and taking the coordinates as corresponding grid coordinate pairs of the point pair information in the virtual grid.
3. The method according to claim 2, wherein the obtaining coordinates of a center point in a grid region where the position coordinate pairs are respectively located, as a grid coordinate pair corresponding to the point pair information in a virtual grid, specifically includes:
determining a central point coordinate pair of grid areas where the position coordinate pairs are respectively located and mapped on different grid accuracies based on pre-divided grid accuracies;
and mapping the grid area to a center point coordinate pair with different grid precisions to serve as a grid coordinate pair corresponding to the point pair information in the virtual grid.
4. The method according to claim 1, wherein the querying whether navigation data mapped to the grid coordinate pair exists from grid data stored in a local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid specifically includes:
assembling point pair coordinates with different grid precisions according to a point pair format based on corresponding grid coordinate pairs of the point pair information in the virtual grid;
and traversing and matching the point pair coordinates with different grid accuracies with the point pair coordinates corresponding to the preset grid accuracy of the grid data in the local database, and inquiring whether navigation data mapped with the point pair coordinates with different grid accuracies exist in the grid data.
5. The method according to claim 4, wherein the point-to-point coordinates and navigation data in the grid data are stored in a key-value pair form, each point-to-point coordinate is mapped with one navigation data, and the querying whether the navigation data mapped to the point-to-point coordinates of different grid precision exists in the grid data by traversing and matching the point-to-point coordinates of different grid precision with the point-to-point coordinates of preset grid precision corresponding to the grid data in the local database specifically comprises:
forming matching keywords by the point pair coordinates according to the grid precision from small to large, and setting query conditions of different grid precisions;
and traversing and matching preset grid precision in the grid data in the local database based on the query conditions of different grid precisions, and querying whether navigation data mapped with the point-to-coordinate coordinates in the query conditions of different grid precisions exists in the grid data on the preset grid precision.
6. The method according to any one of claims 1 to 5, wherein the extracting, in response to an acquisition request for navigation data, point-to-point information carried by the acquisition request specifically includes:
receiving a list request issued by a task channel, and adding the list request to a request thread pool;
and responding to the acquisition request of the navigation data by analyzing the distribution data carried by the list requests in the request thread pool one by one and extracting the point pair information in the distribution data.
7. The method according to claim 6, wherein the local database is provided with at least one database in order of matching priority, and the querying whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the local database based on the corresponding grid coordinate pair in the virtual grid of the point pair information includes:
generating a query task of a plurality of point pair information by using the point pair information formed by carrying a plurality of distribution data in the list request, wherein the query task records a grid coordinate pair corresponding to the point pair information in a virtual grid;
and judging whether navigation data mapped with the grid coordinate pair exists in the grid data stored in the at least one database based on the query task of the point pair information according to the matching priority sequence set by the database.
8. The method according to claim 7, wherein the at least one database includes a first database and a second database, the first database is set to have a higher priority order than the second database, and the determining whether the grid data stored in the at least one database has navigation data mapped to the grid coordinate pair based on the query task of the plurality of point-to-information according to the matching priority order set by the database specifically includes:
the query tasks of the point pair information are put into a task thread pool corresponding to a first database, and the query tasks of the point pair information are traversed to judge whether navigation data mapped to the grid coordinate exists in grid data stored in the first database or not;
if the navigation data exists, returning a query task of the preset point pair information to the main thread to display the navigation data mapped with the grid coordinate pair;
if not, adjusting the query task of the preset point pair information to a task thread pool corresponding to the second database, and judging whether navigation data mapped with the grid coordinate pair exists in the grid data stored in the second database or not based on the query task of the preset point pair information.
9. The method according to any one of claims 1 to 5, wherein after the querying whether there is navigation data mapped to the grid coordinate pair from grid data stored in a local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid, the method further comprises:
if the point pair information does not exist, sending an acquisition request of the navigation data to a server so that the server returns the navigation data corresponding to the point pair information according to the point pair information carried by the acquisition request;
carrying out grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid;
and forming grid data by the grid coordinate pair corresponding to the point pair information in the virtual grid and the navigation data corresponding to the point pair information, storing the grid data into a local database, and displaying the navigation data corresponding to the point pair information.
10. The method according to claim 9, wherein the grid mapping processing is performed on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid, and specifically includes:
mapping the position coordinate pairs of the point pair information to a virtual grid respectively to obtain a grid area where the point pair information is located in the virtual grid;
determining preset grid precision applicable to a grid region where the point pair information is located in a virtual grid from pre-divided grid precision based on positioning precision distributed to the navigation data by the server;
and acquiring the coordinates of the central point of the grid area mapped on the preset grid precision as the corresponding grid coordinate pair of the point pair information in the virtual grid.
11. An apparatus for generating navigation data, comprising:
the extraction unit is used for responding to an acquisition request of navigation data and extracting point pair information carried by the acquisition request;
a query unit, configured to query, based on a grid coordinate pair corresponding to the point pair information in a virtual grid, whether navigation data mapped to the grid coordinate pair exists in grid data stored in a local database, where the grid data records navigation data mapped to the grid coordinate pair stored in a history acquisition request, the local database stores grid data formed by the navigation data of the history acquisition request on a point pair coordinate with a preset grid precision, each point pair coordinate is mapped with one navigation data, and for different grid precisions, the corresponding grid coordinate pair of the point pair information in the virtual grid is different, the point pair information includes a start position coordinate and an end position coordinate, and the start position coordinate and the end position coordinate correspond to a grid region in the virtual grid;
and the display unit is used for displaying the navigation data mapped with the grid coordinate pair if the navigation data exists.
12. The apparatus of claim 11, further comprising:
a determining unit, configured to, after extracting the point pair information carried in the request for obtaining in response to the request for obtaining navigation data, determine, by using a grid area pre-divided by the virtual grid, a grid area in which the position coordinate pairs of the point pair information are located respectively;
and the obtaining unit is used for obtaining the coordinates of the central point in the grid area where the position coordinate pairs are respectively positioned as the corresponding grid coordinate pairs of the point pair information in the virtual grid.
13. The apparatus of claim 12, wherein the obtaining unit comprises:
the first determining module is used for determining a central point coordinate pair of the grid areas where the position coordinate pairs are respectively located and mapped on different grid accuracies based on pre-divided grid accuracies;
and the first acquisition module is used for mapping the grid area to a center point coordinate pair with different grid accuracies as a grid coordinate pair corresponding to the point pair information in a virtual grid.
14. The apparatus of claim 11, wherein the query unit comprises:
the assembling module is used for assembling and forming point pair coordinates with different grid precisions according to a point pair format based on the corresponding grid coordinate pairs of the point pair information in the virtual grid;
and the query module is used for querying whether navigation data mapped with the point pair coordinates with different grid accuracies exists in the grid data by traversing and matching the point pair coordinates with different grid accuracies with the point pair coordinates corresponding to the preset grid accuracy in the grid data in the local database.
15. The apparatus of claim 14, wherein the grid data stores point-to-point coordinates and navigation data in the form of key-value pairs, each point-to-point coordinate having one navigation data mapped thereto, and wherein the query module comprises:
the setting submodule is used for forming matching keywords for the point pair coordinates according to the grid precision from small to large and setting query conditions of different grid precisions;
and the query submodule is used for traversing and matching the preset grid precision in the grid data in the local database based on the query conditions with different grid precisions, and querying whether navigation data mapped with the point-to-coordinate coordinates in the query conditions with different grid precisions exists in the grid data on the preset grid precision.
16. The apparatus according to any one of claims 11-15, wherein the extraction unit comprises:
the adding module is used for receiving a list request issued by a task channel and adding the list request to a request thread pool;
and the extraction module is used for responding to the acquisition request of the navigation data by analyzing the distribution data carried by the list requests in the request thread pool one by one and extracting the point pair information in the distribution data.
17. The apparatus of claim 16, wherein the local database is provided with at least one database in matching priority order,
the query unit is specifically configured to generate a query task of multiple point-to-point information from the point-to-point information formed by carrying multiple pieces of distribution data in the list request, where the query task records a grid coordinate pair corresponding to the point-to-point information in a virtual grid;
the query unit is specifically further configured to determine, according to the matching priority order set by the database, whether navigation data mapped to the grid coordinate pair exists in the grid data stored in the at least one database based on a query task of the plurality of point-to-point information.
18. The apparatus of claim 17, wherein the at least one database comprises a first database and a second database, wherein the first database is prioritized over the second database,
the query unit is further specifically configured to place the query tasks of the plurality of point-to-point information into a task thread pool corresponding to a first database, and traverse the query tasks of the plurality of point-to-point information to determine whether navigation data mapped to the grid coordinate pair exists in grid data stored in the first database;
the query unit is specifically configured to, if the query unit exists, return a query task of preset point pair information to a main thread to display the navigation data mapped with the grid coordinate pair;
the query unit is specifically configured to, if the query task does not exist, adjust a query task of preset point pair information to a task thread pool corresponding to the second database, and determine whether navigation data mapped to the grid coordinate exists in the grid data stored in the second database based on the query task of the preset point pair information.
19. The apparatus according to any one of claims 11-15, further comprising:
a sending unit, configured to, after querying whether there is navigation data mapped to the grid coordinate pair from grid data stored in a local database based on the grid coordinate pair corresponding to the point pair information in the virtual grid, if there is no navigation data, send an acquisition request for the navigation data to a server, so that the server returns navigation data corresponding to the point pair information according to the point pair information carried in the acquisition request;
the processing unit is used for carrying out grid mapping processing on the point pair information to obtain a grid coordinate pair corresponding to the point pair information in a virtual grid;
and the storage unit is used for forming grid data by the grid coordinate pair corresponding to the point pair information in the virtual grid and the navigation data corresponding to the point pair information, storing the grid data into a local database and displaying the navigation data corresponding to the point pair information.
20. The apparatus of claim 19, wherein the processing unit comprises:
the mapping module is used for mapping the position coordinate pairs of the point pair information to a virtual grid respectively to obtain a grid area of the point pair information in the virtual grid;
a second determining module, configured to determine, based on the positioning accuracy allocated by the server to the navigation data, a preset grid accuracy applicable to a grid area where the point-to-point information is located in a virtual grid from pre-divided grid accuracies;
and the second acquisition module is used for acquiring the center point coordinates of the grid area mapped on the preset grid precision as the corresponding grid coordinate pair of the point pair information in the virtual grid.
21. A storage medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the method of generating navigation data according to any one of claims 1 to 10.
22. A generation apparatus of navigation data, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the generation method of navigation data according to any one of claims 1 to 10 when executing the program.
CN202010523961.6A 2020-06-10 2020-06-10 Navigation data generation method, device and equipment Active CN111581324B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010523961.6A CN111581324B (en) 2020-06-10 2020-06-10 Navigation data generation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010523961.6A CN111581324B (en) 2020-06-10 2020-06-10 Navigation data generation method, device and equipment

Publications (2)

Publication Number Publication Date
CN111581324A CN111581324A (en) 2020-08-25
CN111581324B true CN111581324B (en) 2021-06-25

Family

ID=72125697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010523961.6A Active CN111581324B (en) 2020-06-10 2020-06-10 Navigation data generation method, device and equipment

Country Status (1)

Country Link
CN (1) CN111581324B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113283830B (en) * 2021-04-29 2024-04-09 北京京东振世信息技术有限公司 Method, device, equipment and computer readable medium for generating waybill information sequence
CN113779091A (en) * 2021-09-15 2021-12-10 贵阳货车帮科技有限公司 Information query method and device, electronic equipment and readable storage medium
CN113786623A (en) * 2021-09-17 2021-12-14 上海米哈游璃月科技有限公司 Navigation grid updating method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009205A (en) * 2017-11-02 2018-05-08 口碑(上海)信息技术有限公司 Location-based search result caching method, searching method, client and system
CN108731692A (en) * 2013-10-16 2018-11-02 星克跃尔株式会社 Device and method and its system for providing map datum
US10613532B2 (en) * 2015-02-10 2020-04-07 Mobileye Vision Technologies Ltd. Navigating in snow

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10430465B2 (en) * 2017-01-04 2019-10-01 International Business Machines Corporation Dynamic faceting for personalized search and discovery
DE102017208123A1 (en) * 2017-05-15 2018-11-15 Bayerische Motoren Werke Aktiengesellschaft Method, apparatus and system for determining a weather area
US11461370B2 (en) * 2018-02-14 2022-10-04 Jay Crosley Event and location tracking and management system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108731692A (en) * 2013-10-16 2018-11-02 星克跃尔株式会社 Device and method and its system for providing map datum
US10613532B2 (en) * 2015-02-10 2020-04-07 Mobileye Vision Technologies Ltd. Navigating in snow
CN108009205A (en) * 2017-11-02 2018-05-08 口碑(上海)信息技术有限公司 Location-based search result caching method, searching method, client and system

Also Published As

Publication number Publication date
CN111581324A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111581324B (en) Navigation data generation method, device and equipment
US10127736B1 (en) Method and system for performing interaction based on augmented reality
CN110726418B (en) Method, device and equipment for determining interest point region and storage medium
CN110035180B (en) Card display method, device, terminal and storage medium
JP2016152044A (en) Method and device for determining target position
CN109753603B (en) Product recommendation information display method and device, computer equipment and storage medium
US8996551B2 (en) Managing geographic region information
CN109002452B (en) Map tile updating method and device and computer readable storage medium
JP7214803B2 (en) Building positioning method, device, electronic device, storage medium, program, and terminal device
CN107430631A (en) From position, report determines semantic place name
EP3138018A1 (en) Identifying entities to be investigated using storefront recognition
US20180035367A1 (en) Method and Apparatus for Accessing Wifi Access Point in Target Shop
CN111135558A (en) Game synchronization method, game client, computer storage medium and electronic device
CN105354326B (en) Spatial position indexing method and system
CN110992501A (en) Data monitoring method, device, equipment and computer readable storage medium
CN113763514B (en) Method, device and system for generating stroke order animation and electronic equipment
CN111292148A (en) Order information processing method, device, server, terminal and storage medium
US10909769B1 (en) Mixed reality based 3D sketching device and method
CN112734254A (en) Risk early warning method and device for transformer substation construction and computer equipment
CN111274272B (en) Object searching method and device and computer system
CN112539752A (en) Indoor positioning method and indoor positioning device
CN105159529A (en) Map processing method and device thereof
CN110928895A (en) Data query method, data table establishing method, device and equipment
CN113536153A (en) Interest point acquisition method and device, electronic equipment and storage medium
JP2003114613A (en) Map data dividing method, car navigation system, and car navigation device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant