Grid display method and device, electronic equipment and computer readable storage medium

By determining the target zoom level and map tile number in the front-end map application system, and only requesting and rendering target grid data from the back-end server, the browsing delay and lag issues caused by the large number of law enforcement grids in large cities are resolved, resulting in a smoother and more real-time grid display.

CN115546431BActive Publication Date: 2026-04-14TIMES LINGYU (XIAMEN) INTELLIGENT INFORMATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Large cities have a large number of law enforcement grids, which leads to excessively long grid data request and local rendering times, causing grid browsing delays and lag.

Method used

By determining the target zoom level and map tile number of the current map view in the front-end map application system, the target grid data is only requested from the back-end server and rendered and displayed on the front end, reducing the transmission time of grid data and local rendering time.

Benefits of technology

It improves the smoothness and real-time performance of grid display, and reduces grid data requests and local rendering time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115546431B_ABST
    Figure CN115546431B_ABST
Patent Text Reader

Abstract

The application provides a grid display method and device, electronic equipment and a computer readable storage medium, wherein the method comprises: determining a target zoom level of a current map view and target numbers of each target map slice contained in the current map view according to the current map view currently browsed by a user; the target map slice is obtained by pre-dividing a target map; sending a service request containing the target zoom level and the target numbers to a backend server to obtain target grid data of a target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids; after rendering the target grid data to obtain a target grid layer, superimposing the target grid layer on a corresponding position on the target map to display the target grid layer through the current map view; the target grid layer contains grid attribute information of the target grid. The method is beneficial to improving the smoothness and real-time performance of grid display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a grid display method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Currently, with the development of computer performance and mapping technology, users have increasingly higher requirements for the real-time performance and smooth display of map data. In urban management operations, grassroots grid workers need to patrol and enforce the law in the geographical area corresponding to their assigned enforcement grid. The urban management integrated law enforcement screen needs to display the city's enforcement grids. For example, the actual geographical area where city A is located can be divided into multiple enforcement grids, and each grid worker is responsible for managing at least one enforcement grid's corresponding geographical area. The urban management integrated law enforcement screen can display the grid information of each enforcement grid in city A (including, for example, grid name, area, number of events, person in charge information, etc.).

[0003] In existing technologies, when displaying the law enforcement grid corresponding to city A on the map corresponding to city A through the urban management integrated law enforcement screen, it is necessary to request the grid data (such as grid name, area, number of events, person in charge information, etc.) corresponding to all law enforcement grids in city A from the database. Then, all the requested grid data are rendered to obtain a grid layer. The rendered grid layer is then overlaid on the map corresponding to city A to display the grid information of the law enforcement grids in city A.

[0004] Given the large number of law enforcement grids in major cities (often exceeding 100,000), the sheer volume of data increases grid data request and local rendering times, causing delays and stuttering when browsing the grids. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a grid display method, apparatus, electronic device and computer-readable storage medium to reduce grid data request time and local rendering time, and improve the smoothness and real-time performance of grid display.

[0006] In a first aspect, embodiments of this application provide a grid display method, which is applied to a front-end map application system, and the method includes:

[0007] Based on the current map view currently viewed by the user, determine the target zoom level of the current map view and the target number of each target map tile contained in the current map view; wherein, the target map tile is obtained by pre-dividing the target map; and the current map view is at least a part of the target map;

[0008] A service request containing the target zoom level and the target number is sent to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids;

[0009] After rendering the target grid data to obtain the target grid layer, the target grid layer is overlaid on the corresponding position on the target map to display the target grid layer through the current map view; the target grid layer contains the grid attribute information of the target grid.

[0010] In conjunction with the first aspect, this application provides a first possible implementation of the first aspect, wherein sending a service request containing the target zoom level and the target number to a backend server to obtain target grid data of the target grid corresponding to the current map view from the backend server includes:

[0011] A service request containing the target zoom level and the target number is sent to the backend server. The backend server then determines all map tiles corresponding to the target map at the target zoom level, filters out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level, and calculates the intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile. Finally, the target grid data corresponding to the target grid is returned to the frontend map application system. The number of map tiles divided into the target map varies depending on the zoom level.

