Mass data visualization implementation method, system and device and medium

By dynamically adjusting the rendering rectangle of the canvas and rendering only the changed area, the problem of rendering lag in massive data visualization is solved, and a more efficient rendering process is achieved.

CN119025774APending Publication Date: 2024-11-26CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411131982.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing technologies suffer from rendering stuttering issues in massive data visualization, especially when loading large amounts of data. Existing solutions cannot effectively solve the rendering delays caused by frequent user operations on the map.

Method used

By detecting user actions, the size of the rendering rectangle area of ​​the canvas is dynamically adjusted, and only the changed area is rendered. This adopts the principle of on-demand rendering, reducing unnecessary rendering operations.

Benefits of technology

It improves rendering efficiency, reduces rendering stuttering, and enhances the user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025774A_ABST
    Figure CN119025774A_ABST
Patent Text Reader

Abstract

The invention discloses a mass data visualization implementation method, system and device and a storage medium. The method comprises the steps that target operation of a user on a map obtained after rendering is conducted according to element data, multi-layer cloth and map layers of the map is detected; each layer of canvas corresponds to one rendering rectangular area; when the target operation is the first operation, adjusting the rendering rectangular area to be a first rectangular area after operation; the first operation is used for representing an operation of changing the rendering rectangular region; when the target operation is a second operation, adjusting the rendering rectangular area to be a second rectangular area after operation, so that all the element data are covered in the second rectangular area; the second operation is used for representing operations of moving, adding and deleting element data in the canvas; and rendering the adjusted first rectangular region or second rectangular region in the first map and the element data in the region to obtain a target map. The method can be widely applied to the technical field of page design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of web page design, and in particular to a method, system, device and storage medium for realizing visualization of massive data. Background Art

[0002] With the development of computer technology, network technology, and database technology, and the continuous deepening of their application, web Gis has gradually developed into the mainstream of Gis applications. The mainstream implementation of the webGis visualization system is based on map services, and the front end uses the leaflet visualization framework to achieve data layer rendering and interaction. With the increasing business demand for massive data visualization, the data here can be data points (such as camera points), lines (trajectory lines, optical cables), and surfaces (regional ranges). Regardless of the type of data, after using the leaflet front-end framework to load more than 10,000 data, there will be obvious jamming problems caused by the large amount of data causing the rendering time to be too long.

[0003] There are two existing technical solutions to solve this type of problem: the first is to reduce the amount of data by aggregating points according to administrative regions. This solution cannot load a large amount of data at one time and ignores the specific data details; the second is to map the rectangular boundary of the current screen size to the current view block, only load the data of the current view block, and adjust the current view block in real time by detecting the user's operation on the map, and redraw and render the point data. This solution has the problem of rendering jams even when the user frequently updates the data. Therefore, there are still technical problems that need to be solved in the relevant technology. Summary of the invention

[0004] The purpose of this application is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0005] To this end, an object of an embodiment of the present application is to provide a method, system, device and storage medium for realizing visualization of massive data, which can improve the defect of rendering jams.

[0006] In order to achieve the above technical objectives, the technical solution adopted by the embodiment of the present application includes: a method for realizing visualization of massive data, including: detecting a user's target operation on a first map; the first map is a map obtained by rendering according to element data of the map, multiple layers of canvas and map layers; wherein each layer of the canvas corresponds to a rendering rectangular area;

[0007] When the target operation is a first operation, adjusting the rendering rectangular area to a first rectangular area after the operation; the first operation is used to represent the operation of changing the rendering rectangular area;

[0008] When the target operation is a second operation, the rendering rectangular area is adjusted to a second rectangular area after the operation, so that all the element data are covered in the second rectangular area; the second operation is used to represent at least one operation of moving, adding or deleting element data in the canvas;

[0009] The adjusted first rectangular area or the second rectangular area in the first map and the element data in the area are rendered to obtain a target map.

[0010] In addition, the method for realizing visualization of massive data according to the above embodiment of the present invention may also have the following additional technical features:

[0011] Further, in the embodiment of the present application, when the target operation is the second operation, adjusting the rendering rectangular area to the second rectangular area after the operation so that all the element data are covered in the second rectangular area includes:

[0012] When the target operation is an operation of moving the element data in the canvas, the rendering rectangular area is expanded to the second rectangular area,

[0013] Alternatively, when the target operation is an operation of adding the element data in the canvas, the rendering rectangular area is expanded to the second rectangular area;

[0014] Alternatively, when the target operation is an operation of deleting the element data in the canvas, the rendering rectangular area is reduced to the second rectangular area.

[0015] Further, in an embodiment of the present application, when the target operation is an operation of moving the element data in the canvas, expanding the rendering rectangular area to the second rectangular area includes:

[0016] If the element data moves outside the rendering rectangular area, extracting the first element coordinates of the element data after the element data moves;

