A method, device, terminal and computer storage medium for rendering electronic maps

By acquiring and processing the layers of electronic maps in the terminal according to the map level, the problems of massive data rendering delay and client performance are solved, and efficient electronic map rendering is achieved.

CN113971190BActive Publication Date: 2025-05-13CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010712743.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-22
Publication Date
2025-05-13
Estimated Expiration
2040-07-22

AI Technical Summary

Technical Problem

When facing massive data, existing electronic map rendering technology has problems such as long rendering delay, poor user experience and possible client crashes.

Method used

By obtaining the location request in the terminal, obtaining the layer of the position point to be presented according to the category of the map level, and rendering it according to the base map layer of the electronic map corresponding to the map level to obtain the rendered electronic map. Specifically, the first class hierarchy is used to obtain layers from the server, and the second class hierarchy is used to aggregate or classify the location points to reduce the amount of data.

Benefits of technology

This method can adapt to the location requests of massive data, shorten the rendering delay, improve the rendering efficiency of electronic maps, and avoid client crashes and jams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971190B_ABST
    Figure CN113971190B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for rendering an electronic map, which is applied in a terminal. The method comprises: obtaining a location request for an electronic map in the terminal, obtaining a layer of a location point to be presented according to the category of the map hierarchy, rendering the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map hierarchy, obtaining a rendered electronic map and presenting it. The embodiment of the present invention also discloses a rendering device, a terminal and a computer storage medium for an electronic map, which improves the rendering efficiency in the case of rendering massive data and shortens the excessive delay of rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to electronic map rendering technology, and in particular to an electronic map rendering method, device, terminal and computer storage medium. Background Art

[0002] At present, in terms of electronic map presentation and rendering technology for massive data, traditional map data presentation solutions, aggregation point technology, ArcGIS feature service layer technology, etc. are usually used.

[0003] However, in the case of large amounts of data, the traditional map data presentation solution requires a long time to process data in the background, and the interface response speed is slow. In addition, the efficiency of the front-end client dot-marking method is limited by the size of the client memory. The aggregation point technology is used, but the aggregation cost is too high due to the high calculation complexity. In the ArcGIS-based feature layer service technology, the layer rendering speed is limited by the size of the data and the client performance, and it cannot meet the business needs of frequent data updates. It still consumes a lot of client memory and there are certain performance bottlenecks when rendering large quantities of data.

[0004] It can be seen that the existing electronic map rendering technology is often limited by factors such as the size of the data loaded and presented at a single time and the client's memory performance, resulting in long rendering delays and poor user experience when rendering massive data. What's more serious is that it will directly lead to client crashes and freezes. It can be seen that the existing electronic map rendering method has technical problems that are not suitable for rendering massive data. Summary of the invention

[0005] In view of this, the present invention provides a method, device, terminal and computer storage medium for rendering an electronic map to solve the technical problem that the prior art is not suitable for rendering massive data.

[0006] The technical solution of this application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for rendering an electronic map, the method being applied in a terminal, the method comprising:

[0008] For the electronic map in the terminal, a location request is obtained; wherein the location request includes a location point to be presented and a map level for presenting the location point to be presented;

[0009] According to the category of the map layer, obtaining the layer of the location point to be presented;

[0010] According to the base map layer of the electronic map corresponding to the map level, the layer of the location point to be presented is rendered to obtain the rendered electronic map and present it.

[0011] In the above method, obtaining the layer of the location point to be presented according to the map level includes:

[0012] When the map level is a first level, obtaining a layer of the location point to be presented from a server corresponding to the terminal;

[0013] When the map level is the second level, the location point to be presented is processed to obtain the processed location point, and a layer of the processed location point is obtained.

[0014] In the above method, when the map level is the second level, processing the location point to be presented to obtain the processed location point, and obtaining the layer of the processed location point includes:

[0015] When the map level is a first sub-level in a second level, performing aggregation processing on the location points to be presented to obtain the processed location points;

[0016] Draw a layer of the processed position points.

[0017] In the above method, when the map level is the second level, processing the location point to be presented to obtain the processed location point, and obtaining the layer of the processed location point includes:

[0018] When the map level is a second sub-level in the second level, classifying the location points to be presented to obtain the processed location points;

[0019] For each type of location points in the processed location points, a layer of each type of location points is obtained from the server.

[0020] In the above method, before obtaining the layer of the location point to be presented according to the category of the map level, the method further includes:

[0021] Determine the category of the map level that is less than or equal to the first preset map level as the first category of levels;

[0022] Determine the category of a map level that is greater than the first preset map level and less than or equal to the second preset map level as the first sub-level;

[0023] The category of the map level that is greater than the second preset map level is determined as the second type of sub-level.

[0024] In the above method, after acquiring the layer of each type of location points in the processed location points from the server, the method further includes:

[0025] According to the category of each type of location points, the layer of each type of location points is labeled according to the identifier corresponding to the category of each type of location points to obtain the processed layer of each type of location points, and the processed layer of each type of location points is stored.