[0012] In conjunction with the first aspect, this application provides a second possible implementation of the first aspect, wherein the target grid data includes a rendering method and grid attribute information; the grid attribute information includes any one or more of the following: grid name, corresponding actual geographical area, management object to which it belongs, and the number of processing events within a preset time period; the rendering method includes any one or more of the following: grid color, grid outline, and text style; the grid color is determined based on the number of processing events;

[0013] After sending the service request containing the zoom level and the number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server, the method further includes:

[0014] The target mesh layer is obtained by rendering the mesh attribute information using the aforementioned rendering method.

[0015] Secondly, embodiments of this application provide a grid display method, which is applied to a backend server, and the method includes:

[0016] The system receives a service request from a front-end map application system. The service request includes the target zoom level of the current map view currently viewed by the user and the target numbers of each target map tile contained in the current map view. The target map tiles are obtained by pre-dividing the target map. The current map view is at least a part of the target map.

[0017] Based on the target zoom level and the target number, the target grid data corresponding to the target grid in the current map view is returned to the front-end map application system. This allows the front-end map application system to render the target grid data to obtain a target grid layer, then overlay the target grid layer onto the corresponding position on the target map, and display the target grid layer through the current map view. The target map is pre-divided into multiple grids, and the target grid layer contains the grid attribute information of the target grid.

[0018] In conjunction with the second aspect, this application provides a first possible implementation of the second aspect, wherein returning the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number includes:

[0019] Based on the target zoom level, determine all map tiles corresponding to the target map at that target zoom level; wherein, the number of map tiles into which the target map is divided varies when the zoom levels are different.

[0020] Based on the target number, filter out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level;

[0021] The intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map is calculated to determine the target grid on the target map that corresponds to the target map tile.

[0022] The target grid data corresponding to the target grid is returned to the front-end map application system.

[0023] In conjunction with the first possible implementation of the second aspect, this application provides a second possible implementation of the second aspect, wherein, after determining the target grid corresponding to the target map tile on the target map, the method further includes:

[0024] Based on the target grid, the grid data corresponding to the target grid is retrieved from the grid data corresponding to each grid stored in the server and used as the first grid data; the second position information contained in the grid data stored in the backend server is represented by the web Mercator coordinate system;

[0025] The second position information in the web Mercator coordinate system of the first grid data is converted into the third position information in the MapBox VectorTile coordinate space, so as to convert the first grid data into the second grid data.

[0026] The second grid data is converted to MVT format to obtain target grid data with MVT format.

[0027] Thirdly, embodiments of this application also provide a grid display device, the device residing in a front-end map application system, the device comprising:

[0028] The determining module is configured to determine the target zoom level of the current map view and the target number of each target map tile contained in the current map view based on the current map view currently being viewed by the user; wherein, the target map tile is obtained by pre-dividing the target map; and the current map view is at least a part of the target map;

[0029] The sending module is used to send a service request containing the target zoom level and the target number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids;

[0030] The overlay module is used to overlay the target grid layer onto the corresponding position on the target map after rendering the target grid data to obtain the target grid layer, so as to display the target grid layer through the current map view; the target grid layer contains the grid attribute information of the target grid.

[0031] In conjunction with the second aspect, this application provides a first possible implementation of the third aspect, wherein the sending module, when sending a service request containing the target zoom level and the target number to a backend server to obtain target grid data of the target grid corresponding to the current map view from the backend server, is specifically used for:

[0032] A service request containing the target zoom level and the target number is sent to the backend server. The backend server then determines all map tiles corresponding to the target map at the target zoom level, filters out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level, and calculates the intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile. Finally, the target grid data corresponding to the target grid is returned to the frontend map application system. The number of map tiles divided into the target map varies depending on the zoom level.

