Interpretable knowledge graph error detection and repair method, system and device, medium and product

The challenge of error detection and repair in the knowledge graph is solved by determining triplet confidence in the knowledge graph and generating logical rules, improving data quality and achieving interpretability.

CN119623600AInactive Publication Date: 2025-03-14HANGZHOU DIANZI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411786088.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

As the scale of knowledge graphs expands and the diversification of data sources, data quality issues, such as data errors and inconsistencies, become challenges that cannot be ignored, especially in the complexity of real data and the lack of real labels, detecting errors in knowledge graphs has greater challenges.

Method used

The confidence of each triple is determined through a linking pattern based on the knowledge graph, divided into high-quality triples and error triples, and generated high-quality logical rules based on the high-quality triples to fix the error triples.

Benefits of technology

Improve the quality of knowledge graph data, realize the interpretability of error detection and repair, and enhance the accuracy of triple data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623600A_ABST
    Figure CN119623600A_ABST
Patent Text Reader

Abstract

The invention discloses an interpretable knowledge graph error detection and repair method, system and device, a medium and a product, and relates to the field of knowledge graph detection. Each triple comprises a head entity, a relation and a tail entity; the method comprises the following steps: determining the confidence coefficient of each triple in the knowledge graph based on a link mode of the knowledge graph; the link mode comprises a shared head entity and a shared tail entity; dividing the triads in the knowledge graph into high-quality triads and error triads according to the confidence coefficient of each triad and the set confidence coefficient; determining a plurality of high-quality logic rules based on the high-quality triad; and repairing the error triad based on the plurality of high-quality logic rules. According to the method, errors in the knowledge graph can be detected, and the errors are repaired and explained through a high-quality logic rule. The quality of the knowledge graph data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of knowledge graph detection, and in particular to an explainable knowledge graph error detection and repair method, system, device, medium and product. Background Art

[0002] Among the many data representation methods, knowledge graph, as a form of representation of graph structured data, has attracted widespread attention due to its rich expression ability and flexible modeling ability. As a key technology for organizing and managing large-scale knowledge, knowledge graph has shown its great potential and value in various applications. Knowledge graph stores information in a structured way. It not only contains a large number of entities and relationships between entities, but also contains rich semantic information. Compared with traditional knowledge bases, knowledge graphs have a larger knowledge scale, richer semantic rules and a more friendly storage structure. These characteristics make knowledge graphs an important tool in the field of data mining.

[0003] With the increasing scale of knowledge graphs and the diversification of data sources, data quality issues, especially data errors and inconsistencies, have become challenges that cannot be ignored. However, current research in the field of graph data mainly focuses on the development of technical models such as graph embedding learning and graph search. Research on data cleaning technologies for graph data, including data missing, data errors, and data consistency, is relatively lagging behind. Due to the complexity of real data, real labels are rare or even unavailable, and error patterns are unknown and diverse, which makes it more challenging to detect errors in knowledge graphs. Therefore, how to improve the efficiency of data cleaning while ensuring the interpretability of its process and results has become an important topic of current research. Summary of the invention

[0004] The purpose of this application is to provide an interpretable knowledge graph error detection and repair method, system, device, medium and product that can detect errors in the knowledge graph and repair and explain them through high-quality logical rules. This application improves the quality of knowledge graph data.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides an interpretable knowledge graph error detection and repair method, wherein the knowledge graph includes multiple triples; each triple includes a head entity, a relationship, and a tail entity; the interpretable knowledge graph error detection and repair method includes:

[0007] Determining the confidence of each triple in the knowledge graph based on a link pattern of the knowledge graph; the link pattern includes a shared head entity and a shared tail entity;

[0008] According to the confidence of each triple and the set confidence, the triples in the knowledge graph are divided into high-quality triples and erroneous triples;

[0009] Determining a plurality of high-quality logic rules based on the high-quality triples;

[0010] The erroneous triples are repaired based on the plurality of high-quality logical rules.

