WO2021036464A1 - 地图数据查询方法、装置、计算机设备及存储介质 - Google Patents

地图数据查询方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021036464A1
WO2021036464A1 PCT/CN2020/098573 CN2020098573W WO2021036464A1 WO 2021036464 A1 WO2021036464 A1 WO 2021036464A1 CN 2020098573 W CN2020098573 W CN 2020098573W WO 2021036464 A1 WO2021036464 A1 WO 2021036464A1
Authority
WO
WIPO (PCT)
Prior art keywords
map data
map
toolkit
query
application layer
Prior art date
Application number
PCT/CN2020/098573
Other languages
English (en)
French (fr)
Inventor
江旻
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to EP20857838.5A priority Critical patent/EP3926489A4/en
Publication of WO2021036464A1 publication Critical patent/WO2021036464A1/zh
Priority to US17/516,498 priority patent/US20220049962A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3885Transmission of map data to client devices; Reception of map data by client devices
    • G01C21/3896Transmission of map data from central databases
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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

Definitions

  • This application relates to the field of computer technology, and more to the field of map technology, in particular to a map data query method, device, computer equipment and storage medium.
  • the full amount of map data needs to be stored in the vehicle terminal.
  • the full amount of map data needs to be preloaded, and then the corresponding map data can be queried from it.
  • the traditional method needs to consume too much system memory resources.
  • a method, device, computer equipment, and storage medium for querying map data are provided.
  • a method for querying map data is provided, which is executed by a computer device, and the method includes:
  • the map data targeted by the query is queried locally through the spatial index.
  • a map data query device which is set in a computer device, and the device includes:
  • the acquisition module is used to acquire the current position of the vehicle
  • the query module is used to query the map data targeted by the query locally through the spatial index when the query request sent by the application layer is obtained.
  • a computer device including a memory and one or more processors, and computer-readable instructions are stored in the memory.
  • the computer-readable instructions are executed by one or more processors, one Or multiple processors execute the steps in the map data query method of each embodiment of the present application.
  • one or more computer-readable storage media are provided, and computer-readable instructions are stored on the computer-readable storage media.
  • the computer-readable instructions are executed by one or more processors, one or more Multiple processors execute the steps in the map data query method of each embodiment of the present application.
  • Fig. 1 is an application scenario diagram of a map data query method in an embodiment
  • Fig. 2 is a schematic flowchart of a map data query method in an embodiment
  • Figure 3 is a schematic diagram of high-precision map data in an embodiment
  • Figure 4 is a schematic diagram of lane-level positioning in an embodiment
  • Fig. 5 is an architecture diagram of a map data engine in an embodiment
  • FIG. 7 is a schematic diagram of the process of requesting and issuing map data in an embodiment
  • FIG. 8 is an architecture diagram of inter-process communication in an embodiment
  • Figure 10 is a schematic diagram of coordinate system conversion in an embodiment
  • Figure 12 is a block diagram of a map data query device in an embodiment
  • Figure 13 is a block diagram of a map data query device in another embodiment.
  • Figure 14 is a block diagram of a computer device in one embodiment.
  • the vehicle-end device 110 may obtain the current position of the vehicle, and request the cloud database 120 for map data matching the current position.
  • the vehicle terminal device 110 may locally cache the requested map data, and construct a spatial index of the map data locally according to the road elements in the map data.
  • the vehicle-end device 110 can query the map data targeted by the query locally through the spatial index.
  • the application layer includes applications in the vehicle-end device 110 for implementing vehicle driving functions.
  • Fig. 2 is a schematic flowchart of a map data query method in an embodiment.
  • the map data query method in this embodiment can be applied to computer equipment.
  • the computer equipment is mainly used as the vehicle-end equipment 110 in FIG. 1 for illustration.
  • the method specifically includes the following steps:
  • the vehicle-end device may also obtain the current position of the vehicle from a special positioning device.
  • a special positioning device is a device specially used for positioning. It can be understood that there is no restriction on how the vehicle-end device obtains the current position of the vehicle.
  • a map data engine is provided in the vehicle terminal device.
  • the vehicle-end device can obtain the current location of the vehicle located at the application layer through the map data engine. It can be understood that the vehicle-end device can directly obtain the current position of the vehicle from the application layer through the map data engine.
  • the vehicle-end equipment can also obtain the current position of the vehicle indirectly from the application layer.
  • the application layer can transmit the current position of the positioning to the corresponding map toolkit, and the map toolkit transmits the current position to the map data engine.
  • the map data Engine is the core component of the development program or system.
  • the map data engine is the core component of the map data query system.
  • the map data query system is a system that provides map data query services, that is, a system that implements the map data query method in each embodiment of the present application.
  • the map data engine may be a high-precision map data engine.
  • high-precision map data that is, high-precision map data
  • high-precision map data is used to achieve lane-level positioning. It is understandable that compared with traditional road network maps, high-precision map data increases the geometric description of each lane line in the road, and increases the accuracy and refinement of all road elements such as curbs, guardrails, traffic lights, and signs. The geometric information description can realize lane-level positioning.
  • Fig. 3 is a schematic diagram of high-precision map data in an embodiment. You can see a wealth of road elements such as lane lines and zebra crossings. Lane-level positioning can be achieved through high-precision map data.
  • Fig. 4 is a schematic diagram of lane-level positioning in an embodiment. The number in Figure 4 is the lane information for positioning guidance.
  • the vehicle-end device may also update the driving trajectory of the vehicle according to the current position.
  • the cloud database is a database set in the cloud.
  • the map data matching the current location refers to the map data that meets the driving demand of the vehicle at the current location. That is, the map data matching the current location can provide sufficient map data for the vehicle traveling at the current location to ensure the normal driving of the vehicle.
  • the full amount of map data is stored in the cloud database.
  • the full amount of map data is all map data.
  • the car-end device can request map data matching the current location from the cloud database. After receiving the request, the cloud database can filter the map data that matches the current location from the full amount of stored map data, and return the screened map data to the car-end device. It can be understood that the map data matching the current location is partial map data, rather than full map data.
  • local refers to the local of the car-end equipment.
  • the requested map data is high-precision map data, which can be used to implement lane-level positioning. That is, the road elements included in the acquired map data can be used to realize lane-level positioning.
  • Road elements refer to information elements that can reflect the characteristics of roads.
  • Road characteristics may include the morphological characteristics of the road itself, the road traffic markings located in the road (that is, on the road surface), and the traffic environment characteristics of the road.
  • the morphological characteristics of the road include one or a combination of information such as the profile, width, and direction of the road.
  • the traffic environment characteristics of the road refer to the traffic-related information on the road.
  • the traffic environment characteristics of the road include at least one of curbs, guardrails, signs and traffic lights.
  • the vehicle-end device can abstractly represent the road elements in the map data, and record the connection relationship between the lane lines through the topological relationship.
  • the vehicle-end device can cache the abstractly represented road elements and the recorded topological relationship to the local to realize the cache of the requested map data. It can be understood that abstract representation refers to the road elements in the real environment.
  • the road elements in the map data can be abstractly represented as point objects, linear objects, and area objects.
  • traffic lights are point objects
  • lane lines and guardrails are linear objects
  • zebra crossings and traffic areas are area objects.
  • the vehicle terminal device may locally cache the requested map data through the map data engine.
  • the vehicle-end device may also locally cache the requested map data through a map toolkit set corresponding to each application in the application layer. There is no limitation on this, as long as it can satisfy the requested map data in the local cache.
  • the requested map data when the requested map data is cached locally, since the map data obtained from the cloud may be different from the local data storage format, in this case, the requested map data can be changed according to the local data storage format. Perform format conversion and cache the map data after format conversion locally.
  • the vehicle-end device uses a hash mapping method to locally cache the requested map data.
  • S208 Construct a spatial index of the map data locally according to the road elements in the map data.
  • the spatial index provides an index relationship for querying map data.
  • the vehicle-end device can locally construct a unique spatial index of the map data according to the road elements in the map data.
  • Vehicle-end equipment can also set up different forms of spatial indexes for different types of query requirements at the application layer.
  • the form of the spatial index can be a grid index or a tree index.
  • the map data engine may include a data index layer.
  • the data index layer is used to generate the spatial index of the map data.
  • Vehicle-end equipment can build a spatial index of map data locally through the data index layer of the map data engine.
  • the applications included in the application layer are used to implement the function of vehicle driving. It can be understood that the applications included in the application layer are also set in the car-end equipment.
  • the application layer may be an autonomous driving application layer.
  • the autopilot application layer includes autopilot applications, which are used to realize vehicle autopilot functions. That is, the map data query method in each embodiment of the present application can be applied to an automatic driving scenario to provide prepared and timely map data for automatic driving.
  • the application layer may need to query map data during the driving process of the vehicle.
  • the vehicle-end device can query the local cache from the local cache for the query request sent by the application layer. Map data.
  • the vehicle-end device may query the map data targeted by the query request locally based on the established spatial index through the map data engine.
  • the car-end device can also determine the map toolkit corresponding to the application that initiated the query request in the application layer, and query the target of the query request locally through the map toolkit according to the established spatial index Map data.
  • Fig. 5 is an architecture diagram of a map data engine in an embodiment.
  • the map data engine may include a data model layer, a data index layer, a local cache layer, a message communication layer, an abstract interface layer, and a business logic layer.
  • the map data engine can abstract the map elements in the requested map data through the data model layer, and abstract them into point objects, linear objects and area objects, and record the traffic state between roads through topological relationships.
  • the map data engine can establish a spatial index through the data index layer and record the association relationship between road elements.
  • the map data engine can realize the caching of map data in the local cache layer at the data model layer and the data index layer. In the local cache layer, efficient storage of cached map data can be realized through hash mapping.
  • the message communication layer includes inter-process communication and cloud communication.
  • Inter-process communication includes the encapsulated communication interface and communication protocol with the map toolkit (ie, map SDK).
  • Cloud communication includes the encapsulated common interface with the cloud database.
  • the abstract interface layer mainly encapsulates the access interface and message sending and receiving interface of the map data engine to the local data.
  • the business logic layer implements corresponding business functions through various interfaces provided by the abstract interface layer. For example, related functions such as trajectory tracking, path planning, data broadcasting and map update. It can be understood that trajectory tracking means that the map data engine can update the driving trajectory of the vehicle according to the current position of the vehicle.
  • Path planning means that the map data engine can receive path planning requests and perform path planning processing.
  • Data dissemination means that the map data engine can distribute map data to the map toolkit.
  • Map update means that the high-precision map data engine can receive the abnormal map data returned by the application layer and feed it back to the cloud database to update the map data.
  • the above map data query method requests the cloud database for map data matching the current position of the vehicle, caches the requested map data locally; and builds a spatial index of the map data locally based on the road elements in the map data. It is equivalent to realizing the dynamic caching of map data locally through the current location, instead of storing the full amount of map data in a fixed manner.
  • the map data targeted by the query is queried locally through the spatial index. Since the locally cached map data matches the current location, the locally cached map data can meet the query requirements in the current driving process of the vehicle. Therefore, local dynamic caching of map data based on the current location can save the storage resources of the system compared to the traditional storage of full map data on the premise that the current driving needs of the vehicle can be met.
  • map data query processing is independent of the application layer of the vehicle driving, reducing coupling.
  • step S204 includes: obtaining pre-planned path planning information; determining from the path planning information, the path information to be traveled within a preset range from the current position; requesting information from the cloud database that matches the path information to be traveled Map data.
  • the path planning information is pre-planned vehicle travel path information.
  • the route planning information is a vehicle travel route planned according to preset interest route points.
  • the point of interest route is the point that the vehicle needs to pass through during driving.
  • the planning step of path planning information includes: obtaining the path planning request sent by the application layer; sending the path of interest points carried in the path planning request to the cloud database; locally caching the path of interest points returned by the cloud database. Path planning information; return path planning information to the application layer.
  • the user can input the path points of interest to the application layer, and the application layer may generate a path planning request, and the path planning request carries the path points of interest.
  • the vehicle-end device can obtain the route planning request through the map data engine, and send the path points of interest carried in the route planning request to the cloud database.
  • the cloud database can formulate path planning information according to the path of interest.
  • the path planning information includes points of interest.
  • the cloud database can return the formulated path planning information to the map data engine in the car-end device, and the map data engine returns the path planning information to the application layer.
  • the map data engine can directly obtain the path planning request sent by the application layer.
  • the map data engine can also obtain the path planning request via the forwarding of the map toolkit corresponding to each application in the application layer. That is, the application that generates the path planning request in the application layer can send the path planning request to the map toolkit set for the application, and the map toolkit forwards the path planning request to the map data engine, and the map data engine can plan the path
  • the request carries the points of interest and is sent to the cloud database to request the cloud database to formulate path planning information.
  • the vehicle-end device can send the route planning information returned by the cloud database to the application layer through the map data engine.
  • the high-precision map data engine can directly deliver route planning information to the application layer.
  • the high-precision map data engine can also deliver the path planning information of the map data engine to the map toolkit, and return the path planning information to the application that initiated the path planning request in the application layer through the map toolkit.
  • the vehicle-end device may request the cloud database for map data corresponding to an area within a preset range from the current location. It can be understood that the map data corresponding to the area within the preset range from the current position is equivalent to road information around the vehicle.
  • the vehicle-end device can determine the route information to be traveled within a preset range before the current position from the route planning information. That is, the traffic path information within a preset range in front of the vehicle is determined. It can be understood that the path information to be traveled is used to indicate the path information that needs to be traveled within a preset range in front of the vehicle. After determining the route information to be traveled, the car-end device needs to query the cloud database for map data that matches the route information to be traveled.
  • the information of the to-be-traveled path is determined according to the path planning information and the current location, and the map data that matches the to-be-traveled path is loaded, so that the map data can be loaded more specifically and accurately.
  • map data requested from the cloud database is map data matching the route information to be passed
  • map data that matches the route information to be passed is issued to the map toolkit (that is, the front Road information of the route to be passed).
  • map data requested from the cloud database is the map data determined directly based on the current position
  • map data directly determined based on the current position that is, the road information around the vehicle
  • the method further includes: comparing the map data cached this time with the map data cached last time; when there is a difference between the map data cached this time and the map data cached last time, Then execute the step of sending the cached map data this time to the map toolkit for caching.
  • each map toolkit receives a query request sent by a corresponding application, it queries the map data targeted by the query request from the map data cached by the map toolkit.
  • each application can query map data from the corresponding map toolkit instead of querying the map data engine uniformly, thereby improving query efficiency.
  • Fig. 7 is a schematic diagram of the flow of requesting and issuing map data in an embodiment. Referring to FIG. 7, the process is mainly described by taking a map data engine applied to a car-end device of an autonomous vehicle as an example.
  • the self-driving vehicle in Figure 7 is the abbreviation for "autonomous driving vehicle".
  • the map data engine belongs to the core component of the map data query system.
  • the map data query system is used to implement the map data query method in each embodiment of the present application.
  • the operating frame rate of the entire map data query system is 10fps.
  • Fig. 8 is an architecture diagram of inter-process communication in an embodiment.
  • the inter-process communication layer provides two forms of communication: a form of shared memory, semaphores, and message queues, which is mainly used in a stand-alone autonomous driving system (referring to a single vehicle-end device to meet the needs of vehicle driving ) To ensure that the communication efficiency is high enough; the other form of sockets is mainly used for automatic driving systems running on multiple machines (referring to the need for multiple vehicle-end devices to cooperate to meet the driving needs of vehicles) to ensure that it can cross machines Communication.
  • the map toolkit and the map data engine communicate through the inter-process communication layer.
  • the original map data uses longitude and latitude coordinates (such as WGS84 coordinates) in the storage process, and this coordinate system may not be suitable for direct use by some applications of the application layer.
  • the coordinate system used by the application refers to the coordinate system where the data that can be directly used by the application in the application layer is located.
  • the coordinate system used by different applications in the application layer may be different, and the coordinate system used by some applications may be the same as the coordinate system corresponding to the map data, so there is no need to perform coordinate system conversion.
  • map data in different coordinate systems can be cached locally for different applications, thereby improving the efficiency of applications accessing map data.
  • using the map toolkit to convert the coordinates of the map data to the coordinates in the coordinate system used by the application includes: converting the longitude and latitude coordinates of the points constituting the road elements in the map data into coordinates at the center of the station The coordinates under the system; the station center coordinate system is a spatial rectangular coordinate system with the current position as the origin; for each road element, select the center point from the points constituting the road element; determine the non-center point to the center point of the road element Offset: Determine the coordinates of each non-center point according to the coordinates of the center point in the station center coordinate system and the offset corresponding to each non-center point.
  • the vehicle-end device can select the center point from the points that constitute the road element through the map toolkit.
  • the points other than the central point in the road feature are non-central points.
  • the vehicle-end equipment can determine the offset from each non-center point to the center point of the road elements through the map toolkit.
  • the vehicle-end equipment can determine the coordinates of each non-center point according to the coordinates of the center point in the station center coordinate system and the offset corresponding to each non-center point. That is, the coordinates of the non-center point are expressed by the coordinates of the center point in the station center coordinate system and the offset amount.
  • Fig. 10 is a schematic diagram of coordinate system conversion in an embodiment.
  • the coordinates of each point in the road element of the original map data obtained from the cloud database are the latitude and longitude coordinates, and the longitude and latitude coordinates of each point are converted into the form of a combination of the center point and the offset.
  • the offset is also fixed. Therefore, when changing the station center coordinate system, by only updating the coordinates of the conversion center point in the new station center coordinate system, the coordinates of the non-center point can be passed through the center point coordinates in the new station center coordinate system. And the offset. That is, the coordinates of the non-center point can be expressed quickly and accurately, which saves the amount of calculation.
  • the coordinates of each point after the conversion conform to the Cartesian coordinate system and belong to the spatial rectangular coordinates, which can be used directly by applications in the application layer, which improves the use efficiency of map data.
  • step S208 includes: separately constructing a grid index and/or a tree index locally according to the road elements in the map data.
  • step S208 includes: building a tree index locally based on the road elements in the map data.
  • Step S210 includes: when the element query request sent by the application layer is obtained, the map element information for which the request is targeted is queried from the local query object through the tree index.
  • the vehicle terminal device can query the map element information targeted by the request from the local query object according to the tree index through the map data engine.
  • the map data engine delivers the map data to the map toolkit for caching
  • the car-end device can use the map toolkit corresponding to the application that initiated the location query request to retrieve the data from the map according to the tree index.
  • Local query object The map element information targeted by the query request.
  • the virtual map data refers to the map data obtained by modifying the requested map data according to the environmental perception data.
  • multiple frames means at least two frames.
  • the environment-aware application senses that there are abnormal map data in multiple frames, it is possible that the environment-aware application itself has a problem. You can virtualize the abnormal map data into virtual map data that matches the environment-aware data and send it to the application layer. The environment-aware application detects whether it is a problem with the environment-aware application itself.
  • Figure 11 is a schematic diagram of a map data update process in an embodiment.
  • the positioning application in the application layer receives environment-aware data and matches it with the map data.
  • the sensing result and coordinate position of the abnormal map data are returned to the map data engine.
  • the frame operation ends.
  • the map data engine can record the perception result.
  • virtual map data is generated and sent to the map toolkit, and the map toolkit provides the application layer to detect whether there is an abnormality.
  • the abnormal feedback When the abnormal feedback is stopped, it means that there is no abnormality in the virtual map data detection, indicating that there is no abnormality in the application layer, and the perception results of the abnormal map data detected by the application layer are uploaded to the cloud database.
  • the cloud database can update the abnormal map data to realize the update of the map data.
  • the load cache module 1204 is used to request map data matching the current location from the cloud database; cache the requested map data locally; build a spatial index of the map data locally according to the road elements in the map data.
  • the path planning module 1201 is used to obtain the path planning request sent by the application layer; send the path of interest points carried in the path planning request to the cloud database; locally cache the path planning information for the path points of interest returned by the cloud database; to the application layer Return path planning information.
  • the load cache module 1204 is also used to obtain the reference driving position matched with the map data cached last time; to determine the difference between the current position and the reference driving position; when the difference is greater than the preset difference threshold, then Request map data matching the current location from the cloud database.
  • the loading and caching module 1204 is also used to construct a grid index and/or a tree index locally according to the road elements in the map data; the query module 1206 is also used to obtain a positioning query request sent by the application layer At the time, the grid index is used to query the location coordinates targeted by the query request from the local; and/or when the feature query request sent by the application layer is obtained, the tree index is used to query the target location from the local query object.
  • the map feature information is also used to construct a grid index and/or a tree index locally according to the road elements in the map data; the query module 1206 is also used to obtain a positioning query request sent by the application layer At the time, the grid index is used to query the location coordinates targeted by the query request from the local; and/or when the feature query request sent by the application layer is obtained, the tree index is used to query the target location from the local query object.
  • the map feature information is also used to construct a grid index and/or a tree index locally according to the road elements in the map data; the
  • the abnormal feedback module 1208 is used to record abnormal map data in the map data that does not match the environment perception data; the environment perception data is the data obtained by the application layer perceiving the real environment; the abnormal map data is virtualized into the environment perception Data matching virtual map data; sending the virtual map data to the application layer; when the application layer detects that there is no abnormality in the virtual map data, it uploads the abnormal map data to the cloud database.
  • Each module in the above-mentioned map data query device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device including a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the processor executes the steps of the map data query method described above.
  • the steps of the map data query method may be the steps in the map data query method of each of the foregoing embodiments.
  • one or more computer-readable storage media are provided, and computer-readable instructions are stored.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute the above-mentioned map data.
  • the steps of the query method may be the steps in the map data query method of each of the foregoing embodiments.
  • steps in the embodiments of the present application are not necessarily executed in sequence in the order indicated by the step numbers. Unless there is a clear description in this article, there is no strict order for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Automation & Control Theory (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Navigation (AREA)
  • Instructional Devices (AREA)

Abstract

一种地图数据查询方法,包括:获取车辆的当前位置;向云端数据库请求与所述当前位置匹配的地图数据;在本地缓存所请求到的所述地图数据;根据所述地图数据中的道路要素,在本地构建所述地图数据的空间索引;当获取到应用层发送的查询请求时,通过所述空间索引,从所述本地查询所述查询请求所针对的地图数据。

Description

地图数据查询方法、装置、计算机设备及存储介质
本申请要求于2019年08月30日提交中国专利局,申请号为201910819012X,申请名称为“地图数据查询方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域、更涉及地图技术领域,特别是涉及一种地图数据查询方法、装置、计算机设备及存储介质。
背景技术
随着科学技术的飞速发展,各种技术层出不穷,地图技术的应用越来越广泛。比如,在车辆行驶过程中,需要查询和使用地图数据,以便能够为车辆的行驶提供准确的信息。
传统方法中,需要将全量的地图数据存储在车辆终端中,在车辆行驶过程中,需要对全量的地图数据进行预加载,然后再从中查询相应的地图数据。显然,传统方法需要对***内存资源消耗过大。
发明内容
根据本申请提供的各种实施例,提供一种地图数据查询方法、装置、计算机设备及存储介质。
根据本申请的一个方面,提供了一种地图数据查询方法,由计算机设备执行,方法包括:
获取车辆的当前位置;
向云端数据库请求与当前位置匹配的地图数据;
在本地缓存所请求到的地图数据;
根据地图数据中的道路要素,在本地构建地图数据的空间索引;及
当获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据。
根据本申请的另一个方面,提供了一种地图数据查询装置,设置于计算机设备中,装置包括:
获取模块,用于获取车辆的当前位置;
加载缓存模块,用于向云端数据库请求与当前位置匹配的地图数据;在本地缓存所请求到的地图数据;根据地图数据中的道路要素,在本地构建地图数据的空间索引;及
查询模块,用于当获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据。
根据本申请的又一个方面,提供了一种计算机设备,包括存储器和一个或多个处理器,存储器中存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行本申请各实施例的地图数据查询方法中的步骤。
根据本申请的又一个方面,提供了一个或多个计算机可读存储介质,计算机可读存储介质上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行本申请各实施例的地图数据查询方法中的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。基于本申请的说明书、附图以及权利要求书,本申请的其它特征、目的和优点将变得更加明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中地图数据查询方法的应用场景图;
图2为一个实施例中地图数据查询方法的流程示意图;
图3为一个实施例中高精地图数据的示意图;
图4为一个实施例中车道级定位的示意图;
图5为一个实施例中地图数据引擎的架构图;
图6为一个实施例中地图数据查询方法的数据流图;
图7为一个实施例中地图数据请求和下发的流程简示图;
图8为一个实施例中进程间通信的架构图;
图9为一个实施例中地图数据查询的时序图;
图10为一个实施例中坐标系转换的示意图;
图11为一个实施例中地图数据更新流程示意图;
图12为一个实施例中地图数据查询装置的框图
图13为另一个实施例中地图数据查询装置的框图;及
图14为一个实施例中计算机设备的框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中地图数据查询方法的应用场景图。参照图1,该应用场景中包括通过网络连接的车端设备110和云端数据库120。其中,车端设备110,是放置于车辆端的、为车辆行驶提供服务的设备。可以理解,车端设备110可以是固设于车辆之中的设备,比如,车载设备。车端设备110也可以是在车辆行驶时放置于车辆上的移动终端。移动终端可以包括手机、平板电脑、笔记本电脑、个人数字助理和穿戴式设备等中的至少一种。云端数据库120可以用独立的计算机或者是多个物理计算机组成的计算机集群来实现。
车端设备110可以获取车辆的当前位置,向云端数据库120请求与当前位置匹配的地图数据。车端设备110可以在本地缓存所请求到的地图数据,根据地图数据中的道路要素,在本地构建地图数据的空间索引。当获取到应用层发送的查询请求时,车端设备110可以通过空间索引,从本地查询查询请求所针对的地图数据。其中,应用层,包括车端设备110中的用于实现车辆行驶功能的应用。
图2为一个实施例中地图数据查询方法的流程示意图。本实施例中的该地图数据查询方法可以应用于计算机设备,现主要以计算机设备为图1中的车端设备110进行举例说明。参照图2,该方法具体包括如下步骤:
S202,获取车辆的当前位置。
其中,当前位置,是车辆当前所处的位置。
在一个实施例中,车端设备可以从应用层获取定位得到的车辆的当前位置。具体地,车端设备的应用层具备定位功能,应用层通过定位获取车辆的当前位置。
在其他实施例中,车端设备也可以从专门的定位设备中获取车辆的当前位置。专门的定位设备,是专门用于定位的设备。可以理解,对车端设备如何获取车辆的当前位置不做限定。
在一个实施例中,车端设备中设置有地图数据引擎。车端设备可以通过地图数据引擎获取应用层定位的车辆的当前位置。可以理解,车端设备可以通过地图数据引擎直接从应用层获取车辆的当前位置。
车端设备也可以间接地从应用层获取车辆的当前位置。比如,应用层可以将定位的当前位置传送给对应的地图工具包,由地图工具包将当前位置传送至地图数据引擎。
引擎(Engine)是开发程序或***的核心组件。地图数据引擎,是地图数据查询***的核心组件。地图数据查询***,是提供地图数据查询服务的***,即指实现本申请各实施例中地图数据查询方法的***。
在一个实施例中,地图数据引擎可以是高精地图数据引擎。
其中,高精地图数据,即,高精度地图数据,用于实现车道级别的定位。可以理解,高精度地图数据相对于传统路网地图而言,增加了道路中每一根车道线的几何描述,增加了路牙、护栏、交通灯、标志牌等全部道路要素的精确、细化的几何信息描述,从而能够实现车道级别的定位。
图3为一个实施例中高精地图数据的示意图。从中可以看到车道线和斑马线等丰富的道路要素。通过高精度地图数据可以实现车道级定位。图4为一个实施例中车道级定位的示意图。图4中的数字即为定位引导的车道信息。
地图工具包,即指地图SDK(Software Development Kit,软件开发工具包),用于接收地图数据引擎下发的地图数据,并向上层的应用层提供查询和数据回传等服务。
在一个实施例中,在获取车辆的当前位置之后,车端设备还可以根据当前位置更新车辆的行驶轨迹。
S204,向云端数据库请求与当前位置匹配的地图数据。
其中,云端数据库,是设置于云端的数据库。
与当前位置匹配的地图数据,是指满足车辆在当前位置的行驶需求的地图数据。即,与当前位置匹配的地图数据,能够为行驶在当前位置上的车辆提供足够的地图数据、以保证车辆的正常行驶。
可以理解,云端数据库中存储了全量的地图数据。全量的地图数据,即全部的地图数据。车端设备可以向云端数据库中请求与当前位置匹配的地图数据。云端数据库在接收到该请求后,可以从存储的全量地图数据中,筛选与该当前位置匹配的地图数据,并将该筛查的地图数据返回至车端设备。可以理解,与当前位置匹配的地图数据,是局部的地图数据,而非全量的地图数据。
需要说明的是,车端设备可以直接根据当前位置,向云端数据库请求所匹配的地图数据。车端设备也可以将当前位置结合其他信息(比如,路径规 划信息),向云端数据库请求与该当前位置匹配的地图数据。对此不做限定。
在一个实施例中,车端设备可以通过地图数据引擎,向云端数据库请求与当前位置匹配的地图数据。
S206,在本地缓存所请求到的地图数据。
其中,本地,是指车端设备的本地。
在一个实施例中,所请求到的地图数据是高精度地图数据,能够用于实现车道级定位。即,获取的地图数据中包括的道路要素,能够用于实现车道级定位。
道路要素,是指能够体现道路特征的信息要素。道路特征可以包括道路自身的形态特征、位于道路中(即道路路面上)的道路交通标线和道路的交通环境特征。
道路的形态特征,包括道路的廓形、宽度和走向等信息中的一种或几种的组合。道路的交通环境特征,是指道路上的与交通相关的信息。道路的交通环境特征,包括路牙、护栏、标志牌和交通灯等至少一种。
道路交通标线,指在道路的路面上用线条、箭头、文字、立面标记、突起路标和轮廓标等向交通参与者传递引导、限制和警告等交通信息的标识。道路交通标线,包括车道信息、以及地面上的箭头和文字等地面图文标记等。车道信息包括车道数量、车道宽度、车道线的几何形状和车道线属性信息等中一种或几种的组合。其中,车道线属性信息包括车道线为实线或虚线、车道线颜色和车道线粗细等。
在其他实施例中,所请求到的地图数据,也可以是传统路网地图,即,不能实现车道级定位的非高精度的地图数据。对此不做限定。
具体地,车端设备可以对地图数据中的道路要素进行抽象化表示,通过拓扑关系记录车道线之间的连接关系。车端设备可以将抽象化表示后的道路要素,以及记录的拓扑关系缓存至本地,以实现对所请求的地图数据的缓存。可以理解,抽象化表示,是指表示真实环境中的道路要素。
可以理解,车道线之间的连接关系,能够用于表征道路间通行状态。
在一个实施例中,可以将地图数据中的道路要素抽象化表示为点状对象、线状对象和面状对象。比如,交通灯即为点状对象,车道线和护栏等即为线状对象,斑马线和通行区域等即为面状对象。
在一个实施例中,车端设备可以通过地图数据引擎在本地缓存该所请求到的地图数据。
在一个实施例中,地图数据引擎中可以包括数据模型层。其中,数据模型层,用于对道路要素进行抽象化表示。车端设备可以通过地图数据引擎的数据模型层,将地图数据中的道路要素进行抽象化表示。
在另一个实施例中,车端设备也可以通过对应于应用层中各应用设置的地图工具包,在本地缓存该请求到的地图数据。对此不做限定,只要能够满足在本地缓存所请求到的地图数据即可。
可以理解,在本地缓存所请求到的地图数据时,由于从云端获取的地图数据与本地的数据存储格式可能不同,这种情况下,可以按照本地的数据存储格式,对所请求到的地图数据进行格式转换,将格式转换后的地图数据在本地进行缓存。
可以理解,车端设备是采用哈希映射的方式,在本地缓存所请求到的地图数据。
S208,根据地图数据中的道路要素,在本地构建地图数据的空间索引。
其中,空间索引,为查询地图数据提供索引关系。
可以理解,车端设备可以根据地图数据中的道路要素,在本地构建地图数据的唯一的空间索引。车端设备也可以针对应用层的不同类型的查询需求,设置不同形式的空间索引。空间索引的形式可以是格网索引或树形索引。
在一个实施例中,车端设备还可以建立各道路要素之间的关联索引。关联索引,用于表示各道路要素之间的关联关系。比如,记录与当前车道相关的红绿灯数据,其中,车道与红绿灯属于不同的道路要素,该记录则用于表示车道与红绿灯之间的关联关系。在一个实施例中,关联索引可以通过哈希表的形式进行实现,即,将具有关联关系的道路要素记录在哈希表中。
在一个实施例中,车端设备可以通过地图数据引擎,根据地图数据中的道路要素,在本地构建地图数据的空间索引。
在一个实施例中,地图数据引擎中可以包括数据索引层。其中,数据索引层,用于生成地图数据的空间索引。车端设备可以通过地图数据引擎的数据索引层,在本地构建地图数据的空间索引。
S210,当获取到应用层发送的查询请求时,通过空间索引,从本地查询该查询请求所针对的地图数据。
其中,应用层中包括的应用,用于实现车辆行驶的功能。可以理解,应用层中包括的应用也设置于车端设备中。
在一个实施例中,应用层可以是自动驾驶应用层。自动驾驶应用层中包 括自动驾驶应用,用于实现车辆自动驾驶功能。即,本申请各实施例中的地图数据查询方法可以应用于自动驾驶场景,以为自动驾驶提供准备的、及时地地图数据。
具体地,应用层在车辆行驶过程中可能需要查询地图数据,当获取到应用层发送的查询请求时,车端设备可以通过在本地构建的空间索引,从本地的缓存中查询该查询请求所针对的地图数据。
可以理解,当车端设备在本地构建了不同形式的空间索引时,车端设备可以分析应用层发送的查询请求的类型,通过与该类型对应的空间索引,从本地查询该查询请求所针对的地图数据。这样一来,可以提高查询效率。
在一个实施例中,车端设备可以通过地图数据引擎,根据建立的空间索引,从本地查询该查询请求所针对的地图数据。
在另一个实施例中,车端设备也可以确定与应用层中发起查询请求的应用所对应设置的地图工具包,通过该地图工具包,根据建立的空间索引,从本地查询该查询请求所针对的地图数据。
图5为一个实施例中地图数据引擎的架构图。参照图5,地图数据引擎可以包括数据模型层、数据索引层、本地缓存层、消息通信层、抽象接口层和业务逻辑层。其中,地图数据引擎可以通过数据模型层对请求到的地图数据中的地图要素进行抽象化表示,以抽象为点状对象、线状对象和面状对象,并通过拓扑关系记录道路间通行状态。地图数据引擎可以通过数据索引层建立空间索引,并记录道路要素之间的关联关系。地图数据引擎可以数据模型层和数据索引层来实现地图数据在本地缓存层中的缓存。在本地缓存层中,可以通过哈希映射的方式来实现缓存的地图数据的高效存储,在查询地图数据时,也可以快速查询到地图数据。消息通信层中包括进程间通信和云端通信。进程间通信,包括封装的与地图工具包(即,地图SDK)之间的通信接口和通信协议。云端通信包括封装的与云端数据库之间的通行接口。抽象接口层,主要是封装了地图数据引擎对本地数据的访问接口和消息收发接口。业务逻辑层,则是通过抽象接口层提供的各项接口,实现相应业务功能。比如,轨迹跟踪、路径规划、数据播发和地图更新等相关功能。可以理解,轨迹跟踪,即指地图数据引擎可以根据车辆的当前位置,更新车辆的行驶轨迹。路径规划,即指地图数据引擎可以接收路径规划请求,进行路径规划处理。数据播发,即指地图数据引擎可以向地图工具包下发地图数据。地图更新,即指,高精度地图数据引擎可以接收应用层回传异常地图数据,并反馈至云 端数据库,以实现对地图数据的更新。
上述地图数据查询方法,向云端数据库请求与车辆的当前位置匹配的地图数据,在本地缓存所请求到的该的地图数据;根据地图数据中的道路要素,在本地构建地图数据的空间索引。相当于,通过当前位置,实现了在本地对地图数据的动态缓存,而非固定存储全量地图数据。当获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据。由于,本地缓存的是与当前位置匹配的地图数据,所以,本地缓存的地图数据能够满足车辆当前行驶过程中的查询需求。因此,通过当前位置在本地对地图数据进行局部的动态缓存,在能够满足车辆当前行驶需求的前提下,相较于传统的存储全量地图数据而言,能够节省***的存储资源。
此外,从云端数据库中动态加载地图数据,能够保证地图数据的鲜度,从而提高查询的地图数据的准确性。此外,地图数据查询处理是独立于车辆行驶的应用层之外的,减少了耦合。
在一个实施例中,步骤S204包括:获取预先规划的路径规划信息;从路径规划信息中,确定距当前位置前预设范围内的待通行路径信息;向云端数据库请求与待通行路径信息匹配的地图数据。
其中,路径规划信息,是预先规划的车辆行驶路径信息。
可以理解,路径规划信息可以是由车端设备自身预先规划,也可以是由云端数据库预先规划。
在一个实施例中,路径规划信息,是根据预先设定的兴趣途径点规划的车辆行驶路径。其中,兴趣途径点,是车辆行驶过程中需要经过的点。
在一个实施例中,路径规划信息的规划步骤包括:获取应用层发送的路径规划请求;发送路径规划请求中携带的兴趣途径点至云端数据库;在本地缓存云端数据库返回的针对兴趣途径点制定的路径规划信息;向应用层返回路径规划信息。
具体地,用户可以向应用层输入兴趣途径点,应用层可以生成路径规划请求,该路径规划请求中携带兴趣途径点。车端设备可以通过地图数据引擎获取路径规划请求,并将路径规划请求中携带的兴趣途径点发送至云端数据库。云端数据库可以根据兴趣途径点制定路径规划信息。该路径规划信息中包括兴趣途径点。云端数据库可以将制定的路径规划信息返回至车端设备中的地图数据引擎,由地图数据引擎向应用层返回该路径规划信息。
可以理解,地图数据引擎可以直接获取应用层发送的路径规划请求。地 图数据引擎也可以经由对应于应用层中各应用设置的地图工具包的转发,获取路径规划请求。即,应用层中生成路径规划请求的应用,可以将路径规划请求发送至针对该应用设置的地图工具包,由该地图工具包将路径规划请求转发至地图数据引擎,地图数据引擎可以将路径规划请求中携带兴趣途径点发送至云端数据库,以请求云端数据库制定路径规划信息。
同样地,在一个实施例中,车端设备可以通过地图数据引擎将云端数据库返回的路径规划信息向应用层下发。可以理解,高精度地图数据引擎可以直接将路径规划信息向应用层下发。高精度地图数据引擎也可以将地图数据引擎路径规划信息向地图工具包下发,经由地图工具包将路径规划信息向应用层中发起路径规划请求的应用返回。
可以理解,当存在预先规划的路径规划信息时,则执行获取预先规划的路径规划信息及后续步骤。
在一个实施例中,在获取预先规划的路径规划信息之前,车端设备可以先检测是否存在预先规划的路径规划信息。当存在预先规划的路径规划信息时,则获取预先规划的路径规划信息及后续步骤,当不存在预先规划的路径规划信息时,则可以直接按照当前位置,向云端数据库请求地图数据。
在一个实施例中,当获取云端数据库返回的路径规划信息之后,车端设备可以将***状态更新为路径规划状态。可以理解,路径规划状态,用于表明已经规划了路径。因此,车端设备可以检测当前是否处于路径规划状态(Routing状态),若是,则表明存在预先规划的路径规划信息,若否,则表明不存在预先规划的路径规划信息。
在一个实施例中,在检测当前是否处于路径规划状态之前,车端设备还可以确定是否需要向云端数据库重新请求地图数据,若确定要向云端数据库重新请求地图数据,则执行检测当前是否处于路径规划状态的步骤。
在一个实施例中,当不存在路径规划信息时,车端设备则可以向云端数据库请求距当前位置预设范围内的区域所对应的地图数据。可以理解,距当前位置预设范围内的区域所对应的地图数据,相当于,车辆周边的道路信息。
当存在预先规划的路径信息时,车端设备可以从路径规划信息中,确定距当前位置前预设范围内的待通行路径信息。即,确定在车辆行驶前方预设范围内的通行路径信息。可以理解,待通行路径信息,用于表示在车辆行驶前方预设范围内,需要行驶的路径信息。在确定待通行路径信息之后,车端设备则需要向云端数据库查询与待通行路径信息匹配的地图数据。
其中,与待通行路径信息匹配的地图数据,是指满足车辆在待通行路径的行驶需求的地图数据。即,与待通行路径信息匹配的地图数据,能够为后续行驶在待通行路径上的车辆提供足够的地图数据、以保证车辆在待通行路径上的正常行驶。可以理解,与待通行路径信息匹配的地图数据,相当于前方待通行路径的道路信息。
上述实施例中,根据路径规划信息和当前位置,确定待通行路径信息,加载与待通行路径匹配的地图数据,能够更加有针对性地、更准确地加载地图数据。
在一个实施例中,该方法还包括:获取与上次缓存的地图数据所匹配的参照行驶位置;确定当前位置和参照行驶位置之间的差异;当差异大于预设差异阈值时,则执行步骤S204向云端数据库请求与当前位置匹配的地图数据。
其中,参照行驶位置,是上次缓存的地图数据所匹配的行驶位置。
可以理解,参照行驶位置,属于上次缓存时车辆的当前位置。在上次缓存时,车端设备可以向云端数据库请求与该参照行驶位置匹配的地图数据。
为了便于理解参照行驶位置,现举例说明。比如,在第一次缓存时,车辆的当前位置为P1,则在第一次缓存时向云端数据库请求与P1匹配的地图数据。在确定是否要进行第二次缓存时,该P1即为参照行驶位置,则可以获取当前位置,将当前位置与P1进行比对,以确定是否要向云端数据库请求第二次缓存的地图数据。
具体地,车端设备可以获取与上次缓存的地图数据所匹配的参照行驶位置,并确定当前位置和参照行驶位置之间的差异。当差异大于预设差异阈值时,则表明当前位置距上次缓存地图数据时的参照行驶位置过远,上次缓存的地图数据可能无法满足当前位置的行驶需求,因此,车端设备可以再次向云端数据库请求与当前位置匹配的地图数据。
上述实施例中,在当前位置和参照行驶位置之间的差异大于预设差异阈值时,再触发向云端数据库请求与当前位置匹配的地图数据,避免过度频繁向云端数据库请求地图数据造成的资源浪费。
在一个实施例中,该方法还包括:将本次缓存的地图数据下发至各地图工具包中进行缓存;各地图工具包,分别对应于应用层中各应用设置于本地。步骤S210当获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据包括:当地图工具包接收对应的应用发送的查询请 求时,从地图工具包缓存的地图数据中,查询查询请求所针对的地图数据。
其中,地图工具包,即指地图SDK(Software Development Kit,软件开发工具包),用于接收地图数据引擎下发的地图数据,并向上层的应用层提供查询和数据回传等服务。
可以理解,应用层中的各应用设置于车端设备中。车端设备中预先针对各应用分别设置了相应的地图工具包。即,各地图工具包设置于车端设备本地、且与应用层中各应用分别对应。
在一个实施例中,地图工具包与各应用可以一一对应。即每个应用都有对应的地图工具包。在其他实施例中,一个地图工具包可以对应多个应用。
具体地,在步骤S206中,车端设备可以通过地图数据引擎在本地缓存所请求到的地图数据。进一步地,车端设备可以通过地图数据引擎将地图数据下发至各地图工具包中进行缓存。
可以理解,这种情况下,当向云端数据库请求的地图数据是与待通行路径信息匹配的地图数据时,那么,向地图工具包下发的是与待通行路径信息匹配的地图数据(即前方待通行路径的道路信息)。当向云端数据库请求的地图数据,是直接根据当前位置确定的地图数据时,那么,向地图工具包下发的是直接根据当前位置确定的地图数据(即车辆周边的道路信息)。
在一个实施例中,该方法还包括:将本次缓存的地图数据与上次缓存的地图数据进行差异比对;当本次缓存的地图数据与上次缓存的地图数据之间存在差异时,则执行将本次缓存的地图数据下发至各地图工具包中进行缓存的步骤。
需要说明的是,车端设备在通过地图数据引擎下发本次缓存的地图数据之前,可以判断是否要下发该地图数据。
可以理解,在向云端数据库请求地图数据时,可能会即使通过行驶位置的差异确定需要向云端数据库重新请求地图数据了,但是,实际上两次请求的地图数据相同。比如,行驶位置的预测差异阈值过小,或者,云端数据库侧请求地图数据的精度比较小,导致即使行驶位置发生了一定的差异,却仍然获取相同的地图数据。这种情况下,为了避免下发相同的地图数据至地图工具包导致资源浪费的情况,车端设备可以通过地图数据引擎,将本次缓存的地图数据与上次缓存的地图数据进行差异比对,当两次缓存的地图数据之间存在差异时,说明地图数据发生了变化,则可以将本次缓存的地图数据下发至地图工具包中进行缓存。
具体地,车端设备可以通过地图数据引擎,从本地获取上次缓存的地图数据,并将本次缓存的地图数据与上次缓存的地图数据进行差异比对,当本次缓存的地图数据与上次缓存的地图数据之间存在差异时,则再将本次缓存的地图数据下发至各地图工具包中进行缓存。
可以理解,每个地图工具包中缓存的地图数据相同。当各地图工具包接收对应的应用发送的查询请求时,从该地图工具包缓存的地图数据中,查询查询请求所针对的地图数据。
在一个实施例中,当应用层收到查询到的地图数据时,可以对检测该查询到的地图数据是否异常,当检测异常时,则可以向地图工具包反馈该异常地图数据(即异常的地图数据),地图工具包可以通过进程间通信的方式,将该异常地图数据上传至地图数据引擎。车端设备可以通过地图数据引擎向云端数据库反馈该异常地图数据。云端数据库可以针对该异常地图数据进行处理,以对该异常地图数据进行更改,对异常地图数据进行更改,并将更改后的地图数据更新至云端数据库中存储的地图数据中,使得更新后的地图数据正确。
图6为一个实施例中地图数据查询方法的数据流图。图6中以地图数据引擎为高精地图数据引擎为例进行说明。高精定位、环境感知和决策控制属于应用层的应用,针对各个应用分别设置了对应的地图SDK(即,地图工具包)。高精地图数据引擎可以向云端数据库提供行驶区域(即,车辆的当前位置或待通行路径信息),云端数据库可以返回地图数据至高精地图数据引擎。高精地图数据引擎可以将地图数据分发至各个地图SDK进行本地缓存。高精定位、环境感知和决策控制等应用可以从对应的地图SDK中查询地图数据。当应用检测到地图数据存在异常时,则将异常地图数据回传至高精地图数据引擎。高精地图数据引擎可以将异常地图数据上报至云端数据库,以实现地图数据的更新。
上述实施例中,通过针对各应用设置相应的地图工具包,让各应用从对应的地图工具包中查询地图数据,而不用统一从地图数据引擎中查询,从而能够提供查询效率。
图7为一个实施例中地图数据请求和下发的流程简示图。参照图7,该流程主要以应用于自动驾驶车辆的车端设备的地图数据引擎为例进行说明。图7中的自车,即为“自动驾驶车辆”的简称。地图数据引擎属于地图数据查询***的核心组件。地图数据查询***,用于实现本申请各实施例中的地 图数据查询方法。整个地图数据查询***的运行帧率是10fps,每一帧会首先判断是否有路径规划请求,并以此更新***状态;随后接受车辆位置坐标(即车辆的当前位置),并判断是否需要请求云端数据以及是否需要向地图工具包播发地图数据。具体地,在地图数据查询***启动之后,高精度地图数据引擎可以判断是否接收到路径规划请求,若是,则向云端数据库请求规划路径。当完成路径规划后,地图数据引擎可以向地图工具包播发规划结果,并更新***状态为Routing状态(即路径规划状态)。地图数据引擎可以接收车辆位置坐标(即车辆的当前位置),更新自车轨迹(即,自动驾驶车辆的行驶轨迹)。地图数据引擎可以判断是否要向云端请求数据(即是否向云端数据库请求地图数据),若是,则判断是否处于Routing状态,若是,则表明存在路径规划信息,则可以根据路径规划信息确定前方通行路径(即待通行路径信息),并根据前方通行路径加载云端数据(即,向云端数据库请求地图数据),若否,则表明不存在路径规划信息,则可以根据自车位置加载云端数据(即根据自动驾驶车辆的当前位置向云端数据库请求地图数据)。在获取到所请求的地图数据后,地图数据引擎可以判断是否要播发数据(即是否要向地图工具包下发本次请求缓存的地图数据),若是,则当处于Routing状态,播发所请求到的前方通行路径信息(即,与待通行路径信息匹配的地图数据),当不处于Routing状态,播发所请求到的自车周边道路信息(即,距自动驾驶车辆的当前位置预设范围内的区域所对应的地图数据)。如果判断不需要播发或者播发道路信息完毕后,则可以判断***是否关闭,如果关闭则结束,如果没有关闭,则重新判断是否接收到新的路径规划请求。
在一个实施例中,地图工具包中包括地图代理层、数据缓存层、异步加载层和进程间通信层(IPC,Inter-Process Communication)。
其中,地图代理层,用于向应用层提供封装好的地图查询接口。数据缓存层,同地图数据引擎一样,用于提供地图数据的缓存,索引和查询接口。异步加载层,用于向地图数据引擎请求地图数据,并将获取到的地图数据载入数据缓存层中。进程间通信层,用于封装与地图数据引擎之间的通信协议。
图8为一个实施例中进程间通信的架构图。参照图8,进程间通信层提供了两种通信形式:一种通过共享内存、信号量以及消息队列的形式,主要应用于单机运行的自动驾驶***(指单一车端设备即可以满足车辆行驶需求),确保通信效率足够高;另一种通过套接字(socket)的形式,主要应用于多机运行的自动驾驶***(指需要多台车端设备协作满足车辆行驶需求), 确保能够跨机器通信。地图工具包和地图数据引擎之间通过进程间通信层进行通信。
图9为一个实施例中地图数据查询的时序图。参照图9,包括应用层、地图工具包、地图数据引擎和云端数据库。可以理解,应用层、地图工具包和地图数据引擎皆设置于车端设备中。其中,地图工具包中包括地图代理层、数据缓存层和异步加载层。地图工具包和地图数据引擎通过进程间通信层IPC进行通信。应用层的各应用可以请求初始化所对应设置的地图工具包(即地图SDK),则地图代理层可以构建数据缓存层,并且指示异步加载层初始化异步加载队列。数据缓存层在构建完成后向地图代理层反馈,地图代理层向应用层反馈初始化完成。应用层向地图工具包中的地图代理层发送路径规划请求,地图代理层则将路径规划请求中携带的POI途径点(即兴趣途径点)通过进程间通信层IPC发送至地图数据引擎。地图数据引擎则向云端数据库发送路径规划请求。云端数据库根据兴趣途径点制定路径规划信息并返回至地图数据引擎。地图数据引擎通过IPC发送路径规划信息至地图工具包中的地图代理层。地图代理层返回路径规划信息至应用层。地图工具包中的异步加载层可以通过IPC对地图数据引擎进行数据状态查询,以查询数据状态是否发生更新,即查询是否有新的地图数据。地图数据引擎通过IPC返回数据状态至异步加载层。当数据状态发生更新时,异步加载层则通过IPC向地图数据引擎请求拉取地图数据。地图数据引擎通过IPC下发地图数据至异步加载层。异步加载层根据接收的地图数据在数据缓存层中添加或删除地图数据。数据缓存层根据新的地图数据在本地更新索引(即更新空间索引),并告知异步加载层更新完成。应用层则可以向地图工具包请求查询地图数据,地图工具包中的地图代理层,则可以从地图工具包的数据缓存层中查询地图数据,并依次返回查询结果至应用层。当应用层检测到地图数据存在异常时,则反馈异常地图数据至地图工具包。地图工具包中的地图代理层则可以通过IPC上传异常地图数据至地图数据引擎,地图数据引擎将异常地图数据上报至云端数据库。云端数据库对异常地图数据进行更改,并将更改后的地图数据更新至云端数据库中存储的地图数据中,以更新为正确的地图数据。进一步地,地图数据引擎可以在地图数据更新完成后告知地图代理。
在一个实施例中,将本次缓存的地图数据下发至各地图工具包中进行缓存包括:下发地图数据至各地图工具包中;当与地图工具包对应的应用所使用的坐标系与地图数据所对应的坐标系不同时,则通过地图工具包,将地图 数据的坐标转换为在应用所使用的坐标系下的坐标;在地图工具包中缓存进行坐标转换后的地图数据。
可以理解,原始的地图数据在存储过程中使用的是经纬度坐标(比如WGS84坐标),这一坐标***可能并不适合应用层的某些应用直接使用。
其中,应用所使用的坐标系,是指应用层中的应用所能够直接使用的数据所在的坐标系。
具体地,当与地图工具包对应的应用所使用的坐标系与地图数据所对应的坐标系不同时,则说明应用在获取地图数据之后,还需要将地图数据转换成能使用的坐标系下的坐标,这样一来,造成地图数据使用效率低,从而会影响车辆行驶性能。因此,车端设备可以通过地图工具包,将地图数据的坐标转换为在应用所使用的坐标系下的坐标。车端设备可以在地图工具包中缓存进行坐标转换后的地图数据。
需要说明的是,应用层中不同的应用所使用的坐标系可能不同,有些应用所使用的坐标系可能与地图数据所对应的坐标系相同,那么,则不需要进行坐标系转换。
上述实施例中,针对不同的应用可以在本地缓存不同坐标系下的地图数据,从而提高应用访问地图数据的效率。
在一个实施例中,通过地图工具包,将地图数据的坐标转换为在应用所使用的坐标系下的坐标包括:将构成地图数据中道路要素的各点的经纬度坐标,转换为在站心坐标系下的坐标;站心坐标系是以当前位置为原点的空间直角坐标系;针对每个道路要素,从构成道路要素的点中选取中心点;确定构成道路要素的非中心点到中心点的偏移量;根据中心点在站心坐标系下的坐标和各非中心点所对应的偏移量,确定各非中心点的坐标。
其中,站心坐标系,是以车辆的当前位置为原点的空间直角坐标系。可以理解,站心坐标系的坐标轴,可以分别是行驶方向、行驶方向在水平面上的垂直方向以及在竖直面的垂直方向。
可以理解,道路要素在地图数据中是由各点组成。所以,车端设备可以通过地图工具包将道路要素的各点的经纬度坐标转换为在站心坐标系下的坐标。
在一个实施例中,车端设备可以通过地图工具包将地图数据中道路要素的各点的经纬度坐标,先初次转换为在球心坐标系下的坐标,再对初次转换为球心坐标系下的坐标转换为在站心坐标系下的坐标。
针对每个道路要素,车端设备可以通过地图工具包从构成该道路要素的点中选取中心点。该道路要素中除中心点以外的点即为非中心点。车端设备可以通过地图工具包确定构成道路要素的各非中心点到中心点的偏移量。车端设备可以根据中心点在站心坐标系下的坐标和各非中心点所对应的偏移量,确定各非中心点的坐标。即,通过中心点在站心坐标系下的坐标和偏移量来表示非中心点的坐标。
可以理解,在车辆的行驶过程中,需要不断地更换站心坐标系。因为,当车辆移动的越来越远,之前建立的站心坐标系就无法再适用。这个时候,就需要重新以车辆的新的当前位置作为原点,再次建立新的站心坐标系。比如,先以车辆行驶位置P1为原点,建立站心坐标系。随着车辆的行驶,与P1为原点的站心坐标系就会由于车辆过远变得不再适用了,这种情况下,就需要重新获取车辆的当前位置P2,以P2为原点再次建立站心坐标系。
图10为一个实施例中坐标系转换的示意图。从云端数据库中获取的原始的地图数据的道路要素中各点的坐标为经纬度坐标,对各点的经纬度坐标进行坐标系转换,转换为中心点和偏移量的组合的形式。
由于,同一道路要素的非中心点相较于中心点而言,是固定不变的,那么偏移量也是固定不变的。所以,在更换站心坐标系时,通过仅更新转换中心点在新的站心坐标系下的坐标,就可以一并将非中心点的坐标通过中心点在新的站心坐标系下的坐标和偏移量的形式进行表示。即能够快速、准确地表示出非中心点的坐标,节省了计算量。此外,转换后各点的坐标即符合笛卡尔坐标系,属于空间直角坐标,能够被应用层中的应用直接使用,提高了地图数据的使用效率。
在一个实施例中,步骤S208包括:根据地图数据中道路要素,分别在本地构建格网索引和/或树形索引。步骤S210当获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据包括:当获取到应用层发送的定位查询请求时,则通过格网索引,从本地查询定位查询请求所针对的位置坐标;并且/或者,当获取到应用层发送的要素查询请求时,则通过树形索引,从本地查询对象查询请求所针对的地图要素信息。
格网索引,是将地图区域用横竖线条划分大小相等或不等的格网,记录每一个格网所包含的空间实体的索引结构。格网索引的查询过程是先计算出查询的对象所在格网,然后再在该网格中快速查询所选空间实体。
树形索引,是指叶节点存放指向地图数据的指针的树形结构。通过树形 索引,可以逐层级地查找目标对象。
具体地,车端设备可以根据地图数据中道路要素,分别在本地构建格网索引和/或树形索引。可以理解,格网索引便于对具体的对象进行定位查询。树形索引,便于进行数据范围查询。比如,查询一定范围内的要素。
在一个实施例中,步骤S208包括:根据地图数据中道路要素,在本地构建格网索引。步骤S210包括:当获取到应用层发送的定位查询请求时,则通过格网索引,从本地查询定位查询请求所针对的位置坐标。
在一个实施例中,步骤S208包括:根据地图数据中道路要素,在本地构建树形索引。步骤S210包括:当获取到应用层发送的要素查询请求时,则通过树形索引,从本地查询对象查询请求所针对的地图要素信息。
在一个实施例中,步骤S208包括:根据地图数据中道路要素,分别在本地构建格网索引和树形索引。步骤S210包括:当获取到应用层发送的定位查询请求时,则通过格网索引,从本地查询定位查询请求所针对的位置坐标;并且,当获取到应用层发送的要素查询请求时,则通过树形索引,从本地查询对象查询请求所针对的地图要素信息。
在一个实施例中,车端设备可以通过地图数据引擎,按照格网索引,从本地查询定位查询请求所针对的位置坐标。在其他实施例中,当地图数据引擎将地图数据下发至地图工具包进行缓存时,则车端设备可以通过与发起定位查询请求的应用所对应设置的地图工具包,按照格网索引,从本地查询定位查询请求所针对的位置坐标。
在一个实施例中,车端设备可以通过地图数据引擎,按照树形索引,从本地查询对象查询请求所针对的地图要素信息。在其他实施例中,当地图数据引擎将地图数据下发至地图工具包进行缓存时,则车端设备可以通过与发起定位查询请求的应用所对应设置的地图工具包,按照树形索引,从本地查询对象查询请求所针对的地图要素信息。
上述实施例中,车端设备可以预先针对不同类型的查询需求建立不同的空间索引结构,以便针对不同类型的查询请求使用相应的空间索引进行查询,从而提高了查找效率。
在一个实施例中,该方法还包括:记录地图数据中的、且与环境感知数据不匹配的异常地图数据;环境感知数据,是应用层对真实环境进行感知得到的数据;将异常地图数据虚拟成与环境感知数据匹配的虚拟地图数据;发送虚拟地图数据至应用层;当应用层检测虚拟地图数据不存在异常时,则将 异常地图数据上传至云端数据库。
其中,虚拟地图数据,是指将所请求到的地图数据按照环境感知数据进行修改后得到的地图数据。
可以理解,从云端数据库中请求到的地图数据为真实的地图数据,对该地图数据按照环境感知数据进行修改后得到的地图数据,即为虚拟地图数据。
为了便于理解虚拟地图数据,现举例说明。假设,原始的地图数据中,在某一位置处并不存在一个路标,而应用层的环境感知应用对真实环境进行感知后得到的环境感知数据表明,在该位置处存在一个路标,那么该部分地图数据与环境感知数据则不匹配,属于异常地图数据。那么,车端设备则可以按照环境感知数据在地图数据的该位置处虚拟一个路标,虚拟一个路标后的地图数据即为虚拟地图数据。
具体地,车端设备中的应用层自身也可以通过环境感知应用,对真实环境进行感知,获取环境感知数据。应用层在从本地缓存中查询到地图数据后,可以将自身获取的环境感知数据和查询的地图数据进行匹配。当二者不匹配时,应用层则可以判定该地图数据为异常地图数据。车端设备中的应用层可以将异常地图数据回传至地图数据引擎。地图数据引擎可以将异常地图数据虚拟成与环境感知数据匹配的虚拟地图数据。即,地图数据引擎可以按照环境感知数据,将异常地图数据中缺失或多余的地图数据进行新增或删除,得到虚拟地图数据。
车端设备可以通过地图数据引擎发送虚拟地图数据至应用层。应用层可以按照环境感知数据,对接收的虚拟地图数据进行检测,判断该虚拟地图数据是否发生异常。由于,虚拟地图数据是与环境感知数据匹配的,所以,如果应用层的环境感知应用的功能没有出现问题时,则会检测得到虚拟地图数据并不存在异常。如果应用层的环境感知应用的功能出现了问题时,则可能检测得到虚拟地图数据存在异常。因此,当应用层检测虚拟地图数据不存在异常时,则说明应用层的环境感知应用的功能没有出现问题,那么,由环境感知应用上报的异常地图数据就很有可能确实存在异常。地图数据引擎则可以将异常地图数据上传至云端数据库,以进行异常上报。云端数据库可以根据异常地图数据进行更新处理,以更新地图数据。
在一个实施例中,当获取到连续多帧上报的异常地图数据时,再执行将异常地图数据虚拟成与环境感知数据匹配的虚拟地图数据的步骤。当未获取到连续多帧上报的异常地图数据,而仅获取到一份异常地图数据,则可以直 接将该异常地图数据上报至云端数据库。
可以理解,多帧,即为至少两帧。当环境感知应用感知多帧存在异常地图数据,则有可能是环境感知应用自身出了问题,则可以通过将异常地图数据虚拟成与环境感知数据匹配的虚拟地图数据,并发送给应用层中的环境感知应用进行检测的方式,来校验是否是环境感知应用自身出现了问题。
图11为一个实施例中地图数据更新流程示意图。在地图数据查询***运行的每一帧开始时,应用层中的定位应用接收环境感知数据并与地图数据做匹配。当存在异常匹配的地图数据时,则回传存在异常地图数据的感知结果和坐标位置至地图数据引擎。当检测到不存在异常匹配的地图数据时,则该帧运行结束。地图数据引擎可以记录该感知结果。当连续多帧存在异常地图数据时,则生成虚拟地图数据发送至地图工具包,由地图工具包提供给应用层以检测是否存在异常。当停止接收到异常反馈时,则说明虚拟地图数据检测不存在异常,表明应用层不存在异常,则将应用层检测出来的存在异常地图数据的感知结果上传到云端数据库。云端数据库可以对异常地图数据进行更新处理,以实现对地图数据的更新。
上述实施例中,在检测到异常地图数据之后,将异常地图数据虚拟成与环境感知数据匹配的虚拟地图数据并提供至应用层,供应用层再次进行检测,以验证该应用层的准确性,当应用层检测虚拟地图数据不存在异常时,则验证该应用层不存在问题,此时,再将该异常地图数据上传至云端数据库,能够提高异常上报的准确性。
如图12所示,在一个实施例中,提供了一种地图数据查询装置1200,设置于上述实施例的计算机设备中。该装置1200包括:获取模块1202、加载缓存模块1204以及查询模块1206,其中:
获取模块1202,用于获取车辆的当前位置。
加载缓存模块1204,用于向云端数据库请求与当前位置匹配的地图数据;在本地缓存所请求到的地图数据;根据地图数据中的道路要素,在本地构建地图数据的空间索引。
查询模块1206,用于当获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据。
在一个实施例中,加载缓存模块1204还用于获取预先规划的路径规划信息;从路径规划信息中,确定距当前位置前预设范围内的待通行路径信息;向云端数据库请求与待通行路径信息匹配的地图数据。
在一个实施例中,该装置1200还包括:
路径规划模块1201,用于获取应用层发送的路径规划请求;发送路径规划请求中携带的兴趣途径点至云端数据库;在本地缓存云端数据库返回的针对兴趣途径点制定的路径规划信息;向应用层返回路径规划信息。
在一个实施例中,加载缓存模块1204还用于获取与上次缓存的地图数据所匹配的参照行驶位置;确定当前位置和参照行驶位置之间的差异;当差异大于预设差异阈值时,则向云端数据库请求与当前位置匹配的地图数据。
在一个实施例中,加载缓存模块1204还用于将本次缓存的地图数据下发至各地图工具包中进行缓存;各地图工具包,分别对应于应用层中各应用设置于本地;当地图工具包接收对应的应用发送的查询请求时,从地图工具包缓存的地图数据中,查询查询请求所针对的地图数据。
在一个实施例中,加载缓存模块1204还用于将本次缓存的地图数据与上次缓存的地图数据进行差异比对;当本次缓存的地图数据与上次缓存的地图数据之间存在差异时,则将本次缓存的地图数据下发至各地图工具包中进行缓存。
在一个实施例中,加载缓存模块1204还用于下发地图数据至各地图工具包中;当与地图工具包对应的应用所使用的坐标系与地图数据所对应的坐标系不同时,则通过地图工具包,将地图数据的坐标转换为在应用所使用的坐标系下的坐标;在地图工具包中缓存进行坐标转换后的地图数据。
在一个实施例中,加载缓存模块1204还用于将构成地图数据中道路要素的各点的经纬度坐标,转换为在站心坐标系下的坐标;站心坐标系是以当前位置为原点的空间直角坐标系;针对每个道路要素,从构成道路要素的点中选取中心点;确定构成道路要素的非中心点到中心点的偏移量;根据中心点在站心坐标系下的坐标和各非中心点所对应的偏移量,确定各非中心点的坐标。
在一个实施例中,加载缓存模块1204还用于根据地图数据中道路要素,分别在本地构建格网索引和/或树形索引;查询模块1206还用于当获取到应用层发送的定位查询请求时,则通过格网索引,从本地查询定位查询请求所针对的位置坐标;并且/或者,当获取到应用层发送的要素查询请求时,则通过树形索引,从本地查询对象查询请求所针对的地图要素信息。
如图13所示,在一个实施例中,该装置1200还包括:路径规划模块1201和异常反馈模块1208,其中:
异常反馈模块1208,用于记录地图数据中的、且与环境感知数据不匹配的异常地图数据;环境感知数据,是应用层对真实环境进行感知得到的数据;将异常地图数据虚拟成与环境感知数据匹配的虚拟地图数据;发送虚拟地图数据至应用层;当应用层检测虚拟地图数据不存在异常时,则将异常地图数据上传至云端数据库。
关于地图数据查询装置的具体限定可以参见上文中对于地图数据查询方法的限定,在此不再赘述。上述地图数据查询装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
图14为一个实施例中计算机设备的内部结构示意图。参照图14,该计算机设备可以图1中的车端设备110。该计算机设备包括通过***总线连接的处理器、存储器和网络接口。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质可存储操作***和计算机可读指令。该计算机可读指令被执行时,可使得处理器执行一种地图数据查询方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该内存储器中可储存有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种地图数据查询方法。计算机设备的网络接口用于进行网络通信。
本领域技术人员可以理解,图14中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,本申请提供的地图数据查询装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图14所示的计算机设备上运行,计算机设备的非易失性存储介质可存储组成该地图数据查询装置的各个程序模块,比如,图12所示的获取模块1202、加载缓存模块1204以及查询模块1206。各个程序模块所组成的计算机可读指令用于使该计算机设备执行本说明书中描述的本申请各个实施例的地图数据查询方法中的步骤,例如,计算机设备可以通过如图12所示的地图数据查询装置1200中的获取模块1202获取车辆的当前位置,并通过加载缓存模块1204向云端数据库请求与当前位置匹配的地图数据;在本地缓存所请求到的地图数据;根据地图数据中的 道路要素,在本地构建地图数据的空间索引。计算机设备可以通过查询模块1206在获取到应用层发送的查询请求时,通过空间索引,从本地查询查询请求所针对的地图数据。
在一个实施例中,提供了一种计算机设备,包括存储器和一个或多个处理器,存储器存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述地图数据查询方法的步骤。此处地图数据查询方法的步骤可以是上述各个实施例的地图数据查询方法中的步骤。
在一个实施例中,提供了一个或多个计算机可读存储介质,存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述地图数据查询方法的步骤。此处地图数据查询方法的步骤可以是上述各个实施例的地图数据查询方法中的步骤。
需要说明的是,本申请各实施例中的“多个”即为至少两个。
应该理解的是,虽然本申请各实施例中的各个步骤并不是必然按照步骤标号指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,各实施例中至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (18)

  1. 一种地图数据查询方法,由计算机设备执行,所述方法包括:
    获取车辆的当前位置;
    向云端数据库请求与所述当前位置匹配的地图数据;
    在本地缓存所请求到的所述地图数据;
    根据所述地图数据中的道路要素,在本地构建所述地图数据的空间索引;及
    当获取到应用层发送的查询请求时,通过所述空间索引,从所述本地查询所述查询请求所针对的地图数据。
  2. 根据权利要求1所述的方法,其特征在于,所述向云端数据库请求与所述当前位置匹配的地图数据包括:
    获取预先规划的路径规划信息;
    从所述路径规划信息中,确定距所述当前位置前预设范围内的待通行路径信息;
    向所述云端数据库请求与所述待通行路径信息匹配的地图数据。
  3. 根据权利要求2所述的方法,其特征在于,所述路径规划信息是通过路径规划步骤确定;所述路径规划步骤包括:
    获取应用层发送的路径规划请求;
    发送所述路径规划请求中携带的兴趣途径点至所述云端数据库;
    在本地缓存云端数据库返回的针对所述兴趣途径点制定的路径规划信息;
    向所述应用层返回所述路径规划信息。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取与上次缓存的地图数据所匹配的参照行驶位置;
    确定所述当前位置和所述参照行驶位置之间的差异;
    当所述差异大于预设差异阈值时,则执行所述向云端数据库请求与所述当前位置匹配的地图数据的步骤。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    将本次缓存的所述地图数据下发至各地图工具包中进行缓存;各所述地图工具包,分别对应于应用层中各应用设置于本地;
    所述当获取到应用层发送的查询请求时,通过所述空间索引,从所述本地查询所述查询请求所针对的地图数据包括:
    当所述地图工具包接收对应的应用发送的查询请求时,从所述地图工具包缓存的地图数据中,查询所述查询请求所针对的地图数据。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    将本次缓存的所述地图数据与上次缓存的地图数据进行差异比对;
    当本次缓存的所述地图数据与上次缓存的地图数据之间存在差异时,则执行所述将本次缓存的所述地图数据下发至各地图工具包中进行缓存的步骤。
  7. 根据权利要求5所述的方法,其特征在于,所述将本次缓存的所述地图数据下发至各地图工具包中进行缓存包括:
    下发所述地图数据至各地图工具包中;
    当与所述地图工具包对应的应用所使用的坐标系与所述地图数据所对应的坐标系不同时,则通过所述地图工具包,将所述地图数据的坐标转换为在所述应用所使用的坐标系下的坐标;
    在所述地图工具包中缓存进行坐标转换后的地图数据。
  8. 根据权利要求7所述的方法,其特征在于,所述通过所述地图工具包,将所述地图数据的坐标转换为在所述应用所使用的坐标系下的坐标包括:
    将构成所述地图数据中道路要素的各点的经纬度坐标,转换为在站心坐标系下的坐标;所述站心坐标系是以所述当前位置为原点的空间直角坐标系;
    针对每个道路要素,从构成所述道路要素的点中选取中心点;
    确定构成所述道路要素的非中心点到所述中心点的偏移量;
    根据所述中心点在所述站心坐标系下的坐标和各非中心点所对应的偏移量,确定各非中心点的坐标。
  9. 根据权利要求1所述的方法,其特征在于,所述根据所述地图数据中的道路要素,在本地构建所述地图数据的空间索引包括:
    根据所述地图数据中道路要素,分别在本地构建格网索引;
    所述当获取到应用层发送的查询请求时,通过所述空间索引,从所述本地查询所述查询请求所针对的地图数据包括:
    当获取到应用层发送的定位查询请求时,则通过所述格网索引,从本地查询所述定位查询请求所针对的位置坐标。
  10. 根据权利要求1所述的方法,其特征在于,所述根据所述地图数据中的道路要素,在本地构建所述地图数据的空间索引包括:
    根据所述地图数据中道路要素,分别在本地构建树形索引;
    所述当获取到应用层发送的查询请求时,通过所述空间索引,从所述本地查询所述查询请求所针对的地图数据包括:
    当获取到应用层发送的要素查询请求时,则通过所述树形索引,从本地查询所述对象查询请求所针对的地图要素信息。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    记录所述地图数据中的、且与环境感知数据不匹配的异常地图数据;所述环境感知数据,是所述应用层对真实环境进行感知得到的数据;
    将所述异常地图数据虚拟成与所述环境感知数据匹配的虚拟地图数据;
    发送所述虚拟地图数据至所述应用层;
    当所述应用层检测所述虚拟地图数据不存在异常时,则将所述异常地图数据上传至所述云端数据库。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    当获取到连续多帧上报的异常地图数据时,执行所述将所述异常地图数据虚拟成与所述环境感知数据匹配的虚拟地图数据的步骤;
    当未获取到连续多帧上报的异常地图数据、且仅获取到一份异常地图数据时,则将所述异常地图数据上报至所述云端数据库。
  13. 根据权利要求1至10中任一项所述的方法,其特征在于,所述计算机设备的本地中,设置有地图数据引擎、以及与所述应用层对应的地图工具包;所述方法还包括:
    当所述应用层检测到所查询的地图数据异常时,则向与所述应用层对应的地图工具包反馈异常地图数据;
    通过所述地图工具包使用进程间通信将所述异常地图数据,向所述地图数据引擎发送;
    通过所述地图数据引擎,向所述云端数据库反馈所述异常地图数据;所述异常地图数据,用于指示所述云端数据库对所述异常地图数据进行更改,并将更改后的地图数据更新至所述云端数据库中存储的地图数据中。
  14. 一种地图数据查询装置,其特征在于,设置于计算机设备中,所述装置包括:
    获取模块,用于获取车辆的当前位置;
    加载缓存模块,用于向云端数据库请求与所述当前位置匹配的地图数据;在本地缓存所请求到的所述地图数据;根据所述地图数据中的道路要素,在 本地构建所述地图数据的空间索引;
    查询模块,用于当获取到应用层发送的查询请求时,通过所述空间索引,从所述本地查询所述查询请求所针对的地图数据。
  15. 根据权利要求14所述的装置,其特征在于,所述加载缓存模块还用于获取预先规划的路径规划信息;从所述路径规划信息中,确定距所述当前位置前预设范围内的待通行路径信息;向所述云端数据库请求与所述待通行路径信息匹配的地图数据。
  16. 根据权利要求14或15所述的装置,其特征在于,加载缓存模块还用于下发所述地图数据至各地图工具包中;当与所述地图工具包对应的应用所使用的坐标系与所述地图数据所对应的坐标系不同时,则通过所述地图工具包,将所述地图数据的坐标转换为在所述应用所使用的坐标系下的坐标;在所述地图工具包中缓存进行坐标转换后的地图数据。
  17. 一种计算机设备,其特征在于,包括存储器和一个或多个处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述处理器执行权利要求1至13中任一项所述方法的步骤。
  18. 一个或多个计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行权利要求1至13中任一项所述方法的步骤。
PCT/CN2020/098573 2019-08-30 2020-06-28 地图数据查询方法、装置、计算机设备及存储介质 WO2021036464A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20857838.5A EP3926489A4 (en) 2019-08-30 2020-06-28 MAP DATA REQUEST METHOD AND DEVICE, COMPUTER DEVICE AND STORAGE MEDIUM
US17/516,498 US20220049962A1 (en) 2019-08-30 2021-11-01 Map data query method and apparatus, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910819012.X 2019-08-30
CN201910819012.XA CN110807075B (zh) 2019-08-30 2019-08-30 地图数据查询方法、装置、计算机设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/516,498 Continuation US20220049962A1 (en) 2019-08-30 2021-11-01 Map data query method and apparatus, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021036464A1 true WO2021036464A1 (zh) 2021-03-04

Family

ID=69487474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098573 WO2021036464A1 (zh) 2019-08-30 2020-06-28 地图数据查询方法、装置、计算机设备及存储介质

Country Status (4)

Country Link
US (1) US20220049962A1 (zh)
EP (1) EP3926489A4 (zh)
CN (1) CN110807075B (zh)
WO (1) WO2021036464A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419245A (zh) * 2021-06-23 2021-09-21 北京易航远智科技有限公司 一种基于v2x的实时建图***及建图方法
CN114136305A (zh) * 2021-12-01 2022-03-04 纵目科技(上海)股份有限公司 多图层地图的创建方法、***、设备及计算机可读存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110807075B (zh) * 2019-08-30 2022-10-25 腾讯科技(深圳)有限公司 地图数据查询方法、装置、计算机设备及存储介质
CN112685092A (zh) * 2020-12-17 2021-04-20 宝能(广州)汽车研究院有限公司 地图数据的加载方法、存储介质、电子设备和新能源汽车
CN113515584B (zh) * 2021-07-13 2023-11-24 禾多阡陌科技(北京)有限公司 局部地图数据分发方法、装置、电子设备和介质
US20230085486A1 (en) * 2021-09-13 2023-03-16 Here Global B.V. Removing data contribution from aggregated and/or integrated geographic database
CN113779091A (zh) * 2021-09-15 2021-12-10 贵阳货车帮科技有限公司 信息查询方法、装置、电子设备及可读存储介质
CN114445571A (zh) * 2021-12-29 2022-05-06 武汉中海庭数据技术有限公司 一种地面对象与路网关联关系自动化生成方法及***
CN114928652B (zh) * 2022-04-29 2023-06-20 高德软件有限公司 地图数据传输方法、装置、电子设备、存储介质和程序
CN115098606B (zh) * 2022-05-30 2023-06-16 九识智行(北京)科技有限公司 无人驾驶车辆的红绿灯查询方法、装置、存储介质及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426778A (zh) * 2011-11-04 2012-04-25 杭州妙影微电子有限公司 一种基于车辆位置的道路交通状况表示***及表示方法
CN103575266A (zh) * 2012-08-06 2014-02-12 百度在线网络技术(北京)有限公司 移动导航的方法、***和gis服务器
CN108280154A (zh) * 2018-01-09 2018-07-13 深圳市小猫信息技术有限公司 一种地图标注信息展示方法、装置、终端及可读存储介质
CN110807075A (zh) * 2019-08-30 2020-02-18 腾讯科技(深圳)有限公司 地图数据查询方法、装置、计算机设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967523B (zh) * 2005-11-15 2010-07-28 日电(中国)有限公司 路况信息查询***及路况信息查询方法
ATE554367T1 (de) * 2008-05-09 2012-05-15 Research In Motion Ltd Vorausschauendes herunterladen von kartendaten
JP5860836B2 (ja) * 2013-05-10 2016-02-16 アイシン・エィ・ダブリュ株式会社 地図データ記憶装置、地図データ更新方法及びコンピュータプログラム
US10859395B2 (en) * 2016-12-30 2020-12-08 DeepMap Inc. Lane line creation for high definition maps for autonomous vehicles
EP3563265B1 (en) * 2016-12-30 2021-06-02 DeepMap Inc. High definition map updates
US10353931B2 (en) * 2016-12-30 2019-07-16 DeepMap Inc. High definition map and route storage management system for autonomous vehicles
US10203698B1 (en) * 2017-08-10 2019-02-12 GM Global Technology Operations LLC System and method for providing a map to autonomous vehicles via a cloud-based system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426778A (zh) * 2011-11-04 2012-04-25 杭州妙影微电子有限公司 一种基于车辆位置的道路交通状况表示***及表示方法
CN103575266A (zh) * 2012-08-06 2014-02-12 百度在线网络技术(北京)有限公司 移动导航的方法、***和gis服务器
CN108280154A (zh) * 2018-01-09 2018-07-13 深圳市小猫信息技术有限公司 一种地图标注信息展示方法、装置、终端及可读存储介质
CN110807075A (zh) * 2019-08-30 2020-02-18 腾讯科技(深圳)有限公司 地图数据查询方法、装置、计算机设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3926489A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419245A (zh) * 2021-06-23 2021-09-21 北京易航远智科技有限公司 一种基于v2x的实时建图***及建图方法
CN114136305A (zh) * 2021-12-01 2022-03-04 纵目科技(上海)股份有限公司 多图层地图的创建方法、***、设备及计算机可读存储介质
CN114136305B (zh) * 2021-12-01 2024-05-31 纵目科技(上海)股份有限公司 多图层地图的创建方法、***、设备及计算机可读存储介质

Also Published As

Publication number Publication date
EP3926489A1 (en) 2021-12-22
CN110807075A (zh) 2020-02-18
US20220049962A1 (en) 2022-02-17
EP3926489A4 (en) 2022-05-04
CN110807075B (zh) 2022-10-25

Similar Documents

Publication Publication Date Title
WO2021036464A1 (zh) 地图数据查询方法、装置、计算机设备及存储介质
EP3696510B1 (en) Method and apparatus for providing a campaign management platform to discover map data
US20200263993A1 (en) Method, apparatus, and system for providing a campaign management platform to update map data
US20190228647A1 (en) Technologies for managing a world model of a monitored area
WO2015078238A1 (en) Dispatching map matching tasks by cluster server in internet of vehicles
CN105608155A (zh) 海量数据分布式存储***
EP3696509A1 (en) Method, apparatus, and system for providing a campaign management platform to validate map data
WO2017161588A1 (zh) 一种定位方法及装置
US10999719B1 (en) Peer-to-peer autonomous vehicle communication
US11126200B2 (en) Method, apparatus, and system for providing an interface for publishing sensor data requests in campaign management platform
CN116860903A (zh) 用于管理自主车辆的可互操作的高清晰度地图的技术
US11255693B2 (en) Technologies for intelligent traffic optimization with high-definition maps
CN112383878B (zh) 一种协同计算方法及电子装置
CN109814137A (zh) 定位方法、装置和计算设备
WO2020119578A1 (zh) 打车订单处理
CN112699196B (zh) 轨迹生成方法、装置、终端设备及存储介质
US11598639B2 (en) System for offsite navigation
CN104637111A (zh) 车载轨迹与里程监控记录***
CN110324380B (zh) 利用kv存储设备的云计算与雾计算***
CN202230606U (zh) 一种基于无线网络和照片的路况分享***
US20190324977A1 (en) Technologies for management of data layers in a heterogeneous geographic information system map
CN113139258A (zh) 道路数据处理方法、装置、设备及存储介质
CN114812578A (zh) 一种动态地图的提供方法、装置及服务平台
CN113287102A (zh) 提供用于地理服务的弹性应用编程接口
CN111210616A (zh) 基于多源数据的车流量预测方法、***、终端及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20857838

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020857838

Country of ref document: EP

Effective date: 20210917

NENP Non-entry into the national phase

Ref country code: DE