WO2021036190A1 - 节点布局确定方法以及装置 - Google Patents

节点布局确定方法以及装置 Download PDF

Info

Publication number
WO2021036190A1
WO2021036190A1 PCT/CN2020/072178 CN2020072178W WO2021036190A1 WO 2021036190 A1 WO2021036190 A1 WO 2021036190A1 CN 2020072178 W CN2020072178 W CN 2020072178W WO 2021036190 A1 WO2021036190 A1 WO 2021036190A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
group
coordinates
relationship
nodes
Prior art date
Application number
PCT/CN2020/072178
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 创新先进技术有限公司
Priority to US16/859,795 priority Critical patent/US11048670B2/en
Publication of WO2021036190A1 publication Critical patent/WO2021036190A1/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 specification relates to the field of data processing technology, and in particular to a method for determining node layout. This specification also relates to a node layout determining device, a computing device, and a computer-readable storage medium.
  • the form of layout diagram can be used to express the logical relationship between data elements.
  • the layout diagram can be composed of multiple nodes, each of which can correspond to a data element.
  • the data elements themselves are grouped, and some of these groups include more data elements.
  • These data element groups including more data elements will be displayed as a display area including multiple nodes, thus occupying a larger display area when forming a layout diagram. This will cause the display areas of the data element grouping to overlap, which will cause difficulties in the interpretation of the layout diagram, and will seriously affect the function of the layout diagram to display the logical relationship of the data elements.
  • the embodiment of this specification provides a method for determining the layout of nodes.
  • This specification also relates to a node layout determining device, a computing device, and a computer-readable storage medium to solve the technical defects in the prior art.
  • a method for determining the layout of nodes is provided, which is applicable to a node database.
  • the node database includes a plurality of node groups, and each of the node groups includes at least one node.
  • Each node in the node database corresponds to the unique node grouping
  • the method includes: for the node grouping including a plurality of nodes, grouping the nodes according to the correspondence between the nodes in the node grouping Lay out the multiple nodes in the multiple nodes to obtain the relative coordinates of each node in the multiple nodes in the corresponding node group; determine the nodes according to the correspondence between the nodes in the node database The relationship between the groupings; according to the relationship between the node groupings and the number of nodes included in the node grouping, the node groups in the node database are laid out to obtain the group coordinates of each node grouping And according to the relative coordinates of each node and the group coordinates of the node group to which it belongs, the true coordinates of each node are obtained, wherein, for the node group including a single node, all of the single node The real coordinates are the group coordinates of the node group to which the single node belongs.
  • a node layout determining device which is suitable for a node database.
  • the node database includes a plurality of node groups, and each of the node groups includes at least one node.
  • Each node in the node database corresponds to the unique node group, wherein the device includes:
  • the first layout module is configured to, for the node group including multiple nodes, lay out the multiple nodes in the node group according to the correspondence between the nodes in the node group to obtain the multiple nodes.
  • a group relationship determining module configured to determine the relationship between the node groups according to the corresponding relationship between the nodes in the node database
  • the second layout module is configured to lay out the node groups in the node database according to the relationship between the node groups and the number of nodes included in the node groups to obtain the group of each node group Coordinates;
  • the calculation module is configured to obtain the true coordinates of each node according to the relative coordinates of each node and the group coordinates of the node group to which it belongs, wherein, for the node group including a single node, the single The real coordinates of the node are the group coordinates of the node group to which the single node belongs.
  • a computing device including a memory, a processor, and computer instructions stored in the memory and executable on the processor.
  • the processor implements the instructions when the instructions are executed. The steps of the node layout determination method.
  • a computer-readable storage medium which stores computer instructions that, when executed by a processor, implement the steps of the node layout determination method.
  • the relationship between the node groups is determined according to the correspondence between the nodes, and the node groups are regarded as objects to be laid out for layout, thereby effectively avoiding overlapping of the display areas of the node groups.
  • the display areas corresponding to the nodes will not overlap. Since the layout process within the node grouping can obtain the relative coordinates of each node in the corresponding node grouping, the real coordinates of each node can be obtained by combining the group coordinates of the node grouping after the layout.
  • Fig. 1 shows a structural block diagram of a computing device provided by an embodiment of this specification
  • FIG. 2 shows a schematic flowchart of a method for determining a node layout according to an embodiment of this specification
  • Fig. 3a, Fig. 3b, Fig. 3b’, Fig. 3c and Fig. 3c’ show schematic diagrams of a method for determining a node layout according to an embodiment of this specification
  • FIG. 4 shows a schematic flowchart of a process of determining a relationship between node groups in a method for determining a node layout according to an embodiment of the present specification
  • Fig. 5 shows a schematic structural diagram of an apparatus for determining a node layout according to an embodiment of the present specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.
  • a method for determining node layout is provided.
  • This specification also relates to a node layout determining device, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments.
  • Fig. 1 shows a structural block diagram of a computing device 100 provided in an embodiment of this specification.
  • the components of the computing device 100 include but are not limited to a memory 110 and a processor 120.
  • the processor 120 and the memory 110 are connected through a bus 130, and the database 150 is used to store data.
  • the computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160.
  • networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet.
  • the access device 140 may include one or more of any type of wired or wireless network interface (for example, a network interface card (NIC)), such as IEEE802.11 wireless local area network (WLAN) wireless interface, global interconnection for microwave access ( Wi-MAX) interface, Ethernet interface, universal serial bus (USB) interface, cellular network interface, Bluetooth interface, near field communication (NFC) interface, etc.
  • NIC network interface card
  • the aforementioned components of the computing device 100 and other components not shown in FIG. 1 may also be connected to each other, for example, via a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 1 is only for the purpose of example, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
  • the computing device 100 may be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (for example, tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (for example, smart phones). ), wearable computing devices (for example, smart watches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs.
  • the computing device 100 may also be a mobile or stationary server.
  • FIG. 2 shows a flowchart of a method for determining a node layout according to an embodiment of the present specification, including step 202 to step 208.
  • the node layout determination method of the embodiment of the present application is applicable to a node database, the node database includes a plurality of node groups, each node group includes at least one node, and each node corresponds to a unique node group.
  • Each node in the node database corresponds to a data element.
  • the logical relationship between the data elements in the node database can be visually seen through the process of node layout determination, for example, a tree structure can be formed. Layout diagram or flowchart.
  • the specific content of the data element depends on the specific application scenario of the node database. For example, in real-time computing scenarios, some operators are used to complete computing tasks, so nodes can actually be operators in real-time computing tasks, and the correspondence between nodes can be the flow relationship between operators. .
  • the embodiment of the present application does not limit the node database and the specific category and content of the node.
  • Step 202 For a node group including multiple nodes, lay out the multiple nodes in the node group according to the correspondence between the nodes in the node group, so as to obtain the position of each node in the corresponding node group. Relative coordinates.
  • the display positions of the nodes in the display area corresponding to the node group determined according to the relative coordinates do not overlap with each other.
  • the node database includes six nodes A, B, C, D, E, and F, where A to B has a flow relationship, A to C has a flow relationship, and B to D has a flow relationship. C to E have a flow direction relationship, and E to F have a flow direction relationship. A, B, and C belong to group A, D belongs to group B, and EF belongs to group C.
  • the relative coordinates of each node in the rectangular display area corresponding to the node group can be obtained by laying out the inside of the node group, so that the layout form of each node inside the node group can be as shown in Figure 3a.
  • A, B, and C are located in the display area of Group A, and the flow direction relationship from A to B is indicated by arrows, and the flow direction relationship from A to C is indicated by arrows.
  • D is located in the display area of group B.
  • E and F are located in the display area of group C, and the flow direction relationship from E to F is indicated by arrows.
  • a Dagre layout algorithm can be used to implement the process of arranging the nodes within the node group.
  • Dagre is a JavaScript library used to draw relational graphs, which can easily implement automatic layout and draw directed graphs on the client side.
  • the use of Dagre only needs some basic information (such as the size of the node) to realize the graph layout, and can quickly draw the graph.
  • layout algorithms may also be used in the embodiments of the present specification to implement the process of laying out the nodes within the node group, and to obtain the relative coordinates of the nodes.
  • the embodiments of this specification do not limit the types of specific layout algorithms used.
  • Step 204 Determine the relationship between the node groups according to the correspondence between the nodes in the node database.
  • the process of determining the relationship between node groups may include the following steps:
  • Step 402 Determine whether there is a first relationship between the first node in the first node group and the second node in the second node group.
  • Step 404 When the judgment result is yes, it is determined that there is also a first relationship between the first node group and the second node group.
  • the execution process of step 402 and step 404 above can be performed for each node in the first node group one by one, that is, through step 402 and step 404 By doing it in a loop, it can be judged whether there is a relationship between each node in the first node group and other node groups, and thus it can be judged whether there is a relationship between the first node group and other node groups.
  • Step 206 Layout the node groups in the node database according to the relationship between the node groups and the number of nodes included in the node groups to obtain the group coordinates of each node group.
  • the node groups after determining the flow relationship between the node groups, the node groups can be used as objects to be laid out for layout, and the group coordinates of each node group can be obtained.
  • the layout diagram is drawn according to the obtained group coordinates of the node grouping. This can be shown in Figure 3b. It should be understood that the layout diagram drawn according to the obtained group coordinates of the node grouping is determined by the flow relationship between the nodes.
  • the Dagre layout algorithm may also be used to implement the process of grouping and layout of nodes. It should be understood, however, that other layout algorithms may also be used in the embodiments of this specification to implement the process of laying out node groups and obtain the group coordinates of the node groups. The embodiments of this specification do not limit the types of specific layout algorithms used.
  • Step 208 Obtain the real coordinates of each node according to the relative coordinates of each node and the group coordinates of the node group to which it belongs. For a group of nodes including a single node, the real coordinates of a single node are the subordinates of the single node. The group coordinates of the node grouping.
  • the final real coordinates of the node can be calculated.
  • the group coordinates of the node group can be directly used as the real coordinates of the single node for the location of the single node.
  • a directed acyclic graph corresponding to the node database can be drawn. The nodes in the directed acyclic graph have no collision and no overlap, and the display areas corresponding to the grouping of nodes will not overlap. For example, as shown in Fig.
  • the relative coordinates and the group coordinates are two-dimensional coordinates, and the layout drawings drawn are all plan views.
  • the node database may be more complicated, the relative coordinates and group coordinates may include more dimensions, and the drawn layout diagram may also have more dimensions.
  • the embodiments of this specification do not limit the specific dimensions of the relative coordinates and the group coordinates.
  • the method for determining the layout of nodes determines the relationship between node groups according to the correspondence between nodes, and treats the node groups as objects to be laid out for layout, thereby effectively avoiding the display area of node groups. Overlapped. At the same time, by laying out the nodes within the node grouping, the display areas corresponding to the nodes will not overlap. Since the layout process within the node grouping can obtain the relative coordinates of each node in the corresponding node grouping, the real coordinates of each node can be obtained by combining the group coordinates of the node grouping after the layout.
  • the method for determining the layout of nodes provided in the embodiments of this specification can realize the complete layout of all nodes in the node database, and there will be no overlap between nodes and node groups, and the nodes can be clearly displayed.
  • the logical relationship between nodes and the grouping of nodes improves the interpretation efficiency of the node database.
  • FIG. 5 shows a schematic structural diagram of a node layout determining device provided by an embodiment of this specification.
  • the node layout determining device 500 is applicable to a node database, the node database includes a plurality of node groups, each node group includes at least one node, and each node corresponds to a unique node group.
  • the node layout determining device 500 includes:
  • the first layout module 502 is configured to, for node groups including multiple nodes, lay out multiple nodes in the node group according to the correspondence between the nodes in the node group, so as to obtain the corresponding relationship between each node of the multiple nodes.
  • the group relationship determining module 504 is configured to determine the relationship between node groups according to the corresponding relationship between the nodes in the node database;
  • the second layout module 506 is configured to lay out the node groups in the node database according to the relationship between the node groups and the number of nodes included in the node groups to obtain the group coordinates of each node group;
  • the calculation module 508 is configured to obtain the true coordinates of each node according to the relative coordinates of each node and the group coordinates of the node group to which it belongs, where, for a node group including a single node, the true coordinate of a single node is the single The group coordinates of the node group to which the node belongs.
  • the node layout determining device determines the relationship between the node groups according to the corresponding relationship between the nodes, and treats the node groups as the objects to be laid out for layout, thereby effectively avoiding the display area of the node groups Overlapped. At the same time, by laying out the nodes within the node grouping, the display areas corresponding to the nodes will not overlap. Since the layout process within the node grouping can obtain the relative coordinates of each node in the corresponding node grouping, the real coordinates of each node can be obtained by combining the group coordinates of the node grouping after the layout.
  • the method for determining the layout of nodes provided in the embodiments of this specification can realize the complete layout of all nodes in the node database, and there will be no overlap between nodes and node groups, and the nodes can be clearly displayed.
  • the logical relationship between nodes and the grouping of nodes improves the interpretation efficiency of the node database.
  • the group relationship determination module 504 is further configured to determine the first node when there is a first relationship between the first node in the first node group and the second node in the second node group There is also a first relationship between the grouping and the second node grouping.
  • the relative coordinates and the group coordinates are two-dimensional coordinates.
  • the node layout determining device 500 further includes: a drawing module 510 configured to draw a directed acyclic graph corresponding to the node database based on the real coordinates of each node.
  • the first layout module 502 and the second layout module 506 are configured to obtain the relative coordinates of each node and the group coordinates of each node group by using the Dago layout algorithm.
  • the nodes are operators in real-time computing tasks, and there is a flow relationship between the operators.
  • An embodiment of the present specification also provides a computing device, including a memory, a processor, and computer instructions stored in the memory and capable of running on the processor.
  • the processor implements the node layout determination when the instructions are executed. Method steps.
  • An embodiment of the present application further provides a computer-readable storage medium that stores computer instructions, and when the instructions are executed by a processor, the steps of the method for determining the node layout described above are implemented.
  • the computer instructions include computer program codes, and the computer program codes may be in the form of source code, object code, executable files, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

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)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