[0026] In the above method, after labeling the layers of each type of location points according to the categories of each type of location points, respectively according to the identifiers corresponding to the categories of each type of location points, obtaining the processed layers of each type of location points, and storing the processed layers of each type of location points, the method further includes:

[0027] Obtaining a location request for a first type of location point in each type of location point;

[0028] According to the base map layer of the electronic map corresponding to the second sub-level, the layer of the first type of location points in the processed layers of each type of location points is rendered to obtain the rendered electronic map for the first type of location points.

[0029] In a second aspect, the present invention provides a device for rendering an electronic map, the device being arranged in a terminal, the device comprising:

[0030] A first acquisition module is used to acquire a location request for the electronic map in the terminal; wherein the location request includes a location point to be presented and a map level for presenting the location point to be presented;

[0031] A second acquisition module, used for acquiring the layer of the location point to be presented according to the category of the map layer;

[0032] The rendering module is used to render the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map level, obtain the rendered electronic map and present it.

[0033] In the above device, the second acquisition module is specifically used to:

[0034] When the map level is a first level, obtaining a layer of the location point to be presented from a server corresponding to the terminal;

[0035] When the map level is the second level, the location point to be presented is processed to obtain the processed location point, and a layer of the processed location point is obtained.

[0036] In the above device, when the map level is the second level, the second acquisition module processes the location point to be presented to obtain the processed location point, and the layer of the processed location point is obtained, including:

[0037] When the map level is a first sub-level in a second level, performing aggregation processing on the location points to be presented to obtain the processed location points;

[0038] Draw a layer of the processed position points.

[0039] In the above device, when the map level is the second level, the second acquisition module processes the location point to be presented to obtain the processed location point, and the layer of the processed location point is obtained, including:

[0040] When the map level is a second sub-level in the second level, classifying the location points to be presented to obtain the processed location points;

[0041] For each type of location points in the processed location points, a layer of each type of location points is obtained from the server.

[0042] In the above device, the device is also used for:

[0043] Before acquiring the layer of the location point to be presented according to the category of the map layer, determining the category of the map layer that is less than or equal to the first preset map layer as the first category of the layer;

[0044] Determine the category of a map level that is greater than the first preset map level and less than or equal to the second preset map level as the first sub-level;

[0045] The category of the map level that is greater than the second preset map level is determined as the second type of sub-level.

[0046] In the above device, the device is also used for:

[0047] After obtaining the layer of each type of location points from the server for each type of location points among the processed location points, the layer of each type of location points is labeled according to the category of each type of location points and the identifiers corresponding to the category of each type of location points are respectively performed to obtain the layer of each type of location points after processing, and the layer of each type of location points after processing is stored.

[0048] In the above device, the device is also used for:

[0049] After labeling the layers of each type of location points according to the categories of each type of location points, and respectively labeling the layers of each type of location points according to the identifiers corresponding to the categories of each type of location points to obtain the processed layers of each type of location points, and storing the processed layers of each type of location points, obtaining a location request for a first type of location points in each type of location points;

[0050] According to the base map layer of the electronic map corresponding to the second sub-level, the layer of the first type of location points in the processed layers of each type of location points is rendered to obtain the rendered electronic map for the first type of location points.

[0051] In a third aspect, an embodiment of the present application further provides a terminal, comprising: a processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations via a communication bus, and when the instructions are executed by the processor, the electronic map rendering method described in one or more of the above embodiments is executed.

[0052] An embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the electronic map rendering method described in one or more of the above embodiments.

[0053] The present invention provides a method, device, terminal and computer storage medium for rendering an electronic map. The method is applied in a terminal and comprises: obtaining a location request for an electronic map in the terminal, the location request comprising a location point to be presented and a map level for presenting the location point to be presented, obtaining a layer of the location point to be presented according to the category of the map level, rendering the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map level, obtaining a rendered electronic map and presenting it; that is, in the present invention, after obtaining the location request for the electronic map in the terminal, according to the category of the map level for presenting the location point to be presented in the location request, the layer of the location point to be presented in the location request can be obtained, and then, according to the base map layer of the electronic map corresponding to the map level, the layer of the location point to be presented is rendered, that is, the layer of the location point to be presented in the location request is obtained for different map levels, so that the terminal can obtain layer data for different location requests, so that the layer data can be obtained on demand for location requests for processing large amounts of data, so that the rendering of the electronic map can adapt to location requests of massive data, shorten the rendering delay, and improve the rendering efficiency of the electronic map. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic diagram of a flow chart of an optional method for rendering an electronic map in an embodiment of the present invention;

[0055] Figure 2 is a schematic diagram of an example of an optional layer structure of a terminal in an embodiment of the present invention;

[0056] Figure 3 A schematic diagram of a process of rendering an electronic map using an optional aggregation layer in an embodiment of the present invention;

