Relationship graph updating method, device, computing device and storage medium

By generating update instructions to adjust the visual status of nodes in the relationship graph, the problem of poor interface cleanliness caused by too many nodes in the relationship graph is solved, and the user experience is improved.

CN114138984BActive Publication Date: 2024-10-11HARBIN ANTIY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111490373.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2024-10-11
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

The large number of node connections in the relationship graph results in poor cleanliness of the visual interface and the inability to clearly identify the node connections, which affects the user experience.

Method used

Change the visualization status of the associated nodes of the target display node by generating update instructions, and adjust the number of display nodes in the relationship graph, such as by shrinking or expanding the node hierarchy, to optimize the visualization status of the graph.

Benefits of technology

Improved user experience, made the interface cleaner by reducing the number of nodes, and enhanced the recognizability of node connection relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138984B_ABST
    Figure CN114138984B_ABST
Patent Text Reader

Abstract

The present invention provides a relationship graph update method, device, computing device and storage medium, wherein the method comprises: obtaining an update instruction for a target display node in a currently displayed relationship graph; determining a target level corresponding to the target display node according to information of at least one level carried by the update instruction; determining an associated node that needs to change its visualization state according to the target level; and changing the visualization state of the associated node to update the number of displayed nodes in the relationship graph. This solution can improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a relationship graph updating method, apparatus, computing device, and storage medium. Background Art

[0002] The visualization of relationship graphs is a specific application of graph data. When there are a large number of node connections in the relationship graph, there will be problems such as poor cleanliness of the visualization interface of the relationship graph, inability to clearly identify the node connections, and affecting the further drawing of the graph, resulting in a poor user experience. Summary of the invention

[0003] Based on the problem that the existing relationship graph leads to poor user experience during the visualization process, the embodiments of the present invention provide a relationship graph updating method, apparatus, computing device and storage medium, which can improve the user experience.

[0004] In a first aspect, an embodiment of the present invention provides a relationship graph updating method, comprising:

[0005] Get the update instruction for the target display node in the currently displayed relationship graph;

[0006] Determining a target level corresponding to the target display node according to information of at least one level carried by the update instruction;

[0007] Determine, according to the target level, the associated nodes whose visualization states need to be changed;

[0008] The visualization state of the associated nodes is changed to update the number of nodes displayed in the relationship graph.

[0009] Preferably, the update instruction is a shrink instruction; the at least one level of information carried by the update instruction is the number of levels that need to be shrunk;

[0010] The determining, according to the information of at least one level carried by the update instruction, a target level corresponding to the target display node includes:

[0011] The levels in the currently displayed relationship graph that are equal in number to the levels and closest to the target display node are determined as target levels.

[0012] Preferably, determining the associated nodes that need to change the visualization state according to the target level includes:

[0013] Determine whether there is a collection node among the nodes of the target level; the collection node is a node under which there is a contraction;

[0014] If so, determine the first target level corresponding to the collection node in the target level that is closest to the target display node; determine the nodes included in the second target level as the associated nodes; the second target level is a target level whose distance from the target display node is less than that of the first target level.

[0015] Preferably, the changing the visualization state of the associated node includes:

[0016] The associated node is collapsed under the target display node, and the visualization state of the associated node is changed from a display state to a hidden state.

[0017] Preferably, the update instruction is an expansion instruction; the at least one level of information carried by the update instruction is the level of the level to be expanded;

[0018] The determining, according to the information of at least one level carried by the update instruction, a target level corresponding to the target display node includes:

[0019] Among the hierarchies corresponding to the nodes collapsed under the target display node, the hierarchy corresponding to the hierarchical level is determined as the target hierarchy.

[0020] Preferably, the hierarchy level is within a set hierarchy range, and the hierarchy level may be equal to an endpoint value constituting the hierarchy range;

[0021] The minimum endpoint value of the hierarchical range is the minimum hierarchical level in each hierarchical level corresponding to the nodes collapsed under the target display node;

[0022] The maximum endpoint value of the hierarchical range is the maximum hierarchical level in each hierarchy corresponding to the nodes collapsed under the target display node.

[0023] Preferably, the changing the visualization state of the associated node includes:

[0024] According to the target level, all nodes on the designated level that are collapsed under the target display node are expanded from under the target display node; the designated level includes the target level;

[0025] The designated levels other than the target level in the expanded designated levels are collapsed, and the visualization state of the associated nodes is changed from a hidden state to a displayed state.

[0026] Preferably, the designated levels are all levels collapsed under the target display node;

[0027] The step of shrinking the designated levels other than the target level in the expanded designated levels includes:

[0028] Shrinking nodes located at a level between the target display node and the minimum target level to below the target display node;

[0029] For any two adjacent target levels, the nodes located at the level between the two adjacent target levels are collapsed to the associated nodes of the smaller target level among the two adjacent target levels;

[0030] The nodes whose node levels are shrunk under the target expansion node and are greater than the maximum target level are shrunk to the associated nodes of the maximum target level.

[0031] In a second aspect, an embodiment of the present invention further provides a relationship graph updating device, including:

[0032] An update instruction acquisition unit, used to acquire an update instruction for a target display node in a currently displayed relationship graph;

[0033] a target level determination unit, configured to determine a target level corresponding to the target display node according to information of at least one level carried by the update instruction;

[0034] An associated node determination unit, configured to determine, according to the target level, associated nodes that require a visualization state change;

[0035] The relationship graph updating unit is used to change the visualization state of the associated nodes to update the number of displayed nodes in the relationship graph.

[0036] In a third aspect, an embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0037] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0038] The embodiment of the present invention provides a relationship map update method, device, computing device and storage medium. The user can generate an update instruction for the target display node in the currently displayed relationship map according to the needs, so as to change the visualization state of the associated nodes of the target display node through the update instruction, thereby updating the number of display nodes in the relationship map. It can be seen that when the number of nodes in the relationship map is large, the relationship map can be made to display only part of the nodes according to the needs, so as to make the visualization interface neater and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a flow chart of a relationship graph updating method provided by an embodiment of the present invention;

[0041] Figure 2 It is a schematic diagram of a relationship map provided by an embodiment of the present invention;

[0042] Figure 3 An embodiment of the present invention provides a Figure 2 A schematic diagram of the relationship map obtained after the update;

[0043] Figure 4 is another relationship diagram provided by an embodiment of the present invention;

[0044] Figure 5 is a hardware architecture diagram of a computing device provided by an embodiment of the present invention;

[0045] Figure 6 It is a structural diagram of a relationship graph updating device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] As mentioned above, visualization of relationship graphs is a specific application of graph data. Multiple nodes are connected by edges to form a visualized relationship graph. The relationship between nodes can be analyzed by using the point-line relationship displayed in the relationship graph. However, when there are a large number of point-line relationships in the relationship graph, the visualization interface of the relationship graph will be less neat, the node connection relationship cannot be clearly identified, and the further drawing of the graph will be affected, which will have a poor user experience. You can consider changing the number of nodes displayed in the relationship graph to adjust which point-line relationships are displayed or hidden.

[0048] The specific implementation of the above concept is described below.

[0049] Please refer to Figure 1 , an embodiment of the present invention provides a relationship graph updating method, the method comprising:

[0050] Step 100: Obtain an update instruction for a target display node in the currently displayed relationship graph.

[0051] Step 102: Determine a target level corresponding to the target presentation node according to information of at least one level carried in the update instruction.

[0052] Step 104: determining, according to the target level, associated nodes that require a visualization state change.

[0053] Step 106, changing the visualization state of the associated nodes to update the number of nodes displayed in the relationship graph.

[0054] In the embodiment of the present invention, the user can generate an update instruction for a node currently displayed in the relationship map according to the needs, so as to change the visualization state of the associated nodes of the target display node through the update instruction, thereby updating the number of nodes displayed in the relationship map. It can be seen that when the number of nodes in the relationship map is large, the relationship map can be made to display only some nodes according to the needs, so as to make the visualization interface neater and improve the user experience.

[0055] Described below Figure 1 How the various steps are performed.

[0056] First, with respect to step 100, an update instruction for a target display node in the currently displayed relationship graph is obtained.

[0057] In an embodiment of the present invention, a relationship graph may include a real relationship graph and a display relationship graph. The real relationship graph is composed of multiple nodes and the connections between the nodes; the display relationship graph is composed of display nodes and the connections between the display nodes, and the currently displayed relationship graph is the display relationship graph. Each node corresponds to an attribute parameter. By setting the attribute parameters of the node, the visualization state of the node can be changed, wherein the visualization state may include a hidden state and a display state. When there are nodes in the real relationship graph whose visualization state is the display state, the nodes whose visualization state is the display state are used as display nodes to form a display relationship graph, and the nodes whose visualization state is the hidden state are not visible in the display relationship graph.

[0058] The update instruction is generated for a certain display node in the display relationship graph, and the display node is called the target display node. When generating, the user can input the update instruction for a display node in the display relationship graph.

[0059] In order to update the relationship graph using the update instruction, the attribute parameters of the node are explained below.

[0060] Each node in the relationship graph can be configured with the following attribute parameters:

[0061] id: unique identifier of the node;

[0062] links: the set of all adjacent nodes directly connected to the node in the real relationship graph;

[0063] outlinks: the set of all adjacent nodes directly connected to the node in the displayed relationship graph;

[0064] contain: the set of contracted nodes contained under this node, where the set includes the node id and the node's hierarchical level;

[0065] containlevel: the number of levels to be contracted under this node. If there is no contraction node under this node, it is 0;

[0066] contracted: used to indicate whether the node is contracted. If so, the value is the id of the node to which it is contracted. Otherwise, the value is False.

[0067] set: used to indicate whether the node is a set node. If so, the value is the number of nodes contained under the node (including the sum of the number of nodes under the node and the nodes contracted under the node). Otherwise, the value is 1.

