Method for processing heat map data, electronic device and program product
By building a minimal file system and segmented storage method, the problem of waste of storage space and embedded device adaptability in thermal map processing is solved, and efficient data management and multiple resolution support is achieved.
Patent Information
- Application Number
- CN202411848135.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-09
AI Technical Summary
The existing heat map processing methods have problems such as wasting storage space, not suitable for embedded devices, and only supporting single file system storage.
By building a minimum file system and using segmented storage, it stores thermal map data, including header data, segment description information and segment data, supporting a variety of storage methods and thermal map types.
Optimizes data reading, retrieval and management, reduces storage space usage, is suitable for embedded devices, and supports multiple resolutions and heat map types.
Smart Images

Figure CN119961228A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of heat map processing, and in particular to a method, electronic equipment and program product for processing heat map data. Background Art
[0002] Heat map is a data visualization technology that can intuitively display the distribution of two-dimensional data. It uses different colors to show the distribution and size of data, so as to facilitate the observation and analysis of data patterns, trends, etc. The existing heat map processing method has the following problems:
[0003] It requires a large amount of storage space. There is a problem that the storage space is not fully utilized, and a large amount of storage space is sacrificed in order to improve the efficiency of retrieval.
[0004] It needs to rely on other database technologies for data storage, which is not friendly to embedded devices;
[0005] It only supports a single form of file system storage and is not suitable for scenarios with multiple storage methods, such as embedded device scenarios. Different storage methods in embedded systems differ in mounting, initialization, formatting, writing and reading. Summary of the invention
[0006] In view of one or more of the above problems in the prior art, embodiments of the present invention provide a method, electronic device and program product for processing heat map data.
[0007] In order to achieve the above object, on the one hand, a method for processing heat map data is provided, which stores the heat map data by constructing a minimum file system and using segmented storage; wherein the data storage structure used by the segmented storage includes:
[0008] Header data, used to store the overall information of the heat map; the overall information of the heat map includes: version information of the heat map;
[0009] Segment description information, after the header data, includes: description information for a first number of segments; wherein the description information of each segment includes: the earliest start time and the latest end time of the data in the segment and the start offset position and the end offset position of the segment data;
[0010] The segment data, after the segment description information, includes: a second number of data packets contained in each of the first number of segments and index data corresponding to the data packets; wherein the data packets of each segment are written downward from the starting position of the segment data, and the index data of each packet are written upward from the ending position of the segment data; wherein the index data includes: the starting position, the ending position, the size and the offset position of the corresponding data packet in the storage space.
[0011] Preferably, the method further comprises one or more of the following:
[0012] The minimum file system is constructed by a binary tree;
[0013] The heat map data is directly stored in the form of binary data;
[0014] The segment description information also includes: the type of heat map stored in the current segment;
[0015] The data packets in each segment have a custom size, and the index data of each segment includes the start position of the data packet of the current segment; and,
[0016] When storing data, a CRC check is performed on the index data of each data packet.
[0017] Preferably, in the method, the step of retrieving the stored heat map data comprises:
[0018] Determine the description information of the target segment existing at the time corresponding to the target heat map data;
[0019] Determining the index data of the corresponding target segment according to the description information of the target segment;
[0020] The location of the target data packet is determined according to the index data of the target segment.
[0021] Preferably, in the method, the segment description information further includes: the type of heat map stored in the current segment; wherein the step of storing the heat map data into the storage space includes:
[0022] According to the type of the heat map to be stored and the corresponding time period, determine whether heat map data with the same heat map type and the same time period already exists in the storage space;
[0023] If yes, then read the existing heat map data of the same heat map type and the same time period, add the value of the read data to the new data to be stored, obtain updated data, and write the updated data;
[0024] Otherwise, determine the earliest segment with sufficient space in time according to the segment description information, and store the heat map data in this segment; if all segments are full, clear the data of the earliest full segment, and store the heat map data in the cleared segment.
[0025] Preferably, the method, in the step of retrieving the stored heat map data, after determining the index data of the target segment data, further comprises:
[0026] A CRC check is performed on the index data, and only after the check passes the corresponding heat map data is read from the position of the target data packet determined by the index data.
[0027] Preferably, the method further comprises rendering the heat map; the rendering comprises:
[0028] Define the heatmap container element as the rendering target;
[0029] Create a heat map object for the rendering target and pass in configuration parameters of the heat map object; the configuration parameters include: the radius of the heat point;
[0030] Set the size of the heat map background image canvas according to the size of the heat map container and obtain the heat map data;
[0031] A monitoring event for mouse wheel zooming and / or mouse dragging is set for the heat map container; wherein, when a mouse wheel zooming event is triggered, the zoom factor is determined according to the offset of the mouse wheel, and the zoom factor is used to update the heat dot matrix data and the heat point radius in the heat map, and the heat map is redrawn; when a mouse dragging event is triggered, the heat dot matrix data in the heat map is updated according to the viewport change matrix from when the mouse is pressed to when the mouse is released, and the heat map is redrawn;
[0032] The heat data is obtained, and according to the size of the current heat canvas, the heat data is proportionally scaled and the radius of the heat point is adjusted, a deep copy of the adjusted data is made, and the heat map object is redrawn to complete the rendering.
[0033] Preferably, in the method, the rendering further comprises:
[0034] Monitor the mouse movement and leaving events on the heat map; when the mouse moves on the heat map, the corresponding heat value is obtained according to the current position of the mouse, and a prompt box is displayed; when the mouse leaves, the prompt box is hidden; the color of the prompt box is the color of the heat point pointed by the mouse; the position of the prompt box is offset according to the mouse position to avoid blocking the mouse pointer.
[0035] Preferably, in the method, the rendering further comprises drawing and displaying a color legend of the heat map; wherein drawing and displaying a color legend of the heat map comprises the following steps:
[0036] Determine and record the maximum and minimum values of the heat value,
[0037] Create a legend canvas and obtain the context of the legend canvas;
[0038] Create a linear gradient object and specify the gradient start and end points of the linear gradient object;
[0039] Traverse the gradient configuration of the colors in the heat map and add the corresponding colors to the linear gradient object;
[0040] Draw a rectangle in the context of the legend canvas, and fill the rectangle with a color gradient;
[0041] Convert the legend canvas to a picture and display it.
[0042] On the other hand, an electronic device is provided, including a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the steps of any of the methods described above.
[0043] On the other hand, a computer program product is provided, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of any of the methods described above are implemented.
[0044] The above technical solution has the following technical effects:
[0045] By building a minimum file system and using segmented storage to store heat map data, different storage methods can be processed differently. In addition, there is no need to introduce other structured storage content except for some header data, segment information and index data, which reduces the space occupied and does not rely on other database technologies. It can greatly optimize data reading, retrieval and management; it is especially friendly to space-efficient embedded devices.
[0046] In a further embodiment, the accuracy of the data storage location is ensured by using CRC for verification.
[0047] In a further embodiment, by setting the heat map type in the segment description information, the storage and retrieval of multiple different types of heat maps can be supported; and the size of the data packets contained in the segments of different heat map types can be different, thereby supporting the coexistence of multiple resolutions.
[0048] In a further embodiment, by dynamically calculating the thermal radius in the rendering of the heat map, a gradual transition effect of the heat map can be achieved, and the heat point data can be proportionally scaled to adapt to different canvas sizes to ensure the clarity of the display effect.
[0049] In a further embodiment, by supporting zooming and panning on the canvas, and being able to monitor viewport changes, calculate new heat map dot matrix data and redraw, a better interactive design is achieved, allowing users to freely observe and analyze the heat map, and the user experience is better.
[0050] In a further embodiment, by displaying a prompt box on the heat map, the data details including the thermal value and color value of the current position can be displayed; by obtaining the coordinate value, the thermal value and color value of the current position through mouse events, and combining the canvas context interface and the heat map data, the prompt box function of real-time display of the thermal value and color value can be realized, and the prompt box is displayed at the corresponding position, completing the mouse floating prompt box function that is beautiful, highly customized, highly real-time, and accurate in data. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a data storage structure used when performing segmented storage in one embodiment of the present invention;
[0052] Figure 2 A schematic diagram of a process of storing heat map data into a storage space in one embodiment of the present invention;
[0053] Figure 3 The present invention is a flowchart of a specific implementation of a specific embodiment of the present invention, which is a flowchart of retrieving stored heat map data. DETAILED DESCRIPTION
[0054] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0055] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0056] Embodiment 1:
[0057] The method for processing heat map data in an embodiment of the present invention stores heat map data by constructing a minimum file system and using segmented storage. In a specific implementation of the present invention, a minimum file system is constructed by a binary tree, and the minimum file system supports storage methods commonly used in various embedded systems such as NAND, NAS, RAID, SDcard and USB. Different storage methods are processed differently, and the same public interface is defined for switching calls, which can realize resource management in a variety of different storage methods; using the segmented storage method, the data is stored in segments, and each segment contains several data packets, which can greatly optimize the reading and management of data.
[0058] Figure 1 FIG. 1 is a schematic diagram of a data storage structure used in segmented storage in one embodiment of the present invention. Figure 1, the data storage structures used include:
[0059] Head data is head data, which is used to store the overall information of the heat map; the overall information of the heat map includes: version information of the heat map; in other implementations, the overall information of the heat map may also include other relevant information describing the heat map as a whole;
[0060] Segment description information, after the header data, for example, immediately after the header data; the segment description information includes: description information for a first number of segments; wherein the description information of each segment includes: the earliest start time and the latest end time of the data in the segment and the start offset position and the end offset position of the segment data; in a specific implementation, the first number is a first predetermined number; for example, the maximum number of segments included is X; Figure 1 The segment description information in corresponds to the information in the seg_info part, such as seg_info(0) to seg_info(X) is the segment description information of segment 0 to segment X;
[0061] In a preferred embodiment of the present invention, the segment description information also includes: the type of heat map stored in the current segment; using the type information in the segment description information, different heat map types can be set in units of segments, so that retrieval and writing based on different heat map types can be supported; further, different types of heat maps can contain different data packet contents and have different data packet sizes; thus, the method of this embodiment of the present invention supports multiple different types of heat maps, supports different heat map data packet sizes, that is, supports multiple resolutions to exist at the same time, and has better scalability and ease of use compared to the existing heat map processing method that only supports one type of heat map and only supports the storage and reading of fixed heat map resolutions;
[0062] The segment data, after the segment description information, includes: a second number of data packets contained in each of the first number of segments and index data corresponding to the data packets; wherein the data packets of each segment are written downward from the starting position of the segment data, and the index data of each packet are written upward from the ending position of the segment data; wherein the index data includes: the starting position, the ending position, the size and the offset position of the corresponding data packet in the storage space.
[0063] For example, Figure 1 As shown in , seg_data(0) to seg_data(X) are the segment data from segment 0 to segment X respectively; data(0) to data(z) are the data packets of segment(0), and each segment contains z+1 data packets in this example; index(0) to index(z) are the index data corresponding to the data packets data(0) to data(z); the specific data of the data packets is represented by data_detail(0)... Figure 1 In the storage structure, data packets are written downward from the beginning of the corresponding segment, in the order from the first data packet to the last data packet; index data are written upward from the end of the corresponding segment, in the order from the index of the first data packet to the index of the last data packet, from bottom to top.
[0064] In a specific implementation of an embodiment of the present invention, the storage structure supports data packets of different sizes, and the size of the storage space is allocated in segments. Each segment specifies the size of the segment when it is initialized; the size of the data packet in the segment can be customized by ensuring that the sum of its sizes is not greater than the size of the segment, and the starting position of the data packet is identified in the corresponding index, i.e., index. Based on this feature of the data packet, when searching for heat map data, retrieval for the size of the data packet can be supported.
[0065] The method for processing heat map data in an embodiment of the present invention directly stores the data in the form of binary files through a minimum file system and segmented storage. Except for some header data, segment information and index data, no other structured storage content needs to be introduced, thereby reducing the storage space occupied and does not need to rely on other database technologies, which is friendly to embedded devices.
[0066] Embodiment 2:
[0067] In order to adapt to the limited storage resources of embedded devices as much as possible and reduce the storage space occupied by the heat map, this embodiment of the present invention reduces the storage space occupied by the heat map by sacrificing the accuracy of the heat map. For example, for a heat map with a resolution of 960*540, the embodiment of the present invention only uses a resolution of 240*135 when storing, which reduces the accuracy to a certain extent and greatly reduces the storage space.
[0068] Embodiment three:
[0069] In this embodiment of the present invention, the content of the index data (index) of each data packet is checked by CRC. The index contains the starting position, ending position, size and offset information of the data packet in storage. In order to avoid the situation where the index content is wrong due to some reason and the file processing is out of bounds, the index is checked by CRC to ensure the accuracy of the storage position.
[0070] In the implementation of the embodiment of the present invention, data overwriting is supported when storing heat map data; during initialization, the number of segments and the size of each segment are specified. When all the space in all segments is used up, the data of the earliest full segment is cleared and the newly written data is written to the segment.
[0071] Figure 2 FIG. 1 is a flow chart of storing heat map data into a storage space in one embodiment of the present invention. Figure 2 Storing heat map data in storage space includes the following steps:
[0072] Before writing data, search based on the heat map type and time period to determine whether data of the same heat map type and the same time period already exists; if so, directly read the old data and update the data after adding the value to the new data; otherwise, find the earliest segment in time with enough space to write according to the segment information to write the new data. If all segments are full, clear the data of the earliest full segment and write the new data to the cleared segment.
[0073] Preferably, before writing the heat map data into the segment, a corresponding index is generated according to the size of the heat map data and the related offset position, and the CRC of the index is calculated. The CRC will be synchronously written into the storage space, and finally the heat map data is written into the storage space.
[0074] Embodiment 4:
[0075] The method of the embodiment of the present invention further includes searching the stored heat map data. The searching of the stored heat map data includes the following steps:
[0076] Determine the description information of the target segment existing at the time corresponding to the target heat map data;
[0077] Determine the index data of the corresponding target segment according to the description information of the target segment;
[0078] The location of the target data packet is determined according to the index data of the target segment.
[0079] Figure 3 The figure is a flowchart of searching the stored heat map data in a specific implementation of an embodiment of the present invention. In this implementation, the data is searched by matching the heat map type and time period, and the advantage of segmented storage is used to achieve fast search. The data search step first searches by the heat map type and time period in the segment information. Figure 3 The search for a time period is reflected in Figure 3 , retrieve the segment containing the target time. After searching for the segment information containing the target time, traverse the time points according to its index information, find the corresponding index, perform CRC check on the index, and read the stored heat map data from the specified location after the check is correct.
[0080] Embodiment five:
[0081] In the process of implementing the present application, the inventors of the present application found that in addition to the problem of heat map storage, the heat map data processing in the prior art also has the following problems:
[0082] There are limitations in the rendering effect of heat dot matrix: for example, some heat chart tools such as Echarts only support heat grid display, and although they can support the needs of heat value hovering display and different canvas size adaptation, their effect cannot achieve uniform transition of dot matrix color, and the subtle differences between blocks are not smooth enough, and color faults are prone to occur; this makes it impossible for users to accurately determine which areas are hot spots of user concern through heat maps, affecting the accuracy of data analysis, and thus affecting users' observation of heat conditions; in addition, some heat map plug-ins or heat map tools are limited to displaying heat maps on Google maps;
[0083] Lack of responsive design and interactivity: Only basic generation and display are supported. The heat map object does not support mouse interaction. For example, under the scroll wheel zooming and drag panning, the heat map redrawing under the dynamically changing canvas cannot be satisfied, which is also prone to performance problems.
[0084] Insufficient display of data details: Users can only see the overall heat distribution and cannot understand the specific data content. Although some technologies will provide bar chart legends, users still need to judge the process of color mapping to numerical values by themselves, and the specific corresponding numerical values are not clear. In other words, users cannot quickly obtain the specific information of a data point, nor can they quickly locate and view the data points of interest. These lead to poor user experience and low data analysis efficiency.
[0085] In view of one or more of the above problems, a method for processing heat map data according to an embodiment of the present invention further includes the following steps of rendering a heat map such as a Web heat map:
[0086] Step 1: Initialize the heat map object. First, define a heat map container element as the rendering target of the heat map. Then, call the corresponding object creation method to create the heat map object and pass in the configuration parameters. The configuration parameters include:
[0087] container: specifies the container element of the heat map;
[0088] Radius: Set the radius of the hot spot, and its value determines the scattering influence range of each data point;
[0089] maxOpacity: Set the transparency of the heat point so that users can see the heat map background;
[0090] onExtremaChange: defines a callback function that is called when the heat map data point changes to update the legend;
[0091] Step 2, get the heat map background and add event listening; first initialize the heat map background image canvas, and set the size of the canvas according to the width and height of the container; in a specific implementation, due to DOM rendering problems, the container size acquisition may fail, so a timer is set to wait and trigger the acquisition again to avoid performance problems caused by frequent calls; after successfully obtaining the canvas size, the image data is obtained; in a specific implementation, the API for obtaining the image is selected differently in different modes, and the image is updated or an error message is displayed according to the returned result;
[0092] Secondly, add listeners for mouse wheel zooming and mouse dragging to the heat map container; when the mouse wheel zoom event is triggered, convert the offset of the mouse wheel into a zoom factor, use the zoom factor to update the heat dot matrix data and the radius of the heat point and redraw; when the drag movement is triggered, record the viewport change matrix from the time the mouse is pressed (mousedown) to the time the mouse is popped up (mouseup), use the viewport change matrix to update the heat dot matrix data and redraw the heat map;
[0093] Step 3: Calculate and render the heat data in the heat map. First, obtain the heat data through the query function. At this time, the heat data in the database is stored in a fixed size. In order to make the rendering on the interface responsive, the data is scaled proportionally. According to the input heat data, the position and radius of the data point are calculated and adjusted to adapt to the size of the current heat map canvas. By adjusting the thermal radius while scaling the heat data proportionally, a smooth transition between heat points, i.e., thermal dot matrix, is achieved. Finally, a deep copy of the adjusted data is performed, and the rendering is completed by redrawing the heat map object.
[0094] Step 4: Add a prompt box; preferably, the prompt box is a mouse hover prompt box; further, add a color legend; the prompt box and the color legend can display data details and help users quickly locate and view data points of interest; wherein, implementing the mouse hover prompt box includes the following steps:
[0095] Listen for mouse movement and leaving events on the heat map;
[0096] When the mouse moves, the heat value is obtained according to the mouse position and a prompt box is displayed. In one example, the heat value is obtained by calling getValueAt through the heat map object. In specific use, the heat value of the current mouse position is obtained by passing in the position parameter.
[0097] When the mouse leaves the icon, the tooltip is hidden.
[0098] Show tooltip:
[0099] Update the display information of the prompt box according to the mouse position, including color, position and heat value; the color of the prompt box is the color of the heat point pointed by the mouse;
[0100] The steps of extracting the color value of the hot spot pointed by the mouse include: obtaining the 2D context of the heat map canvas; obtaining the image data of 1 pixel at the specified coordinates through the obtained context, and returning the RGB array.
[0101] The position of the tooltip is offset according to the mouse position to avoid blocking the mouse pointer.
[0102] The color legend of the heat map can help users understand the principles and details of the numerical ranges represented by different colors in the heat map. The steps of drawing the color legend include:
[0103] Determine and record the maximum and minimum values of the heat value, i.e. the thermal value;
[0104] Create a legend canvas and get the legend canvas context such as canvas context legendCtx;
[0105] Create a linear gradient object such as gradient, and specify the gradient start and end points of the object;
[0106] Traverse the color gradient configuration in the heat map, such as obtained through the heat map object above, and add the corresponding color to the linear gradient object; for example, use the addColorStop method to add the color to the gradient object;
[0107] Draw a rectangle in the context of the legend canvas and fill the rectangle with a color gradient;
[0108] Convert the legend canvas to an image and display it.
[0109] Embodiment six:
[0110] The present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the steps in any of the above method embodiments. Preferably, the electronic device is an embedded device.
[0111] Embodiment seven:
[0112] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described above are implemented.
[0113] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A method for processing heat map data, characterized in that: The method includes storing heat map data by constructing a minimum file system and using segmented storage; wherein the data storage structure used by the segmented storage includes: Header data, used to store the overall information of the heat map; the overall information of the heat map includes: version information of the heat map; Segment description information, after the header data, includes: description information for a first number of segments; wherein the description information of each segment includes: the earliest start time and the latest end time of the data in the segment and the start offset position and the end offset position of the segment data; The segment data, after the segment description information, includes: a second number of data packets contained in each of the first number of segments and index data corresponding to the data packets; wherein the data packets of each segment are written downward from the starting position of the segment data, and the index data of each packet are written upward from the ending position of the segment data; wherein the index data includes: the starting position, the ending position, the size and the offset position of the corresponding data packet in the storage space.
2. The method according to claim 1, characterized in that Also includes one or more of the following: The minimum file system is constructed by a binary tree; The heat map data is directly stored in the form of binary data; The segment description information also includes: the type of heat map stored in the current segment; The data packets in each segment have a custom size, and the index data of each segment includes the start position of the data packet of the current segment; and, When storing data, a CRC check is performed on the index data of each data packet.
3. The method according to claim 1, characterized in that The steps of retrieving the stored heat map data include: Determine the description information of the target segment existing at the time corresponding to the target heat map data; Determining the index data of the corresponding target segment according to the description information of the target segment; The location of the target data packet is determined according to the index data of the target segment.
4. The method according to claim 1, characterized in that: The segment description information also includes: the type of heat map stored in the current segment; wherein the step of storing the heat map data into the storage space includes: According to the type of the heat map to be stored and the corresponding time period, determine whether heat map data with the same heat map type and the same time period already exists in the storage space; If yes, then read the existing heat map data of the same heat map type and the same time period, add the value of the read data to the new data to be stored, obtain updated data, and write the updated data; Otherwise, determine the earliest segment with sufficient space in time according to the segment description information, and store the heat map data in this segment; if all segments are full, clear the data of the earliest full segment, and store the heat map data in the cleared segment.
5. The method according to claim 3, characterized in that: In the step of retrieving the stored heat map data, after determining the index data of the target segment data, the method further includes: A CRC check is performed on the index data, and only after the check passes the corresponding heat map data is read from the position of the target data packet determined by the index data.
6. The method according to claim 1, characterized in that The heat map is also rendered; the rendering includes: Define the heatmap container element as the rendering target; Create a heat map object for the rendering target and pass in configuration parameters of the heat map object; the configuration parameters include: the radius of the heat point; Set the size of the heat map background image canvas according to the size of the heat map container and obtain the heat map data; A monitoring event for mouse wheel zooming and / or mouse dragging is set for the heat map container; wherein, when a mouse wheel zooming event is triggered, the zoom factor is determined according to the offset of the mouse wheel, and the zoom factor is used to update the heat dot matrix data and the heat point radius in the heat map, and the heat map is redrawn; when a mouse dragging event is triggered, the heat dot matrix data in the heat map is updated according to the viewport change matrix from when the mouse is pressed to when the mouse is released, and the heat map is redrawn; The heat data is obtained, and according to the size of the current heat canvas, the heat data is proportionally scaled and the radius of the heat point is adjusted, a deep copy of the adjusted data is made, and the heat map object is redrawn to complete the rendering.
7. The method according to claim 6, characterized in that The rendering further comprises: Monitor the mouse movement and leaving events on the heat map; when the mouse moves on the heat map, the corresponding heat value is obtained according to the current position of the mouse, and a prompt box is displayed; when the mouse leaves, the prompt box is hidden; the color of the prompt box is the color of the heat point pointed by the mouse; the position of the prompt box is offset according to the mouse position to avoid blocking the mouse pointer.
8. The method according to claim 6, characterized in that The rendering further includes drawing and displaying a color legend of the heat map; wherein drawing and displaying a color legend of the heat map includes the following steps: Determine and record the maximum and minimum values of the heat value, Create a legend canvas and obtain the context of the legend canvas; Create a linear gradient object and specify the gradient start and end points of the linear gradient object; Traverse the gradient configuration of the colors in the heat map and add the corresponding colors to the linear gradient object; Draw a rectangle in the context of the legend canvas, and fill the rectangle with a color gradient; Convert the legend canvas to a picture and display it.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the steps of any one of the methods according to claims 1 to 8.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.