[0033] In conjunction with the third aspect, this application provides a second possible implementation of the third aspect, wherein the target grid data includes a rendering method and grid attribute information; the grid attribute information includes any one or more of the following: grid name, corresponding actual geographical area, management object to which it belongs, and the number of processing events within a preset time period; the rendering method includes any one or more of the following: grid color, grid outline, and text style; the grid color is determined based on the number of processing events; the device further includes:

[0034] The rendering module is used to render the grid attribute information using the rendering method after the sending module sends a service request containing the target zoom level and the target number to the backend server to obtain the target grid data corresponding to the current map view from the backend server, so as to obtain the target grid layer.

[0035] Fourthly, embodiments of this application also provide a grid display device, the device residing on a backend server, the device comprising:

[0036] A receiving module is used to receive service requests sent by a front-end map application system; wherein, the service request includes the target zoom level of the current map view currently viewed by the user and the target numbers of each target map tile contained in the current map view; the target map tiles are obtained by pre-dividing the target map; the current map view is at least a part of the target map;

[0037] The return module is used to return the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number, so that the front-end map application system can overlay the target grid layer onto the corresponding position on the target map after rendering the target grid data to obtain the target grid layer, and display the target grid layer through the current map view; wherein, the target map is pre-divided into multiple grids; the target grid layer contains the grid attribute information of the target grid.

[0038] In conjunction with the fourth aspect, this application provides a first possible implementation of the fourth aspect, wherein, when the return module is used to return the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number, it is specifically used for:

[0039] Based on the target zoom level, determine all map tiles corresponding to the target map at that target zoom level; wherein, the number of map tiles into which the target map is divided varies when the zoom levels are different.

[0040] Based on the target number, filter out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level;

[0041] The intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map is calculated to determine the target grid on the target map that corresponds to the target map tile.

[0042] The target grid data corresponding to the target grid is returned to the front-end map application system.

[0043] In conjunction with the first possible implementation of the fourth aspect, embodiments of this application provide a second possible implementation of the fourth aspect, which further includes:

[0044] The query module is used to, after the return module determines the target grid corresponding to the target map tile on the target map, query the grid data corresponding to the target grid from the grid data corresponding to each grid stored in its own memory as the first grid data; the second location information contained in the grid data stored in the backend server is represented by the web Mercator coordinate system;

[0045] The first conversion module is used to convert the second position information in the web Mercator coordinate system in the first grid data into the third position information in the MapBox VectorTile coordinate space, so as to convert the first grid data into the second grid data.

[0046] The second conversion module is used to perform format conversion on the second grid data to convert the current format of the second grid data into the MVT format, so as to obtain the target grid data with the MVT format.

[0047] Fifthly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps in any of the possible implementations of the first aspect or the second aspect described above are performed.

[0048] In a sixth aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of any of the possible implementations of the first or second aspect described above.

[0049] This application provides a grid display method, apparatus, electronic device, and computer-readable storage medium. In this embodiment, the target zoom level corresponding to the current map view and the target numbers of each target map tile it contains are sent to a backend server. Only the target grid data of the target grid corresponding to the current map view is obtained from the backend server, and then only the target grid data of the target grid corresponding to the current map view is rendered and displayed. Compared with the prior art method of obtaining grid data of all grids corresponding to the target map from the backend server and rendering all grid data, the method of this application helps to reduce grid data request time (i.e., the time to obtain grid data) and local rendering time, improving the smoothness and real-time performance of grid display.

[0050] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 A flowchart of a grid display method provided in an embodiment of this application is shown;

[0053] Figure 2 This application provides a schematic diagram of the current map view, target map, and map tiles as illustrated in its embodiments.

[0054] Figure 3 This illustration shows a comparison of the number of map tiles corresponding to different zoom levels of the target map provided in the embodiments of this application;

[0055] Figure 4 This illustration shows a schematic diagram of various grids on a target map provided in an embodiment of this application;

[0056] Figure 5 A flowchart of another grid display method provided in an embodiment of this application is shown;

[0057] Figure 6 This illustration shows a structural schematic diagram of a grid display device provided in an embodiment of this application;