[0011] In a second aspect, the present application provides an interpretable knowledge graph error detection and repair system, applying the above-mentioned interpretable knowledge graph error detection and repair method, the knowledge graph includes multiple triples; each triple includes a head entity, a relationship and a tail entity; the interpretable knowledge graph error detection and repair system includes:

[0012] A confidence determination module, configured to determine the confidence of each triple in the knowledge graph based on a link pattern of the knowledge graph; the link pattern includes a shared head entity and a shared tail entity;

[0013] A triple division module, connected to the confidence determination module, for dividing the triples in the knowledge graph into high-quality triples and erroneous triples according to the confidence of each triple and the set confidence;

[0014] a logic rule generation module, connected to the triple division module, for determining a plurality of high-quality logic rules based on the high-quality triples;

[0015] The error triplet repairing module is connected to the logic rule generating module and is used to repair the error triplet based on the multiple high-quality logic rules.

[0016] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned interpretable knowledge graph error detection and repair method.

[0017] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned interpretable knowledge graph error detection and repair method.

[0018] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned interpretable knowledge graph error detection and repair method.

[0019] According to the specific embodiments provided in this application, this application has the following technical effects:

[0020] The present application provides an interpretable knowledge graph error detection and repair method, system, device, medium and product, which determines the confidence of each triple in the knowledge graph through two linking modes: shared head entity and shared tail entity; the two linking modes of shared head entity and shared tail entity enhance the triple data in the knowledge graph, making the confidence of each triple more accurate; and detects the erroneous data in the knowledge graph through each accurate triple confidence, and repairs the erroneous data according to the high-quality logical rules generated by the high-quality triples, and the repair results can also be explained by the high-quality logical rules. The present application improves the quality of the knowledge graph data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 This is an application environment diagram of an interpretable knowledge graph error detection and repair method in one embodiment of the present application;

[0023] Figure 2 A flowchart of an interpretable knowledge graph error detection and repair method provided in one embodiment of the present application;

[0024] Figure 3 A schematic diagram of the functional modules of an interpretable knowledge graph error detection and repair system provided in one embodiment of the present application;

[0025] Figure 4 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] In order to make the purpose, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0028] The interpretable knowledge graph error detection and repair method provided in the embodiments of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send a knowledge graph to the server 104. After the server 104 receives the knowledge graph, it determines the confidence of each triple in the knowledge graph based on the link mode of the knowledge graph; divides the triples in the knowledge graph into high-quality triples and erroneous triples according to the confidence of each triple and the set confidence; determines multiple high-quality logical rules based on the high-quality triples; and repairs the erroneous triples based on the multiple high-quality logical rules. The server 104 can feedback the repair results of the erroneous triples to the terminal 102. In addition, in some embodiments, the interpretable knowledge graph error detection and repair method can also be implemented by the server 104 or the terminal 102 alone.

[0029] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0030] In an exemplary embodiment, Figure 2 As shown, an interpretable knowledge graph error detection and repair method is provided, which is executed by a computer device, and can be specifically executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. The knowledge graph may contain erroneous and inconsistent data. The knowledge graph includes multiple triples; each triple includes a head entity, a relationship, and a tail entity. The interpretable knowledge graph error detection and repair method includes the following steps 201 to 204.

[0031] Step 201, based on the linking pattern of the knowledge graph, determine the confidence of each triple in the knowledge graph; the linking pattern includes a shared head entity and a shared tail entity.

[0032] Step 202, dividing the triples in the knowledge graph into high-quality triples and erroneous triples according to the confidence of each triple and the set confidence.

[0033] Step 203: Determine a plurality of high-quality logic rules based on the high-quality triples.

[0034] Step 204: repair the erroneous triples based on the multiple high-quality logical rules.

[0035] In another exemplary embodiment of the present application, the confidence of each triple in the knowledge graph is determined based on the link pattern of the knowledge graph, and the process also includes: preprocessing the triples of the knowledge graph. Specifically, the structural information of the triples is systematically sorted and stored, and some special symbols are removed to prevent interference with the repair results.

[0036] In another exemplary embodiment of the present application, a triple is defined as (h, r, t), where h represents the head entity, t represents the tail entity, and r represents the relationship entity, that is, the relationship between the head entity and the tail entity.