[0068] It should be noted that the topological structure corresponding to the relationship graph of the embodiment of the present invention can be a tree structure, a star structure, a mesh structure, etc. And for a certain target node in the relationship graph, the adjacent node directly connected to the target node is called a first-level node, and the level of the first-level node is the first level; the node directly connected to the first-level node of the target node (except the target node) is called a second-level node, and the level of the second-level node is the second level; the node directly connected to the second-level node of the target node (except the first-level node of the target node) is called a third-level node, and the level of the third-level node is the third level... and so on, the nodes of each level of the target node can be obtained.

[0069] Then, step 102 "determine the target level corresponding to the target display node according to the information of at least one level carried by the update instruction", step 104 "determine the associated nodes that need to change the visualization state according to the target level" and step 106 "change the visualization state of the associated nodes to update the number of display nodes in the relationship graph" are explained at the same time.

[0070] In the embodiment of the present invention, the update instruction can be two operations, one operation is to perform a node contraction operation on one or more nodes in the display relationship graph, and the other operation is to perform a node expansion operation on the contracted nodes under a certain set node in the display relationship graph. Therefore, the update instruction can include a contraction instruction and an expansion instruction.

[0071] In order to better describe the implementation process of the above two update instructions, the two update instructions are explained separately below.

[0072] 1. The update instruction is a shrink instruction.

[0073] In one embodiment of the present invention, when the update instruction is a shrink instruction, the information of at least one level carried by the update instruction is the number of levels that need to be shrunk. When the number of levels is 1, it indicates that one level is shrunk, and when the number of levels is greater than 1, it indicates that multiple levels are shrunk. It should be noted that when multiple levels need to be shrunk, the multiple levels are continuous levels, and the continuous levels include one level.

[0074] Therefore, step 102 may include: determining the levels in the currently displayed relationship graph that are equal in number to the levels and closest to the target display node as target levels.

[0075] It should be noted that the levels that need to be shrunk for the shrinking instruction are determined based on the connection relationship in the display relationship graph.

[0076] For example, see Figure 2 , is a schematic diagram of an exemplary display relationship graph, in which the node identifiers of the display nodes currently displayed in the display relationship graph are 1, 2, 3, ..., 10 respectively. If the shrink instruction is generated for the target display node 7, the information of at least one level carried is that the number of levels to be shrunk is 2, and the shrink instruction is for the target display node 7, and shrinks the display nodes of the first and second levels of the level.

[0077] After the target level is determined, in step 104, under different conditions, the manner of determining the associated nodes that need to change the visualization state according to the target level is different. The condition can be at least the following two:

[0078] Condition 1: Regardless of whether the target level includes a collection node, the collection node can be shrunk.

[0079] Condition 2: Consider whether the target level includes a collection node. The collection node cannot be shrunk.

[0080] The following describes the determination method of step 104 for the above two conditions respectively.

[0081] Under the following condition, this step 104 may include: determining all nodes included in the target level as associated nodes.

[0082] Under the following condition, this step 104 can determine the associated nodes through the attribute parameters of each node, specifically including: according to the outlinks attribute parameter of the node, determining the nodes at each level of the target display node in the display relationship graph layer by layer until the level of the determined node is equal to the number of levels carried by the shrink instruction.

[0083] Continuing with the above example, according to the outlinks attribute parameter of the target display node 7, the first-level nodes 5 and 9 of the target display node 7 in the display relationship map are determined, and then according to the outlinks attribute parameter of the first-level nodes 5 and 9, the second-level nodes 4, 8, and 10 of the target display node in the display relationship map are determined. At this time, the level of the node is the second level, which is equal to the number of levels 2, so the determination process ends. The determined nodes at all levels are determined as associated nodes, recorded as the next set, and the next set includes the following associated nodes: 5, 9, 4, 8, and 10.

[0084] Under condition 2, before determining the associated node in step 104, it is also necessary to determine whether the current setting is one of the following settings:

[0085] The first setting: nodes on target levels greater than the first target level are not shrunk. The first target level is the level corresponding to the collection node closest to the target display node in the target level.

[0086] The second setting: do not shrink the collection nodes.

[0087] Under condition two, if the current setting is the first setting, this step 104 may include: determining whether there is a collection node in the nodes of the target level; the collection node is a node under which there is a contraction; if so, determining the first target level corresponding to the collection node in the target level that is closest to the target display node; determining the nodes included in the second target level as the associated nodes; the second target level is a target level whose distance from the target display node is less than that of the first target level.

[0088] It should be noted that the distance between the hierarchical level and the target display node has nothing to do with the physical distance, but is related to the number of nodes between the nodes included in the hierarchical level and the target display node. The fewer the number of nodes, the closer the distance and the smaller the hierarchical level.

[0089] Under the first setting of condition 2, when determining whether there is a set node in the nodes of the target level, the process of determining all nodes of the target level is the same as the method of determining associated nodes in condition 1. Continuing with the above example, it can be obtained that the nodes of the target level are 5, 9, 4, 8, and 10. In this embodiment of the present invention, it can be determined whether a node is a set node by the set attribute parameter of the node. Assume Figure 2 The middle node 8 is a collection node, so it can be determined that the hierarchy level to which node 8 belongs is level two, that is, the second target level is level two, and the target level smaller than level two is determined as the second target level, that is, the second target level is level one, and the level one nodes 5 and 9 are determined as associated nodes, which are recorded as the next set.