[0057] Figure 4 A schematic diagram of a flow chart of an optional example of rendering of an electronic map in an embodiment of the present invention;

[0058] Figure 5 A schematic diagram of the structure of an optional electronic map rendering device in an embodiment of the present invention;

[0059] Figure 6 A schematic diagram of the structure of an optional terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0061] Embodiment 1

[0062] The embodiment of the present invention provides a method for rendering an electronic map. Figure 1 FIG. 1 is a flow chart of an optional method for rendering an electronic map in an embodiment of the present invention. Figure 1 As shown, the electronic map rendering method may include:

[0063] S101: Obtaining a location request for an electronic map in a terminal;

[0064] At present, traditional map data presentation solutions, aggregation point technology, ArcGIS feature service layer technology, etc. are usually used for rendering electronic maps.

[0065] Among them, the traditional map data presentation solution usually passes in parameters such as the current map level and the longitude and latitude of the window. The background server queries the data information in the current longitude and latitude window and returns it to the electronic map in the terminal for presentation and rendering. This solution is usually used in some small systems with smaller data. When facing the presentation of massive resource data, this solution is not feasible.

[0066] It can be seen that the traditional map data presentation solution adopts the method of requesting data from the background server and using the terminal (or client) or the front-end dot rendering to achieve it. Then, when the view window range is large and the amount of data in the view window is large, there will be the following two problems: (1) The background server takes a long time to process data and the interface responds slowly; (2) The efficiency of the front-end dot rendering method is limited by the size of the terminal memory. In the process of rendering a large amount of point, line and surface data in a short time, the terminal browser will lose response, and in severe cases, the system will crash.

[0067] As for the aggregation point technology, in the face of massive data presentation, technical researchers at home and abroad use algorithms to achieve data clustering. Commonly used clustering algorithms include K-means algorithm (kmeans), high-density clustering method (DBSCAN, Density-Based Spatial Clustering of Applications with Noise), agglomerative hierarchical clustering, etc. The central idea of ​​this type of algorithm is to aggregate the data within a certain range after obtaining the data in the view window, and aggregate the original hundreds or thousands of data into a point surface data, so as to effectively compress the data and reduce the terminal rendering delay problem.

[0068] In addition, in order to adapt to the growing data scale, many map manufacturers have provided countermeasures, including Baidu Maps, Amap, etc.

[0069] However, the central idea of ​​the aggregation algorithm used in the aggregation point technology is to perform calculations of different complexity on the data within a certain grid range, aggregate the data of neighboring points, and finally present a collection area of ​​multiple points on the map. This significantly reduces the amount of data presented and reduces the rendering delay, but there are still the following unavoidable problems: (1) Most aggregation algorithms need to calculate the distance between two points, which has high computational complexity and too high aggregation cost; (2) The use of the aggregation algorithm may cause two points that were originally adjacent to each other to be divided into two different aggregation points, which cannot accurately reflect the data information of the original points.

[0070] In addition, with regard to ArcGIS feature service layer technology, ArcGIS, as a scalable platform, provides geographic information system (GIS) functions for individual users and group users, whether on the desktop, on the server, in the field or through the Web. ArcGIS 9 is a software collection for building a complete GIS, which includes a series of GIS deployment frameworks: (1) ArcGIS Desktop - a complete suite of professional GIS applications; (2) ArcGIS Engine - an embedded development component for custom GIS application development; (3) Server GIS - ArcSDE, ArcIMS and ArcGIS Server. Its advantage is that it provides a relatively rich interface, and users can make reasonable combinations of API interfaces according to project requirements. In addition, the feature service concept it provides has a huge advantage in presenting massive data. It stores point, line and surface resources through a special database, and then processes the data and sends it to the front end for display by publishing feature services. Under the conditions of massive data resources, ArcGIS's working mode greatly shortens the browser rendering time to improve the robustness of the system. In addition, in addition to using its own basemap, the ArcGIS engine also provides a third-party map basemap access solution, making the system more versatile.

[0071] However, in the face of massive resource data presentation, especially when traditional map presentation technology cannot present massive data, ArcGIS provides feature services to solve the above problems. ArcGIS provides three main layer services: GraphicsLayer, MapLayer, and FeatureLayer. GraphicsLayer is the top-level layer service, which provides corresponding APIs for client-side dotting and rendering operations, similar to traditional client dotting. The rendering speed of this layer is still limited by the size of the data and client performance. MapLayer and FeatureLayer layers exist in the form of linked access, which is essentially different from traditional client dotting. The principle of MapLayer is to slice the data points in advance, and the client loads the pre-processed slice data, so it has great advantages in presentation and rendering, but the client cannot update the data in the slice in real time, and cannot meet the business needs of frequent data updates. The FeatureLayer layer can directly load data from the Spatial Database Engine (SDE) database, which can effectively carry the information of each feature. Users can configure it according to project requirements, which has good flexibility and configurability. However, the rendering of the FeatureLayer layer still consumes a lot of client memory, and there is a certain performance bottleneck when rendering large amounts of data. Therefore, the use of ArcGIS-based single-layer feature service technology has the above-mentioned inevitable problems.