[0037] In an exemplary embodiment, step 201 specifically includes the following steps 301 to 306 .

[0038] Step 301, initialize the knowledge graph to obtain the entity embedding vector and relationship embedding vector of each triple.

[0039] Step 302: for any triple, according to the entity embedding vector and the relationship embedding vector of the triple, an energy score of the triple is obtained by using the Euclidean distance.

[0040] Step 303 : Starting from the triple, two views of the triple are respectively established based on the triples of the shared head entity and the shared tail entity.

[0041] Step 304 : Determine the global triplet embedding vector of the triplet in two views using an error-aware graph neural network.

[0042] Step 305 : Based on the global triplet embedding vectors of the triplet in two views, a similarity function is used to obtain the similarity of the triplet.

[0043] Step 306: Determine the confidence of the triplet according to the energy score of the triplet and the similarity of the triplet.

[0044] In another exemplary embodiment of the present application, step 303 is specifically as follows: for any triple of two shared entities T1 = (h1, r1, t1) ∩ T2 = (h2, r2, t2), there are two linking modes: 1. Shared header entity: 2. Shared tail entity: Two triple views are constructed using the above two linking modes. Triple view I models the correlation between relation triplets from the perspective of the head entity, while triple view II represents the distribution of relation triplets from the perspective of the tail entity.

[0045] Step 304 specifically includes: based on the entity embedding vector and the relationship embedding vector of the triple, using a bidirectional long short-term memory network and a triple attention mechanism to determine the global triple embedding vector of the triple in two views. Specifically, a group of bidirectional long short-term memory network (Bi-LSTM) units are used to learn the local relationship structure within each triple. Take the triple (h, r, t) as an example:

