WO2021174946A1 - 可视化方法、系统、计算机设备和存储介质 - Google Patents

可视化方法、系统、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021174946A1
WO2021174946A1 PCT/CN2020/135739 CN2020135739W WO2021174946A1 WO 2021174946 A1 WO2021174946 A1 WO 2021174946A1 CN 2020135739 W CN2020135739 W CN 2020135739W WO 2021174946 A1 WO2021174946 A1 WO 2021174946A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
nodes
level
value
visualization
Prior art date
Application number
PCT/CN2020/135739
Other languages
English (en)
French (fr)
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 WO2021174946A1 publication Critical patent/WO2021174946A1/zh

Links

Images

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
    • G06F16/9024Graphs; Linked lists
    • 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

  • This application relates to the field of data processing technology, in particular to visualization methods, systems, computer equipment and storage media.
  • Force-oriented layout mainly performs iterative calculations based on the number of connected edges of nodes, weights and other parameter information, so that the overall center of gravity of the graph is as close to the center as possible, and the coverage of each node and edge is minimized. After multiple iterations, the position of each node stabilizes. Stop the iteration.
  • This layout method requires a large amount of calculation and needs to be calculated when displayed on the client.
  • the final layout can show the relationship between each node, but it is not convenient to view the number of levels from the core node, the relationship between each level, and the number of nodes at each level .
  • the inventor realizes that although the calculation amount of the circular layout is less than that of the force-directed layout, it is also inconvenient to view the hierarchical relationship between nodes, and the display ability of the circular layout for core nodes is also weaker than that of the force-directed layout.
  • the tree layout the inventor realizes that the amount of calculation is less than the force-oriented layout, and can better express the hierarchical relationship between nodes.
  • the nodes of the tree layout can only belong to 0 or 1 parent node and can have multiple child nodes; the tree layout can only have one root node.
  • the core node has multiple pre-order nodes, the tree layout cannot Meet the needs of use.
  • DAG directed acyclic graph
  • the present application provides a visualization method, system, computer equipment, and storage medium to solve the problem of a large amount of calculation and the inability to clearly display the hierarchy and data flow in the relationship diagram.
  • the present application provides a visualization method for constructing a bidirectional multi-level node relationship, and the visualization method includes:
  • the present application also provides a visualization system for constructing a two-way multi-level node relationship, the visualization system includes:
  • Data set module used to define data set and form directed acyclic graph
  • the node selection module is used to select any node in the directed acyclic graph as the core node, and together with related nodes to construct a bidirectional multi-level node relationship;
  • the Cartesian coordinate system establishment module is used to construct a two-dimensional Cartesian coordinate system with the core node as the coordinate origin;
  • the first calculation module is used to calculate the level of the relevant node and corresponds to the value of the X axis in the Cartesian coordinate system;
  • the second calculation module is used to sort the nodes at the same level and correspond to the value of the Y axis in the Cartesian coordinate system;
  • connection module is used to determine the X coordinate value and Y coordinate value of each node, and draw nodes and connections;
  • the visualization module is used to visualize the drawn nodes and lines to obtain the visualization results.
  • the present application also provides a computer device including a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processing The processor executes the following steps: define the data set to form a directed acyclic graph; select any node in the directed acyclic graph as the core node, and together with related nodes to build a two-way multi-level node relationship; take the core node as the coordinate origin, Construct a two-dimensional Cartesian coordinate system; calculate the level of related nodes and correspond to the value of the X axis in the Cartesian coordinate system; sort the nodes at the same level and correspond to the value of the Y axis in the Cartesian coordinate system; determine each node The X coordinate value and Y coordinate value of, and draw nodes and lines; visualize the drawn nodes and lines to obtain the visualization result.
  • the present application also provides a storage medium that stores a program file that can implement the following steps.
  • the steps include: defining a data set to form a directed acyclic graph; One node is the core node, and together with related nodes to build a two-way multi-level node relationship; take the core node as the coordinate origin to build a two-dimensional Cartesian coordinate system; calculate the level of the related node and correspond to the X axis in the Cartesian coordinate system Value; sort the nodes at the same level and correspond to the value of the Y axis in the Cartesian coordinate system; determine the X coordinate value and Y coordinate value of each node, and draw the nodes and lines; visualize the drawn nodes and lines Processing, get the visual result.
  • the above application provides a visualization method, system, computer equipment, and storage medium, wherein the visualization method forms a directed acyclic graph by defining a data set; any node in the directed acyclic graph is selected as a core node , And together with related nodes to build a two-way multi-level node relationship; take the core node as the coordinate origin to build a two-dimensional Cartesian coordinate system; calculate the level of the related node and correspond to the value of the X axis in the Cartesian coordinate system; for the same level Sort the nodes and correspond to the value of the Y axis in the Cartesian coordinate system; determine the X coordinate value and Y coordinate value of each node, and draw the nodes and lines; visualize the drawn nodes and lines to obtain the visualization results .
  • the visualization method described in the present application can clearly display the hierarchy in the relationship graph and clearly display the data flow direction, and all nodes in the relationship graph are aligned by the X value and the Y value. Since the coverage of nodes and edges and the intersection of edges and edges in the relationship graph are not considered, the amount of calculation is relatively small and it is convenient to realize visualization.
  • Figure 1 is an implementation environment diagram of a visualization method provided in an embodiment
  • Figure 2 is a block diagram of the internal structure of a computer device in an embodiment
  • Figure 3 is a flowchart of a visualization method in an embodiment
  • FIG. 4 is a schematic diagram of the layout position of each node in a Cartesian coordinate system in an embodiment
  • Figure 5 is a schematic diagram of a node layout of an application software application in an embodiment
  • Fig. 6 is a schematic diagram of traversal of the core node in Fig. 5;
  • Fig. 7 is a schematic diagram of the layout position of the nodes in Fig. 6 in a Cartesian coordinate system
  • FIG. 8 is a schematic drawing of nodes and connections of WeChat recommended insurance products in an embodiment
  • FIG. 9 is a schematic diagram of a visual display of WeChat recommended insurance products in an embodiment
  • Figure 10 is a schematic diagram of a visualization system in an embodiment
  • Figure 11 is a schematic structural diagram of a computer device in an embodiment
  • FIG. 12 is a schematic diagram of the structure of a storage medium in an embodiment.
  • FIG. 1 is an implementation environment diagram of a visualization method for constructing a bidirectional multi-level node relationship provided in an embodiment. As shown in FIG. 1, the implementation environment includes a computer device 110 and a display device 120.
  • the computer device 110 may be a computer device used by a user, such as a computer, and a visualization system for constructing a bidirectional multi-level node relationship is installed on the computer device 110.
  • a visualization system for constructing a bidirectional multi-level node relationship is installed on the computer device 110.
  • the user can perform calculation and graph drawing on the computer device 110 according to the visualization method of constructing a two-way multi-level node relationship, and display the visualization result through the display device 120.
  • the combination of the computer device 110 and the display device 120 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited to this.
  • Figure 2 is a schematic diagram of the internal structure of a computer device in an embodiment.
  • the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
  • the database may store control information sequences.
  • the processor can implement a A visualization method for constructing bidirectional multi-level node relationships.
  • the processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment.
  • a computer readable instruction may be stored in the memory of the computer device.
  • the processor may execute a visualization method for constructing a bidirectional multi-level node relationship.
  • the network interface of the computer device is used to connect and communicate with the terminal.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a visualization method for constructing a two-way multi-level node relationship is proposed.
  • the visualization method can be applied to the above-mentioned computer device 110 and display device 120, and specifically may include the following steps:
  • Step 31 Define a data set to form a directed acyclic graph
  • DAG directed acyclic graph
  • Step 32 Select any node in the directed acyclic graph as a core node, and construct a bidirectional multi-level node relationship together with related nodes;
  • the core node can be understood as any node in a directed acyclic graph (DAG), and there is only one core node. After the core node is selected, since the directed acyclic graph has been formed in step 31, the following can be automatically achieved
  • the prerequisites for implementing the visualization method include:
  • each node can have X(X ⁇ [1,N * ]) edges.
  • Each edge has a direction, connecting the starting node S and the target node T, that is, S ⁇ T.
  • Prerequisite 3 The weights of nodes and edges are the same or the influence of weights is ignored, and the distance between nodes is calculated as 1 by default.
  • an edge in the original DAG has a weight attribute or other meaning, it will not participate in the calculation in the visualization method, only the association relationship between nodes is applied, and the weight or distance of all association relationships is assumed to be 1, so as to facilitate the calculation. , But the actual layout can increase this value as needed.
  • Prerequisite 4 Except for the core node, the remaining nodes only perform one-way reference relationship calculation, and the direction is determined based on the relative position of the current node and the core node.
  • the step of selecting any node in the directed acyclic graph as a core node and constructing a bidirectional multi-level node relationship together with related nodes includes:
  • the core node and related nodes construct a bidirectional multi-level node relationship.
  • edges on the left side of the core node all point to the direction of the core node
  • edges on the right side of the core node all point to the direction opposite to the direction of the core node.
  • the situation of the other nodes on the left. The directions of all sides are the same.
  • the relationship layout only selects the core node and the nodes associated with the core node, and the core node will be combined with related nodes to construct a bidirectional multi-level node relationship.
  • Step 33 Construct a two-dimensional Cartesian coordinate system with the core node as the origin of the coordinates;
  • the calculation of the layout position of each node can be transformed into the calculation of the position relative to the origin (0,0) in the Cartesian coordinate system.
  • the position of the core node is the origin, which can be translated as a whole in different application scenarios. For example, when the origin is at the upper left corner of the screen, the screen resolution is (1280*800).
  • the The X coordinate is increased by 640, and the Y coordinate is decreased by 400, so that the core node is located in the center of the screen, and the whole can be displayed in the center of the screen.
  • Step 34 Calculate the level of the relevant node and correspond to the value of the X axis in the Cartesian coordinate system
  • the calculation of the layout position of each node is mainly divided into two parts.
  • the level of the node is calculated to obtain the value of the X axis in the Cartesian coordinate system.
  • N 00 the core node
  • the other nodes are N xy (x,y ⁇ Z).
  • L xy to represent the left node related to the N node
  • R xy to represent the right node related to the N node.
  • N, L, R are nodes
  • the first subscript is the X value or can be understood as the level
  • the second subscript is the Y value.
  • the node layout position calculation starts from the core node, that is, the origin, and recursive calculation is performed on both sides to determine the X value of each node, that is, the level to which the node belongs.
  • the core node belongs to the L 0 layer.
  • L 0 layer contains only one node.
  • Other nodes are calculated layer by layer in a one-way recursive manner.
  • Other nodes on the left side of the core node are calculated according to the relationship between the current node and the node on the right; other nodes on the right side of the core node are calculated according to the current node and the left node.
  • the relationship between the side nodes calculates the corresponding X value.
  • the left node refers to the smallest X value of the right node related to the current node, and then minus one as the X value of the current node; the node position on the right side of the core node is calculated opposite to the above . In this way, it can be ensured that the direction of all relations in the final result is consistent, all from left to right.
  • X N max(X L1 , X L2 ,..., X Lm )+1, where X Lm represents the X coordinate value of the m-th node on the left side of the node N, m ⁇ Z.
  • the second node is assumed to be A
  • the node X calculates the position, whichever is the maximum value of the left side of all of the nodes X, In Figure 4, only the core node meets this condition, so the X value of A is X+1 of the core node.
  • X N max(X R1 , X R2 ,..., X Rm )-1, where X Rm represents the X coordinate value of the m-th node on the right side of the node N, m ⁇ Z.
  • X Rm represents the X coordinate value of the m-th node on the right side of the node N, m ⁇ Z.
  • the second node is assumed to be A.
  • the X position of this node is calculated by taking the minimum value of X values of all related nodes on the right side. In Figure 4, only the core node meets this condition, so the X value of A is the core node X-1.
  • Step 35 Sort the nodes of the same level and correspond to the value of the Y axis in the Cartesian coordinate system
  • the level to which each node belongs has been determined, and then the Y value of each node is calculated according to the level of the node.
  • Index ⁇ Z; L m is the current level node array; when m is less than 0, Y Li is the left m+1 level of the current node, and when m is greater than 0, Y Li is the left m-1 level of the current node.
  • the Y value of the node at the same level is sorted by summing up the Y value of the node on the left or right side of which it is related and the level difference is equal to 1, and the offset of the Y value is adjusted according to the sorted result.
  • the number of nodes at the same level is odd, the number of nodes on both sides of the X axis is the same; when the number of nodes at the same level is even, the difference in the number of nodes on both sides of the X axis is 1 . For example, if a layer has 7 nodes, then 3 on each side of the X axis; if a layer has 6 nodes, then there are 2 and 3 on both sides of the X axis.
  • Step 36 Determine the X coordinate value and Y coordinate value of each node, and draw the node and the connection line;
  • the X coordinate value and the Y coordinate value of each node can be determined.
  • the nodes and the lines between the nodes can be drawn.
  • the coordinate system can be translated as a whole, or the values of X and Y can be enlarged or reduced as required.
  • Step 37 Perform visualization processing on the drawn nodes and lines to obtain a visualization result.
  • a display device is used to display the drawn nodes and connections to clearly show the hierarchy and data flow in the relationship diagram.
  • visualization parameters need to be determined.
  • the visualization parameters include: node shape, node size, edge type, edge length, and edge thickness.
  • the visualization method for constructing a two-way multi-level node relationship described in the present application may have multiple application scenarios.
  • the recommendation of insurance products between customers through WeChat is taken as an example.
  • Each node in the graph represents a customer, and each edge represents a product recommended by customer A to other customers.
  • Figure 6 to traverse the related nodes from node H to both sides to establish a layout relationship with the related nodes.
  • Figure 7 to construct a two-dimensional Cartesian coordinate system with the core node as the coordinate origin.
  • the X values of related nodes J, K, and N on the right side of node H take the maximum value of the related left node +1.
  • the left related nodes of these three nodes are only node H, so the X values of nodes J, K, and N are all 1. Use the same method to continue traversing to the right.
  • the node on the right side of node J has node N and node O.
  • the X value of node N can be calculated as max(X j ,X h )+1, that is, max(1,0)+1, so the X value of N is from 1 changes to 2, step by step to the right until the X value of all nodes on the right of the H node is counted.
  • the level of the node can be obtained according to the value of the X axis in the Cartesian coordinate system corresponding to each node, and the Y value of each node is calculated in each level.
  • H is the core node, and it is not necessary to calculate the Y value. Use formulas for other nodes at each level Calculate the corresponding Y value.
  • the node name is used for natural Sort.
  • the results of Y values of all nodes are as follows:
  • node A B D E F H J K N O X coordinate -2 -2 -1 -1 -1 0 1 1 2 2 Y coordinate 1 0 1 0 -1 0 1 0 1 0 1 0
  • Figure 8 has drawn a schematic diagram of the nodes and connections.
  • the visualization parameters include: node shape, node size, edge type, edge length, and edge thickness.
  • the shape of the node is a circle
  • the size of the node can be set according to the importance of the node
  • the type of the edge is a straight edge
  • the weight of the edge can be set to 1.
  • nodes and connections can be rendered in different colors. For example, the core node can be rendered in red, other nodes can be rendered in yellow, and the connection can be rendered in orange to clearly show the level and data. relation.
  • corresponding summary information is obtained based on the result of the visualization method for constructing a bidirectional multi-level node relationship.
  • the summary information is obtained by hashing the result of the visualization method for constructing a bidirectional multi-level node relationship, such as Use sha256s algorithm processing to get.
  • Uploading summary information to the blockchain can ensure its security and fairness and transparency to users.
  • the user can download the summary information from the blockchain to verify whether the result of the visualization method for constructing a two-way multi-level node relationship has been tampered with.
  • the blockchain referred to in this example is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • This application provides a visualization method for constructing a two-way multi-level node relationship.
  • a directed acyclic graph is formed by defining a data set; any node in the directed acyclic graph is selected as the core node, and the related nodes are combined to construct a two-way Multi-level node relationship; take the core node as the coordinate origin to construct a two-dimensional Cartesian coordinate system; calculate the level of the related node and correspond to the value of the X axis in the Cartesian coordinate system; sort the nodes at the same level to correspond to the Cartesian coordinate The value of the Y axis in the system; determine the X coordinate value and Y coordinate value of each node, and draw the node and line; visualize the drawn node and line to obtain the visualization result. Therefore, the present application can clearly display the hierarchy and data flow in the relationship diagram, and the calculation amount is relatively small, which is convenient for visualization. At the same time, this application also involves blockchain technology.
  • the present application also provides a visualization system for constructing a two-way multi-level node relationship.
  • the visualization system can be integrated into the above-mentioned computer device 110, and can specifically include a data set module 20, a node selection module 30, and a flute.
  • the data set module 20 is used to define a data set and form a directed acyclic graph
  • the node selection module 30 is used to select any node in the directed acyclic graph as a core node, and together with related nodes to construct a bidirectional multi-level node relationship;
  • the Cartesian coordinate system establishment module 40 is used to construct a two-dimensional Cartesian coordinate system with the core node as the origin of the coordinate;
  • the first calculation module 50 is used to calculate the level of the node and corresponds to the value of the X axis in the Cartesian coordinate system;
  • the second calculation module 60 is used to sort the nodes of the same level, corresponding to the value of the Y axis in the Cartesian coordinate system;
  • connection module 70 is used to determine the X coordinate value and the Y coordinate value of each node, and draw the node and the connection line;
  • the visualization module 80 is used to perform visualization processing on the nodes and connections in each hierarchical structure of the data set to obtain a visualization result.
  • the step of calculating the level of the node to which the node belongs and corresponding to the value of the X axis in the Cartesian coordinate system includes:
  • X N max(X L1 , X L2 ,..., X Lm )+1, where X Lm represents the X coordinate value of the m-th node on the left side of the node N, m ⁇ Z;
  • X N max(X R1 , X R2 ,..., X Rm )-1, where X Rm represents the X coordinate value of the m-th node on the right side of the node N, m ⁇ Z.
  • the step of sorting the nodes of the same level to correspond to the value of the Y axis in the Cartesian coordinate system includes:
  • connection module 70 when the number of nodes at the same level is odd, the number of nodes on both sides of the X axis is the same; when the number of nodes at the same level is even, the number of nodes on both sides of the X axis is drawn in the visualization system The number difference is 1 to clearly show the level and data flow.
  • the visualization system further includes a display module (not shown) for displaying the visualization results.
  • the display module may be a display of a desktop computer or a display device of other computer equipment.
  • FIG. 11 is a schematic structural diagram of a device according to an embodiment of the application.
  • the device 200 includes a processor 201 and a memory 202 coupled to the processor 201.
  • the memory 202 stores program instructions for implementing the visualization method for constructing a bidirectional multi-level node relationship described in any of the above embodiments.
  • the processor 201 is configured to execute program instructions stored in the memory 202.
  • the processor 201 may also be referred to as a CPU (Central Processing Unit, central processing unit).
  • the processor 201 may be an integrated circuit chip with signal processing capability.
  • the processor 201 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component .
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • FIG. 12 is a schematic structural diagram of a storage medium according to an embodiment of the application.
  • the storage medium of the embodiment of the present application stores a program file 301 that can implement all the above methods.
  • the program file 301 may be stored in the above storage medium in the form of a software product.
  • the storage medium may be non-volatile or It is volatile and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.
  • terminal devices such as computers, servers, mobile phones, and tablets.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种可视化方法、系统、计算机设备和存储介质,通过定义数据集来形成有向无环图(S31);在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系(S32);以核心节点为坐标原点,构建二维的笛卡尔坐标系(S33);计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值(S34);对同层级节点进行排序,对应笛卡尔坐标系中Y轴的值(S35);确定每个节点的X坐标值和Y坐标值,并绘制节点和连线(S36);对绘制的节点和连线进行可视化处理,得到可视化结果(S37)。因此,该方法能够清晰展示关系图中的层级和数据流向,并且计算量相对较小。同时,还涉及区块链技术。该方法还可应用于数据仓库场景中,从而推动大数据的建设的目的。

