Knowledge graph semantic conflict positioning method
By searching for relevant subgraphs in the knowledge graph and selecting wrong triplets sets, the problem of semantic conflicts in the existing technology cannot be located, the efficient semantic conflict positioning and error correction of the knowledge graph is achieved, and the knowledge graph is improved. Quality management capabilities.
Patent Information
- Application Number
- CN202411229795.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing knowledge graph error detection methods cannot effectively locate specific triples in semantic conflicts, resulting in the inability to correct and correct, affecting the quality management of the knowledge graph.
By searching for relevant subgraphs in the knowledge graph, selecting the wrong triplet collection, and performing conflict filtering, marking the triplets of semantic conflict, realizing the positioning of semantic conflicts. Specific methods include breadth-first search to generate relevant subgraphs, selecting policies (satisfies the stop strategy or no missed policies), and conflict filtering to ensure recall and accuracy.
It realizes automatic and efficient positioning of semantic conflicts in large-scale knowledge graphs, improves the quality management capabilities of knowledge graphs, and improves the effectiveness and accuracy of error correction.
Smart Images

Figure CN119168031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer data management technology, and in particular to a method for locating semantic conflicts in a knowledge graph. Background Art
[0002] Knowledge graphs (KGs) are often used to store and represent real-world information, which can significantly enhance the capabilities of cross-domain data-driven applications such as data management, information retrieval, and artificial intelligence. Therefore, maintaining the integrity and good quality of KGs is crucial for the smooth and correct execution of downstream applications. For example, in PC fault detection, the combination of different software and hardware is very complex, and uncorrected errors or conflicts in newly added knowledge may hinder the relevant operations of technicians. At the same time, considering the large volume of domain knowledge graphs, it is usually difficult to manually verify the correctness of the entire knowledge graph, so it is necessary to effectively manage the quality of the large amount of data in the knowledge graph through automatic verification.
[0003] For this reason, error detection in knowledge graphs has been widely studied. Currently, the main methods used include learning-based methods and rule-based methods for corresponding error detection, among which:
[0004] Learning-based research mainly focuses on discussing the correctness of a single triple and relies on the support of other triples for verification; in some scenarios, the semantics of each independent triple cannot be directly determined because it depends on the semantic connection with other triples in a specific KG to determine whether it is correct or wrong. In other words, most existing research ignores the errors caused by the semantic combination of complex relations related to the relation path.
[0005] Although rule-based research has begun to explore the rules in the path, it is usually manifested as whether there are conflicts between multiple triples that obey a specific pattern. Such errors usually appear in the form of semantic conflicts and involve a series of interrelated triples. However, existing methods cannot directly determine which of these interrelated triples is wrong, causing this group of related triples to have semantic conflicts.
[0006] For the above reasons, if a semantic conflict is detected but the specific erroneous triple cannot be located, further error correction and rectification cannot be performed, which is meaningless for knowledge graph quality management. Summary of the invention
[0007] The purpose of the present invention is to provide a method for locating semantic conflicts in a knowledge graph, so as to effectively detect and locate semantic conflicts in a knowledge graph, thereby solving the problems existing in the prior art.
[0008] The objective of the present invention is achieved through the following technical solutions:
[0009] A method for locating semantic conflicts in a knowledge graph, comprising:
[0010] In the knowledge graph containing semantic conflicts, a relevant subgraph containing the set of triples containing semantic conflicts in the knowledge graph is obtained by searching for the set of triples containing semantic conflicts;
[0011] Based on the relevant subgraph, a set of erroneous triples containing semantic conflicts is selected and obtained;
[0012] Conflict filtering is performed on the set of erroneous triples to obtain triples marked with semantic conflicts, thereby locating semantic conflicts in the knowledge graph.
[0013] The process of searching for a relevant subgraph containing a set of triples with semantic conflicts in all knowledge graphs includes:
[0014] Performing a breadth-first search operation of a predetermined number of hops on each entity included in the set of triples containing semantic conflicts, and obtaining all entities that each entity passes through within the predetermined number of hops;
[0015] The triples of all the entities are obtained to form the relevant subgraph.
[0016] The implementation strategy of selecting and obtaining a set of erroneous triples containing semantic conflicts includes:
[0017] Satisfy the stopping strategy, that is, once the selected candidate set of wrong triples can cover all the input triple sets with semantic conflicts, stop selecting new triples to enter the candidate set;
[0018] or,
[0019] The no-omission strategy means that the selected candidate set of erroneous triples must satisfy both the following requirements: covering all input triples with semantic conflicts and not missing any erroneous triples in the subgraph.
[0020] The implementation process of satisfying the stopping strategy includes:
[0021] Perform conflict detection in the relevant subgraphs to obtain a set of triples containing semantic conflicts;
[0022] For each triple in the set of triples containing semantic conflicts, respectively calculating the set coverage and the conflict coverage in the relevant subgraph;
[0023] The triplet with the smallest difference between set coverage and conflict coverage that has not been selected in the set of triples containing semantic conflicts is put into a candidate set, and is deleted from the set of all triples containing semantic conflicts, and the set coverage and conflict coverage of other unselected triples are updated; until the intersection of the candidate set and each set of triples containing semantic conflicts is not empty, the candidate set is the set of erroneous triples containing semantic conflicts.
[0024] The implementation process of the no-leakage strategy includes:
[0025] Perform conflict detection in the relevant subgraphs to obtain a set of triples containing semantic conflicts;
[0026] For each triple in the set of triples containing semantic conflicts, respectively calculating the set coverage and the conflict coverage in the relevant subgraph;
[0027] The triples whose set coverage and conflict coverage differences that have not been selected in the set of triples containing semantic conflicts are less than or equal to 0 and whose difference is the smallest are put into the candidate set, and are deleted from the set of all triples containing semantic conflicts, and the set coverage and conflict coverage of other unselected triples are updated; until the intersection of the candidate set and each set of triples containing semantic conflicts is not empty, and the unselected triples all have a coverage and conflict coverage difference greater than 0, at which time the candidate set is the set of erroneous triples containing semantic conflicts.
[0028] The calculation formulas for the set coverage and conflict coverage include:
[0029]
[0030] The above-mentioned process of performing conflict filtering on the set of erroneous triples includes:
[0031] For each triple in the set of erroneous triples, find a pattern corresponding to the triple;
[0032] Performing conflict detection on the pattern corresponding to each triple, and deleting the triples determined to have no semantic conflict through conflict detection from the set of erroneous triples to obtain a set of erroneous triples after conflict detection processing;
[0033] For the set of erroneous triples after the conflict detection process, the number of times any two triplets co-occur in the same type of pattern is determined; if the number of co-occurrences is greater than a predetermined value, the triplet pair consisting of the two triplets is marked as a conflicting triplet.
[0034] The process of marking the triplet pair consisting of the two triples as a conflicting triplet includes: assigning the two triples as pseudo labels to each other.
[0035] The predetermined number of hops is a parameter value greater than or equal to 3; the number of common occurrences is greater than the predetermined value in the predetermined value is a parameter value greater than 2.
[0036] Compared with the prior art, the method for locating semantic conflicts in a knowledge graph provided by the present invention can be applied to large-scale knowledge graphs without the need for pattern search in the process of locating semantic conflicts in a knowledge graph after specific pattern conflict detection, while meeting the method requirements for repeated errors. Furthermore, the present invention also ensures that all erroneous triples are included in the candidate set through a selection method and a filtering method, and filters out triples that appear frequently but are correct, so that the recall rate and accuracy of the conflict location method can reach a high level. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0038] Figure 1 A schematic diagram of the processing process of generating relevant subgraphs and selecting erroneous triples provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a process for filtering correct triples provided by an embodiment of the present invention;
[0040] Figure 3 A pseudo code diagram of an error triple selection algorithm that satisfies a stopping strategy provided by an embodiment of the present invention;
[0041] Figure 4 A pseudo code diagram of an erroneous triple selection algorithm of a no-omission strategy provided in an embodiment of the present invention;
[0042] Figure 5 A pseudo code diagram of a correct triplet filtering algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in combination with the specific content of the present invention; it is obvious that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, which does not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0044] First, the terms that may be used in this article are explained as follows:
[0045] The term “and / or” means that either or both of them can be realized at the same time. For example, X and / or Y means both “X” or “Y” and “X and Y”.
[0046] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0047] The term "consisting of..." means excluding any technical feature elements not explicitly listed. If this term is used in a claim, it will make the claim closed, so that it does not contain technical feature elements other than the technical feature elements explicitly listed, except for the conventional impurities related to them. If this term only appears in a clause of a claim, it only limits the elements explicitly listed in the clause, and the elements recorded in other clauses are not excluded from the overall claim.
[0048] Unless otherwise specified or limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this article can be understood according to specific circumstances.
[0049] When concentration, temperature, pressure, size or other parameters are expressed in the form of a numerical range, the numerical range should be understood to specifically disclose all ranges formed by the pairing of any upper limit, lower limit, and preferred value in the numerical range, regardless of whether the range is explicitly stated; for example, if a numerical range of "2 to 8" is stated, the numerical range should be interpreted as including ranges such as "2 to 7", "2 to 6", "5 to 7", "3 to 4 and 6 to 7", "3 to 5 and 7", "2 and 5 to 7", etc. Unless otherwise specified, the numerical ranges stated herein include both their end values and all integers and fractions within the numerical range.
[0050] The orientation or position relationship indicated by terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc. are based on the orientation or position relationship shown in the drawings and are only for the convenience and simplification of description, and do not explicitly or implicitly indicate that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation of this document.
[0051] The embodiment of the present invention specifically proposes a method for locating semantic conflicts in a knowledge graph after specific pattern conflict detection, which can automatically and efficiently locate erroneous triples that meet specific patterns in large-scale knowledge graphs.
[0052] Specifically, the corresponding method for locating semantic conflicts in a knowledge graph after specific pattern conflict detection may include: a related subgraph generation method, an erroneous triple selection method and a correct triple filtering method during implementation; wherein: the related subgraph generation method refers to searching for a related subgraph containing a set of triples containing semantic conflicts in a knowledge graph containing semantic conflicts (such as a corresponding set of triples containing semantic conflicts that can be detected through specific patterns, etc.) to obtain a set of triples containing all semantic conflicts in the knowledge graph; the erroneous triple selection method refers to selecting a set of erroneous triples containing semantic conflicts based on the related subgraph; the correct triple filtering method refers to conflict filtering the set of erroneous triples and performing semantic conflict marking on the set to obtain triples marked with semantic conflicts, thereby locating the semantic conflicts in the knowledge graph.
[0053] The specific implementation process of each of the above methods will be described in detail below.
[0054] (1) The specific implementation process of the related subgraph generation method may include the following steps:
[0055] Step 1, initialize the existing entity;
[0056] Specifically, all triples in each triple set determined to contain semantic conflicts are merged to form a triple set, and all entities constituting the triples are put into the entity set;
[0057] Step 2, use breadth-first search to find all entities within a fixed number of hops;
[0058] That is, a breadth-first search operation with a predetermined number of hops is performed on each entity included in the set of triples containing semantic conflicts, so as to obtain all entities that each entity passes through within the predetermined number of hops; specifically, the entity set of step 1 can be used to perform a breadth-first search operation with a fixed number of hops λ on each entity therein, so as to find all entities that each entity passes through within the fixed number of hops; wherein the value of the fixed number of hops belongs to the range of hyperparameters, and a better value can be determined by experiments or directly specified, and generally needs to be greater than or equal to 3;
[0059] Step 3, obtaining the triples of the subgraph, that is, obtaining the triples of all the entities to form the relevant subgraph;
[0060] That is, find the links (triples) of all entities in step 2, and the corresponding triplets constitute a related subgraph, that is, a subgraph of the original set of all triples containing semantic conflicts in the knowledge graph.
[0061] (2) The aforementioned method for selecting an erroneous triplet may adopt the following strategies during its implementation: a stop strategy upon satisfaction and a no-omission strategy. The implementation methods of the two strategies will be described in detail below.
[0062] (21)Satisfy the stopping strategy
[0063] Satisfying the stopping strategy means that once the selected candidate set of wrong triples can cover all input triple sets with semantic conflicts, the selection of new triples into the candidate set will be stopped; that is:
[0064] Conflict detection is performed in the relevant subgraph to obtain one or more triple sets containing semantic conflicts; and the set coverage and conflict coverage of each triple in the triple set containing semantic conflicts are calculated in the relevant subgraph; then, the triple in the triple set containing semantic conflicts with the smallest difference between the selected set coverage and conflict coverage is put into the candidate set, and is deleted from the triple set containing semantic conflicts, and the set coverage and conflict coverage of other unselected triples are updated; the above selection process is repeated until the intersection of the candidate set and each triple set containing semantic conflicts is not empty, and the candidate set is the erroneous triple set containing semantic conflicts.
[0065] The specific implementation steps of the method for selecting the corresponding error triplet under the stop strategy may include:
[0066] Step 1: Detect conflicts in relevant subgraphs (i.e., subgraphs):
[0067] That is, a specific mode of conflict detection is performed on the subgraph obtained according to the above subgraph generation method to obtain a set of all triples containing semantic conflicts in the subgraph, which may be one or more;
[0068] Step 2, calculating the index of the set of triples containing semantic conflicts;
[0069] That is, for each triple in the set of triples containing semantic conflicts obtained in step 1, calculate its set coverage and conflict coverage in the subgraph;
[0070]
[0071] Step 3, selecting triples of the candidate set;
[0072] Among all the triple sets containing semantic conflicts, corresponding triples are selected and put into the candidate set as the set of wrong triples containing semantic conflicts;
[0073] The corresponding specific selection method may include: for the unselected triples in the set of triples containing semantic conflicts, selecting the triple with the smallest difference between its set coverage and conflict coverage and putting it into the candidate set, and deleting it from the set of all triples containing semantic conflicts, and updating the set coverage and conflict coverage of each triple in the current unselected set of triples;
[0074] The unselected refers to the triples that have not been selected in the process of selecting the triples with the smallest difference between the set coverage and the conflict coverage to be put into the candidate set;
[0075] Step 4, continue the selection process of step 3 above;
[0076] Specifically, step 3 is repeated until the intersection of the candidate set and each triple set containing semantic conflicts is not empty, that is, the selection process for each triple set containing semantic conflicts is completed, and the obtained candidate set is the output of the wrong triple selection method, that is, the candidate set is the wrong triple set containing semantic conflicts.
[0077] (22) No Omission Strategy
[0078] The no-omission strategy means that the selected candidate set of erroneous triples must satisfy both the following requirements: covering all input triples with semantic conflicts and not missing any erroneous triples in the subgraph; that is:
[0079] Conflict detection is performed in the relevant subgraph to obtain a set of triples containing semantic conflicts; for each triple in the set of triples containing semantic conflicts, the set coverage and conflict coverage in the relevant subgraph are calculated respectively; then, the triples in the set of triples containing semantic conflicts whose difference between set coverage and conflict coverage that have not been selected is less than or equal to 0 and whose difference is the smallest are put into the candidate set, and are deleted from the set of all triples containing semantic conflicts, and the set coverage and conflict coverage of other unselected triples are updated; the above selection process is repeated until the intersection of the candidate set and each set of triples containing semantic conflicts is not empty, and the difference between the coverage and conflict coverage of the unselected triples is greater than 0, at which time the candidate set is the set of erroneous triples containing semantic conflicts.
[0080] The specific implementation steps of the method for selecting the corresponding error triples under the no-omission strategy may include:
[0081] Steps 1-2 are the same as the above-mentioned processing process of satisfying the stop strategy, and will not be described in detail here;
[0082] Step 3, selecting triples of the candidate set;
[0083] In the process of selecting triples, for unselected triples, select the triple whose set coverage and conflict coverage difference is less than or equal to 0 and whose difference is the smallest and put it into the candidate set, delete the triple from the corresponding triple set, and update the set coverage and conflict coverage of each triple in the current unselected triple set, so that the parameter indication can be applied in the subsequent processing of selecting triples;
[0084] Step 4, continue to execute the above triple selection process;
[0085] That is, step 3 is repeated until the intersection of the candidate set and each triple set containing semantic conflicts is not empty and the difference between the set coverage and the conflict coverage of the unselected triples is greater than 0. In other words, after the selection process for each triple set containing semantic conflicts is completed, the obtained candidate set is used as the output of the wrong triple selection method. At this time, the candidate set is the wrong triple set containing semantic conflicts.
[0086] (3) The correct triple filtering method can realize the location processing of knowledge graph semantic conflicts through the filtering method, and its specific implementation process may include the following steps:
[0087] Step 1, perform a pattern search process;
[0088] That is, for each triple in the set of erroneous triples, a pattern corresponding to the triple is found; specifically, for each triple in the set of candidate erroneous triples output by the erroneous triple selection method, a pattern containing the triple is found.
[0089] Step 2, performing conflict detection processing, that is, performing conflict detection on the pattern corresponding to each triple, and for the triples determined to have no semantic conflict through conflict detection, deleting them from the set of error triples, and obtaining the set of error triples after conflict detection processing;
[0090] Specifically, for each triple pattern, conflict detection can be performed using, but is not limited to, existing conflict detection methods. For a set of triples that pass the conflict detection (i.e., there is no semantic conflict in this set of triples under the pattern), the corresponding triples are deleted from the candidate set.
[0091] Step 3, executing the process of determining the co-occurrence relationship, that is, determining the number of co-occurrences of any two triples in the same type of pattern for the set of erroneous triples after the conflict detection process, and if the number of co-occurrences is greater than a predetermined value, marking the triple pair consisting of the two triples as a conflicting triple;
[0092] Specifically, for all triples obtained by filtering in the above step 2 (i.e., the triples included in the processed candidate set), the number of times they co-occur in the same type of pattern (referred to as the number of co-occurrences) can be determined. For triple pairs whose number of co-occurrences is greater than a predetermined value η, pseudo-labels are assigned to each other, indicating that if one of the triples is wrong, the other triplet is also wrong, and vice versa; wherein the predetermined value η can be a parameter value greater than 2, and its specific parameter value can be determined by experiment or can also be manually specified.
[0093] The method for locating semantic conflicts in a knowledge graph after specific pattern conflict detection provided by the present invention includes a method for generating related subgraphs, which can make it possible to apply to large-scale knowledge graphs without the need for pattern search while meeting the method requirements for repeated errors. Furthermore, the present invention proposes a novel method for locating erroneous triples in a set of semantic conflict triples in a knowledge graph, which ensures that all erroneous triples are included in the candidate set through a selection method and a filtering method, and filters out triples that appear frequently but are correct, so that the recall rate and accuracy of the method can reach a high level.
[0094] To facilitate the understanding of the present invention, the following will describe in detail the method for locating semantic conflicts in a knowledge graph after specific pattern conflict detection provided by the present invention in conjunction with the accompanying drawings. Its application scenarios may include: knowledge graphs containing specific pattern conflicts, such as: star patterns, ring patterns. The specific explanation is as follows:
[0095] Knowledge graph containing specific pattern conflicts: A knowledge graph constructed using entities and relationships in the real world, which may contain conflicts related to specific patterns. Its representation is similar to a directed graph, but the nodes and relationships in the graph have specific semantics. Specific patterns are certain specific combinations in the graph, such as multiple triples forming a ring, multiple triples forming a star structure, etc.
[0096] The following will describe in detail the specific implementation methods of the three implementation processes specifically included in the method for locating semantic conflicts in a knowledge graph provided by an embodiment of the present invention in conjunction with the accompanying drawings.
[0097] (I) The specific implementation process of a corresponding related subgraph generation method is as follows Figure 1 As shown, it may specifically include the following steps:
[0098] Step 1, initialize the existing entity;
[0099] Specifically, the set of triples containing semantic conflicts is Each set of triples containing semantic conflicts in The triples in the tuples are combined to form a set of the current triples And put all entities that make up the current triple into the entity set E = {e1, e2, ..., e k}.
[0100] Step 2, use breadth-first search (BFS) to find all entities within a fixed number of hops;
[0101] That is, using the entity set E = {e1, e2, ..., ek}, perform a breadth-first search with a fixed number of hops λ for each entity, and find all entities E = {e1, e2, …, e q},q>>k.
[0102] Step 3, obtain the triples of related subgraphs;
[0103] That is, find the links (triplets) of all entities in step 2 The corresponding triples constitute a related subgraph sKG, which is the set of all original triples containing semantic conflicts in the knowledge graph. A subgraph sKG of .
[0104] Through the above process, relevant subgraphs can be found from the large-scale knowledge graph and subgraphs containing semantic conflicts can be obtained. Further based on this, more triple sets with semantic conflicts can be obtained, and a set of semantic conflict triple sets in the subgraphs can be obtained, that is, multiple triple sets containing semantic conflicts.
[0105] (ii) A corresponding method for selecting an error triplet may include a method for implementing a stopping strategy and a method for implementing a non-omission strategy in a specific implementation process, referring to Figure 1 , Figure 3 and Figure 4 As shown, where:
[0106] (21)Satisfy the stopping strategy
[0107] The stopping strategy is to stop selecting new triples to enter the candidate set once the selected candidate set of wrong triples can cover all input triple sets with semantic conflicts, such as Figure 3 As shown, the corresponding error triple selection method may specifically include the following steps:
[0108] Step 1, perform conflict detection in the relevant subgraph sKG;
[0109] Specifically, a specific mode of conflict detection can be performed on the subgraph sKG obtained according to the above-mentioned related subgraph generation method to obtain a set of all triple sets containing semantic conflicts in the subgraph: and the set of all triples in that set That is, one or more sets of triples containing semantic conflicts are obtained;
[0110] Wherein, the corresponding specific mode may be, but is not limited to, an existing conflict detection mode;
[0111] Step 2, calculate the set coverage and conflict coverage indicators;
[0112] That is, for each triple obtained in step 1 Compute set coverage within a subgraph and conflict coverage
[0113] The corresponding set coverage and conflict coverage are calculated as follows:
[0114]
[0115] Step 3, selecting triples based on the set coverage and conflict coverage;
[0116] against For the unselected triples, select the difference between the set coverage and the conflict coverage SCR tri -CCR tri The smallest triple tri is put into the candidate set H, and tri is removed from , and update the set coverage and conflict coverage of each triple in the set of triples that are not currently selected;
[0117] Step 4, continue the process of selecting triples;
[0118] That is, repeat step 3 until the candidate set H and each set of triples containing semantic conflicts The intersection of is not empty The candidate set H obtained at this time is the output result of the wrong triple selection, that is, the wrong triple set containing semantic conflicts is obtained.
[0119] (22) No Omission Strategy
[0120] The no-omission strategy means that the selected candidate set of erroneous triples must simultaneously satisfy (1) covering all input triples with semantic conflicts, and (2) not omitting all erroneous triples in the subgraph, such as Figure 4 As shown, the corresponding method for selecting the error triplet may specifically include the following steps:
[0121] Steps 1-2 are the same as the above process of satisfying the stopping strategy;
[0122] Step 3, executing the process of selecting triples;
[0123] That is, for the unselected triples, select the triple tri whose difference between set coverage and conflict coverage is less than or equal to 0 and whose difference is the smallest and put it into the candidate set H, and remove tri from , and update the set coverage SCR and conflict coverage CCR of each triple in the currently unselected triple set;
[0124] Step 4, continue to execute the above triple selection process;
[0125] That is, repeat step 3 until the candidate set H and each set of triples containing semantic conflicts The intersection of is not empty And the unselected triples Average SCR tri -CCR tri >0. At this time, the candidate set H obtained is the output result of the wrong triple selection, that is, the wrong triple set containing semantic conflicts is obtained.
[0126] Through the above two methods, a candidate error triple set, ie, a corresponding candidate set, can be obtained by locating conflicts.
[0127] (III) The corresponding implementation process of a correct triple filtering method can be as follows Figure 2 and Figure 5 As shown, the following steps may be specifically included:
[0128] Step 1, perform pattern search processing;
[0129] Specifically, for each triplet t in the candidate error triplet set H output for error triple selection c , find a pattern containing the triple
[0130] That is, for each error triple, find a set that contains a specific pattern of it;
[0131] Step 2, performing conflict detection processing;
[0132] After obtaining the specific pattern set of each triple in the candidate set, we can c Mode Perform conflict detection (such as but not limited to using existing conflict detection methods ConflictDetection to perform conflict detection) to determine the set of triples with semantic conflicts and find the corresponding triples. For the set of triples that pass the conflict detection (i.e., the set of triples in this mode has no semantic conflicts), Then the corresponding triplet t′ c Delete from the candidate set H;
[0133] After completing the conflict detection process for each triple in the triple set H, execute step 3;
[0134] Step 3, determine the co-occurrence relationship: for all the triplets filtered in step 2 (i.e., the set of wrong triplets), i.e., the filtered triplet set H, mark the co-occurring triplets, i.e., determine the number of co-occurrences (i.e., the number of co-occurrences) between any two triplets (tri, Tri) in the same type of mode. For triplet pairs with a co-occurrence number greater than a predetermined value η, they are marked as conflicting triplets, and specifically, tri can be assigned a pseudo-label Tri, and Tri can be assigned a pseudo-label tri, indicating that if Tri is wrong, then tri is also wrong, and vice versa.
[0135] The value of the predetermined value η can be determined by experiment or specified manually, and usually the parameter value is greater than 2;
[0136] Through the above process, a set of labeled erroneous triples can be obtained to locate the semantic conflicts in the knowledge graph.
[0137] The location of semantic conflicts in the knowledge graph can be achieved through the processing of (i) to (iii) above. The method for locating semantic conflicts in knowledge graphs after specific pattern conflict detection provided by the present invention includes a method for generating related subgraphs, which can make it possible to apply to large-scale knowledge graphs without the need for pattern search while meeting the method requirements for repeated errors. Furthermore, the present invention proposes a novel method for locating erroneous triples in a set of semantic conflict triples in a knowledge graph, which ensures that all erroneous triples are included in the candidate set through a selection method and a filtering method, and filters out triples that appear frequently but are correct, so that the recall rate and accuracy of the method can reach a high level. The present invention also utilizes the corresponding satisfaction stopping strategy and no omission strategy, and reduces the time complexity from O(2 m ) significantly reduces O(m 2 ) (m is the size of the triplet set obtained in step 1 of the error triplet selection method). Experimental studies have confirmed that the present invention can improve the conflict location detection efficiency by 10 6 above.
[0138] Specifically, the embodiment of the present invention uses two public data sets for experimental evaluation during the implementation process. The experimental results show that the wrong triple selection method can include all wrong triples in the candidate set, with a recall rate of 100% and an accuracy rate of more than 80%; the correct triple filtering method can filter out the correct triples in the candidate set, increasing the accuracy rate by at least 10% to more than 95%. At the same time, the method has good performance and can speed up the average by 10% while ensuring the correct results. 5 .
[0139] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or in any form that the information constitutes prior art known to those skilled in the art.
Claims
1. A method for locating semantic conflicts in a knowledge graph, characterized in that: include: In the knowledge graph containing semantic conflicts, a relevant subgraph containing the set of triples containing semantic conflicts in the knowledge graph is obtained by searching for the set of triples containing semantic conflicts; Based on the relevant subgraph, a set of erroneous triples containing semantic conflicts is selected and obtained; Conflict filtering is performed on the set of erroneous triples to obtain triples marked with semantic conflicts, thereby locating semantic conflicts in the knowledge graph.
2. The method according to claim 1, characterized in that The process of searching for a relevant subgraph containing a set of triples with semantic conflicts in all knowledge graphs includes: Performing a breadth-first search operation of a predetermined number of hops on each entity included in the set of triples containing semantic conflicts, and obtaining all entities that each entity passes through within the predetermined number of hops; The triples of all the entities are obtained to form the relevant subgraph.
3. The method according to claim 1, characterized in that The implementation strategy of selecting and obtaining a set of erroneous triples containing semantic conflicts includes: Satisfy the stopping strategy, that is, once the selected candidate set of wrong triples can cover all the input triple sets with semantic conflicts, stop selecting new triples to enter the candidate set; or, The no-omission strategy means that the selected candidate set of erroneous triples must satisfy both the following requirements: covering all input triples with semantic conflicts and not missing any erroneous triples in the subgraph.
4. The method according to claim 3, characterized in that The implementation process of satisfying the stopping strategy includes: Perform conflict detection in the relevant subgraphs to obtain a set of triples containing semantic conflicts; For each triple in the set of triples containing semantic conflicts, respectively calculating the set coverage and the conflict coverage in the relevant subgraph; The triplet with the smallest difference between set coverage and conflict coverage that has not been selected in the set of triples containing semantic conflicts is put into a candidate set, and is deleted from the set of all triples containing semantic conflicts, and the set coverage and conflict coverage of other unselected triples are updated; until the intersection of the candidate set and each set of triples containing semantic conflicts is not empty, the candidate set is the set of erroneous triples containing semantic conflicts.
5. The method according to claim 4, characterized in that The implementation process of the no-leakage strategy includes: Perform conflict detection in the relevant subgraphs to obtain a set of triples containing semantic conflicts; For each triple in the set of triples containing semantic conflicts, respectively calculating the set coverage and the conflict coverage in the relevant subgraph; The triples whose set coverage and conflict coverage differences that have not been selected in the set of triples containing semantic conflicts are less than or equal to 0 and whose difference is the smallest are put into the candidate set, and are deleted from the set of all triples containing semantic conflicts, and the set coverage and conflict coverage of other unselected triples are updated; until the intersection of the candidate set and each set of triples containing semantic conflicts is not empty, and the unselected triples all have a coverage and conflict coverage difference greater than 0, at which time the candidate set is the set of erroneous triples containing semantic conflicts.
6. The method according to claim 4 or 5, characterized in that: The calculation formulas for the set coverage and conflict coverage include:
7. The method according to any one of claims 1 to 5, characterized in that: The above-mentioned process of performing conflict filtering on the set of erroneous triples includes: For each triple in the set of erroneous triples, find a pattern corresponding to the triple; Performing conflict detection on the pattern corresponding to each triple, and deleting the triples determined to have no semantic conflict through conflict detection from the set of erroneous triples to obtain a set of erroneous triples after conflict detection processing; For the set of erroneous triples after the conflict detection process, the number of times any two triplets co-occur in the same type of pattern is determined; if the number of co-occurrences is greater than a predetermined value, the triplet pair consisting of the two triplets is marked as a conflicting triplet.
8. The method according to claim 7, characterized in that The process of marking the triplet pair consisting of the two triples as a conflicting triplet includes: assigning the two triples as pseudo labels to each other.
9. The method according to claim 7, characterized in that: The predetermined number of hops is a parameter value greater than or equal to 3; the number of common occurrences is greater than the predetermined value in the predetermined value is a parameter value greater than 2.
Citation Information
Cited By
Military college online learning management platform based on big data analysis
CN119494474A