[0017] When the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, extending the length of the rendering rectangular area to obtain a second rectangular area;

[0018] Alternatively, when the ordinate of the first element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain a second rectangular area;

[0019] Alternatively, when the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the vertical coordinate of the first element data is greater than the width of the rendering rectangular area in the same coordinate system, the length and width of the rendering rectangular area are extended to obtain a second rectangular area.

[0020] Further, in an embodiment of the present application, when the target operation is an operation of adding the element data in the canvas, expanding the rendering rectangular area to the second rectangular area includes:

[0021] If the added element data is outside the rendering rectangular area, extracting the second element coordinates of the added element data;

[0022] When the horizontal coordinate of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, the length of the rendering rectangular area is extended to obtain a second rectangular area; the second rectangular area covers the added element data;

[0023] Alternatively, when the ordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain a second rectangular area;

[0024] Alternatively, when the horizontal coordinate of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the vertical coordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the length and width of the rendering rectangular area are extended to obtain a second rectangular area.

[0025] Further, in an embodiment of the present application, when the target operation is an operation of deleting the element data in the canvas, reducing the rendering rectangular area to the second rectangular area includes:

[0026] When the target operation is an operation of deleting the element data in the canvas, obtaining the coordinates of the element data existing in the canvas after deletion;

[0027] If the horizontal coordinates of all the element data existing in the canvas are smaller than the horizontal coordinates of the deleted element data, and / or the vertical coordinates of all the element data existing in the canvas are smaller than the vertical coordinates of the deleted element data, the rendering rectangular area is reduced to the second rectangular area; the second rectangular area covers the element data existing in the canvas after the element is deleted.

[0028] Furthermore, in an embodiment of the present application, when the target operation is the first operation, the rendering rectangular area is adjusted to the first rectangular area after the operation, including: obtaining the first length and the first width of the area after dragging; if the first length is smaller than the length of the rendering rectangular area, and / or the first width is smaller than the width of the rendering rectangular area, reducing the rendering rectangular area to the first rectangular area after the operation; if the first length is greater than the length of the rendering rectangular area, and / or the first width is greater than the width of the rendering rectangular area, expanding the rendering rectangular area to the first rectangular area after the operation.

[0029] Furthermore, in an embodiment of the present application, the first map is obtained by the following steps: obtaining element data of the map; the element data includes map point data, map line data and map surface data; configuring a multi-layer canvas according to the element data; merging and rendering the element data, the multi-layer canvas and the map layer to obtain a rendered first map.

[0030] On the other hand, the embodiment of the present application also provides a system for realizing visualization of massive data, including:

[0031] A first processing unit is used to detect a target operation of a user on a first map; the first map is a map obtained by rendering according to element data of the map, multiple layers of canvas and map layers; wherein each layer of the canvas corresponds to a rendering rectangular area;

[0032] A second processing unit is configured to adjust the rendering rectangular area to a first rectangular area after the operation when the target operation is a first operation; the first operation is used to represent an operation of changing the rendering rectangular area;

[0033] A third processing unit is configured to adjust the rendering rectangular area to a second rectangular area after the operation when the target operation is a second operation, so that all the element data are covered in the second rectangular area; the second operation is used to represent at least one operation of moving, adding or deleting element data in the canvas;

[0034] The fourth processing unit is used to render the adjusted first rectangular area or the second rectangular area in the first map, and the element data in the area to obtain a target map.

[0035] On the other hand, the present application also provides a device for realizing visualization of massive data, including:

[0036] at least one processor;

[0037] at least one memory for storing at least one program;

[0038] When the at least one program is executed by the at least one processor, the at least one processor implements a method for realizing visualization of massive data as described in any one of the contents of the invention.

[0039] In addition, the present application also provides a computer-readable storage medium, which stores processor-executable instructions. When the processor-executable instructions are executed by the processor, they are used to execute a method for implementing massive data visualization as described in any of the above items.

[0040] The advantages and benefits of the present application will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:

[0041] Each canvas of this application corresponds to a rendering rectangular area. After each move, drag and add of map element data, this application can adjust the size of the rendering rectangular area and render the corresponding canvas area again. This application mainly adopts the principle of on-demand rendering. Each time, the canvas with the changed area size is rendered instead of the entire canvas, which can improve rendering jams and improve rendering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of the steps of a method for realizing visualization of massive data in a specific embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of the steps of expanding the rendering rectangular area into a second rectangular area when the target operation is an operation of moving element data in a canvas in a specific embodiment of the present invention;

[0044] Figure 3 It is a schematic diagram of the steps of expanding the rendering rectangular area into a second rectangular area when the target operation is an operation of adding element data in a canvas in a specific embodiment of the present invention;

[0045] Figure 4 A schematic diagram of the steps of reducing the rendering rectangular area to a second rectangular area when the target operation is an operation of deleting element data in a canvas in a specific embodiment of the present invention;