一种节点布局确定方法以及装置,所述方法包括:对于包括多个节点的节点分组,根据节点分组中的节点间的对应关系对节点分组中的多个节点进行布局,以获取多个节点中的每个节点在对应的节点分组中的相对坐标(202);根据节点数据库中的节点间的对应关系确定节点分组之间的关系(204);根据节点分组之间的关系以及节点分组中所包括的节点的数量对节点数据库中的节点分组进行布局,以获取每个节点分组的组坐标(206);以及根据每个节点的相对坐标以及所从属于的节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的节点分组,单个节点的真实坐标为该单个节点所从属的节点分组的组坐标(208)。

Description

节点布局确定方法以及装置 技术领域
本说明书涉及数据处理技术领域,特别涉及一种节点布局确定方法。本说明书同时涉及一种节点布局确定装置,一种计算设备,以及一种计算机可读存储介质。
背景技术
为了能够更直观高效地实现数据处理,在对数据进行处理的过程中,可采用布局图的形式来表示数据元素之间的逻辑关系。该布局图可由多个节点组成,其中的每个节点可对应一个数据元素。然而,在一些应用场景中,数据元素本身是有分组的,这些分组有的包括较多的数据元素。这些包括较多数据元素的数据元素分组则会显示为包括多个节点的显示区域,因而在形成布局图时就会占据较大的显示面积。这样会造成数据元素分组的显示区域重叠,从而为布局图的解读造成困难,会严重影响布局图显示数据元素的逻辑关系的作用。
发明内容
有鉴于此,本说明书实施例提供了一种节点布局确定方法。本说明书同时涉及一种节点布局确定装置,一种计算设备,以及一种计算机可读存储介质,以解决现有技术中存在的技术缺陷。
根据本说明书实施例的第一方面,提供了一种节点布局确定方法,适用于一种节点数据库,所述节点数据库包括多个节点分组,每个所述节点分组中包括至少一个节点,所述节点数据库中的每个节点对应唯一的所述节点分组,其中,所述方法包括:对于包括多个节点的所述节点分组,根据所述节点分组中的节点间的对应关系对所述节点分组中的所述多个节点进行布局,以获取所述多个节点中的每个节点在对应的所述节点分组中的相对坐标;根据所述节点数据库中的节点间的对应关系确定所述节点分组之间的关系;根据所述节点分组之间的关系以及所述节点分组中所包括的节点的数量对所述节点数据库中的所述节点分组进行布局,以获取每个节点分组的组坐标;以及根据每个节点的所述相对坐标以及所从属于的所述节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的所述节点分组,所述单个节点的所述真实坐标为该所述单个节 点所从属的所述节点分组的组坐标。
根据本说明书实施例的第二方面,提供了一种节点布局确定装置,适用于一种节点数据库,所述节点数据库包括多个节点分组,每个所述节点分组中包括至少一个节点,所述节点数据库中的每个节点对应唯一的所述节点分组,其中,所述装置包括:
第一布局模块,配置为对于包括多个节点的所述节点分组,根据所述节点分组中的节点间的对应关系对所述节点分组中的所述多个节点进行布局,以获取所述多个节点中的每个节点在对应的所述节点分组中的相对坐标;
组关系确定模块,配置为根据所述节点数据库中的节点间的对应关系确定所述节点分组之间的关系;
第二布局模块,配置为根据所述节点分组之间的关系以及所述节点分组中所包括的节点的数量对所述节点数据库中的所述节点分组进行布局,以获取每个节点分组的组坐标;以及
计算模块,配置为根据每个节点的所述相对坐标以及所从属于的所述节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的所述节点分组,所述单个节点的所述真实坐标为该所述单个节点所从属的所述节点分组的组坐标。
根据本说明书实施例的第三方面,提供了一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现所述节点布局确定方法的步骤。
根据本说明书实施例的第四方面,提供了一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现所述节点布局确定方法的步骤。
本说明书实施例中,根据节点间的对应关系确定节点分组之间的关系,并将节点分组看作是待布局的对象进行布局,从而可有效避免节点分组的显示区域发生重叠。同时,通过在节点分组内部对节点进行布局,节点所对应的显示区域之间也不会发生重叠。由于在节点分组内部的布局过程可获取每个节点在对应的节点分组内部的相对坐标,结合节点分组经过布局后的组坐标,便可获取每个节点的真实坐标。由此可见,采用本说明书实施例所提供的节点布局确定方法,可实现对节点数据库中所有节点的完整布局,其中节点之间和节点分组之间都不会发生重叠,可清楚明了地展示出节点之间以及节点分组之间的逻辑关系,提高节点数据库的解读效率。
附图说明
图1示出了本说明书一实施例提供的计算设备的结构框图;
图2示出了本说明书一实施例提供的一种节点布局确定方法流程示意图;
图3a、图3b、图3b’、图3c和图3c’示出了本说明书一实施例的一种节点布局确定方法的原理示意图;
图4示出了本说明书一实施例提供的一种节点布局确定方法中确定节点分组之间的关系的过程的流程示意图;
图5示出了本说明书一实施例的一种节点布局确定装置的结构示意图。
具体实施方式
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
在本申请中,提供了一种节点布局确定方法。本说明书同时涉及一种节点布局确定装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。
图1示出了本说明书一实施例提供的计算设备100的结构框图。该计算设备100的部件包括但不限于存储器110和处理器120。处理器120与存储器110通过总线130 相连接,数据库150用于保存数据。
计算设备100还包括接入设备140,接入设备140使得计算设备100能够经由一个或多个网络160通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备140可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口等等。
在本说明书的一个实施例中,计算设备100的上述部件以及图1中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图1所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。
计算设备100可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备100还可以是移动式或静止式的服务器。
其中,处理器120可以执行图2所示节点布局确定方法中的步骤。图2示出了根据本说明书一实施例的节点布局确定方法的流程图,包括步骤202至步骤208。
本申请实施例的节点布局确定方法,适用于一种节点数据库,节点数据库包括多个节点分组,每个节点分组中包括至少一个节点,每个节点对应唯一的节点分组。
节点数据库中的每个节点对应一个数据元素。如前所述,为了能够更直观高效地对节点数据库中进行数据处理,通过节点布局确定的过程可直观地看到节点数据库中数据元素之间的逻辑关系,例如可形成一张树形结构的布局图或流程图。应当理解,数据元素的具体内容根据节点数据库的具体应用场景而定。例如,在实时计算场景中会用到一些用于完成计算任务的算子,因此节点实际上就可为实时计算任务中的算子,节点间的对应关系就可为算子之间的流向关系。然而,本申请实施例对节点数据库以及节点的具体类别和内容并不做限定。
本申请实施例的节点布局确定方法包括:
步骤202:对于包括多个节点的节点分组,根据节点分组中的节点间的对应关系对节点分组中的多个节点进行布局,以获取多个节点中的每个节点在对应的节点分组中的相对坐标。
对于包括多个节点的节点分组,由于是对节点分组内部的节点进行布局,因此根据相对坐标所确定下来的在节点分组所对应的显示区域内部的节点的显示位置并不会相互重叠。
如图3a所示的例子中,节点数据库中包括六个节点A、B、C、D、E和F,其中A到B有流向关系,A到C有流向关系,B到D有流向关系,C到E有流向关系,E到F有流向关系。A、B和C属于甲组,D属于乙组,EF属于丙组。通过对节点分组内部进行布局便可获取到节点分组所对应的矩形显示区域内部每个节点的相对坐标,这样每个节点在节点分组内部的布局形式便可如图3a所示。A、B和C位于甲组的显示区域内,且A到B的流向关系用箭头表示,A到C的流向关系用箭头表示。D位于乙组的显示区域内。E和F位于丙组的显示区域内,且E到F的流向关系用箭头表示。
本说明书一实施例中,可采用采用达哥(Dagre)布局算法来实现对节点分组内部的节点进行布局的过程。Dagre是一个用来绘制关系图的JavaScript库,可以在客户端轻松地实现自动布局并绘制有向图。利用Dagre只需要一些基本信息(例如节点的尺寸)便可实现图形布局,并且能够快速地绘制图形。然而应当理解,本说明书实施例也可采用其他布局算法来实现对节点分组内部的节点进行布局的过程,并获取节点的相对坐标。本说明书实施例对所采用的具体布局算法的种类并不做限定。
步骤204:根据节点数据库中的节点间的对应关系确定节点分组之间的关系。
本说明书一实施例中,如图4所示,该确定节点分组之间的关系的过程可包括如下步骤:
步骤402:判断第一节点分组中的第一节点与第二节点分组中的第二节点之间是否存在第一关系。
步骤404:当判断结果为是时,则确定第一节点分组与第二节点分组之间也存在第一关系。
具体而言,由于第一节点分组中可能包括多个节点,因此,上述步骤402和步骤404的执行过程可以逐一针对第一节点分组中的每个节点进行的,即通过步骤402和步骤404的循环进行,即可判断第一节点分组中的每个节点与其他节点分组之间是否存在 关系,并由此判断第一节点分组与其他节点分组之间是否存在关系。
例如在图3a所示的例子中,由于B到D有流向关系,而B属于甲组,D属于乙组,由此便可判定甲组到乙组也有流向关系;由于C到E有流向关系,而C属于甲组,E属于丙组,因此便可判定甲组到丙组也有流向关系。在另一个例子中,B和C均到E有流向关系,D到F有流向关系,则可判定甲组到丙组有流向关系,乙组到丙组也有流向关系。
步骤206:根据节点分组之间的关系以及节点分组中所包括的节点的数量对节点数据库中的节点分组进行布局,以获取每个节点分组的组坐标。
具体而言,在确定了节点分组之间的流向关系后,便可将节点分组作为待布局的对象进行布局,并由此获得每个节点分组的组坐标。例如图3b所示,由于确定了甲组到乙组有流向关系,甲组到丙组也有流向关系,在对节点分组进行布局后,根据所获取的节点分组的组坐标绘制出的布局图便可如图3b所示。应当理解,根据所获取的节点分组的组坐标绘制出的布局图是由节点之间的流向关系决定的,例如当B和C均到E有流向关系,D到F有流向关系时,根据所获取的节点分组的组坐标绘制出的布局图可如图3b’所示,甲组到丙组有流向关系,乙组到丙组也有流向关系。
应当理解,本说明书一实施例中,也可采用采用Dagre布局算法来实现对节点分组进行布局的过程。然而应当理解,本说明书实施例也可采用其他布局算法来实现对节点分组进行布局的过程,并获取节点分组的组坐标。本说明书实施例对所采用的具体布局算法的种类并不做限定。
步骤208:根据每个节点的相对坐标以及所从属于的节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的节点分组,单个节点的真实坐标为该单个节点所从属的节点分组的组坐标。
在获取了每个节点在对应节点分组内的相对坐标以及节点分组的组坐标后,便可换算出节点最终的真实坐标。对于仅包括单个节点的节点分组,由于该单个节点并不存在相对坐标,则可将节点分组的组坐标直接作为该单个节点的真实坐标,以用于该单个节点的位置。本说明书一实施例中,根据所获取的每个节点的真实坐标,便可绘制出与节点数据库对应的有向无环图。该有向无环图中的节点无碰撞无重叠,节点分组所对应的显示区域也不会有重叠。例如图3c所示,在获取了每个节点的真实坐标后,所绘制出的有向无环图中甲组、乙组和丙组所对应的显示区域不重叠,且流向清晰。且甲组、 乙组和丙组各自内部的节点之间也无碰撞无重叠,且流向清晰。而当B和C均到E有流向关系,D到F有流向关系时,所绘制出的有向无环图则可如图3c’所示。
应当理解,虽然在图3a、图3b、图3b’、图3c和图3c’所示的例子中,相对坐标和组坐标为二维坐标,所绘制出的布局图都是平面图。但在本说明书实施例的其他实施例中,节点数据库可能会更为复杂,相对坐标和组坐标可能包括更多维度,所绘制出的布局图也可能有更多维度。本说明书实施例对相对坐标和组坐标的具体维度并不做限定。
本说明书实施例提供的一种节点布局确定方法,根据节点间的对应关系确定节点分组之间的关系,并将节点分组看作是待布局的对象进行布局,从而可有效避免节点分组的显示区域发生重叠。同时,通过在节点分组内部对节点进行布局,节点所对应的显示区域之间也不会发生重叠。由于在节点分组内部的布局过程可获取每个节点在对应的节点分组内部的相对坐标,结合节点分组经过布局后的组坐标,便可获取每个节点的真实坐标。由此可见,采用本说明书实施例提供的节点布局确定方法,可实现对节点数据库中所有节点的完整布局,其中节点之间和节点分组之间都不会发生重叠,可清楚明了得展示出节点之间以及节点分组之间的逻辑关系,提高节点数据库的解读效率。
与上述方法实施例相对应,本说明书还提供了节点布局确定装置实施例,图5示出了本说明书一实施例提供的一种节点布局确定装置的结构示意图。该节点布局确定装置500适用于一种节点数据库,节点数据库包括多个节点分组,每个节点分组中包括至少一个节点,每个节点对应唯一的节点分组。如图5所示,该节点布局确定装置500包括:
第一布局模块502,配置为对于包括多个节点的节点分组,根据节点分组中的节点间的对应关系对节点分组中的多个节点进行布局,以获取多个节点中的每个节点在对应的节点分组中的相对坐标;
组关系确定模块504,配置为根据节点数据库中的节点间的对应关系确定节点分组之间的关系;
第二布局模块506,配置为根据节点分组之间的关系以及节点分组中所包括的节点的数量对节点数据库中的节点分组进行布局,以获取每个节点分组的组坐标;以及
计算模块508,配置为根据每个节点的相对坐标以及所从属于的节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的节点分组,单个节点的真实坐标 为该单个节点所从属的节点分组的组坐标。
本说明书实施例提供的一种节点布局确定装置,根据节点间的对应关系确定节点分组之间的关系,并将节点分组看作是待布局的对象进行布局,从而可有效避免节点分组的显示区域发生重叠。同时,通过在节点分组内部对节点进行布局,节点所对应的显示区域之间也不会发生重叠。由于在节点分组内部的布局过程可获取每个节点在对应的节点分组内部的相对坐标,结合节点分组经过布局后的组坐标,便可获取每个节点的真实坐标。由此可见,采用本说明书实施例提供的节点布局确定方法,可实现对节点数据库中所有节点的完整布局,其中节点之间和节点分组之间都不会发生重叠,可清楚明了得展示出节点之间以及节点分组之间的逻辑关系,提高节点数据库的解读效率。
一个可选的实施例中,组关系确定模块504还配置为:当第一节点分组中的第一节点与第二节点分组中的第二节点之间存在第一关系时,则确定第一节点分组与第二节点分组之间也存在第一关系。
一个可选的实施例中,相对坐标和组坐标为二维坐标。
一个可选的实施例中,如图5所示,该节点布局确定装置500还包括:绘制模块510,配置为基于每个节点的真实坐标绘制与节点数据库对应的有向无环图。
一个可选的实施例中,第一布局模块502和第二布局模块506配置为采用达哥布局算法获取每个节点的相对坐标以及每个节点分组的组坐标。
一个可选的实施例中,节点为实时计算任务中的算子,算子之间有流向关系。
上述节点布局确定装置中的各个模块的具体功能和操作已经在上面的节点布局确定方法中进行了详细介绍,因此,这里将省略其重复描述。
本说明书一实施例中还提供一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现所述的节点布局确定方法的步骤。
本申请一实施例还提供一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现如前所述节点布局确定方法的步骤。
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的节点布局确定方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述节点布局确定方法的技术方案的描述。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。
以上公开的本申请优选实施例只是用于帮助阐述本申请。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本申请的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本申请。本申请仅受权利要求书及其全部范围和等效物的限制。

