WO2020052053A1 - Cactus tree-based data visualization method and apparatus, and device and storage medium - Google Patents

Cactus tree-based data visualization method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2020052053A1
WO2020052053A1 PCT/CN2018/115534 CN2018115534W WO2020052053A1 WO 2020052053 A1 WO2020052053 A1 WO 2020052053A1 CN 2018115534 W CN2018115534 W CN 2018115534W WO 2020052053 A1 WO2020052053 A1 WO 2020052053A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
nodes
cactus tree
tree
cactus
Prior art date
Application number
PCT/CN2018/115534
Other languages
French (fr)
Chinese (zh)
Inventor
杜智华
周泽桦
Original Assignee
深圳大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳大学 filed Critical 深圳大学
Publication of WO2020052053A1 publication Critical patent/WO2020052053A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor

Definitions

  • the invention belongs to the field of computer technology, and particularly relates to a data visualization method, device, device and storage medium based on a cactus tree.
  • data information will be regarded as nodes in the tree, and the internal connections of the data information will be abstracted as edges connecting nodes in the tree, and finally a tree structure corresponding to the data information will be formed.
  • use visualization technology to display inside the effective physical display area, so as to enhance the user's ability to quickly understand the hierarchical data.
  • the tree map has not only developed from a simple rectangular block to a practical visualization technology with good appearance, but has also become a common technology for hierarchical data coding and supporting specific tasks.
  • the number of nodes in the traditional treemap increases exponentially with the increase of the tree depth.
  • the space utilization rate is greatly reduced and the space allocation is uneven, and it is easy to make the node cluster difficult to identify where it is far away from the root node.
  • the ring in the radial tree solves the crisis of wasted screen space, but the hierarchical structure between different levels is fuzzy; some nodes in the matrix tree diagram are deeper, and when the proportion is too small, these nodes will be degraded in the matrix tree diagram.
  • a rectangle close to the pixel point is not easy to recognize; slender rectangles appear in the icicle diagram, which is not easy to observe, and the depth difference between the subtrees is relatively large, and great jaggedness will be formed under different branches.
  • the object of the present invention is to provide a data visualization method, device, device and storage medium based on cactus tree, which aims to solve the problem that, when data is visualized through a tree map in the prior art, the utilization rate of the space where the tree map is located is not high and Uneven space allocation leads to poor data visualization.
  • the present invention provides a data visualization method based on a cactus tree.
  • the method includes the following steps:
  • the present invention provides a data visualization device based on a cactus tree.
  • the device includes:
  • a data input unit configured to receive input data, and the input data stores related information of a preset leaf node
  • a leaf node processing unit configured to process related information of the leaf nodes to obtain all parent nodes in the cactus tree and a set of child nodes corresponding to each of the parent nodes;
  • a node information determining unit configured to determine node radius and angle information of each node in the cactus tree according to a set of child nodes corresponding to each of the parent nodes;
  • a graphic drawing unit is configured to generate and draw a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree.
  • the present invention also provides a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor is implemented when the processor executes the computer program. Steps as described above for cactus tree-based data visualization methods.
  • the present invention also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program is implemented as described in the above cactus tree-based data visualization method. A step of.
  • the present invention receives input data, and the input data stores related information of preset leaf nodes, and processes the related information to obtain a collection of all parent nodes and child nodes corresponding to the parent node in the cactus tree.
  • Set of child nodes determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node, detect the user's interactive action, and according to the interactive action Adjust the scalable vector graphics, so as to adjust the data visualization effect based on the tree structure, and improve the space utilization and space allocation effect of data visualization.
  • FIG. 1 is a flowchart of implementing a data visualization method based on a cactus tree according to a first embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a cactus tree-based data visualization device according to a second embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a preferred structure of a cactus tree-based data visualization device according to a second embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a computing device according to a third embodiment of the present invention.
  • FIG. 1 shows the implementation process of a data visualization method based on a cactus tree provided in Embodiment 1 of the present invention.
  • FIG. 1 shows the implementation process of a data visualization method based on a cactus tree provided in Embodiment 1 of the present invention.
  • FIG. 1 shows the implementation process of a data visualization method based on a cactus tree provided in Embodiment 1 of the present invention.
  • FIG. 1 shows the implementation process of a data visualization method based on a cactus tree provided in Embodiment 1 of the present invention.
  • step S101 input data is received, and the input data stores related information of a preset leaf node.
  • the embodiment of the present invention is applicable to a data visualization platform or system, and the data to be visualized may be medical data, biological data, and the like, such as data of HIV infection process.
  • Receive input data, and the input data stores information about preset leaf nodes. Among them, the data to be visualized is represented in advance through an existing tree structure, and related information of leaf nodes in the data structure is obtained.
  • the format of the input data can be json format.
  • the leaf node related information includes the leaf node name information, and the leaf node name information is composed of the names of all the nodes on the path from the root node to the leaf node, and the name of each node is preset. Separator.
  • the name information of a leaf node can be expressed as: "root_name.leaf_parent_paren_name.leaf_parent_name.leaf_name", where ".” Is the delimiter, "root_name” represents the name of the root node, and “leaf_parent_paren_name” and “leaf_parent_name” are the root node to The name of the middle node in the path of this leaf node, "leaf_name” is the name of the leaf node.
  • the related information of the leaf nodes may further include a node size and a node array.
  • the node size is the size of the leaf node as a data structure, which can be set to a fixed value.
  • the node array is used to store the names of other leaf nodes that are linked to the leaf node.
  • step S102 the related information of the leaf nodes is processed to obtain all the parent nodes in the cactus tree and the child node set corresponding to each parent node.
  • the name information is divided according to the delimiter in the name information of the leaf node to obtain the names of all nodes on the path from the leaf node to the root node, where the leaf nodes are also leaf nodes of the cactus tree.
  • the root node is also the root node of the cactus tree.
  • the cactus tree does not change the original tree structure corresponding to the input data. Instead, the layout of the original tree structure is optimized to make the shape resemble a cactus to improve the data visualization. Space utilization and space allocation effects.
  • all parent nodes (nodes other than leaf nodes) in the cactus tree and the child node set corresponding to each parent node can be obtained.
  • step S103 the node radius and angle information of each node in the cactus tree is determined according to the child node set corresponding to each parent node.
  • the weight value of each node in the cactus tree may be calculated according to the preset weight value corresponding to the leaf node.
  • the weight of each node determines the node radius and angle information of each node in the cactus tree.
  • the weight value of the parent node is the sum of the weight values of all child nodes in the parent node corresponding to the child node set.
  • the parent node's The weight needs to be added to the weight of the subtree, so that the hierarchical relationship between the nodes is reflected by the weight, which is conducive to improving subsequent visualization effects.
  • a node radius corresponding to a unit weight is set in advance, and then calculated according to the relationship between the weight of the node and the radius of the node, The node radius of each node.
  • the node radius is the radius of the circle used to represent the node, thereby improving subsequent visualization effects.
  • the child nodes in the child node set corresponding to the parent node are sorted in ascending order of weight values.
  • the child nodes with larger weights are located at the center position above the parent node, and the child nodes with smaller weights are evenly distributed on both sides of the center position above the parent node.
  • the offset angle of each child node is the offset angle corresponding to the weight of the child node plus the offset angle of the previous child node, thereby improving the visual space utilization and Space allocation effect.
  • step S104 a scalable vector graphic of the cactus tree is generated and drawn according to the node radius and angle information of each node in the cactus tree.
  • the depth information of each node in the cactus tree can also be obtained.
  • a scalable vector graphic corresponding to the cactus tree can be generated.
  • a preset cluster map projection generator can be used to generate a scalable vector graphic corresponding to a cactus tree.
  • a data-driven document (Data-Driven Documents (D3 for short) draw and render the scalable vector graphics of the cactus tree on the preset display screen or web browsing page, so as to effectively solve the problem of node edge crossing caused by stacking between nodes.
  • D3 Data-Driven Documents
  • step S105 the interactive action of the user is detected, and the scalable vector graphics are adjusted according to the interactive action.
  • the user can interact with the scalable vector image of the cactus tree by clicking or moving with the mouse (or also through screen touch).
  • the mouse or also through screen touch.
  • the link relationship between the nodes and the nodes is displayed on the display interface.
  • the node's circular area displays the name of the node.
  • the node corresponding to the node zoom-in or zoom-out action is zoomed in or zoomed out, thereby facilitating the user to view a single node of interest.
  • the node zoom-in or zoom-out action can be the scroll action of the middle mouse button, or the touch-screen zoom-in or zoom-out action.
  • the source node and the target node of the edge are displayed in different colors, thereby helping the user to visually distinguish the source node and the target node.
  • input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree.
  • Set of child nodes corresponding to each parent node determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction
  • the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
  • FIG. 2 shows the structure of an incoming call reminding device provided in Embodiment 2 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown, including:
  • the data input unit 21 is configured to receive input data, and the input data stores related information of preset leaf nodes.
  • the input data stores related information of the preset leaf nodes.
  • the data to be visualized is represented in advance through an existing tree structure, and related information of leaf nodes in the data structure is obtained.
  • the format of the input data can be json format.
  • the leaf node related information includes the leaf node name information, and the leaf node name information is composed of the names of all the nodes on the path from the root node to the leaf node, and the name of each node is preset. Separator.
  • the related information of the leaf nodes may further include a node size and a node array.
  • the node size is the size of the leaf node as a data structure, which can be set to a fixed value.
  • the node array is used to store the names of other leaf nodes that are linked to the leaf node.
  • the leaf node processing unit 22 is configured to process the related information of the leaf nodes to obtain all the parent nodes in the cactus tree and the set of child nodes corresponding to each parent node.
  • the name information is divided according to the delimiter in the name information of the leaf node to obtain the names of all nodes on the path from the leaf node to the root node, where the leaf nodes are also leaf nodes of the cactus tree.
  • the root node is also the root node of the cactus tree.
  • the cactus tree does not change the original tree structure corresponding to the input data. Instead, the layout of the original tree structure is optimized to make the shape resemble a cactus to improve the data visualization. Space utilization and space allocation effects.
  • all parent nodes (nodes other than leaf nodes) in the cactus tree and the child node set corresponding to each parent node can be obtained.
  • the node information determining unit 23 is configured to determine node radius and angle information of each node in the cactus tree according to a child node set corresponding to each parent node.
  • the weight value of each node in the cactus tree may be calculated according to the preset weight value corresponding to the leaf node.
  • the weight of each node determines the node radius and angle information of each node in the cactus tree.
  • the weight value of the parent node is the sum of the weight values of all child nodes in the parent node corresponding to the child node set.
  • the parent node's The weight needs to be added to the weight of the subtree, so that the hierarchical relationship between the nodes is reflected by the weight, which is conducive to improving subsequent visualization effects.
  • a node radius corresponding to a unit weight is set in advance, and then calculated according to the relationship between the weight of the node and the radius of the node, The node radius of each node.
  • the node radius is the radius of the circle used to represent the node, thereby improving subsequent visualization effects.
  • the child nodes in the child node set corresponding to the parent node are sorted in ascending order of weight values.
  • the child nodes with larger weights are located at the center position above the parent node, and the child nodes with smaller weights are evenly distributed on both sides of the center position above the parent node.
  • the offset angle of each child node is the offset angle corresponding to the weight of the child node plus the offset angle of the previous child node, thereby improving the visual space utilization and Space allocation effect.
  • the graphic drawing unit 24 is configured to generate and draw a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree.
  • the depth information of each node in the cactus tree can also be obtained.
  • a scalable vector graphic corresponding to the cactus tree can be generated.
  • a preset cluster map projection generator can be used to generate a scalable vector graphic corresponding to a cactus tree.
  • the data-driven document when drawing a scalable vector graphic of a cactus tree, can be used to draw and render the scalable vector graphic of the cactus tree on a preset display screen or Web browsing page, thereby effectively Solve the problem of node edge crossing caused by stacking between nodes.
  • the graphic interaction unit 25 is configured to detect an interactive action of a user and adjust a scalable vector graphic according to the interactive action.
  • the user can interact with the scalable vector image of the cactus tree by clicking or moving with the mouse (or also through screen touch).
  • the mouse or also through screen touch.
  • the link relationship between the nodes and the nodes is displayed on the display interface.
  • the node's circular area displays the name of the node.
  • the node corresponding to the node zoom-in or zoom-out action is zoomed in or zoomed out, thereby facilitating the user to view a single node of interest.
  • the node zoom-in or zoom-out action can be the scroll action of the middle mouse button, or the touch-screen zoom-in or zoom-out action.
  • the source node and the target node of the edge are displayed in different colors, thereby helping the user to visually distinguish the source node and the target node.
  • the data input unit 21 includes:
  • the name dividing unit 311 is configured to divide the names of the leaf nodes according to a preset delimiter to obtain the names of all the nodes on the path from the leaf node to the root node of the cactus tree.
  • the node information determining unit 23 includes:
  • a weight determining unit 331, configured to determine a weight of each node in the cactus tree according to a preset weight corresponding to a leaf node and a set of child nodes corresponding to each parent node;
  • the radius determining unit 332 is configured to determine a node radius of each node according to a weight value of each node in the cactus tree.
  • input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree.
  • Set of child nodes corresponding to each parent node determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction
  • the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
  • each unit of the call reminding device may be implemented by a corresponding hardware or software unit, and each unit may be an independent software and hardware unit, or may be integrated into a software and hardware unit, which is not necessary to limit the present invention.
  • FIG. 4 shows the structure of a computing device provided in Embodiment 3 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown.
  • the computing device 4 includes a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40.
  • the processor 40 executes the computer program 42, the steps in the foregoing method embodiment are implemented, for example, steps S101 to S105 shown in FIG. 1.
  • the processor 40 executes the computer program 42, the functions of the units in the above-mentioned device embodiment are realized, for example, the functions of the units 21 to 25 shown in FIG. 2.
  • input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree.
  • Set of child nodes corresponding to each parent node determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction
  • the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiment are implemented, for example, as shown in FIG. 1.
  • the steps S101 to S105 are shown.
  • the functions of the units in the foregoing device embodiments are implemented, for example, the functions of units 21 to 25 shown in FIG. 2.
  • input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree.
  • Set of child nodes corresponding to each parent node determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction
  • the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
  • the computer-readable storage medium of the embodiment of the present invention may include any entity or device capable of carrying computer program code, a recording medium, for example, a memory such as a ROM / RAM, a magnetic disk, an optical disk, a flash memory, or the like.
  • a recording medium for example, a memory such as a ROM / RAM, a magnetic disk, an optical disk, a flash memory, or the like.

Abstract

The present invention is applicable to the technical field of computers, and provides a cactus tree-based data visualization method and apparatus, and a device and a storage medium. The method comprises: receiving input data storing related information of preset leaf nodes; processing the related information, and obtaining all parent nodes and child node sets corresponding to the parent nodes in the cactus tree; determining node radius and angle information of each node in the cactus tree according to the child node set corresponding to each parent node; generating and drawing a scalable vector graph of the cactus tree according to the node radius and angle information of each node; and detecting the interactive action of a user, and adjusting the scalable vector graph according to the interactive action, so that the data visualization effect based on the tree structure is adjusted, and the spatial utilization rate and the spatial distribution effect of the data visualization are improved.

Description

基于仙人掌树的数据可视化方法、装置、设备及存储介质Data visualization method, device, equipment and storage medium based on cactus tree 技术领域Technical field
本发明属于计算机技术领域,尤其涉及一种基于仙人掌树的数据可视化方法、装置、设备及存储介质。The invention belongs to the field of computer technology, and particularly relates to a data visualization method, device, device and storage medium based on a cactus tree.
背景技术Background technique
在层次结构的信息可视化理论技术研究中,数据信息会被看作树中的节点,数据信息内部的联系会被抽象为树中连接节点的边,最终形成与数据信息相对应的树形结构,并运用可视化技术显示在有效物理显示区域内部,以此达到增强用户对层次结构数据的快捷认知能力。经过20多年的深入研究,树图不仅从最初简单的矩形方块发展为具有良好外观的实用性可视化技术,而且成为层次结构数据编码和支持特定任务的平常技术。In the research of hierarchical information visualization theory and technology, data information will be regarded as nodes in the tree, and the internal connections of the data information will be abstracted as edges connecting nodes in the tree, and finally a tree structure corresponding to the data information will be formed. And use visualization technology to display inside the effective physical display area, so as to enhance the user's ability to quickly understand the hierarchical data. After more than 20 years of in-depth research, the tree map has not only developed from a simple rectangular block to a practical visualization technology with good appearance, but has also become a common technology for hierarchical data coding and supporting specific tasks.
然而,当需要表示的数据量很大时,传统树状图中节点的数量随着树形深度的增加呈指数级增长,与根节点接近的位置有比较少的节点而远离根节点的位置会有较多的节点,导致空间利用率大大降低且空间分配也不均匀,远离根节点的地方容易造成节点聚集难以辨识。例如,径向树中的圆环解决了屏幕空间浪费的危机,但不同层次间的层次结构模糊;矩阵树图中有些节点层次较深,当占比太小时这些节点在矩阵树图中会退化成接近像素点矩形,不易辨认;冰柱图中会出现细长的矩形,不便于观察,而且子树之间的深度差异比较大,在不同分支下会有很大的锯齿形成。However, when the amount of data to be represented is large, the number of nodes in the traditional treemap increases exponentially with the increase of the tree depth. There are fewer nodes close to the root node and farther away from the root node. With more nodes, the space utilization rate is greatly reduced and the space allocation is uneven, and it is easy to make the node cluster difficult to identify where it is far away from the root node. For example, the ring in the radial tree solves the crisis of wasted screen space, but the hierarchical structure between different levels is fuzzy; some nodes in the matrix tree diagram are deeper, and when the proportion is too small, these nodes will be degraded in the matrix tree diagram. A rectangle close to the pixel point is not easy to recognize; slender rectangles appear in the icicle diagram, which is not easy to observe, and the depth difference between the subtrees is relatively large, and great jaggedness will be formed under different branches.
技术问题technical problem
本发明的目的在于提供一种基于仙人掌树的数据可视化方法、装置、设备及存储介质,旨在解决由于现有技术中通过树图对数据进行可视化时,树图所在空间的利用率不高且空间分配不均,导致数据可视化效果不佳的问题。The object of the present invention is to provide a data visualization method, device, device and storage medium based on cactus tree, which aims to solve the problem that, when data is visualized through a tree map in the prior art, the utilization rate of the space where the tree map is located is not high and Uneven space allocation leads to poor data visualization.
技术解决方案Technical solutions
一方面,本发明提供了一种基于仙人掌树的数据可视化方法,所述方法包括下述步骤:In one aspect, the present invention provides a data visualization method based on a cactus tree. The method includes the following steps:
接收输入数据,所述输入数据中存放了预设叶子节点的相关信息;Receiving input data, wherein the input data stores information about preset leaf nodes;
对所述叶子节点的相关信息进行处理,获得仙人掌树中所有的父节点和每个所述父节点对应的子节点集合; Processing related information of the leaf nodes to obtain all parent nodes in the cactus tree and a set of child nodes corresponding to each of the parent nodes;
根据每个所述父节点对应的子节点集合,确定所述仙人掌树中每个节点的节点半径和角度信息;Determining the node radius and angle information of each node in the cactus tree according to the child node set corresponding to each of the parent nodes;
根据所述仙人掌树中每个节点的节点半径和角度信息,生成并绘制所述仙人掌树的可缩放矢量图形。Generate and draw a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree.
另一方面,本发明提供了一种基于仙人掌树的数据可视化装置,所述装置包括:In another aspect, the present invention provides a data visualization device based on a cactus tree. The device includes:
数据输入单元,用于接收输入数据,所述输入数据中存放了预设叶子节点的相关信息;A data input unit configured to receive input data, and the input data stores related information of a preset leaf node;
叶子节点处理单元,用于对所述叶子节点的相关信息进行处理,获得仙人掌树中所有的父节点和每个所述父节点对应的子节点集合; A leaf node processing unit, configured to process related information of the leaf nodes to obtain all parent nodes in the cactus tree and a set of child nodes corresponding to each of the parent nodes;
节点信息确定单元,用于根据每个所述父节点对应的子节点集合,确定所述仙人掌树中每个节点的节点半径和角度信息;以及A node information determining unit, configured to determine node radius and angle information of each node in the cactus tree according to a set of child nodes corresponding to each of the parent nodes; and
图形绘制单元,用于根据所述仙人掌树中每个节点的节点半径和角度信息,生成并绘制所述仙人掌树的可缩放矢量图形。A graphic drawing unit is configured to generate and draw a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree.
另一方面,本发明还提供了一种计算设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述基于仙人掌树的数据可视化方法所述的步骤。In another aspect, the present invention also provides a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is implemented when the processor executes the computer program. Steps as described above for cactus tree-based data visualization methods.
另一方面,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述基于仙人掌树的数据可视化方法所述的步骤。In another aspect, the present invention also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program is implemented as described in the above cactus tree-based data visualization method. A step of.
有益效果Beneficial effect
本发明接收输入数据,该输入数据中存放了预设叶子节点的相关信息,对这些相关信息进行处理,获得仙人掌树中所有父节点和父节点对应的子节点集合,根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息,根据每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形,检测用户的交互动作,根据该交互动作对可缩放矢量图形进行调节,从而通对基于树形结构的数据可视化效果进行调整,提高数据可视化的空间利用率和空间分配效果。The present invention receives input data, and the input data stores related information of preset leaf nodes, and processes the related information to obtain a collection of all parent nodes and child nodes corresponding to the parent node in the cactus tree. Set of child nodes, determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node, detect the user's interactive action, and according to the interactive action Adjust the scalable vector graphics, so as to adjust the data visualization effect based on the tree structure, and improve the space utilization and space allocation effect of data visualization.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本发明实施例一提供的基于仙人掌树的数据可视化方法的实现流程图;FIG. 1 is a flowchart of implementing a data visualization method based on a cactus tree according to a first embodiment of the present invention; FIG.
图2是本发明实施例二提供的基于仙人掌树的数据可视化装置的结构示意图;2 is a schematic structural diagram of a cactus tree-based data visualization device according to a second embodiment of the present invention;
图3是本发明实施例二提供的基于仙人掌树的数据可视化装置的优选结构示意图;以及3 is a schematic diagram of a preferred structure of a cactus tree-based data visualization device according to a second embodiment of the present invention; and
图4是本发明实施例三提供的计算设备的结构示意图。FIG. 4 is a schematic structural diagram of a computing device according to a third embodiment of the present invention.
本发明的实施方式Embodiments of the invention
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
以下结合具体实施例对本发明的具体实现进行详细描述:The following describes the specific implementation of the present invention in detail with reference to specific embodiments:
实施例一:Embodiment one:
图1示出了本发明实施例一提供的基于仙人掌树的数据可视化方法的实现流程,为了便于说明,仅示出了与本发明实施例相关的部分,详述如下:FIG. 1 shows the implementation process of a data visualization method based on a cactus tree provided in Embodiment 1 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown, and the details are as follows:
在步骤S101中,接收输入数据,输入数据中存放了预设叶子节点的相关信息。In step S101, input data is received, and the input data stores related information of a preset leaf node.
本发明实施例适用于数据可视化平台或系统,待可视化的数据可为医疗数据、生物数据等,例如HIV病毒感染过程数据。接收输入数据,输入数据中存放了预设叶子节点的相关信息。其中,预先通过现有的树形结构对待可视化的数据进行表示,获取该数据结构中叶子节点的相关信息。输入数据的格式可为json格式。The embodiment of the present invention is applicable to a data visualization platform or system, and the data to be visualized may be medical data, biological data, and the like, such as data of HIV infection process. Receive input data, and the input data stores information about preset leaf nodes. Among them, the data to be visualized is represented in advance through an existing tree structure, and related information of leaf nodes in the data structure is obtained. The format of the input data can be json format.
在本发明实施例中,叶子节点的相关信息中包括叶子节点的名称信息,叶子节点的名称信息由根节点到该叶子节点的路径上所有节点的名字构成,每个节点的名字通过预设的分隔符隔开。例如,叶子节点的名称信息可表示为:“root_name.leaf_parent_paren_name.leaf_parent_name.leaf_name”,其中,“.”为分割符,“root_name”表示根节点名字,“leaf_parent_paren_name”和“leaf_parent_name”分别为根节点到该叶子节点的路径中间节点的名字,“leaf_name”为叶子节点的名字。In the embodiment of the present invention, the leaf node related information includes the leaf node name information, and the leaf node name information is composed of the names of all the nodes on the path from the root node to the leaf node, and the name of each node is preset. Separator. For example, the name information of a leaf node can be expressed as: "root_name.leaf_parent_paren_name.leaf_parent_name.leaf_name", where "." Is the delimiter, "root_name" represents the name of the root node, and "leaf_parent_paren_name" and "leaf_parent_name" are the root node to The name of the middle node in the path of this leaf node, "leaf_name" is the name of the leaf node.
在本发明实施例中,叶子节点的相关信息还可包括节点大小和节点数组。节点大小为叶子节点作为一个数据结构的大小,可设置为一个固定值。节点数组用来存放与该叶子节点有链接关系的其它叶子节点的名字。In the embodiment of the present invention, the related information of the leaf nodes may further include a node size and a node array. The node size is the size of the leaf node as a data structure, which can be set to a fixed value. The node array is used to store the names of other leaf nodes that are linked to the leaf node.
在步骤S102中,对叶子节点的相关信息进行处理,获得仙人掌树中所有的父节点和每个父节点对应的子节点集合。In step S102, the related information of the leaf nodes is processed to obtain all the parent nodes in the cactus tree and the child node set corresponding to each parent node.
在本发明实施例中,根据叶子节点名称信息中的分割符,对该名称信息进行分割,可得到叶子节点到根节点路径上所有节点的名称,其中,叶子节点也为仙人掌树的叶子节点,根节点也为仙人掌树的根节点,仙人掌树并不改变输入数据所对应的原始树形结构,而是通过对原始树形结构的布局进行优化,使其形状类似于仙人掌,以提高数据可视化的空间利用率和空间分配效果。In the embodiment of the present invention, the name information is divided according to the delimiter in the name information of the leaf node to obtain the names of all nodes on the path from the leaf node to the root node, where the leaf nodes are also leaf nodes of the cactus tree. The root node is also the root node of the cactus tree. The cactus tree does not change the original tree structure corresponding to the input data. Instead, the layout of the original tree structure is optimized to make the shape resemble a cactus to improve the data visualization. Space utilization and space allocation effects.
在本发明实施例中,在获得所有叶子节点到根节点路径上所有节点的名称后,可以获得仙人掌树中所有的父节点(除叶子节点以外的节点)和每个父节点对应的子节点集合。In the embodiment of the present invention, after obtaining the names of all the nodes on the path from all leaf nodes to the root node, all parent nodes (nodes other than leaf nodes) in the cactus tree and the child node set corresponding to each parent node can be obtained. .
在步骤S103中,根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息。In step S103, the node radius and angle information of each node in the cactus tree is determined according to the child node set corresponding to each parent node.
在本发明实施例中,在得到仙人掌树中每个父节点对应的子节点集合时,根据叶子节点对应的预设权值,可计算仙人掌树中每个节点的权值,根据仙人掌树中每个节点的权值,确定仙人掌树中每个节点的节点半径和角度信息。In the embodiment of the present invention, when the child node set corresponding to each parent node in the cactus tree is obtained, the weight value of each node in the cactus tree may be calculated according to the preset weight value corresponding to the leaf node. The weight of each node determines the node radius and angle information of each node in the cactus tree.
优选地,在计算仙人掌树中每个节点的权值时,父节点的权值为该父节点对应子节点集合中所有子节点的权值之和,当子节点有子树时,父节点的权值需要加上该子树的权值,从而通过权值体现出节点之间的层次关系,有利于提高后续的可视化效果。Preferably, when calculating the weight value of each node in the cactus tree, the weight value of the parent node is the sum of the weight values of all child nodes in the parent node corresponding to the child node set. When the child node has a child tree, the parent node's The weight needs to be added to the weight of the subtree, so that the hierarchical relationship between the nodes is reflected by the weight, which is conducive to improving subsequent visualization effects.
优选地,在根据仙人掌树中每个节点的权值确定每个节点的节点半径时,预先设置一个单位权值对应的节点半径,再根据节点的权值与节点的半径成正比的关系,计算每个节点的节点半径,节点半径为用于表示节点的圆形的半径,从而提高后续的可视化效果。Preferably, when determining the node radius of each node according to the weight of each node in the cactus tree, a node radius corresponding to a unit weight is set in advance, and then calculated according to the relationship between the weight of the node and the radius of the node, The node radius of each node. The node radius is the radius of the circle used to represent the node, thereby improving subsequent visualization effects.
优选地,在根据仙人掌树中每个节点的权值确定每个节点的角度信息时,按照权值升序对父节点对应的子节点集合中的子节点进行排序。为了使可视化时,权值较大的子节点位于父节点上方的中心位置,权值较小的子节点在父节点上方中心位置的两侧均匀分布,在排序后的子节点集合中依次计算每个子节点相对于父节点上方中心位置的偏移角度,每个子节点的偏移角度为子节点权值对应的偏移角度加上前一个子节点的偏移角度,从而提高可视化的空间利用率和空间分配效果。Preferably, when determining the angle information of each node according to the weight value of each node in the cactus tree, the child nodes in the child node set corresponding to the parent node are sorted in ascending order of weight values. In order to visualize, the child nodes with larger weights are located at the center position above the parent node, and the child nodes with smaller weights are evenly distributed on both sides of the center position above the parent node. The offset angle of each child node relative to the center position above the parent node. The offset angle of each child node is the offset angle corresponding to the weight of the child node plus the offset angle of the previous child node, thereby improving the visual space utilization and Space allocation effect.
在步骤S104中,根据仙人掌树中每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形。In step S104, a scalable vector graphic of the cactus tree is generated and drawn according to the node radius and angle information of each node in the cactus tree.
在本发明实施例中,在确定仙人掌树中每个节点的节点半径和角度信息后,同样也可以得到每个节点在仙人掌树的深度信息。根据每个节点的节点半径、角度信息、深度信息和权值、以及仙人掌树中父节点和子节点的对应关系,可生成仙人掌树对应的可缩放矢量图形(Scalable Vector Graphics,简称SVG)。例如,可采用预设的集群图投影生成器生成仙人掌树对应的可缩放矢量图形。In the embodiment of the present invention, after determining the node radius and angle information of each node in the cactus tree, the depth information of each node in the cactus tree can also be obtained. According to the node radius, angle information, depth information and weight of each node, and the corresponding relationship between the parent and child nodes in the cactus tree, a scalable vector graphic corresponding to the cactus tree can be generated. Vector Graphics (SVG for short). For example, a preset cluster map projection generator can be used to generate a scalable vector graphic corresponding to a cactus tree.
在本发明实施例中,在绘制仙人掌树的可缩放矢量图形时,可通过数据驱动文档(Data-Driven Documents,简称D3)在预设的显示屏幕或Web浏览页面上上对仙人掌树的可缩放矢量图形进行绘制和渲染,从而有效解决节点间堆叠导致节点边缘交叉的问题。In the embodiment of the present invention, when drawing a scalable vector graphic of a cactus tree, a data-driven document (Data-Driven Documents (D3 for short) draw and render the scalable vector graphics of the cactus tree on the preset display screen or web browsing page, so as to effectively solve the problem of node edge crossing caused by stacking between nodes.
在步骤S105中,检测用户的交互动作,根据交互动作对可缩放矢量图形进行调节。In step S105, the interactive action of the user is detected, and the scalable vector graphics are adjusted according to the interactive action.
在本发明实施例中,用户可通过鼠标点击或移动(或者还可通过屏幕触摸)来与仙人掌树的可缩放矢量图像进行交互。优选地,为了避免仙人掌树全部节点名称显示时覆盖住仙人掌树的外形,在显示界面上仅显示节点和节点之间的链接关系,当检测到鼠标移动至节点的圆形区域或者用户触屏点击节点的圆形区域时,显示该节点的名称。In the embodiment of the present invention, the user can interact with the scalable vector image of the cactus tree by clicking or moving with the mouse (or also through screen touch). Preferably, in order to avoid covering the shape of the cactus tree when all the node names of the cactus tree are displayed, only the link relationship between the nodes and the nodes is displayed on the display interface. The node's circular area displays the name of the node.
又优选地,当检测到用户的节点放大或缩小动作时,对节点放大或缩小动作对应的节点进行放大或缩小操作,从而便于用户对单个感兴趣节点进行查看。例如,节点放大或缩小动作可为鼠标中键的滚动动作,也可以为触屏的放大或缩小动作。Also preferably, when a node zoom-in or zoom-out action of the user is detected, the node corresponding to the node zoom-in or zoom-out action is zoomed in or zoomed out, thereby facilitating the user to view a single node of interest. For example, the node zoom-in or zoom-out action can be the scroll action of the middle mouse button, or the touch-screen zoom-in or zoom-out action.
又优选地,当检测到用户选中仙人掌树中的一条边时,通过不同的颜色显示该边的源节点和目标节点,从而帮助用户在视觉上区分源节点和目标节点。Also preferably, when detecting that the user selects an edge in the cactus tree, the source node and the target node of the edge are displayed in different colors, thereby helping the user to visually distinguish the source node and the target node.
在本发明实施例中,接收输入数据,该输入数据中存放了预设叶子节点的相关信息,对这些相关信息进行处理,获得仙人掌树中所有父节点和父节点对应的子节点集合,根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息,根据每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形,检测用户的交互动作,根据该交互动作对可缩放矢量图形进行调节,从而通对基于树形结构的数据可视化效果进行调整,提高数据可视化的空间利用率和空间分配效果。In the embodiment of the present invention, input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree. Set of child nodes corresponding to each parent node, determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction According to the interactive action, the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
实施例二:Embodiment two:
图2示出了本发明实施例二提供的来电提醒装置的结构,为了便于说明,仅示出了与本发明实施例相关的部分,其中包括:FIG. 2 shows the structure of an incoming call reminding device provided in Embodiment 2 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown, including:
数据输入单元21,用于接收输入数据,输入数据中存放了预设叶子节点的相关信息。The data input unit 21 is configured to receive input data, and the input data stores related information of preset leaf nodes.
在本发明实施例中,输入数据中存放了预设叶子节点的相关信息。其中,预先通过现有的树形结构对待可视化的数据进行表示,获取该数据结构中叶子节点的相关信息。输入数据的格式可为json格式。In the embodiment of the present invention, the input data stores related information of the preset leaf nodes. Among them, the data to be visualized is represented in advance through an existing tree structure, and related information of leaf nodes in the data structure is obtained. The format of the input data can be json format.
在本发明实施例中,叶子节点的相关信息中包括叶子节点的名称信息,叶子节点的名称信息由根节点到该叶子节点的路径上所有节点的名字构成,每个节点的名字通过预设的分隔符隔开。In the embodiment of the present invention, the leaf node related information includes the leaf node name information, and the leaf node name information is composed of the names of all the nodes on the path from the root node to the leaf node, and the name of each node is preset. Separator.
在本发明实施例中,叶子节点的相关信息还可包括节点大小和节点数组。节点大小为叶子节点作为一个数据结构的大小,可设置为一个固定值。节点数组用来存放与该叶子节点有链接关系的其它叶子节点的名字。In the embodiment of the present invention, the related information of the leaf nodes may further include a node size and a node array. The node size is the size of the leaf node as a data structure, which can be set to a fixed value. The node array is used to store the names of other leaf nodes that are linked to the leaf node.
叶子节点处理单元22,用于对叶子节点的相关信息进行处理,获得仙人掌树中所有的父节点和每个父节点对应的子节点集合。The leaf node processing unit 22 is configured to process the related information of the leaf nodes to obtain all the parent nodes in the cactus tree and the set of child nodes corresponding to each parent node.
在本发明实施例中,根据叶子节点名称信息中的分割符,对该名称信息进行分割,可得到叶子节点到根节点路径上所有节点的名称,其中,叶子节点也为仙人掌树的叶子节点,根节点也为仙人掌树的根节点,仙人掌树并不改变输入数据所对应的原始树形结构,而是通过对原始树形结构的布局进行优化,使其形状类似于仙人掌,以提高数据可视化的空间利用率和空间分配效果。In the embodiment of the present invention, the name information is divided according to the delimiter in the name information of the leaf node to obtain the names of all nodes on the path from the leaf node to the root node, where the leaf nodes are also leaf nodes of the cactus tree. The root node is also the root node of the cactus tree. The cactus tree does not change the original tree structure corresponding to the input data. Instead, the layout of the original tree structure is optimized to make the shape resemble a cactus to improve the data visualization. Space utilization and space allocation effects.
在本发明实施例中,在获得所有叶子节点到根节点路径上所有节点的名称后,可以获得仙人掌树中所有的父节点(除叶子节点以外的节点)和每个父节点对应的子节点集合。In the embodiment of the present invention, after obtaining the names of all the nodes on the path from all leaf nodes to the root node, all parent nodes (nodes other than leaf nodes) in the cactus tree and the child node set corresponding to each parent node can be obtained. .
节点信息确定单元23,用于根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息。The node information determining unit 23 is configured to determine node radius and angle information of each node in the cactus tree according to a child node set corresponding to each parent node.
在本发明实施例中,在得到仙人掌树中每个父节点对应的子节点集合时,根据叶子节点对应的预设权值,可计算仙人掌树中每个节点的权值,根据仙人掌树中每个节点的权值,确定仙人掌树中每个节点的节点半径和角度信息。In the embodiment of the present invention, when the child node set corresponding to each parent node in the cactus tree is obtained, the weight value of each node in the cactus tree may be calculated according to the preset weight value corresponding to the leaf node. The weight of each node determines the node radius and angle information of each node in the cactus tree.
优选地,在计算仙人掌树中每个节点的权值时,父节点的权值为该父节点对应子节点集合中所有子节点的权值之和,当子节点有子树时,父节点的权值需要加上该子树的权值,从而通过权值体现出节点之间的层次关系,有利于提高后续的可视化效果。Preferably, when calculating the weight value of each node in the cactus tree, the weight value of the parent node is the sum of the weight values of all child nodes in the parent node corresponding to the child node set. When the child node has a child tree, the parent node's The weight needs to be added to the weight of the subtree, so that the hierarchical relationship between the nodes is reflected by the weight, which is conducive to improving subsequent visualization effects.
优选地,在根据仙人掌树中每个节点的权值确定每个节点的节点半径时,预先设置一个单位权值对应的节点半径,再根据节点的权值与节点的半径成正比的关系,计算每个节点的节点半径,节点半径为用于表示节点的圆形的半径,从而提高后续的可视化效果。Preferably, when determining the node radius of each node according to the weight of each node in the cactus tree, a node radius corresponding to a unit weight is set in advance, and then calculated according to the relationship between the weight of the node and the radius of the node, The node radius of each node. The node radius is the radius of the circle used to represent the node, thereby improving subsequent visualization effects.
优选地,在根据仙人掌树中每个节点的权值确定每个节点的角度信息时,按照权值升序对父节点对应的子节点集合中的子节点进行排序。为了使可视化时,权值较大的子节点位于父节点上方的中心位置,权值较小的子节点在父节点上方中心位置的两侧均匀分布,在排序后的子节点集合中依次计算每个子节点相对于父节点上方中心位置的偏移角度,每个子节点的偏移角度为子节点权值对应的偏移角度加上前一个子节点的偏移角度,从而提高可视化的空间利用率和空间分配效果。Preferably, when determining the angle information of each node according to the weight value of each node in the cactus tree, the child nodes in the child node set corresponding to the parent node are sorted in ascending order of weight values. In order to visualize, the child nodes with larger weights are located at the center position above the parent node, and the child nodes with smaller weights are evenly distributed on both sides of the center position above the parent node. The offset angle of each child node relative to the center position above the parent node. The offset angle of each child node is the offset angle corresponding to the weight of the child node plus the offset angle of the previous child node, thereby improving the visual space utilization and Space allocation effect.
图形绘制单元24,用于根据仙人掌树中每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形。The graphic drawing unit 24 is configured to generate and draw a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree.
在本发明实施例中,在确定仙人掌树中每个节点的节点半径和角度信息后,同样也可以得到每个节点在仙人掌树的深度信息。根据每个节点的节点半径、角度信息、深度信息和权值、以及仙人掌树中父节点和子节点的对应关系,可生成仙人掌树对应的可缩放矢量图形。例如,可采用预设的集群图投影生成器生成仙人掌树对应的可缩放矢量图形。In the embodiment of the present invention, after determining the node radius and angle information of each node in the cactus tree, the depth information of each node in the cactus tree can also be obtained. According to the node radius, angle information, depth information and weight of each node, and the corresponding relationship between the parent and child nodes in the cactus tree, a scalable vector graphic corresponding to the cactus tree can be generated. For example, a preset cluster map projection generator can be used to generate a scalable vector graphic corresponding to a cactus tree.
在本发明实施例中,在绘制仙人掌树的可缩放矢量图形时,可通过数据驱动文档在预设的显示屏幕或Web浏览页面上上对仙人掌树的可缩放矢量图形进行绘制和渲染,从而有效解决节点间堆叠导致节点边缘交叉的问题。In the embodiment of the present invention, when drawing a scalable vector graphic of a cactus tree, the data-driven document can be used to draw and render the scalable vector graphic of the cactus tree on a preset display screen or Web browsing page, thereby effectively Solve the problem of node edge crossing caused by stacking between nodes.
图形交互单元25,用于检测用户的交互动作,根据交互动作对可缩放矢量图形进行调节。The graphic interaction unit 25 is configured to detect an interactive action of a user and adjust a scalable vector graphic according to the interactive action.
在本发明实施例中,用户可通过鼠标点击或移动(或者还可通过屏幕触摸)来与仙人掌树的可缩放矢量图像进行交互。优选地,为了避免仙人掌树全部节点名称显示时覆盖住仙人掌树的外形,在显示界面上仅显示节点和节点之间的链接关系,当检测到鼠标移动至节点的圆形区域或者用户触屏点击节点的圆形区域时,显示该节点的名称。In the embodiment of the present invention, the user can interact with the scalable vector image of the cactus tree by clicking or moving with the mouse (or also through screen touch). Preferably, in order to avoid covering the shape of the cactus tree when all the node names of the cactus tree are displayed, only the link relationship between the nodes and the nodes is displayed on the display interface. The node's circular area displays the name of the node.
又优选地,当检测到用户的节点放大或缩小动作时,对节点放大或缩小动作对应的节点进行放大或缩小操作,从而便于用户对单个感兴趣节点进行查看。例如,节点放大或缩小动作可为鼠标中键的滚动动作,也可以为触屏的放大或缩小动作。Also preferably, when a node zoom-in or zoom-out action of the user is detected, the node corresponding to the node zoom-in or zoom-out action is zoomed in or zoomed out, thereby facilitating the user to view a single node of interest. For example, the node zoom-in or zoom-out action can be the scroll action of the middle mouse button, or the touch-screen zoom-in or zoom-out action.
又优选地,当检测到用户选中仙人掌树中的一条边时,通过不同的颜色显示该边的源节点和目标节点,从而帮助用户在视觉上区分源节点和目标节点。Also preferably, when detecting that the user selects an edge in the cactus tree, the source node and the target node of the edge are displayed in different colors, thereby helping the user to visually distinguish the source node and the target node.
优选地,如图3所示,数据输入单元21包括:Preferably, as shown in FIG. 3, the data input unit 21 includes:
名称分割单元311,用于根据预设的分隔符对叶子节点的名称进行分割,获得叶子节点到仙人掌树根节点的路径上所有节点的名称。The name dividing unit 311 is configured to divide the names of the leaf nodes according to a preset delimiter to obtain the names of all the nodes on the path from the leaf node to the root node of the cactus tree.
优选地,节点信息确定单元23包括:Preferably, the node information determining unit 23 includes:
权值确定单元331,用于根据叶子节点对应的预设权值和每个父节点对应的子节点集合,确定仙人掌树中每个节点的权值;以及A weight determining unit 331, configured to determine a weight of each node in the cactus tree according to a preset weight corresponding to a leaf node and a set of child nodes corresponding to each parent node; and
半径确定单元332,用于根据仙人掌树中每个节点的权值,确定每个节点的节点半径。The radius determining unit 332 is configured to determine a node radius of each node according to a weight value of each node in the cactus tree.
在本发明实施例中,接收输入数据,该输入数据中存放了预设叶子节点的相关信息,对这些相关信息进行处理,获得仙人掌树中所有父节点和父节点对应的子节点集合,根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息,根据每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形,检测用户的交互动作,根据该交互动作对可缩放矢量图形进行调节,从而通对基于树形结构的数据可视化效果进行调整,提高数据可视化的空间利用率和空间分配效果。In the embodiment of the present invention, input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree. Set of child nodes corresponding to each parent node, determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction According to the interactive action, the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
在本发明实施例中,来电提醒装置的各单元可由相应的硬件或软件单元实现,各单元可以为独立的软、硬件单元,也可以集成为一个软、硬件单元,在此不用以限制本发明。In the embodiment of the present invention, each unit of the call reminding device may be implemented by a corresponding hardware or software unit, and each unit may be an independent software and hardware unit, or may be integrated into a software and hardware unit, which is not necessary to limit the present invention. .
实施例三:Embodiment three:
图4示出了本发明实施例三提供的计算设备的结构,为了便于说明,仅示出了与本发明实施例相关的部分。FIG. 4 shows the structure of a computing device provided in Embodiment 3 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown.
本发明实施例的计算设备4包括处理器40、存储器41以及存储在存储器41中并可在处理器40上运行的计算机程序42。该处理器40执行计算机程序42时实现上述方法实施例中的步骤,例如图1所示的步骤S101至S105。或者,处理器40执行计算机程序42时实现上述装置实施例中各单元的功能,例如图2所示单元21至25的功能。The computing device 4 according to the embodiment of the present invention includes a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the foregoing method embodiment are implemented, for example, steps S101 to S105 shown in FIG. 1. Alternatively, when the processor 40 executes the computer program 42, the functions of the units in the above-mentioned device embodiment are realized, for example, the functions of the units 21 to 25 shown in FIG. 2.
在本发明实施例中,接收输入数据,该输入数据中存放了预设叶子节点的相关信息,对这些相关信息进行处理,获得仙人掌树中所有父节点和父节点对应的子节点集合,根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息,根据每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形,检测用户的交互动作,根据该交互动作对可缩放矢量图形进行调节,从而通对基于树形结构的数据可视化效果进行调整,提高数据可视化的空间利用率和空间分配效果。In the embodiment of the present invention, input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree. Set of child nodes corresponding to each parent node, determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction According to the interactive action, the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
实施例四:Embodiment 4:
在本发明实施例中,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现上述方法实施例中的步骤,例如,图1所示的步骤S101至S105。或者,该计算机程序被处理器执行时实现上述装置实施例中各单元的功能,例如图2所示单元21至25的功能。In the embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiment are implemented, for example, as shown in FIG. 1. The steps S101 to S105 are shown. Alternatively, when the computer program is executed by a processor, the functions of the units in the foregoing device embodiments are implemented, for example, the functions of units 21 to 25 shown in FIG. 2.
在本发明实施例中,接收输入数据,该输入数据中存放了预设叶子节点的相关信息,对这些相关信息进行处理,获得仙人掌树中所有父节点和父节点对应的子节点集合,根据每个父节点对应的子节点集合,确定仙人掌树中每个节点的节点半径和角度信息,根据每个节点的节点半径和角度信息,生成并绘制仙人掌树的可缩放矢量图形,检测用户的交互动作,根据该交互动作对可缩放矢量图形进行调节,从而通对基于树形结构的数据可视化效果进行调整,提高数据可视化的空间利用率和空间分配效果。In the embodiment of the present invention, input data is received, and the input data stores related information of preset leaf nodes, and the related information is processed to obtain a collection of all parent nodes and corresponding child nodes in the cactus tree. Set of child nodes corresponding to each parent node, determine the node radius and angle information of each node in the cactus tree, and generate and draw a scalable vector graphic of the cactus tree based on the node radius and angle information of each node to detect user interaction According to the interactive action, the scalable vector graphics are adjusted, thereby adjusting the data visualization effect based on the tree structure, and improving the space utilization and space allocation effect of the data visualization.
本发明实施例的计算机可读存储介质可以包括能够携带计算机程序代码的任何实体或装置、记录介质,例如,ROM/RAM、磁盘、光盘、闪存等存储器。The computer-readable storage medium of the embodiment of the present invention may include any entity or device capable of carrying computer program code, a recording medium, for example, a memory such as a ROM / RAM, a magnetic disk, an optical disk, a flash memory, or the like.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiments of the present invention, and is not intended to limit the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention shall be included in the protection of the present invention. Within range.

Claims (10)

  1. 一种基于仙人掌树的数据可视化方法,其特征在于,所述方法包括下述步骤:A data visualization method based on a cactus tree, wherein the method includes the following steps:
    接收输入数据,所述输入数据中存放了预设叶子节点的相关信息;Receiving input data, wherein the input data stores information about preset leaf nodes;
    对所述叶子节点的相关信息进行处理,获得仙人掌树中所有的父节点和每个所述父节点对应的子节点集合; Processing related information of the leaf nodes to obtain all parent nodes in the cactus tree and a set of child nodes corresponding to each of the parent nodes;
    根据每个所述父节点对应的子节点集合,确定所述仙人掌树中每个节点的节点半径和角度信息;Determining the node radius and angle information of each node in the cactus tree according to the child node set corresponding to each of the parent nodes;
    根据所述仙人掌树中每个节点的节点半径和角度信息,生成并绘制所述仙人掌树的可缩放矢量图形;Generating and drawing a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree;
    检测用户的交互动作,根据所述交互动作对所述可缩放矢量图形进行调节。Detecting a user's interactive action, and adjusting the scalable vector graphic according to the interactive action.
  2. 如权利要求1所述的方法,其特征在于,所述叶子节点的相关信息包括所述叶子节点的名称,对所述叶子节点的相关信息进行处理的步骤,包括:The method according to claim 1, wherein the related information of the leaf node includes a name of the leaf node, and the step of processing the related information of the leaf node includes:
    根据预设的分隔符对所述叶子节点的名称进行分割,获得所述叶子节点到所述仙人掌树根节点的路径上所有节点的名称。Segment the names of the leaf nodes according to a preset delimiter to obtain the names of all nodes on the path from the leaf node to the root node of the cactus tree.
  3. 如权利要求1所述的方法,其特征在于,确定所述仙人掌树中每个节点的节点半径和角度信息的步骤,包括:The method according to claim 1, wherein the step of determining node radius and angle information of each node in the cactus tree comprises:
    根据所述叶子节点对应的预设权值和所述每个所述父节点对应的子节点集合,确定所述仙人掌树中每个节点的权值;Determining the weight of each node in the cactus tree according to a preset weight corresponding to the leaf node and a set of child nodes corresponding to each of the parent nodes;
    根据所述仙人掌树中每个节点的权值,确定所述每个节点的节点半径。A node radius of each node is determined according to a weight value of each node in the cactus tree.
  4. 如权利要求1所述的方法,其特征在于,确定所述仙人掌树中每个节点的节点半径和角度信息的步骤,还包括:The method according to claim 1, wherein the step of determining node radius and angle information of each node in the cactus tree further comprises:
    根据所述子节点集合中子节点的权值,按照权值升序对所述子节点集合中的子节点进行排序;Sort the child nodes in the child node set according to the weight of the child nodes in the child node set in ascending order;
    从排序后的所述子节点集合中依次获取当前子节点,根据所述当前子节点的权值确定所述当前子节点相对于相应所述父节点的偏移角度。A current child node is sequentially obtained from the sorted child node set, and an offset angle of the current child node relative to the corresponding parent node is determined according to the weight of the current child node.
  5. 如权利要求4所述的方法,其特征在于,根据所述仙人掌树中每个节点的节点半径和角度信息,生成并绘制所述仙人掌树的可缩放矢量图形的步骤,包括:The method according to claim 4, wherein the step of generating and drawing a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree includes:
    根据所述仙人掌树中每个节点的节点半径、角度信息和权值,生成并绘制所述仙人掌树的可缩放矢量图形,并渲染所述仙人掌树的可缩放矢量图形。Generate and draw a scalable vector graphic of the cactus tree according to the node radius, angle information and weight of each node in the cactus tree, and render the scalable vector graphic of the cactus tree.
  6. 一种基于仙人掌树的数据可视化装置,其特征在于,所述装置包括:A data visualization device based on a cactus tree, wherein the device includes:
    数据输入单元,用于接收输入数据,所述输入数据中存放了预设叶子节点的相关信息;A data input unit configured to receive input data, and the input data stores related information of a preset leaf node;
    叶子节点处理单元,用于对所述叶子节点的相关信息进行处理,获得仙人掌树中所有的父节点和每个所述父节点对应的子节点集合; A leaf node processing unit, configured to process related information of the leaf nodes to obtain all parent nodes in the cactus tree and a set of child nodes corresponding to each of the parent nodes;
    节点信息确定单元,用于根据每个所述父节点对应的子节点集合,确定所述仙人掌树中每个节点的节点半径和角度信息;A node information determining unit, configured to determine node radius and angle information of each node in the cactus tree according to a set of child nodes corresponding to each of the parent nodes;
    图形绘制单元,用于根据所述仙人掌树中每个节点的节点半径和角度信息,生成并绘制所述仙人掌树的可缩放矢量图形;以及A graphic drawing unit, configured to generate and draw a scalable vector graphic of the cactus tree according to the node radius and angle information of each node in the cactus tree; and
    图形交互单元,用于检测用户的交互动作,根据所述交互动作对所述可缩放矢量图形进行调节。A graphic interaction unit is configured to detect an interactive action of a user, and adjust the scalable vector graphic according to the interactive action.
  7. 如权利要求6所述的装置,其特征在于,所述数据输入单元包括:The apparatus according to claim 6, wherein the data input unit comprises:
    名称分割单元,用于根据预设的分隔符对所述叶子节点的名称进行分割,获得所述叶子节点到所述仙人掌树根节点的路径上所有节点的名称。A name splitting unit is configured to split the names of the leaf nodes according to a preset delimiter to obtain the names of all nodes on the path from the leaf node to the root node of the cactus tree.
  8. 如权利要求6所述的装置,其特征在于,所述节点信息确定单元包括:The apparatus according to claim 6, wherein the node information determining unit comprises:
    权值确定单元,用于根据所述叶子节点对应的预设权值和所述每个所述父节点对应的子节点集合,确定所述仙人掌树中每个节点的权值;以及A weight determining unit, configured to determine a weight of each node in the cactus tree according to a preset weight corresponding to the leaf node and a set of child nodes corresponding to each of the parent nodes; and
    半径确定单元,用于根据所述仙人掌树中每个节点的权值,确定所述每个节点的节点半径。A radius determining unit is configured to determine a node radius of each node according to a weight value of each node in the cactus tree.
  9. 一种计算设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至5任一项所述方法的步骤。A computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements claims 1 to Steps of the method of any one of 5.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述方法的步骤。A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
PCT/CN2018/115534 2018-09-14 2018-11-15 Cactus tree-based data visualization method and apparatus, and device and storage medium WO2020052053A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811075466.2A CN109408674B (en) 2018-09-14 2018-09-14 Cactus tree based data visualization method, device, equipment and storage medium
CN201811075466.2 2018-09-14

Publications (1)

Publication Number Publication Date
WO2020052053A1 true WO2020052053A1 (en) 2020-03-19

Family

ID=65464266

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/115534 WO2020052053A1 (en) 2018-09-14 2018-11-15 Cactus tree-based data visualization method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN109408674B (en)
WO (1) WO2020052053A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871206B (en) * 2019-03-14 2022-05-03 杭州安恒信息技术股份有限公司 Method, device and equipment for visualizing JSON (Java Server pages) tree and readable storage medium
CN111191089B (en) * 2019-12-24 2023-05-02 泰康保险集团股份有限公司 Data visualization method, system, equipment and medium based on medical care scene
CN111191425A (en) * 2020-01-02 2020-05-22 北京科技大学 Add husband's grammar analysis drawing system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064475A1 (en) * 2002-09-27 2004-04-01 International Business Machines Corporation Methods for progressive encoding and multiplexing of web pages
CN101582793A (en) * 2009-06-05 2009-11-18 东软集团股份有限公司 Method and device for graphical display of network topology
CN103049580A (en) * 2013-01-17 2013-04-17 北京工商大学 Method and device for visualization of layering data
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN107491305A (en) * 2017-08-10 2017-12-19 深圳市华傲数据技术有限公司 Data analysis and visible processing method, device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064475A1 (en) * 2002-09-27 2004-04-01 International Business Machines Corporation Methods for progressive encoding and multiplexing of web pages
CN101582793A (en) * 2009-06-05 2009-11-18 东软集团股份有限公司 Method and device for graphical display of network topology
CN103049580A (en) * 2013-01-17 2013-04-17 北京工商大学 Method and device for visualization of layering data
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN107491305A (en) * 2017-08-10 2017-12-19 深圳市华傲数据技术有限公司 Data analysis and visible processing method, device

Also Published As

Publication number Publication date
CN109408674B (en) 2020-04-07
CN109408674A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
US10749755B2 (en) Network topology self-adapting data visualization method, device, apparatus, and storage medium
US8749553B1 (en) Systems and methods for accurately plotting mathematical functions
US20170323028A1 (en) System and method for large scale information processing using data visualization for multi-scale communities
WO2020052053A1 (en) Cactus tree-based data visualization method and apparatus, and device and storage medium
US20010049695A1 (en) Visualization spreadsheet
US20110265023A1 (en) Interactive Representation of Clustered Entities
CN107545057A (en) Show method, apparatus, equipment and the storage medium of mind map
Gansner et al. Interactive Visualization of Streaming Text Data with Dynamic Maps.
US9697751B2 (en) Interactive representation of clusters of geographical entities
Chawla et al. Big data analytics for data visualization: Review of techniques
US11631154B2 (en) Method, apparatus, device and storage medium for transforming hairstyle
CN110889854A (en) Sketch component segmentation method, system and device based on multi-scale deep learning and storage medium
US10303706B2 (en) Condensed hierarchical data viewer
KR101910179B1 (en) Web-based chart library system for data visualization
WO2023151299A1 (en) Data generation method and apparatus, device, and storage medium
CN116204184A (en) UI editing method, system and storage medium for improving page style adaptation
CN116563804A (en) Point cloud labeling method, device, equipment and storage medium
CN114797109A (en) Object editing method and device, electronic equipment and storage medium
CN112348955B (en) Object rendering method
CN114972702A (en) Sampling method and storage medium for industrial image target detection image training set
JP2022024081A (en) Data processing method, apparatus, device, and memory medium for neural network accelerator
WO2022026603A1 (en) Object recognition neural network training using multiple data sources
CN112132980A (en) Thinking guide graph operation method for psychological consultation
CN111309917A (en) Super-large scale academic network visualization method and system based on conference periodical galaxy diagram
WO2024016112A1 (en) Industrial knowledge graph display method, device, medium, and product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18933114

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 24/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18933114

Country of ref document: EP

Kind code of ref document: A1