[0046] Figure 5 It is a schematic diagram of the steps of adjusting the rendering rectangular area to the first rectangular area after the operation when the target operation is the first operation in a specific embodiment of the present invention;

[0047] Figure 6 A schematic diagram of the steps of obtaining a first map in a specific embodiment of the present invention;

[0048] Figure 7 It is a schematic diagram of the steps of a method for rendering a massive data map based on Leaflet in another specific embodiment of the present invention;

[0049] Figure 8 It is a structural schematic diagram of a mass data rendering system based on Leaflet in another specific embodiment of the present invention;

[0050] Fig. 9 A schematic diagram of the changes of the rectangular frame after moving, adding and deleting elements and dragging operations in a specific embodiment of the present invention;

[0051] Fig.10 A schematic diagram of the structure of a system for realizing visualization of massive data in a specific embodiment of the present invention;

[0052] Fig.11 It is a structural schematic diagram of a device for realizing visualization of massive data in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0053] The embodiments of the present invention are described in detail below with reference to the accompanying drawings to illustrate the principles and processes of the method, system, device and storage medium for realizing visualization of massive data in the embodiments of the present invention.

[0054] The following are necessary explanations of the nouns appearing in this application:

[0055] leaflet: An open source JavaScript library for interactive maps, only 39KB in size.

[0056] DirtyRect area: Rendering rectangular area. Each layer of canvas corresponds to a rendering rectangular area.

[0057] In the prior art, with the development of computer technology, network technology, and database technology, and the continuous deepening of their applications, the webGis visualization system has gradually developed into the mainstream of Gis applications. The mainstream implementation method of the webGis visualization system is based on map services, and the front end uses the leaflet visualization framework to achieve data layer rendering and interaction. With the increasing business demand for massive data visualization, the data here can be data points (such as camera points), lines (trajectory lines, optical cables), and surfaces (regional ranges). Regardless of the type of data, after using the leaflet front-end framework to load more than 10,000 data items, there will be obvious jamming problems caused by the large amount of data causing the rendering time to be too long.

[0058] There are two existing technical solutions to solve this type of problem: The first is to reduce the amount of data by aggregating points according to administrative regions. This solution cannot load a large amount of data at one time and ignores the specific data details. The second is to map the rectangular boundary of the current screen size to the current view block, load only the data of the current view block, and adjust the current view block in real time by listening to the user's dragging, zooming, and panning events on the map, and redraw and render the point data. This solution still has the problem of rendering jams when the user frequently updates the data, such as positioning, dragging, editing, boxing, and overall layout of data outside the current view block. Therefore, there are still problems in related technologies that need to be solved urgently.

[0059] In view of the above-mentioned defects of the prior art, Figure 1 , Figure 1 Schematic diagram of the steps of a method for realizing visualization of massive data provided by an embodiment of the present application. Figure 1 In the method for realizing visualization of massive data, the method may include step S101, step S102 and step S104, or include step S101, step S103 and step S104.

[0060] S101, detecting a user's target operation on a first map. The first map is a map obtained by rendering according to map element data, multiple layers of canvas and map layers, wherein each layer of canvas corresponds to a rendering rectangular area.

[0061] It is understandable that the first map may be a map obtained by rendering according to the element data of the map, the multi-layer canvas and the map layer. The first map may include element data, multi-layer canvas and blank map layer. The element data of the map may be the point data of the map, such as a certain positioning point on the map. The element data of the map may also be line data, such as the lines on the map representing the road. The element data of the map may also be surface data, such as the surface data on the map representing the grassland or the residential area. Each layer of the canvas corresponds to a rendering rectangular area.

[0062] In some feasible embodiments of the present application, the first processing unit may detect the target operation of the user on the first map through the event listener of Leaflet. After detecting the target operation, the first processor may send the target operation to the next processing unit, and the next processing unit may classify the target operation differently and perform different processing according to the classification.

[0063] S102: When the target operation is a first operation, the rendering rectangular area is adjusted to a first rectangular area after the operation. The first operation is used to represent an operation of changing the rendering rectangular area.

[0064] It can be understood that the first operation may be an operation of directly changing the rendering rectangular area, such as directly dragging a vertex of the rendering rectangular area to expand or shrink it, or directly dragging a boundary of the rendering rectangular area to expand or shrink it.

[0065] In some feasible embodiments of the present application, after receiving the target operation, the second processing unit may identify the target operation. When it is confirmed that the target operation is an operation of directly changing the size of the rendering rectangular area, the second processing unit may adjust the rendering rectangular area to the first rectangular area after the operation.

[0066] S103: When the target operation is the second operation, the rendering rectangular area is adjusted to the second rectangular area after the operation, so that all element data are covered in the second rectangular area. The second operation is used to represent the operation of moving element data in the canvas, adding element data in the canvas, or deleting element data in the canvas.

