Layer drawing method and device, server and storage medium
By merging layer styles, the layer drawing efficiency of WebGIS is improved, and the problem of low layer drawing efficiency of WebGIS is solved, achieving faster response speed and more efficient layer drawing.
Patent Information
- Application Number
- CN202311092121.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
WebGIS's layer drawing efficiency is not high, which affects its response speed.
Quickly draw layers by merging layer styles, reducing the number of layer styles applied during layer drawing, thereby improving layer drawing efficiency.
Improves WebGIS response speed and enhances layer drawing efficiency without reducing the information covered by the drawn layers.
Smart Images

Figure CN119537494A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of map compilation technology, and in particular to a layer drawing method, device, server and storage medium. Background Art
[0002] With the development of network technology, online mapping technology has become an important part of modern Web-based Geographic Information System (GIS). In the process of online mapping, WebGIS can compile maps by drawing layers.
[0003] At present, with the increasing growth rate of spatial data and the continuous promotion of location-related applications, the role of WebGIS is becoming more and more significant, which makes the response speed of WebGIS more and more important. However, due to the low efficiency of WebGIS layer drawing, this directly affects its response speed and needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present invention provide a layer drawing method, device, server and storage medium, so as to quickly draw layers by merging layer styles, thereby improving the response speed of WebGIS.
[0005] According to one aspect of the present invention, a layer drawing method is provided, which is applied to a server, and the method may include:
[0006] Receive a map data transmission request sent by a client, and determine map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data;
[0007] When there is an original layer style of the same category in at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style;
[0008] For target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client draws the layer according to the received added result.
[0009] According to another aspect of the present invention, a layer drawing device is provided, which is configured on a server, and the device may include:
[0010] The original layer style determination module is used to receive a map data transmission request sent by a client, and determine the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data;
[0011] A module for obtaining a merged layer style is used to merge the original layer styles of the same category to obtain a merged layer style when there are original layer styles of the same category in at least one original layer style;
[0012] The layer drawing module is used to add the merged layer style to the target data corresponding to the merged layer style in the map data, and transmit the obtained added result to the client, so that the client can draw the layer according to the received added result.
[0013] According to another aspect of the present invention, a server is provided, which may include:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the layer drawing method provided by any embodiment of the present invention is implemented when the at least one processor executes the computer program.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored. The computer instructions are used to enable a processor to implement the layer drawing method provided by any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention receives a map data transmission request sent by a client, and determines the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data; when there are original layer styles of the same category in at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style; for target data corresponding to the merged layer style in the map data, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client draws the layer according to the received added result. The above technical solution merges the original layer styles and draws the layer based on the obtained merged layer style, that is, reduces the number of layers to be drawn by reducing the number of layer styles applied in the layer drawing process, thereby improving the layer drawing efficiency, and because the layer is drawn according to the merged layer style, this does not reduce the information covered by the drawn layer.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flowchart of a layer drawing method provided according to an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of an example of layer style merging in a layer drawing method provided according to an embodiment of the present invention;
[0023] Figure 3 is a flowchart of another layer drawing method provided according to an embodiment of the present invention;
[0024] Figure 4 is a flowchart of another layer drawing method provided according to an embodiment of the present invention;
[0025] Figure 5 is a structural schematic diagram of a layer drawing system corresponding to another layer drawing method provided in an embodiment of the present invention;
[0026] Figure 6 is a flowchart of another layer drawing method provided according to an embodiment of the present invention;
[0027] Figure 7 is a structural block diagram of a layer drawing device provided according to an embodiment of the present invention;
[0028] Figure 8 It is a structural diagram of a server for implementing the layer drawing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Before introducing the embodiment of the present invention, the research ideas of the embodiment of the present invention are first exemplified to better understand why the embodiment of the present invention can improve the efficiency of layer drawing. In practical applications, layer styles can be used to instruct WebGIS how to draw specific layers, such as surface fill layer style colors, icon styles, picture styles, regular graphic styles, border styles, text styles, data to be drawn, drawing order, and symbolization methods when drawing data, etc. Therefore, WebGIS can load layer styles and draw layers according to layer styles. On this basis, it should be noted that the more layer styles there are, the more layers WebGIS draws according to the layer styles, which will directly affect the efficiency of layer drawing. Therefore, an optional solution to improve the efficiency of layer drawing may be to reduce the number of layer styles. In response to this, the layer drawing schemes described in the following embodiments are proposed.
[0032] Figure 1 : is a flow chart of a layer drawing method provided in an embodiment of the present invention. This embodiment is applicable to the case of drawing a layer according to a layer style, and is particularly applicable to the case of drawing a layer according to a merged layer style. The method can be executed by a layer drawing device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware, and the device can be integrated on a server.
[0033] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0034] S110: Receive a map data transmission request sent by a client, and determine map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data.
[0035] Among them, the map data transmission request can be understood as a request sent by the client to request the server to transmit map data. The client is deployed on the user terminal; the server is deployed on the server; the map data can be understood as the data requested by the map data transmission request, for example, it can be the original map data, it can be processed map data (such as map tile data, map vector data or map raster data, etc.), of course, it can also be other map data, which is not specifically limited here. The original layer style can be understood as the original layer style used to beautify and display the map data. The number of the original layer styles can be one, two or more, which is related to the actual situation and is not specifically limited here.
[0036] A map data transmission request is received, and then map data corresponding to the map data transmission request is determined, and then at least one original layer style corresponding to the map data is determined.
[0037] S120. When there are original layer styles of the same category in at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style.
[0038] Among them, each original layer style in at least one original layer style has its own category. On this basis, there may be original layer styles with the same category in the at least one original layer style. For example, it is assumed that the at least one original layer style includes original layer style 1 to original layer style 10, wherein the categories of original layer style 1 to original layer style 3 are the same, and the categories of original layer style 6 to original layer style 10 are the same. This means that original layer style 1 to original layer style 10 involve a total of 4 categories, namely, the categories corresponding to original layer style 1 to original layer style 3, the categories corresponding to original layer style 4, the categories corresponding to original layer style 5, and the categories corresponding to original layer style 6 to original layer style 10; of course, there may be no original layer styles with the same category. For example, the original layer style 1 to original layer style 10 in the above example correspond to different categories respectively; and so on. This is related to the actual situation and is not specifically limited here.
[0039] In the case that there are original layer styles of the same category in at least one original layer style, the original layer styles of the same category can be merged to obtain a merged layer style. Exemplarily, continuing with the above example, original layer styles 1-original layer styles 3 are merged to obtain a merged layer style corresponding to the types represented by original layer styles 1-original layer styles 3, and original layer styles 6-original layer styles 10 are merged to obtain a merged layer style corresponding to the types represented by original layer styles 6-original layer styles 10. Of course, for those original layer styles that do not have the same category, they can be merged with themselves to obtain the corresponding merged layer style.
[0040] On this basis, optionally, the original layer styles of the same category as described above may be original layer styles that meet preset conditions, and optionally, the preset conditions may include at least one of the same type (condition 1), the same data source used (condition 2), and the same layout and drawing scheme used (condition 3). Exemplarily, the type may be, for example, point, surface, or line, the data source may be, for example, an oil field or a gas field, and the layout and drawing scheme may be, for example, fill, color, or transparency.
[0041] On this basis, in order to better understand the above technical solution, the following is an exemplary description with reference to specific examples. For example, the preset conditions include condition 1, condition 2 and condition 3. Figure 2 , "Original Plane Fill Layer Style 1" and "Original Plane Fill Layer Style 2" meet the above three conditions, and "Original Dot Layer Style 1" and "Original Plane Fill Layer Style 2" do not meet at least condition 1, so "Original Plane Fill Layer Style 1" and "Original Plane Fill Layer Style 2" are merged into "Optimized Plane Fill Layer Style 1". In addition, the visibility of the dot features in "Original Dot Layer Style 1" belongs to the layout class attribute, and the radius of the dot features in "Original Dot Layer Style 2" belongs to the drawing class attribute, so "Original Dot Layer Style 1" and "Original Dot Layer Style 2" do not meet at least condition 3, and the two cannot be merged. At this time, "Original Dot Layer Style 1" can be applied as "Merged Dot Layer Style 1". In addition, "Original Dot Layer Style 2" and "Original Dot Layer Style 3" meet the above three conditions, and the two can be merged into "Merged Dot Layer Style 2".
[0042] S130. For target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client draws the layer according to the received added result.
[0043] Among them, the target data can be understood as the data in the map data corresponding to the merged layer style, that is, the merged layer style can be used to beautify and display the target data. The merged layer style is added to the target data, and then the obtained addition result (that is, the target data with the merged layer style added) is transmitted to the client, so that the client can draw the layer according to the addition result. On this basis, optionally, for those original layer styles that have not been merged (in order to simplify the expression, they are referred to as unmerged layer styles here), the unmerged layer style can also be added to the partial data corresponding to the unmerged layer style in the map data, and then the partial data with the unmerged layer style added and the target data with the merged layer style added are transmitted to the client together, so that the client can draw the layer according to these data.
[0044] In combination with the application scenarios that may be involved in the embodiments of the present invention, the layer style can be customized based on the Mapbox technology. The Mapbox layer style specification describes information such as map data source, map style, map symbols and fonts in the attribute fields of the JSON object.
[0045] On this basis, the above technical solution has at least the following advantages:
[0046] 1) It can effectively compress the layer styles created according to the layer style specifications agreed upon by Mapbox, that is, it can maintain the conventions of the layer style specifications;
[0047] 2) It can reduce the number and range of redundant layer styles that need to be rendered on the client, thereby reducing the computational load in the process of calculating layer styles and conflicts between layers, and reducing the frame loss rate of the client;
[0048] 3) The layer styles displayed to the user can be defined when creating layer style specifications in the same way as before, so the layer styles are easier to maintain and are convenient for client use.
[0049] The technical solution of the embodiment of the present invention receives a map data transmission request sent by a client, and determines the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data; when there are original layer styles of the same category in at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style; for target data corresponding to the merged layer style in the map data, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client draws the layer according to the received added result. The above technical solution merges the original layer styles and draws the layer based on the obtained merged layer style, that is, reduces the number of layers to be drawn by reducing the number of layer styles applied in the layer drawing process, thereby improving the layer drawing efficiency, and because the layer is drawn according to the merged layer style, this does not reduce the information covered by the drawn layer.
[0050] An optional technical solution is that before merging the original layer styles of the same category to obtain the merged layer style, the layer drawing method further includes: storing the original layer styles of the same category. In other words, before merging the original layer styles, the original layer styles are first stored, thereby ensuring that the original layer styles can be traced back later.
[0051] Figure 3 It is a flowchart of another layer drawing method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, after determining the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data, the above-mentioned layer drawing method also includes: for the current layer style in at least one original layer style, comparing the category of the current layer style with the category of the next original layer style of the current layer style; taking the next original layer style as the current layer style, and if the next original layer style of the current layer style exists, returning to execute the step of comparing the category of the current layer style with the category of the next original layer style of the current layer style; according to the comparison results corresponding to each original layer style in at least one original layer style, determining whether there is an original layer style with the same category in at least one original layer style. Among them, the explanation of the terms that are the same or corresponding to the above-mentioned embodiments will not be repeated here.
[0052] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0053] S210: Receive a map data transmission request sent by a client, and determine map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data.
[0054] S220. For a current layer style in at least one original layer style, compare a category of the current layer style with a category of an original layer style next to the current layer style.
[0055] Among them, each original layer style in at least one original layer style has an arrangement order. On this basis, the current layer style can be understood as the layer style currently being processed in at least one original layer style, and the next original layer style can be understood as the original layer style arranged after the current layer style in at least one original layer style. The category of the current layer style is compared with the category of the next original layer style of the current layer style to determine whether the categories of the two are the same.
[0056] S230. Use the next original layer style as the current layer style, and if the next original layer style of the current layer style exists, return to execute the step of comparing the category of the current layer style with the category of the next original layer style of the current layer style in S220.
[0057] Among them, the next original layer style is used as the current layer style, and if the next original layer style of the current layer style exists, the above comparison step can be returned to be executed. In other words, each original layer style in at least one original layer style can be compared with its next original layer style, thereby obtaining the comparison result corresponding to each original layer style, and the comparison result can reflect whether the category of the original layer style is the same as that of the previous original layer style and / or the next original layer style.
[0058] S240. Determine whether there is an original layer style of the same category in the at least one original layer style according to the comparison results corresponding to each original layer style in the at least one original layer style.
[0059] After obtaining the comparison results corresponding to each original layer style, it can be determined whether there is an original layer style of the same category in at least one original layer style according to the comparison results.
[0060] S250: When there are original layer styles of the same category in at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style.
[0061] S260. For target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client draws the layer according to the received added result.
[0062] The technical solution of the embodiment of the present invention improves the efficiency of judging original layer styles of the same category by comparing each original layer style in at least one original layer style with its next original layer style.
[0063] Figure 4 It is a flowchart of another layer drawing method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, a receiving unit, a storage unit, a determining unit and a sending unit are configured on the server side; receiving a map data transmission request sent by a client, and determining the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data, may include: receiving a map data transmission request sent by a client through a receiving unit, and forwarding the map data transmission request to a storage unit; receiving a map data transmission request through a storage unit, and determining the map data corresponding to the map data transmission request from the stored data, and determining at least one original layer style corresponding to the map data from the stored layer styles, and sending the map data and at least one original layer style to the determining unit; in the case where there are original layer styles of the same category in at least one original layer style, combining the original layer styles of the same category. And, obtaining a merged layer style may include: receiving map data and at least one original layer style through a determination unit, and when there are original layer styles of the same category in at least one original layer style, merging the original layer styles of the same category to obtain a merged layer style; for target data corresponding to the merged layer style in the map data, adding the merged layer style to the target data, and transmitting the obtained addition result to the client, so that the client draws the layer according to the received addition result, which may include: adding the merged layer style to the target data corresponding to the merged layer style in the map data through a determination unit, and sending the obtained addition result to a sending unit; receiving the addition result through a sending unit, transmitting the addition result to the client, so that the client draws the layer according to the received addition result. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0064] See also Figure 4 and Figure 5 (In the figure, the left side is a user terminal with a client deployed, and the right side is a server with a server deployed. The server is configured with a receiving unit, a storage unit, a determining unit, and a sending unit). The method of this embodiment may specifically include the following steps:
[0065] S310: Receive a map data transmission request sent by a client through a receiving unit, and forward the map data transmission request to a storage unit.
[0066] S320. Receive a map data transmission request through a storage unit, determine the map data corresponding to the map data transmission request from the stored data, and determine at least one original layer style corresponding to the map data from the stored layer styles, and send the map data and the at least one original layer style to the determination unit.
[0067] The stored data may be understood as various map data stored in the storage unit, and the map data requested this time may be determined from the stored data through the storage unit. The stored layer styles may be understood as various original layer styles stored in the storage unit, and the original layer styles corresponding to the map data requested this time may be determined from the stored layer styles through the storage unit. Further, the determined map data and original layer styles are sent to the determination unit through the storage unit.
[0068] S330. Receive map data and at least one original layer style through a determination unit, and when there are original layer styles with the same category in the at least one original layer style, merge the original layer styles with the same category to obtain a merged layer style.
[0069] S340. The determining unit adds the merged layer style to the target data corresponding to the merged layer style in the map data, and sends the obtained adding result to the sending unit.
[0070] S350, receiving the adding result through the sending unit, and transmitting the adding result to the client, so that the client draws the layer according to the received adding result.
[0071] The technical solution of the embodiment of the present invention realizes the merging of layer styles through the cooperation of the receiving unit, the storage unit, the determining unit and the sending unit, thereby achieving the effect of fast layer drawing.
[0072] Figure 6 : is a flowchart of another layer drawing method provided in an embodiment of the present invention. This embodiment is optimized based on the above technical solutions. In this embodiment, optionally, after merging the original layer styles of the same category to obtain the merged layer style, the above layer drawing method may also include: creating a mapping table based on the mapping relationship between the original layer styles of the same category and the merged layer styles. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0073] See also Figure 6 The method of this embodiment may specifically include the following steps:
[0074] S410: Receive a map data transmission request sent by a client, and determine map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data.
[0075] S420: When there are original layer styles with the same category in at least one original layer style, the original layer styles with the same category are merged to obtain a merged layer style.
[0076] S430: Create a mapping table based on the mapping relationship between the original layer styles and the merged layer styles of the same category.
[0077] Among them, based on the original layer style and the merged layer style with a mapping relationship, a mapping table is created, which facilitates the subsequent sourcing of the original layer style based on the mapping table. On this basis, optionally, the mapping table can be stored in the above-mentioned storage unit. Figure 2 Taking the example shown as an example, a mapping table created based on this is shown in the following Table 1.
[0078] Table 1 Mapping table
[0079]
[0080]
[0081] S440. For target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client draws the layer according to the received added result.
[0082] Among them, S430 and S440 can be executed in parallel or in series, which can be set according to actual conditions and is not specifically limited here.
[0083] The technical solution of the embodiment of the present invention creates a mapping table through the original layer style and the merged layer style that have a mapping relationship, which facilitates subsequent sourcing to the original layer style based on the mapping table.
[0084] An optional technical solution, after transmitting the obtained adding result to the client, the above-mentioned layer drawing method also includes: upon receiving an original layer style transmission request sent by the client for the adding result, determining, according to a mapping table, an original layer style in at least one original layer style corresponding to the original layer style transmission request; and transmitting the determined original layer style to the client.
[0085] Among them, after receiving the target data with the merged layer style added, the client may find through analysis that it needs to apply the original layer style corresponding to the merged layer style. At this time, the client can send the original layer style transmission request for the target data with the merged layer style added to the server. Then, the server can determine the corresponding original layer style in at least one original layer style based on the received original layer style transmission request and the mapping table, and transmit the determined original layer style to the client. In this way, the client can perform subsequent processing based on the received original layer style.
[0086] Figure 7 This is a structural block diagram of a layer drawing device provided in an embodiment of the present invention, and the device is used to execute the layer drawing method provided in any of the above embodiments. The device and the layer drawing method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the layer drawing device, refer to the embodiment of the above layer drawing method. Figure 7 The device is configured on the server side, and the device may specifically include: an original layer style determination module 510, a merged layer style acquisition module 520 and a layer drawing module 530.
[0087] The original layer style determination module 510 is used to receive a map data transmission request sent by a client, and determine the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data;
[0088] The merged layer style obtaining module 520 is used to merge the original layer styles of the same category to obtain a merged layer style when there are original layer styles of the same category in at least one original layer style;
[0089] The layer drawing module 530 is used to add the merged layer style to the target data corresponding to the merged layer style in the map data, and transmit the obtained added result to the client, so that the client performs layer drawing according to the received added result.
[0090] Optionally, the layer drawing device further includes:
[0091] a category comparison module, configured to, after determining the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data, compare, for a current layer style in the at least one original layer style, a category of the current layer style with a category of a next original layer style of the current layer style;
[0092] Returning the execution module, used for taking the next original layer style as the current layer style, and returning to execute the step of comparing the category of the current layer style with the category of the next original layer style of the current layer style if the next original layer style of the current layer style exists;
[0093] The category determination module is used to determine whether there is an original layer style with the same category in at least one original layer style according to the comparison results corresponding to each original layer style in the at least one original layer style.
[0094] Optionally, a receiving unit, a storage unit, a determining unit and a sending unit are configured on the server;
[0095] The original layer style determination module is specifically used for:
[0096] receiving, via the receiving unit, a map data transmission request sent by the client, and forwarding the map data transmission request to the storage unit;
[0097] receiving a map data transmission request through a storage unit, determining map data corresponding to the map data transmission request from the stored data, and determining at least one original layer style corresponding to the map data from the stored layer styles, and sending the map data and the at least one original layer style to a determination unit;
[0098] Merge layer styles to get modules, specifically used for:
[0099] The determining unit receives the map data and at least one original layer style, and when there are original layer styles of the same category in the at least one original layer style, merges the original layer styles of the same category to obtain a merged layer style;
[0100] Layer drawing module, specifically used for:
[0101] By means of the determination unit, for target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained adding result is sent to the sending unit;
[0102] The adding result is received through the sending unit, and the adding result is transmitted to the client, so that the client draws the layer according to the received adding result.
[0103] Optionally, the layer drawing device further includes:
[0104] The mapping table creation module is used to create a mapping table based on the mapping relationship between the original layer styles of the same category and the merged layer style after merging the original layer styles of the same category to obtain the merged layer style.
[0105] On this basis, optionally, the layer drawing device further includes:
[0106] an original layer style request module, configured to, after transmitting the obtained adding result to the client, determine, according to the mapping table, an original layer style in at least one original layer style corresponding to the original layer style transmission request in case of receiving an original layer style transmission request sent by the client for the adding result;
[0107] The original layer style transmission module is used to transmit the determined original layer style to the client.
[0108] Optionally, the layer drawing device further includes:
[0109] The original layer style storage module is used to merge the original layer styles of the same category and store the original layer styles of the same category before obtaining the merged layer style.
[0110] Based on any of the above-mentioned layer drawing devices, optionally, original layer styles of the same category include original layer styles that meet preset conditions, and the preset conditions include at least one of the same type, the same data source used, and the same layout and drawing scheme used.
[0111] The layer drawing device provided by the embodiment of the present invention receives a map data transmission request sent by a client through an original layer style determination module, and determines the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data; through a merged layer style acquisition module, when there are original layer styles of the same category in at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style; through a layer drawing module, for target data corresponding to the merged layer style in the map data, the merged layer style is added to the target data, and the obtained addition result is transmitted to the client, so that the client performs layer drawing according to the received addition result. The above device merges the original layer styles and performs layer drawing based on the obtained merged layer style, that is, by reducing the number of layer styles applied in the layer drawing process to reduce the number of layers to be drawn, thereby improving the efficiency of layer drawing, and because the layer is drawn according to the merged layer style, this does not reduce the information covered by the drawn layer.
[0112] The layer drawing device provided in the embodiment of the present invention can execute the layer drawing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0113] It is worth noting that in the embodiment of the above-mentioned layer drawing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0114] Figure 8 A schematic diagram of a server 10 that can be used to implement an embodiment of the present invention is shown. The server is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The server may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0115] like Figure 8 As shown, the server 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the server 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0116] A number of components in the server 10 are connected to the I / O interface 15, which may include: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the server 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0117] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a layer drawing method.
[0118] In some embodiments, the layer drawing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the server 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the layer drawing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the layer drawing method in any other appropriate manner (e.g., by means of firmware).
[0119] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein may be implemented on a server having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the server. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0124] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A layer drawing method, characterized in that: Applied to the server, the method includes: receiving a map data transmission request sent by a client, and determining map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data; In the case that there are original layer styles of the same category in the at least one original layer style, merging the original layer styles of the same category to obtain a merged layer style; For target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained added result is transmitted to the client, so that the client performs layer drawing according to the received added result.
2. The method according to claim 1, characterized in that After determining the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data, the method further includes: For a current layer style in the at least one original layer style, comparing a category of the current layer style with a category of an original layer style next to the current layer style; Taking the next original layer style as the current layer style, and if the next original layer style of the current layer style exists, returning to the step of comparing the category of the current layer style with the category of the next original layer style of the current layer style; According to the comparison results respectively corresponding to the respective original layer styles in the at least one original layer style, it is determined whether there is an original layer style of the same category in the at least one original layer style.
3. The method according to claim 1, characterized in that The server is provided with a receiving unit, a storage unit, a determining unit and a sending unit; The receiving a map data transmission request sent by a client, and determining the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data, comprises: Receiving, by the receiving unit, a map data transmission request sent by a client, and forwarding the map data transmission request to the storage unit; receiving the map data transmission request through the storage unit, determining the map data corresponding to the map data transmission request from the stored data, and determining at least one original layer style corresponding to the map data from the stored layer styles, and sending the map data and the at least one original layer style to the determination unit; When there are original layer styles of the same category in the at least one original layer style, merging the original layer styles of the same category to obtain a merged layer style includes: The map data and the at least one original layer style are received by the determination unit, and when there are original layer styles of the same category in the at least one original layer style, the original layer styles of the same category are merged to obtain a merged layer style; The step of adding the merged layer style to the target data in the map data corresponding to the merged layer style, and transmitting the obtained adding result to the client, so that the client performs layer drawing according to the received adding result, includes: By means of the determining unit, for target data in the map data corresponding to the merged layer style, the merged layer style is added to the target data, and the obtained adding result is sent to the sending unit; The adding result is received by the sending unit, and the adding result is transmitted to the client, so that the client performs layer drawing according to the received adding result.
4. The method according to claim 1, characterized in that: After merging the original layer styles of the same category to obtain a merged layer style, the method further includes: A mapping table is created based on the mapping relationship between the original layer styles of the same category and the merged layer styles.
5. The method according to claim 4, characterized in that After transmitting the obtained adding result to the client, the method further includes: Upon receiving an original layer style transmission request sent by the client in response to the adding result, determining, according to the mapping table, an original layer style in the at least one original layer style that corresponds to the original layer style transmission request; The determined original layer style is transmitted to the client.
6. The method according to claim 1, characterized in that Before merging the original layer styles of the same category to obtain the merged layer style, the method further includes: The original layer styles of the same category are saved.
7. The method according to any one of claims 1 to 6, characterized in that The original layer styles of the same category include original layer styles that meet preset conditions, and the preset conditions include at least one of the same type, the same data source used, and the same layout and drawing scheme used.
8. A layer drawing device, characterized in that: Configured at the server end, the device includes: An original layer style determination module is used to receive a map data transmission request sent by a client, and determine the map data corresponding to the map data transmission request and at least one original layer style corresponding to the map data; a module for obtaining a merged layer style, configured to, when there are original layer styles of the same category in the at least one original layer style, merge the original layer styles of the same category to obtain a merged layer style; The layer drawing module is used to add the merged layer style to the target data corresponding to the merged layer style in the map data, and transmit the obtained added result to the client, so that the client performs layer drawing according to the received added result.
9. A server, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the layer drawing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the layer drawing method as described in any one of claims 1 to 7 when executed.