Description

可视化方法、系统、计算机设备和存储介质
本申请要求于2020年10月12日提交中国专利局、申请号为202011086414.2、申请名称为“可视化方法、系统、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,特别是涉及可视化方法、系统、计算机设备和存储介质。
背景技术
目前,多个节点间依赖关系使用图形方式进行描述时,大多采用力导向布局、环形布局、树形布局进行绘图展示。
力导向布局,主要根据节点相连边的数量、权重等参数信息进行迭代计算,使图形整体重心尽量靠近中心,各节点和边尽量减少覆盖的情况,在多次迭代各个节点位置趋于稳定后,停止迭代。这种布局方式计算量较大,需要在客户端展示时进行计算,最终布局能够展现各个节点间关系,但不便于查看距离核心节点的层级数量、各个层级之间的关系和各层级的节点数量。
发明人意识到环状布局虽然计算量少于力导向布局,但同样不便于查看节点间的层级关系,而且环状布局对于核心节点的展现能力也弱于力导向布局。
树形布局,发明人意识到其计算量少于力导向布局,能够较好表达节点间的层级关系。但树形布局的节点只能归属于0个或1个父节点,可以有多个子节点;树形布局只能有一个根节点,当核心节点的前序节点有多个时,树形布局不能满足使用需要。
发明人发现,节点关系大多数情况是多对多的关系,基本可以简化理解为有向无环图(DAG)。
发明内容
基于此,本申请提供了一种可视化方法、系统、计算机设备和存储介质,以解决计算量较大,不能清晰展示关系图中的层级和数据流向的问题。
为实现上述目的,本申请提供一种构建双向多层级节点关系的可视化方法,所述可视化方法包括:
定义数据集,形成有向无环图;
在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
以核心节点为坐标原点,构建二维的笛卡尔坐标系;
计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;
对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;
确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
对绘制的节点和连线进行可视化处理,得到可视化结果。
为实现上述目的,本申请还提供了一种构建双向多层级节点关系的可视化系统,所述可视化系统包括:
数据集模块,用于定义数据集和形成有向无环图;
节点选取模块,用于在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
笛卡尔坐标系建立模块,用于以核心节点为坐标原点,构建二维的笛卡尔坐标系;
第一计算模块,用于计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;
第二计算模块,用于对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;
连接模块,用于确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
可视化模块,用于对绘制的节点和连线进行可视化处理,得到可视化结果。
为实现上述目的,本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下步骤:定义数据集,形成有向无环图;在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;以核心节点为坐标原点,构建二维的笛卡尔坐标系;计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;对绘制的节点和连线进行可视化处理,得到可视化结果。
为实现上述目的,本申请还提供了一种存储介质,存储有能够实现如下步骤的程序文件,所述步骤包括:定义数据集,形成有向无环图;在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;以核心节点为坐标原点,构建二维的笛卡尔坐标系;计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;对绘制的节点和连线进行可视化处理,得到可视化结果。
上述本申请提供了一种可视化方法、系统、计算机设备和存储介质,其中,所述可视化方法通过定义数据集来形成有向无环图;在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;以核心节点为坐标原点,构建二维的笛卡尔坐标系;计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;对绘制的节点和连线进行可视化处理,得到可视化结果。因此,本申请所述可视化方法能够清晰展示关系图中的层级以及清晰展示数据流向,关系图中的所有节点都通过X值和Y值进行行列对齐。由于不考虑关系图中节点与边的覆盖情况和边与边的交叉情况,所以计算量相对较小,并方便实现可视化。
附图说明
图1为一个实施例中提供的可视化方法的实施环境图;
图2为一个实施例中计算机设备的内部结构框图;
图3为一个实施例中可视化方法的流程图;
图4为一个实施例中各个节点在笛卡尔坐标系中布局位置的示意图;
图5为一个实施例中应用软件应用的节点布局的示意图;
图6为图5中核心节点的遍历示意图;
图7为图6中节点在笛卡尔坐标系中布局位置的示意图;
图8为一个实施例中微信推荐保险产品的节点和连线的绘制示意图;
图9为一个实施例中微信推荐保险产品的可视化展示示意图;
图10为一个实施例中可视化系统的示意图;
图11为一个实施例中的计算机设备的结构示意图;
图12为一个实施例中的存储介质的结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。
图1为一个实施例中提供的构建双向多层级节点关系的可视化方法的实施环境图,如图 1所示,在该实施环境中,包括计算机设备110和显示设备120。
计算机设备110可以为用户使用的电脑等计算机设备,计算机设备110上安装有构建双向多层级节点关系的可视化系统。当计算时,用户可以在计算机设备110依照构建双向多层级节点关系的可视化方法进行计算和图形绘制,并通过显示设备120进行可视化结果显示。
需要说明的是,计算机设备110和显示设备120组合起来可以为智能手机、平板电脑、笔记本电脑、台式计算机等,但并不局限于此。
图2为一个实施例中计算机设备的内部结构示意图。如图2所示,该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种构建双向多层级节点关系的可视化方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种构建双向多层级节点关系的可视化方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
如图3所示,在一个实施例中,提出了一种构建双向多层级节点关系的可视化方法,该可视化方法可以应用于上述的计算机设备110和显示设备120中,具体可以包括以下步骤:
步骤31,定义数据集,形成有向无环图;
一般来说,多个节点间依赖关系使用图形方式进行描述时,由于节点关系大多数情况是多对多的关系,基本可以简化理解为有向无环图(DAG)。
步骤32,在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
本实施例中,核心节点可以理解为有向无环图(DAG)中任意一个节点,核心节点只有一个,在选取核心节点后,由于步骤31已经形成有向无环图,就能自动达成以下实现可视化方法的前提条件,包括:
前提1,每个节点可以有X(X∈[1,N *])条边。
具体的,在DAG中不会存在孤立的点,至少存在一条与其他节点相连的边。
前提2,每条边具有方向,连接开始节点S和目标节点T,即S→T。
前提3,节点和边的权重都相同或忽略权重带来的影响,节点间的距离默认按照1进行计算。
具体的,原始DAG中如边具有权重属性或其他含义,在所述可视化方法中都不会参与计算,仅适用节点间的关联关系,所有关联关系的权重或距离都假设为1,以便于计算,但实际布局可按需要增大此值。
前提4,除核心节点外,剩余节点仅进行单向引用关系计算,方向依据当前节点与核心节点的相对位置进行确定。
在一个实施例中,所述在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系的步骤包括:
在有向无环图中选取任意一节点为核心节点;
从核心节点开始遍历相关节点;
所述核心节点连同相关节点构建双向多层级节点关系。
进一步的,在核心节点左侧的边都是指向核心节点所在方向,核心节点右侧的边都指向核心节点所在方向的反方向,不会出现核心节点右侧节点有边指向核心节点或核心节点左侧的其他节点的情况。所有边的方向都是一致的。
进一步的,可以理解的是,当有向无环图足够大时,关系布局则只选择核心节点及与核 心节点相关联的节点,所述核心节点将连同相关节点以构建双向多层级节点关系。
步骤33,以核心节点为坐标原点,构建二维的笛卡尔坐标系;
具体的,各个节点布局位置的计算可转化为在笛卡尔坐标系中,相对原点(0,0)位置的计算。核心节点位置为原点,在不同应用场景中可整体进行平移,例如,当原点位于屏幕左上角时,屏幕分辨率为(1280*800),在所述可视化方法完成计算后,可将所有节点的X坐标加640,Y坐标减400,使核心节点位于屏幕正中,整体可在在屏幕中央展示。
步骤34,计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;
请参考图4,所述可视化方法中,各节点布局位置计算主要分为两个部分,先计算节点所述层级,得到笛卡尔坐标系中X轴的值。
具体的,假设核心节点为N 00,其它节点为N xy(x,y∈Z),使用L xy表示与N节点相关的左侧节点,使用R xy表示与N节点相关的右侧节点。其中,N、L、R为节点,第一个下标为X值或可理解为所在层级;第二个下标为Y值。
进一步的,节点布局位置计算由核心节点开始,即原点开始,向两侧进行递归计算,确定每个节点的X值,即节点所属的层级,如图4所示,核心节点归属于L 0层,L 0层仅包含一个节点。其它节点则采用单向递归的方式进行逐层计算,在核心节点左侧的其他节点,按照当前节点与其右侧节点的关系进行计算;在核心节点右侧的其它节点,按照当前结点与其左侧节点的关系计算对应的X值。具体的,是由核心节点向两侧递归计算,左侧节点参考当前节点相关的右侧节点最小的X值,再减一作为当前节点的X值;计算核心节点右侧的节点位置与上述相反。这样,可以保证最终结果全部关系的方向一致,都是由左向右的。
具体计算过程如下:
计算核心节点右侧节点N的X值:X N=max(X L1,X L2,…,X Lm)+1,其中,X Lm表示节点N左侧相关第m个节点的X坐标值,m∈Z。具体的,以图4中L 1中由上向下第二个节点为例,所述第二节点假设为A,计算此节点X位置,是取其左侧所有相关节点X值的最大值,图4中只有核心节点满足此条件,所以A的X值就是核心节点的X+1。
计算核心节点左侧节点N的X值:X N=max(X R1,X R2,…,X Rm)-1,其中,X Rm表示节点N右侧相关第m个节点的X坐标值,m∈Z。具体的,以图4中L -1中由上向下第二个节点为例,所述第二节点假设为A,计算此节点X位置,是取其右侧所有相关节点X值的最小值,图4中只有核心节点满足此条件,所以A的X值就是核心节点的X-1。
步骤35,对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;
具体的,在完成全部节点X值的计算后,每个节点所归属的层级便已经确定,然后根据节点所处层级计算每个节点的Y值。
具体计算方式如下:
Figure PCTCN2020135739-appb-000001
其中,Index∈Z;L m为当前层级节点数组;当m小于0时,Y Li为当前节点左侧m+1层,当m大于0时,Y Li为当前节点左侧m-1层。
进一步的,同层级节点的Y值通过与其相关的左侧或右侧节点并且层级差值等于1的节点的Y值进行汇总求和后进行排序,按照排序后的结果调整Y值的偏移量,使同层级的节点尽量在X轴两侧均匀分布,当同层级节点数量为奇数时,X轴两侧节点数量相同;当同层级节点数量为偶数时,X轴两侧节点数量差为1。例如,某一层有7个节点,那X轴两侧各3个;某一层有6个节点,则X轴两侧分别是2个和3个。
步骤36,确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
具体的,在经过步骤34和步骤35的计算后,可以确定每个节点的X坐标值和Y坐标值,此时,可以绘制节点以及节点之间的连线。
进一步的,根据需求,可以对坐标系进行整体平移,或根据需要放大或缩小X和Y的值。
步骤37,对绘制的节点和连线进行可视化处理,得到可视化结果。
具体的,采用显示装置对绘制的节点和连线进行显示,以清楚展示关系图中的层级和数据流向。
具体的,在可视化处理之前,需确定可视化参数,可视化参数包括:节点形状、节点大小、边的类型、边的长度和边的粗细。
本申请所述的构建双向多层级节点关系的可视化方法可具有多个应用场景,本实施例中,以客户间通过微信推荐保险产品为例。
请参考图5,客户使用微信进行保险产品转发推荐会形成产品推荐的有向无环图,图中每个节点都代表一个客户,每条边都代表某个产品被客户A推荐给了其他客户。请参考图6,从节点H开始向两侧遍历相关节点,以建立与相关节点布局关系。请参考图7,以核心节点为坐标原点,构建二维的笛卡尔坐标系。
针对图7,可以计算相关节点所属层级,以对应笛卡尔坐标系中X轴的值,其中,节点H为核心节点坐标值为(0,0),使用公式:X N=max(X L1,X L2,…,X Lm)+1,由节点H向右侧逐级计算相关节点的X坐标值。节点H右侧相关节点J、K、N的X值取其相关左侧节点最大值+1,这三个节点的左侧相关节点只有节点H,所以节点J、K、N的X值都为1,使用相同方式继续向右遍历。节点J的右侧节点有节点N、节点O,使用公式可以计算节点N的X值为max(X j,X h)+1,即max(1,0)+1,因此N的X值从1变为2,逐级向右直至计H节点全部右侧节点的X值。左侧节点计算使用公式X N=min(X R1,X R2,…,X Rm)-1计算H节点左侧的全部相关节点的X值。计算结果如下:
表1-各节点对应笛卡尔坐标系中X轴的值
节点 A B D E F H J K N O
X坐标 -2 -2 -1 -1 -1 0 1 1 2 2
进一步的,根据各节点对应笛卡尔坐标系中X轴的值可以得出节点所在的层级,在每个层级内计算各个节点的Y值,H为核心节点,不需要计算Y值。其它各层级节点使用公式
Figure PCTCN2020135739-appb-000002
计算对应Y值。例如,X=-1层所有节点的Y值计算方式,计算D、E、F每个节点相关右侧节点的数量分别是(1,1,1),所以D、E、F三个节点按照名称进行自然排序,顺序为(0-D、1-E、2-F),因此,
Figure PCTCN2020135739-appb-000003
Figure PCTCN2020135739-appb-000004
节点A、B的排序的Y值分别为(Y E=0,Y D=1+Y F=-1)因此A、B节点按照Y值进行排序,当Y值相同时则按照节点名称进行自然排序。所有节点Y值结果如下:
表2-各个节点的X坐标值和Y坐标值
节点 A B D E F H J K N O
X坐标 -2 -2 -1 -1 -1 0 1 1 2 2
Y坐标 1 0 1 0 -1 0 1 0 1 0
请继续参考图8,在确定每个节点的X坐标值和Y坐标值,可以绘制节点和连线,图8已绘制好节点和连线的示意图。
请继续参考图9,对绘制的节点和连线进行可视化处理,得到可视化结果。在可视化处理之前,需要确定可视化参数,可视化参数包括:节点形状、节点大小、边的类型、边的长 度和边的粗细。本实施例中,节点形状为圆形,节点大小可以根据节点的重要程度来设置,边的类型为直线边,边的权重可以设置为1。依据所设定的可视化参数,可以采用不同的颜色对节点和连线进行渲染,例如核心节点可以采用红色渲染,其他节点可采用黄色渲染,连线可以是橙色渲染,以能清晰展现层级和数据关系。
进一步的,我们可以根据实际展示需要调整全部节点坐标。例如,请再参考图9,如在web展示中,原点位于屏幕左上角,需要将全部节点进行整体平移,以1920*1080的屏幕为例,需要将所有节点移到屏幕中心,则将全部节点的X+960,Y-640,显示结果图9所示。
在一个可选的实施方式中,还可以:将所述构建双向多层级节点关系的可视化方法的结果上传至区块链中。
具体地,基于所述构建双向多层级节点关系的可视化方法的结果得到对应的摘要信息,具体来说,摘要信息由所述构建双向多层级节点关系的可视化方法的结果进行散列处理得到,比如利用sha256s算法处理得到。将摘要信息上传至区块链可保证其安全性和对用户的公正透明性。用户可以从区块链中下载得该摘要信息,以便查证所述构建双向多层级节点关系的可视化方法的结果是否被篡改。本示例所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
本申请提供了一种构建双向多层级节点关系的可视化方法,通过定义数据集来形成有向无环图;在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;以核心节点为坐标原点,构建二维的笛卡尔坐标系;计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;对同层级节点进行排序,对应笛卡尔坐标系中Y轴的值;确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;对绘制的节点和连线进行可视化处理,得到可视化结果。由此,本申请能够清晰展示关系图中的层级和数据流向,并且计算量相对较小,便于可视化。同时,本申请还涉及区块链技术。
如图10所示,本申请还提供了一种构建双向多层级节点关系的可视化系统,该可视化系统可以集成于上述的计算机设备110中,具体可以包括数据集模块20、节点选取模块30、笛卡尔坐标系建立模块40、第一计算模块50、第二计算模块60、连接模块70以及可视化模块80。
所述数据集模块20,用于定义数据集和形成有向无环图;
所述节点选取模块30,用于在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
所述笛卡尔坐标系建立模块40,用于以核心节点为坐标原点,构建二维的笛卡尔坐标系;
所述第一计算模块50,用于计算节点所属层级,并对应笛卡尔坐标系中X轴的值;
所述第二计算模块60,用于对同层级节点进行排序,对应笛卡尔坐标系中Y轴的值;
所述连接模块70,用于确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
所述可视化模块80,用于对数据集各层次结构中的节点和连线进行可视化处理,得到可视化结果。
在一个实施例中,所述第一计算模块50中,所述计算节点所属层级,并对应笛卡尔坐标系中X轴的值的步骤包括:
计算核心节点右侧节点N的X值:X N=max(X L1,X L2,…,X Lm)+1,其中,X Lm表示节点N左侧相关第m个节点的X坐标值,m∈Z;
计算核心节点左侧节点N的X值:X N=max(X R1,X R2,…,X Rm)-1,其中,X Rm表示节点N右侧相关第m个节点的X坐标值,m∈Z。
在一个实施例中,所述第二计算模块60中,所述对同层级节点进行排序,对应笛卡尔坐标系中Y轴的值的步骤包括:
对m层级内节点Y值进行计算:
Figure PCTCN2020135739-appb-000005
其中,Index∈Z;L m为当前层级节点数组;当m小于0时,Y Li为当前节点左侧m+1层,当m大于0时,Y Li为当前节点左侧m-1层。
在一个实施例中,所述连接模块70中,在所述可视化系统绘制当同层级节点数量为奇数时,X轴两侧节点数量相同;当同层级节点数量为偶数时,X轴两侧节点数量差为1,以能清晰展现层级和数据流向。
在一个实施例中,所述可视化系统还包括显示模块(未图示),用于显示可视化结果,所述显示模块可以是台式电脑的显示器,也可以是其他计算机设备的显示装置。
请参考图11,图11为本申请实施例的设备的结构示意图。如图11所示,该设备200包括处理器201及和处理器201耦接的存储器202。
存储器202存储有用于实现上述任一实施例所述构建双向多层级节点关系的可视化方法的程序指令。
处理器201用于执行存储器202存储的程序指令。
其中,处理器201还可以称为CPU(Central Processing Unit,中央处理单元)。处理器201可能是一种集成电路芯片,具有信号的处理能力。处理器201还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
参阅图12,图12为本申请实施例的存储介质的结构示意图。本申请实施例的存储介质存储有能够实现上述所有方法的程序文件301,其中,该程序文件301可以以软件产品的形式存储在上述存储介质中,所述存储介质可以是非易失性,也可以是易失性,其包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,或者是计算机、服务器、手机、平板等终端设备。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。