[0046] (e' h ,e' r ,e' t )=Bi-LSTM(e h ,e r ,e t ).

[0047] Among them, e h is the embedding vector of the head entity, e r is the relation embedding vector, e t is the tail entity embedding vector, e' h is the optimized head entity embedding vector, e' r is the optimized relation embedding vector, e' t To optimize the tail entity embedding vector.

[0048] The triplet attention mechanism is used to learn the global triplet representation of each triplet view, and the attention coefficient α ij As the importance of triple i to triple j, α ij =A(W qi ,W qj ), q=(e' h ,e' r ,e' t ) is the embedding vector after triple optimization, W qi is a learnable linear augmentation matrix used to project the optimized embedding vector of triple i into the same vector space, W qj is a learnable linear augmentation matrix used to project the optimized embedding vector of triple j into the same vector space, and A is the attention function.

[0049] In triplet view I, the global triplet embedding vector of triplet i is expressed as weighted aggregation of neighbor triplets: Where σ is the sigmoid function and m is the number of neighbor triplets in triple view I. The global triple embedding vector in triple view II is represented in the same way as in triple view I.

[0050] In another exemplary embodiment of the present application, the expression of confidence is:

[0051] C(h,r,t)=σ(sim(x i ,z i )-λ·E(h,r,t)).

[0052] Among them, sim(·) is the similarity function, C(h,r,t) is the confidence of the triple, and x i is the global triplet embedding vector of triplet view I, z i is the global triplet embedding vector of triplet view II, λ is the trade-off parameter, sim(x i ,z i ) is the similarity of the triple, which reflects the consistency of the triple in the latent space. If the value is large, it means that the triple may be normal; E(h,r,t) is the energy score of the triple, which measures the internal consistency of the triple itself. If the value is large, it means that the triple may be contradictory. σ is the sigmoid function, which maps the confidence score to the range of [0,1].

[0053] In another exemplary embodiment of the present application, the interpretable knowledge graph error detection and repair method further includes: optimizing the error-aware graph neural network based on graph embedding loss and contrastive learning loss. The expression of the graph embedding loss is:

[0054]

[0055] Among them, L kge is the graph embedding loss value, E(h,r,t) is the energy score of the positive triple, is the energy score of the negative triplet, γ is a hyperparameter, G represents the sampled positive triplet, Represents the sampled negative triples, since there are no clear negative triples in the knowledge graph It is therefore generated by replacing the head or tail entity of a triple with a random entity.

[0056] This application uses normalized temperature scale cross entropy as the contrastive learning target, and the expression of the contrastive learning loss is:

[0057]

[0058] Among them, Lcon(x i ,z i ) is the contrastive learning loss value, τ is the temperature parameter, sim(x i ,z i ) is the similarity of triple i, which measures the consistency of the same triple in triple view I and triple view II. i ,z j) is the similarity between triple i and triple j in triple view I and triple view II, and n is the number of triplets in triple view I or triple view II.

[0059] In another exemplary embodiment of the present application, step 203 specifically includes the following steps 401 to 407 .

[0060] Step 401: Take each relation in the high-quality triple as a rule head.

[0061] Step 402: for any rule head, based on the rule head, a triple path of a specified length is sampled in the knowledge graph as the rule body of the rule head.

[0062] Step 403: Use a sliding window of a set size to divide the rule body into multiple first-level combinations.

[0063] Step 404: for any first-level combination, a recurrent neural network and an attention mechanism are used to determine the attention weights between the relationship sequence of the first-level combination and all the relationships in the high-quality triples; a new representation of the relationship sequence of the first-level combination is obtained based on the attention weights and all the relationships in the high-quality triples; the relationship sequence of the first-level combination includes all the relationships in the first-level combination.

[0064] Among them, for any first-level combination, a recurrent neural network and an attention mechanism are used to determine the attention weights between the relationship sequence of the first-level combination and all the relationships in the high-quality triples, specifically including: inputting the relationship sequence of the first-level combination into a recurrent neural network to obtain an embedding vector of the relationship sequence of the first-level combination; based on the relationship sequence embedding vector of the first-level combination and all the relationships in the high-quality triples, an attention mechanism is used to determine the attention weights between the relationship sequence of the first-level combination and all the relationships in the high-quality triples.

[0065] Specifically, each relationship r As the rule head, a triple path of a specified length is sampled. In order to identify combinations from the sampled paths, sliding windows of different lengths are used to decompose the sampled paths into combinations of different sizes. For example, given a fixed window size s=2, a window sliding rule body of size s is used to separate the triple paths into multiple first-level combinations. For any first-level combination of relation sequences, a recurrent neural network (RNN) is used for encoding to obtain the relation sequence embedding vector of the first-level combination, expressed as: [h t ,h t+1 ]=RNN(w t ).

[0066] Among them, w tis the t-th sliding window, i.e., the relation sequence of the first-level combination t [r bt ,r b(t+1) ],h t For r bt The hidden state, h t+1 For r b(t+1) The hidden state of is used to represent the relation sequence embedding vector of the first-level combination.

[0067] Specifically, the expression of the attention weight is:

[0068] θ=soft max(h t+1 W Q (HW K ) T ).

[0069] Where H is the head relation matrix, which includes all head relations in the high-quality triples; θ is the attention weight, W Q and W K is the learnable parameter matrix and T is the transpose.

[0070] Specifically, the new expression of the combined relation sequence is: t '=θHW V ; where w t ' is a new representation of the combined relation sequence, W V is the input vector.

[0071] Step 405, using a sliding window of a set size to divide the new representations of the relationship sequences of multiple first-level combinations into multiple second-level combinations, and using a recurrent neural network and an attention mechanism to determine the new representation of the relationship sequence of each second-level combination, until the multiple relationship sequences are cyclically reduced to a single relationship, and a new representation of a single relationship is obtained.

[0072] Step 406: Form a logic rule of the rule head based on the single new relationship representation and the head relationship with the largest attention weight in the single new relationship representation.

[0073] Step 407, based on each logic rule of each rule head and the maximum attention weight of the new representation of a single relationship in each logic rule, multiple high-quality logic rules are obtained.

[0074] In another exemplary embodiment of the present application, step 204 specifically includes the following steps 501 to 504.

[0075] Step 501, traverse the triples in the knowledge graph to obtain an entity set and a relationship set; the entity set includes all head entities and all tail entities in the knowledge graph.

[0076] Step 502: for any erroneous triple, based on the entity set and the relationship set, respectively replace the relationship and entity in the erroneous triple to obtain multiple candidate triples, and calculate the confidence of the multiple candidate triples.

[0077] Step 503, respectively use each high-quality logical rule to instantiate the triples in the knowledge graph to obtain multiple logical rule instantiation paths.

[0078] Step 504, using whether the head triples in the multiple logic rule instantiation paths can be replaced by candidate triples and the confidence of multiple candidate triples as screening conditions, screening multiple candidate triples to obtain final candidate triples; the final candidate triples are the repair results of the erroneous triples.

[0079] In another exemplary embodiment of the present application, the explainable knowledge graph error detection and repair method also includes: establishing a dictionary of entities and relationships based on the entity set and the relationship set, saving serial numbers and entities or relationships to the dictionary: [{serial number: entity\relationship}…], and simultaneously transferring attribute values ​​and serial numbers in reverse, saving them as [{entity\relationship: serial number}…], to facilitate data reference and processing.

[0080] This application repairs erroneous data based on high-quality logical rules generated by high-quality triples. The repair results can also be explained using high-quality logical rule instantiation paths, thereby improving the quality of knowledge graph data.

[0081] Based on the same inventive concept, the embodiment of the present application also provides an interpretable knowledge graph error detection and repair system, which applies the above-mentioned interpretable knowledge graph error detection and repair method. The knowledge graph includes multiple triples; each triple includes a head entity, a relationship, and a tail entity; Figure 3 As shown, the explainable knowledge graph error detection and repair system includes:

[0082] The confidence determination module 601 is used to determine the confidence of each triple in the knowledge graph based on the link pattern of the knowledge graph; the link pattern includes a shared head entity and a shared tail entity.

[0083] The triple division module 602 is connected to the confidence determination module 601, and is used to divide the triples in the knowledge graph into high-quality triples and erroneous triples according to the confidence of each triple and the set confidence.

[0084] The logic rule generation module 603 is connected to the triple division module 602 and is used to determine a plurality of high-quality logic rules based on the high-quality triples.

[0085] The error triple repairing module 604 is connected to the logic rule generating module 603 and is used to repair the error triples based on the multiple high-quality logic rules.

[0086] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store knowledge graphs. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an interpretable knowledge graph error detection and repair method is implemented.

[0087] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0088] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the above-mentioned interpretable knowledge graph error detection and repair method.