[0090] Under condition 2, if the current setting is the second setting, this step 104 may include: according to the maximum target level in the target level, determining at least one link with the target display node as the starting point, wherein the level to which the node at the end of the link belongs is the maximum target level; for each link, executing: determining whether there is a collection node on the link; the collection node is a node under which there is a contraction, if so, determining the first target level corresponding to the collection node on the link that is closest to the target display node, determining the nodes on the link whose levels are less than the first target level as associated nodes, if not, determining all nodes on the link as associated nodes.

[0091] Continuing with the above example, we can identify three links, 7-9-10, 7-5-8, and 7-5-4. Figure 2 The middle node 8 is a collection node, so the associated nodes can be determined to be 5, 4, 9 and 10.

[0092] Regardless of the above condition 1 or condition 2, after determining the associated node, in one embodiment of the present invention, this step 106 may specifically include: shrinking the associated node to the target display node, and changing the visualization state of the associated node from the display state to the hidden state.

[0093] When shrinking the associated nodes to the target display node, the shrinking can be performed layer by layer in ascending order of the levels to which the associated nodes belong, or the associated nodes can be directly shrunk at once.

[0094] The visualization state includes a display state and a hidden state. Since the associated node is a display node in the display relationship graph, its visualization state is the display state before the change. At this time, the visualization state of the associated node can be changed from the display state to the hidden state.

[0095] When changing the visualization state of an associated node from a display state to a hidden state, this can be achieved by changing the attribute parameters of the associated node. Specifically, the attribute parameters of each associated node in the next set can be changed as follows: all adjacent nodes included in the outlinks attribute parameter of the associated node are deleted, and the value of the contracted attribute parameter of the associated node is changed to the id of the target display node.

[0096] In one embodiment of the present invention, in step 106, in order to update the number of nodes displayed in the relationship graph, the following steps may be performed: determining the nodes related to the change in the visualization state of the associated node, and modifying the attribute parameters of the related nodes. Specifically, the attribute parameters of the following related nodes need to be changed:

[0097] 1) Attribute parameters of non-associated nodes directly connected to the associated nodes at the highest level

[0098] Specifically, determine the associated node of the maximum hierarchical level in the next set, determine the non-associated node according to the outlinks attribute parameter of the associated node of the maximum hierarchical level, delete the associated nodes directly connected to it included in the outlinks attribute parameter of the non-associated node, and add the target display node to the outlinks attribute parameter of the non-associated node.

[0099] continue Figure 2 For example, among the associated nodes determined by the above condition 1, it can be determined that the non-associated nodes are 2 and 6, the associated node 4 is deleted from the outlinks attribute parameters of the display nodes 2 and 6, and the target display node 7 is added to the outlinks attribute parameters of the display nodes 2 and 6.

[0100] It should be noted that the change of the attribute parameters of the non-associated node needs to be implemented before the change of the outlinks attribute parameters of the associated node.

[0101] 2) Attribute parameters of the target display node

[0102] Add the associated nodes in the next collection to the contain attribute parameter of the target display node, add the number of associated nodes in the next collection to the set attribute parameter of the target display node, add the value of the containlevel attribute parameter of the target display node to the value of the maximum level in the next collection, delete each associated node in the next collection from the outlinks attribute parameter of the target display node, and add the non-associated nodes directly connected to the associated nodes of the maximum level to the outlinks attribute parameter of the target display node.

[0103] In one embodiment of the present invention, before the associated nodes are collapsed to the target display node, the display graph data of the display relationship map may be updated, and the display graph data includes a set of all display nodes and a set of display connections. After the update, the associated nodes are collapsed to the target display node using the updated display graph data. To facilitate subsequent expansion operations on the target display node, the number of collapsed levels and nodes under the target display node may be marked on the target display node.

[0104] Please refer to Figure 3 , for a pair of conditions Figure 2 The relationship map is updated and the relationship map is obtained. Figure 3 Before contraction Figure 2 By comparison, it can be seen that after contraction, the number of nodes displayed in the relationship graph is reduced, the connections are simpler, the connection relationship between nodes is clearer, and the user experience is better.

[0105] 2. Update the command to expand the command.

[0106] In one embodiment of the present invention, when the update instruction is an expand instruction, the at least one level of information carried by the update instruction is the level of the level that needs to be expanded.

[0107] Then, step 102 may include: in each level corresponding to the nodes collapsed under the target display node, determining the level corresponding to the level as the target level. For example, the levels to be expanded are 1 and 3, indicating that the nodes of the first level and the third level of the target display node need to be expanded, that is, the target levels are the first level and the third level of the target display node.

[0108] It should be noted that the levels that need to be expanded for the expansion instruction are determined based on the connection relationship in the real relationship graph.