[0067] It can be understood that the second operation may be an operation of moving element data in the canvas, or adding element data in the canvas, or deleting element data in the canvas.

[0068] When the target operation is the second operation, the second processing unit or the third processing unit may adjust the rendering rectangular area to the second rectangular area after the operation, so that all element data are covered in the second rectangular area. The second operation is used to represent an operation of moving element data in the canvas, adding element data in the canvas, or deleting element data in the canvas.

[0069] S104: Render the adjusted first rectangular area or second rectangular area in the first map and the element data in the area to obtain a target map.

[0070] In some feasible embodiments of the present application, the third processing unit or the fourth processing unit can adjust the first rectangular area or the second rectangular area in the first map, and the element data in the area. Specifically, after obtaining the first rectangular area or the second rectangular area, the updatePath method needs to be used in the rendering process to update. By rewriting the updatepath method of the canvas renderer in leaflet, the adjusted first rectangular area or the second rectangular area, and the element data in the area can be rendered to obtain the target map.

[0071] It can be understood that the first processing unit, the second processing unit, the third processing unit, and the fourth processing unit may be integrated into one processor, or each may be configured in one processor.

[0072] In summary, each canvas in the first map of this embodiment corresponds to a rendering rectangular area. After each move, drag, and addition of map element data, this application can adjust the size of the rendering rectangular area and render the corresponding canvas area again. This application mainly adopts the principle of on-demand rendering. Each time, the canvas with a changed area size is rendered instead of the entire canvas, which can improve rendering jams and improve rendering efficiency.

[0073] Further, when the target operation is the second operation, the step of adjusting the rendering rectangular area to the second rectangular area after the operation so that all element data are covered in the second rectangular area may include any one of step 201 , step 202 or step 203 .

[0074] S201: When the target operation is to move element data in the canvas, the rendering rectangular area is expanded to a second rectangular area.

[0075] or,

[0076] S202: When the target operation is an operation of adding element data in the canvas, the rendering rectangular area is expanded into a second rectangular area.

[0077] or,

[0078] S203: When the target operation is an operation of deleting element data in the canvas, reducing the rendering rectangular area to a second rectangular area.

[0079] In some feasible embodiments of the present application, refer to Fig. 9 When the target operation is to move element data in the canvas, the processor may expand the rendering rectangular area to the second rectangular area, or, when the target operation is to add element data in the canvas, the processor may expand the rendering rectangular area to the second rectangular area. Or, when the target operation is to delete element data in the canvas, the processor may reduce the rendering rectangular area to the second rectangular area.

[0080] Further, refer to Figure 2 When the target operation is an operation of moving element data in the canvas, the step of expanding the rendering rectangular area to a second rectangular area may include steps S301 and S302, or steps S301 and S303, or steps S301 and S304.

[0081] S301 : If the element data moves outside the rendering rectangular area, extract the first element coordinates after the element data moves.

[0082] S302: When the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, the length of the rendering rectangular area is extended to obtain a second rectangular area, which covers the moved element data or the added element data.

[0083] S303: When the ordinate of the first element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain a second rectangular area.

[0084] S304. When the abscissa of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the ordinate of the first element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, extend the length and width of the rendering rectangular area to obtain a second rectangular area.

[0085] It can be understood that the rendered rectangular area is a rectangle. The rectangular area in the same coordinate system can be composed of four vertices. The origin of the coordinate system of the canvas is the vertex at the lower left corner of the rectangular area. The difference in the Y-axis coordinates between two vertices with the same horizontal coordinate is the width of the rectangular area, and the difference in the X-axis coordinates between two vertices with the same vertical coordinate is the length of the rectangular area. The width of the rectangular area is equal to the vertical coordinate of the vertex at the upper left corner of the rectangular area, and the length of the rectangular area is equal to the horizontal coordinate of the vertex at the lower right corner of the rectangular area.

[0086] In some feasible embodiments of the present application, after the processor detects the user's movement operation on the element data, if the element data moves outside the rendering rectangular area, the processor can extract the first element coordinates after the element data moves. When the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, the length of the rendering rectangular area is extended to obtain a second rectangular area covering the element data after the move or covering the added element data. When the vertical coordinate of the first element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain a second rectangular area covering the element data after the move or covering the added element data. When the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the vertical coordinate of the first element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the length and width of the rendering rectangular area are extended to obtain a second rectangular area. The second rectangular area covers the element data after the move or covers the added element data.

[0087] Further, refer to Figure 3When the target operation is an operation of adding element data in the canvas, the step of expanding the rendering rectangular area to a second rectangular area may include steps S401 and S402, or steps S401 and S403, or steps S401 and S404.

[0088] S401 : If the added element data is outside the rendering rectangular area, extract the second element coordinates of the added element data.

[0089] S402: When the horizontal coordinate of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, the length of the rendering rectangular area is extended to obtain a second rectangular area that covers the moved element data or the added element data.