Claims (14)

  1. 一种节点布局确定方法,其特征在于,适用于一种节点数据库,所述节点数据库包括多个节点分组,每个所述节点分组中包括至少一个节点,所述节点数据库中的每个节点对应唯一的所述节点分组,其中,所述方法包括:
    对于包括多个节点的所述节点分组,根据所述节点分组中的节点间的对应关系对所述节点分组中的所述多个节点进行布局,以获取所述多个节点中的每个节点在对应的所述节点分组中的相对坐标;
    根据所述节点数据库中的节点间的对应关系确定所述节点分组之间的关系;
    根据所述节点分组之间的关系以及所述节点分组中所包括的节点的数量对所述节点数据库中的所述节点分组进行布局,以获取每个节点分组的组坐标;以及
    根据每个节点的所述相对坐标以及所从属于的所述节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的所述节点分组,所述单个节点的所述真实坐标为该所述单个节点所从属的所述节点分组的组坐标。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述节点数据库中的节点间的对应关系确定所述节点分组之间的关系包括:
    当第一节点分组中的第一节点与第二节点分组中的第二节点之间存在第一关系时,则确定所述第一节点分组与所述第二节点分组之间也存在所述第一关系。
  3. 根据权利要求1所述的方法,其特征在于,所述相对坐标和所述组坐标为二维坐标。
  4. 根据权利要求1所述的方法,其特征在于,还包括:
    基于所述每个节点的所述真实坐标绘制与所述节点数据库对应的有向无环图。
  5. 根据权利要求1所述的方法,其特征在于,采用达哥布局算法获取所述每个节点的所述相对坐标以及每个所述节点分组的所述组坐标。
  6. 根据权利要求1所述的方法,其特征在于,所述节点为实时计算任务中的算子,所述算子之间有流向关系。
  7. 一种节点布局确定装置,其特征在于,适用于一种节点数据库,所述节点数据库包括多个节点分组,每个所述节点分组中包括至少一个节点,所述节点数据库中的每个节点对应唯一的所述节点分组,其中,所述装置包括:
    第一布局模块,配置为对于包括多个节点的所述节点分组,根据所述节点分组中的节点间的对应关系对所述节点分组中的所述多个节点进行布局,以获取所述多个节点中的每个节点在对应的所述节点分组中的相对坐标;
    组关系确定模块,配置为根据所述节点数据库中的节点间的对应关系确定所述节点分组之间的关系;
    第二布局模块,配置为根据所述节点分组之间的关系以及所述节点分组中所包括的节点的数量对所述节点数据库中的所述节点分组进行布局,以获取每个节点分组的组坐标;以及
    计算模块,配置为根据每个节点的所述相对坐标以及所从属于的所述节点分组的组坐标,获取每个节点的真实坐标,其中,对于包括单个节点的所述节点分组,所述单个节点的所述真实坐标为该所述单个节点所从属的所述节点分组的组坐标。
  8. 根据权利要求7所述的装置,其特征在于,所述组关系确定模块还配置为:
    当第一节点分组中的第一节点与第二节点分组中的第二节点之间存在第一关系时,则确定所述第一节点分组与所述第二节点分组之间也存在所述第一关系。
  9. 根据权利要求7所述的装置,其特征在于,所述相对坐标和所述组坐标为二维坐标。
  10. 根据权利要求7所述的装置,其特征在于,还包括:
    绘制模块,配置为基于所述每个节点的所述真实坐标绘制与所述节点数据库对应的有向无环图。
  11. 根据权利要求7所述的装置,其特征在于,所述第一布局模块和所述第二布局模块配置为采用达哥布局算法获取所述每个节点的所述相对坐标以及每个所述节点分组的所述组坐标。
  12. 根据权利要求7所述的装置,其特征在于,所述节点为实时计算任务中的算子,所述算子之间有流向关系。
  13. 一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,其特征在于,所述处理器执行所述指令时实现权利要求1-6任意一项所述方法的步骤。
  14. 一种计算机可读存储介质,其存储有计算机指令,其特征在于,该指令被处理器执行时实现权利要求1-6任意一项所述方法的步骤。