[0109] In one embodiment of the present invention, in order to meet different needs of users, when it is necessary to expand a node, nodes on one or more hierarchical levels can be expanded. Moreover, the expanded hierarchical level is within a set hierarchical range, and the expanded hierarchical level can be equal to the endpoint value constituting the hierarchical range; wherein the minimum endpoint value of the hierarchical range is the minimum hierarchical level in each hierarchical level corresponding to the node collapsed under the target display node; and the maximum endpoint value of the hierarchical range is the maximum hierarchical level in each hierarchical level corresponding to the node collapsed under the target display node.

[0110] When determining the level range, it can be determined according to the attribute parameters of the target expansion node. Specifically, it can include: determining the value n of the containlevel attribute parameter of the target expansion node, where the value n is the number of levels collapsed under the target expansion node and is equal to the maximum level, that is, the value n is the maximum endpoint value of the level range. It can be understood that for a collection node, the minimum endpoint value of its level range is 1.

[0111] In one embodiment of the present invention, in order to ensure the normal execution of the expand instruction, before the expand instruction is generated, it is also possible to determine whether the hierarchy level to be expanded carried by the expand instruction is within the hierarchy range based on the containlevel attribute parameter of the target expansion node. If so, the expand instruction is executed, otherwise an error is reported.

[0112] After the target level is determined, this step 104 may include: determining the nodes on the target level as associated nodes that need to change the visualization state. The associated nodes may also be determined by the attribute parameters of the target display node. Specifically: the node ID and the level of the node are determined according to the contain attribute parameter of the target display node. The nodes corresponding to the target level are determined as associated nodes, which are recorded as the next set.

[0113] Furthermore, this step 106 changes the visualization state of the associated node, which may include: according to the target level, expanding all the nodes on the designated level that are contracted under the target display node from under the target display node; the designated level includes the target level; contracting the designated levels other than the target level in the expanded designated levels, and changing the visualization state of the associated node from a hidden state to a displayed state.

[0114] In the embodiment of the present invention, the specified level may correspond to the following two situations respectively:

[0115] The first case: The specified level is all levels collapsed under the target display node.

[0116] The second case: the specified level is a level that is not less than the minimum target level among all levels collapsed under the target display node.

[0117] Taking the case where there are five levels of nodes collapsed under the target display node and the target levels are level 2 and level 3 as an example, the execution process of the expansion instruction when the target display node corresponds to the specified levels in the above two cases is described.

[0118] In the first case, in step 106, all the nodes on the five levels that are contracted under the target display node are expanded from under the target display node, and a link starting from the target display node is determined. The node level at the end of the link is the maximum level contracted under the target display node. For each link, the following steps are performed: the nodes on the level between the target display node and the minimum target level (level 2) are contracted to under the target display node; for any two adjacent target levels, the nodes on the level between the two adjacent target levels (level 2 and level 3) are contracted to the associated node of the smaller target level of the two adjacent target levels (since the level 2 and level 3 do not contain other levels, contraction is not performed); the nodes (levels 4 and 5) whose node levels contracted under the target expansion node are greater than the maximum target level (level 3) are contracted to the associated node of the maximum target level (level 3).

[0119] In the second case, in step 106, all nodes on levels (level 2, level 3, level 4 and level 5) that are not less than the minimum target level (level 2) among all levels collapsed under the target display node are expanded, and links starting from each node on the minimum target level are respectively formed, and the node level at the end of the link is the maximum level collapsed before the target display node is expanded, and for each link, the following are performed: for any two adjacent target levels, the nodes on the level between the two adjacent target levels (level 2 and level 3) are collapsed to the associated nodes of the smaller target level of the two adjacent target levels (since there are no other levels between level 2 and level 3), and the nodes (nodes on level 4 and level 5) that are collapsed under the target expanded node and whose node level is greater than the maximum target level (level 3) are collapsed to the associated nodes of the maximum target level (level 3).

[0120] In this step 106, when changing the visualization state of the associated node from the hidden state to the displayed state, it can be achieved by changing the attribute parameters of the associated node. Specifically, the attribute parameters of each associated node in the next set can be changed as follows: the contracted attribute parameters of the associated node are changed to False, and the outlinks attribute parameters of the associated node are updated.

[0121] In one embodiment of the present invention, in step 106, in order to update the number of nodes displayed in the relationship graph, it may also include: determining the related nodes whose visualization status changes with the associated node, and modifying the attribute parameters of the related nodes.

[0122] The following describes how to change the attribute parameters when the hierarchy level to be expanded is the maximum endpoint value of the hierarchy range.

[0123] The changes to the attribute parameters of each node are as follows:

[0124] Change the contracted attribute of all associated nodes in the next collection to False;

[0125] Remove all associated nodes in the next set from the contain attribute parameter of the target display node, and subtract the number of associated nodes in the next set from the set attribute value of the target display node, and reduce the value of the containlevel attribute parameter by 1;

[0126] According to the outlinks attribute parameter of the target display node, the adjacent nodes directly connected to the target display node in the display relationship graph are determined, which are recorded as the one set; the outlinks attribute parameters corresponding to each adjacent node in the one set, each associated node in the next set and the target display node are cleared; then each adjacent node in the one set and each associated node in the next set are traversed, and the links attribute parameters of each traversed node are used to determine the adjacent nodes directly connected to the node in the real relationship graph. If the contracted attribute parameter of the adjacent node is False, the node and the adjacent node are bidirectionally added to each other's outlinks attribute parameter; otherwise, the contracted node about the adjacent node is determined through the contracted attribute parameter of the adjacent node, and the node and the contracted node of the adjacent node are bidirectionally added to each other's outlinks attribute parameter.