[0090] S403: When the ordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain a second rectangular area.

[0091] S404. When the abscissa of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the ordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, extend the length and width of the rendering rectangular area to obtain a second rectangular area.

[0092] It can be understood that the rendered rectangular area is a rectangle. The rectangular area in the same coordinate system can be composed of four vertices. The origin of the coordinate system of the canvas is the vertex at the lower left corner of the rectangular area. The difference in the Y-axis coordinates between two vertices with the same horizontal coordinate is the width of the rectangular area, and the difference in the X-axis coordinates between two vertices with the same vertical coordinate is the length of the rectangular area. The width of the rectangular area is equal to the vertical coordinate of the vertex at the upper left corner of the rectangular area, and the length of the rectangular area is equal to the horizontal coordinate of the vertex at the lower right corner of the rectangular area.

[0093] In some feasible embodiments of the present application, after the processor detects the user's operation of adding element data, if the element data moves outside the rendering rectangular area, the processor can extract the second element coordinates after the element data is added. When the horizontal coordinate of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, the length of the rendering rectangular area is extended to obtain the second rectangular area. The second rectangular area covers the moved element data or covers the added element data. When the vertical coordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain the second rectangular area. When the horizontal coordinate of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the vertical coordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system. The length and width of the rendering rectangular area are extended to obtain the second rectangular area.

[0094] Further, refer to Figure 4 When the target operation is an operation of deleting element data in the canvas, the step of reducing the rendering rectangular area to a second rectangular area may include steps S501 and S502.

[0095] S501: When the target operation is to delete element data in the canvas, the coordinates of the element data existing in the canvas after deletion are obtained.

[0096] S502. If the horizontal coordinates of all element data existing in the canvas are smaller than the horizontal coordinates of the deleted element data, and / or the vertical coordinates of all element data existing in the canvas are smaller than the vertical coordinates of the deleted element data, the rendering rectangular area is reduced to a second rectangular area; the second rectangular area covers the element data existing in the canvas after the element is deleted.

[0097] In some feasible embodiments of the present application, when the target operation is to delete element data in the canvas, the processor can obtain the coordinates of all element data existing in the canvas after deletion. After obtaining the coordinates of the element data existing in the canvas after deletion, if the horizontal coordinate of any element data among all the element data existing in the canvas is smaller than the horizontal coordinate of the deleted element data, or the vertical coordinate of all the element data existing in the canvas is smaller than the vertical coordinate of the deleted element data, the rendering rectangular area is reduced to a second rectangular area; if the horizontal coordinate of any element data among all the element data existing in the canvas is smaller than the horizontal coordinate of the deleted element data, and the vertical coordinate of any element data among all the element data existing in the canvas is smaller than the vertical coordinate of the deleted element data, the rendering rectangular area is reduced to a second rectangular area covering the element data existing in the canvas after the element is deleted.

[0098] Further, refer to Figure 5 When the target operation is the first operation, the step of adjusting the rendering rectangular area to the first rectangular area after the operation may include step S601 and step S602 or step S601 and step S603.

[0099] S601: Acquire a first length and a first width of the dragged area.

[0100] S602: If the first length is smaller than the length of the rendering rectangular area, and / or the first width is smaller than the width of the rendering rectangular area, reduce the rendering rectangular area to a first rectangular area after the operation.

[0101] S603: If the first length is greater than the length of the rendering rectangular area, and / or the first width is greater than the width of the rendering rectangular area, the rendering rectangular area is expanded to a first rectangular area after the operation.

[0102] It is understandable that the dragged area is also a rectangular area, and the area of ​​the dragged area can be larger than the original rendered rectangular area. The area of ​​the dragged area can also be smaller than the original rendered rectangular area. The first length can be the length corresponding to the long side of the rectangular area, and the first width can be the length corresponding to the short side of the rectangular area.

[0103] In some feasible embodiments of the present application, the processor may obtain the first length and the first width of the area after dragging. If the first length is less than the length of the rendering rectangular area, the processor may reduce the rendering rectangular area, and the area of ​​the rendering rectangular area after reduction is the same as the area of ​​the first rectangular area after dragging. If the first width is less than the width of the rendering rectangular area, the rendering rectangular area is reduced to the first rectangular area after the operation. If the first length is greater than the length of the rendering rectangular area, the rendering rectangular area is expanded to the first rectangular area after the operation. If the first width is greater than the width of the rendering rectangular area, the rendering rectangular area is expanded to the first rectangular area after the operation, and the area of ​​the rendering rectangular area is the same as the area of ​​the first rectangular area after dragging.

[0104] Further, refer to Figure 6 , the first map is obtained through steps S701 to S703:

[0105] S701, obtaining map element data; the element data includes map point data, map line data and map surface data.

[0106] S702: Configure a multi-layer canvas according to the element data.