PCT/CN2020/072178 2019-08-27 2020-01-15 节点布局确定方法以及装置 WO2021036190A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/859,795 US11048670B2 (en) 2019-08-27 2020-04-27 Node layout determining method and apparatus, computing device, and computer readable medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910797836.1A CN110598056A (zh) 2019-08-27 2019-08-27 节点布局确定方法以及装置
CN201910797836.1 2019-08-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/859,795 Continuation US11048670B2 (en) 2019-08-27 2020-04-27 Node layout determining method and apparatus, computing device, and computer readable medium

Publications (1)

Publication Number Publication Date
WO2021036190A1 true WO2021036190A1 (zh) 2021-03-04

Family

ID=68855996

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/072178 WO2021036190A1 (zh) 2019-08-27 2020-01-15 节点布局确定方法以及装置

Country Status (2)

Country Link
CN (1) CN110598056A (zh)
WO (1) WO2021036190A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598056A (zh) * 2019-08-27 2019-12-20 阿里巴巴集团控股有限公司 节点布局确定方法以及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916281A (zh) * 2010-08-17 2010-12-15 上海云数信息科技有限公司 并行计算系统及去重计数方法
CN104090934A (zh) * 2014-06-26 2014-10-08 山东金质信息技术有限公司 一种标准服务平台分布式并行计算数据库及其检索方法
CN109783568A (zh) * 2018-12-29 2019-05-21 咪咕文化科技有限公司 一种网络拓扑图的生成方法、装置及存储介质
CN110598056A (zh) * 2019-08-27 2019-12-20 阿里巴巴集团控股有限公司 节点布局确定方法以及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101702655B (zh) * 2009-10-27 2011-12-28 北京星网锐捷网络技术有限公司 网络拓扑图的布局方法和系统
CN103473265B (zh) * 2013-07-25 2018-01-23 深圳市华傲数据技术有限公司 一种流程图布局的分析方法及装置
EP3353952B1 (en) * 2016-01-29 2021-05-05 Hewlett Packard Enterprise Development LP Managing groups of servers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916281A (zh) * 2010-08-17 2010-12-15 上海云数信息科技有限公司 并行计算系统及去重计数方法
CN104090934A (zh) * 2014-06-26 2014-10-08 山东金质信息技术有限公司 一种标准服务平台分布式并行计算数据库及其检索方法
CN109783568A (zh) * 2018-12-29 2019-05-21 咪咕文化科技有限公司 一种网络拓扑图的生成方法、装置及存储介质
CN110598056A (zh) * 2019-08-27 2019-12-20 阿里巴巴集团控股有限公司 节点布局确定方法以及装置