[0127] In order to clearly explain the changes in node attribute parameters during the change process, Figure 4 Taking the relationship diagram shown as an example, the real relationship diagram includes nodes 1, 2, 3, 4, and 5. Nodes 2, 3, and 4 are the nodes collapsed under the target display node 1. This is used to illustrate the change process when the hierarchical levels that need to be expanded are the following positions.

[0128] Position 1: The level to be expanded is the minimum endpoint value of the level range, that is, the first-level node, that is, the associated node is node 2.

[0129] Position 2: The level to be expanded is greater than the minimum endpoint value and less than the maximum endpoint value, that is, the secondary node, and the associated node is node 3.

[0130] Position 3: The hierarchy level to be expanded is the maximum endpoint value of the hierarchy range, that is, the third-level node, that is, the associated node is node 4.

[0131] First, position one will be described.

[0132] At position one, the next set contains associated node 2, and changes to the attribute parameters of the associated node include: changing the contracted attribute parameters of the associated node 2 to False, adding the target display node 1 and node 5 to the outlinks attribute parameter of the associated node 2, adding the first-level node 3 and the second-level node 4 to the contain attribute parameter of the associated node 2, changing the containlevel attribute parameter of the associated node 2 to 2, and changing the value of the set attribute parameter to 3.

[0133] Changes to the attribute parameters of related nodes include:

[0134] 1) Changes to the attribute parameters of the target display node 1: Delete node 5 of the outlinks attribute parameter, add associated node 2, delete the content in the contain attribute parameter, change the containlevel attribute parameter to 0, and change the value of the set attribute parameter to 1.

[0135] 2) Change the attribute parameters of the first-level node 3 and the second-level node 4: modify the contracted attribute parameter to the id of the associated node 2.

[0136] 3) Changes to the attribute parameters of node 5: Delete the target display node 1 in the outlinks attribute parameter, and add the associated node 2.

[0137] Then, position 2 will be described.

[0138] At position two, the next set contains associated node 3, and changes to the attribute parameters of the associated node include: changing all contracted attribute parameters of the associated node 3 to False, adding target display node 1 and node 5 to the outlinks attribute parameter of the associated node 3, adding the first-level node 4 to the contain attribute parameter, changing the containlevel attribute parameter to 1, and changing the value of the set attribute parameter to 2.

[0139] Changes to the attribute parameters of related nodes include:

[0140] 1) Changes to the attribute parameters of the target display node 1: Delete node 5 in the outlinks attribute parameter and add associated node 3; delete the contents of associated nodes 3 and 4 in the contain attribute parameter; change the containlevel attribute parameter to 1; and change the value of the set attribute parameter to 2.

[0141] 2) Change the attribute parameters of the first-level node 4: modify the contracted attribute parameter to the id of the associated node 3.

[0142] 3) Changes to the attribute parameters of node 5: Delete the target display node 1 in the outlinks attribute parameter, and add the associated node 3.

[0143] Finally, position three is explained.

[0144] At position three, the next set contains associated node 4, and changes to the attribute parameters of the associated node include: changing all contracted attribute parameters of the associated node 4 to False, adding target display node 1 and node 5 to the outlinks attribute parameter of the associated node 4, and changing the value of the set attribute parameter to 1.

[0145] Changes to the attribute parameters of related nodes include:

[0146] 1) Changes to the attribute parameters of the target display node 1: Delete node 5 in the outlinks attribute parameter and add associated node 4, delete the content of associated node 4 in the contain attribute parameter, change the containlevel attribute parameter to 2, and change the value of the set attribute parameter to 3.

[0147] 2) Changes to the attribute parameters of node 5: Delete the target display node 1 in the outlinks attribute parameter, and add the associated node 4.

[0148] like Figure 5 , Figure 6 As shown, an embodiment of the present invention provides a relationship map updating device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 5 As shown, it is a hardware architecture diagram of a computing device where a relationship graph updating device provided by an embodiment of the present invention is located, except Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown in the figure, the computing device in which the device is located in the embodiment may also generally include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 6 As shown, as a device in a logical sense, the CPU of the computing device in which it is located reads the corresponding computer program in the non-volatile memory into the memory and runs it. This embodiment provides a relationship map updating device, including:

[0149] An update instruction acquisition unit 601 is used to acquire an update instruction for a target display node in a currently displayed relationship graph;

[0150] A target level determination unit 602, configured to determine a target level corresponding to the target display node according to information of at least one level carried by the update instruction;

[0151] An associated node determining unit 603 is used to determine, according to the target level, associated nodes that need to change their visualization states;

[0152] The relationship graph updating unit 604 is used to change the visualization state of the associated nodes to update the number of displayed nodes in the relationship graph.

