CN112559647A - Method and device for updating data of map layer - Google Patents

Method and device for updating data of map layer Download PDF

Info

Publication number
CN112559647A
CN112559647A CN201910850601.4A CN201910850601A CN112559647A CN 112559647 A CN112559647 A CN 112559647A CN 201910850601 A CN201910850601 A CN 201910850601A CN 112559647 A CN112559647 A CN 112559647A
Authority
CN
China
Prior art keywords
data
data set
rendering
layer
currently used
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.)
Pending
Application number
CN201910850601.4A
Other languages
Chinese (zh)
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.)
TD Tech Chengdu Co Ltd
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN201910850601.4A priority Critical patent/CN112559647A/en
Publication of CN112559647A publication Critical patent/CN112559647A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • 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/26Visual data mining; Browsing structured data

Landscapes

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

Abstract

The application discloses a method and a device for updating data of a map layer, wherein the method comprises the following steps: a. for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing the step b; otherwise, executing step c; b. if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step d; c. comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result; d. assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data. By applying the technical scheme disclosed by the application, the running stability of the electronic map can be effectively improved.

Description

Method and device for updating data of map layer
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for updating map layer data.
Background
In a layer data refreshing scheme of an existing electronic map (such as a riemann map), a method of firstly clearing existing data of a layer and then adding new data in batches is generally adopted.
In carrying out the present invention, applicants have discovered that: under the scene that the number of layers is large, the data amount is large, and frequent updating is needed, the map layer data updating scheme is adopted, the problems that map operation is not smooth and is blocked exist, and therefore user experience can be seriously reduced. The specific reasons are analyzed as follows:
because the Software Development Kit (SDK) of the electronic map does not provide an incremental update interface for the map layer, the update operation of the map layer data must be performed in the application layer, which increases the overhead of the application layer, and causes problems of data display blocking, abnormality and the like when the map operation is frequent, the update is not timely, or the data calculation is lost.
Disclosure of Invention
The application provides a method and a device for updating data of a map layer, which can effectively improve the running stability of an electronic map.
A map layer data updating method comprises the following steps:
a. for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing the step b; otherwise, executing step c;
b. if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step d;
c. comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result;
d. assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data.
Preferably, the deleting, adding or replacing the data in the data set of the layer currently used for rendering in step c includes:
when the data set for rendering currently is empty, adding all data in the new data set to the data set for rendering currently;
when the data set for rendering currently is not empty, for each piece of data in the data set for rendering currently, if the piece of data is not in the new data set, deleting the piece of data; and for each piece of data in the new data set, if the piece of data is not in the data set currently used for rendering of the graph, adding the piece of data into the data set currently used for rendering, otherwise, comparing the piece of data with the same number in the data set currently used for rendering, and replacing the data with the same number according to the comparison result.
Preferably, the replacing the data with the same number according to the comparison result includes:
and if the piece of data is different from the data with the same number in the data set of the layer currently used for rendering, replacing the data with the same number in the data set of the layer currently used for rendering by using the piece of data.
An apparatus for updating map layer data, comprising: a processor to:
a. for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing the step b; otherwise, executing step c;
b. if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step d;
c. comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result;
d. assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data.
Preferably, the processor is specifically configured to: in step c, deleting, adding, or replacing data in the data set currently used for rendering by the layer, including:
when the data set for rendering currently is empty, adding all data in the new data set to the data set for rendering currently;
when the data set for rendering currently is not empty, for each piece of data in the data set for rendering currently, if the piece of data is not in the new data set, deleting the piece of data; and for each piece of data in the new data set, if the piece of data is not in the data set currently used for rendering of the graph, adding the piece of data into the data set currently used for rendering, otherwise, comparing the piece of data with the same number in the data set currently used for rendering, and replacing the data with the same number according to the comparison result.
Preferably, the processor is specifically configured to: according to the comparison result, replacing the data with the same number comprises the following steps:
and if the piece of data is different from the data with the same number in the data set of the layer currently used for rendering, replacing the data with the same number in the data set of the layer currently used for rendering by using the piece of data.
The present application also discloses a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the method for updating map layer data as described above.
The application also discloses an electronic device comprising the non-volatile computer-readable storage medium as described above, and the processor having access to the non-volatile computer-readable storage medium.
According to the technical scheme, the method and the device for updating the map layer data provided by the application, when the layer data is updated, the mode of simply emptying the data and refilling the new data is not adopted, but first based on the data in the new data set used to update the layer and the original data set of the layer (i.e. the data set currently used for rendering), the data set currently used for rendering is updated, so that the updated data quantity can be effectively reduced, useless data updating is avoided, therefore, the updating efficiency of the layer data can be improved, especially under the scene that the number of layers is large, the data volume is large and the updating is required to be frequently carried out, the updating efficiency can be greatly improved, the influence of the updating of the layer data on the map operation is avoided, and further, the fluency of the operation of the electronic map can be improved, and the running stability of the electronic map can be effectively improved.
Drawings
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below by referring to the accompanying drawings and examples.
In consideration of the fact that the same data possibly exists between the new data set of the map layer and the data set of the map layer used for rendering currently when the map layer is updated, and the same data is useless for updating, the useless data updating is avoided as much as possible in the application, so that the map layer updating efficiency is improved, the influence of the map layer data updating on map operation is avoided, and the smoothness of the electronic map operation and the stability of the electronic map operation are improved.
Fig. 1 is a schematic flowchart of a method according to an embodiment of the present invention, and as shown in fig. 1, the method for updating map layer data implemented in the embodiment mainly includes:
step 101, for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing step 102; otherwise, step 104 is performed.
In this step, for a single layer that needs to be updated, it is necessary to determine whether a new data set of the layer is empty, if so, it indicates that the data of the updated layer is empty, step 102 needs to be performed to empty the data set currently used for rendering of the layer, and if not, step 104 needs to be performed to determine the data content that the updated data set of the corresponding layer needs to contain, based on the data comparison condition between the new data set and the old data set.
And 102-103, if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step 105, otherwise, ending the updating of the layer.
It should be noted here that, if the data set currently used for rendering and the new data set of the layer are both empty, it is indicated that the layer does not need to be updated, and the updating of the layer is directly ended.
And 104, comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result.
In order to reduce the data amount of layer update as much as possible and improve the update efficiency, in this step, the new data set needs to be compared with the data set of the layer currently used for rendering, so as to update the data in the data set of the layer currently used for rendering according to the comparison result.
Preferably, in order to reduce the number of data updates to the maximum extent, in step 104, the data set currently used for rendering of the layer may be updated only according to the difference part data between the two sets obtained after the comparison, and based on this purpose, the following method may be specifically adopted to delete, add, or replace the data in the data set currently used for rendering of the layer:
when the data set for rendering currently is empty, adding all data in the new data set to the data set for rendering currently;
when the data set for rendering currently is not empty, for each piece of data in the data set for rendering currently, if the piece of data is not in the new data set, deleting the piece of data; and for each piece of data in the new data set, if the piece of data is not in the data set currently used for rendering of the graph, adding the piece of data into the data set currently used for rendering, otherwise, comparing the piece of data with the same number in the data set currently used for rendering, and replacing the data with the same number according to the comparison result.
Preferably, when a piece of data in the new data set is compared with data with the same number in the data set currently used for rendering, the data with the same number may be replaced according to the comparison result by the following method:
if the data is different from the data with the same number in the data set of the layer currently used for rendering, replacing the data with the same number in the data set of the layer currently used for rendering by using the data, otherwise, indicating that the corresponding data in the two sets are the same, so that the corresponding data updating operation is not needed.
Step 105, assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data.
In this step, the specific methods of assembling and rendering are known to those skilled in the art, and are not described herein again.
Therefore, the efficient updating of one layer of the electronic map can be realized by utilizing the steps 101 to 105.
In practical application, the method can be used for realizing the layer data updating of the riemann map, but is not limited to the method, and the method is applicable to electronic maps with the problems in the background art.
Corresponding to the above method embodiment, the present application further provides a device for updating map layer data, including: a processor to:
step 101, for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing step 102; otherwise, step 104 is performed.
And 102-103, if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step 105, otherwise, ending the updating of the layer.
And 104, comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result.
Step 105, assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data.
Preferably, the processor is specifically configured to: deleting, adding or replacing data in the data set of the layer currently used for rendering in step 104, including:
when the data set for rendering currently is empty, adding all data in the new data set to the data set for rendering currently;
when the data set for rendering currently is not empty, for each piece of data in the data set for rendering currently, if the piece of data is not in the new data set, deleting the piece of data; and for each piece of data in the new data set, if the piece of data is not in the data set currently used for rendering of the graph, adding the piece of data into the data set currently used for rendering, otherwise, comparing the piece of data with the same number in the data set currently used for rendering, and replacing the data with the same number according to the comparison result.
Preferably, the processor is specifically configured to: according to the comparison result, replacing the data with the same number comprises the following steps:
and if the piece of data is different from the data with the same number in the data set of the layer currently used for rendering, replacing the data with the same number in the data set of the layer currently used for rendering by using the piece of data.
Furthermore, the present application also provides a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the method for updating map layer data as described above.
Further, the present application provides an electronic device comprising the non-volatile computer-readable storage medium as described above, and the processor having access to the non-volatile computer-readable storage medium.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A method for updating map layer data, comprising:
a. for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing the step b; otherwise, executing step c;
b. if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step d;
c. comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result;
d. assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data.
2. The method according to claim 1, wherein the deleting, adding or replacing data in the data set of the layer currently used for rendering in step c comprises:
when the data set for rendering currently is empty, adding all data in the new data set to the data set for rendering currently;
when the data set for rendering currently is not empty, for each piece of data in the data set for rendering currently, if the piece of data is not in the new data set, deleting the piece of data; and for each piece of data in the new data set, if the piece of data is not in the data set currently used for rendering of the graph, adding the piece of data into the data set currently used for rendering, otherwise, comparing the piece of data with the same number in the data set currently used for rendering, and replacing the data with the same number according to the comparison result.
3. The method of claim 2, wherein: the replacing the data with the same number according to the comparison result includes:
and if the piece of data is different from the data with the same number in the data set of the layer currently used for rendering, replacing the data with the same number in the data set of the layer currently used for rendering by using the piece of data.
4. An apparatus for updating map layer data, comprising: a processor to:
a. for a single layer which needs to be updated currently, judging whether a new data set of the layer is empty, and if the new data set of the layer is empty, executing the step b; otherwise, executing step c;
b. if the data set of the layer currently used for rendering is not empty, emptying the data set of the layer currently used for rendering, and executing the step d;
c. comparing the new data set with the data set of the layer currently used for rendering, and deleting, adding or replacing data in the data set of the layer currently used for rendering according to a comparison result;
d. assembling data in a data set of the layer currently used for rendering into corresponding map format data; and rendering the layer by using the map format data.
5. The apparatus of claim 4, wherein the processor is specifically configured to: in step c, deleting, adding, or replacing data in the data set currently used for rendering by the layer, including:
when the data set for rendering currently is empty, adding all data in the new data set to the data set for rendering currently;
when the data set for rendering currently is not empty, for each piece of data in the data set for rendering currently, if the piece of data is not in the new data set, deleting the piece of data; and for each piece of data in the new data set, if the piece of data is not in the data set currently used for rendering of the graph, adding the piece of data into the data set currently used for rendering, otherwise, comparing the piece of data with the same number in the data set currently used for rendering, and replacing the data with the same number according to the comparison result.
6. The apparatus of claim 5, wherein the processor is specifically configured to: according to the comparison result, replacing the data with the same number comprises the following steps:
and if the piece of data is different from the data with the same number in the data set of the layer currently used for rendering, replacing the data with the same number in the data set of the layer currently used for rendering by using the piece of data.
7. A non-transitory computer-readable storage medium storing instructions, which when executed by a processor, cause the processor to perform the steps of the method for updating map layer data according to any one of claims 1 to 3.
8. An electronic device comprising the non-volatile computer-readable storage medium of claim 7, and the processor having access to the non-volatile computer-readable storage medium.
CN201910850601.4A 2019-09-10 2019-09-10 Method and device for updating data of map layer Pending CN112559647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910850601.4A CN112559647A (en) 2019-09-10 2019-09-10 Method and device for updating data of map layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910850601.4A CN112559647A (en) 2019-09-10 2019-09-10 Method and device for updating data of map layer

