A method and system for family relationship reasoning based on a knowledge graph
By classifying and aggregating the family relationships of entities in the knowledge graph, and calculating the combined relationship reasoning results in combination with the relationship reasoning rule dictionary, the accuracy and complexity of family relationship reasoning in the existing technology are solved, and family relationship reasoning with high accuracy and flexibility are achieved.
Patent Information
- Application Number
- CN202111160320.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-09-30
AI Technical Summary
The prior art is difficult to use human universal cognition to achieve accurate logical reasoning in family relationship reasoning, and deep learning-based methods require a large amount of data for model training and tuning, and the process is complex and the accuracy is limited.
By classifying the family relationships of entities in the knowledge graph, they are two out edges of entities, two in edges of entities, and one in and one out edges of entities. The entities containing two or more family relationship connections are filtered out using aggregation or association operations, and the combined relationship reasoning results are calculated based on the relationship reasoning rules dictionary.
It realizes family relationship inference with high accuracy, can flexibly process finite relationship types, and quickly import and analyze data in multiple graph databases through the graph distributed memory computing framework, improving stability and efficiency.
Smart Images

Figure CN114238522B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of knowledge graph analysis and data mining, and particularly relates to a method and system for family relationship reasoning based on a knowledge graph. Background Art
[0002] There are already a large number of entity pairs and relationships on the knowledge graph. However, due to the update iteration and incompleteness of family relationship data, it is doomed that this part of the data is incomplete. Similarly, there is also information hidden in it that is difficult for us to easily discover. At this time, it is necessary to continuously improve the family relationship data through relationship reasoning to help us discover this hidden information.
[0003] Generally, the implementation methods of knowledge graph family relationship reasoning are as follows: Some map personnel entities and family relationships to a low-dimensional embedding space based on knowledge expression, and conduct reasoning modeling based on the semantic expression of knowledge. This modeling method focuses on the direct association relationships between entities and is difficult to use the general cognition of people to achieve precise logical reasoning. Some use deep learning to respectively map the entities and relationships in the training sample dataset of the knowledge graph into vector representations, generate training negative samples, and then bring the entity mapping results and relationship mapping results into the objective function defined in the training process according to the training samples and the generated training negative samples. After optimization, vector representations are obtained. Finally, relationship reasoning is performed according to the calculated distance values between entities and relationships in the knowledge graph triples. This method requires model training and tuning based on a large amount of data. The whole process is relatively complex, and the accuracy is limited. It is not flexible enough for reasoning of limited relationship types. Summary of the Invention
[0004] In view of the technical defects and drawbacks existing in the prior art, embodiments of the present invention provide a method and system for family relationship reasoning based on a knowledge graph to overcome or at least partially solve the above problems. The specific solutions are as follows:
[0005] As a first aspect of the present invention, a method for family relationship reasoning based on a knowledge graph is provided. The method includes:
[0006] Step 1: Classify all entities based on the family relationships of the entities in the knowledge graph into entities with two outgoing edges, entities with two incoming edges, and entities with one incoming and one outgoing edge.
[0007] Step 2: For each type of classified entity, filter out entities with two or more family relationship connections through aggregation or association operations.
[0008] Step 3: Calculate and obtain the results of combined relationship reasoning according to the relationship reasoning rule dictionary, and merge the results of the three classifications.
[0009] Among them, the method further includes: before performing the aggregation or association operation, loading the entities and family relationship data of the knowledge graph into the graph distributed memory computing framework.
[0010] Among them, step 1 specifically includes:
[0011] Based on the human's cognitive judgment of family relationships, that is, the family relationship of the third edge can be obtained from the family relationships of certain specific two edges, the family relationships connecting entities in the knowledge graph are divided into three categories, namely two out-edges of an entity, two in-edges of an entity, and one in-edge and one out-edge of an entity.
[0012] Among them, in step 3, by performing the aggregation or association operation, filtering out the entities connected by two or more family relationships specifically includes: for the classification of two out-edges of an entity, constructing a binary tuple of the entity vertex id and the out-edge information, and through the aggregation operation, filtering out the entity binary tuples with two or more family relationship out-edges to obtain the corresponding set of entity binary tuples; for the classification of two in-edges of an entity, constructing a binary tuple of the entity vertex id and the in-edge information, and through the aggregation operation, filtering out the entity binary tuples with two or more family relationship in-edges to obtain the corresponding set of entity binary tuples; for the classification of one in-edge and one out-edge of an entity, constructing a binary tuple of the entity vertex id and the out-edge information, constructing a binary tuple of the entity vertex id and the in-edge information, and performing a join operation on the two binary tuple sets to obtain the entity binary tuples with one family relationship in-edge and one family relationship out-edge, and obtaining the corresponding set of entity binary tuples.
[0013] Among them, the method further includes: step 3 further includes: combining the family relationships of the filtered entities and adding the relationship combination constraints that need to judge uniqueness.
[0014] Among them, combining the family relationships of the filtered entities and adding the relationship combination constraints that need to judge uniqueness specifically includes: for the sets of entity binary tuples classified by two out-edges of an entity, two in-edges of an entity, and one in-edge and one out-edge of an entity, pairwise combining the family relationship edges in each binary tuple and adding the relationship combination constraints that need to judge uniqueness.
[0015] Among them, step 3 specifically includes: according to the relationship inference rule dictionary of two out-edges of an entity, calculating the result of the pairwise combination relationship inference of the family relationship edges in each binary tuple classified by two out-edges of an entity; according to the relationship inference rule dictionary of two in-edges of an entity, calculating the result of the pairwise combination relationship inference of the family relationship edges in each binary tuple classified by two in-edges of an entity; according to the relationship inference rule dictionary of one in-edge and one out-edge of an entity, calculating the result of the relationship inference of the family relationship edges in each binary tuple classified by one in-edge and one out-edge of an entity, and finally merging the result sets of the three classifications;
[0016] Among them, the relational inference rule dictionary is a pre-set rule set, including deriving a third family relationship edge based on two known family relationship edges in a binary tuple.
[0017] As a second aspect of the present invention, a family relationship inference system based on a knowledge graph is provided. The system includes: a classification unit, a filtering unit, and an analysis unit;
[0018] The classification unit is used to classify all entities based on the family relationships of the entities in the knowledge graph, which are respectively two out-edges of the entity, two in-edges of the entity, and one in-edge and one out-edge of the entity;
[0019] The filtering unit is used for each type of classified entity: by performing aggregation or association operations, filtering out entities with two or more family relationship connections;
[0020] The analysis unit is used to calculate and obtain the result of combined relationship inference according to the relational inference rule dictionary, and merge the results of the three classifications.
[0021] Further, the filtering unit is specifically used for: filtering out entities with two or more family relationship connections by performing aggregation or association operations, which specifically includes: for the classification of two out-edges of the entity, constructing a binary tuple of the entity vertex id and the out-edge information, and through aggregation operations, further filtering out binary tuples of entities with two or more family relationship out-edges to obtain a corresponding set of entity binary tuples; for the classification of two in-edges of the entity, constructing a binary tuple of the entity vertex id and the in-edge information, and through aggregation operations, further filtering out binary tuples of entities with two or more family relationship in-edges to obtain a corresponding set of entity binary tuples; for the classification of one in-edge and one out-edge of the entity, constructing a binary tuple of the entity vertex id and the out-edge information, constructing a binary tuple of the entity vertex id and the in-edge information, and performing a join operation on the two binary tuple sets to obtain a binary tuple of the entity with one family relationship in-edge and one family relationship out-edge, and obtaining a corresponding set of entity binary tuples.
[0022] Further, the analysis unit is specifically used for: calculating the result of pairwise combination relationship inference of family relationship edges in each binary tuple of the classification of two out-edges of the entity according to the relational inference rule dictionary of two out-edges of the entity; calculating the result of pairwise combination relationship inference of family relationship edges in each binary tuple of the classification of two in-edges of the entity according to the relational inference rule dictionary of two in-edges of the entity; calculating the result of relationship inference of family relationship edges in each binary tuple of the classification of one in-edge and one out-edge of the entity according to the relational inference rule dictionary of one in-edge and one out-edge of the entity, and finally merging the result sets of the three classifications;
[0023] Among them, the relational inference rule dictionary is a pre-set rule set, including deriving a third family relationship edge based on two known family relationship edges in a binary tuple.
[0024] The present invention has the following beneficial effects:
[0025] 1. Classify the family relationships connecting person entities in the knowledge graph, obtain a set of target results through a series of logical conversions, and then calculate the inference results according to the relationship inference rule dictionary, with a very high accuracy rate.
[0026] 2. The relationship inference rule dictionary can accurately calculate the inference results, and at the same time has strong expandability for a limited number of relationship types, being concise and flexible.
[0027] 3. Based on the graph distributed memory computing framework, it can connect and quickly import the knowledge graph data stored in multiple graph databases and perform analysis and inference, being more stable and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic flow chart of a method for inferring family relationships based on a knowledge graph provided by an embodiment of the present invention.
[0029] Figure 2 It is a schematic diagram of entity and family relationship classification provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0031] As Figure 1 shown, as the first embodiment of the present invention, a method for inferring family relationships based on a knowledge graph is provided. The method includes:
[0032] Step 1: The knowledge graph consists of entities and edges. Each entity is used as a node. Among them, if the arrow points to the corresponding entity, then this edge is used as the incoming edge of the corresponding entity; otherwise, this edge is used as the outgoing edge of the corresponding entity, the incoming edge of the corresponding entity; the family relationship inference is determined by the family relationships of two edges to determine the family relationship of the third edge. Thus, the family relationships connecting person entities in the knowledge graph are divided into three categories: two outgoing edges of the entity, two incoming edges of the entity, and two edges of one incoming and one outgoing of the entity;
[0033] Step 2: Load the knowledge graph person entity and family relationship data into the graph distributed memory computing framework;
[0034] Step 3: Filter out the person entities containing two or more family relationship connections through aggregation or association operations;
[0035] Step 4: Combine the family relationships of the filtered person entities and add the relationship combination constraints for uniqueness judgment.
[0036] Step 5: Calculate and obtain the results of combined relationship reasoning according to the relationship reasoning rule dictionary, and merge the results of the three classifications.
[0037] Preferably, in Step 1, according to the human understanding of family relationships, generally, the family relationship of the third side can be obtained from the family relationships of certain specific two sides. Thus, the family relationships connecting person entities in the knowledge graph can be divided into three categories, namely two outgoing edges of the entity, two incoming edges of the entity, and one incoming and one outgoing edge of the entity. Referring to Figure 2 the entity and family relationship classification diagram, the reasoning relationships can be obtained:
[0038] Two outgoing edges: curr->gxch1->dst1@curr->gxch2->dst2 => dst1->gxch3->dst2
[0039] Two incoming edges: src1->gxch1->curr@src2->gxch2->curr => src1->gxch3->src2
[0040] One incoming and one outgoing edge: src->gxch1->curr@curr->gxch2->dst => src->gxch3->dst;
[0041] Among them, curr, dst1, dst2, src1, src2, src, and dst are entities in the corresponding classifications, and gxch1, gxch2, and gxch3 are the relationships between the corresponding entities.
[0042] Preferably, in Step 2, load the knowledge graph person entity and family relationship data into the graph distributed memory computing framework. Due to the distributed loading strategy, the number of shards for reading the knowledge graph data, the batch loading size, and the filtering of attribute information that does not need to participate in the calculation can be configured at the same time, making the data loading efficiency very high.
[0043] Preferably, step 3 specifically includes classifying the two outgoing edges of an entity, constructing a binary tuple of the entity vertex id and the outgoing edge information, and through an aggregation operation, filtering out a set of binary tuples of person entities containing two or more family relationship outgoing edges; classifying the two incoming edges of an entity, constructing a binary tuple of the entity vertex id and the incoming edge information, and through an aggregation operation, filtering out a set of binary tuples of person entities containing two or more family relationship incoming edges; classifying the two edges of one incoming and one outgoing of an entity, constructing a binary tuple of the entity vertex id and the outgoing edge information, constructing a binary tuple of the entity vertex id and the incoming edge information, and performing a join operation on the two binary tuple sets to obtain a set of binary tuples of person entities containing one family relationship incoming edge and one family relationship outgoing edge, where the join operation refers to an operation in a relational database that combines the records of two (or more) tables using the same attributes in the two (or more) tables.
[0044] Preferably, step 4 specifically includes, for the set of binary tuples of person entities classified by the two outgoing edges of the entity, pairwise combining the family relationship edges in each binary tuple and adding a relationship combination constraint that needs to judge uniqueness. For example: curr->father-son->dst1@curr->father-in-law->dst2 cannot infer dst1->husband-wife->dst2, and it is necessary to verify the uniqueness of the father-son and father-in-law relationship combinations; for the set of binary tuples of person entities classified by the two incoming edges of the entity, pairwise combining the family relationship edges in each binary tuple.
[0045] Preferably, in step 5, the relationship inference rule dictionary is a preset rule set, which can be based on relationship name 1 (gxch1), relationship name 2 (gxch2) => relationship name 3 (gxch3). According to the relationship inference rule dictionary for the two outgoing edges of the entity, calculate the result of the pairwise combination relationship inference of the family relationship edges in each binary tuple classified by the two outgoing edges of the entity; according to the relationship inference rule dictionary for the two incoming edges of the entity, calculate the result of the pairwise combination relationship inference of the family relationship edges in each binary tuple classified by the two incoming edges of the entity; according to the relationship inference rule dictionary for the two edges of one incoming and one outgoing of the entity, calculate the result of the relationship inference of the family relationship edges in each binary tuple classified by the two edges of one incoming and one outgoing of the entity, and merge the result sets of the three classifications.
[0046] Among them:
[0047] The data format of the binary tuple of the entity vertex id and the outgoing edge information is as follows:
[0048] (currId1,(currId1,husband-wife,dstId1))
[0049] (currId2,(currId2,father-daughter,dstId2))
[0050] (currId3,(currId3,father-in-law,dstId3))
[0051] ……
[0052] Perform an aggregation operation and filter out the set of person entity binary tuples with two or more outgoing edges of family relationships. The data format is as follows:
[0053] (currId1,[(currId1, mother-daughter, dstId1),(currId1, grandmother, dstId2)])
[0054] (currId2,[(currId2, father-daughter, dstId11),(currId2, husband, dstId12)])
[0055] (currId3,[(currId3, husband, dstId111),(currId3, grandfather, dstId112),(currId3, grandfather, dstId113)])
[0056] ……
[0057] Pairwise combine the family relationship edges in each binary tuple and add the relationship combination constraints that need to judge uniqueness. The data format is as follows:
[0058] ((currId1, father-daughter, dstId1),(currId1, husband, dstId2))
[0059] ((currId2, husband, dstId11),(currId2, grandfather, dstId12))
[0060] ((currId3, husband, dstId111),(currId3, father-son, dstId112))
[0061] ……
[0062] Among them, for the uniqueness relationship combination constraints, such as father-son and father-in-law, without the unique constraint, the spousal relationship ((currId1, father-son, dstId1),(currId1, father-in-law, dstId2),(dstId1, spouse, dstId2)) cannot be deduced. currId1 may have multiple sons and currId1 may also have multiple daughters-in-law. There is a uniqueness constraint on the quantity of such relationships to be deduced. Therefore, add a uniqueness judgment in the implementation logic.
[0063] According to the entity two-outgoing-edge relationship inference rule dictionary, calculate the result of the pairwise combination relationship inference of the family relationship edges in each binary tuple of the entity two-outgoing-edge classification. The data format is as follows:
[0064] ((currId1, father-son, dstId1), (currId1, father-in-law, dstId2), (dstId1, husband-wife, dstId2))
[0065] ((currId2, mother-son, dstId11), (currId2, mother-in-law, dstId12), (dstId11, husband-wife, dstId12))
[0066] ((currId3, father-son, dstId111), (currId3, father-in-law, dstId112), (dstId111, husband-wife, dstId112))
[0067] ……
[0068] Two incoming edges of the entity:
[0069] The binary data format of the entity vertex id and the incoming edge information is as follows:
[0070] (currId1, (srcId1, husband-wife, currId1))
[0071] (currId2, (srcId2, father-daughter, currId2))
[0072] (currId3, (srcId3, father-in-law, currId3))
[0073] ……
[0074] Perform an aggregation operation and filter out the set of entity binary tuples containing two or more family relationship incoming edges. The data format is as follows:
[0075] (currId1, [(srcId1, father-son, currId1), (srcId2, husband-wife, currId1), (srcId3, grandfather, currId1)])
[0076] (currId2, [(srcId11, father-son, currId2), (srcId12, husband-wife, currId2), (srcId13, father-in-law, currId2)])
[0077] (currId3, [(srcId111, grandmother, currId3), (srcId112, mother-son, currId3), (srcId113, mother-in-law, currId3)])
[0078] ……
[0079] Pairwise combine the family relationship edges in each binary tuple. The data format is as follows:
[0080] ((srcId1, Parent-Child, currId1), (srcId2, Husband-Wife, currId1))
[0081] ((srcId11, Husband-Wife, currId2), (srcId12, Grandfather, currId2))
[0082] ((srcId111, Grandfather, currId3), (srcId112, Father-in-law, currId3))
[0083] ……
[0084] According to the inference rule dictionary of the two incoming edges of the entity, the result data format of the pairwise combination relationship inference of the family relationship edges in each binary group of the two incoming edge classifications of the entity is as follows:
[0085] ((srcId1, Grandfather, currId1), (srcId2, Parent-Child, currId1), (srcId1, Parent-Child, srcId2))
[0086] ((srcId11, Father-in-law, currId2), (srcId12, Husband-Wife, currId2), (srcId11, Parent-Child, srcId12))
[0087] ((srcId111, Mother-in-law, currId3), (srcId112, Husband-Wife, currId3), (srcId111, Mother-Child, srcId112))
[0088] ……
[0089] Two edges of the entity, one incoming and one outgoing:
[0090] The data format of the binary group of the entity vertex id and the outgoing edge information is as follows:
[0091] (currId1, (currId1, Husband-Wife, dstId1))
[0092] (currId2, (currId2, Father-Daughter, dstId2))
[0093] (currId3, (currId3, Father-in-law, dstId3))
[0094] ……
[0095] The data format of the binary group of the entity vertex id and the incoming edge information is as follows:
[0096] (currId1, (srcId1, Husband-Wife, currId1))
[0097] (currId2,(srcId2, father - daughter, currId2))
[0098] (currId3,(srcId3, father - in - law, currId3))
[0099] ……
[0100] Performing a join operation on two sets of binary tuples can obtain a set of binary tuple data in the format of a person entity with one incoming family relationship edge and one outgoing family relationship edge as follows:
[0101] (currId1,(srcId1, husband - wife, currId1),(currId1, mother - daughter, dstId1))
[0102] (currId2,(srcId2, husband - wife, currId2),(currId2, mother - son, dstId2))
[0103] (currId3,(srcId3, father - in - law, currId3),(currId3, husband - wife, dstId3))
[0104] ……
[0105] According to the inference rule dictionary for one incoming and one outgoing edge relationships of entities, calculate the inference results of the family relationship edges in each binary tuple for the classification of one incoming and one outgoing edges of the entity. The data format is as follows:
[0106] ((srcId1, husband - wife, currId1),(currId1, mother - daughter, dstId1),(srcId1, father - daughter, dstId1))
[0107] ((srcId2, husband - wife, currId2),(currId2, mother - son, dstId2),(srcId2, father - son, dstId2))
[0108] ((srcId3, father - in - law, currId3),(currId3, husband - wife, dstId3),(srcId3, father - daughter, dstId3))
[0109] ……
[0110] Merge the classification result sets:
[0111] The data format is as follows:
[0112] ((currId3, father-in-law / son-in-law, dstId111), (currId3, father-in-law, dstId112), (dstId111, husband / wife, dstId112))
[0113] ((srcId111, mother-in-law, currId3), (srcId112, husband / wife, currId3), (srcId111, mother / son, srcId112))
[0114] ((srcId3, father-in-law, currId3), (currId3, husband / wife, dstId3), (srcId3, father / daughter, dstId3))
[0115] ……
[0116] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A family relationship reasoning method based on a knowledge graph, characterized in that The method includes: Step 1: Classify all entities based on the family relationships of entities in the knowledge graph into three categories: entities with two outgoing edges, entities with two incoming edges, and entities with one incoming and one outgoing edge. Step 2: For each category of entities: Filter out entities with two or more family relationship connections through aggregation or association operations. Step 3: Calculate and obtain the results of combined relationship reasoning according to the relationship reasoning rule dictionary, and merge the results of the three classifications. Among them, in Step 2, filtering out entities with two or more family relationship connections through aggregation or association operations specifically includes: For the classification of entities with two outgoing edges, construct a binary tuple of the entity vertex id and the outgoing edge information, and through aggregation operations, filter out the entity binary tuples with two or more family relationship outgoing edges to obtain the corresponding entity binary tuple set; For the classification of entities with two incoming edges, construct a binary tuple of the entity vertex id and the incoming edge information, and through aggregation operations, filter out the entity binary tuples with two or more family relationship incoming edges to obtain the corresponding entity binary tuple set; For the classification of entities with one incoming and one outgoing edge, construct a binary tuple of the entity vertex id and the outgoing edge information, construct a binary tuple of the entity vertex id and the incoming edge information, and perform a join operation on the two binary tuple sets to obtain the entity binary tuples with one family relationship incoming edge and one family relationship outgoing edge, and obtain the corresponding entity binary tuple set. Among them, Step 3 specifically includes: According to the relationship reasoning rule dictionary of entities with two outgoing edges, calculate the results of pairwise combination relationship reasoning of family relationship edges in each binary tuple of the classification of entities with two outgoing edges; According to the relationship reasoning rule dictionary of entities with two incoming edges, calculate the results of pairwise combination relationship reasoning of family relationship edges in each binary tuple of the classification of entities with two incoming edges; According to the relationship reasoning rule dictionary of entities with one incoming and one outgoing edge, calculate the results of relationship reasoning of family relationship edges in each binary tuple of the classification of entities with one incoming and one outgoing edge, and finally merge the result sets of the three classifications. Among them, the relationship reasoning rule dictionary is a preset rule set, including deriving the third family relationship edge based on two known family relationship edges in the binary tuple.
2. The method for inferring family relationships based on a knowledge graph according to claim 1, wherein The method further includes: Before performing aggregation or association operations, load the entities and family relationship data of the knowledge graph into the graph distributed memory computing framework.
3. The family relationship reasoning method based on a knowledge graph according to claim 1, characterized in that Step 1 specifically includes: Based on human cognitive judgment of family relationships, that is, the family relationship of a third edge can be obtained from the family relationships of certain specific two edges, divide the family relationships connecting entities in the knowledge graph into three categories, namely entities with two outgoing edges, entities with two incoming edges, and entities with one incoming and one outgoing edge.
4. The method for family relationship reasoning based on a knowledge graph according to claim 1, the method further comprising: Step 2 further includes: Combine the family relationships of the filtered entities and add relationship combination constraints that need to judge uniqueness.
5. The method for inferring family relationships based on a knowledge graph according to claim 4, wherein Combining the family relationships of the filtered entities and adding relationship combination constraints that need to judge uniqueness specifically includes: For the entity binary tuple sets of the classifications of entities with two outgoing edges, entities with two incoming edges, and entities with one incoming and one outgoing edge, perform pairwise combination of the family relationship edges in each binary tuple and add relationship combination constraints that need to judge uniqueness.
6. A family relationship reasoning system based on a knowledge graph, characterized in that, The system includes: a classification unit, a filtering unit, and an analysis unit; The classification unit is used to classify all entities based on the family relationships of entities in the knowledge graph, which are respectively entities with two outgoing edges, entities with two incoming edges, and entities with one incoming and one outgoing edge; The filtering unit is used for each type of classified entity: filtering out entities with two or more family relationship connections through aggregation or association operations; The analysis unit is used to calculate and obtain the results of combined relationship reasoning according to the relationship reasoning rule dictionary, and merge the results of the three classifications; Among them, the filtering unit is specifically used for: filtering out entities with two or more family relationship connections through aggregation or association operations, which specifically includes: for the classification of entities with two outgoing edges, constructing a binary tuple of entity vertex id and outgoing edge information, and through aggregation operations, filtering out binary tuples of entities with two or more family relationship outgoing edges to obtain the corresponding set of entity binary tuples; for the classification of entities with two incoming edges, constructing a binary tuple of entity vertex id and incoming edge information, and through aggregation operations, filtering out binary tuples of entities with two or more family relationship incoming edges to obtain the corresponding set of entity binary tuples; for the classification of entities with one incoming and one outgoing edge, constructing a binary tuple of entity vertex id and outgoing edge information, constructing a binary tuple of entity vertex id and incoming edge information, and performing a join operation on the two binary tuple sets to obtain a binary tuple of an entity with one family relationship incoming edge and one family relationship outgoing edge, and obtaining the corresponding set of entity binary tuples; Among them, the analysis unit is specifically used for: calculating the results of pairwise combination relationship reasoning of family relationship edges in each binary tuple of the classification of entities with two outgoing edges according to the relationship reasoning rule dictionary of entities with two outgoing edges; calculating the results of pairwise combination relationship reasoning of family relationship edges in each binary tuple of the classification of entities with two incoming edges according to the relationship reasoning rule dictionary of entities with two incoming edges; calculating the results of relationship reasoning of family relationship edges in each binary tuple of the classification of entities with one incoming and one outgoing edge according to the relationship reasoning rule dictionary of entities with one incoming and one outgoing edge, and finally merging the result sets of the three classifications; Among them, the relationship reasoning rule dictionary is a preset rule set, including deriving a third family relationship edge based on two known family relationship edges in the binary tuple.
Citation Information
Patent Citations
Method, device and electronic equipment for generating family relationship map
CN108153840A
Data reasoning method, device, server and medium based on knowledge map
CN109299283A
A family genetic relationship knowledge graph construction method and system
CN109840284A