[0058] Figure 7 A schematic diagram of another grid display device provided in an embodiment of this application is shown;

[0059] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0061] Considering the large number of law enforcement grids in large cities (often exceeding 100,000), the sheer volume increases grid data request and local rendering times, causing delays and stuttering when browsing the grid. Therefore, this application provides a grid display method, apparatus, electronic device, and computer-readable storage medium to reduce grid data request and local rendering times, improving the smoothness and real-time performance of grid display. The following embodiments illustrate this.

[0062] Example 1:

[0063] To facilitate understanding of this embodiment, a grid display method disclosed in this application will first be described in detail. This method is applied to a front-end map application system. Figure 1 A flowchart of a grid display method provided in an embodiment of this application is shown, such as... Figure 1 As shown, it includes the following steps:

[0064] S101: Based on the current map view currently viewed by the user, determine the target zoom level of the current map view and the target number of each target map tile contained in the current map view; wherein, the target map tile is obtained by pre-dividing the target map; the current map view is at least a part of the target map.

[0065] In this embodiment, the front-end map application system is built on Mapbox-GL. As the user drags the target map on the screen, the target zoom level of the current map view, and the target number of each target map tile contained in the current map view, are determined based on the user's current browsing (i.e., the map currently displayed on the screen). The target map can be a provincial or municipal map, or a map of a specified region, and is specifically a two-dimensional map. For example, the target map could be the city map corresponding to city A.

[0066] The target zoom level is specifically a zoom scale. When the target map is zoomed in (i.e., the larger the target zoom level), the more details the user sees on the target map, but the smaller the area that the user sees on the target map. Conversely, when the target map is zoomed out (i.e., the smaller the target zoom level), the less details the user sees on the target map, but the larger the area that the user sees on the target map.

[0067] Figure 2 This application provides an embodiment of a current map view, a target map, and map tiles, as illustrated in the diagram. Figure 2 As shown, the target map is pre-divided into multiple map tiles. During the division, the smallest outer rectangle of the target map is divided, for example, into squares of size 256×256, to complete the division of the target map and obtain multiple map tiles. Specifically, except for the edges of the target map, each map tile within the target map is the same size, a 256×256 square.

[0068] The current map view displays at least a portion of the target map, such as... Figure 2 As shown, map tiles contained in the current map view are used as target map tiles. The current map view contains at least one target map tile. In this embodiment, if some map tiles in map tile a are located in the current map view, while other map tiles are not, then map tile a is still used as a target map tile. Each map tile corresponds to a unique number, and each map tile number can represent the location of the map tile on the target map; for example, the number can be the coordinates of the map tile on the target map.

[0069] S102: Send a service request containing the target zoom level and target number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids.

[0070] In this embodiment, when there are multiple target map tiles, the service request includes the target number corresponding to each target map tile.

[0071] After receiving a service request containing the target zoom level and target number, the backend server determines all map tiles corresponding to the target map at that zoom level. Specifically, the number of map tiles the target map is divided into varies depending on the zoom level. The higher the zoom level, the more map tiles the target map is divided into. Figure 3 This illustration shows a comparison of the number of map tiles corresponding to different zoom levels of the target map provided in the embodiments of this application, such as... Figure 3As shown, the size of the map tiles is fixed and remains the same regardless of the zoom level.

[0072] Since the target map remains constant, the information contained in each map tile changes when the zoom level changes, i.e., when the number of map tiles changes. For example, at zoom level 3, map tile b1 at this zoom level contains the areas where street c and street d are located in city A; while at zoom level 4, map tile b2 at this zoom level contains the area where street c is located in city A, and map tile b3 at this zoom level contains the area where street d is located in city A.

[0073] After the backend server determines all map tiles corresponding to the target map at the target zoom level, it then selects the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level.

[0074] The backend server calculates the intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map that corresponds to the target map tile.