[0107] S703: merging and rendering the element data, the multi-layer canvas and the map layer to obtain a rendered first map.

[0108] In some feasible embodiments of the present application, the processor can obtain the element data of the map. The element data may include map point data, map line data, and map surface data. For point and surface data, the processor can encapsulate them as canvasmarker type based on leaflet's circleMarker encapsulation, rewrite the updatePath method of circleMarker, so that it can modify the image, obtain the position and size of its own drawing area, etc.; for line data, it is encapsulated as arrowPolyline type based on leaflet's polyline encapsulation, and the updatePath method of polyline is rewritten to enable it to modify the line type, set the connecting arrow icon, and obtain the position and size of its own drawing area, etc.; the data layer is divided into multiple layers according to the update frequency, and a new canvas object is created for each layer, and it is used as a renderer to render different layer data, and each layer of data corresponds to a layer of canvas. Finally, the processor can merge and render the element data, multiple layers of canvas, and map layers to obtain the rendered first map.

[0109] The specific calculation principle of this application is explained below with reference to the accompanying drawings:

[0110] Reference Figure 7 as well as Figure 8 In some embodiments, this embodiment proposes a leaflet-based massive data visualization management method, such as Figure 7 As shown, the following steps are included:

[0111] (11) Preload point, line, and surface data and prepare for rendering.

[0112] (12) Encapsulate point, line, and surface data into canvas rendering objects in Leaflet: For point and surface data, encapsulate the canvasmarker type based on Leaflet's circleMarker, and rewrite the updatePath method of circleMarker to enable it to modify images, obtain the position and size of its own drawing area, etc. For line data, encapsulate the arrowPolyline type based on Leaflet's polyline, and rewrite the updatePath method of polyline to enable it to modify the line type, set the connection arrow icon, and obtain the position and size of its own drawing area, etc.

[0113] (13) The data layer is divided into multiple layers according to the update frequency, a new canvas object is created for each layer, and it is used as a renderer to render different layer data, and finally multiple canvas objects are superimposed and displayed.

[0114] (14) A dirtyRect variable is added to each canvas renderer, and the event listener of Leaflet is used. After each moving, dragging or adding of an element, the present embodiment can adjust the size of the dirtyRect area.

[0115] (15) Rewrite the updatepath method of the canvas renderer in Leaflet to redraw the canvas area corresponding to the dirtyRect area. Then render the redrawn dirtyRect area and the elements within the dirtyRect area to obtain the target map.

[0116] In other embodiments, this embodiment provides a massive point map rendering system based on Leaflet. Figure 8 As shown, the architecture may include data initialization, data loading, data rendering, and data interaction modules.

[0117] (21) Data initialization module: load and switch map services, and pre-set required point, line, and surface related data, including but not limited to latitude and longitude data, image resources, etc.

[0118] (22) Data loading module: encapsulate the point and surface data using the canvasmarker provided in the above embodiment and add them to the map, encapsulate the line data using the arrowPolyline provided in the above embodiment and add them to the map, and specify the priority of drawing the data. The system will distinguish the update frequency based on the priority. Each priority can correspond to an update frequency, and the priority can be set by the designer.

[0119] (23) Data rendering module: merges the multi-layer canvas including point, line or surface data with the blank map layer to complete the map rendering. The blank map layer of this embodiment is a map layer loaded with the slice map service using Leaflet.

[0120] (24) Interaction module: monitors the system's click, drag or translation events, and uses leaflet.pm plug-in and turf to implement simple map space query and other functions.

[0121] The above is only a preferred embodiment of the present application and is not intended to limit the scope of the present application. The present application may have various modifications and variations. Furthermore, the massive point map rendering system based on Leaflet in the above embodiment can be embedded into the Vue framework and combined with specific business to develop WebGis application systems in different fields.

[0122] In summary, the method for realizing massive data visualization in this application has the following advantages:

[0123] (1) This application encapsulates point, line, and surface data into canvas rendering objects in leaflet. Specifically, for point and surface data, they are encapsulated as canvasmarker types based on leaflet's circleMarker encapsulation, and the updatePath method of circleMarker is rewritten to enable it to modify images, obtain the position and size of its own drawing area, and other capabilities. For line data, they are encapsulated as arrowPolyline types based on leaflet's polyline encapsulation, and the updatePath method of polyline is rewritten to enable it to modify the line type, set the connecting arrow icon, obtain the position and size of its own drawing area, and other capabilities. This application allows points, lines, and surfaces to be displayed using canvas primitives instead of dom elements, which can avoid rendering jams.

[0124] (2) The present application divides the data layer into multiple layers according to the update frequency, creates a new canvas object for each layer, and uses it as a renderer to render different layer data, ultimately realizing the superimposed display of multiple canvas objects; this technical point is different from the existing technology, and draws data to multiple canvases instead of one canvas according to the update frequency, thus avoiding rendering jams caused by frequent canvas updates in frequent update scenarios.