[0072] In order to enable the terminal to process massive amounts of data when rendering an electronic map, an embodiment of the present invention proposes a method for rendering an electronic map. First, the terminal can generate an electronic map. Here, the electronic map can be generated by a third-party client loaded in the terminal, or by a browser in the terminal, or by a system application in the terminal. Here, the embodiment of the present invention does not make any specific limitations on this.

[0073] First, a location request is obtained for the electronic map generated in the terminal. In actual applications, users can enter keywords in the electronic map according to their own needs. After receiving the keywords, the terminal can generate some relevant results based on the keywords. The user chooses to generate a location request again, or directly generates a location request based on the keywords. For example, the user enters a hot pot restaurant within the scope of the national electronic map, then the location request is to mark the hot pot restaurants across the country.

[0074] Among them, the location request includes the location point to be presented and the map level for presenting the location point to be presented; that is, the location request includes not only the location point to be presented, but also the map level for presenting the location point to be presented. Taking the location request as the hot pot restaurant within the scope of the national electronic map input by the above-mentioned user as an example, the location point to be presented included in the location request is the hot pot restaurant, and the map level for presenting the hot pot restaurant is the national electronic map.

[0075] S102: Obtaining a layer of a location point to be presented according to the category of the map layer;

[0076] In S101, after obtaining the location point to be presented and the map level for presenting the location point to be presented, the category of the map level is determined, and then the layer of the location point to be presented can be obtained according to the category of the map level; wherein, here, the category of the map level can be classified according to actual needs, and generally, the map level of the electronic map can be divided into three categories from low to high; then, for different categories of the map level, in order to obtain the layer of the location point to be presented, in an optional embodiment, S102 may include:

[0077] When the local layer level is the first type of layer, the layer of the location point to be presented is obtained from the server corresponding to the terminal;

[0078] When the local layer level is the second type of level, the location points to be presented are processed to obtain the processed location points, and a layer of the processed location points is obtained.

[0079] Specifically, the map layers can be roughly divided into two categories, namely the first layer and the second layer. For the map layers belonging to the first layer, in actual applications, the location requests of the map layers of the first layer are all location requests for massive data. If the terminal dotting method is used to draw the layer of the location points to be presented, the rendering delay is too long due to the large amount of data, and the terminal may get stuck or crash. Therefore, here, the layer of the location points to be presented is directly obtained from the server corresponding to the terminal. In this way, the terminal is prevented from drawing the layer of the location points to be presented. In this way, for massive data, the rendering delay caused by a large amount of data calculation can be avoided at the terminal, which can be suitable for the rendering of electronic maps in the case of massive data.

[0080] For map layers belonging to the second category, in actual applications, for location requests of the second category map layers, compared with the first category, for location requests with relatively small amounts of data, if the terminal is directly used to draw the layer of the location points to be presented in a dot-marking manner, for the rendering of electronic maps with large amounts of location requests, there is still a problem of long rendering delay. Therefore, here, the terminal first processes the location points to be presented, obtains the processed location points, and then obtains the layer of the processed location points; wherein the processing here can reduce the amount of data, thereby avoiding the terminal from drawing a large number of layers of location points to be presented. For large amounts of data, the terminal avoids the rendering delay caused by a large amount of data calculation, which can be suitable for the rendering of electronic maps in the case of massive data.

[0081] In order to reduce the amount of data, in an optional embodiment, when the local layer level is the second type of layer, the location points to be presented are processed to obtain the processed location points, and the layer of the processed location points is obtained, including:

[0082] When the map level is the first sub-level in the second level, the location points to be presented are aggregated to obtain processed location points;

[0083] Draws a layer of processed location points.

[0084] Specifically, the second type of hierarchy can be further subdivided into a first type of sub-hierarchy and a second type of sub-hierarchy. For the map hierarchy of the first type of sub-hierarchy, a clustering algorithm can be used to cluster the presented location points. Here, the clustering algorithm used can be Kmeans or DBSCAN. Here, the embodiment of the present invention does not make any specific limitation on this.

[0085] By using a clustering algorithm, hundreds or thousands of original data can be aggregated into a point surface data. In this way, the original location points to be presented can be reduced. Therefore, the number of location points after processing is reduced compared to the location points to be presented. Then, the terminal can draw a layer of processed location points for a smaller number of location points. On the basis of reducing the amount of data, the layer of location points to be presented is obtained by drawing on the terminal side, which reduces the data processing pressure on the terminal side, shortens the rendering delay of the electronic map, and avoids terminal freezing and crashes.

[0086] In order to reduce the amount of data, in an optional embodiment, when the local layer level is the second type of layer, the location points to be presented are processed to obtain the processed location points, and the layer of the processed location points is obtained, including:

[0087] When the map level is the second sub-level in the second level, the location points to be presented are classified to obtain processed location points;

[0088] For each type of location points in the processed location points, a layer of each type of location points is obtained from the server.

[0089] Specifically, for the map level of the second sub-level, the amount of data is reduced compared to the first sub-level. However, since the map level is lower than the first sub-level, more data needs to be displayed. Therefore, here, the location points to be presented can be classified first, and the classified location points can be determined as processed location points.

[0090] The above classification may be performed according to user needs or according to preset rules, and the embodiments of the present invention do not specifically limit this.

[0091] For example, when the user needs to mark the location of a meal, the classification at this time can be based on the type of food, for example, Sichuan cuisine, Northeastern cuisine, Hunan cuisine, Cantonese cuisine, etc. When the user needs to mark a tourist attraction, the classification at this time can be based on the level of the tourist attraction, for example, 5A scenic spot, 4A scenic spot, etc.

[0092] After obtaining the processed location points, for each type of location points in the processed location points, a layer of each type of location points can be directly obtained from the server. Taking the user's need to mark the location points for meals as an example, they can be classified according to the types of food, such as Sichuan cuisine, Northeastern cuisine, Hunan cuisine, Cantonese cuisine, etc. Then, a layer of Sichuan cuisine location points can be directly obtained from the server, a layer of Northeastern cuisine location points can be directly obtained from the server, a layer of Hunan cuisine location points can be directly obtained from the server, a layer of Cantonese cuisine location points can be directly obtained from the server, and so on. In this way, obtaining layers of location points by classification is conducive to rendering different electronic maps according to user needs.

[0093] In order to increase the visual effect of the rendered electronic map and facilitate viewing by users, in an optional embodiment, after obtaining a layer of each type of location points from the server for each type of location points in the processed location points, the method further includes:

[0094] According to the category of each type of location point, the layer of each type of location point is labeled according to the identifier corresponding to the category of each type of location point to obtain the processed layer of each type of location point, and the processed layer of each type of location point is stored.

[0095] That is to say, for each type of location points in the processed location points, a layer of each type of location points is obtained from the server. Since each type of location point represents a different type of location point, in order to enable the rendered electronic map to distinguish different types of location points, here, the terminal can obtain the identifier corresponding to the category of each type of location point for the category of each type of location point, and then mark the location points in the layer of each type of location point, so that the identifier of the location point in the layer of each type of location point after processing adopts the identifier corresponding to the category of the type of location point. In this way, the lazy loading process is realized. Finally, the layer of each type of location point after processing is cached in the terminal. In this way, when the user needs to view a certain type of location point or several types of location points in the electronic map, there is no need for a secondary access. The layer of the location point of the corresponding category can be directly obtained from the cache, and the electronic map that the user needs to view can be rendered.

[0096] In order to facilitate users to quickly obtain electronic maps under different conditions, in an optional embodiment, after labeling the layers of each type of location points according to the categories of each type of location points, respectively according to the identifiers corresponding to the categories of each type of location points, obtaining the processed layers of each type of location points, and storing the processed layers of each type of location points, the method further includes:

[0097] Obtaining a location request for a first type of location point in each type of location point;

[0098] According to the base map layer of the electronic map corresponding to the second sub-level, the layer of the first type of location points in the layers of each type of location points after processing is rendered to obtain the rendered electronic map for the first type of location points.

[0099] Here, for each type of location point, after lazy loading and caching are completed, when the user enters a location request for the first type of location point in each type of location point in the electronic map, or a selection button is provided on the interface on the electronic map, and the selection button provides a location request for a certain type of location point or several types of location points, the user can select the location request for the first type of location point through the selection button, and the terminal can obtain the location request for the first type of location point in the terminal for each type of location point, wherein the location request for the first type of location point can be a location request for a certain type of location point or several types of location points, and here, the embodiment of the present invention does not make specific limitations on this.

[0100] After obtaining the location request for the first type of location points in each type of location points, the layer of the first type of location points can be rendered according to the base map layer of the electronic map corresponding to the second type of sublayer to obtain the rendered electronic map of the first type of location points.

[0101] In addition, in order to achieve classification of map levels, in an optional embodiment, after obtaining the layer of the location point to be presented according to the category of the map level, the method may further include:

[0102] Determine the category of the map level that is less than or equal to the first preset map level as the first category level;

[0103] Determine the category of the map level that is greater than the first preset map level and less than or equal to the second preset map level as the first sub-level;

[0104] The category of the map level greater than the second preset map level is determined as the second sub-level.

[0105] Here, the terminal is pre-set with a first preset map level and a second preset map level. The categories of map levels that are less than or equal to the first preset map level are classified as the first category level, the categories that are greater than the first preset map level and less than or equal to the second preset map level are classified as the first sub-level in the second category level, and the categories of map levels greater than the second preset map level are classified as the second sub-level in the second category level; for example, the first preset map level is 9, and the second preset map level is 15.

