A method and system for view node layout
The method and system provide a clear visualization of task node hierarchies by arranging nodes based on hierarchical relationships, ensuring clarity and uniformity in node layouts and facilitating easy expansion.
Patent Information
- Application Number
- CN201811509963.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-11
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2038-12-11
AI Technical Summary
In the prior art, when generating a hierarchical relationship diagram of task nodes, it is difficult to clearly display the hierarchical relationship between task nodes.
By determining the expansion node according to the layout instructions, determining the associated nodes that are related to the expansion nodes based on the hierarchy relationship, and arranging the associated nodes at the same level in the same view layer, determining the layout position of the associated nodes in the view layer based on the hierarchy relationship, and finally generating a node layout diagram.
The generated node layout diagram clearly shows the hierarchical relationship between nodes, and can quickly identify the extended nodes when the node layout diagram is expanded.
Smart Images

Figure CN111309455B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a method and system for view node layout. Background Art
[0002] In a task scheduling scenario, there are usually multiple task nodes in a task pool, and there is a hierarchical relationship between the task nodes. For example, when executing task node A, the execution result of task node B is required, then task node A is determined to be the upper-level node of task node B, and at the same time task node B is the lower-level node of task node A.
[0003] When a user wants to view the hierarchical relationship diagram of a certain target task node, the system searches for the task nodes that have a hierarchical relationship with the target task node according to the hierarchical relationship between the nodes, arranges the found task nodes, generates the hierarchical relationship diagram of the target task node, and then outputs the generated hierarchical relationship diagram to the user.
[0004] In the process of implementing the present invention, the inventor found that there are at least the following problems in the prior art:
[0005] Since the hierarchical relationship of task nodes is often ignored when generating the hierarchical relationship diagram, it is difficult to clearly display the hierarchical relationship between task nodes in the generated hierarchical relationship diagram. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a method and system for view node layout, which can clearly display the hierarchical relationship between nodes, make the node distribution uniform, and can quickly identify the expanded nodes when the node layout diagram is expanded.
[0007] To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a method for view node layout, characterized in that it includes: determining an expanded node according to a layout instruction; determining at least one associated node that has a connection with the expanded node according to a hierarchical relationship, where the hierarchical relationship indicates the nodes included in a hierarchy; arranging the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes at the same level in the hierarchical relationship are arranged in the same view layer; determining the layout position of the associated node in the view layer where it is located according to the hierarchical relationship; and generating a node layout diagram corresponding to the expanded node according to the formed at least one view layer and the layout position of the associated node in the view layer where it is located.
[0008] Optionally, the method for view node layout is characterized in that arranging the at least one associated node according to the hierarchical relationship to form at least one view layer includes: finding the parent node and / or child node of the expansion node from the at least one associated node according to the hierarchical relationship; arranging the parent node on a first side of the expansion node, wherein the parent nodes of the same level are arranged in one view layer; arranging the child node on a second side of the expansion node, wherein the child nodes of the same level are arranged in one view layer.
[0009] Optionally, the method for view node layout is characterized in that arranging the at least one associated node according to the hierarchical relationship to form at least one view layer includes: finding the parent node of the expansion node from the parent nodes and finding the child node of the expansion node from the child nodes according to the hierarchical relationship; arranging the parent node on a first side of the expansion node and performing S1, arranging the child node on a second side of the expansion node and performing S2; S1: Taking the parent node as the current parent node, and looping through the following steps until the parent node of the current parent node is not found: finding the parent node of the current parent node, arranging the parent node of the current parent node on a first side of the current parent node, and taking the parent node of the current parent node as the current parent node; S2: Taking the child node as the current child node, and looping through the following steps until the child node of the current child node is not found: finding the child node of the current child node, arranging the child node of the current child node on a second side of the current child node, and taking the child node of the current child node as the current child node.
[0010] Optionally, the method for view node layout is characterized in that determining the layout position of the associated node in the view layer where it is located according to the hierarchical relationship includes: determining the parent node and / or child node of the associated node according to the hierarchical relationship; determining the layout position of the associated node in the view layer where it is located according to the initial position of the associated node in the view layer where it is located and the initial positions of the parent node of the associated node and / or the child node of the associated node in the view layer where they are located.
[0011] Optionally, the method for view node layout is characterized in that determining the layout position of the associated node in the view layer where it is located according to the initial position of the associated node in the view layer where it is located and the initial positions of the parent node of the associated node and / or the child node of the associated node in the view layer where they are located includes: according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer in the view layer where it is located ij, where j = 1...m, i = 1...N j , m is the number of view layers, calculate the initial weight value of the associated node; determine the final weight value of the associated node according to the initial weight value of the associated node and the initial weight value of the parent node of the associated node and / or the initial weight value of the child node of the associated node; determine the layout position of the associated node in the view layer according to the final weight value of the associated node.
[0012] Optionally, the view node layout method is characterized by using the following calculation formula to calculate the total number N of associated nodes in the j-th view layer: j and the initial position a of the i-th associated node in the j-th view layer ij , calculate the initial weight value of the associated node:
[0013]
[0014] Among them, N max Characterize the total number N j The maximum value among, j = 1…m, n ij The initial weight value representing the i-th associated node in the j-th view layer in the view layer.
[0015] Optionally, the method for view node layout is characterized in that determining the layout position of the associated node in the view layer according to the final weight value of the associated node includes: sorting the associated nodes in the view layer from small to large according to the final weight value of the associated node; and determining the layout position of the associated node in the view layer according to the sorting result.
[0016] Optionally, the view node layout method is characterized in that the step of determining the layout position of the associated node in the view layer according to the sorting result includes: determining the total number N j The maximum value N in max A corresponding target view layer; determining the perpendicular bisector of the target view layer, wherein the associated nodes in the target view layer are arranged symmetrically about the perpendicular bisector; arranging the associated nodes symmetrically about the perpendicular bisector in the view layer according to the layout positions of the associated nodes in the view layer; and generating a node layout diagram corresponding to the expanded node according to the arranged view layer.
[0017] Optionally, the method for laying out view nodes is characterized in that after generating the node layout diagram corresponding to the expansion node according to the at least one view layer and the layout position of the associated node in the view layer where it is located, it further includes: determining a target node selected from the node layout diagram; using the target node as the expansion node, and generating an extended layout diagram corresponding to the target node by using any one of the methods in the above method for laying out view nodes; combining the extended layout diagram with the node layout diagram, and outputting the combined node layout diagram.
[0018] To achieve the above object, according to the second aspect of the embodiments of the present invention, there is provided a system for laying out view nodes, which is characterized in that it includes: a node determination module, a view layer formation module, a position determination module, and a layout diagram generation module; wherein, the node determination module is used to determine an expansion node according to a layout instruction, and determine at least one associated node associated with the expansion node according to a hierarchical relationship, where the hierarchical relationship indicates the nodes included in the hierarchy; the view layer formation module is used to arrange the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes at the same level in the hierarchical relationship are arranged in the same view layer; the position determination module is used to determine the layout position of the associated node in the view layer where it is located according to the hierarchical relationship; the layout diagram generation module is used to generate a node layout diagram corresponding to the expansion node according to the formed at least one view layer and the layout position of the associated node in the view layer where it is located.
[0019] Optionally, the system for laying out view nodes is characterized in that the view layer formation module is used to find the upper-level node and / or lower-level node of the expansion node from the at least one associated node according to the hierarchical relationship, and arrange the upper-level node on the first side of the expansion node, where the upper-level nodes at the same level are arranged in one view layer, and arrange the lower-level node on the second side of the expansion node, where the lower-level nodes at the same level are arranged in one view layer.
[0020] Optionally, in the system for view node layout, it is characterized in that the view layer forming module includes: a processing unit, a parent node arranging unit, and a child node arranging unit; wherein, the processing unit is configured to, according to the hierarchical relationship, find the parent node of the expanded node from the upper-level nodes, find the child nodes of the expanded node from the lower-level nodes, and arrange the parent node on the first side of the expanded node; arrange the child nodes on the second side of the expanded node; the parent node arranging unit is configured to take the parent node as the current parent node and loop through the following steps until the parent node of the current node cannot be found: find the parent node of the current parent node, arrange the parent node of the current parent node on the first side of the current parent node, and take the parent node of the current parent node as the current parent node; the child node arranging unit is configured to take the child nodes as the current child nodes and loop through the following steps until the child nodes of the current child nodes cannot be found: find the child nodes of the current child nodes, arrange the child nodes of the current child nodes on the second side of the current child nodes, and take the child nodes of the current child nodes as the current child nodes.
[0021] Optionally, in the system for view node layout, it is characterized in that the position determining module is configured to, according to the hierarchical relationship, determine the parent node and / or child nodes of the associated node, and determine the layout position of the associated node in the view layer where it is located according to the initial position of the associated node in the view layer where it is located and the initial positions of the parent node of the associated node and / or the child nodes of the associated node in the view layer where they are located.
[0022] Optionally, in the system for view node layout, it is characterized in that the position determining module includes: an initial weight value calculating unit, a final weight value determining unit, and a layout position determining unit; wherein, the initial weight value calculating unit is configured to calculate the initial weight value of the associated node according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer in the view layer where it is located ij , where j = 1...m, i = 1…N j , m is the number of view layers; the final weight value determining unit is configured to determine the final weight value of the associated node according to the initial weight value of the associated node and the initial weight value of the parent node of the associated node and / or the initial weight value of the child nodes of the associated node; the layout position determining unit is configured to determine the layout position of the associated node in the view layer where it is located according to the final weight value of the associated node.
[0023] Optionally, the system for view node layout is characterized in that the initial weight value calculation unit is configured to use the following calculation formula to calculate the initial weight value of the associated node according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer ij :
[0024]
[0025] where N max represents the maximum value of the total number N j , j = 1…m, and n ij represents the initial weight value of the i-th associated node in the j-th view layer in the view layer where it is located.
[0026] Optionally, the system for view node layout is characterized in that the layout position determination unit is configured to sort the associated nodes in ascending order in the view layer where they are located according to the final weight value of the associated nodes, and determine the layout position of the associated nodes in the view layer where they are located according to the sorting result.
[0027] Optionally, the system for view node layout is characterized in that the layout position determination unit is configured to determine the target view layer corresponding to the maximum value N j in the total number N max , determine the perpendicular bisector of the target view layer, where the associated nodes in the target view layer are symmetrically arranged with respect to the perpendicular bisector, and symmetrically arrange the associated nodes in the view layer where they are located with respect to the perpendicular bisector according to the layout position of the associated nodes in the view layer where they are located; generate a node layout diagram corresponding to the expansion node according to the arranged view layer.
[0028] Optionally, the system for view node layout is characterized in that the layout diagram generation module is further configured to determine a target node selected from the node layout diagram, use the target node as the expansion node, trigger the view layer formation module and the position determination module to generate an extended layout diagram corresponding to the target node, combine the extended layout diagram with the node layout diagram, and output the combined node layout diagram.
[0029] To achieve the above object, according to the third aspect of the embodiments of the present invention, a server for view node layout is provided, which is characterized in that it includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the methods in the above method for view node layout.
[0030] To achieve the above object, according to the fourth aspect of the embodiments of the present invention, there is provided a computer-readable medium having a computer program stored thereon, characterized in that when the program is executed by a processor, it implements any one of the methods in the method of view node layout as described above.
[0031] One embodiment of the above invention has the following advantages or beneficial effects: After determining the expanded node according to the layout instruction, determine the associated nodes related to the expanded node according to the hierarchical relationship, then arrange the associated nodes at the same level in the hierarchical relationship in a view layer, and determine the layout position of the associated nodes in the view layer according to the hierarchical relationship. Finally, according to the formed view layer and the layout position of the associated nodes in the view layer, generate a node layout diagram corresponding to the expanded node. It can be seen from this that the same view layer in the generated node layout diagram is the associated nodes at the same level, and the layout positions of the associated nodes in the view layer are also arranged according to the hierarchical relationship, so that the node layout diagram can clearly show the hierarchical relationship between the nodes.
[0032] The further effects of the above non-conventional optional methods will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Among them:
[0034] Figure 1 is a flowchart of a method for view node layout provided by an embodiment of the present invention;
[0035] Figure 2 is a hierarchical relationship diagram provided by an embodiment of the present invention;
[0036] Figure 3 is another hierarchical relationship diagram provided by an embodiment of the present invention;
[0037] Figure 4 is a hierarchical relationship diagram with cross-connections provided by an embodiment of the present invention;
[0038] Figure 5 is a hierarchical relationship diagram without cross-connections provided by an embodiment of the present invention;
[0039] Figure 6 is a node layout diagram provided by an embodiment of the present invention;
[0040] Figure 7 is another node layout diagram provided by an embodiment of the present invention;
[0041] Figure 8 is an extended layout diagram provided by an embodiment of the present invention;
[0042] Figure 9 It is a node layout diagram combined with an extended layout diagram provided by an embodiment of the present invention;
[0043] Figure 10 It is a schematic flowchart of a method for view node layout provided by an embodiment of the present invention;
[0044] Figure 11 It is a schematic structural diagram of a system for view node layout provided by an embodiment of the present invention;
[0045] Figure 12 It is an exemplary system architecture diagram to which the embodiments of the present invention can be applied;
[0046] Figure 13 It is a schematic structural diagram of a computer system of a terminal device or a server suitable for implementing the embodiments of the present invention. Detailed implementation manners
[0047] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted below.
[0048] Generally, the system searches for task nodes having a hierarchical relationship with the target task node according to the hierarchical relationship between nodes, arranges the found task nodes, and generates a hierarchical relationship diagram of the target task node. Since the hierarchical relationship between task nodes is often ignored when generating the hierarchical relationship diagram, it is difficult to clearly show the hierarchical relationship between task nodes in the generated hierarchical relationship diagram.
[0049] As Figure 1 shown, an embodiment of the present invention provides a method for view node layout, and the method may include the following steps:
[0050] Step S101: Determine the expansion node according to the layout instruction.
[0051] After the user logs in to the view node layout system and selects the task node that the user wants to view, that is, inputs a layout instruction to the view node system, the view node layout system can use the task node that the user wants to view as the expansion node according to the layout instruction. For example, if the user wants to view task node O, then O is used as the expansion node.
[0052] Step S102: Determine at least one associated node that is related to the expansion node according to the hierarchical relationship, where the hierarchical relationship indicates the nodes included in each level.
[0053] The hierarchical relationship can be pre-stored in the view node layout system, and this hierarchical relationship indicates the nodes included in each level. For example, the hierarchical relationship indicates that the parent nodes of the expansion node O are A1 and A2, the parent nodes of A1 are B1 and B2, the parent nodes of A2 are B3 and B4, and the child nodes of O are C1, C2, and C3. Then, when looking for the associated nodes related to the expansion node O, A1, A2, B1, B2, B3, B4, C1, C2, and C3 can be found according to the hierarchical relationship.
[0054] Step S103: Arrange the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes at the same level in the hierarchical relationship are arranged in the same view layer.
[0055] Optionally, during the process of forming the view layer, the superior node and / or the inferior node of the expansion node can be found from the at least one associated node according to the hierarchical relationship; arrange the superior node on the first side of the expansion node, where the superior nodes at the same level are arranged in one view layer; arrange the inferior node on the second side of the expansion node, where the inferior nodes at the same level are arranged in one view layer. For example, arrange the superior nodes (A1, A2, B1, B2, B3, and B4) of the expansion node O on the left side of the expansion node O, and arrange the inferior nodes (C1, C2, and C3) of the expansion node O on the right side of the expansion node O, so that the hierarchical relationship between the nodes can be shown more clearly.
[0056] It can be understood that when the superior node and the inferior node of the expansion node are arranged on both sides of the expansion node respectively, there can be multiple arrangement methods. For example, arrange the superior node and the inferior node on both sides of the expansion node in a tree structure respectively (as shown in Figure 2 ), or arrange the associated nodes of each level side by side according to the hierarchical relationship (as shown in Figure 3 ).
[0057] Optionally, when the associated nodes are arranged side by side in a hierarchical relationship, the following method can be adopted: according to the hierarchical relationship, find the parent node of the expanded node from the upper-level nodes, find the child nodes of the expanded node from the lower-level nodes, arrange the parent node on the first side of the expanded node, and execute S1. Arrange the child nodes on the second side of the expanded node and execute S2; S1: Take the parent node as the current parent node and loop through the following steps until the parent node of the current parent node is not found: find the parent node of the current parent node, arrange the parent node of the current parent node on the first side of the current parent node, and take the parent node of the current parent node as the current parent node; S2: Take the child node as the current child node and loop through the following steps until the child node of the current child node is not found: find the child node of the current child node, arrange the child node of the current child node on the second side of the current child node, and take the child node of the current child node as the current child node.
[0058] In this example, first find the parent nodes A1 and A2 of the expanded node O from the upper-level nodes A1, A2, B1, B2, B3, and B4, and arrange A1 and A2 on the left side of the expanded node O to form a view layer. Then find the child nodes C1, C2, and C3 of the expanded node O from the lower-level nodes C1, C2, and C3, and arrange C1, C2, and C3 on the right side of the expanded node O to form another view layer. Then, take A1 as the current parent node, find the parent nodes B1 and B2 of A1, arrange B1 and B2 on the left side of A1, and then take A2 as the current parent node, find the parent nodes B3 and B4 of A2, and arrange B3 and B4 on the left side of A2.
[0059] To ensure that B1, B2, B3, and B4 are in the same view layer (in Figure 3 it is in the same column), that is, to ensure that the associated nodes at the same level are arranged in the same view layer, layer values can be set for each associated node according to the hierarchical relationship. For example, first set the layer value of the expanded node O to 0. After finding its parent node, set the layer values of its parent nodes (A1 and A2) to 0 - 1 = -1. After finding its child nodes, set the layer values of its child nodes (C1, C2, and C3) to 0 + 1 = 1, and so on. The layer values of the parent nodes (B1 and B2) of A1 can be set to -1 - 1 = -2, and the layer values of the parent nodes (B3 and B4) of A2 can also be set to -1 - 1 = -2. Thus, when arranging the associated nodes, arrange the associated nodes with the same layer value in the same view layer, which can ensure that the associated nodes at the same level are in the same view layer and form a hierarchical relationship diagram as shown in Figure 3 shown.
[0060] It is understandable that the arrangement of the parent nodes and the arrangement of the child nodes can be asynchronous, that is, A1 can be executed first and then A2, or A2 can be executed first and then A1, or A1 and A2 can be executed simultaneously.
[0061] Step S104: Determine the layout position of the associated node in the view layer where it is located according to the hierarchical relationship.
[0062] Optionally, in order to more clearly display the hierarchical relationship between nodes, the parent node and / or child node of the associated node can be determined according to the hierarchical relationship; according to the initial position of the associated node in the view layer where it is located and the initial positions of the parent node of the associated node and / or the child node of the associated node in the view layer where they are located, the layout position of the associated node in the view layer where it is located is determined.
[0063] Further, according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer ij , where j = 1...m, i = 1…N j , m is the number of view layers, calculate the initial weight value of the associated node; according to the initial weight value of the associated node and the initial weight value of the parent node of the associated node and / or the initial weight value of the child node of the associated node, determine the final weight value of the associated node; according to the final weight value of the associated node, determine the layout position of the associated node in the view layer where it is located.
[0064] Specifically, the following calculation formula (1) can be used to calculate the initial weight value of the associated node according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer ij :
[0065]
[0066] where N max represents the maximum value in the total number N j , j = 1…m, n ij represents the initial weight value of the i-th associated node in the j-th view layer in the view layer where it is located.
[0067] Among them, the number of view layers is configurable. For example, the user can configure it by inputting layout instructions. After the user determines to expand a node and selects its expansion level as level 5, it means that the upper and lower 5-level associated nodes of the expanded node can be found according to the hierarchical relationship. Then the number of configured view layers is 11 layers. It can be understood that the expanded node automatically forms a view layer. Thus, it can be seen that the configured number of view layers is the maximum number of view layers, and the actual number of view layers is related to the associated nodes of the expanded node determined according to the hierarchical relationship.
[0068] When arranging the associated nodes at the same level in the same view layer, the initial positions of the respective associated nodes in the view layer are random, and the resulting hierarchical relationship diagram may be as Figure 3 shown, or may be as Figure 4 shown, that is, the connection lines between the associated nodes in adjacent view layers may cross each other. When the number of associated nodes in the view layer is relatively large, such cross connections may be numerous, which is not conducive to clearly showing the hierarchical relationship between the nodes.
[0069] In order to minimize the cross connections between adjacent view layers as much as possible and more clearly show the hierarchical relationship between the nodes, in this embodiment, the final weight value of the associated node is calculated according to the hierarchical relationship of the associated nodes, and the layout position of the associated node in its view layer is determined according to the final weight value. Taking Figure 4 as an example, first determine the view layer with the largest total number of associated nodes in each view layer. In Figure 4 it is the view layer with a layer value of -2.
[0070] Then, the initial weight value of each associated node in Figure 4 can be calculated using the calculation formula (1). That is, the initial weight value of B3 is 1, the initial weight value of B4 is 2, the initial weight value of B1 is 3, the initial weight value of B2 is 4, the initial weight value of A1 is 2, the initial weight value of A2 is 4, the initial weight value of C1 is 1, the initial weight value of C2 is 2, and the initial weight value of C3 is 3. It can be understood that the concept of the initial weight value is used to determine the layout positions of the respective associated nodes in the same view layer. Therefore, in the process of generating the node layout diagram, for the expanded node, there is only its own node in its view layer. Therefore, its initial weight value can be calculated according to the calculation formula (1), or a special initial weight value can be set for it. For example, the initial weight value of the expanded node is set to 0. Here, the initial weight value of the expanded node O is 4 for illustration.
[0071] Then, according to the parent-child relationships of each associated node, add its own initial weight value to the initial weight values of its parent node and / or child nodes to obtain its final weight value. Here, the final weight value of B3 is 5, the final weight value of B4 is 6, the final weight value of B1 is 7, the final weight value of B2 is 8, the final weight value of A1 is 13, the final weight value of A2 is 11, the final weight value of C1 is 5, the final weight value of C is 6, and the final weight value of C3 is 7.
[0072] After calculating the final weight value of each associated node, according to the final weight values of each associated node, sort the associated nodes in ascending order in the view layer where it is located, and then according to the sorting result, determine the layout position of the associated node in the view layer where it is located.
[0073] After sorting Figure 4 each of the associated nodes in according to its final weight value, it can be found that the layout positions of each associated node have changed compared with their initial positions. The result after rearrangement according to the layout positions of the associated nodes is as shown in Figure 5 shown. Figure 5 Compared with Figure 4 , in the view layer with layer value -1, since the final weight value of associated node A1 is greater than that of A2, the layout positions of A1 and A2 have changed compared with their initial positions, making the connection line between the view layer with layer value -2 and the view layer with layer value -1 non-crossing, which is beneficial to more clearly display the hierarchical relationship between nodes.
[0074] It is worth mentioning that when sorting the associated nodes according to the final weight values of each associated node, the sorting rule can be in ascending order or in descending order. In addition, using the calculation formula (1) to calculate the initial weight value of the associated node is only a simple and feasible method provided in this embodiment, and other methods can also be adopted to calculate the initial weight values of each associated node in the view layer. For example, set the initial weight value of the first associated node in each view layer to 0, and set the initial weight value of the last associated node to N max , and at the same time, the initial weight values of other associated nodes in this view layer are arranged in an arithmetic progression in the interval (0, N max ). Taking the view layer with layer value 1 in Figure 4 as an example, set the initial weight value of C1 to 0 and the initial weight value of C3 to 4, then the initial weight value of C2 is 2.
[0075] In addition, when N maxWhen the value is large, for a view layer with a small number of associated nodes, when setting the initial weight values of the associated nodes it contains, the uniform centering principle can be adopted. The uniform centering principle means that the absolute value of the difference between the initial weight values of every two adjacent associated nodes is equal, and the absolute value of the difference between the initial weight values of adjacent associated nodes is close to or equal to N max / (N j +1), and when the number of associated nodes in this view layer is odd, make the initial weight value of the associated node at the middle position of the view layer close to or equal to N max / 2. When the number of associated nodes in this view layer is even, make the average value of the initial weight values of the two associated nodes at the middle position of the view layer close to or equal to N max / 2. For example, when N max = 100, for a view layer that only contains two associated nodes (M1 and M2), the initial weight value of M1 can be set to 35, and the initial weight value of M2 can be set to 70. Or the initial weight value of M1 can be set to 30, and the initial weight value of M2 can be set to 70. This way of setting the initial weight values makes the initial weight values of each associated node in the view layer with fewer associated nodes more evenly distributed. Then the differences between the final weight values of each associated node mainly come from the initial weight values of their respective parent nodes and / or child nodes. Then when determining the layout positions of the associated nodes, it is more likely to arrange the associated nodes at the positions corresponding to their parent nodes and / or child nodes. For example, when the parent node and child node of M1 are respectively at the bottom of the view layer where it is located, the initial weight values of the parent node and child node of M1 are both large. Since the initial weight values of M1 and M2 are more evenly distributed, that is, the difference between the two is small, so the final weight value of M1 is easily greater than the final weight value of M2. Therefore, arranging M1 at the bottom of the view layer where it is located, when M1 is connected to its parent node and child node, it will not cross the connection line corresponding to M2. Thus, it is beneficial to more clearly display the hierarchical relationship between the nodes.
[0076] Step S105: Generate a node layout diagram corresponding to the expanded node according to the formed at least one view layer and the layout positions of the associated nodes in the view layer where they are located.
[0077] Optionally, after sorting the associated nodes in the view layer according to the final weight values, the maximum value N j in N maxThe corresponding target view layer; determine the perpendicular bisector of the target view layer, wherein the associated nodes in the target view layer are symmetrically arranged with respect to the perpendicular bisector; according to the layout positions of the associated nodes in their respective view layers, symmetrically arrange the associated nodes in their respective view layers with respect to the perpendicular bisector; generate a node layout diagram corresponding to the expansion node according to the arranged view layer.
[0078] Take Figure 5 as an example, the view layer with a layer value of -2 can be determined as the target view layer, then the perpendicular bisector of the target view layer is determined, and the associated nodes in other view layers are symmetrically arranged with respect to the determined perpendicular bisector. When arranging, the order of the associated nodes in the view layer remains unchanged. The arrangement result is as shown in Figure 6 As shown, taking the arranged positions of each associated node as their layout positions can make the distribution of each associated node and the expansion node more uniform, and the generated node layout diagram is more beautiful, which is beneficial to more clearly display the hierarchical relationship between the nodes.
[0079] Optionally, after generating the node layout diagram as shown in Figure 6 it is also possible to adjust the layout of the associated nodes and the expansion node in the node layout diagram according to the display template where the node layout diagram is located. For example, the midline of the display template can be determined first. This midline is parallel to the view layer, and then each view layer is symmetrically arranged with respect to the determined midline to form a node layout diagram as shown in Figure 7 As shown, that is, the node layout diagram is centered with respect to the display template, so that the displayed node layout diagram is clearer and more beautiful, which is beneficial to improving the user experience.
[0080] Optionally, after generating the node layout diagram corresponding to the expansion node according to the at least one view layer and the layout positions of the associated nodes in their respective view layers, it further includes: determining a target node selected from the node layout diagram; taking the target node as the expansion node, and generating an extended layout diagram corresponding to the target node by using the method described in any of the above embodiments; combining the extended layout diagram with the node layout diagram, and outputting the combined node layout diagram.
[0081] For example, when the view node layout system displays a view layout diagram as shown in Figure 7 the user can select A1 as the target node from the view layout diagram, then take A1 as the expansion node, and continue to determine the associated nodes of A1. For example, it is determined that in addition to O, the child nodes of A1 also include P, and P also has child nodes C4 and C5. Then O, P, C4, and C5 are all associated nodes of A1. According to the hierarchical relationship, a diagram as shown in Figure 8The extended layout diagram shown. Then, according to the aforementioned layer value setting method, determine the layer values of each associated node. Since the layer value of A1 is -1, the layer value of its child node P is -1 + 1 = 0. Thus, P and O can be arranged in the same view layer. Additionally, C4 and C5 are child nodes of P, so the layer values of C4 and C5 are 1. Therefore, C4 and C5 can be arranged in the view layer where C1, C2, and C3 are located to combine the extended layout diagram with the node layout diagram to form the combined node layout diagram. In this way, when expanding the generated node layout diagram, the extended layout diagram can be quickly arranged according to the view layers and the layer values of the view layers in the generated node layout diagram, facilitating the quick identification of the expanded nodes. Additionally, the target view layer and the perpendicular bisector corresponding to the target view layer can be re-determined, and each associated node and expanded node in the combined node layout diagram can be adjusted according to the midline of the display template (as Figure 9 shown), to make the output combined node layout diagram more aesthetically pleasing.
[0082] Next, taking the example where the expanded node corresponds to two levels of hierarchical relationships and there is at least one associated node in each level, that is, the associated nodes of the expanded node are at least one parent node, the parent node's parent node, at least one child node, and the child node's child node, the view node layout method provided by the embodiments of the present invention will be described in detail. As Figure 10 shown, the method for view node layout may include the following steps:
[0083] Step S1001: Determine the expanded node according to the layout instruction.
[0084] Step S1002: Determine at least one parent node and at least one child node of the expanded node according to the hierarchical relationship, and arrange the at least one parent node on the left side of the expanded node to form a first view layer, and arrange the at least one child node on the right side of the expanded node to form a second view layer.
[0085] Step S1003: Select an unselected parent node from the at least one parent node as the current parent node.
[0086] Step S1004: Determine whether there is a parent node of the current parent node according to the hierarchical relationship. If so, execute Step S1005; otherwise, execute Step S1006.
[0087] Step S1005: Arrange the parent node of the current parent node on the left side of the first view layer, and execute Step S1006.
[0088] Step S1006: Determine whether there is an unselected parent node among the at least one parent node. If so, execute Step S1003; otherwise, execute Step S1007.
[0089] Step S1007: Form a third view layer based on the associated nodes arranged on the left side of the first view layer.
[0090] Step S1008: Select an unselected child node from the at least one child node as the current child node.
[0091] Step S1009: Determine whether there are child nodes of the current child node according to the hierarchical relationship. If so, execute Step S1010; otherwise, execute Step S1011.
[0092] Step S1010: Arrange the child nodes of the current child node on the right side of the second view layer and execute Step S1011.
[0093] Step S1011: Determine whether there are unselected child nodes among the at least one child node. If so, execute Step S1008; otherwise, execute Step S1012.
[0094] Step S1012: Form a fourth view layer based on the associated nodes arranged on the right side of the second view layer.
[0095] Step S1013: Respectively determine the total number of associated nodes in the first view layer, the second view layer, the third view layer, and the fourth view layer, and determine the target view layer with the largest total number of associated nodes.
[0096] Step S1014: Calculate the initial weight value of each associated node according to the total number of associated nodes in each view layer and the initial position of each associated node in its view layer.
[0097] Step S1015: Add the initial weight value of the associated node to the initial weight value of its parent node and / or the initial weight value of its child node to obtain the final weight value of the associated node.
[0098] It can be understood that when there are both the parent node and the child node of the associated node, the final weight value of the associated node is the sum of its own initial weight value, the initial weight value of the parent node, and the initial weight value of the child node. When there is only the parent node of the associated node or only the child node of the associated node, the final weight value of the associated node is the sum of its own initial weight value and the initial weight value of the parent node (when there is only the parent node of the associated node), or the sum of its own initial weight value and the initial weight value of the child node (when there is only the child node of the associated node).
[0099] Step 1016: Sort the associated nodes in ascending order in their view layers according to the final weight values of the respective associated nodes, and determine the layout positions of the associated nodes in their view layers according to the sorting results.
[0100] Step S1017: Generate a node layout diagram corresponding to the expanded node according to the first view layer, the second view layer, the third view layer, the fourth view layer, and the layout position of the associated node in the view layer where it is located.
[0101] As Figure 11 shown, an embodiment of the present invention provides a system 1100 for view node layout, including: a node determination module 1101, a view layer formation module 1102, a position determination module 1103, and a layout diagram generation module 1104; wherein,
[0102] The node determination module 1101 is configured to determine an expanded node according to a layout instruction, and determine at least one associated node associated with the expanded node according to a hierarchical relationship, where the hierarchical relationship indicates nodes included in a hierarchy;
[0103] The view layer formation module 1102 is configured to arrange the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes at the same level in the hierarchical relationship are arranged in the same view layer;
[0104] The position determination module 1103 is configured to determine the layout position of the associated node in the view layer where it is located according to the hierarchical relationship;
[0105] The layout diagram generation module 1104 is configured to generate a node layout diagram corresponding to the expanded node according to the formed at least one view layer and the layout position of the associated node in the view layer where it is located.
[0106] Optionally, the view layer formation module 1102 is configured to find a parent node and / or a child node of the expanded node from the at least one associated node according to the hierarchical relationship, and arrange the parent node on the first side of the expanded node, where the parent nodes at the same level are arranged in one view layer, and arrange the child node on the second side of the expanded node, where the child nodes at the same level are arranged in one view layer.
[0107] Optionally, the view layer formation module 1102 includes: a processing unit, a parent node arrangement unit, and a child node arrangement unit; wherein,
[0108] The processing unit is configured to find a parent node of the expanded node from the parent nodes according to the hierarchical relationship, find a child node of the expanded node from the child nodes, and arrange the parent node on the first side of the expanded node; arrange the child node on the second side of the expanded node;
[0109] The parent node arrangement unit is configured to use the parent node as the current parent node and repeatedly execute the following steps until the parent node of the current node cannot be found: find the parent node of the current parent node, arrange the parent node of the current parent node on the first side of the current parent node, and use the parent node of the current parent node as the current parent node.
[0110] The child node arrangement unit is configured to use the child node as the current child node and repeatedly execute the following steps until the child node of the current child node cannot be found: find the child node of the current child node, arrange the child node of the current child node on the second side of the current child node, and use the child node of the current child node as the current child node.
[0111] Optionally, the position determination module 1103 is configured to determine the parent node and / or child node of the associated node according to the hierarchical relationship, and determine the layout position of the associated node in the view layer where it is located according to the initial position of the associated node in the view layer where it is located and the initial positions of the parent node of the associated node and / or the child node of the associated node in the view layer where they are located.
[0112] Optionally, the position determination module 1103 includes: an initial weight value calculation unit, a final weight value determination unit, and a layout position determination unit; where
[0113] The initial weight value calculation unit is configured to calculate the initial weight value of the associated node according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer ij , where j = 1...m, i = 1…N j , and m is the number of view layers.
[0114] The final weight value determination unit is configured to determine the final weight value of the associated node according to the initial weight value of the associated node and the initial weight value of the parent node of the associated node and / or the initial weight value of the child node of the associated node.
[0115] The layout position determination unit is configured to determine the layout position of the associated node in the view layer where it is located according to the final weight value of the associated node.
[0116] Optionally, the initial weight value calculation unit is configured to use the following calculation formula to calculate the initial weight value of the associated node according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer ij :
[0117]
[0118] Among them, N max represents the maximum value of the total quantity N j where j = 1...m, n ij represents the initial weight value of the i-th associated node in the j-th view layer in the view layer where it is located.
[0119] Optionally, the layout position determination unit is configured to sort the associated nodes in the view layer where they are located from small to large according to the final weight value of the associated nodes, and determine the layout position of the associated nodes in the view layer where they are located according to the sorting result.
[0120] Optionally, the layout position determination unit is configured to determine the total quantity N j the maximum value N in max the corresponding target view layer, determine the vertical bisector of the target view layer, where the associated nodes in the target view layer are symmetrically arranged with respect to the vertical bisector, and symmetrically arrange the associated nodes in the view layer where they are located with respect to the vertical bisector according to the layout position of the associated nodes in the view layer where they are located; generate a node layout diagram corresponding to the expanded node according to the arranged view layer.
[0121] Optionally, the layout diagram generation module 1104 is further configured to determine a target node selected from the node layout diagram, use the target node as the expanded node, trigger the view layer formation module and the position determination module to generate an extended layout diagram corresponding to the target node, combine the extended layout diagram with the node layout diagram, and output the combined node layout diagram.
[0122] An embodiment of the present invention further provides a server for view node layout, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the method provided in any of the above embodiments.
[0123] An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method provided in any of the above embodiments.
[0124] Figure 12 An exemplary system architecture 1200 is shown that can apply the view node layout method or the view node layout system of the embodiments of the present invention.
[0125] Such as Figure 12As shown, the system architecture 1200 may include terminal devices 1201, 1202, 1203, a network 1204, and a server 1205. The network 1204 is used to provide a medium for communication links between the terminal devices 1201, 1202, 1203 and the server 1205. The network 1204 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0126] Users can use the terminal devices 1201, 1202, 1203 to interact with the server 1205 through the network 1204 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 1201, 1202, 1203, such as web browser applications, search applications, instant messaging tools, and email clients, etc.
[0127] The terminal devices 1201, 1202, 1203 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, and desktop computers, etc.
[0128] The server 1205 may be a server providing various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 1201, 1202, 1203. The background management server may analyze and process data such as product information query requests received, and feedback the processing results (node layout diagrams) to the terminal devices.
[0129] It should be noted that the method for view node layout provided in the embodiments of the present invention is generally executed by the server 1205. Correspondingly, the system for view node layout is generally set in the server 1205.
[0130] It should be understood that Figure 12 the numbers of terminal devices, networks, and servers in
[0131] are merely illustrative. According to the implementation requirements, there may be any number of terminal devices, networks, and servers. Figure 13 The following refers to Figure 13 which shows a schematic structural diagram of a computer system 1300 of a terminal device suitable for implementing the embodiments of the present invention.
[0132] As shown in Figure 13As shown, computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage section 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the system 1300 are also stored. The CPU 1301, ROM 1302, and RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.
[0133] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read from it can be installed into the storage section 1308 as needed.
[0134] Specifically, according to an embodiment disclosed by the present invention, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment disclosed by the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1309, and / or installed from the removable medium 1311. When the computer program is executed by the central processing unit (CPU) 1301, the above functions defined in the system of the present invention are executed.
[0135] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in a block may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and the combination of blocks in a block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0137] The modules and / or units involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules and / or units can also be provided in a processor. For example, it can be described as: a processor includes a node determination module, a view layer formation module, a position determination module, and a layout diagram generation module. Among them, the names of these modules do not constitute a limitation to the module itself in some cases. For example, the position determination module can also be described as "a module for determining the layout position of the associated node in the view layer where it is located according to the hierarchical relationship".
[0138] As another aspect, the present invention also provides a computer-readable medium. This computer-readable medium can be included in the device described in the above embodiments; or it can exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the device includes: determining an expansion node according to a layout instruction; determining at least one associated node associated with the expansion node according to a hierarchical relationship, where the hierarchical relationship indicates the nodes included in the hierarchy; arranging the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes at the same level in the hierarchical relationship are arranged in the same view layer; determining the layout position of the associated node in the view layer where it is located according to the hierarchical relationship; and generating a node layout diagram corresponding to the expansion node according to the formed at least one view layer and the layout position of the associated node in the view layer where it is located.
[0139] According to the technical solution of the embodiments of the present invention, after determining the expansion node according to the layout instruction, determine the associated nodes associated with the expansion node according to the hierarchical relationship, then arrange the associated nodes at the same level in the hierarchical relationship in one view layer, and determine the layout position of the associated node in the view layer where it is located according to the hierarchical relationship. Finally, generate a node layout diagram corresponding to the expansion node according to the formed view layer and the layout position of the associated node in the view layer where it is located. It can be seen from this that the same view layer in the generated node layout diagram is the associated nodes at the same level, and the layout positions of the associated nodes in the view layer are also arranged according to the hierarchical relationship, so that the node layout diagram can clearly show the hierarchical relationship between the nodes and make the node distribution uniform. When the node layout diagram is expanded, the expanded nodes can be quickly identified.
[0140] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for view node layout, characterized in that, including: determining an expansion node according to a layout instruction; determining at least one associated node associated with the expansion node according to a hierarchical relationship, where the hierarchical relationship indicates the nodes included in each level; arranging the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes at the same level in the hierarchical relationship are arranged in the same view layer; Determine the layout position of the associated node in the view layer where it is located according to the hierarchical relationship, including: determining the parent node and / or child node of the associated node according to the hierarchical relationship; according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer in the view layer where it is located ij , where j = 1...m, i = 1…N j , m is the number of view layers, calculate the initial weight value of the associated node; determine the final weight value of the associated node according to the initial weight value of the associated node and the initial weight value of the parent node of the associated node and / or the initial weight value of the child node of the associated node; determine the layout position of the associated node in the view layer where it is located according to the final weight value of the associated node; generating a node layout diagram corresponding to the expansion node according to the formed at least one view layer and the layout positions of the associated nodes in the view layers where they are located.
2. The method according to claim 1, wherein the arranging the at least one associated node according to the hierarchical relationship to form at least one view layer includes: finding a parent node and / or a child node of the expansion node from the at least one associated node according to the hierarchical relationship; arranging the parent nodes on a first side of the expansion node, where the parent nodes at the same level are arranged in one view layer; arranging the child nodes on a second side of the expansion node, where the child nodes at the same level are arranged in one view layer.
3. The method according to claim 2, wherein the arranging the at least one associated node according to the hierarchical relationship to form at least one view layer includes: finding a parent node of the expansion node from the parent nodes according to the hierarchical relationship, and finding a child node of the expansion node from the child nodes; arranging the parent node on the first side of the expansion node and performing S1, arranging the child node on the second side of the expansion node and performing S2; S1: taking the parent node as the current parent node, and repeatedly performing the following steps until no parent node of the current parent node is found: finding the parent node of the current parent node, arranging the parent node of the current parent node on the first side of the current parent node, and taking the parent node of the current parent node as the current parent node; S2: taking the child node as the current child node, and repeatedly performing the following steps until no child node of the current child node is found: finding the child node of the current child node, arranging the child node of the current child node on the second side of the current child node, and taking the child node of the current child node as the current child node.
4. The method according to claim 1, wherein Use the following calculation formula to calculate the initial weight value of the associated node according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer ij , as follows: Among them, N max represents the maximum value of the total quantity N j where j = 1...m, n ij represents the initial weight value of the i-th associated node in the j-th view layer within the view layer where it is located.
5. The method according to claim 1, wherein the determining the layout positions of the associated nodes in the view layers where they are located according to the final weight values of the associated nodes includes: sorting the associated nodes in the view layers where they are located from small to large according to the final weight values of the associated nodes; determining the layout positions of the associated nodes in the view layers where they are located according to the sorting result.
6. The method according to claim 1, wherein the generating the node layout diagram corresponding to the expansion node according to the formed at least one view layer and the layout positions of the associated nodes in the view layers where they are located includes: Determine the total quantity N j The maximum value N max The corresponding target view layer; Determine the perpendicular bisector of the target view layer, where the associated nodes in the target view layer are symmetrically arranged with respect to the perpendicular bisector; According to the layout positions of the associated nodes in their respective view layers, symmetrically arrange the associated nodes in their respective view layers with respect to the perpendicular bisector; Generate a node layout diagram corresponding to the expanded node according to the arranged view layer.
7. The method according to claim 1, wherein, After generating the node layout diagram corresponding to the expanded node according to the at least one view layer and the layout positions of the associated nodes in their respective view layers, further comprising: Determine a target node selected from the node layout diagram; Use the target node as the expanded node, and generate an extended layout diagram corresponding to the target node by using the method described in claim 1; Combine the extended layout diagram with the node layout diagram, and output the combined node layout diagram.
8. A system for view node layout, characterized in that, Comprising: A node determination module, a view layer formation module, a position determination module, and a layout diagram generation module; wherein, The node determination module is configured to determine an expanded node according to a layout instruction, and determine at least one associated node that is associated with the expanded node according to a hierarchical relationship, where the hierarchical relationship indicates the nodes included in each level; The view layer formation module is configured to arrange the at least one associated node according to the hierarchical relationship to form at least one view layer, where the associated nodes in the same level in the hierarchical relationship are arranged in the same view layer; The position determination module is configured to determine the layout position of the associated node in the view layer where it is located according to the hierarchical relationship, including: determining the parent node and / or child node of the associated node according to the hierarchical relationship; according to the total number N of the associated nodes in the j-th view layer j and the initial position a of the i-th associated node in the j-th view layer in the view layer where it is located ij , where j = 1...m, i = 1…N j , m is the number of view layers, calculate the initial weight value of the associated node; determine the final weight value of the associated node according to the initial weight value of the associated node and the initial weight value of the parent node of the associated node and / or the initial weight value of the child node of the associated node; determine the layout position of the associated node in the view layer where it is located according to the final weight value of the associated node; The layout diagram generation module is configured to generate a node layout diagram corresponding to the expanded node according to the formed at least one view layer and the layout positions of the associated nodes in their respective view layers.
9. A server for view node layout, characterized in that, Comprising: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, The program, when executed by a processor, implements the method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and device for analyzing layout of flow chart
CN103473265A
System and device capable of realizing automatic layout of flow chart
CN103473388A