Thermodynamic diagram display method and device, equipment, medium and product
By rendering the thermal map on the server side and sending the thermal maps one after another, the time-consuming display of thermal maps in the GIS engine is solved, and the front-end loading speed is improved.
Patent Information
- Application Number
- CN202411378508.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
AI Technical Summary
In the GIS engine, the thermal data volume is huge, and sending full thermal data to the front end makes the thermal map display time to be long and the loading speed is slow.
By completing the shard rendering of the heat map on the server side, the shard latitude and longitude range is determined based on the grid shard data and map scaling level, and a thermal shard picture is generated based on the full map heat data, and the thermal shard picture is sent to the client one after another Perform stitching display.
The front-end loading heatmap rate is significantly improved, solving the problem of time-consuming heatmap display.
Smart Images

Figure CN119225675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method, device, equipment, medium and product for displaying a heat map. Background Art
[0002] With the development of Geographic Information System (GIS), more and more business data need to be displayed and analyzed through maps.
[0003] A heatmap is a visualization chart that uses color to represent data density or intensity. It is used to show the distribution and concentration of data by presenting data in the form of hot spots of different colors in a two-dimensional space.
[0004] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art:
[0005] In the GIS engine, the volume of thermal data is huge. Sending the full amount of thermal data to the front end will make the display of the thermal map very time-consuming and the loading speed very slow. Summary of the invention
[0006] The embodiments of the present invention provide a method, device, equipment, medium and product for displaying a heat map to solve the problem of time-consuming display of the heat map and improve the speed of loading the heat map on the front end.
[0007] According to an embodiment of the present invention, a method for displaying a heat map is provided, the method comprising:
[0008] In response to detecting a heat map display request sent by a client, obtaining grid slice data and a map zoom level corresponding to the heat map display request;
[0009] Determine, according to the grid slice data, grid row and column data corresponding to at least two requested grid slices respectively;
[0010] For each requested grid slice, determine the slice longitude and latitude range according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map;
[0011] The thermal slice maps corresponding to the at least two requested grid slices are respectively sent to the client, so that the client can splice and display the at least two thermal slice maps.
[0012] According to another embodiment of the present invention, a device for displaying a heat map is provided, the device comprising:
[0013] A map zoom level acquisition module, configured to, in response to detecting a heat map display request sent by a client, acquire grid slice data and a map zoom level corresponding to the heat map display request;
[0014] A grid row and column data determination module, used to determine grid row and column data corresponding to at least two requested grid slices respectively according to the grid slice data;
[0015] A thermal slice map determination module is used to determine the slice longitude and latitude range for each requested grid slice according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map;
[0016] The thermal slice map sending module is used to send the thermal slice maps corresponding to at least two requested grid slices to the client, so that the client can splice and display the at least two thermal slice maps.
[0017] According to another embodiment of the present invention, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program that can be executed 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 can execute the method for displaying a thermal map described in any embodiment of the present invention.
[0021] According to another embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for displaying a thermal map described in any embodiment of the present invention when executed.
[0022] According to another embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method for displaying a heat map according to any embodiment of the present invention is implemented.
[0023] The technical solution of the embodiment of the present invention completes the slice rendering of the heat map on the server side. Specifically, according to the grid slice data in the heat map display request, the grid row and column data corresponding to at least two requested grid slices are determined. For each requested grid slice, the longitude and latitude range of the slice is determined according to the map zoom level in the heat map display request and the grid row and column data corresponding to the requested grid slice. According to the slice longitude and latitude range and the thermal data of the entire map, the thermal slice map corresponding to the requested grid slice is determined, and at least two thermal slice maps are sent to the client so that the client can splice and display the at least two thermal slice maps, thereby solving the problem of time-consuming display of the heat map and improving the speed of loading the heat map on the front end.
[0024] 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
[0025] 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.
[0026] Figure 1 A flow chart of a method for displaying a heat map provided by an embodiment of the present invention;
[0027] Figure 2 A flowchart of another method for displaying a heat map provided by an embodiment of the present invention;
[0028] Figure 3 A flowchart of a specific example of a method for displaying a heat map provided by an embodiment of the present invention;
[0029] Figure 4 A schematic diagram of the structure of a thermal map display device provided by an embodiment of the present invention;
[0030] Figure 5 The present invention is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] 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.
[0032] It should be noted that the terms "request", "preset", "first" and "second" 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. In addition, the terms "including" and "having" and any variations thereof 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.
[0033] Figure 1 This is a flow chart of a method for displaying a heat map provided by an embodiment of the present invention. This embodiment is applicable to the case where a client accesses a server to display a heat map. The method can be executed by a heat map display device. The heat map display device can be implemented in the form of hardware and / or software. The heat map display device can be configured in the server. Figure 1 As shown, the method includes:
[0034] S110 . In response to detecting a heat map display request sent by a client, obtaining grid slice data and a map zoom level corresponding to the heat map display request.
[0035] Specifically, the heat map display request is used to instruct the server to send data related to the heat map to the client. Exemplarily, the heat map display request can be generated by the client in response to a trigger operation input by the user based on the display control in the view interface in the client, or it can be generated in response to a display voice instruction input by the user, or it can be generated in response to an adjustment operation input by the user based on the view interface in the client, wherein the adjustment operation includes a zoom operation and / or a move operation. The generation method of the heat map display request is not limited here, and can be customized according to actual needs.
[0036] Specifically, the grid slice data represents the positioning information corresponding to the current view area in the view interface in the client, and the map zoom level represents the zoom level corresponding to the current view area or the visualized map area.
[0037] The visualized map area represents the preset full map area that can be displayed in the view interface, and the current view area is included in the visualized map area. For example, the visualized map area can be the entire world map area, the map area of a specified country, the map area of a specified town, etc. The visualized map area is not limited here and can be customized according to actual needs.
[0038] Specifically, at different map zoom levels, a preset slice size is used to divide the visual map area into a plurality of preset grid slices, and the number of preset slices of the preset grid slices is related to the map zoom level. For example, if the map zoom level is represented by z, the number of preset slices of the preset grid slices can be represented as 4. z indivual.
[0039] S120. Determine, according to the grid slice data, grid row and column data corresponding to at least two requested grid slices respectively.
[0040] In a specific embodiment, the grid slice data includes grid row and column data corresponding to at least two requested grid slices respectively.
[0041] In another specific embodiment, the grid slice data includes grid coding data corresponding to at least two requested grid slices respectively. Accordingly, based on the grid slice data, grid row and column data corresponding to at least two requested grid slices are determined, including: for each requested grid slice, the grid coding data corresponding to the requested grid slice is decoded to obtain the grid row and column data of the requested grid slice.
[0042] For example, assuming that the grid coding data adopts Z space coding, if the grid coding data is 8, the row number in the grid row and column data is 2, and the column number is 0. If the grid coding data is 14, the row number in the grid row and column data is 3, and the column number is 2.
[0043] S130. For each requested grid slice, determine the slice longitude and latitude range according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map.
[0044] In a specific embodiment, the slice longitude and latitude range includes a slice longitude range and a slice latitude range.
[0045] In another specific embodiment, the slice longitude and latitude range includes a first longitude and latitude coordinate corresponding to a first grid point of the requested grid slice and a second longitude and latitude coordinate corresponding to a second grid point, and the first grid point and the second grid point are diagonally located vertex grid points in the requested grid slice.
[0046] Specifically, the longitude and latitude range of the slice includes the first longitude and latitude coordinates corresponding to the upper left vertex grid point and the second longitude and latitude coordinates corresponding to the lower right vertex grid point, or the longitude and latitude range of the slice includes the first longitude and latitude coordinates corresponding to the lower left vertex grid point and the second longitude and latitude coordinates corresponding to the upper right vertex grid point.
[0047] Taking the example that the slice longitude and latitude range includes the first longitude and latitude coordinates corresponding to the upper left vertex grid point and the second longitude and latitude coordinates corresponding to the lower right vertex grid point, the longitude lng1 in the first longitude and latitude coordinates satisfies the following formula:
[0048]
[0049] The latitude lat1 in the first longitude and latitude coordinates satisfies the following formula:
[0050]
[0051]
[0052] Among them, row represents the row number in the grid row and column data, col represents the column number in the grid row and column data, and z represents the map zoom level.
[0053] Exemplarily, the longitude lng2 in the second latitude and longitude coordinates satisfies the following formula:
[0054]
[0055] The latitude lat2 in the second longitude and latitude coordinates satisfies the following formula:
[0056]
[0057]
[0058] For example, the longitude and latitude range of a slice may be expressed as [lng1, lat1, lng2, lat2].
[0059] In a specific embodiment, a thermal slice map corresponding to a requested grid slice is determined based on the slice longitude and latitude range and the thermal data of the entire map, including: obtaining the slice thermal data corresponding to the slice longitude and latitude range in the thermal data of the entire map; determining the canvas pixel size corresponding to the requested grid slice based on the slice longitude and latitude range, and creating a slice canvas based on the canvas pixel size; determining the thermal slice map corresponding to the requested grid slice based on the slice thermal data and the slice canvas.
[0060] Specifically, the full map thermal data represents the thermal data in the visualized map area. For example, the thermal data may be population data, traffic data, public facilities data, etc. The thermal data is not limited here and can be customized according to actual needs.
[0061] Specifically, the canvas pixel size corresponding to the requested grid tile is determined according to the longitude and latitude range of the tile, including: converting the first longitude and latitude coordinates in the longitude and latitude range of the tile into first pixel coordinates, and converting the second longitude and latitude coordinates in the longitude and latitude range of the tile into second pixel coordinates; according to the first pixel coordinates and the second pixel coordinates, the canvas pixel size corresponding to the requested grid tile is determined.
[0062] In a specific embodiment, determining a thermal slice map corresponding to a requested grid slice according to slice thermal data and a slice canvas includes: rendering the slice canvas according to the slice thermal data to obtain a thermal slice map corresponding to the requested grid slice.
[0063] In another specific embodiment, before obtaining the slice thermal data corresponding to the slice longitude and latitude range in the full map thermal data, the method includes: updating the slice longitude and latitude range according to preset widening data; wherein the updated slice longitude and latitude range is larger than the slice longitude and latitude range before the update.
[0064] Specifically, the preset widening data represents widening information corresponding to the longitude and latitude range of the slice, and is used to widen the longitude and latitude range of the slice.
[0065] In a specific embodiment, the preset widening data includes at least one of a first widened longitude corresponding to the first longitude and latitude coordinates, a first widened latitude, a second widened longitude corresponding to the second longitude and latitude coordinates, and a second widened latitude.
[0066] In another specific embodiment, the preset widening data includes at least one of a first longitude widening ratio corresponding to the first longitude and latitude coordinates, a first latitude widening ratio, a second longitude widening ratio corresponding to the second longitude and latitude coordinates, and a second latitude widening ratio.
[0067] In this embodiment, a thermal slice map corresponding to the requested grid slice is determined based on the slice thermal data and the slice canvas, including: rendering the slice canvas to obtain an expanded thermal map based on the slice thermal data; determining the slice pixel range based on the slice longitude and latitude range before the update, and obtaining the thermal slice map corresponding to the requested grid slice from the expanded thermal map based on the slice pixel range.
[0068] Specifically, when the longitude and latitude range of the slice includes the first longitude and latitude coordinates corresponding to the upper left vertex grid point and the second longitude and latitude coordinates corresponding to the lower right vertex grid point, the pixel range of the slice includes the first pixel coordinate corresponding to the upper left vertex grid point and the second pixel coordinate corresponding to the lower right vertex grid point; when the longitude and latitude range of the slice includes the first longitude and latitude coordinates corresponding to the lower left vertex grid point and the second longitude and latitude coordinates corresponding to the upper right vertex grid point, the pixel range of the slice includes the first pixel coordinate corresponding to the lower left vertex grid point and the second pixel coordinate corresponding to the upper right vertex grid point.
[0069] Since the heat map has a certain radiation range, the heat gradually decreases or increases from the inside to the outside, that is, the slice thermal data belonging to the current grid slice will show a radiation effect in the adjacent grid slices. The advantage of setting the preset widening data is that it improves the boundary transition effect between two adjacent thermal slice maps, thereby ensuring the splicing display effect of subsequent thermal slice maps.
[0070] S140. Send the thermal slice maps corresponding to the at least two requested grid slices to the client, so that the client can splice and display the at least two thermal slice maps.
[0071] Specifically, the client splices and displays at least two thermal slice maps according to the grid row and column data corresponding to the at least two requested grid slices, or splices and displays at least two thermal slice maps according to the receiving order corresponding to the at least two thermal slice maps, or splices and displays at least two thermal slice maps according to the splicing order list. The splicing order list can be sent by the server to the client.
[0072] There is no limitation on the implementation method of splicing and displaying the thermal slice map on the client side, and the specific settings can be customized according to actual needs.
[0073] The technical solution of this embodiment completes the slice rendering of the heat map on the server side. Specifically, according to the grid slice data in the heat map display request, the grid row and column data corresponding to at least two requested grid slices are determined. For each requested grid slice, the longitude and latitude range of the slice is determined according to the map zoom level in the heat map display request and the grid row and column data corresponding to the requested grid slice. According to the longitude and latitude range of the slice and the thermal data of the entire map, the thermal slice map corresponding to the requested grid slice is determined. At least two thermal slice maps are sent to the client so that the client can splice and display the at least two thermal slice maps, thereby solving the problem of time-consuming display of the heat map and improving the speed of loading the heat map on the front end.
[0074] Figure 2 This is a flow chart of another method for displaying a heat map provided by an embodiment of the present invention. This embodiment further refines the above-mentioned embodiment of "sending the heat map corresponding to at least two requested grid slices to the client so that the client can display the at least two heat map slices in a spliced manner". Figure 2 As shown, the method includes:
[0075] S210 . In response to detecting a heat map display request sent by a client, obtaining grid slice data and a map zoom level corresponding to the heat map display request.
[0076] S210 in this embodiment is similar to that in the above embodiment. Figure 1 The S110 shown corresponds to the same or similar steps, and will not be described in detail in this embodiment.
[0077] S220. Determine, according to the grid slice data, grid row and column data corresponding to at least two requested grid slices respectively.
[0078] In another specific embodiment, the grid slice data includes a preset slice size, and accordingly, based on the grid slice data, grid row and column data corresponding to at least two requested grid slices are determined, including: determining the number of requested slices based on the client's view resolution and the preset slice size; when the number of requested slices is greater than or equal to the preset number of slices, using each preset grid slice as a requested grid slice, and obtaining the grid row and column data corresponding to each requested grid slice.
[0079] Specifically, the number of requested slices is the ratio of the view resolution to the preset slice size. For example, assuming that the view resolution is 100*100 and the preset slice size is 10*10, the number of requested slices is 100.
[0080] Taking the above example, assuming that the map zoom level is 3, the preset number of shards is 64. If the number of shards requested by the client is greater than the preset number of shards, all preset grid shards will be used as requested grid shards to calculate the thermal shard map.
[0081] On the basis of the above embodiment, specifically, the grid shard data also includes grid row and column data of the starting grid shard, and based on the grid shard data, grid row and column data corresponding to at least two requested grid shards are determined, and also includes: when the number of requested shards is less than the preset number of shards, grid row and column data corresponding to at least one requested grid shard are determined based on the grid row and column data of the starting grid shard and the number of requested shards.
[0082] The starting grid slice represents the first preset grid slice within the viewing area.
[0083] On the basis of the above embodiment, specifically, the grid slice data also includes the view area range of the current view area in the client, and the grid row and column data corresponding to at least two requested grid slices are determined according to the grid slice data, and it also includes: when the number of requested slices is less than the preset number of slices, the upper left full longitude and latitude coordinates and the lower right full longitude and latitude coordinates in the map area range of the visualization map area are obtained, and the upper left view longitude and latitude coordinates and the lower right view longitude and latitude coordinates in the view area range are obtained; according to the upper left full longitude and latitude coordinates, the upper left view longitude and latitude coordinates and the preset slice size, the slice row and column data of the starting grid slice are determined; according to the lower right full longitude and latitude coordinates, the lower right view longitude and latitude coordinates and the preset slice size, the slice row and column data of the ending grid slice are determined.
[0084] Specifically, the starting grid slice and the ending grid slice respectively represent the first preset grid slice and the last preset grid slice located within the viewing area, the upper left full longitude and latitude coordinates represent the longitude and latitude coordinates of the upper left vertex of the visual map area, the lower right full longitude and latitude coordinates represent the longitude and latitude coordinates of the lower right vertex of the visual map area, the upper left view longitude and longitude coordinates represent the longitude and latitude coordinates of the upper left vertex of the current viewing area, and the lower right view longitude and longitude coordinates represent the longitude and latitude coordinates of the lower right vertex of the current viewing area.
[0085] S230. For each requested grid slice, determine the slice longitude and latitude range according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map.
[0086] S230 in this embodiment is similar to that in the above embodiment. Figure 1 The S130 shown corresponds to the same or similar steps, and will not be described in detail in this embodiment.
[0087] S240, storing the map zoom level and the thermal slice map of each requested grid slice in correspondence, and obtaining the slice storage link corresponding to each thermal slice map.
[0088] Specifically, the shard storage link represents the storage address of the thermal shard map on the server side.
[0089] On the basis of the above embodiment, specifically, before determining the grid row and column data corresponding to at least two requested grid slices respectively according to the grid slice data, the method also includes: determining at least two requested grid slices according to the grid slice data; in the case of storing a thermal slice map of at least two requested grid slices under the map zoom level, sending the slice storage links corresponding to the at least two requested grid slices respectively to the client.
[0090] On the basis of the above embodiment, specifically, the method further includes: in the case where a thermal slice map of at least two requested grid slices at a map zoom level is not stored, executing a step of determining grid row and column data corresponding to at least two requested grid slices respectively according to the grid slice data.
[0091] S250: Send at least two shard storage links to the client, so that the client obtains at least two thermal shard maps through the at least two shard storage links, and splices and displays the at least two thermal shard maps.
[0092] On the basis of the above embodiments, specifically, the method also includes: in response to an update instruction for thermal data of the entire map, obtaining updated thermal data corresponding to the update instruction and updated longitude and latitude coordinates corresponding to the updated thermal data; determining updated grid slices corresponding to the updated thermal data according to the updated longitude and latitude coordinates; and updating the thermal slice map when a thermal slice map corresponding to the updated grid slice is stored.
[0093] Specifically, for each stored map zoom level, the updated longitude and latitude coordinates are converted into updated row and column data according to the map zoom level, and the preset grid slices corresponding to the updated row and column data are used as the updated grid slices at the map zoom level.
[0094] In a specific embodiment, updating the thermal sharding map includes: deleting the thermal sharding map and the sharding storage link corresponding to the thermal sharding map.
[0095] In another specific embodiment, updating the thermal slice map includes: updating the slice thermal data corresponding to the updated grid slice according to the updated thermal data, and rendering the slice canvas according to the updated slice thermal data to obtain an updated thermal slice map; and replacing the stored thermal slice map according to the updated thermal slice map.
[0096] The technical solution of this embodiment stores the map zoom level in correspondence with the thermal slice map of each requested grid slice, obtains the slice storage link corresponding to each thermal slice map, and sends at least two slice storage links to the client, so that the client can obtain at least two thermal slice maps through at least two slice storage links, and splices and displays at least two thermal slice maps, thereby improving the consistency and access speed of the thermal slice map and further improving the rate of loading the thermal map on the front end.
[0097] Figure 3 A flowchart of a specific example of a method for displaying a heat map provided by an embodiment of the present invention. Specifically, when the current view area in the view interface of the client changes, such as the view area range changes and / or the map zoom level changes, a heat map display request is sent to the server.
[0098] The server converts the grid row and column data of the requested grid slice into the slice longitude and latitude range img_boundary, and widens the slice longitude and latitude range img_boundary according to the preset widening data to obtain the slice longitude and latitude range calc_boundary. According to the slice longitude and latitude range calc_boundary, determine the canvas pixel size, and create a slice canvas according to the canvas pixel size. Filter the slice thermal data belonging to the slice longitude and latitude range calc_boundary from the thermal data of the entire map, render the slice canvas according to the slice thermal data, obtain a widened thermal map, and crop the pixels within the slice longitude and latitude range img_boundary from the widened thermal map to obtain a thermal slice map. Send the thermal slice maps corresponding to at least two requested grid slices obtained by the above process to the client, so that the client can splice and display at least two thermal slice maps.
[0099] The following is an embodiment of a device for displaying a thermal map provided in an embodiment of the present invention. The device and the method for displaying a thermal map in the above-mentioned embodiment belong to the same inventive concept. For details not fully described in the embodiment of the device for displaying a thermal map, reference can be made to the contents of the method for displaying a thermal map in the above-mentioned embodiment.
[0100] Figure 4 The following is a schematic diagram of a heat map display device provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a map zoom level acquisition module 310, a grid row and column data determination module 320, a thermal slice map determination module 330 and a thermal slice map sending module 340.
[0101] The map zoom level acquisition module 310 is used to acquire the grid slice data and the map zoom level corresponding to the heat map display request in response to detecting the heat map display request sent by the client;
[0102] A grid row and column data determination module 320, configured to determine grid row and column data corresponding to at least two requested grid slices, respectively, based on the grid slice data;
[0103] The thermal slice map determination module 330 is used to determine the slice longitude and latitude range for each requested grid slice according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map;
[0104] The heat slice map sending module 340 is used to send the heat slice maps corresponding to at least two requested grid slices to the client, so that the client can splice and display the at least two heat slice maps.
[0105] The technical solution of this embodiment completes the slice rendering of the heat map on the server side. Specifically, according to the grid slice data in the heat map display request, the grid row and column data corresponding to at least two requested grid slices are determined. For each requested grid slice, the longitude and latitude range of the slice is determined according to the map zoom level in the heat map display request and the grid row and column data corresponding to the requested grid slice. According to the longitude and latitude range of the slice and the thermal data of the entire map, the thermal slice map corresponding to the requested grid slice is determined. At least two thermal slice maps are sent to the client so that the client can splice and display the at least two thermal slice maps, thereby solving the problem of time-consuming display of the heat map and improving the speed of loading the heat map on the front end.
[0106] In a specific embodiment, the heat slice map determination module 330 includes:
[0107] A shard thermal data acquisition unit, used to acquire shard thermal data corresponding to the shard longitude and latitude range in the full map thermal data;
[0108] A tile canvas creation unit, used to determine the canvas pixel size corresponding to the requested grid tile according to the tile longitude and latitude range, and create a tile canvas according to the canvas pixel size;
[0109] The thermal shard map determining unit is used to determine the thermal shard map corresponding to the requested grid shard according to the shard thermal data and the shard canvas.
[0110] In a specific embodiment, the device further comprises:
[0111] A slice longitude and latitude range update module is used to update the slice longitude and latitude range according to preset widening data before obtaining the slice thermal data corresponding to the slice longitude and latitude range in the full map thermal data;
[0112] Accordingly, the thermal sharding map determination unit is specifically used for:
[0113] According to the shard thermal data, the shard canvas is rendered to obtain an expanded thermal map;
[0114] Determine the slice pixel range according to the slice longitude and latitude range before the update, and obtain the thermal slice map corresponding to the requested grid slice from the widened thermal map according to the slice pixel range;
[0115] Among them, the updated slice longitude and latitude range is greater than the slice longitude and latitude range before the update.
[0116] In a specific embodiment, the heat slice map sending module 340 is specifically used to:
[0117] Store the map zoom level and the thermal slice map of each requested grid slice in correspondence, and obtain the slice storage link corresponding to each thermal slice map;
[0118] At least two shard storage links are sent to the client, so that the client obtains at least two thermal shard maps through the at least two shard storage links, and splices and displays the at least two thermal shard maps.
[0119] In a specific embodiment, the device further comprises:
[0120] A thermal slice map update module, for responding to an update instruction of thermal data of the entire map, obtaining updated thermal data corresponding to the update instruction and updated longitude and latitude coordinates corresponding to the updated thermal data;
[0121] According to the updated longitude and latitude coordinates, the updated grid slices corresponding to the updated thermal data are determined;
[0122] When a thermal slice map corresponding to the updated grid slice is stored, the thermal slice map is updated.
[0123] In a specific embodiment, the slice longitude and latitude range includes a first longitude and latitude coordinate corresponding to a first grid point of the requested grid slice and a second longitude and latitude coordinate corresponding to a second grid point, and the first grid point and the second grid point are vertex grid points located at opposite corners in the requested grid slice.
[0124] The heat map display device provided in the embodiment of the present invention can execute the heat map display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0125] Figure 5 A schematic diagram of the structure of an electronic device provided for one embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, 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.
[0126] like Figure 5 As shown, the electronic device 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 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the ROM 12 or the computer program loaded from the storage unit 18 to the RAM 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0127] A number of components in the electronic device 10 are connected to the I / O interface 15, including: 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 electronic device 10 to exchange information or data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0128] 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 dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the display method of the thermal map provided in the above embodiment.
[0129] In some embodiments, the display method of the heat map provided in the above embodiments 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 electronic device 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 in the display method of the heat map described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the display method of the heat map by any other appropriate means (e.g., by means of firmware).
[0130] Various embodiments of the systems and techniques described above herein may be implemented in the following systems or combinations thereof: digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may 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 may 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.
[0131] The computer program for implementing the method for displaying the heat map of the present invention can be written in any combination of one or more programming languages. These computer programs can 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 can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0132] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction 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 storage medium. Examples of machine readable storage media may include electrical connections based on at least one line, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM), flash memories, optical fibers, portable compact disc read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0133] To provide interaction with a user, the systems and techniques described herein may be implemented on a terminal device having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the terminal device. Other types of devices may also 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).
[0134] 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.
[0135] 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 relationship between the client and the server 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 a 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 virtual private servers (VPS) services.
[0136] 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.
[0137] 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 method for displaying a heat map, characterized in that: include: In response to detecting a heat map display request sent by a client, obtaining grid slice data and a map zoom level corresponding to the heat map display request; Determine, according to the grid slice data, grid row and column data corresponding to at least two requested grid slices respectively; For each requested grid slice, determine the slice longitude and latitude range according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map; The thermal slice maps corresponding to the at least two requested grid slices are respectively sent to the client, so that the client can splice and display the at least two thermal slice maps.
2. The method according to claim 1, characterized in that Determining the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map includes: Obtain the slice thermal data corresponding to the slice longitude and latitude range in the full map thermal data; Determine the canvas pixel size corresponding to the requested grid slice according to the slice longitude and latitude range, and create a slice canvas according to the canvas pixel size; A thermal slice map corresponding to the requested grid slice is determined according to the slice thermal data and the slice canvas.
3. The method according to claim 2, characterized in that Before obtaining the slice thermal data corresponding to the slice longitude and latitude range in the full map thermal data, the method includes: According to the preset widening data, the latitude and longitude range of the slice is updated; Accordingly, determining the thermal slice map corresponding to the requested grid slice according to the slice thermal data and the slice canvas includes: Rendering the slice canvas according to the slice thermal data to obtain an expanded thermal map; Determine a slice pixel range according to the slice longitude and latitude range before the update, and obtain a thermal slice map corresponding to the requested grid slice from the widened thermal map according to the slice pixel range; Among them, the updated slice longitude and latitude range is greater than the slice longitude and latitude range before the update.
4. The method according to claim 1, characterized in that: The sending of the heat slice maps corresponding to the at least two requested grid slices to the client so that the client can splice and display the at least two heat slice maps includes: Store the map zoom level in correspondence with the thermal slice map of each requested grid slice, and obtain the slice storage link corresponding to each thermal slice map; At least two shard storage links are sent to the client, so that the client obtains at least two thermal shard maps through the at least two shard storage links, and splices and displays the at least two thermal shard maps.
5. The method according to claim 4, characterized in that The method further comprises: In response to an update instruction for the thermal data of the entire map, obtaining updated thermal data corresponding to the update instruction and updated longitude and latitude coordinates corresponding to the updated thermal data; Determining, according to the updated longitude and latitude coordinates, an updated grid slice corresponding to the updated thermal data; In case a thermal slice map corresponding to the updated grid slice is stored, the thermal slice map is updated.
6. The method according to any one of claims 1 to 5, characterized in that: The slice longitude and latitude range includes a first longitude and latitude coordinate corresponding to a first grid point of the requested grid slice and a second longitude and latitude coordinate corresponding to a second grid point, and the first grid point and the second grid point are vertex grid points located at opposite corners in the requested grid slice.
7. A display device for a thermal map, characterized in that: include: A map zoom level acquisition module, configured to, in response to detecting a heat map display request sent by a client, acquire grid slice data and a map zoom level corresponding to the heat map display request; A grid row and column data determination module, used to determine grid row and column data corresponding to at least two requested grid slices respectively according to the grid slice data; A thermal slice map determination module is used to determine the slice longitude and latitude range for each requested grid slice according to the map zoom level and the grid row and column data corresponding to the requested grid slice, and determine the thermal slice map corresponding to the requested grid slice according to the slice longitude and latitude range and the thermal data of the entire map; The thermal slice map sending module is used to send the thermal slice maps corresponding to at least two requested grid slices to the client, so that the client can splice and display the at least two thermal slice maps.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and 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 can execute the method for displaying a thermal map according to any one of claims 1 to 6.
9. 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 method for displaying a thermal map according to any one of claims 1 to 6 when executed.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for displaying a thermal map according to any one of claims 1 to 6.