[0106] For example, in practical applications, the categories of map levels 4-9 can be determined as the first category of levels, map levels 10-15 can be determined as the first category of sub-levels, and map levels above 16 can be determined as the second category of sub-levels.

[0107] S103: Rendering the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map level, obtaining the rendered electronic map and presenting it.

[0108] Finally, after obtaining the layer of the location point to be presented and obtaining the base map layer of the electronic map corresponding to the map level according to the map level, the terminal superimposes the base map layer of the electronic map corresponding to the map level with the layer of the location point to be presented to obtain a rendered electronic map.

[0109] The following example is used to illustrate the method for rendering an electronic map in one or more of the above embodiments.

[0110] Figure 2 FIG. 1 is a schematic diagram of an example of an optional layer structure of a terminal in an embodiment of the present invention, such as Figure 2As shown, the layer structure can be divided into the following according to the map level from low to high: MapLayer, used to load data slices, aggregation layer, used to aggregate data, multi-layer FeatureLayer, for example, can include: sites, machine rooms, manholes, signs, poles, etc., used to adopt multi-layer lazy loading mode. In order to achieve rendering, each layer is superimposed with the map basemap (baseMap) to achieve the most electronic map rendering, among which the data of the map level from low to high is from dense to coefficient.

[0111] Specifically, starting from the needs of the terminal, on the one hand, we have to face the problem of time delay in presenting massive data on the electronic map, and on the other hand, we have to be able to adapt well to the needs of project development, such as Figure 3 As shown in the layer structure in , the base map is the bottom container, MapLayer and multi-layer FeatureLayer are presented on the base map according to the map level, and the aggregation layer is used to aggregate the middle-level data. In this example, the map level is divided from low to high, as shown in Table 1 below:

[0112] Table 1

[0113] Map Level Layers Remark 4-9 MapLayer 10-15 Polymerization layer Data aggregation display 16 and above Merge FeatureLayer layers Multiple layers lazy loading

[0114] For different layer structures, in order to achieve the rendering of electronic maps, the main steps are as follows:

[0115] During the electronic map loading process, data is displayed from the low level by default. For users, they pay more attention to the overall presentation of data and pay less attention to the specific information of data resource points. Based on the above requirements, MapLayer data slices are loaded at this time to display resource point data in a large range (such as the whole country or the whole province). After loading the layer once, new data is no longer requested, which greatly reduces the amount of data requests. Compared with traditional client-side point rendering, this method effectively reduces the client rendering delay problem, and also reduces the pressure on the background server, improving the stability of the entire system and the response speed of the client system.

[0116] For mid-level data, the relative data volume is greatly reduced compared to low-level data. At this time, the electronic map is presented at the urban area level, and users do not care about the presentation of specific resource point information. Therefore, a front-end aggregation solution is used to present data information, and resource data with little difference in longitude and latitude are aggregated to form an intermediate aggregation layer. The purpose of using the aggregation layer is to further compress the data and display the data information in an aggregated manner. Figure 3 FIG. 1 is a schematic diagram of a process of rendering an electronic map using an optional aggregation layer in an embodiment of the present invention. Figure 3As shown, the manholes can be aggregated to obtain manhole aggregation points, and the landmarks can be aggregated to obtain landmark aggregation points, so that in the aggregation layer, the terminal can draw a layer of aggregation points by itself for rendering by the terminal.

[0117] At the high level of the map layer, the magnitude of electronic map data is further reduced, but more information needs to be displayed. The electronic map needs to carry and present the latitude and longitude, name, street address, creation time and other information of the resource point. Compared with MapLayer and aggregation layer, this layer needs to display more accurate resource information, so the aggregation method is no longer suitable for data display at this level. Here, a multi-layer FeatureLayer is used to present more specific resource information (including point and line features that are richer and clearer than MapLayer). Considering the front-end rendering delay caused by carrying more data and richer resource details, here, a multi-layer FeatureLayer is formed by classification according to resource type, and different FeatureLayer layers are loaded on demand using lazy loading. For the FeatureLayer that has been loaded, a cache mechanism is used to store it on the client to reduce the time cost of secondary access. Table 2 shows the categories of multi-layer FeatureLayer formed by classification according to resource type, as shown in Table 2 below:

[0118] Table 2

[0119] Resource Type FeatureLayer layer number Color Code Manpower well 0 green Landmark 1 orange color engine room 2 Light yellow Site 3 pink …… …… ……

[0120] Figure 4 FIG. 1 is a flow chart of an example of an optional method for rendering an electronic map in an embodiment of the present invention. Figure 4 As shown, the layer structure includes MapLayer, aggregation layer, and multi-layer FeatureLayer. The lazy loading of multi-classified FeatureLayer layers and caching methods effectively reduce the client rendering delay and improve the overall performance of the system.