Claims (20)

  1. 一种构建双向多层级节点关系的可视化方法,其中,所述可视化方法包括:
    定义数据集,形成有向无环图;
    在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
    以核心节点为坐标原点,构建二维的笛卡尔坐标系;
    计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;
    对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;
    确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
    对绘制的节点和连线进行可视化处理,得到可视化结果。
  2. 如权利要求1所述的可视化方法,其中,所述在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系的步骤包括:
    在有向无环图中选取任意一节点为核心节点;
    从核心节点开始遍历相关节点;
    所述核心节点连同相关节点构建双向多层级节点关系。
  3. 如权利要求1所述的可视化方法,其中,所述计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值的步骤包括:
    计算核心节点右侧节点N的X值:X N=max(X L1,X L2,…,X Lm)+1,其中,X Lm表示节点N左侧相关第m个节点的X坐标值,m∈Z;
    计算核心节点左侧节点N的X值:X N=max(X R1,X R2,…,X Rm)-1,其中,X Rm表示节点N右侧相关第m个节点的X坐标值,m∈Z。
  4. 如权利要求1所述的可视化方法,其中,所述对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值的步骤包括:
    对m层级内节点Y值进行计算:
    Figure PCTCN2020135739-appb-100001
    其中,Index∈Z;L m为当前层级节点数组;当m小于0时,Y Li为当前节点左侧m+1层,当m大于0时,Y Li为当前节点左侧m-1层。
  5. 如权利要求4所述的可视化方法,其中,当同层级节点数量为奇数时,X轴两侧节点数量相同;当同层级节点数量为偶数时,X轴两侧节点数量差为1。
  6. 如权利要求1所述的可视化方法,其中,在可视化处理之前,需确定可视化参数,可视化参数包括:节点形状、节点大小、边的类型、边的长度和边的粗细。
  7. 如权利要求1所述的可视化方法,其中,所述得到可视化结果之后,将所述可视化结果上传至区块链中,以使得所述区块链对所述可视化结果进行加密存储。
  8. 一种构建双向多层级节点关系的可视化系统,其中,所述可视化系统包括:
    数据集模块,用于定义数据集和形成有向无环图;
    节点选取模块,用于在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
    笛卡尔坐标系建立模块,用于以核心节点为坐标原点,构建二维的笛卡尔坐标系;
    第一计算模块,用于计算节点所属层级,并对应笛卡尔坐标系中X轴的值;
    第二计算模块,用于对同层级节点进行排序,对应笛卡尔坐标系中Y轴的值;
    连接模块,用于确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
    可视化模块,用于对数据集各层次结构中的节点和连线进行可视化处理,得到可视化结果。
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下步骤:
    定义数据集,形成有向无环图;
    在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关 系;
    以核心节点为坐标原点,构建二维的笛卡尔坐标系;
    计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;
    对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;
    确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
    对绘制的节点和连线进行可视化处理,得到可视化结果。
  10. 如权利要求9所述的计算机设备,其中,所述在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系的步骤包括:
    在有向无环图中选取任意一节点为核心节点;
    从核心节点开始遍历相关节点;
    所述核心节点连同相关节点构建双向多层级节点关系。
  11. 如权利要求9所述的计算机设备,其中,所述计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值的步骤包括:
    计算核心节点右侧节点N的X值:X N=max(X L1,X L2,…,X Lm)+1,其中,X Lm表示节点N左侧相关第m个节点的X坐标值,m∈Z;
    计算核心节点左侧节点N的X值:X N=max(X R1,X R2,…,X Rm)-1,其中,X Rm表示节点N右侧相关第m个节点的X坐标值,m∈Z。
  12. 如权利要求9所述的计算机设备,其中,所述对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值的步骤包括:
    对m层级内节点Y值进行计算:
    Figure PCTCN2020135739-appb-100002
    其中,Index∈Z;L m为当前层级节点数组;当m小于0时,Y Li为当前节点左侧m+1层,当m大于0时,Y Li为当前节点左侧m-1层。
  13. 如权利要求12所述的计算机设备,其中,当同层级节点数量为奇数时,X轴两侧节点数量相同;当同层级节点数量为偶数时,X轴两侧节点数量差为1。
  14. 如权利要求9所述的计算机设备,其中,在可视化处理之前,需确定可视化参数,可视化参数包括:节点形状、节点大小、边的类型、边的长度和边的粗细。
  15. 一种存储介质,其中,存储有能够实现如下步骤的程序文件,所述步骤包括:
    定义数据集,形成有向无环图;
    在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系;
    以核心节点为坐标原点,构建二维的笛卡尔坐标系;
    计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值;
    对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值;
    确定每个节点的X坐标值和Y坐标值,并绘制节点和连线;
    对绘制的节点和连线进行可视化处理,得到可视化结果。
  16. 如权利要求15所述的存储介质,其中,所述在有向无环图中选取任意一节点为核心节点,并连同相关节点以构建双向多层级节点关系的步骤包括:
    在有向无环图中选取任意一节点为核心节点;
    从核心节点开始遍历相关节点;
    所述核心节点连同相关节点构建双向多层级节点关系。
  17. 如权利要求15所述的存储介质,其中,所述计算相关节点所属层级,并对应笛卡尔坐标系中X轴的值的步骤包括:
    计算核心节点右侧节点N的X值:X N=max(X L1,X L2,…,X Lm)+1,其中,X Lm表示节点N左侧相关第m个节点的X坐标值,m∈Z;
    计算核心节点左侧节点N的X值:X N=max(X R1,X R2,…,X Rm)-1,其中,X Rm表示节 点N右侧相关第m个节点的X坐标值,m∈Z。
  18. 如权利要求15所述的存储介质,其中,所述对同层级节点进行排序,并对应笛卡尔坐标系中Y轴的值的步骤包括:
    对m层级内节点Y值进行计算:
    Figure PCTCN2020135739-appb-100003
    其中,Index∈Z;L m为当前层级节点数组;当m小于0时,Y Li为当前节点左侧m+1层,当m大于0时,Y Li为当前节点左侧m-1层。
  19. 如权利要求18所述的存储介质,其中,当同层级节点数量为奇数时,X轴两侧节点数量相同;当同层级节点数量为偶数时,X轴两侧节点数量差为1。
  20. 如权利要求15所述的存储介质,其中,在可视化处理之前,需确定可视化参数,可视化参数包括:节点形状、节点大小、边的类型、边的长度和边的粗细。
