CN108920606B - Map data processing method, map data processing device, terminal equipment and storage medium - Google Patents

Map data processing method, map data processing device, terminal equipment and storage medium Download PDF

Info

Publication number
CN108920606B
CN108920606B CN201810685308.2A CN201810685308A CN108920606B CN 108920606 B CN108920606 B CN 108920606B CN 201810685308 A CN201810685308 A CN 201810685308A CN 108920606 B CN108920606 B CN 108920606B
Authority
CN
China
Prior art keywords
data
map
block data
map block
index
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
CN201810685308.2A
Other languages
Chinese (zh)
Other versions
CN108920606A (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Dadi Tongtu Beijing Technology Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Tencent Dadi Tongtu Beijing 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 Tencent Technology Shenzhen Co Ltd, Tencent Dadi Tongtu Beijing Technology Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810685308.2A priority Critical patent/CN108920606B/en
Publication of CN108920606A publication Critical patent/CN108920606A/en
Application granted granted Critical
Publication of CN108920606B publication Critical patent/CN108920606B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a map data processing method, a map data processing device, terminal equipment and a storage medium, and belongs to the technical field of maps. The method comprises the following steps: obtaining a map tile data request of any one instance of an electronic map application, wherein the map tile data request comprises at least one data index of map tile data, and the electronic map application comprises at least two instances; obtaining map block data corresponding to the data index in the map block data request; and caching the map block data to a public data cache region, wherein the public data cache region is a cache region commonly accessed by at least two instances in the electronic map application. According to the map block data caching method and device, when the electronic map application works, map block data requested by different examples are stored in the public data caching area, the public data caching area can be accessed by the at least two examples in the electronic map application, the map block data caching is not required to be repeatedly provided for each example, and storage resources required by the map block data storage are saved.

Description

Map data processing method, map data processing device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of map technologies, and in particular, to a map data processing method, an apparatus, a terminal device, and a storage medium.
Background
With the development of technologies such as internet and mobile terminal, electronic maps become an essential part of people's daily life.
In some electronic map applications, the electronic map application may provide multiple instances (instances) that are mapped in different forms. For example, the electronic map application provides three instances, a first instance is displayed through a navigation map of the electronic map application main interface, a second instance is displayed through a desktop widget, and a third instance is displayed through a dashboard of the automobile.
In the working process of the multiple instances, the instances are independent of each other, and each instance independently maintains own map block data, so that the cost of storage resources required by the map block data storage is large.
Disclosure of Invention
The embodiment of the invention provides a map data processing method, a map data processing device, terminal equipment and a storage medium, so that when an electronic map application works, storage resources required by map block data storage can be saved. The technical scheme is as follows:
in one aspect, a method for processing map data is provided, and the method includes:
obtaining a map tile data request of any example of an electronic map application, wherein the map tile data request comprises at least one data index of map tile data, and the electronic map application comprises at least two examples which are used for outputting map pictures on a user interface;
obtaining map block data corresponding to the data index in the map block data request;
caching the map block data to a public data cache region, wherein the public data cache region is a cache region commonly accessed by the at least two instances in the electronic map application.
In another aspect, a map data processing apparatus is also provided, the apparatus including:
the map data acquisition module is used for acquiring a map block data request of any example of an electronic map application, wherein the map block data request comprises at least one data index of map block data, and the electronic map application comprises at least two examples which are used for outputting a map picture on a user interface;
the processing module is used for acquiring map block data corresponding to the data index in the map block data request;
and the cache module is used for caching the map block data to a public data cache region, wherein the public data cache region is a cache region commonly accessed by the at least two instances in the electronic map application.
In another aspect, a terminal device is further provided, where the terminal device includes a processor and a memory, and the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the map data processing method according to the first aspect.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the map data processing method according to the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
when the electronic map application works, the map block data request sent by any one example is used for acquiring corresponding map block data and storing the map block data into the public data cache region, and the public data cache region can be accessed by at least two examples in the electronic map application, so that the map block data cache is not required to be repeatedly provided for each example, and the storage resources required by the map block data storage are saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an electronic map system;
FIG. 2 is a flow chart of a method for processing map data according to an embodiment of the present invention;
FIG. 3 is a timing diagram illustrating another map data processing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating loading of an electronic map according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a map data processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of an electronic map system, referring to fig. 1, the system includes a terminal device 10 and a vehicle-mounted terminal 20, where the terminal device 10 includes, but is not limited to, a smartphone, a tablet computer, a smart wearable device, and the like, and the vehicle-mounted terminal 20 may include the aforementioned dashboard. The electronic map application is installed in the terminal device 10, the electronic map application can perform map display on a navigation map of the terminal device, can also perform map display on desktop widgets of the terminal device, and can also perform map display on an automobile dashboard, and the three display modes can be completed by three instances of the electronic map application. The automobile dashboard can simultaneously display the map with the navigation map (or desktop widget), namely the corresponding instances work simultaneously; and navigation maps and desktop widgets are typically displayed time-shared.
The working process of each example is the same, and comprises the following steps: acquiring map block data; carrying out pattern matching on the acquired map block data to obtain rendering data; and rendering the image by adopting the rendering data to obtain a map picture.
In the working process, the three examples are not related to each other, and each example independently maintains the map block data of the example, so that the storage resource cost required by the map block data storage is large.
It should be noted that the foregoing dashboard is only one implementation manner, and the example in the electronic map application may also output the map picture through another device having a display function.
Fig. 2 is a flowchart of a map data processing method provided in an embodiment of the present invention, and referring to fig. 2, the method is executed by the foregoing terminal device, and the method includes:
step 101: a map tile data request of any instance of an electronic map application is obtained.
Wherein the electronic map application comprises at least two instances. The instances are also objects, and the instances are used for outputting the map picture on the user interface, and the different instances are used for outputting the map picture on different user interfaces, wherein the user interfaces can be a navigation map, a desktop widget and a dashboard of the terminal equipment. The electronic map application can output maps with different interfaces through two or more instances, each instance corresponds to different memory spaces in the terminal equipment, and the electronic map application has independent data and methods. Each instance corresponds to a loading thread and a rendering thread respectively, and data loading and picture rendering are carried out; all the instances correspond to one data engine to acquire data, and the steps 101 to 103 are executed by the data engine, so that the data processing of all the instances is performed by one data engine, and the processing resources can be saved.
When the electronic map application in the terminal equipment works, the loading thread loads map block data firstly, then rendering data is generated according to the map block data, and finally the rendering is carried out through the rendering thread to obtain a map picture. When the map block data is loaded by the loading thread, if the map block data to be loaded does not exist in the cache, a request needs to be made to the data engine to acquire the map block data, and the data engine provides the map block data for the loading thread according to the steps 101 to 103.
Wherein the map tile data request includes a data index of at least one map tile data. In the electronic map application, a map is divided into a plurality of map blocks according to positions, each map block corresponds to a single map block data, and each map block has an index, namely the data index of the map block data corresponding to the map block.
Wherein the map block data includes: the position of the point data, namely the corresponding longitude and latitude, the position of the line data and the position of the plane data can be formed by the positions of a plurality of point data, for example, the position of a straight line can be represented by the positions of points at two ends, and the position of a rectangular plane can be represented by the positions of four vertexes. The style refers to the type of the corresponding pattern of the data on the map, for example, the style of the face data may be a school face, a residential building, etc., the style of the line data may be a white dotted line, a black solid line, etc., and the style of the point data may be a character mark, an interest point, etc.
Step 102: and obtaining the map block data corresponding to the data index in the map block data request.
In the embodiment of the present invention, the map block data may be stored locally, for example, offline data, or stored in the database of the server, so that step 102 actually searches the offline data and/or the database of the server for the map block data corresponding to the data index. For example, map block data corresponding to all data indexes in the map block data request is searched and obtained from the offline data; or, searching the offline data to obtain map block data corresponding to a part of data indexes in the map block data request, and searching the database of the server to obtain map block data corresponding to another part of data indexes in the map block data request; or map block data corresponding to the data index in the map block data request is searched in the database of the server when map block data corresponding to the data index in the map block data request is not searched in the offline data.
Step 103: the map block data is cached to a common data cache region which is commonly accessed by at least two instances in the electronic map application.
Wherein, only one copy of each map block data in the public data buffer area is stored.
And after the map block data corresponding to the data index in the map block data request is obtained, storing the map block data into a public data cache region so as to execute subsequent rendering operation.
When the electronic map application works, the corresponding map block data are acquired and stored in the public data cache region according to the map block data requests sent by different examples, and the public data cache region can be accessed by at least two examples in the electronic map application, so that the map block data cache is not required to be repeatedly provided for each example, and the storage resources required by the map block data storage are saved.
Fig. 3 is a timing diagram of another map data processing method provided by an embodiment of the present invention, referring to fig. 3, where the method is executed by the foregoing terminal device, an electronic map in the terminal device is applied to at least two instances, each instance corresponds to a loading thread and a rendering thread, and all the instances correspond to a data engine, and the method can be executed by the loading thread, the rendering thread, and the data engine, and the flow of the method includes:
step 201: when the touch operation of the user is detected, the map block data needing to be acquired is determined through the loading thread according to the touch operation of the user.
In an electronic map application, a map is divided into a plurality of map blocks, each map block corresponds to a single map block data, and each map block has an index, namely the data index of the map block data corresponding to the map block.
Wherein the map block data includes: the position of the point data, namely the corresponding longitude and latitude, the position of the line data and the position of the plane data can be formed by the positions of a plurality of point data, for example, the position of a straight line can be represented by the positions of points at two ends, and the position of a rectangular plane can be represented by the positions of four vertexes. The style refers to a type of a pattern corresponding to the data on the map, for example, the style of the surface data may be a school surface, a residential building, and the like, the style of the line data may be a white dotted line, a black solid line, and the like, and the style of the Point data may be a text mark, a Point of Interest (POI), and the like.
Specifically, a loading thread monitors a touch event sent by an electronic map application; when a touch event is monitored, indicating that a user touch operation is detected; otherwise, a user touch operation is detected. And the touch event represents that the map output by the instance corresponding to the loading thread which monitors the touch event is touched.
For an example of outputting a map screen through a touch screen of a terminal device: the terminal device detects a user touch operation through the touch screen, when the touch operation of the user is detected, the electronic map application is notified, at this time, the electronic map application determines a corresponding instance according to a currently displayed map picture, and notifies the instance of the touch event, and the instance executes step 201 through a loading thread. For an example of outputting a map screen through a touch screen of a dashboard: if the screen of the dashboard detects the user touch operation, the dashboard notifies the screen of the dashboard of the terminal device that the user touch operation occurs, the terminal device notifies the electronic map application, the electronic map application notifies an instance corresponding to the dashboard of the touch event, and the instance corresponding to the dashboard executes step 201 through a loading thread.
In step 201, determining map block data to be acquired according to a user touch operation may include:
determining the positions of four vertexes before the movement of the currently displayed map picture; determining a moving track and/or a user gesture of a map picture according to the touch operation of a user; determining the positions of four vertexes of the moved map picture according to the moving track and/or the user gesture; determining all map blocks included in the moved map picture according to the positions of four vertexes of the moved map picture; determining map blocks existing in a map picture before moving; and determining the rest map blocks in all the map blocks according to the map blocks existing in the map picture before moving to obtain the map block data required to be acquired.
Where the location may be a latitude and longitude of the point. User gestures include, but are not limited to, map zoom-in, map zoom-out, and the like.
In the process of touch operation, although the corresponding range of the map picture is changed after the touch operation, a part of map blocks in the map picture after the touch operation are still displayed before, so that the part of map blocks does not need to be acquired again.
In this embodiment, each map block may be a rectangle, and the positions of the four vertices of each map block are stored in the terminal device in advance, so that after the positions of the four vertices of the moved map picture are determined, all map blocks included in the moved map picture can be determined. For example, after the positions of four vertices of the moved map picture are determined, map blocks with vertices in a rectangle formed by the four vertices of the moved map picture are searched, and all map blocks included in the moved map picture are obtained. Here, the map block having the four vertices of the moved map screen as the vertices in the rectangle may have one vertex in the rectangle or two or more vertices in the rectangle.
The following describes the map data processing procedure when two examples (examples a and B) are simultaneously operated, with reference to fig. 4:
in step 201, when the range of the map picture corresponding to the instance a is changed, the loading thread corresponding to the instance a determines new map block data that needs to be acquired; when the range of the map picture corresponding to the instance B is changed, the loading thread corresponding to the instance B determines new map block data needing to be acquired.
Step 202: searching the map block data to be acquired in the public data cache region through the loading thread, if all the map block data to be acquired are searched, loading all the map block data to be acquired through the loading thread, and executing the step 208; if all the map block data to be acquired is not found, the found map block data is loaded first by the loading thread (if any map block data is not found, the loading is not required in this step), and step 203 is executed.
The common data cache region is a cache region commonly accessed by at least two instances in the electronic map application, namely, the cache region can be accessed by at least two instances in the electronic map application. The public data cache region is a preset region in the memory, and by designing the public data cache region, the problem that different instances store the same map block data in different positions of the memory respectively after acquiring the same map block data, which causes memory resource waste is avoided.
In this step, searching the map block data to be acquired in the common data buffer may include: and searching the map block data to be acquired in the public data cache region according to the data index of the map block data to be acquired. The public data cache region stores map block data and corresponding data indexes, and the map block data can be stored in sequence according to the sequence of the data indexes, so that the map block data is convenient to search.
As shown in fig. 4, in step 202, the load thread corresponding to the instance a searches for the map block data to be acquired in the common data cache region; and the loading thread corresponding to the example B searches the map block data needing to be acquired in the public data cache region. And two loading threads search the map block data in the same common data cache region. The map block data required to be acquired by the example A and the example B can be the same or different.
Step 203: generating, by the load thread, a map tile data request, the map tile data request including a data index of at least one map tile data.
And the map block data request is generated according to the data index of the map block data which is not searched and needs to be acquired.
As shown in FIG. 4, in step 203, the loading threads of instances A and B respectively generate map tile data requests according to the respective map tile data not found.
Step 204: and transmitting the map block data request to a data engine in the terminal equipment through a loading thread.
Accordingly, the data engine obtains a map tile data request for any instance of the electronic map application.
The data engine is a processing unit in the electronic map application, and has functions of off-line data storage and search, on-line download and the like.
As shown in fig. 4, in step 204, the loading threads of the instances a and B respectively send map tile data requests to the data engine, and the data engine receives the map tile data requests sent by the two loading threads.
Step 205: and obtaining, by the data engine, map tile data corresponding to the data index in the map tile data request.
In the embodiment of the present invention, the map block data may be stored locally, for example, offline data, or stored in the database of the server, so that in step 205, the map block data corresponding to the data index is actually searched in the offline data and/or the database of the server. For example, map block data corresponding to all data indexes in the map block data request is searched and obtained from the offline data; or, searching the offline data to obtain map block data corresponding to a part of data indexes in the map block data request, and searching the database of the server to obtain map block data corresponding to another part of data indexes in the map block data request; or map block data corresponding to the data index in the map block data request is searched in the database of the server when map block data corresponding to the data index in the map block data request is not searched in the offline data.
In this step 205, obtaining the map tile data corresponding to the data index in the map tile data request includes:
and searching the map block data corresponding to the data index in the offline data, wherein the offline data is offline data applied to the electronic map, namely at least two instances share the offline data, and the map block data corresponding to each instance are searched in the offline data. Specifically, the offline data is searched according to the data index, and whether the offline data has corresponding map block data is determined. And when map block data corresponding to all the data indexes are found in the offline data, obtaining the map block data corresponding to the found data indexes in the offline data. When map block data corresponding to partial data indexes are searched in the offline data, map block data corresponding to the searched data indexes are obtained in the offline data, and meanwhile map block data corresponding to the data indexes which are not searched are downloaded from a map server; and when the map block data corresponding to any data index is not found in the offline data, downloading the map block data corresponding to all the data indexes from the map server.
The off-line data stores map block data downloaded by the terminal device, and the map server stores all map block data required by the electronic map application. In the embodiment, all the instances share the offline data, and the offline data does not need to be set for each instance independently, so that the storage resources are saved.
The map block data corresponding to the partial data index is found in the offline data, that is, the data index includes a first data index and a second data index, when the map block data corresponding to the first data index is found in the offline data and the map block data corresponding to the second data index is not found, the map block data corresponding to the first data index is obtained in the offline data, and meanwhile, the map block data corresponding to the second data index is downloaded from the map server. The first data index and the second data index may each include one, two, or more data indexes.
Wherein, downloading the map block data corresponding to the second data index from the map server comprises:
sending a downloading request to a map server, wherein the downloading request comprises a second data index; and receiving map block data sent by the map server.
Wherein, send the download request to the map server, include:
and judging whether a download task corresponding to the second data index exists in the download queue, wherein the download queue is a download queue of the electronic map application, namely at least two instances share the download queue, and map block data corresponding to each instance is downloaded through the download queue.
When the downloading task corresponding to the second data index does not exist in the downloading queue, the downloading task corresponding to the data index is distributed to the downloading queue; when the download queue has the download task corresponding to the second data index, the execution of the download task is only needed to be waited.
And sending a downloading request to the map server through the downloading queue.
The step of allocating the download task corresponding to the data index to the download queue means that the download task corresponding to the data index is allocated to a download thread in the download queue. The online downloading function is realized through the downloading queue, namely the downloading thread queue, can comprise a plurality of downloading threads, and different downloading threads can download different map block data at the same time, so that the parallel downloading of the map block data is realized.
In the embodiment, a plurality of instances share one download queue, so that processing and storage resources are saved. Since the map block data of different examples are obtained by the data engine and then stored in the public data cache region, the same map block data can not be obtained repeatedly, and the downloading times from the map server are naturally reduced. The number of the download threads in the download queue can be designed according to actual requirements, for example, the number of map blocks in a map picture and the requirement on the response speed of the electronic map application can be designed according to default map scale.
Optionally, the method further comprises:
and storing the map block data downloaded from the map server into the offline data. The map block data downloaded from the server is stored in the offline data, so that the map block data does not need to be downloaded again when the same map block data is required subsequently, and the processing resource used for downloading is saved.
As shown in fig. 4, in step 205, the data engine obtains map tile data through offline data and/or online download. If the map block data required to be acquired by the example A and the example B has an overlapped part, and the data engine only needs to acquire the map block data once, so that the processing resource consumption is greatly reduced.
Step 206: map block data is cached by the data engine to a common data cache.
After map block data corresponding to the data index in the map block data request is obtained, the map block data is cached in a public data cache region, so that each instance can perform rendering operation on the map block data through a corresponding rendering thread.
As shown in fig. 4, in step 206, the data engine buffers map block data into a common data buffer. If the map block data required to be acquired by the example A and the example B have overlapped parts, the part of the map block data only needs to be stored once in the public data cache region, and therefore storage resources are greatly saved.
Step 207: and searching the map block data which is not acquired in the public data cache region again through the loading thread.
In the embodiment of the present invention, if all the map block data that needs to be obtained are not found in step 202, the finding operation is performed periodically, that is, the map block data that is not found is periodically found in the common data cache until all the map block data that needs to be obtained are found in the common data cache. And in the searching process, the loading thread loads the newly searched map block data each time until all the map block data needing to be acquired are loaded.
The periodic interval of the search action may be designed according to needs, for example, 1 second or 0.5 second.
This step 207 is the same as step 202 and will not be described in detail here.
As shown in fig. 4, in step 207, the loading thread corresponding to instance a searches for map block data that is not found in step 202 in the common data cache area; the loading thread corresponding to the example B searches the map data that is not found in the step 202 in the common data cache area.
Step 208: and carrying out pattern matching on the map block data through a rendering thread to obtain rendering data.
The pattern matching is to form a pattern by using different patterns for different dot, line and plane data. For example, if the plane data corresponds to a highway, matching is performed using the pattern of the highway to form a pattern. Rendering data obtained through pattern matching is a vector diagram.
As shown in fig. 4, in step 208, the rendering thread corresponding to the instance a performs pattern matching on the map tile data acquired by the loading thread corresponding to the instance a; and the rendering thread corresponding to the example B performs pattern matching on the map block data acquired by the loading thread corresponding to the example B.
Step 209: and rendering the image by adopting the rendering data through the rendering thread to obtain a map picture.
The image rendering by using the rendering data means that vector rasterization is performed on the pattern formed in the previous step, that is, the vector graphics are converted into a bitmap (raster image), and finally a map picture is formed.
As shown in fig. 4, in step 209, the rendering thread corresponding to the instance a and the rendering thread corresponding to the instance B respectively use their rendering data to perform image rendering.
When the electronic map application works, the corresponding map block data are acquired and stored in the public data cache region according to the map block data requests sent by different examples, and the public data cache region can be accessed by at least two examples in the electronic map application, so that the map block data cache is not required to be repeatedly provided for each example, and the storage resources required by the map block data storage are saved. In addition, all embodiments in the application share the offline data, so that storage resources occupied by the offline data can be saved; meanwhile, all the embodiments share the download queue, the situation that the same map block data is repeatedly downloaded cannot occur, and processing resources and network resources are saved.
Fig. 5 is a schematic structural diagram of a map data processing apparatus according to an embodiment of the present invention, and referring to fig. 5, the apparatus includes: an acquisition module 301, a processing module 302 and a cache module 303. The obtaining module 301 is configured to obtain a map tile data request of any instance of an electronic map application, where the map tile data request includes at least one data index of map tile data, and the electronic map application includes at least two instances, and the instances are used for outputting a map screen on a user interface. The processing module 302 is used to obtain the map tile data corresponding to the data index in the map tile data request. The caching module 303 is configured to cache the map block data in a common data cache region, where the common data cache region is a cache region commonly accessed by at least two instances in the electronic map application.
Optionally, the processing module 302 includes an offline acquisition submodule 321 and an online acquisition submodule 322. The offline obtaining sub-module 321 is configured to search, in the offline data, map tile data corresponding to a data index, where the offline data is offline data applied to an electronic map, and the data index includes a first data index and a second data index; when the map block data corresponding to the first data index is found in the offline data and the map block data corresponding to the second data index is not found, obtaining the map block data corresponding to the first data index from the offline data; the online obtaining sub-module 322 is used for downloading the map block data corresponding to the second data index from the map server.
The online obtaining submodule 322 is configured to send a download request to the map server, where the download request includes a second data index; and receiving map block data sent by the map server.
The online obtaining submodule 322 is configured to determine whether a download task corresponding to the second data index exists in a download queue, where the download queue is a download queue of the electronic map application; when the downloading task corresponding to the second data index does not exist in the downloading queue, the downloading task corresponding to the data index is distributed to the downloading queue; and sending a downloading request to the map server through the downloading queue.
Optionally, the apparatus further comprises: and the storage module 304 is used for storing the map block data downloaded from the map server into the offline data.
Optionally, the apparatus further comprises: the searching module 305 is configured to, when a user touch operation is detected, determine map block data to be acquired according to the user touch operation; searching map block data to be acquired in a public data cache region; and the generating module 306 is configured to generate a map block data request according to the data index of the map block data that is not found when all the map block data that needs to be acquired is not found in the public data cache region.
Optionally, the searching module 305 is further configured to periodically search the public data cache for map block data that is not found.
It should be noted that: in the map data processing apparatus provided in the above embodiment, when the map data processing method is implemented, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the map data processing apparatus provided in the above embodiment and the map data processing method embodiment belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiment and are not described herein again.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. The terminal device may be a mobile terminal. Specifically, the method comprises the following steps: the terminal device 400 includes: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store at least one instruction for execution by processor 401 to implement the driving reminder method provided by the method embodiments herein.
In some embodiments, the terminal device 400 may further include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 404, touch screen display 405, camera 406, audio circuitry 407, positioning components 408, and power supply 409.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to capture touch signals on or over the surface of the display screen 405. The touch signal may be input to the processor 401 as a control signal for processing. At this point, the display screen 405 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 405 may be one, providing the front panel of the terminal device 400; in other embodiments, the display screen 405 may be at least two, and respectively disposed on different surfaces of the terminal device 400 or in a folding design; in still other embodiments, the display 405 may be a flexible display disposed on a curved surface or on a folded surface of the terminal device 400. Even further, the display screen 405 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display screen 405 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 401 for processing, or inputting the electric signals to the radio frequency circuit 404 for realizing voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different positions of the terminal device 400. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 407 may also include a headphone jack.
The positioning component 408 is used to locate the current geographic position of the terminal device 400 for navigation or LBS (location based Service). The positioning component 408 may be a positioning component based on the GPS (global positioning System) of the united states, the beidou System of china, the graves System of russia, or the galileo System of the european union.
The power supply 409 is used to supply power to various components in the terminal device 400. The power source 409 may be alternating current, direct current, disposable or rechargeable. When power source 409 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal device 400 further includes one or more sensors 140. The one or more sensors 140 include, but are not limited to: acceleration sensor 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414, optical sensor 415, and proximity sensor 416.
The acceleration sensor 411 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal device 400. For example, the acceleration sensor 411 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 401 may control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 412 may detect a body direction and a rotation angle of the terminal device 400, and the gyro sensor 412 may cooperate with the acceleration sensor 411 to acquire a 3D motion of the user on the terminal device 400. From the data collected by the gyro sensor 412, the processor 401 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 413 may be disposed on a side bezel of the terminal device 400 and/or on a lower layer of the touch display screen 405. When the pressure sensor 413 is arranged on the side frame of the terminal device 400, the holding signal of the user to the terminal device 400 can be detected, and the processor 401 performs left-right hand identification or shortcut operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed at the lower layer of the touch display screen 405, the processor 401 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 405. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 414 is used for collecting a fingerprint of the user, and the processor 401 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 401 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 414 may be provided on the front, back or side of the terminal device 400. When a physical key or vendor Logo is provided on the terminal device 400, the fingerprint sensor 414 may be integrated with the physical key or vendor Logo.
The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 may control the display brightness of the touch display screen 405 based on the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is turned down. In another embodiment, the processor 401 may also dynamically adjust the shooting parameters of the camera assembly 406 according to the ambient light intensity collected by the optical sensor 415.
The proximity sensor 416, also called a distance sensor, is generally provided on the front panel of the terminal device 400. The proximity sensor 416 is used to collect the distance between the user and the front surface of the terminal device 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal device 400 gradually decreases, the processor 401 controls the touch display screen 405 to switch from the bright screen state to the dark screen state; when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal device 400 becomes gradually larger, the processor 401 controls the touch display screen 405 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 does not constitute a limitation of the terminal device 400, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU. The one or more programs include instructions for performing the map data processing method shown in fig. 2 or 3 provided by the embodiment of the present invention.
Embodiments of the present invention also provide a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of a computing system, enable the computing system to perform the map data processing method provided in the embodiment shown in fig. 2 or fig. 3.
A computer program product containing instructions which, when run on a computer, cause the computer to perform the map data processing method provided by the embodiment shown in fig. 2 or fig. 3 described above.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A method for processing map data, the method comprising:
obtaining a map tile data request of any example of an electronic map application, wherein the map tile data request comprises at least one data index of map tile data, and the electronic map application comprises at least two examples which are used for outputting map pictures on a user interface;
searching map block data corresponding to the data index in offline data, wherein the offline data is offline data applied to the electronic map and comprises a first data index and a second data index;
when the map block data corresponding to the first data index is found in the offline data and the map block data corresponding to the second data index is not found, obtaining the map block data corresponding to the first data index from the offline data, and downloading the map block data corresponding to the second data index from a map server;
caching the map block data to a public data cache region, wherein the public data cache region is a cache region commonly accessed by the at least two instances in the electronic map application.
2. The method of claim 1, wherein downloading map tile data corresponding to the second data index from a map server comprises:
sending a download request to the map server, the download request including the second data index;
and receiving map block data sent by the map server.
3. The method of claim 2, wherein sending a download request to the map server comprises:
judging whether a download task corresponding to the second data index exists in a download queue, wherein the download queue is a download queue of the electronic map application;
when the download queue does not have the download task corresponding to the second data index, distributing the download task corresponding to the second data index to the download queue;
and sending the downloading request to the map server through the downloading queue.
4. The method of claim 1, further comprising:
and storing the map block data downloaded from the map server into the offline data.
5. The method of any of claims 1 to 4, wherein the obtaining map tile data requests of any instance of an electronic map application comprises:
when the touch operation of a user is detected, determining map block data needing to be acquired according to the touch operation of the user;
searching map block data to be acquired in the public data cache region;
and when all the map block data needing to be acquired are not searched in the public data cache region, generating the map block data request according to the data index of the map block data which are not searched.
6. The method of claim 5, further comprising:
and periodically searching the map block data which is not found in the public data cache region.
7. A map data processing apparatus, characterized in that the apparatus comprises:
the map data acquisition module is used for acquiring a map block data request of any example of an electronic map application, wherein the map block data request comprises at least one data index of map block data, and the electronic map application comprises at least two examples which are used for outputting a map picture on a user interface;
the processing module is used for searching map block data corresponding to the data index in offline data, wherein the offline data is offline data applied to the electronic map, and the data index comprises a first data index and a second data index;
when the map block data corresponding to the first data index is found in the offline data and the map block data corresponding to the second data index is not found, obtaining the map block data corresponding to the first data index from the offline data, and downloading the map block data corresponding to the second data index from a map server;
and the cache module is used for caching the map block data to a public data cache region, wherein the public data cache region is a cache region commonly accessed by the at least two instances in the electronic map application.
8. A terminal device, characterized in that the terminal device comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to realize the map data processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to implement the map data processing method according to any one of claims 1 to 6.
CN201810685308.2A 2018-06-28 2018-06-28 Map data processing method, map data processing device, terminal equipment and storage medium Active CN108920606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810685308.2A CN108920606B (en) 2018-06-28 2018-06-28 Map data processing method, map data processing device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810685308.2A CN108920606B (en) 2018-06-28 2018-06-28 Map data processing method, map data processing device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108920606A CN108920606A (en) 2018-11-30
CN108920606B true CN108920606B (en) 2020-10-23

Family

ID=64423145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810685308.2A Active CN108920606B (en) 2018-06-28 2018-06-28 Map data processing method, map data processing device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108920606B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857821B (en) * 2018-12-28 2023-10-20 浙江海幻信息技术有限公司 Method for recording motion trail, terminal and computer readable storage medium
CN110333835B (en) * 2019-05-09 2023-07-25 阿波罗智联(北京)科技有限公司 Vehicle-mounted data image display method, system, electronic equipment and computer readable medium
CN110674134B (en) * 2019-09-16 2024-02-13 腾讯大地通途(北京)科技有限公司 Geographic information data storage method, query method and device
CN111672109B (en) * 2020-06-10 2021-12-03 腾讯科技(深圳)有限公司 Game map generation method, game testing method and related device
CN112333787B (en) * 2020-11-13 2023-09-12 Oppo广东移动通信有限公司 Data transmission method, device, storage medium, terminal and network access point equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038550A (en) * 2006-03-17 2007-09-19 国际商业机器公司 Information processing apparatus and information processing method
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN104375857A (en) * 2014-10-22 2015-02-25 腾讯科技(深圳)有限公司 Method and device for enabling application program to operate multiple instances and terminal equipment
CN104618503A (en) * 2015-02-15 2015-05-13 西安酷派软件科技有限公司 Inter-system data synchronization and sharing method and device as well as terminal
CN106021591A (en) * 2016-06-06 2016-10-12 北京奇虎科技有限公司 Data processing method and system for terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160210273A1 (en) * 2015-01-15 2016-07-21 Sap Se In-memory workspace management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038550A (en) * 2006-03-17 2007-09-19 国际商业机器公司 Information processing apparatus and information processing method
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN104375857A (en) * 2014-10-22 2015-02-25 腾讯科技(深圳)有限公司 Method and device for enabling application program to operate multiple instances and terminal equipment
CN104618503A (en) * 2015-02-15 2015-05-13 西安酷派软件科技有限公司 Inter-system data synchronization and sharing method and device as well as terminal
CN106021591A (en) * 2016-06-06 2016-10-12 北京奇虎科技有限公司 Data processing method and system for terminal

Also Published As

Publication number Publication date
CN108920606A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108920606B (en) Map data processing method, map data processing device, terminal equipment and storage medium
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN109862412B (en) Method and device for video co-shooting and storage medium
CN110362366B (en) Application interface display method and device
CN110659127A (en) Method, device and system for processing task
CN111159604A (en) Picture resource loading method and device
CN108734662B (en) Method and device for displaying icons
CN107943484B (en) Method and device for executing business function
CN110569064B (en) Interface identifier generation method, device, equipment and storage medium
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN110971840B (en) Video mapping method and device, computer equipment and storage medium
CN111275607A (en) Interface display method and device, computer equipment and storage medium
CN112181915A (en) Method, device, terminal and storage medium for executing service
CN112699906B (en) Method, device and storage medium for acquiring training data
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN110119233B (en) Content pushing method and device, terminal and storage medium
CN113836426A (en) Information pushing method and device and electronic equipment
CN110851435B (en) Data storage method and device
CN113051485A (en) Group searching method, device, terminal and storage medium
CN113158099A (en) Page display method and device and storage medium
CN111125571B (en) Picture display method and device
CN111222124B (en) Method, device, equipment and storage medium for using authority distribution
CN111798358B (en) Method and device for determining path time, electronic equipment and readable storage medium
CN111522576B (en) Application management method, device, equipment and computer storage medium
CN111382152B (en) Data table processing method, device and storage medium

Legal Events

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