Publications (1)

Publication Number Publication Date
CN112559647A true CN112559647A (en) 2021-03-26

Family

ID=75028776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910850601.4A Pending CN112559647A (en) 2019-09-10 2019-09-10 Method and device for updating data of map layer

Country Status (1)

Country Link
CN (1) CN112559647A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023010851A1 (en) * 2021-08-05 2023-02-09 稿定(厦门)科技有限公司 Webgl-based graphics rendering method, apparatus and system
CN117152324A (en) * 2023-09-04 2023-12-01 艾迪普科技股份有限公司 Data driving method and device based on three-dimensional player

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999573A (en) * 2012-11-09 2013-03-27 中国铁道科学研究院电子计算技术研究所 Cache updating method for stripped GIS (Geographic Information System) map elements
CN105426372A (en) * 2014-09-17 2016-03-23 高德软件有限公司 Electronic map data manufacturing and updating method and apparatus
CN105589869A (en) * 2014-10-22 2016-05-18 方正国际软件(北京)有限公司 Note generation method and device of geographic information system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999573A (en) * 2012-11-09 2013-03-27 中国铁道科学研究院电子计算技术研究所 Cache updating method for stripped GIS (Geographic Information System) map elements
CN105426372A (en) * 2014-09-17 2016-03-23 高德软件有限公司 Electronic map data manufacturing and updating method and apparatus
CN105589869A (en) * 2014-10-22 2016-05-18 方正国际软件(北京)有限公司 Note generation method and device of geographic information system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023010851A1 (en) * 2021-08-05 2023-02-09 稿定(厦门)科技有限公司 Webgl-based graphics rendering method, apparatus and system
CN117152324A (en) * 2023-09-04 2023-12-01 艾迪普科技股份有限公司 Data driving method and device based on three-dimensional player