[0153] In one embodiment of the present invention, the update instruction is a shrink instruction; the at least one level of information carried by the update instruction is the number of levels that need to be shrunk;

[0154] The target level determination unit 602 is specifically configured to determine the levels in the currently displayed relationship graph that are equal in number to the levels and closest to the target display node as target levels.

[0155] In one embodiment of the present invention, the associated node determination unit 603 is specifically used to determine whether there is a collection node in the nodes of the target level; the collection node is a node under which there is a contraction; if so, determine the first target level corresponding to the collection node in the target level that is closest to the target display node; determine the nodes included in the second target level as the associated nodes; the second target level is a target level whose distance from the target display node is less than that of the first target level.

[0156] In one embodiment of the present invention, when changing the visualization state of the associated node, the relationship graph updating unit 604 is specifically used to shrink the associated node to the target display node and change the visualization state of the associated node from the display state to the hidden state.

[0157] In one embodiment of the present invention, the update instruction is an expansion instruction; the at least one level of information carried by the update instruction is the level of the level to be expanded;

[0158] The target level determination unit 602 is specifically configured to determine, among the levels corresponding to the nodes collapsed under the target display node, a level corresponding to the level as the target level.

[0159] In one embodiment of the present invention, the hierarchy level is within a set hierarchy range, and the hierarchy level may be equal to an endpoint value constituting the hierarchy range;

[0160] The minimum endpoint value of the hierarchical range is the minimum hierarchical level in each hierarchical level corresponding to the nodes collapsed under the target display node;

[0161] The maximum endpoint value of the hierarchical range is the maximum hierarchical level in each hierarchy corresponding to the nodes collapsed under the target display node.

[0162] In one embodiment of the present invention, when changing the visualization state of the associated node, the relationship graph updating unit 604 is specifically used to expand all the nodes on the designated level that are contracted under the target display node from under the target display node according to the target level; the designated level includes the target level; the designated levels other than the target level in the expanded designated levels are contracted, and the visualization state of the associated node is changed from a hidden state to a displayed state.

[0163] In one embodiment of the present invention, the designated levels are all levels collapsed under the target display node; when collapsing the designated levels other than the target level in the expanded designated levels, the relationship graph updating unit 604 is specifically configured to collapse the nodes located at the level between the target display node and the minimum target level to the target display node; for any two adjacent target levels, collapse the nodes located at the level between the two adjacent target levels to the associated node of the smaller target level of the two adjacent target levels; collapse the nodes whose level of the collapsed nodes under the target expanded node is greater than the maximum target level to the associated node of the maximum target level.

[0164] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a relationship map updating device. In other embodiments of the present invention, a relationship map updating device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0165] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0166] An embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a relationship graph updating method in any embodiment of the present invention is implemented.

[0167] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a relationship graph updating method in any embodiment of the present invention.

[0168] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0169] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0170] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0171] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0172] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0173] Each embodiment of the present invention has at least the following beneficial effects:

[0174] 1. In one embodiment of the present invention, the user can generate an update instruction for the target display node in the currently displayed relationship map according to the needs, so as to change the visualization state of the associated nodes of the target display node through the update instruction, thereby updating the number of display nodes in the relationship map. It can be seen that when the number of nodes in the relationship map is large, the relationship map can be made to display only part of the nodes according to the needs, so as to make the visualization interface neater and improve the user experience.

[0175] 2. In one embodiment of the present invention, when shrinking a target display node, one or more levels of nodes of the target display node in the display relationship graph can be shrunk, thereby increasing the number of shrinking levels and further improving the shrinking efficiency, so that when the number of display nodes in the display relationship graph is shrunk at one time, more display nodes can be shrunk quickly.

[0176] 3. In one embodiment of the present invention, when expanding a target display node, one or more levels of the collapsed levels included under the target display node may be expanded, and the level to be expanded may be any one or more levels within the level range, thereby satisfying more different needs of users.

[0177] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0178] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A relationship graph updating method, It is characterized in that include: Get the update instruction for the target display node in the currently displayed relationship graph; Determining a target level corresponding to the target display node according to information of at least one level carried by the update instruction; Determine, according to the target level, the associated nodes whose visualization states need to be changed; Changing the visualization state of the associated nodes to update the number of nodes displayed in the relationship graph; the update instruction is a shrink instruction; The at least one level of information carried by the update instruction is the number of levels that need to be shrunk; When the number of levels is 1, it indicates that one level is shrunk. When the number of levels is greater than 1, it indicates that multiple levels are shrunk. The multiple levels are continuous levels, and the continuous levels include one level. The nodes on the level are the adjacent nodes directly connected to the target node. The determining, according to the information of at least one level carried by the update instruction, a target level corresponding to the target display node includes: Determine the levels in the currently displayed relationship graph that are equal in number to the levels and closest to the target display node as target levels; The determining, according to the target level, the associated nodes that need to change the visualization state includes: When it is not considered whether the target level includes a collection node, the following is executed: According to the outlinks attribute parameter of the node, the nodes of each level of the target display node in the current display relationship map are determined layer by layer until the level of the determined node is equal to the number of levels carried by the shrink instruction; the outlinks attribute parameter is the set of all adjacent nodes directly connected to the node in the current display relationship map; When considering whether the target level includes a collection node, execute: Determine whether there is a collection node in the nodes of the target level; the collection node is a node under which there is a contraction; if so, determine the first target level corresponding to the collection node in the target level that is closest to the target display node; When the nodes on the target level greater than the first target level are not shrunk, executing: determining the nodes included in the second target level as the associated nodes; the second target level is a target level whose distance from the target display node is less than that of the first target level; When the collection node is not shrunk, execute: According to the maximum target level in the target levels, at least one link starting from the target display node is determined, wherein the level to which the node at the end of the link belongs is the maximum target level; for each link, the following is performed: determining whether there is a collection node on the link; if so, determining as an associated node a node on the link whose level is smaller than the level corresponding to the collection node on the link that is closest to the target display node; if not, determining as an associated node all the nodes on the link; The changing the visualization state of the associated node includes: The associated node is collapsed under the target display node, and the visualization state of the associated node is changed from a display state to a hidden state.