PCT/CN2020/135739 2020-10-12 2020-12-11 可视化方法、系统、计算机设备和存储介质 WO2021174946A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011086414.2 2020-10-12
CN202011086414.2A CN112148932B (zh) 2020-10-12 2020-10-12 可视化方法、系统、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021174946A1 true WO2021174946A1 (zh) 2021-09-10

Family

ID=73953007

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135739 WO2021174946A1 (zh) 2020-10-12 2020-12-11 可视化方法、系统、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN112148932B (zh)
WO (1) WO2021174946A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113869033A (zh) * 2021-09-24 2021-12-31 厦门大学 融入迭代式句对关系预测的图神经网络句子排序方法
CN114117416A (zh) * 2021-09-16 2022-03-01 山东大学 基于sat的对称密码自动化分析平台可视化方法及系统
CN114138984A (zh) * 2021-12-08 2022-03-04 安天科技集团股份有限公司 关系图谱更新方法、装置、计算设备及存储介质
CN115455890A (zh) * 2022-09-15 2022-12-09 深圳华芯盛软件科技有限公司 一种启发式行列定位的原理图布局方法
CN115825316A (zh) * 2023-02-15 2023-03-21 武汉宏韧生物医药股份有限公司 基于超临界色谱法的药物有效成分分析方法及装置
CN117522949A (zh) * 2023-12-20 2024-02-06 深圳市奇航疆域技术有限公司 一种基于osgb数据对三维模型进行高度监测的方法及系统

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632194B (zh) * 2020-12-30 2023-11-03 平安证券股份有限公司 数据的图形可视化关系表示方法、装置、设备及存储介质
CN112905688B (zh) * 2021-02-09 2023-12-15 上海德拓信息技术股份有限公司 数据表关系可视化方法、系统及设备及可读存储介质
CN112843721A (zh) * 2021-03-15 2021-05-28 网易(杭州)网络有限公司 命中角色的确定方法、装置、存储介质及计算机设备
CN114040518A (zh) * 2021-11-26 2022-02-11 中国银行股份有限公司 网络节点展示方法及装置
CN114090838B (zh) * 2022-01-18 2022-06-14 杭州悦数科技有限公司 大数据可视化展示的方法、系统、电子装置和存储介质
CN114911976A (zh) * 2022-03-25 2022-08-16 浙江大华技术股份有限公司 节点布局方法、装置、电子设备及计算机可读存储介质
CN116932831B (zh) * 2023-09-14 2023-12-26 北京滴普科技有限公司 一种数据血缘图的构建方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989178A (zh) * 2010-11-05 2011-03-23 北京航空航天大学 多叉树数据结构的立体环状可视化方法
CN104348643A (zh) * 2013-07-31 2015-02-11 华为技术有限公司 可视化拓扑生成方法和装置
US20190081959A1 (en) * 2015-06-05 2019-03-14 Cisco Technology, Inc. System for monitoring and managing datacenters
CN110516004A (zh) * 2019-08-28 2019-11-29 中国人民解放军国防科技大学 兼顾信息全局特征和局部层次结构的可视化方法和系统
CN111338629A (zh) * 2020-03-13 2020-06-26 京东数字科技控股有限公司 一种搭建树形图的数据处理方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470711B (zh) * 2007-12-25 2011-04-20 国际商业机器公司 层次化图结构数据可视化的方法、装置
KR101974069B1 (ko) * 2018-04-30 2019-04-30 한국과학기술원 바이너리 구조 도식화 장치 및 방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989178A (zh) * 2010-11-05 2011-03-23 北京航空航天大学 多叉树数据结构的立体环状可视化方法
CN104348643A (zh) * 2013-07-31 2015-02-11 华为技术有限公司 可视化拓扑生成方法和装置
US20190081959A1 (en) * 2015-06-05 2019-03-14 Cisco Technology, Inc. System for monitoring and managing datacenters
CN110516004A (zh) * 2019-08-28 2019-11-29 中国人民解放军国防科技大学 兼顾信息全局特征和局部层次结构的可视化方法和系统
CN111338629A (zh) * 2020-03-13 2020-06-26 京东数字科技控股有限公司 一种搭建树形图的数据处理方法及装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114117416A (zh) * 2021-09-16 2022-03-01 山东大学 基于sat的对称密码自动化分析平台可视化方法及系统
CN114117416B (zh) * 2021-09-16 2024-04-12 山东大学 基于sat的对称密码自动化分析平台可视化方法及系统
CN113869033A (zh) * 2021-09-24 2021-12-31 厦门大学 融入迭代式句对关系预测的图神经网络句子排序方法
CN114138984A (zh) * 2021-12-08 2022-03-04 安天科技集团股份有限公司 关系图谱更新方法、装置、计算设备及存储介质
CN115455890A (zh) * 2022-09-15 2022-12-09 深圳华芯盛软件科技有限公司 一种启发式行列定位的原理图布局方法
CN115825316A (zh) * 2023-02-15 2023-03-21 武汉宏韧生物医药股份有限公司 基于超临界色谱法的药物有效成分分析方法及装置
CN117522949A (zh) * 2023-12-20 2024-02-06 深圳市奇航疆域技术有限公司 一种基于osgb数据对三维模型进行高度监测的方法及系统