[0125] (3) This application adds a rendering rectangle area variable to each canvas renderer, uses the event listener of Leaflet, and adjusts the size of the rendering rectangle area each time an element is moved, dragged, or added; rewrites the updatepath method of the canvas renderer in Leaflet to redraw the canvas area corresponding to the rendering rectangle area. This technology is different from the existing technology and mainly uses the principle of on-demand rendering. Each time, the canvas with a changed area size is rendered instead of the entire canvas, which improves rendering efficiency.

[0126] In addition, refer to Fig.10 ,and Figure 1Corresponding to the method, an implementation system for massive data visualization is also provided in an embodiment of the present application, and the system may include: a first processing unit 1001, a second processing unit 1002, a third processing unit 1003, and a fourth processing unit 1004. The first processing unit 1001 can be used to detect the user's target operation on the first map; the first map is a map obtained by rendering according to the element data of the map, multiple layers of canvas, and map layers; each layer of canvas corresponds to a rendering rectangular area. The second processing unit 1002 can be used to adjust the rendering rectangular area to the first rectangular area after the operation when the target operation is the first operation; the first operation is used to characterize the operation of changing the rendering rectangular area. The third processing unit 1003 can be used to adjust the rendering rectangular area to the second rectangular area after the operation when the target operation is the second operation, so that all element data are covered in the second rectangular area; the second operation is used to represent the operation of moving element data in the canvas, or adding element data in the canvas, or deleting element data in the canvas; the fourth processing unit can be used to render the adjusted first rectangular area or second rectangular area in the first map, and the element data in the area, to obtain the target map.

[0127] It should be noted that the acquisition unit can be any integrated circuit unit or microprocessor unit obtained by integrating a chip having a processing function and its peripheral circuits through existing integration technology. The first processing unit and the second processing unit can also be any integrated circuit module or microprocessor module obtained by integrating a chip having a processing function and its peripheral circuits through existing integration technology. The first processing unit and the second processing unit can also include one or more memories. One or more memories can be used to store the specific algorithm used for compression adjustment processing in this application.

[0128] In some embodiments of the present application, the first processing unit 1001 can be set in the same gateway or device with a processor as the second processing unit 1002. The first processing unit 1001 can transmit the acquired data to the processor through a wired or wireless connection with the processor of the second processing unit 1002. The specific device connection mode and device setting of the first unit 1001 and the second processing unit 1002, the second processing unit 1002 and the third processing unit 1003, and the third processing unit 1003 and the fourth processing unit 1004 are not limited.

[0129] It should be noted that the contents of the above-mentioned implementation method of massive data visualization are all applicable to the implementation system embodiment of this massive data visualization. The functions specifically implemented by the implementation system embodiment of this massive data visualization are the same as those of the above-mentioned implementation method embodiment of massive data visualization, and the beneficial effects achieved are also the same as the beneficial effects achieved by the above-mentioned implementation method embodiment of massive data visualization.

[0130] and Figure 1 Corresponding to the method, the embodiment of the present application also provides a device for realizing visualization of massive data, and its specific structure can be referred to Fig.11 ,include:

[0131] at least one processor 1011;

[0132] At least one memory 1012, used to store at least one program;

[0133] When the at least one program is executed by the at least one processor, the at least one processor implements the method for realizing visualization of massive data.

[0134] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0135] and Figure 1 Corresponding to the method, an embodiment of the present application further provides a computer-readable storage medium, which stores processor-executable instructions, and the processor-executable instructions are used to execute the method for implementing massive data visualization when executed by the processor.

[0136] The contents of the above-mentioned implementation method embodiment of the massive data visualization are all applicable to the present storage medium embodiment. The functions specifically implemented by the present storage medium embodiment are the same as those of the above-mentioned implementation method embodiment of the massive data visualization, and the beneficial effects achieved are also the same as those achieved by the above-mentioned implementation method embodiment of the massive data visualization.

[0137] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are expected, wherein the order of various operations is changed and the sub-operation described as a part of a larger operation is performed independently.

[0138] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.

[0139] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0140] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable programs for implementing the logical functions, and may be embodied in any computer-readable medium for use by a program execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch and execute a program from a program execution system, device or apparatus), or in conjunction with such program execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by a program execution system, device or apparatus, or in conjunction with such program execution systems, devices or apparatuses.

[0141] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0142] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0143] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0144] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

[0145] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A method for realizing visualization of massive data, characterized in that: The following steps are involved: Detecting a user's target operation on a first map; the first map is a map obtained by rendering according to map element data, multiple layers of canvas and map layers; wherein each layer of the canvas corresponds to a rendering rectangular area; When the target operation is a first operation, adjusting the rendering rectangular area to a first rectangular area after the operation; the first operation is used to represent the operation of changing the rendering rectangular area; When the target operation is a second operation, the rendering rectangular area is adjusted to a second rectangular area after the operation, so that all the element data are covered in the second rectangular area; the second operation is used to represent at least one operation of moving, adding or deleting element data in the canvas; The adjusted first rectangular area or the second rectangular area in the first map and the element data in the area are rendered to obtain a target map.

