Noise detection method and device for family tree knowledge graph, and electronic device
Through the combination of graph matching algorithm and inference rule base, the noise in the family tree knowledge graph is detected and removed, which solves the problem of difficulty in detecting and removing noise in the existing technology and improves the integrity and accuracy of the family tree knowledge graph.
Patent Information
- Application Number
- CN202210082551.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-01-24
Smart Images

Figure CN114461815B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and in particular to a noise detection method for a family tree knowledge graph and a device and electronic device thereof. Background Art
[0002] Knowledge graphs are knowledge networks composed of nodes and edges, and have been widely used in fields such as Web retrieval, recommendation systems, and knowledge question-answering. Family trees are a carrier for blood relatives of the same clan and common ancestor to collectively record the inheritance of their clan lineage and related matters. They mainly include family tree information such as the origin of surnames, genealogy tables, family precepts, and family traditions, as well as information about people and their related information, which can be represented by knowledge graphs. Figure 1 It is a schematic diagram of a kinship knowledge graph based on the prior art, in which nodes (which can be represented by circles) represent people (for example, Zhang Yi, Zhang Er, Qian Liu, etc.), and edges (which can be represented by line segments with arrows) represent relationships between people (for example, father-daughter, friends, etc.).
[0003] In related technologies, in order to solve the problems of user root tracing, family inheritance and cross-surname analysis, constructing the family tree as a kinship knowledge graph is one of the effective ways to realize family tree knowledge mining and reasoning. The existing knowledge graph construction method is mainly constructed by manual and semi-automatic methods, which cannot meet the needs of kinship knowledge graph construction. However, the automated construction technology is not yet mature, which will inevitably lead to the loss of some knowledge in the constructed kinship knowledge graph, and it is easy to introduce noise. Therefore, in order to improve the integrity and correctness of the family tree knowledge graph, the family tree knowledge graph needs to be completed and denoised. In the prior art, when searching for noise in the family tree knowledge graph, there is a lack of available noise pattern subgraphs, which can easily lead to problems such as incomplete noise search.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a noise detection method and device for a family tree knowledge graph, and an electronic device thereof, so as to at least solve the technical problems in the related art that it is difficult to detect the noise appearing in the family tree knowledge graph and the detection efficiency is low.
[0006] According to one aspect of an embodiment of the present invention, a noise detection method for a genealogical knowledge graph is provided, comprising: obtaining a pre-constructed noise subgraph library and a genealogical knowledge graph to be detected, wherein the noise subgraph library is obtained by summarizing the inference knowledge results, and the noise subgraph library includes: at least one noise subgraph; based on a graph matching algorithm, detecting whether there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph, and obtaining a detection result; when the detection result indicates that there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph, determining that there is noise in the genealogical knowledge graph.
[0007] Optionally, before obtaining the genealogical knowledge graph to be detected, the noise detection method further includes: obtaining the genealogical knowledge graph used in the historical process; based on a preset knowledge base, analyzing the genealogical knowledge graph, and determining the domain ontology in the genealogical knowledge graph, wherein the domain ontology includes at least: classes, relationships between classes, attributes, class axioms, and individuals.
[0008] Optionally, the attributes include: object attributes and data attributes, wherein the object attributes are used to indicate the hierarchical relationship between the individuals, and the data attributes are used to describe the attribute values of the individuals.
[0009] Optionally, after determining the domain ontology in the genealogical knowledge graph, the noise detection method further includes: using a preset ontology description strategy and a preset conversion tool to construct the domain ontology into ontology data, wherein the ontology data is used for input of an external device; based on a preset knowledge base, analyzing the ontology data to obtain an inference rule library, wherein the inference rule library includes at least: a plurality of inference rules for inferring hierarchical relationships between individuals.
[0010] Optionally, after constructing the inference rule base, the noise detection method also includes: obtaining a genealogical knowledge graph used in the historical process; based on the inference rule base, reasoning the hierarchical relationship between every two individuals in the genealogical knowledge graph to obtain an inference knowledge result; analyzing the inference knowledge result to obtain an analysis result, wherein the analysis result is used to characterize whether there is a conflict relationship in the inference knowledge result, and the conflict relationship is used to indicate that there is a conflict between the hierarchical relationship currently inferred and the known hierarchical relationship and / or the known inference hierarchical relationship of the genealogical knowledge graph; if the conflict relationship exists in the analysis result, the conflict relationship is added to the noise sub-graph library.
[0011] Optionally, after determining that there is noise in the genealogical knowledge graph, the noise detection method further includes: classifying noise data in the noise to obtain a noise classification result; and sending the noise classification result to the client.
[0012] Optionally, after sending the noise classification result to the client, the noise detection method further includes: controlling the client to complete the family tree knowledge graph and / or delete the noise data based on the noise classification result to update the family tree knowledge graph.
[0013] According to another aspect of an embodiment of the present invention, a noise detection device for a genealogical knowledge graph is provided, comprising: an acquisition unit, for acquiring a pre-constructed noise subgraph library and a genealogical knowledge graph to be detected, wherein the noise subgraph library is obtained by summarizing the inference knowledge results, and the noise subgraph library includes: at least one noise subgraph; a detection unit, for detecting whether there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph based on a graph matching algorithm, and obtaining a detection result; a determination unit, for determining whether there is noise in the genealogical knowledge graph when the detection result indicates that there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph.
[0014] Optionally, the noise detection device also includes: a first acquisition module, used to obtain a genealogical knowledge graph used in the historical process before obtaining the genealogical knowledge graph to be detected; a first determination module, used to analyze the genealogical knowledge graph based on a preset knowledge base, and determine the domain ontology in the genealogical knowledge graph, wherein the domain ontology includes at least: classes, relationships between classes, attributes, class axioms, and individuals.
[0015] Optionally, the attributes include: object attributes and data attributes, wherein the object attributes are used to indicate the hierarchical relationship between the individuals, and the data attributes are used to describe the attribute values of the individuals.
[0016] Optionally, the noise detection device also includes: a first construction module, used to adopt a preset ontology description strategy and a preset conversion tool to construct the domain ontology into ontology data, wherein the ontology data is used for input of an external device; a second determination module, used to analyze the ontology data based on a preset knowledge base to obtain an inference rule library, wherein the inference rule library includes at least: a plurality of inference rules for inferring hierarchical relationships between individuals.
[0017] Optionally, the noise detection device also includes: a second acquisition module, used to acquire the genealogical knowledge graph used in the historical process after constructing the inference rule base; a first inference module, used to infer the hierarchical relationship between each two individuals in the genealogical knowledge graph based on the inference rule base to obtain an inference knowledge result; a third analysis module, used to analyze the inference knowledge result to obtain an analysis result, wherein the analysis result is used to characterize whether there is a conflict relationship in the inference knowledge result, and the conflict relationship is used to indicate that there is a conflict between the hierarchical relationship currently inferred and the known hierarchical relationship and / or the known inference hierarchical relationship of the genealogical knowledge graph; a first adding module, used to add the conflict relationship to the noise sub-graph library if the conflict relationship exists in the analysis result.
[0018] Optionally, the noise detection device also includes: a first classification module, which is used to classify the noise data in the noise after determining that there is noise in the genealogical knowledge graph to obtain a noise classification result; and a first sending module, which is used to send the noise classification result to the client.
[0019] Optionally, the noise detection device also includes: after sending the noise classification result to the client, a first update module is used to control the client to complete the family tree knowledge graph and / or delete the noise data based on the noise classification result to update the family tree knowledge graph.
[0020] According to another aspect of an embodiment of the present invention, an electronic device is provided, characterized in that it includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned noise detection methods for the genealogical knowledge graph by executing the executable instructions.
[0021] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the noise detection methods for the genealogical knowledge graph described above.
[0022] In the present disclosure, a pre-constructed noise subgraph library and a genealogy knowledge graph to be detected are obtained, wherein the noise subgraph library is obtained by summarizing the inference knowledge results, and the noise subgraph library includes: at least one noise subgraph; based on a graph matching algorithm, whether there is a genealogy subgraph with the same structure and the same semantics as the noise subgraph in the genealogy knowledge graph is detected to obtain a detection result; when the detection result indicates that there is a genealogy subgraph with the same structure and the same semantics as the noise subgraph in the genealogy knowledge graph, it is determined that there is noise in the genealogy knowledge graph. In the present application, a noise subgraph library can be constructed by a predefined inference rule library, and a graph matching algorithm is used to match the genealogy knowledge graph with the noise subgraph in the noise subgraph library, so that the noise in the genealogy knowledge graph can be detected quickly and accurately, and the detection accuracy and detection speed can be greatly improved. At the same time, the quality and availability of the genealogy knowledge graph can be improved, thereby solving the technical problems in the related art that it is difficult to detect the noise in the genealogy knowledge graph and the detection efficiency is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 It is a schematic diagram of a kinship knowledge graph according to the prior art;
[0025] Figure 2 is a flow chart of an optional noise detection method for a family tree knowledge graph according to an embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of an optional reasoning knowledge result according to an embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of an optional conflict relationship according to an embodiment of the present invention;
[0028] Figure 5 is a schematic diagram of an optional original family tree knowledge graph (data graph) according to an embodiment of the present invention;
[0029] Figure 6 is a schematic diagram of an optional noise detection method architecture for a family tree knowledge graph according to an embodiment of the present invention;
[0030] Figure 7 It is a schematic diagram of a noise detection device for a family tree knowledge graph according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:
[0034] Knowledge reasoning: refers to the use of certain methods to infer new knowledge or identify erroneous knowledge in the knowledge graph based on the existing knowledge in the knowledge graph. Knowledge reasoning methods can be classified into: rule-based reasoning, ontology-based reasoning, neural network-based reasoning, and hybrid reasoning.
[0035] Graph matching algorithm: Efficiently query and match data in closely related, massive, multi-source and heterogeneous data. Compared with keyword search, graph matching algorithm can search for complex patterns in highly related data, which improves the performance of big data analysis and mining. It can be applied to social relationship query, recommendation system and network attack detection. The graph matching algorithm used in this application can find subgraphs in the data graph that are exactly the same in structure and semantics as the query graph.
[0036] HAO intelligence: refers to an intelligent system that starts with big data and integrates human intelligence (HI), organizational intelligence (OI) and artificial intelligence (AI) to achieve the discovery of big knowledge and promote human-machine collaboration to solve complex problems in organizations (enterprises or governments).
[0037] Ontology: It is a formal description of a shared conceptual model and a description of the knowledge world.
[0038] Domain ontology: represents specific knowledge within a specific domain. Its construction process requires the participation of domain experts. After passing the consistency check, it is stored in the knowledge base and reasoned.
[0039] The following embodiments of the present invention can be applied to noise detection systems / applications / devices of various genealogical knowledge graphs. The noise in the genealogical knowledge graph refers to the erroneous knowledge in the genealogical knowledge graph, for example, the relationship that contradicts the known relationship between people. The present invention realizes noise detection in the knowledge graph by combining knowledge reasoning rules, graph matching algorithms and HAO intelligent technology.
[0040] Example 1
[0041] According to an embodiment of the present invention, an embodiment of a noise detection method for a genealogical knowledge graph is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0042] Figure 2 is a flowchart of an optional noise detection method for a family tree knowledge graph according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0043] Step S202, obtaining a pre-constructed noise sub-graph library and a family tree knowledge graph to be detected, wherein the noise sub-graph library is obtained by summarizing the inference knowledge results, and the noise sub-graph library includes: at least one noise sub-graph.
[0044] Step S204: Based on the graph matching algorithm, detect whether there is a family tree subgraph in the family tree knowledge graph that has the same structure and the same semantics as the noise subgraph, and obtain a detection result.
[0045] Step S206, when the detection result indicates that there is a family tree subgraph in the family tree knowledge graph that has the same structure and the same semantics as the noise subgraph, it is determined that there is noise in the family tree knowledge graph.
[0046] Through the above steps, a pre-constructed noise subgraph library and a genealogical knowledge graph to be detected can be obtained, wherein the noise subgraph library is obtained by summarizing the inference knowledge results, and the noise subgraph library includes: at least one noise subgraph; based on the graph matching algorithm, whether there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph is detected to obtain a detection result; when the detection result indicates that there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph, it is determined that there is noise in the genealogical knowledge graph. In an embodiment of the present invention, a noise subgraph library can be constructed by a predefined inference rule library, and a graph matching algorithm can be used to match the genealogical knowledge graph with the noise subgraph in the noise subgraph library, so that the presence of noise in the genealogical knowledge graph can be detected quickly and accurately, and the quality and availability of the genealogical knowledge graph can be improved, thereby solving the technical problem that it is difficult to detect the noise in the genealogical knowledge graph and the detection efficiency is low in the related technology.
[0047] The embodiment of the present invention is described in detail below in combination with the above steps.
[0048] In an embodiment of the present invention, before obtaining the genealogical knowledge graph to be detected, the noise detection method also includes: obtaining the genealogical knowledge graph used in the historical process; based on a preset knowledge base, analyzing the genealogical knowledge graph, and determining the domain ontology in the genealogical knowledge graph, wherein the domain ontology includes at least: classes, relationships between classes, attributes, class axioms, and individuals.
[0049] Optionally, the attributes include: object attributes and data attributes, wherein the object attributes are used to indicate the hierarchical relationship between individuals, and the data attributes are used to describe the attribute values of an individual.
[0050] In an embodiment of the present invention, the domain ontology of the genealogy knowledge graph can be determined first, wherein the domain ontology represents specific knowledge within a specific domain. In the process of constructing the genealogy knowledge graph, additional implicit information can be obtained by consistency verification, storage in the knowledge base and reasoning (for example, if A is known to be the father of B and B is the father of C, then it can be inferred that A is the grandfather of C). In the genealogy domain, the graph ontology can be determined by a designated user (in this embodiment, it can be represented by the human intelligence tool HI + organizational intelligence tool OI) and contains four parts: (1) Class: a group of individuals with the same attributes, such as human, male, female, and defines the relationship between classes (for example, subclass and parent class, human includes male and female); (2) Attributes: including object attributes and data attributes. Object attributes are used to connect every two individuals and reflect the hierarchical relationship between them, and data attributes describe the attribute values of individuals; (3) Class axioms: used to describe classes, such as "subclass of", "equivalentclass", "disjoint with", where "subclass "of" indicates the relationship between the parent class and the child class, "equivalentclass" indicates the equivalent substitution (equality) between classes, and "disjoint with" indicates an explicit statement to ensure the feasibility of reasoning; (4) Individual: An instance or object is called an individual. In the genealogical knowledge graph, an individual corresponds to a person.
[0051] The genealogical knowledge graph used in the historical process can be obtained first, and based on the preset knowledge base (for example, the human intelligence HI and the organizational intelligence OI analyze the obtained genealogical knowledge graph), the domain ontology in the genealogical knowledge graph can be determined. For example, the genealogical attribute class in the genealogical knowledge graph (for example, the creation time and creation place of the genealogy, etc.) and the category of each individual in the graph (for example, male class, female class, etc.) can be determined. After that, the hierarchical relationship (for example, parent class and child class) and non-hierarchical semantic relationship (for example, part and whole, non-intersecting relationship, etc., in the genealogy, humans are part of the genealogy, and male class and female class are non-intersecting relationships) between each two individuals in the genealogical knowledge graph can be analyzed, and the attributes of each individual can be analyzed (that is, object attributes and data attributes, object attributes are used to connect individuals with relationships, such as kinship relationships such as father and son, mother and son in the genealogy; data attributes describe information about specific individuals, such as individual birth date, generation, family ranking, address, etc.).
[0052] Optionally, before obtaining the genealogy knowledge graph to be detected, the noise detection method also includes: using a preset ontology description strategy and a preset conversion tool to construct the domain ontology into ontology data, wherein the ontology data is used for input of external devices; based on a preset knowledge base, analyzing the ontology data to obtain an inference rule library, wherein the inference rule library includes at least: a plurality of inference rules for inferring hierarchical relationships between individuals.
[0053] In an embodiment of the present invention, a preset ontology description strategy (i.e., an ontology language, for example, RDF (Resource Description Framework), OWL (ontology language)) can be used to describe the domain ontology in the genealogical knowledge graph, and a preset conversion tool (e.g., the tool Protégé (AI, artificial intelligence)) can be used to construct the described domain ontology into ontology data (i.e., the ontology language and conversion tools can be used to construct the domain ontology in the graph into data that can be recognized by a computer for automated processing).
[0054] Determine the relational reasoning requirement information corresponding to the genealogical knowledge graph (i.e., the common cognitive information in the genealogy, for example, if A is B's wife, then we know that B is A's husband), and use the reasoning requirement information and pre-defined reasoning rules (for example, for the reasoning machine Jena, it is an ontology language development toolkit based on the Java framework, which supports the construction of ontologies in multiple ontology languages, and has its own related reasoning mechanism, with complete ontology parsing, storage and query functions and related calling interfaces. If the reasoning machine Jena is used for reasoning, the reasoning rules pre-defined by Jena can be used), infer the association relationship in the genealogy.
[0055] In this embodiment, based on a preset knowledge base (for example, the human intelligence HI and the organizational intelligence OI analyze the acquired genealogy knowledge graph), the ontology data can be input into a terminal (for example, a computer, etc.) for analysis to obtain an inference rule base, wherein the inference rule base has multiple inference rules for inferring hierarchical relationships between individuals. As shown in Table 1, 4 inference rules in the inference rule base are listed, wherein a, b, and c represent individuals, fa represents character relationships, and → represents the inferred character relationships. For example, in Rule 1, if the son of individual a is b, then the father of b is a, and the other inference rules are the same.
[0056] Table 1
[0057]
[0058] Optionally, after constructing the inference rule base, the noise detection method also includes: obtaining a genealogical knowledge graph used in the historical process; based on the inference rule base, reasoning on the hierarchical relationship between each two individuals in the genealogical knowledge graph to obtain an inference knowledge result; analyzing the inference knowledge result to obtain an analysis result, wherein the analysis result is used to characterize whether there is a conflict relationship in the inference knowledge result, and the conflict relationship is used to indicate that there is a conflict between the hierarchical relationship currently inferred and the known hierarchical relationship and / or the known inference hierarchical relationship of the genealogical knowledge graph; when there is a conflict relationship in the analysis result, the conflict relationship is added to the noise sub-graph library.
[0059] In the embodiment of the present invention, kinship reasoning can be realized and the noise sub-graph library can be summarized and constructed, as follows: the inference engine Jena can be used to infer the relationships (i.e., hierarchical relationships) between characters in the genealogical knowledge graph used in the historical process based on the inference rule library. Figure 3 is a schematic diagram of an optional reasoning knowledge result according to an embodiment of the present invention, such as Figure 3 As shown, there is a conflict between the currently inferred hierarchical relationship and the known hierarchical relationship and / or the known inferred hierarchical relationship of the genealogical knowledge graph, where solid circles represent males, dotted circles represent females, bold lines represent inferred relationships, and thin lines represent original relationships.
[0060] Alternatively, this embodiment may use human intelligence and organizational intelligence (HI+OI) to analyze the inference knowledge results, obtain the causes of the conflicts, and add the conflicting relationships to the noise sub-graph library to construct the noise sub-graph library. Figure 3 The reasoning knowledge results in , through HI+OI summary and analysis, we can know that the reason for the conflict is the existence of relationship self-loop (such as Figure 4 As shown, a conflict relationship is illustrated, representing a's wife or a itself), and the conflict relationship is added to the noise subgraph library as a noise subgraph.
[0061] Step S202, obtaining a pre-constructed noise sub-graph library and a family tree knowledge graph to be detected, wherein the noise sub-graph library is obtained by summarizing the inference knowledge results, and the noise sub-graph library includes: at least one noise sub-graph.
[0062] In an embodiment of the present invention, the relationships between characters in the genealogical knowledge graph used in the historical process can be inferred in advance, and then HI+OI is used to analyze and summarize the inference results to obtain a noise subgraph, and a noise subgraph library is constructed through multiple noise subgraphs.
[0063] Step S204: Based on the graph matching algorithm, detect whether there is a family tree subgraph in the family tree knowledge graph that has the same structure and the same semantics as the noise subgraph, and obtain a detection result.
[0064] In an embodiment of the present invention, the noise subgraph library can be read and the precise subgraph matching algorithm can be called. Using formulas (1) to (6), subgraphs with the same semantics and structure can be retrieved in the genealogical knowledge graph (i.e., it can be detected whether there is a genealogical subgraph with the same structure and semantics as the noise subgraph in the genealogical knowledge graph) to obtain the detection result.
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] Among them, V represents a node, E represents an edge, represents the mapping function, represents the bijective function, and M is the matching result. For example, given a data graph (i.e., a family tree subgraph) and the query graph (i.e., the noise subgraph) Among them, |V G |>|V Q |(|V| represents the number of nodes in the graph), the exact subgraph matching result is There exists a bijective function in the data graph G and the query graph Q And it satisfies the subgraph matching formulas (1) to (4), where (1)-(4) are graph structure matching constraints (i.e., used to determine whether they have the same structure), the data graph must have the same nodes and edges as the query graph, (5)(6) are semantic matching constraints (i.e., used to determine whether they have the same semantics), the matched nodes and edges must meet the constraint that the attribute values of the points and edges are the same. For example, Figure 4 The conflict relationship represented by is a query graph, Figure 5 It is a data graph, and the search result is that Wu*Zhu has a wife relationship with himself.
[0072] Step S206, when the detection result indicates that there is a family tree subgraph in the family tree knowledge graph that has the same structure and the same semantics as the noise subgraph, it is determined that there is noise in the family tree knowledge graph.
[0073] In an embodiment of the present invention, if a family tree subgraph having the same structure and the same semantics as a noise subgraph is detected in the family tree knowledge graph, it indicates that noise exists in the family tree knowledge graph.
[0074] Optionally, after determining that there is noise in the genealogical knowledge graph, the noise detection method further includes: classifying noise data in the noise to obtain a noise classification result; and sending the noise classification result to the client.
[0075] In an embodiment of the present invention, after determining that there is noise in the genealogical knowledge graph, the noise data in the noise can be fed back to the user by category (i.e., the noise data in the noise is classified, and the noise classification results are sent to the client). Table 2 is the noise detection result after classification. As shown in Table 2, the left side is the defined noise type, and the right side is the noise data, which can be returned in the form of a triple (starting person, relationship type, ending person). For example, "(Wu*Zhu, wife, Wu*Zhu)" means that "Wu*Zhu" has a "wife relationship" with himself, and (Wu*Sheng, wife, Wu*Sheng)" means that "Wu*Sheng" has a "wife relationship" with himself. These noise data can be uniformly summarized into category 1 (i.e., noise data that has a wife relationship with itself). Other classification methods are the same and will not be repeated here.
[0076] Table 2
[0077]
[0078] Optionally, after sending the noise classification result to the client, the noise detection method further includes: controlling the client to complete the family tree knowledge graph and / or delete the noise data based on the noise classification result to update the family tree knowledge graph.
[0079] In an embodiment of the present invention, after obtaining these noise classification results, the user can complete the genealogical knowledge graph and / or delete the noise data to update the genealogical knowledge graph, so that the correctness and completeness of the updated genealogical knowledge graph can be further improved.
[0080] Figure 6 It is a schematic diagram of an optional noise detection method architecture of a family tree knowledge graph according to an embodiment of the present invention, including: family tree knowledge graph, knowledge reasoning, noise detection and HAO intelligence.
[0081] like Figure 6 As shown, in the embodiment of the present invention, a family tree ontology and an inference rule library are first constructed to perform relationship reasoning, that is, to infer the knowledge of kinship in the family tree. After that, HAO intelligence can be used to analyze whether there is a conflict between the reasoned knowledge and the original knowledge or the reasoned knowledge (that is, to perform noise detection). When there is a conflict, there may be noise. Through HI+OI induction and summarization, a noise subgraph can be constructed. Then, using the precise subgraph matching algorithm, all the noise in the family tree can be obtained. HAO intelligence serves as a technical support throughout the entire noise detection process.
[0082] In an embodiment of the present invention, knowledge reasoning rules in a family tree knowledge graph can be predefined by human intelligence and organizational intelligence (HI+OI) to form a knowledge reasoning rule library. Then, artificial intelligence (AI) is used to complete knowledge reasoning in the family tree, and human intelligence and organizational intelligence (HI+OI) are used to guide the induction and summary of reasoning knowledge, and further review to form a noise subgraph library. Afterwards, based on the noise subgraph provided by the noise subgraph library, the noise existing in the family tree knowledge graph is detected by an accurate subgraph matching algorithm, so that the noise in the family tree can be detected quickly and accurately, and the quality and usability of the family tree knowledge graph can be improved. At the same time, the constructed family tree knowledge reasoning rule library and noise subgraph library can be continuously expanded and enriched, and can be easily migrated to other family trees for detection. The present invention can also provide reference for the optimization of knowledge graphs in other fields by combining knowledge reasoning technology, accurate subgraph matching technology and HAO intelligent technology.
[0083] Example 2
[0084] A noise detection device for a family tree knowledge graph provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment one.
[0085] Figure 7 is a schematic diagram of a noise detection device for a family tree knowledge graph according to an embodiment of the present invention. Figure 7 As shown, the detection device may include: an acquisition unit 70, a detection unit 72, and a determination unit 74, wherein:
[0086] The acquisition unit 70 is used to acquire a pre-built noise sub-graph library and a family tree knowledge graph to be detected, wherein the noise sub-graph library is obtained by summarizing the inference knowledge results, and the noise sub-graph library includes: at least one noise sub-graph;
[0087] A detection unit 72 is used to detect whether there is a family tree subgraph with the same structure and the same semantics as the noise subgraph in the family tree knowledge graph based on a graph matching algorithm, and obtain a detection result;
[0088] The determination unit 74 is used to determine that there is noise in the family tree knowledge graph when the detection result indicates that there is a family tree subgraph with the same structure and the same semantics as the noise subgraph in the family tree knowledge graph.
[0089] The above detection device can obtain a pre-constructed noise subgraph library and a genealogical knowledge graph to be detected through the acquisition unit 70, wherein the noise subgraph library is obtained by summarizing the inference knowledge results, and the noise subgraph library includes: at least one noise subgraph, and the detection unit 72 detects whether there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph based on the graph matching algorithm to obtain the detection result, and the determination unit 74 determines that there is noise in the genealogical knowledge graph when the detection result indicates that there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph. In the embodiment of the present invention, the noise subgraph library can be constructed through a predefined inference rule library, and the genealogical knowledge graph can be matched with the noise subgraph in the noise subgraph library by using the graph matching algorithm, so that the noise in the genealogical knowledge graph can be detected quickly and accurately, and the quality and availability of the genealogical knowledge graph can be improved, thereby solving the technical problems in the related art that it is difficult to detect the noise in the genealogical knowledge graph and the detection efficiency is low.
[0090] Optionally, the noise detection device also includes: a first acquisition module, used to obtain the genealogical knowledge graph used in the historical process before obtaining the genealogical knowledge graph to be detected; a first determination module, used to analyze the genealogical knowledge graph based on a preset knowledge base, and determine the domain ontology in the genealogical knowledge graph, wherein the domain ontology includes at least: classes, relationships between classes, attributes, class axioms, and individuals.
[0091] Optionally, the attributes include: object attributes and data attributes, wherein the object attributes are used to indicate the hierarchical relationship between individuals, and the data attributes are used to describe the attribute values of an individual.
[0092] Optionally, the noise detection device also includes: a first construction module, used to adopt a preset ontology description strategy and a preset conversion tool to construct the domain ontology into ontology data, wherein the ontology data is used for input of an external device; a second determination module, used to analyze the ontology data based on a preset knowledge base to obtain an inference rule library, wherein the inference rule library includes at least: a plurality of inference rules for inferring hierarchical relationships between individuals.
[0093] Optionally, the noise detection device also includes: a second acquisition module, used to acquire the genealogical knowledge graph used in the historical process after constructing the inference rule base; a first inference module, used to infer the hierarchical relationship between each two individuals in the genealogical knowledge graph based on the inference rule base, and obtain the inference knowledge result; a third analysis module, used to analyze the inference knowledge result to obtain the analysis result, wherein the analysis result is used to characterize whether there is a conflict relationship in the inference knowledge result, and the conflict relationship is used to indicate that there is a conflict between the hierarchical relationship currently inferred and the known hierarchical relationship and / or the known inference hierarchical relationship of the genealogical knowledge graph; a first adding module, used to add the conflict relationship to the noise sub-graph library when there is a conflict relationship in the analysis result.
[0094] Optionally, the noise detection device also includes: a first classification module, which is used to classify the noise data in the noise after determining that there is noise in the genealogical knowledge graph to obtain a noise classification result; and a first sending module, which is used to send the noise classification result to the client.
[0095] Optionally, the noise detection device also includes: after sending the noise classification result to the client, a first update module is used to control the client to complete the family tree knowledge graph and / or delete the noise data based on the noise classification result to update the family tree knowledge graph.
[0096] The above-mentioned detection device may also include a processor and a memory. The above-mentioned acquisition unit 70, detection unit 72, determination unit 74, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0097] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the presence of noise in the genealogical knowledge graph can be determined by adjusting kernel parameters.
[0098] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0099] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a pre-constructed noise subgraph library and a genealogical knowledge graph to be detected, wherein the noise subgraph library is obtained by summarizing the reasoning knowledge results, and the noise subgraph library includes: at least one noise subgraph; based on a graph matching algorithm, detecting whether there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph, and obtaining a detection result; when the detection result indicates that there is a genealogical subgraph with the same structure and the same semantics as the noise subgraph in the genealogical knowledge graph, determining that there is noise in the genealogical knowledge graph.
[0100] According to another aspect of an embodiment of the present invention, an electronic device is provided, characterized in that it includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned noise detection methods for the genealogical knowledge graph by executing the executable instructions.
[0101] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned noise detection methods for the genealogical knowledge graph.
[0102] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0103] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0108] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A noise detection method for a family tree knowledge graph, characterized in that: include: Before obtaining the genealogical knowledge graph to be tested, obtain the genealogical knowledge graph used in the historical process; Based on a preset knowledge base, the family tree knowledge graph is analyzed to determine a domain ontology in the family tree knowledge graph, wherein the domain ontology at least includes: classes, attributes, class axioms, and individuals; The domain ontology is constructed into ontology data by using a preset ontology description strategy and a preset conversion tool, wherein the ontology data is used for input of an external device; based on a preset knowledge base, the ontology data is analyzed to obtain an inference rule base, wherein the inference rule base at least includes: a plurality of inference rules for inferring hierarchical relationships between individuals; Acquire the genealogical knowledge graph used in the historical process; based on the inference rule library, infer the hierarchical relationship between every two individuals in the genealogical knowledge graph to obtain the inference knowledge result; analyze the inference knowledge result to obtain the analysis result, wherein the analysis result is used to characterize whether there is a conflict relationship in the inference knowledge result, and the conflict relationship is used to indicate that there is a conflict between the hierarchical relationship currently inferred and the known hierarchical relationship and / or the known inference hierarchical relationship of the genealogical knowledge graph; if the conflict relationship exists in the analysis result, add the conflict relationship to the noise sub-graph library; Obtaining a pre-built noise sub-graph library and a family tree knowledge graph to be detected, wherein the noise sub-graph library is obtained by summarizing the inference knowledge results, and the noise sub-graph library includes: at least one noise sub-graph; Based on the graph matching algorithm, detect whether there is a family tree subgraph with the same structure and the same semantics as the noise subgraph in the family tree knowledge graph, and obtain a detection result; When the detection result indicates that there is a family tree subgraph having the same structure and the same semantics as the noise subgraph in the family tree knowledge graph, it is determined that there is noise in the family tree knowledge graph.
2. The noise detection method according to claim 1, characterized in that: The attributes include: object attributes and data attributes, wherein the object attributes are used to indicate the hierarchical relationship between individuals, and the data attributes are used to describe the attribute values of an individual.
3. The noise detection method according to claim 1, characterized in that: After determining that noise exists in the family tree knowledge graph, the noise detection method further includes: Classifying the noise data in the noise to obtain a noise classification result; The noise classification result is sent to the client.
4. The noise detection method according to claim 3, characterized in that: After sending the noise classification result to the client, the noise detection method further includes: Control the client to complete the family tree knowledge graph and / or delete the noise data based on the noise classification result to update the family tree knowledge graph.
5. A noise detection device for a family tree knowledge graph, characterized in that: include: An acquisition unit is used to acquire a pre-built noise sub-graph library and a family tree knowledge graph to be detected, wherein the noise sub-graph library is obtained by summarizing the inference knowledge results, and the noise sub-graph library includes: at least one noise sub-graph; A detection unit, configured to detect whether there is a family tree subgraph having the same structure and the same semantics as the noise subgraph in the family tree knowledge graph based on a graph matching algorithm, and obtain a detection result; a determination unit, configured to determine that noise exists in the family tree knowledge graph when the detection result indicates that there exists a family tree subgraph having the same structure and the same semantics as the noise subgraph in the family tree knowledge graph; The noise detection device further includes: a first acquisition module, used to acquire the family tree knowledge graph used in the historical process before acquiring the family tree knowledge graph to be detected; a first determination module, used to analyze the family tree knowledge graph based on a preset knowledge base to determine the domain ontology in the family tree knowledge graph, wherein the domain ontology at least includes: classes, relations between classes, attributes, class axioms, and individuals; The noise detection device further includes: a first construction module, used to construct the domain ontology into ontology data by using a preset ontology description strategy and a preset conversion tool, wherein the ontology data is used for input of an external device; a second determination module, used to analyze the ontology data based on a preset knowledge base to obtain an inference rule library, wherein the inference rule library at least includes: a plurality of inference rules for inferring hierarchical relationships between individuals; The noise detection device also includes: a second acquisition module, which is used to acquire the genealogical knowledge graph used in the historical process after constructing the inference rule base; a first inference module, which is used to infer the hierarchical relationship between every two individuals in the genealogical knowledge graph based on the inference rule base to obtain an inference knowledge result; a third analysis module, which is used to analyze the inference knowledge result to obtain an analysis result, wherein the analysis result is used to characterize whether there is a conflict relationship in the inference knowledge result, and the conflict relationship is used to indicate that there is a conflict between the hierarchical relationship currently inferred and the known hierarchical relationship and / or the known inference hierarchical relationship of the genealogical knowledge graph; a first adding module, which is used to add the conflict relationship to the noise sub-graph library when the conflict relationship exists in the analysis result.
6. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the noise detection method of the genealogical knowledge graph described in any one of claims 1 to 4 by executing the executable instructions.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the noise detection method for the genealogical knowledge graph described in any one of claims 1 to 4.