[0089] In an exemplary embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the above-mentioned interpretable knowledge graph error detection and repair method.

[0090] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0091] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0092] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0094] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. An interpretable knowledge graph error detection and repair method, wherein the knowledge graph includes multiple triples; each triple includes a head entity, a relationship, and a tail entity; characterized in that: The explainable knowledge graph error detection and repair method comprises: Determining the confidence of each triple in the knowledge graph based on a link pattern of the knowledge graph; the link pattern includes a shared head entity and a shared tail entity; According to the confidence of each triple and the set confidence, the triples in the knowledge graph are divided into high-quality triples and erroneous triples; Determining a plurality of high-quality logic rules based on the high-quality triples; The erroneous triples are repaired based on the plurality of high-quality logical rules.

2. The interpretable knowledge graph error detection and repair method according to claim 1, characterized in that: Based on the link pattern of the knowledge graph, the confidence of each triple in the knowledge graph is determined, specifically including: Initialize the knowledge graph to obtain an entity embedding vector and a relationship embedding vector for each triple; For any triple, according to the entity embedding vector and the relationship embedding vector of the triple, the energy score of the triple is obtained by using the Euclidean distance; Starting from the triple, based on the triples of the shared head entity and the shared tail entity, two views of the triple are respectively established; Determining a global triplet embedding vector of the triplet in two views using an error-aware graph neural network; Based on the global triplet embedding vectors of the triplet in two views, obtaining the similarity of the triplet using a similarity function; The confidence of the triplet is determined according to the energy score of the triplet and the similarity of the triplet.