2. The method according to claim 1, It is characterized in that The update instruction is an expansion instruction; the at least one level of information carried by the update instruction is the level of the level to be expanded; The determining, according to the information of at least one level carried by the update instruction, a target level corresponding to the target display node includes: Among the hierarchies corresponding to the nodes collapsed under the target display node, the hierarchy corresponding to the hierarchical level is determined as the target hierarchy.

3. The method according to claim 2, It is characterized in that The hierarchy level is within a set hierarchy range, and the hierarchy level may be equal to an endpoint value constituting the hierarchy range; The minimum endpoint value of the hierarchical range is the minimum hierarchical level in each hierarchical level corresponding to the nodes collapsed under the target display node; The maximum endpoint value of the hierarchical range is the maximum hierarchical level in each hierarchy corresponding to the nodes collapsed under the target display node; and / or, The changing the visualization state of the associated node includes: According to the target level, all nodes on the designated level that are collapsed under the target display node are expanded from under the target display node; the designated level includes the target level; The designated levels other than the target level in the expanded designated levels are collapsed, and the visualization state of the associated nodes is changed from a hidden state to a displayed state.

4. The method according to claim 3, It is characterized in that The designated levels are all levels collapsed under the target display node; The step of shrinking the designated levels other than the target level in the expanded designated levels includes: Shrinking nodes located at a level between the target display node and the minimum target level to below the target display node; For any two adjacent target levels, the nodes located at the level between the two adjacent target levels are collapsed to the associated nodes of the smaller target level among the two adjacent target levels; The nodes whose node levels are shrunk under the target expansion node and are greater than the maximum target level are shrunk to the associated nodes of the maximum target level.

5. A relationship map updating device, It is characterized in that include: An update instruction acquisition unit, used to acquire an update instruction for a target display node in a currently displayed relationship graph; a target level determination unit, configured to determine a target level corresponding to the target display node according to information of at least one level carried by the update instruction; An associated node determination unit, configured to determine, according to the target level, associated nodes that require a visualization state change; A relationship graph updating unit, used to change the visualization state of the associated nodes to update the number of nodes displayed in the relationship graph; The update instruction is a shrink instruction; The at least one level of information carried by the update instruction is the number of levels that need to be shrunk; When the number of levels is 1, it indicates that one level is shrunk. When the number of levels is greater than 1, it indicates that multiple levels are shrunk. The multiple levels are continuous levels, and the continuous levels include one level. The nodes on the level are the adjacent nodes directly connected to the target node. The determining, according to the information of at least one level carried by the update instruction, a target level corresponding to the target display node includes: Determine the levels in the currently displayed relationship graph that are equal in number to the levels and closest to the target display node as target levels; The determining, according to the target level, the associated nodes that need to change the visualization state includes: When it is not considered whether the target level includes a collection node, the following is executed: According to the outlinks attribute parameter of the node, the nodes of each level of the target display node in the current display relationship map are determined layer by layer until the level of the determined node is equal to the number of levels carried by the shrink instruction; the outlinks attribute parameter is the set of all adjacent nodes directly connected to the node in the current display relationship map; When considering whether the target level includes a collection node, execute: Determine whether there is a collection node in the nodes of the target level; the collection node is a node under which there is a contraction; if so, determine the first target level corresponding to the collection node in the target level that is closest to the target display node; When the nodes on the target level greater than the first target level are not shrunk, executing: determining the nodes included in the second target level as the associated nodes; the second target level is a target level whose distance from the target display node is less than that of the first target level; When the collection node is not shrunk, execute: According to the maximum target level in the target levels, at least one link starting from the target display node is determined, wherein the level to which the node at the end of the link belongs is the maximum target level; for each link, the following is performed: determining whether there is a collection node on the link; if so, determining as an associated node a node on the link whose level is smaller than the level corresponding to the collection node on the link that is closest to the target display node; if not, determining as an associated node all the nodes on the link; The changing the visualization state of the associated node includes: The associated node is collapsed under the target display node, and the visualization state of the associated node is changed from a display state to a hidden state.

6. A computing device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 4.