[0075] In this embodiment, the target map is pre-divided into multiple grids. Specifically, in this embodiment, the target map is a city map of city A. The actual geographical area of ​​city A is divided into multiple grids. Each grid administrator is responsible for managing the geographical area corresponding to at least one grid. The grids are urban management business grids (i.e., law enforcement grids). The grids that divide the actual geographical area of ​​city A correspond one-to-one with the grids on the target map.

[0076] Figure 4 This diagram illustrates various grids on a target map provided in an embodiment of this application. The size and shape of the grids on the same target map may differ. The shape of the grids may be irregular.

[0077] In this embodiment, the target map tile and the target grid are located at the same position on the target map.

[0078] The backend server retrieves the grid data corresponding to the target grid from its own stored grid data, using this as the first grid data. The second location information contained in the grid data stored on the backend server is represented using a web Mercator coordinate system. This second location information indicates the grid's position on the target map.

[0079] The backend server converts the second location information in the web Mercator coordinate system of the first grid data into a third location information in the MapBoxVectorTile coordinate space, thus transforming the first grid data into second grid data. The third location information represents the grid's position on the target map. The coordinate systems of the second and third location information are different.

[0080] In this embodiment, the second position information in the web Mercator coordinate system of the first grid data is input into the ST_AsMVTGeom function, and the third position information in the MapBox VectorTile coordinate space is output.

[0081] The backend server performs format conversion on the second grid data to convert the current format of the second grid data into the MVT format, thereby obtaining the target grid data with the MVT format.

[0082] Specifically, the second grid data is input into the ST_AsMVT function, which outputs target grid data in MVT format (with the suffix .mvt).

[0083] The backend server returns the target grid data corresponding to the target grid to the frontend map application system.

[0084] S103: After rendering the target grid data to obtain the target grid layer, the target grid layer is overlaid on the corresponding position on the target map to display the target grid layer through the current map view; the target grid layer contains the grid attribute information of the target grid.

[0085] In one possible implementation, the target grid data includes a rendering method and grid attribute information; the grid attribute information includes any one or more of the following: grid name, corresponding actual geographical area, management object to which it belongs, and the number of events processed within a preset time period; the rendering method includes any one or more of the following: grid color, grid outline, and text style; the grid color is determined based on the number of events processed.

[0086] After executing step S102, which sends a service request containing the zoom level and number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server, the following steps can also be performed:

[0087] The grid attribute information is rendered using a rendering method to obtain the target grid layer.

[0088] In this embodiment, the management objects are the responsible grid members and / or the law enforcement team (the grid members are the staff of the law enforcement team).

[0089] For example, if the number of events processed by target grid e in a year is 63, and 63 is between 50 and 100, then the color corresponding to 50-100 is used as the grid color of target grid e.

[0090] The embodiments of this application eliminate the need to load all grid data; only the target grid data corresponding to the current map view needs to be loaded, which helps to improve the smoothness and real-time performance of grid display.

[0091] Example 2:

[0092] Based on the same technical concept, this application also provides another grid display method, which is applied to a backend server. Figure 5 A flowchart of another grid display method provided in an embodiment of this application is shown, such as... Figure 5 As shown, the method includes:

[0093] S501: Receive a service request sent by the front-end map application system; wherein, the service request includes the target zoom level of the current map view currently viewed by the user and the target number of each target map tile contained in the current map view; the target map tile is obtained by pre-dividing the target map; the current map view is at least a part of the target map;

[0094] S502: Based on the target zoom level and target number, return the target grid data of the target grid corresponding to the current map view to the front-end map application system, so that after the front-end map application system renders the target grid data to obtain the target grid layer, it overlays the target grid layer onto the corresponding position on the target map and displays the target grid layer through the current map view; wherein, the target map is pre-divided into multiple grids; the target grid layer contains the grid attribute information of the target grid.

[0095] In one possible implementation, when performing step S502, which returns the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number, the following steps S5021-S5024 can be executed:

[0096] S5021: Based on the target zoom level, determine all map tiles corresponding to the target map at that target zoom level; wherein, the number of map tiles divided into the target map varies when the zoom level is different.

[0097] S5022: Based on the target number, filter out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level.