3. The interpretable knowledge graph error detection and repair method according to claim 2, characterized in that: The explainable knowledge graph error detection and repair method also includes: The error-aware graph neural network is optimized based on graph embedding loss and contrastive learning loss.

4. The interpretable knowledge graph error detection and repair method according to claim 1, characterized in that: Determine a plurality of high-quality logic rules based on the high-quality triples, specifically including: Take each relation in the high-quality triples as a rule head; For any rule head, based on the rule head, a triple path of a specified length is sampled in the knowledge graph as a rule body of the rule head; Using a sliding window of a set size to divide the rule body into a plurality of first-level combinations; For any first-level combination, a recurrent neural network and an attention mechanism are used to determine the attention weights between the relationship sequence of the first-level combination and all the relationships in the high-quality triples; a new representation of the relationship sequence of the first-level combination is obtained based on the attention weights and all the relationships in the high-quality triples; the relationship sequence of the first-level combination includes all the relationships in the first-level combination; A sliding window of a set size is used to divide the new representations of the relation sequences of multiple first-level combinations into multiple second-level combinations, and a recurrent neural network and an attention mechanism are used to determine the new representation of the relation sequence of each second-level combination until multiple relation sequences are cyclically reduced to a single relation, and a new representation of a single relation is obtained; Form a logic rule of the rule head based on the single new relationship representation and the head relationship with the largest attention weight in the single new relationship representation; Based on the maximum attention weight of each logical rule in each rule head and the new representation of a single relation in each logical rule, multiple high-quality logical rules are obtained.

5. The interpretable knowledge graph error detection and repair method according to claim 4, characterized in that: For any first-level combination, a recurrent neural network and an attention mechanism are used to determine the attention weights between the relationship sequence of the first-level combination and all the relationships in the high-quality triples, specifically including: Inputting the first-level combined relation sequence into a recurrent neural network to obtain an embedding vector of the first-level combined relation sequence; Based on the relation sequence embedding vector of the first-level combination and all relations in the high-quality triples, an attention mechanism is adopted to determine the attention weights between the relation sequence of the first-level combination and all relations in the high-quality triples.

6. The interpretable knowledge graph error detection and repair method according to claim 1, characterized in that: Repairing the erroneous triples based on the multiple high-quality logic rules specifically includes: Traversing the triples in the knowledge graph to obtain an entity set and a relationship set; the entity set includes all head entities and all tail entities in the knowledge graph; For any erroneous triple, based on the entity set and the relationship set, respectively replace the relationship and entity in the erroneous triple to obtain multiple candidate triples, and calculate the confidence of the multiple candidate triples; Each high-quality logic rule is used to instantiate the triples in the knowledge graph to obtain multiple logic rule instantiation paths; Whether the head triples in the instantiation paths of multiple logical rules can be replaced by candidate triples and the confidence of multiple candidate triples are used as screening conditions, multiple candidate triples are screened to obtain final candidate triples; the final candidate triples are the repair results of the erroneous triples.

7. An interpretable knowledge graph error detection and repair system, applying the interpretable knowledge graph error detection and repair method according to any one of claims 1 to 6, wherein the knowledge graph includes a plurality of triples; each triple includes a head entity, a relationship, and a tail entity; characterized in that: The explainable knowledge graph error detection and repair system includes: A confidence determination module, configured to determine the confidence of each triple in the knowledge graph based on a link pattern of the knowledge graph; the link pattern includes a shared head entity and a shared tail entity; A triple division module, connected to the confidence determination module, for dividing the triples in the knowledge graph into high-quality triples and erroneous triples according to the confidence of each triple and the set confidence; a logic rule generation module, connected to the triple division module, for determining a plurality of high-quality logic rules based on the high-quality triples; The error triplet repairing module is connected to the logic rule generating module and is used to repair the error triplet based on the multiple high-quality logic rules.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the interpretable knowledge graph error detection and repair method described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the interpretable knowledge graph error detection and repair method described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the interpretable knowledge graph error detection and repair method described in any one of claims 1 to 6.

Citation Information

Cited By

  • A double-trigger quality detection method for a network knowledge graph

    CN122925361A