Similar Documents

Publication Publication Date Title
EP3021218B1 (en) Upgrade packet generation method, server, software upgrade method, and mobile terminal
CN104090806B (en) The processing method and processing device of AKU, upgrade request
US11150949B2 (en) Resource release method, resource allocation method, devices, and computer program products
CN105677789A (en) Method and system for managing directory capacity of distributed file system
CN110287170B (en) Database upgrading method, state data calling method, device and storage medium
CN106406925A (en) An apparatus and a method used for supporting online upgrade
EP3051408A1 (en) Data operating method and device
CN112559647A (en) Method and device for updating data of map layer
CN110870287B (en) Over-the-air (OTA) update of partially compressed firmware
CN107016280A (en) The upgrade method and system of a kind of client application
US10795579B2 (en) Methods, apparatuses, system and computer program products for reclaiming storage units
CN111858577B (en) Method, apparatus and computer program product for storage management
US20190129807A1 (en) Method and device for managing a virtual machine
CN109257228A (en) A kind of data-updating method and Edge Server
CN104536816A (en) Method for improving migration efficiency of virtual machine
CN115525221A (en) Data updating method, device, equipment and medium
CN111143231B (en) Method, apparatus and computer program product for data processing
US11048417B2 (en) Method, device and computer program product for storage management
CN113742131A (en) Method, electronic device and computer program product for storage management
CN104516764B (en) Compressed file dynamic packaging method and system
CN105630967A (en) Caching method and device based on GIS display data
CN109164990A (en) A kind of memory data update method, device, equipment and storage medium
CN104407905A (en) Deep cleaning and updating method and device
CN111581157B (en) Object storage platform, object operation method, device and server
CN108052294A (en) A kind of modification write method of distributed memory system and repair replacement system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210326