Node processing method, device, storage medium and apparatus based on relationship graph
By receiving the pending problems in the relationship diagram to generate keyword groups, matching and aggregating related nodes, the problem of low node processing efficiency in the prior art is solved, and the efficiency of handling specific problems is improved.
Patent Information
- Application Number
- CN202010391039.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-09
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2040-05-09
AI Technical Summary
In the prior art, the node processing efficiency in the relationship diagram is low, resulting in low efficiency in dealing with specific problems.
By displaying the target relationship diagram in the display interface, we receive the pending problems input by the user, and generate keyword groups, extract node information in the target relationship diagram, match the node information with the keyword group, aggregate the nodes that have successfully matched, obtain the aggregation result, and switch the display interface to the aggregation result.
The efficiency of node classification in the relationship graph is improved, thereby improving the efficiency of dealing with specific problems and avoiding the inefficient process of deleting irrelevant nodes one by one.
Smart Images

Figure CN113626476B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a node processing method, equipment, storage medium and device based on a relationship graph. Background Art
[0002] In a relationship graph, when a node is expanded, there will be many child nodes. For users who want to analyze a specific problem, a large part of them are noise points, which interfere with use. The existing technology uses one-by-one deletion of irrelevant nodes, which is inefficient and leads to low efficiency in processing specific problems.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present invention is to provide a node processing method, device, storage medium and apparatus based on a relationship graph, aiming to solve the technical problems in the prior art of low efficiency in node processing in the relationship graph and low efficiency in processing specific problems.
[0005] To achieve the above object, the present invention provides a node processing method based on a relationship graph, and the node processing method based on a relationship graph comprises the following steps:
[0006] When displaying the target relationship diagram in the display interface, receiving the pending problem input by the user, and generating a keyword group based on the pending problem;
[0007] Extracting node information of each node in the target relationship graph;
[0008] Matching each node information with the keyword group, aggregating the successfully matched nodes to obtain an aggregation result;
[0009] The display interface is switched from the target relationship diagram to the aggregation result.
[0010] Preferably, matching each node information with the keyword group, aggregating successfully matched nodes, and obtaining an aggregation result specifically includes:
[0011] Performing association expansion on the keyword group to obtain equivalent phrases having the same semantics as the keyword group;
[0012] Constructing a set of phrases to be matched according to the keyword phrases and the equivalent phrases;
[0013] The information of each node is matched with the set of phrases to be matched, and the nodes with successful matching are aggregated to obtain an aggregated result.
[0014] Preferably, matching each node information with the set of phrases to be matched, aggregating successfully matched nodes, and obtaining an aggregation result specifically includes:
[0015] Extracting keywords from the node information to obtain node phrases;
[0016] Matching the node phrase with the set of phrases to be matched;
[0017] If the match is successful, the node that is successfully matched will be used as the node to be aggregated;
[0018] Obtaining the original relationship between the nodes to be aggregated in the target relationship graph;
[0019] According to the original relationship, each node to be aggregated is aggregated to obtain an aggregation result.
[0020] Preferably, aggregating the nodes to be aggregated according to the original relationship to obtain an aggregation result specifically includes:
[0021] According to the original relationship, determine whether there is an independent node in each node to be aggregated, where the independent node is a node in the target relationship graph that does not have a parent node and a child node;
[0022] If so, aggregate the independent nodes to obtain a first aggregate cluster;
[0023] According to the original relationship, other nodes in the nodes to be aggregated except the independent node are aggregated to obtain a second aggregate cluster;
[0024] An aggregation result is constructed according to the first aggregation cluster and the second aggregation cluster.
[0025] Preferably, the step of performing association expansion on the keyword group to obtain an equivalent phrase having the same semantics as the keyword group specifically includes:
[0026] According to the keyword group, an equivalent word group having the same semantics as the keyword group is searched from a mapping relationship table, wherein the mapping relationship table includes a corresponding relationship between the keyword group and the equivalent word group.
[0027] Preferably, after switching the display interface from the target relationship graph to the aggregation result, the node processing method based on the relationship graph further includes:
[0028] receiving a release instruction input by a user;
[0029] According to the release instruction, the display interface is switched from the aggregation result to the target relationship diagram.
[0030] Preferably, after the display interface is switched from the aggregation result to the target relationship graph according to the release instruction, the node processing method based on the relationship graph further includes:
[0031] Taking each node in the aggregation result as a target feature node, and setting a keyword group label for the target feature node;
[0032] The keyword group label is displayed within a preset distance range from the target feature node.
[0033] Preferably, displaying the keyword group label at a distance from the target feature node specifically includes:
[0034] Determine whether the target feature node contains other tags;
[0035] If the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center.
[0036] Preferably, if the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center, specifically including:
[0037] If the target feature node includes other tags, different display colors are set for the keyword group tag and the other tags;
[0038] The keyword group label and the other labels are displayed in corresponding display colors, within a preset distance range from the target feature node, and around the target feature node as the center.
[0039] Preferably, the switching the display interface from the target relationship diagram to the aggregation result specifically includes:
[0040] Calculating the similarity between each node in the aggregation result;
[0041] Clustering each node in the aggregation result according to the similarity to obtain a cluster center node;
[0042] Create a new target node;
[0043] The cluster center node is placed on the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center.
[0044] Preferably, clustering the nodes in the aggregation result according to the similarity to obtain a cluster center node specifically includes:
[0045] Using each similarity as the value of each node in the aggregation result to construct a similarity matrix;
[0046] According to the similarity matrix, each node in the aggregation result is clustered by affinity propagation clustering algorithm to obtain a cluster center node.
[0047] Preferably, after switching the display interface from the target relationship graph to the aggregation result, the node processing method based on the relationship graph further includes:
[0048] receiving a moving instruction, and extracting a node to be moved from the moving instruction;
[0049] Obtaining a target moving range corresponding to the node to be moved;
[0050] Move the node to be moved within the target moving range.
[0051] Preferably, before acquiring the target moving range corresponding to the node to be moved, the node processing method based on the relationship graph further includes:
[0052] Obtaining the node coordinates of each node in the aggregation result;
[0053] Divide each node in the aggregation result into a corresponding segmentation area according to the node coordinates and the node information;
[0054] The moving range of each node in the aggregation result is set according to the segmented area.
[0055] In addition, to achieve the above-mentioned purpose, the present invention also proposes a node processing device based on a relationship graph, wherein the node processing device based on a relationship graph includes a memory, a processor, and a node processing program based on a relationship graph stored in the memory and executable on the processor, wherein the node processing program based on the relationship graph is configured to implement the steps of the node processing method based on the relationship graph as described above.
[0056] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a node processing program based on a relationship graph is stored. When the node processing program based on the relationship graph is executed by a processor, the steps of the node processing method based on the relationship graph as described above are implemented.
[0057] In addition, to achieve the above-mentioned purpose, the present invention further proposes a node processing device based on a relationship graph, and the node processing device based on the relationship graph includes:
[0058] A generating module, used for receiving a pending question input by a user when displaying the target relationship diagram in the display interface, and generating a keyword group based on the pending question;
[0059] An extraction module, used to extract node information of each node in the target relationship graph;
[0060] An aggregation module is used to match each node information with the keyword group, aggregate the successfully matched nodes, and obtain an aggregation result;
[0061] A switching module is used to switch the display interface from the target relationship diagram to the aggregation result.
[0062] Preferably, the aggregation module is also used to perform association expansion on the keyword group to obtain an equivalent phrase with the same semantics as the keyword group; construct a set of phrases to be matched based on the keyword group and the equivalent phrases; match each node information with the set of phrases to be matched, aggregate the successfully matched nodes, and obtain an aggregation result.
[0063] Preferably, the node processing device based on the relationship graph further includes:
[0064] A receiving module, used for receiving a release instruction input by a user;
[0065] The switching module is further used to switch the display interface from the aggregation result to the target relationship diagram according to the release instruction.
[0066] Preferably, the switching module is also used to calculate the similarity between each node in the aggregation result; cluster each node in the aggregation result according to the similarity to obtain a cluster center node; create a new target node; place the cluster center node on the target node, and display the nodes in the aggregation result except the cluster center node with the target node as the center.
[0067] Preferably, the node processing device based on the relationship graph further includes:
[0068] The moving module is used to receive a moving instruction, extract a node to be moved from the moving instruction; obtain a target moving range corresponding to the node to be moved; and move the node to be moved within the target moving range.
[0069] In the present invention, when displaying the target relationship graph in the display interface, the problem to be processed input by the user is received, and a keyword group is generated based on the problem to be processed. The generated keyword group is the core feature of the problem to be processed, so that the node related to the problem to be processed can be found in the target relationship graph according to the keyword group for analysis, so as to more efficiently process the problem to be processed; the node information of each node in the target relationship graph is extracted, and the node information of each node is matched with the keyword group, and the nodes with successful matching are aggregated to obtain an aggregation result, and the display interface is switched from the target relationship graph to the aggregation result, and the nodes related to the keyword group are aggregated, without deleting irrelevant nodes one by one, thereby improving the node classification efficiency in the relationship graph, thereby improving the processing efficiency of the problem to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a structural schematic diagram of a node processing device based on a relationship diagram in a hardware operating environment involved in an embodiment of the present invention;
[0071] Figure 2 It is a flowchart of a first embodiment of a node processing method based on a relationship graph of the present invention;
[0072] Figure 3 It is a flowchart diagram of a second embodiment of a node processing method based on a relationship graph of the present invention;
[0073] Figure 4 A schematic diagram of a target relationship graph as an example in the second embodiment of the node processing method based on the relationship graph of the present invention;
[0074] Figure 5 This is a schematic diagram of an aggregation result obtained after aggregating a target relationship graph as an example in the second embodiment of the node processing method based on a relationship graph of the present invention.
[0075] Figure 6 It is a flowchart diagram of a third embodiment of a node processing method based on a relationship graph of the present invention;
[0076] Figure 7 It is a flowchart diagram of a fourth embodiment of a node processing method based on a relationship graph of the present invention;
[0077] Figure 8 It is a structural block diagram of the first embodiment of the node processing device based on the relationship graph of the present invention.
[0078] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0079] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0080] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of a node processing device structure based on a relationship diagram of a hardware operating environment involved in an embodiment of the present invention.
[0081] like Figure 1 As shown, the node processing device based on the relationship graph may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The wired interface of the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable memory (Non-volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0082] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the node processing device based on the relationship diagram, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0083] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a node processing program based on a relationship graph.
[0084] exist Figure 1 In the node processing device based on the relationship graph shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the user device; the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and executes the node processing method based on the relationship graph provided in the embodiment of the present invention.
[0085] The node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and performs the following operations:
[0086] When displaying the target relationship diagram in the display interface, receiving the pending problem input by the user, and generating a keyword group based on the pending problem;
[0087] Extracting node information of each node in the target relationship graph;
[0088] Matching each node information with the keyword group, aggregating the successfully matched nodes to obtain an aggregation result;
[0089] The display interface is switched from the target relationship diagram to the aggregation result.
[0090] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0091] Performing association expansion on the keyword group to obtain equivalent phrases having the same semantics as the keyword group;
[0092] Constructing a set of phrases to be matched according to the keyword phrases and the equivalent phrases;
[0093] The information of each node is matched with the set of phrases to be matched, and the nodes with successful matching are aggregated to obtain an aggregated result.
[0094] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0095] Extracting keywords from the node information to obtain node phrases;
[0096] Matching the node phrase with the set of phrases to be matched;
[0097] If the match is successful, the node that is successfully matched will be used as the node to be aggregated;
[0098] Obtaining the original relationship between the nodes to be aggregated in the target relationship graph;
[0099] According to the original relationship, each node to be aggregated is aggregated to obtain an aggregation result.
[0100] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0101] According to the original relationship, determine whether there is an independent node in each node to be aggregated, where the independent node is a node in the target relationship graph that does not have a parent node and a child node;
[0102] If so, aggregate the independent nodes to obtain a first aggregate cluster;
[0103] According to the original relationship, other nodes in the nodes to be aggregated except the independent node are aggregated to obtain a second aggregate cluster;
[0104] An aggregation result is constructed according to the first aggregation cluster and the second aggregation cluster.
[0105] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0106] According to the keyword group, an equivalent word group having the same semantics as the keyword group is searched from a mapping relationship table, wherein the mapping relationship table includes a corresponding relationship between the keyword group and the equivalent word group.
[0107] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0108] receiving a release instruction input by a user;
[0109] According to the release instruction, the display interface is switched from the aggregation result to the target relationship diagram.
[0110] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0111] Taking each node in the aggregation result as a target feature node, and setting a keyword group label for the target feature node;
[0112] The keyword group label is displayed within a preset distance range from the target feature node.
[0113] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0114] Determine whether the target feature node contains other tags;
[0115] If the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center.
[0116] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0117] If the target feature node includes other tags, different display colors are set for the keyword group tag and the other tags;
[0118] The keyword group label and the other labels are displayed in corresponding display colors, within a preset distance range from the target feature node, and around the target feature node as the center.
[0119] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0120] Calculating the similarity between each node in the aggregation result;
[0121] Clustering each node in the aggregation result according to the similarity to obtain a cluster center node;
[0122] Create a new target node;
[0123] The cluster center node is placed on the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center.
[0124] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0125] Using each similarity as the value of each node in the aggregation result to construct a similarity matrix;
[0126] According to the similarity matrix, each node in the aggregation result is clustered by affinity propagation clustering algorithm to obtain a cluster center node.
[0127] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0128] receiving a moving instruction, and extracting a node to be moved from the moving instruction;
[0129] Obtaining a target moving range corresponding to the node to be moved;
[0130] Move the node to be moved within the target moving range.
[0131] Furthermore, the node processing device based on the relationship graph calls the node processing program based on the relationship graph stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0132] Obtaining the node coordinates of each node in the aggregation result;
[0133] Divide each node in the aggregation result into a corresponding segmentation area according to the node coordinates and the node information;
[0134] The moving range of each node in the aggregation result is set according to the segmented area.
[0135] In this embodiment, when the target relationship diagram is displayed in the display interface, the problem to be processed input by the user is received, and a keyword group is generated based on the problem to be processed. The generated keyword group is the core feature of the problem to be processed, so that the node related to the problem to be processed can be found in the target relationship diagram according to the keyword group for analysis, so as to more efficiently process the problem to be processed; the node information of each node in the target relationship diagram is extracted, and the node information of each node is matched with the keyword group, and the nodes with successful matching are aggregated to obtain an aggregation result, and the display interface is switched from the target relationship diagram to the aggregation result, and the nodes related to the keyword group are aggregated, without deleting irrelevant nodes one by one, thereby improving the node classification efficiency in the relationship diagram, thereby improving the processing efficiency of the problem to be processed.
[0136] Based on the above hardware structure, an embodiment of the node processing method based on the relationship graph of the present invention is proposed.
[0137] Reference Figure 2 , Figure 2 The flowchart of the first embodiment of the node processing method based on the relationship graph of the present invention is provided.
[0138] In a first embodiment, the node processing method based on the relationship graph includes the following steps:
[0139] Step S10: When displaying the target relationship diagram in the display interface, receiving the pending problem input by the user, and generating a keyword group based on the pending problem.
[0140] It should be understood that the execution subject of this embodiment is the node processing device based on the relationship graph, and the node processing device based on the relationship graph can be an electronic device such as a personal computer or a server, and this embodiment does not limit this. The target relationship graph includes multiple nodes, some of which have no parent nodes and no child nodes, that is, single-edge vertices, and some nodes include child nodes and / or parent nodes. The problem to be processed is a specific problem that the user needs to solve. The specific problem is analyzed to generate a keyword group corresponding to the problem to be processed. The keyword group is an attribute classification corresponding to the problem to be processed, such as a router media access control address or a router Internet Protocol address (router-mac / ip), a media access control address (Media Access Control Address, MAC address) or an Internet Protocol (Internet Protocol, IP) address, etc.
[0141] Step S20: extracting node information of each node in the target relationship graph.
[0142] It is understandable that the node information includes the node name, specific content, label content, attribute classification and other information of the node. The node name is usually the content displayed in the target relationship diagram; the specific content is usually the information that explains the node in detail, usually presented in the form of annotations, etc.; the label content is usually the characteristics of the node, such as the classification label obtained by the node when the historical processing problem is processed, usually displayed within a preset distance range from the node; the attribute classification is usually the attribute characteristics of the node, which can be presented in the form of annotations or labels, etc., or in the form of a mapping relationship table, which is not limited in this embodiment.
[0143] Step S30: Match each node information with the keyword group, aggregate the successfully matched nodes, and obtain an aggregated result.
[0144] It should be noted that each node information is matched with the keyword group. If the match is successful, and the node corresponding to the successfully matched node information has an association relationship with the keyword group, the successfully matched nodes are aggregated to obtain an aggregated result, and the aggregated result includes all nodes related to the keyword group in the target relationship graph. The node corresponding to the node information that failed to match is the node that is irrelevant to the keyword group and the problem to be processed, and the irrelevant node will not appear in the aggregated result, and the user does not need to delete the irrelevant nodes one by one.
[0145] Step S40: Switching the display interface from the target relationship diagram to the aggregation result.
[0146] In a specific implementation, in order to solve the problem to be processed, it is only necessary to analyze and process the nodes in the target relationship graph that are related to the problem to be processed, and delete the nodes that are not related to the problem to be processed. The display interface is switched from the target relationship graph to the aggregation result, that is, the aggregation result is directly displayed. The user does not need to delete irrelevant nodes one by one, and the nodes related to the problem to be processed in the target relationship graph can be quickly displayed.
[0147] In this embodiment, when the target relationship diagram is displayed in the display interface, the problem to be processed input by the user is received, and a keyword group is generated based on the problem to be processed. The generated keyword group is the core feature of the problem to be processed, so that the node related to the problem to be processed can be found in the target relationship diagram according to the keyword group for analysis, so as to more efficiently process the problem to be processed; the node information of each node in the target relationship diagram is extracted, and the node information of each node is matched with the keyword group, and the nodes with successful matching are aggregated to obtain an aggregation result, and the display interface is switched from the target relationship diagram to the aggregation result, and the nodes related to the keyword group are aggregated, without deleting irrelevant nodes one by one, thereby improving the node classification efficiency in the relationship diagram, thereby improving the processing efficiency of the problem to be processed.
[0148] Reference Figure 3 , Figure 3 This is a flow chart of a second embodiment of a node processing method based on a relationship graph of the present invention. Figure 2 The first embodiment shown provides a second embodiment of the node processing method based on the relationship graph of the present invention.
[0149] In the second embodiment, the step S30 includes:
[0150] Step S301: performing association expansion on the keyword group to obtain equivalent phrases having the same semantics as the keyword group.
[0151] It should be understood that the described equivalent phrase can be a phrase with identical semantics as the described key word group, or it can be composed of a plurality of phrases.For example, the described key word group is a MAC address, and the described equivalent phrase can be a media access control address, a local area network address, an Ethernet address or a physical address, or it can be composed of a network device position and an address. The equivalent phrases of the key word group corresponding to each node information can be collected in advance, and a mapping relation table is set up according to the corresponding relation between each key word group and the corresponding equivalent phrase, then the equivalent phrase with identical semantics as the described key word group can be searched from the described mapping relation table.In the present embodiment, the described step S301 comprises: according to the described key word group, the equivalent phrase with identical semantics as the described key word group is searched from the mapping relation table, and the corresponding relation between the key word group and the equivalent phrase is included in the described mapping relation table.
[0152] Step S302: construct a set of phrases to be matched according to the keyword group and the equivalent phrases.
[0153] It is understandable that the set of phrases to be matched includes the key words and the equivalent phrases, and each node information can be matched with the key words or equivalent phrases in the set of phrases to be matched.
[0154] Step S303: Match each node information with the set of phrases to be matched, aggregate the successfully matched nodes, and obtain an aggregated result.
[0155] It should be noted that the node information corresponding to each node is matched with the equivalent phrases or keyword phrases in the set of phrases to be matched. If the node information matches the keyword phrase or the node information matches the equivalent phrase, the match is deemed successful, and the nodes corresponding to the successfully matched node information are aggregated to obtain the aggregated result.
[0156] Furthermore, the step 303 includes:
[0157] Perform keyword extraction on the node information to obtain node phrases; match the node phrases with the set of phrases to be matched; if the match is successful, use the successfully matched nodes as nodes to be aggregated; obtain the original relationships between the nodes to be aggregated in the target relationship graph; aggregate the nodes to be aggregated according to the original relationships to obtain an aggregation result.
[0158] In a specific implementation, the node information includes information such as the node name, specific content, label content and attribute classification of the node. The node information is segmented to obtain all words corresponding to the node information, and the term frequency-inverse document frequency (TF-IDF) value of each word is calculated. The high term frequency in the node information and the low file frequency of the term in the entire file collection can generate a high-weight TF-IDF. Therefore, TF-IDF tends to filter out common words and retain important words. The node phrase corresponding to the node information is determined according to the TF-IDF value of each word.
[0159] It should be understood that the node phrase is matched with the keyword group or the equivalent phrase in the set of phrases to be matched, and the node information matches the keyword group or the node information matches the equivalent phrase, then the match is deemed successful. If the match is successful, the node corresponding to the successfully matched node information is used as the node to be aggregated, and the original relationship between the nodes to be aggregated is obtained from the target relationship graph. The original relationship is whether each node to be aggregated and other nodes are parent nodes or child nodes. According to the original relationship, each node to be aggregated is aggregated to obtain the aggregation result. That is to say, if the nodes in the aggregation result have an association relationship in the target relationship graph, each node to be aggregated is aggregated based on the association relationship.
[0160] Furthermore, aggregating the nodes to be aggregated according to the original relationship to obtain an aggregation result includes:
[0161] According to the original relationship, it is determined whether there is an independent node in each node to be aggregated, where the independent node is a node without a parent node and a child node in the target relationship graph; if so, the independent node is aggregated to obtain a first aggregate cluster; according to the original relationship, the other nodes in each node to be aggregated except the independent node are aggregated to obtain a second aggregate cluster; and an aggregation result is constructed according to the first aggregate cluster and the second aggregate cluster.
[0162] It is understandable that the independent node is a node that does not have a parent node and a child node in the target relationship graph, that is, a unilateral vertex. According to the original relationship, it is determined whether the independent node exists in each node to be aggregated. If it exists, each independent node is aggregated to obtain a first aggregate cluster. According to the original relationship, the other nodes in each node to be aggregated except the independent node are aggregated to obtain a second aggregate cluster. The nodes in the second aggregate cluster can still retain the association relationship existing in the target relationship graph. The first aggregate cluster and the second aggregate cluster constitute the aggregation result. After aggregation, a new node can be constructed to display the aggregation result.
[0163] For example, Figure 4 As shown, Figure 4 is a schematic diagram of an example target relationship diagram, Figure 4 The "other industries" in the above are independent nodes, i.e., unilateral vertices. Figure 4 The downstream application fields of the communication system equipment, operators, private networks, electricity, coal mining, transportation, petrochemicals, national defense, government affairs and other industries are all nodes in the target relationship diagram. Figure 4 The content presented in the form of annotations: my country is currently in a competitive landscape of oligopoly among the three major operators, China Mobile, China Unicom, and China Telecom, which is the specific content of the node "operator". If the problem to be processed is: What is the development status of the downstream industry of communication system equipment? The keyword extraction of the problem to be processed is obtained as follows: downstream industry of communication system equipment. The related expansion of the downstream industry of communication system equipment is carried out, and the equivalent phrases obtained include: downstream industry of communication system, downstream industry of communication equipment, and operator, etc. Figure 5 Shown Figure 4 The aggregation result obtained after aggregating the target relationship graph does not need to be deleted one by one, and the display interface is directly switched from the target relationship graph to the aggregation result, thereby improving the node analysis efficiency.
[0164] Furthermore, after step S40, the method further includes:
[0165] A moving instruction is received, and a node to be moved is extracted from the moving instruction; a target moving range corresponding to the node to be moved is acquired; and the node to be moved is moved within the target moving range.
[0166] It should be noted that in order to distinguish different types of nodes, the moving range of each node is usually set according to the node type to avoid moving within the range of other types of nodes when moving the node, which leads to reduced data analysis efficiency. The correspondence between each node and the moving range can be established in advance, and the target moving range corresponding to the node to be moved is obtained from the corresponding relationship. When the node needs to be moved, the node to be moved is moved within the target moving range, and the control node cannot be dragged out of the target moving range.
[0167] Furthermore, before obtaining the target moving range corresponding to the node to be moved, the method further includes:
[0168] Obtaining the node coordinates of each node in the aggregation result; dividing each node in the aggregation result into a corresponding segmentation area according to the node coordinates and the node information; and setting the moving range of each node in the aggregation result according to the segmentation area.
[0169] In the specific implementation, when there are many nodes and node relationships on the relationship graph, the analysis will be more complicated and cannot be observed quickly and effectively. Group isolation can be added to solve this problem. Users can define isolation rules and establish several areas according to the isolation rules. The node coordinates are divided into different areas according to the conditions, but the connection between the nodes is still there, which is convenient for obtaining useful information directly. For example, if the rule is set for nodes generated in 2019, 2018 and before 2018, it is very convenient to view the relationship and trend between nodes in each time period.
[0170] In this embodiment, by performing association expansion on the keyword group, an equivalent phrase with the same semantics as the keyword group is obtained, a set of phrases to be matched is constructed based on the equivalent phrases and the keyword group, each node information is matched with the set of phrases to be matched, and the successfully matched nodes are aggregated to obtain an aggregated result, thereby improving the accuracy and comprehensiveness of screening nodes corresponding to the problem to be processed from the target relationship graph.
[0171] Reference Figure 6 , Figure 6 This is a flow chart of the third embodiment of the node processing method based on the relationship graph of the present invention. Based on the first embodiment or the second embodiment, the third embodiment of the node processing method based on the relationship graph of the present invention is proposed. This embodiment is described based on the first embodiment.
[0172] In the third embodiment, after step S40, the method further includes:
[0173] Step S50: receiving a release instruction input by the user.
[0174] It should be understood that when the user has finished viewing the aggregation results, or needs to view the target relationship diagram, the release instruction can be input. When the release instruction is received, the currently displayed aggregation results will be released and restored to the state of the target relationship diagram before aggregation.
[0175] Step S60: According to the release instruction, the display interface is switched from the aggregation result to the target relationship diagram.
[0176] It is understandable that when the release instruction is received, the currently displayed aggregation result is released and switched to the state of the target relationship graph before aggregation. Compared with directly deleting nodes one by one, this embodiment has better flexibility and recoverability.
[0177] Furthermore, after step S60, the method further includes:
[0178] Each node in the aggregation result is used as a target feature node, and a keyword group label is set for the target feature node; the keyword group label is displayed within a preset distance range from the target feature node.
[0179] It should be noted that the keyword group can be directly used as the keyword group label of the target feature node, or a phrase can be selected from the equivalent phrases as the keyword group label. The preset distance range is to be as close to the target feature node as possible without covering the target feature node, and can be set according to an empirical value, for example, the preset distance range is 5mm. The keyword group label is displayed within the preset distance range from the target feature node, so that the user can preliminarily understand the characteristics of the target feature node through the keyword group label.
[0180] Furthermore, displaying the keyword group label within a preset distance range from the target feature node includes:
[0181] Determine whether the target feature node contains other tags; if the target feature node contains other tags, display the keyword group tag and the other tags around the target feature node within a preset distance range from the target feature node.
[0182] In a specific implementation, the target feature node may include multiple features and correspondingly include multiple labels. The keyword group label and the other labels can be displayed in a surround pattern with the target feature node as the center within a preset distance range from the target feature node. The display can be in a clockwise direction. Each label can choose to use a spherical or square shape, and the size of the presentation shape and the spacing between them can be adaptively adjusted according to the number of nodes to achieve the purpose of maximizing the display.
[0183] Further, if the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center, including:
[0184] If the target feature node contains other labels, different display colors are set for the keyword group label and the other labels; the keyword group label and the other labels are displayed in corresponding display colors within a preset distance range from the target feature node, with the target feature node as the center.
[0185] It should be understood that in order to better distinguish different labels, different display colors can be set for the keyword group label and the other labels. Then, different display colors can be used to view which features each target feature node contains, and nodes with the same features or labels can also be clearly seen.
[0186] In this embodiment, by receiving a release instruction input by the user and switching the display interface from the aggregation result to the target relationship graph according to the release instruction, it has better flexibility and recoverability than directly deleting nodes one by one.
[0187] Reference Figure 7 , Figure 7 This is a flow chart of a fourth embodiment of a node processing method based on a relationship graph of the present invention, and based on the first embodiment or the second embodiment, the fourth embodiment of a node processing method based on a relationship graph of the present invention is proposed. This embodiment is described based on the first embodiment.
[0188] In this embodiment, the step S40 includes:
[0189] Step S401: Calculate the similarity between the nodes in the aggregation result.
[0190] It should be understood that the similarity between the node information in the aggregation result can be calculated through the node information of each node in the aggregation result, and the similarity between the node information can be used as the similarity between the nodes. The node information includes category information such as the node name, specific content, label content and attribute classification of the node, and the similarity between each category of information can be calculated respectively, and the average or maximum value of the similarity corresponding to each category of information is used as the similarity between the node information, that is, the similarity between the nodes.
[0191] Step S402: clustering each node in the aggregation result according to the similarity to obtain a cluster center node.
[0192] It is understandable that according to the similarity between similarity nodes between each change rule, the similarity between nodes is clustered to obtain the cluster center node, which has the strongest similarity with other nodes in the aggregation result and is most representative of the aggregation result.
[0193] Step S403: Create a new target node.
[0194] It should be noted that, in order to switch the target relationship diagram to the aggregation result, a new target node may be created in the display interface, and the aggregation result may be displayed on the target node.
[0195] Step S404: placing the cluster center node at the target node, and displaying the nodes in the aggregation result except the cluster center node with the target node as the center.
[0196] In a specific implementation, the cluster center node can be placed on the target node, and the nodes in the aggregation result except the cluster center node can be displayed with the target node as the center, so that the target relationship graph is switched to the aggregation result.
[0197] Further, step S402 includes:
[0198] Each similarity is used as the value of each node in the aggregation result to construct a similarity matrix; according to the similarity matrix, each node in the aggregation result is clustered by an affinity propagation clustering algorithm to obtain a cluster center node.
[0199] It should be understood that the Affinity Propagation (AP) algorithm performs clustering based on the similarity between data points, which can be symmetrical or asymmetrical. The Affinity Propagation clustering algorithm does not need to determine the number of clusters first, but instead considers all data points as potential cluster centers. A similarity matrix can be constructed based on each similarity, and each similarity is used as the value of each node in the similarity matrix. Then, clustering is performed through the AP algorithm to obtain the cluster center node.
[0200] In this embodiment, by calculating the similarity between each node in the aggregation result, each node in the aggregation result is clustered according to the similarity to obtain a cluster center node, a new target node is created, the cluster center node is placed at the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center. The cluster center node has the strongest similarity with other nodes in the aggregation result and is most representative of the aggregation result, so that the aggregation result can be better displayed to improve the efficiency of node analysis.
[0201] In addition, an embodiment of the present invention further provides a storage medium, on which a node processing program based on a relationship graph is stored. When the node processing program based on the relationship graph is executed by a processor, the following steps are implemented:
[0202] When displaying the target relationship diagram in the display interface, receiving the pending problem input by the user, and generating a keyword group based on the pending problem;
[0203] Extracting node information of each node in the target relationship graph;
[0204] Matching each node information with the keyword group, aggregating the successfully matched nodes to obtain an aggregation result;
[0205] The display interface is switched from the target relationship diagram to the aggregation result.
[0206] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0207] Performing association expansion on the keyword group to obtain equivalent phrases having the same semantics as the keyword group;
[0208] Constructing a set of phrases to be matched according to the keyword phrases and the equivalent phrases;
[0209] The information of each node is matched with the set of phrases to be matched, and the nodes with successful matching are aggregated to obtain an aggregated result.
[0210] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0211] Extracting keywords from the node information to obtain node phrases;
[0212] Matching the node phrase with the set of phrases to be matched;
[0213] If the match is successful, the node that is successfully matched will be used as the node to be aggregated;
[0214] Obtaining the original relationship between the nodes to be aggregated in the target relationship graph;
[0215] According to the original relationship, each node to be aggregated is aggregated to obtain an aggregation result.
[0216] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0217] According to the original relationship, determine whether there is an independent node in each node to be aggregated, where the independent node is a node in the target relationship graph that does not have a parent node and a child node;
[0218] If so, aggregate the independent nodes to obtain a first aggregate cluster;
[0219] According to the original relationship, other nodes in the nodes to be aggregated except the independent node are aggregated to obtain a second aggregate cluster;
[0220] An aggregation result is constructed according to the first aggregation cluster and the second aggregation cluster.
[0221] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0222] According to the keyword group, an equivalent word group having the same semantics as the keyword group is searched from a mapping relationship table, wherein the mapping relationship table includes a corresponding relationship between the keyword group and the equivalent word group.
[0223] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0224] receiving a release instruction input by a user;
[0225] According to the release instruction, the display interface is switched from the aggregation result to the target relationship diagram.
[0226] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0227] Taking each node in the aggregation result as a target feature node, and setting a keyword group label for the target feature node;
[0228] The keyword group label is displayed within a preset distance range from the target feature node.
[0229] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0230] Determine whether the target feature node contains other tags;
[0231] If the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center.
[0232] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0233] If the target feature node includes other tags, different display colors are set for the keyword group tag and the other tags;
[0234] The keyword group label and the other labels are displayed in corresponding display colors, within a preset distance range from the target feature node, and around the target feature node as the center.
[0235] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0236] Calculating the similarity between each node in the aggregation result;
[0237] Clustering each node in the aggregation result according to the similarity to obtain a cluster center node;
[0238] Create a new target node;
[0239] The cluster center node is placed on the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center.
[0240] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0241] Using each similarity as the value of each node in the aggregation result to construct a similarity matrix;
[0242] According to the similarity matrix, each node in the aggregation result is clustered by affinity propagation clustering algorithm to obtain a cluster center node.
[0243] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0244] receiving a moving instruction, and extracting a node to be moved from the moving instruction;
[0245] Obtaining a target moving range corresponding to the node to be moved;
[0246] Move the node to be moved within the target moving range.
[0247] Furthermore, when the node processing program based on the relationship graph is executed by the processor, the following operations are also implemented:
[0248] Obtaining the node coordinates of each node in the aggregation result;
[0249] Divide each node in the aggregation result into a corresponding segmentation area according to the node coordinates and the node information;
[0250] The moving range of each node in the aggregation result is set according to the segmented area.
[0251] In this embodiment, when the target relationship diagram is displayed in the display interface, the problem to be processed input by the user is received, and a keyword group is generated based on the problem to be processed. The generated keyword group is the core feature of the problem to be processed, so that the node related to the problem to be processed can be found in the target relationship diagram according to the keyword group for analysis, so as to more efficiently process the problem to be processed; the node information of each node in the target relationship diagram is extracted, and the node information of each node is matched with the keyword group, and the nodes with successful matching are aggregated to obtain an aggregation result, and the display interface is switched from the target relationship diagram to the aggregation result, and the nodes related to the keyword group are aggregated, without deleting irrelevant nodes one by one, thereby improving the node classification efficiency in the relationship diagram, thereby improving the processing efficiency of the problem to be processed.
[0252] In addition, refer to Figure 8 The embodiment of the present invention further provides a node processing device based on a relationship graph, and the node processing device based on a relationship graph includes:
[0253] The generating module 10 is used to receive the pending issues input by the user when displaying the target relationship diagram in the display interface, and generate a keyword group based on the pending issues.
[0254] The extraction module 20 is used to extract the node information of each node in the target relationship graph.
[0255] The aggregation module 30 is used to match each node information with the keyword group, aggregate the successfully matched nodes, and obtain an aggregation result.
[0256] The switching module 40 is used to switch the display interface from the target relationship diagram to the aggregation result.
[0257] In this embodiment, when the target relationship diagram is displayed in the display interface, the problem to be processed input by the user is received, and a keyword group is generated based on the problem to be processed. The generated keyword group is the core feature of the problem to be processed, so that the node related to the problem to be processed can be found in the target relationship diagram according to the keyword group for analysis, so as to more efficiently process the problem to be processed; the node information of each node in the target relationship diagram is extracted, and the node information of each node is matched with the keyword group, and the nodes with successful matching are aggregated to obtain an aggregation result, and the display interface is switched from the target relationship diagram to the aggregation result, and the nodes related to the keyword group are aggregated, without deleting irrelevant nodes one by one, thereby improving the node classification efficiency in the relationship diagram, thereby improving the processing efficiency of the problem to be processed.
[0258] Other embodiments or specific implementations of the node processing device based on the relationship graph described in the present invention can refer to the above-mentioned method embodiments and will not be repeated here.
[0259] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0260] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0261] The present invention discloses A1, a node processing method based on a relationship graph, the node processing method based on the relationship graph comprises the following steps:
[0262] When displaying the target relationship diagram in the display interface, receiving the pending problem input by the user, and generating a keyword group based on the pending problem;
[0263] Extracting node information of each node in the target relationship graph;
[0264] Matching each node information with the keyword group, aggregating the successfully matched nodes to obtain an aggregation result;
[0265] The display interface is switched from the target relationship diagram to the aggregation result.
[0266] A2. The node processing method based on the relationship graph as described in A1, wherein each node information is matched with the keyword group, and the successfully matched nodes are aggregated to obtain an aggregated result, specifically including:
[0267] Performing association expansion on the keyword group to obtain equivalent phrases having the same semantics as the keyword group;
[0268] Constructing a set of phrases to be matched according to the keyword phrases and the equivalent phrases;
[0269] The information of each node is matched with the set of phrases to be matched, and the nodes with successful matching are aggregated to obtain an aggregated result.
[0270] A3. The node processing method based on the relationship graph as described in A2, wherein each node information is matched with the set of phrases to be matched, and the successfully matched nodes are aggregated to obtain an aggregated result, specifically comprising:
[0271] Extracting keywords from the node information to obtain node phrases;
[0272] Matching the node phrase with the set of phrases to be matched;
[0273] If the match is successful, the node that is successfully matched will be used as the node to be aggregated;
[0274] Obtaining the original relationship between the nodes to be aggregated in the target relationship graph;
[0275] According to the original relationship, each node to be aggregated is aggregated to obtain an aggregation result.
[0276] A4. The node processing method based on the relationship graph as described in A3, wherein the nodes to be aggregated are aggregated according to the original relationship to obtain an aggregation result, specifically comprising:
[0277] According to the original relationship, determine whether there is an independent node in each node to be aggregated, where the independent node is a node in the target relationship graph that does not have a parent node and a child node;
[0278] If so, aggregate the independent nodes to obtain a first aggregate cluster;
[0279] According to the original relationship, other nodes in the nodes to be aggregated except the independent node are aggregated to obtain a second aggregate cluster;
[0280] An aggregation result is constructed according to the first aggregation cluster and the second aggregation cluster.
[0281] A5. The node processing method based on a relationship graph as described in any one of A1 to A4, wherein the keyword group is associated and expanded to obtain an equivalent phrase having the same semantics as the keyword group, specifically comprising:
[0282] According to the keyword group, an equivalent word group having the same semantics as the keyword group is searched from a mapping relationship table, wherein the mapping relationship table includes a corresponding relationship between the keyword group and the equivalent word group.
[0283] A6. The node processing method based on a relationship graph as described in any one of A1 to A4, after the display interface is switched from the target relationship graph to the aggregation result, the node processing method based on the relationship graph further includes:
[0284] receiving a release instruction input by a user;
[0285] According to the release instruction, the display interface is switched from the aggregation result to the target relationship diagram.
[0286] A7. The node processing method based on the relationship graph as described in A6, after the display interface is switched from the aggregation result to the target relationship graph according to the release instruction, the node processing method based on the relationship graph further includes:
[0287] Taking each node in the aggregation result as a target feature node, and setting a keyword group label for the target feature node;
[0288] The keyword group label is displayed within a preset distance range from the target feature node.
[0289] A8, the node processing method based on the relationship graph as described in A7, wherein the keyword group label is displayed at a distance from the target feature node, specifically comprising:
[0290] Determine whether the target feature node contains other tags;
[0291] If the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center.
[0292] A9. The node processing method based on the relationship graph as described in A8, wherein if the target feature node contains other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center, specifically comprising:
[0293] If the target feature node includes other tags, different display colors are set for the keyword group tag and the other tags;
[0294] The keyword group label and the other labels are displayed in corresponding display colors, within a preset distance range from the target feature node, and around the target feature node as the center.
[0295] A10. The node processing method based on a relationship graph as described in any one of A1 to A4, wherein the switching of the display interface from the target relationship graph to the aggregation result specifically includes:
[0296] Calculating the similarity between each node in the aggregation result;
[0297] Clustering each node in the aggregation result according to the similarity to obtain a cluster center node;
[0298] Create a new target node;
[0299] The cluster center node is placed on the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center.
[0300] A11. The node processing method based on the relationship graph as described in A10, wherein clustering the nodes in the aggregation result according to the similarity to obtain the cluster center node specifically includes:
[0301] Using each similarity as the value of each node in the aggregation result to construct a similarity matrix;
[0302] According to the similarity matrix, each node in the aggregation result is clustered by affinity propagation clustering algorithm to obtain a cluster center node.
[0303] A12. The node processing method based on a relationship graph as described in any one of A1 to A4, after the display interface is switched from the target relationship graph to the aggregation result, the node processing method based on the relationship graph further includes:
[0304] receiving a moving instruction, and extracting a node to be moved from the moving instruction;
[0305] Obtaining a target moving range corresponding to the node to be moved;
[0306] Move the node to be moved within the target moving range.
[0307] A13. The node processing method based on a relationship graph as described in A12, before obtaining the target moving range corresponding to the node to be moved, the node processing method based on a relationship graph further includes:
[0308] Obtaining the node coordinates of each node in the aggregation result;
[0309] Divide each node in the aggregation result into a corresponding segmentation area according to the node coordinates and the node information;
[0310] The moving range of each node in the aggregation result is set according to the segmented area.
[0311] The present invention also discloses B14, a node processing device based on a relationship graph, the node processing device based on a relationship graph comprising: a memory, a processor, and a node processing program based on a relationship graph stored in the memory and executable on the processor, the node processing program based on the relationship graph, when executed by the processor, implements the steps of the node processing method based on the relationship graph as described in any one of A1 to A13.
[0312] The present invention also discloses C15, a storage medium, on which a node processing program based on a relationship graph is stored. When the node processing program based on the relationship graph is executed by a processor, the steps of the node processing method based on the relationship graph as described in any one of A1 to A13 are implemented.
[0313] The present invention also discloses D16, a node processing device based on a relationship graph, the node processing device based on the relationship graph comprising:
[0314] A generating module, used for receiving a pending question input by a user when displaying the target relationship diagram in the display interface, and generating a keyword group based on the pending question;
[0315] An extraction module, used to extract node information of each node in the target relationship graph;
[0316] An aggregation module is used to match each node information with the keyword group, aggregate the successfully matched nodes, and obtain an aggregation result;
[0317] A switching module is used to switch the display interface from the target relationship diagram to the aggregation result.
[0318] D17. The node processing device based on the relationship graph as described in D16, wherein the aggregation module is further used to perform association expansion on the keyword group to obtain an equivalent phrase having the same semantics as the keyword group; construct a set of phrases to be matched based on the keyword group and the equivalent phrases; match each node information with the set of phrases to be matched, aggregate successfully matched nodes, and obtain an aggregation result.
[0319] D18. The node processing device based on the relationship graph as described in D16 or D17, wherein the node processing device based on the relationship graph further comprises:
[0320] A receiving module, used for receiving a release instruction input by a user;
[0321] The switching module is further used to switch the display interface from the aggregation result to the target relationship diagram according to the release instruction.
[0322] D19. In the node processing device based on the relationship graph as described in D16 or D17, the switching module is also used to calculate the similarity between the nodes in the aggregation result; cluster the nodes in the aggregation result according to the similarity to obtain a cluster center node; create a new target node; place the cluster center node on the target node, and display the nodes in the aggregation result except the cluster center node with the target node as the center.
[0323] D20. The node processing device based on the relationship graph as described in D16 or D17, wherein the node processing device based on the relationship graph further comprises:
[0324] The moving module is used to receive a moving instruction, extract a node to be moved from the moving instruction; obtain a target moving range corresponding to the node to be moved; and move the node to be moved within the target moving range.
Claims
1. A node processing method based on a relationship graph, characterized in that: The node processing method based on the relationship graph comprises the following steps: When displaying the target relationship diagram in the display interface, receiving the pending problem input by the user, and generating a keyword group based on the pending problem; Extracting node information of each node in the target relationship graph; Matching each node information with the keyword group, aggregating the successfully matched nodes to obtain an aggregation result; Switching the display interface from the target relationship diagram to the aggregation result; The step of matching each node information with the keyword group, aggregating successfully matched nodes, and obtaining an aggregation result specifically includes: Match each node information with the keyword group, and if the match is successful, use the successfully matched node as the node to be aggregated; Obtaining the original relationship between the nodes to be aggregated in the target relationship graph; According to the original relationship, determine whether there is an independent node in each node to be aggregated, where the independent node is a node in the target relationship graph that does not have a parent node and a child node; If so, aggregate the independent nodes to obtain a first aggregate cluster; According to the original relationship, other nodes in the nodes to be aggregated except the independent node are aggregated to obtain a second aggregate cluster; An aggregation result is constructed according to the first aggregation cluster and the second aggregation cluster.
2. The node processing method based on the relationship graph according to claim 1, characterized in that: The step of matching each node information with the keyword group, aggregating successfully matched nodes, and obtaining an aggregation result specifically includes: Performing association expansion on the keyword group to obtain equivalent phrases having the same semantics as the keyword group; Constructing a set of phrases to be matched according to the keyword phrases and the equivalent phrases; The information of each node is matched with the set of phrases to be matched, and the nodes with successful matching are aggregated to obtain an aggregated result.
3. The node processing method based on the relationship graph according to claim 2, characterized in that: The matching of each node information with the set of phrases to be matched specifically includes: Extracting keywords from the node information to obtain node phrases; The node phrase is matched with the set of phrases to be matched.
4. The node processing method based on a relationship graph according to any one of claims 1 to 3, characterized in that: The step of performing association expansion on the keyword group to obtain an equivalent phrase having the same semantics as the keyword group specifically includes: According to the keyword group, an equivalent word group having the same semantics as the keyword group is searched from a mapping relationship table, wherein the mapping relationship table includes a corresponding relationship between the keyword group and the equivalent word group.
5. The node processing method based on a relationship graph according to any one of claims 1 to 3, characterized in that: After the display interface is switched from the target relationship graph to the aggregation result, the node processing method based on the relationship graph further includes: receiving a release instruction input by a user; According to the release instruction, the display interface is switched from the aggregation result to the target relationship diagram.
6. The node processing method based on the relationship graph according to claim 5, characterized in that: After the display interface is switched from the aggregation result to the target relationship graph according to the release instruction, the node processing method based on the relationship graph further includes: Taking each node in the aggregation result as a target feature node, and setting a keyword group label for the target feature node; The keyword group label is displayed within a preset distance range from the target feature node.
7. The node processing method based on the relationship graph according to claim 6, characterized in that: The step of displaying the keyword group label at a distance from the target feature node specifically includes: Determine whether the target feature node contains other tags; If the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, with the target feature node as the center.
8. The node processing method based on the relationship graph according to claim 7, characterized in that: If the target feature node includes other tags, the keyword group tag and the other tags are displayed around the target feature node within a preset distance range from the target feature node, specifically including: If the target feature node includes other tags, different display colors are set for the keyword group tag and the other tags; The keyword group label and the other labels are displayed in corresponding display colors, within a preset distance range from the target feature node, and around the target feature node as the center.
9. The node processing method based on a relationship graph according to any one of claims 1 to 3, characterized in that: The switching the display interface from the target relationship diagram to the aggregation result specifically includes: Calculating the similarity between each node in the aggregation result; Clustering each node in the aggregation result according to the similarity to obtain a cluster center node; Create a new target node; The cluster center node is placed on the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center.
10. The node processing method based on the relationship graph according to claim 9, characterized in that: The clustering of the nodes in the aggregation result according to the similarity to obtain the cluster center node specifically includes: Using each similarity as the value of each node in the aggregation result to construct a similarity matrix; According to the similarity matrix, each node in the aggregation result is clustered by affinity propagation clustering algorithm to obtain a cluster center node.
11. The node processing method based on a relationship graph according to any one of claims 1 to 3, characterized in that: After the display interface is switched from the target relationship graph to the aggregation result, the node processing method based on the relationship graph further includes: receiving a moving instruction, and extracting a node to be moved from the moving instruction; Obtaining a target moving range corresponding to the node to be moved; Move the node to be moved within the target moving range.
12. The node processing method based on the relationship graph according to claim 11, characterized in that: Before obtaining the target moving range corresponding to the node to be moved, the node processing method based on the relationship graph further includes: Obtaining the node coordinates of each node in the aggregation result; Divide each node in the aggregation result into a corresponding segmentation area according to the node coordinates and the node information; The moving range of each node in the aggregation result is set according to the segmented area.
13. A node processing device based on a relationship graph, characterized in that: The node processing device based on the relationship graph includes: a memory, a processor, and a node processing program based on the relationship graph stored in the memory and executable on the processor. When the node processing program based on the relationship graph is executed by the processor, the steps of the node processing method based on the relationship graph as described in any one of claims 1 to 12 are implemented.
14. A storage medium, characterized in that: The storage medium stores a node processing program based on a relationship graph, and when the node processing program based on a relationship graph is executed by a processor, the steps of the node processing method based on a relationship graph as described in any one of claims 1 to 12 are implemented.
15. A node processing device based on a relationship graph, characterized in that: The node processing device based on the relationship graph includes: A generating module, used for receiving a pending question input by a user when displaying the target relationship diagram in the display interface, and generating a keyword group based on the pending question; An extraction module, used to extract node information of each node in the target relationship graph; An aggregation module is used to match each node information with the keyword group, aggregate the successfully matched nodes, and obtain an aggregation result; A switching module, used to switch the display interface from the target relationship diagram to the aggregation result; The aggregation module is further used to match each node information with the keyword group. If the match is successful, the successfully matched node is used as the node to be aggregated; the original relationship between the nodes to be aggregated in the target relationship graph is obtained; according to the original relationship, it is determined whether there is an independent node in each node to be aggregated, and the independent node is a node in the target relationship graph that does not have a parent node and a child node; if so, the independent node is aggregated to obtain a first aggregation cluster; according to the original relationship, the other nodes in each node to be aggregated except the independent node are aggregated to obtain a second aggregation cluster; and the aggregation result is constructed according to the first aggregation cluster and the second aggregation cluster.
16. The node processing device based on the relationship graph according to claim 15, characterized in that: The aggregation module is further used to associate and expand the keyword group to obtain an equivalent phrase with the same semantics as the keyword group; and to construct a set of phrases to be matched according to the keyword group and the equivalent phrases; The information of each node is matched with the set of phrases to be matched, and the nodes with successful matching are aggregated to obtain an aggregated result.
17. The node processing device based on the relationship graph according to claim 15 or claim 16, characterized in that: The node processing device based on the relationship graph also includes: A receiving module, used for receiving a release instruction input by a user; The switching module is further used to switch the display interface from the aggregation result to the target relationship diagram according to the release instruction.
18. The node processing device based on the relationship graph according to claim 15 or claim 16, characterized in that: The switching module is further used to calculate the similarity between the nodes in the aggregation result; cluster the nodes in the aggregation result according to the similarity to obtain the cluster center node; Create a new target node; The cluster center node is placed on the target node, and the nodes in the aggregation result except the cluster center node are displayed with the target node as the center.
19. The node processing device based on the relationship graph according to claim 15 or claim 16, characterized in that: The node processing device based on the relationship graph also includes: The moving module is used to receive a moving instruction, extract a node to be moved from the moving instruction; obtain a target moving range corresponding to the node to be moved; and move the node to be moved within the target moving range.
Citation Information
Patent Citations
Content recommendation method in medical field, electronic device, equipment and storage medium
CN110188186A