[0121] That is to say, in an embodiment of the present invention, a model solution combining Maplayer + aggregation layer + FeatureLayer of adaptive map level is proposed to adapt to the rendering and presentation of resource data of different map levels, effectively reducing the delay problem caused by the rendering process of massive resource data, and using multi-classified FeatureLayer to replace the original single FeatureLayer layer, reducing the size of single rendering data. At the same time, the layer lazy loading + caching mechanism is used to control the display and hiding of different data layers, further reducing the size of concurrent request data and improving the flexible configurability of layer operations.

[0122] It can be seen that this solution adopts the MapLayer+Aggregation Layer+FeatureLayer multi-layer fusion mode to solve the client rendering delay problem in the face of massive resource data rendering. At the same time, it adopts a multi-classification Featurelayer layer to classify and process resource data by type, and adopts lazy loading and caching mechanisms to further reduce the amount of data loaded at a single time and the number of times layer data is requested, thereby improving the overall stability of the system and shortening the client rendering delay problem.

[0123] A method for rendering an electronic map provided by an embodiment of the present invention is applied in a terminal, comprising: obtaining a location request for an electronic map in the terminal, the location request including a location point to be presented and a map level for presenting the location point to be presented, obtaining a layer of the location point to be presented according to a category of the map level, rendering the layer of the location point to be presented according to a base map layer of the electronic map corresponding to the map level, obtaining a rendered electronic map and presenting it; that is, in an embodiment of the present invention, after obtaining the location request for the electronic map in the terminal, the layer of the location point to be presented in the location request can be obtained according to the category of the map level for presenting the location point to be presented in the location request, and then, the layer of the location point to be presented is rendered according to the base map layer of the electronic map corresponding to the map level, that is, the layer of the location point to be presented in the location request is obtained according to different map levels, so that the terminal can obtain layer data according to different location requests, so that the layer data can be obtained on demand for location requests for processing large amounts of data, so that the rendering of the electronic map can adapt to location requests of massive data, shorten the rendering delay, and improve the rendering efficiency of the electronic map.

[0124] Embodiment 2

[0125] Based on the same inventive concept, an embodiment of the present invention provides a rendering device for an electronic map. Figure 5 FIG. 1 is a schematic diagram of a structure of an optional electronic map rendering device in an embodiment of the present invention. Figure 5 As shown, the electronic map rendering device includes: a first acquisition module 51, a second acquisition module 52 and a rendering module 53;

[0126] The first acquisition module 51 is used to acquire a location request for the electronic map in the terminal; wherein the location request includes a location point to be presented and a map level for presenting the location point to be presented;

[0127] A second acquisition module 52 is used to acquire a layer of a location point to be presented according to the category of the map layer;

[0128] The rendering module 53 is used to render the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map level, obtain the rendered electronic map and present it.

[0129] In an optional embodiment, the second acquisition module 52 is specifically configured to:

[0130] When the local layer level is the first type of layer, the layer of the location point to be presented is obtained from the server corresponding to the terminal;

[0131] When the local layer level is the second type of level, the location points to be presented are processed to obtain the processed location points, and a layer of the processed location points is obtained.

[0132] In an optional embodiment, when the local layer level is the second type of layer level, the second acquisition module 52 processes the position point to be presented to obtain the processed position point, and the layer of the processed position point is obtained, including:

[0133] When the map level is the first sub-level in the second level, the location points to be presented are aggregated to obtain processed location points;

[0134] Draws a layer of processed location points.

[0135] In an optional embodiment, when the local layer level is the second type of layer level, the second acquisition module 52 processes the position point to be presented to obtain the processed position point, and the layer of the processed position point is obtained, including:

[0136] When the map level is the second sub-level in the second level, the location points to be presented are classified to obtain processed location points;

[0137] For each type of location points in the processed location points, a layer of each type of location points is obtained from the server.

[0138] In an optional embodiment, the device is also used for:

[0139] Before obtaining the layer of the location point to be presented according to the category of the map level, determining the category of the map level that is less than or equal to the first preset map level as the first category level;

[0140] Determine the category of the map level that is greater than the first preset map level and less than or equal to the second preset map level as the first sub-level;

[0141] The category of the map level greater than the second preset map level is determined as the second sub-level.

[0142] In an optional embodiment, the device is also used for:

[0143] After obtaining the layer of each type of location points from the server for each type of location points in the processed location points, the layer of each type of location points is labeled according to the category of each type of location points, respectively, according to the identifier corresponding to the category of each type of location points, to obtain the layer of each type of location points after processing, and the layer of each type of location points after processing is stored.

[0144] In an optional embodiment, the device is also used for:

[0145] After labeling the layers of each type of location points according to the categories of each type of location points, and obtaining the processed layers of each type of location points, and storing the processed layers of each type of location points, a location request for the first type of location points in each type of location points is obtained;