Also Published As

Publication number Publication date
CN110598056A (zh) 2019-12-20

Similar Documents

Publication Publication Date Title
US11853389B2 (en) Methods and apparatus for sorting data
TWI712963B (zh) 推薦系統建構方法及裝置
WO2021098509A1 (zh) 神经网络联合编译的方法、装置和电子设备
JP6868677B2 (ja) 情報を生成するための方法および装置
US10871954B2 (en) Controlled deployment of application feature
WO2017181866A1 (en) Making graph pattern queries bounded in big graphs
CN109564566B (zh) 对调用应用的发现以用于控制文件水化行为
CN111460234B (zh) 图查询方法、装置、电子设备及计算机可读存储介质
CN111400555B (zh) 图数据查询任务处理方法、装置、计算机设备和存储介质
JP6608972B2 (ja) ソーシャルネットワークに基づいてグループを探索する方法、デバイス、サーバ及び記憶媒体
CN112583620B (zh) 网络拓扑图生成方法、装置、电子设备和存储介质
CN111435376A (zh) 信息处理方法及系统、计算机系统和计算机可读存储介质
CN115238062A (zh) 技术产权匹配方法和系统
US9300712B2 (en) Stream processing with context data affinity
WO2021142915A1 (zh) 多目标流水车间调度方法、装置、计算机设备及存储介质
WO2021036190A1 (zh) 节点布局确定方法以及装置
CN105786941A (zh) 一种信息挖掘方法和装置
US20150358165A1 (en) Method and arrangement for distributed realisation of token set management and recommendation system with clustering
CN112966054A (zh) 基于企业图谱节点间关系的族群划分方法和计算机设备
US11048670B2 (en) Node layout determining method and apparatus, computing device, and computer readable medium
US20140214844A1 (en) Multiple classification models in a pipeline
CN113691403B (zh) 拓扑节点配置方法、相关装置及计算机程序产品
CN114742691B (zh) 一种图数据采样方法和系统
CN110609850A (zh) 一种信息确定方法、电子设备及计算机存储介质
Yanagisawa et al. Optimization of memory use of fragment extension-based protein–ligand docking with an original fast minimum cost flow algorithm

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

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

Country of ref document: EP

Kind code of ref document: A1