2. The method for realizing visualization of massive data according to claim 1, characterized in that: When the target operation is the second operation, adjusting the rendering rectangular area to a second rectangular area after the operation so that all the element data are covered in the second rectangular area includes: When the target operation is an operation of moving the element data in the canvas, expanding the rendering rectangular area into the second rectangular area; Alternatively, when the target operation is an operation of adding the element data in the canvas, the rendering rectangular area is expanded to the second rectangular area; Alternatively, when the target operation is an operation of deleting the element data in the canvas, the rendering rectangular area is reduced to the second rectangular area.

3. The method for realizing visualization of massive data according to claim 2, characterized in that: When the target operation is an operation of moving the element data in the canvas, expanding the rendering rectangular area to the second rectangular area includes: If the element data moves outside the rendering rectangular area, extracting the first element coordinates of the element data after the element data moves; When the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, extending the length of the rendering rectangular area to obtain a second rectangular area; Alternatively, when the ordinate of the first element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain the second rectangular area; Alternatively, when the horizontal coordinate of the first element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the vertical coordinate of the first element data is greater than the width of the rendering rectangular area in the same coordinate system, the length and width of the rendering rectangular area are extended to obtain the second rectangular area.

4. The method for realizing visualization of massive data according to claim 2, characterized in that: When the target operation is an operation of adding the element data in the canvas, expanding the rendering rectangular area to the second rectangular area includes: If the added element data is outside the rendering rectangular area, extracting the second element coordinates of the added element data; When the abscissa of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system, extending the length of the rendering rectangular area to obtain a second rectangular area; Alternatively, when the ordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the width of the rendering rectangular area is extended to obtain the second rectangular area; Alternatively, when the horizontal coordinate of the second element coordinate is greater than the length of the rendering rectangular area in the same coordinate system and the vertical coordinate of the second element coordinate is greater than the width of the rendering rectangular area in the same coordinate system, the length and width of the rendering rectangular area are extended to obtain the second rectangular area.

5. The method for realizing visualization of massive data according to claim 2, characterized in that: When the target operation is an operation of deleting the element data in the canvas, reducing the rendering rectangular area to the second rectangular area comprises: When the target operation is an operation of deleting the element data in the canvas, obtaining the coordinates of the element data existing in the canvas after deletion; If the horizontal coordinates of all the element data existing in the canvas are smaller than the horizontal coordinates of the deleted element data, and / or the vertical coordinates of all the element data existing in the canvas are smaller than the vertical coordinates of the deleted element data, the rendering rectangular area is reduced to the second rectangular area; the second rectangular area covers the element data existing in the canvas after the element is deleted.

6. The method for realizing visualization of massive data according to claim 1, characterized in that: When the target operation is the first operation, adjusting the rendering rectangular area to a first rectangular area after the operation includes: Get the first length and first width of the dragged area; If the first length is smaller than the length of the rendering rectangular area, and / or the first width is smaller than the width of the rendering rectangular area, reducing the rendering rectangular area to a first rectangular area after the operation; If the first length is greater than the length of the rendering rectangular area, and / or the first width is greater than the width of the rendering rectangular area, the rendering rectangular area is expanded to a first rectangular area after the operation.

7. The method for realizing visualization of massive data according to claim 1, characterized in that: The first map is obtained by the following steps: Acquire element data of a map; the element data includes map point data, map line data and map surface data; According to the element data, configure a multi-layer canvas; The element data, the multi-layer canvas and the map layer are combined and rendered to obtain a rendered first map.

8. A system for realizing visualization of massive data, characterized in that: include: A first processing unit, configured to detect a target operation of a user on a first map; The first map is a map obtained by rendering according to the element data of the map, multiple layers of canvas and map layers; wherein each layer of the canvas corresponds to a rendering rectangular area; A second processing unit is configured to adjust the rendering rectangular area to a first rectangular area after the operation when the target operation is a first operation; the first operation is used to represent an operation of changing the rendering rectangular area; A third processing unit is configured to adjust the rendering rectangular area to a second rectangular area after the operation when the target operation is a second operation, so that all the element data are covered in the second rectangular area; the second operation is used to represent at least one operation of moving, adding or deleting element data in the canvas; The fourth processing unit is used to render the adjusted first rectangular area or the second rectangular area in the first map, and the element data in the area to obtain a target map.

9. A device for realizing visualization of massive data, characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method for realizing visualization of massive data as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions are used to execute a method for realizing visualization of massive data as described in any one of claims 1 to 7 when executed by the processor.