[0098] S5023: Find the intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile.

[0099] S5024: Return the target grid data corresponding to the target grid to the front-end map application system.

[0100] In one possible implementation, after determining the target grid corresponding to the target map tile on the target map in step S5023, the following steps S50231-S50233 can also be performed:

[0101] S50231: Based on the target grid, the grid data corresponding to the target grid is retrieved from the grid data corresponding to each grid stored in the server as the first grid data; the second position information contained in the grid data stored in the backend server is represented by the web Mercator coordinate system;

[0102] S50232: Convert the second position information in the web Mercator coordinate system in the first grid data into the third position information in the MapBox VectorTile coordinate space, so as to convert the first grid data into the second grid data;

[0103] S50233: Perform format conversion on the second grid data to convert the current format of the second grid data into MVT format, thereby obtaining target grid data with MVT format.

[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the method described above can be referred to the corresponding process in the aforementioned Embodiment 1, and will not be repeated here.

[0105] Example 3:

[0106] Based on the same technical concept, this application also provides a grid display device, which resides in a front-end map application system. Figure 6 A schematic diagram of the structure of a grid display device provided in an embodiment of this application is shown, as follows: Figure 6 As shown, the device includes:

[0107] The determining module 601 is used to determine the target zoom level of the current map view and the target number of each target map tile contained in the current map view based on the current map view currently being viewed by the user; wherein, the target map tile is obtained by pre-dividing the target map; and the current map view is at least a part of the target map;

[0108] The sending module 602 is used to send a service request containing the target zoom level and the target number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids;

[0109] The overlay module 603 is used to overlay the target grid layer onto the corresponding position on the target map after rendering the target grid data to obtain the target grid layer, so as to display the target grid layer through the current map view; the target grid layer contains the grid attribute information of the target grid.

[0110] Optionally, when the sending module 602 sends a service request containing the target zoom level and the target number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server, it is specifically used for:

[0111] A service request containing the target zoom level and the target number is sent to the backend server. The backend server then determines all map tiles corresponding to the target map at the target zoom level, filters out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level, and calculates the intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile. Finally, the target grid data corresponding to the target grid is returned to the frontend map application system. The number of map tiles divided into the target map varies depending on the zoom level.

[0112] Optionally, the target grid data includes a rendering method and grid attribute information; the grid attribute information includes any one or more of the following: grid name, corresponding actual geographical area, management object to which it belongs, and the number of processing events within a preset time period; the rendering method includes any one or more of the following: grid color, grid outline, and text style; the grid color is determined based on the number of processing events; the device further includes:

[0113] The rendering module is used to render the grid attribute information using the rendering method after the sending module sends a service request containing the target zoom level and the target number to the backend server to obtain the target grid data corresponding to the current map view from the backend server, so as to obtain the target grid layer.

[0114] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned Embodiment 1, and will not be repeated here.

[0115] Example 4:

[0116] Based on the same technical concept, this application also provides a grid display device, which resides on a backend server. Figure 7 This application provides a schematic diagram of the structure of another grid display device, as shown in the embodiment of the present application. Figure 7 As shown, the device includes:

[0117] The receiving module 701 is used to receive a service request sent by the front-end map application system; wherein, the service request includes the target zoom level of the current map view currently viewed by the user and the target number of each target map tile contained in the current map view; the target map tile is obtained by pre-dividing the target map; the current map view is at least a part of the target map;

[0118] The return module 702 is used to return the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number, so that after the front-end map application system renders the target grid data to obtain a target grid layer, it overlays the target grid layer onto the corresponding position on the target map and displays the target grid layer through the current map view; wherein, the target map is pre-divided into multiple grids; the target grid layer contains the grid attribute information of the target grid.

[0119] Optionally, when the return module 702 returns the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number, it is specifically used for:

[0120] Based on the target zoom level, determine all map tiles corresponding to the target map at that target zoom level; wherein, the number of map tiles into which the target map is divided varies when the zoom levels are different.

[0121] Based on the target number, filter out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level;

[0122] The intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map is calculated to determine the target grid on the target map that corresponds to the target map tile.

[0123] The target grid data corresponding to the target grid is returned to the front-end map application system.

[0124] Optional, also includes:

[0125] The query module is used to, after the return module 702 determines the target grid corresponding to the target map tile on the target map, query the grid data corresponding to the target grid from the grid data corresponding to each grid stored in its own storage as the first grid data; the second location information contained in the grid data stored in the backend server is represented by the web Mercator coordinate system;

[0126] The first conversion module is used to convert the second position information in the web Mercator coordinate system in the first grid data into the third position information in the MapBox VectorTile coordinate space, so as to convert the first grid data into the second grid data.

[0127] The second conversion module is used to perform format conversion on the second grid data to convert the current format of the second grid data into the MVT format, so as to obtain the target grid data with the MVT format.

[0128] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding processes in the aforementioned Embodiment 1 and Embodiment 2, and will not be repeated here.

[0129] Example 5:

[0130] Based on the same technical concept, embodiments of this application also provide an electronic device. Figure 8 This application provides a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 8 As shown, the electronic device 800 includes a processor 801, a memory 802, and a bus 803. The memory stores machine-readable instructions that can be executed by the processor. When the electronic device is running, the processor 801 communicates with the memory 802 through the bus 803. The processor 801 executes the machine-readable instructions to perform the steps of the method described in Embodiment 1 or Embodiment 2.

[0131] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding process in the aforementioned Embodiment 1 or Embodiment 2, and will not be repeated here.

[0132] Example 6:

[0133] Based on the same technical concept, Embodiment Six of this application also provides a computer-readable storage medium storing a computer program, which is executed by a processor to perform the steps of the method described in Embodiment One or Embodiment Two.

[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the computer-readable storage medium described above can be referred to the corresponding process in the foregoing Embodiment 1 or Embodiment 2, and will not be repeated here.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0138] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

Claims

1. A grid display method, characterized in that, The method is applied to a front-end map application system, and the method includes: Based on the current map view currently viewed by the user, determine the target zoom level of the current map view and the target number of each target map tile contained in the current map view; wherein, the target map tile is obtained by pre-dividing the target map; and the current map view is at least a part of the target map; A service request containing the target zoom level and the target number is sent to a backend server to obtain target grid data of the target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids; the backend server determines all map tiles corresponding to the target map at the target zoom level according to the target zoom level, and filters out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level according to the target number, and performs an intersection of the first position information of the target map tile on the target map and the second position information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile; After rendering the target grid data to obtain the target grid layer, the target grid layer is overlaid on the corresponding position on the target map to display the target grid layer through the current map view; the target grid layer contains the grid attribute information of the target grid.

2. The method according to claim 1, characterized in that, The step of sending a service request containing the target zoom level and the target number to a backend server to obtain target grid data of the target grid corresponding to the current map view from the backend server includes: A service request containing the target zoom level and the target number is sent to the backend server. The backend server then determines all map tiles corresponding to the target map at the target zoom level, filters out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level, and calculates the intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile. Finally, the target grid data corresponding to the target grid is returned to the frontend map application system. The number of map tiles divided into the target map varies depending on the zoom level.

3. The method according to claim 1, characterized in that, The target grid data includes a rendering method and grid attribute information; the grid attribute information includes any one or more of the following: grid name, corresponding actual geographical area, management object to which it belongs, and the number of events processed within a preset time period; the rendering method includes any one or more of the following: grid color, grid outline, and text style; the grid color is determined based on the number of events processed; After sending a service request containing the target zoom level and the target number to the backend server to obtain the target grid data of the target grid corresponding to the current map view from the backend server, the method further includes: The target mesh layer is obtained by rendering the mesh attribute information using the aforementioned rendering method.

4. A grid display method, characterized in that, The method is applied to a backend server, and the method includes: The system receives a service request from a front-end map application system. The service request includes the target zoom level of the current map view currently viewed by the user and the target numbers of each target map tile contained in the current map view. The target map tiles are obtained by pre-dividing the target map. The current map view is at least a part of the target map. Based on the target zoom level and the target number, the target grid data corresponding to the target grid in the current map view is returned to the front-end map application system. This allows the front-end map application system to render the target grid data to obtain a target grid layer, then overlay the target grid layer onto the corresponding position on the target map, and display the target grid layer through the current map view. The target map is pre-divided into multiple grids, and the target grid layer contains the grid attribute information of the target grid. The step of returning the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number includes: Based on the target zoom level, determine all map tiles corresponding to the target map at that target zoom level; Based on the target number, filter out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level; The intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map is calculated to determine the target grid on the target map that corresponds to the target map tile. The target grid data corresponding to the target grid is returned to the front-end map application system.

5. The method according to claim 4, characterized in that, The number of map tiles into which the target map is divided varies depending on the zoom level.

6. The method according to claim 4, characterized in that, After determining the target grid on the target map corresponding to the target map tile, the method further includes: Based on the target grid, the grid data corresponding to the target grid is retrieved from the grid data corresponding to each grid stored in the server and used as the first grid data; the second position information contained in the grid data stored in the backend server is represented by the web Mercator coordinate system; The second position information in the web Mercator coordinate system of the first grid data is converted into the third position information in the MapBoxVectorTile coordinate space, so as to convert the first grid data into the second grid data. The second grid data is converted to MVT format to obtain target grid data with MVT format.

7. A grid display device, characterized in that, The device resides in the front-end map application system, and the device includes: The determining module is configured to determine the target zoom level of the current map view and the target number of each target map tile contained in the current map view based on the current map view currently being viewed by the user; wherein, the target map tile is obtained by pre-dividing the target map; and the current map view is at least a part of the target map; A sending module is configured to send a service request containing the target zoom level and the target number to a backend server to obtain target grid data of the target grid corresponding to the current map view from the backend server; the target map is pre-divided into multiple grids; the backend server determines all map tiles corresponding to the target map at the target zoom level according to the target zoom level, and filters out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level according to the target number, and performs an intersection calculation on the first position information of the target map tile on the target map and the second position information contained in the grid data corresponding to each grid on the target map to determine the target grid on the target map corresponding to the target map tile; The overlay module is used to overlay the target grid layer onto the corresponding position on the target map after rendering the target grid data to obtain the target grid layer, so as to display the target grid layer through the current map view; the target grid layer contains the grid attribute information of the target grid.

8. A grid display device, characterized in that, The device resides on a backend server, and the device includes: A receiving module is used to receive service requests sent by a front-end map application system; wherein, the service request includes the target zoom level of the current map view currently viewed by the user and the target numbers of each target map tile contained in the current map view; the target map tiles are obtained by pre-dividing the target map; the current map view is at least a part of the target map; The return module is used to return the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number. This allows the front-end map application system to render the target grid data to obtain a target grid layer, overlay the target grid layer onto the corresponding position on the target map, and display the target grid layer through the current map view. The target map is pre-divided into multiple grids, and the target grid layer contains the grid attribute information of the target grid. When the return module returns the target grid data of the target grid corresponding to the current map view to the front-end map application system according to the target zoom level and the target number, it is specifically used for: Based on the target zoom level, determine all map tiles corresponding to the target map at that target zoom level; Based on the target number, filter out the target map tile corresponding to the target number from all map tiles corresponding to the target map at the target zoom level; The intersection of the first location information of the target map tile on the target map and the second location information contained in the grid data corresponding to each grid on the target map is calculated to determine the target grid on the target map that corresponds to the target map tile. The target grid data corresponding to the target grid is returned to the front-end map application system.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the memory via the bus, and the machine-readable instructions, when executed by the processor, perform the steps of the method as described in any one of claims 1 to 3 or 4 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1 to 3 or 4 to 6.

Citation Information

Patent Citations

  • Mass data aggregation display method and system based on map, equipment and medium

    CN110647608A

  • Method and device for generating three-dimensional terrain service

    CN114494631A