[0146] According to the base map layer of the electronic map corresponding to the second sub-level, the layer of the first type of location points in the layers of each type of location points after processing is rendered to obtain the rendered electronic map for the first type of location points.

[0147] In practical applications, the first acquisition module 51, the second acquisition module 52 and the rendering module 53 can be implemented by a processor located on the terminal, specifically a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA).

[0148] Figure 6 A schematic diagram of an optional terminal structure provided in an embodiment of the present application, such as Figure 6 As shown, the embodiment of the present application provides a terminal 600, including:

[0149] A processor 61 and a storage medium 62 storing executable instructions of the processor 61, wherein the storage medium 62 relies on the processor 61 to perform operations through a communication bus 63, and when the instructions are executed by the processor 61, the electronic map rendering method described in the first embodiment is executed.

[0150] It should be noted that in actual application, the various components in the terminal are coupled together through the communication bus 63. It is understandable that the communication bus 63 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 63 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6Various buses are labeled as communication buses 63.

[0151] An embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the electronic map rendering method described in the first embodiment.

[0152] Among them, the computer-readable storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories.

[0153] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0154] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0157] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A method for rendering an electronic map, characterized in that: The method is applied in a terminal, comprising: For the electronic map in the terminal, a location request is obtained; wherein the location request includes a location point to be presented and a map level for presenting the location point to be presented; According to the category of the map layer, obtaining the layer of the location point to be presented; Rendering the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map level, obtaining a rendered electronic map and presenting it; Wherein, obtaining the layer of the location point to be presented according to the category of the map layer includes: When the map level is a first level, obtaining a layer of the location point to be presented from a server corresponding to the terminal; When the map level is the second level, the location point to be presented is processed to reduce the data volume, and the processed location point is obtained, and a layer of the processed location point is obtained; The data volume of the location request at the map level of the first level is greater than the data volume of the location request at the map level of the second level.

2. The method according to claim 1, characterized in that When the map level is the second level, processing the location point to be presented to obtain the processed location point, and obtaining the layer of the processed location point includes: When the map level is a first sub-level in a second level, performing aggregation processing on the location points to be presented to obtain the processed location points; Draw a layer of the processed position points.

3. The method according to claim 1, characterized in that When the map level is the second level, processing the location point to be presented to obtain the processed location point, and obtaining the layer of the processed location point includes: When the map level is a second sub-level in the second level, classifying the location points to be presented to obtain the processed location points; For each type of location points in the processed location points, a layer of each type of location points is obtained from the server.

4. The method according to claim 2 or 3, characterized in that: After obtaining the layer of the location point to be presented according to the category of the map level, the method further includes: Determine the category of the map level that is less than or equal to the first preset map level as the first category of levels; Determine a category of a map level that is greater than the first preset map level and less than or equal to a second preset map level as a first sub-level in the second level; A category of a map level greater than the second preset map level is determined as a second sub-level in the second level.

5. The method according to claim 3, characterized in that: After acquiring, for each type of location points in the processed location points, a layer of each type of location points from the server, the method further includes: According to the category of each type of location points, the layer of each type of location points is labeled according to the identifier corresponding to the category of each type of location points to obtain the processed layer of each type of location points, and the processed layer of each type of location points is stored.

6. The method according to claim 5, characterized in that After labeling the layers of each type of location points according to the categories of each type of location points, respectively according to the identifiers corresponding to the categories of each type of location points, obtaining the processed layers of each type of location points, and storing the processed layers of each type of location points, the method further includes: Obtaining a location request for a first type of location point in each type of location point; According to the base map layer of the electronic map corresponding to the second sub-level, the layer of the first type of location points in the processed layers of each type of location points is rendered to obtain the rendered electronic map for the first type of location points.

7. A device for rendering an electronic map, characterized in that: The device is arranged in a terminal, and comprises: A first acquisition module is used to acquire a location request for the electronic map in the terminal; wherein the location request includes a location point to be presented and a map level for presenting the location point to be presented; A second acquisition module, used for acquiring the layer of the location point to be presented according to the category of the map layer; A rendering module, used to render the layer of the location point to be presented according to the base map layer of the electronic map corresponding to the map level, obtain the rendered electronic map and present it; The second acquisition module is specifically used for: When the map level is a first level, obtaining a layer of the location point to be presented from a server corresponding to the terminal; When the map level is the second level, the location point to be presented is processed to reduce the data volume, and the processed location point is obtained, and a layer of the processed location point is obtained; The data volume of the location request at the map level of the first level is greater than the data volume of the location request at the map level of the second level.

8. A terminal, characterized in that: The terminal comprises: A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the electronic map rendering method described in any one of claims 1 to 6 is executed.

9. A computer storage medium, characterized in that Executable instructions are stored, and when the executable instructions are executed by one or more processors, the processors execute the electronic map rendering method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for grading and coloring thematic map

    CN101739888A

  • Method and device for rendering electronic map

    CN110288689A