Also Published As

Publication number Publication date
CN112148932A (zh) 2020-12-29
CN112148932B (zh) 2021-06-08

Similar Documents

Publication Publication Date Title
WO2021174946A1 (zh) 可视化方法、系统、计算机设备和存储介质
US11960512B2 (en) Identifying and graphically representing multiple parent nodes of a child node
US7743071B2 (en) Efficient data handling representations
RU2386171C2 (ru) Выравнивание в списках, сформированных по шаблону
EP3678054A1 (en) Product options framework and accessories
US20120311474A1 (en) Map-based methods of visualizing relational databases
CN111078689B (zh) 一种非连续型预排序遍历树算法的数据处理方法及系统
US7720831B2 (en) Handling multi-dimensional data including writeback data
CN111736836B (zh) 基于关系图的组件配置方法、装置及计算机可读存储介质
US10565560B2 (en) Alternative people charting for organizational charts
US11989198B1 (en) User interfaces for database visualizations
US7280123B2 (en) Display priority for 2D CAD documents
US11157467B2 (en) Reducing response time for queries directed to domain-specific knowledge graph using property graph schema optimization
US20220092116A1 (en) Automatic graph database query construction and execution
US11423587B2 (en) Freeform gradient style blending
US11880378B2 (en) Data visualization analytical canvas with functionally independent visual containers
US11275485B2 (en) Data processing pipeline engine
US11539594B2 (en) Diagramming chlid nodes with multiple parent nodes
US10747506B2 (en) Customizing operator nodes for graphical representations of data processing pipelines
US10949219B2 (en) Containerized runtime environments
US11609924B2 (en) Database query execution on multiple databases
US20240168966A1 (en) Data Visualization Analytical Canvas with Functionally Independent Visual Containers
US20230195760A1 (en) User-defined groups of graphical objects
US11934419B2 (en) Presentation of search results in a user interface
US20230123086A1 (en) Validating Relationships Between Classes in Object Models

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: 20922622

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20922622

Country of ref document: EP

Kind code of ref document: A1