Conflict correction method for annular path of knowledge graph

By extracting the ring structure in the knowledge graph and the secondary learning of the embedding model, and detecting and correcting error triplets, the problem of limited conflict correction methods in the knowledge graph is solved, the error correction accuracy and adaptability are improved, and higher accuracy is achieved Correction of knowledge graph conflict.

CN119067210APending Publication Date: 2024-12-03UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411213133.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, there are limited conflict correction methods for knowledge graphs, especially when the data volume is large and the errors are complex, the existing methods are difficult to effectively correct errors, and it is impossible to systematically discover and correct potential errors, resulting in low error correction accuracy.

Method used

By extracting the simple ring and corresponding forward and reverse rings in the knowledge graph, non-conflict ring extraction and secondary embedding learning are used to perform non-conflict ring extraction and secondary embedding learning, combined with positive and negative sample learning methods, the positive and negative of the wrong triple are detected and corrected. Relational ring until conflict correction of knowledge graph ring path is completed.

Benefits of technology

It improves the accuracy of knowledge graph error correction and the model's ability to represent knowledge graphs, achieves more systematic and accurate conflict correction, is suitable for different embedding and prediction algorithms, and improves the adaptability and error correction effect of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067210A_ABST
    Figure CN119067210A_ABST
Patent Text Reader

Abstract

The invention discloses a conflict correction method for an annular path of a knowledge graph, and the method comprises the steps: extracting a simple ring from the knowledge graph, carrying out the embedded learning of the knowledge graph through an embedded model, carrying out the non-conflict ring extraction of the simple ring, and carrying out the secondary embedded learning based on a non-conflict ring extraction result; performing conflict detection on a reverse ring in a positive and negative relation ring of the wrong triple by using the embedding model after the secondary embedding learning; and based on the embedding model after the secondary embedding learning, realizing conflict correction of the annular path of the corresponding knowledge graph. According to the method, the overall error correction precision can be improved, the expression capability and the error correction effect of the model on the knowledge graph are improved, and prediction is more accurate. Moreover, according to the invention, embedding and prediction algorithms can be flexibly selected or adjusted according to the requirements of specific application scenes, and possibility is provided for realizing higher-precision knowledge graph conflict correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer data quality management, and in particular to a conflict correction method for a knowledge graph circular path. Background Art

[0002] Knowledge graph (KG) is a structured way to represent and store knowledge. It can organize information into a graph and, through the graph structure, systematize and semanticize the vast amount of information to mine the connections and meanings between data. Knowledge graph plays an important role in information retrieval, complex knowledge query and knowledge discovery, and is an indispensable technical pillar in modern information systems.

[0003] Data is a key factor in supporting complex tasks in knowledge graphs, and the accuracy of data will directly affect the final effect of KG downstream applications. Therefore, it is crucial to ensure the correctness of information in the knowledge graph. However, due to the diversity and complexity of data sources, the limitations of automated data extraction technology, and the inaccuracy of the data sources themselves, errors are inevitable in the data in the knowledge graph. Furthermore, due to the huge amount of data in the knowledge graph and the complex causes of errors, the cost of manual error correction for the knowledge graph is often too high. In addition, in some general fields, knowledge updates quickly, and the frequent updates of data make it difficult for manual corrections to keep up with the pace of change. Therefore, in actual production scenarios, it is particularly important to use automated tools and algorithms to correct errors in knowledge graphs.

[0004] At present, conflict detection methods for knowledge graphs have been widely studied, but methods for conflict correction are still relatively limited. Existing conflict correction methods mainly include: triple-based correction methods and rule-based correction methods; among them,

[0005] The triple-based correction method focuses on verifying the correctness of each triple (subject-predicate-object) in the KG. Such methods usually rely on external data sources or cross-reference with other knowledge graphs to automatically verify the authenticity of a fact. However, real-world facts often rely on a wider context, and correcting triples alone may lead to incorrect corrections;

[0006] The so-called rule-based methods attempt to correct triples through path rules, such as star structures. Such methods focus on the rules between the inherent properties of entities and relations. However, their applicability to more complex situations involving a series of interrelated triples is limited. Summary of the invention

[0007] The purpose of the present invention is to provide a conflict correction method for the circular path of the knowledge graph to improve the accuracy of the overall error correction and solve the above-mentioned technical problems existing in the prior art.

[0008] The objective of the present invention is achieved through the following technical solutions:

[0009] A conflict correction method for a knowledge graph circular path, comprising:

[0010] Extract simple loops in the knowledge graph, and extract the positive and negative loops of the corresponding triples to obtain the positive and negative relationship loops of the wrong triples;

[0011] Using an embedding model to perform embedding learning on the knowledge graph, extracting non-conflicting loops from the simple loops, and then performing secondary embedding learning based on the non-conflicting loop extraction results;

[0012] The embedding model after secondary embedding learning is used to perform conflict detection on the reverse ring in the positive and negative relationship ring of the erroneous triple. When it is determined that there is no conflict, the reverse relationship of the reverse triple relationship is used as the correct relationship of the forward triple of the triple. Otherwise, when it is determined that the reverse ring of the triple has a conflict, the embedding model after secondary embedding learning is used to use the positive and negative relationship rings obtained after the conflict detection process to predict the correct triplet relationship of the triples with conflicting reverse rings, so as to achieve conflict correction for the triple, until the conflict correction for the circular path of the knowledge graph is completed.

[0013] The secondary embedding learning includes:

[0014] The learning method of positive and negative samples is adopted, and the goal is to minimize the distance between positive samples and maximize the distance between positive samples and negative samples for secondary embedding learning. The objective function of positive sample learning is that the sum of the relationship vectors on the ring is a zero vector, and the goal of negative sample learning is to increase the distance between different relationships, and after the learning is completed, the secondary embedding representation of the relationship of the ring is returned.

[0015] The secondary embedding learning process also includes:

[0016] The hth relation on the kth ring The loss function is expressed as: And return the quadratic embedding representation of the relation

[0017] The steps of implementing the conflict correction of the corresponding knowledge graph circular path include:

[0018] Based on the simple loop after the conflict detection process, the embedding model after the secondary embedding learning is used to generate an embedding vector of the corresponding relationship, and the simple loop is represented by the embedding vector of the relationship;

[0019] The other relationship vector sequences of the forward loop and the reverse loop of the triplet after removing the wrong triplet are input into the prediction model respectively to obtain the output prediction relationship of the two loops;

[0020] Respectively replacing the erroneous relations in the positive and negative relation loops of the erroneous triple with the predicted relations of the two outputs, and respectively inputting the two loops contained in the triple into the multilayer perceptron to obtain their corresponding confidences; if the confidence of the positive loop is high, directly returning it as the correct relation of the triple; otherwise, returning the reverse relation of the predicted relation of the reverse loop as the correct relation of the triple;

[0021] Return the conflict-corrected triples to achieve conflict correction of the corresponding knowledge graph circular path.

[0022] The prediction model includes: a traditional deep learning model or a long short-term memory neural network LSTM model, or a method of calculating the Euclidean distance on the ring of the secondary embedding result and taking the maximum value for prediction.

[0023] The process of removing the other relationship vectors of the forward ring and the reverse ring of the triplet from the erroneous triplet respectively comprises:

[0024] The embedding vectors of the forward and reverse rings of the triplet are expressed as: in Indicates the error relationship of the positive ring, Indicates the wrong relationship of the reverse ring;

[0025] Then the other relationship vectors after removing the error triples are expressed as:

[0026] The obtaining of the output prediction relationship comprises:

[0027] The predicted relations of the two outputs corresponding to the two loops are:

[0028] The correct relationship for returning a triple is: (e1,r p[1] ,e2); the reverse relationship of the predicted relationship of the returned reverse loop is the correct relationship of the triple as

[0029] Compared with the prior art, the technical solution provided by the present invention can transform the traditional triple error correction into the error correction of the relationship ring in the knowledge graph, so as to more systematically discover and correct potential errors and improve the accuracy of the overall error correction. The present invention also improves the accuracy of the embedding-based method through multi-level embedding learning to further enhance the model's representation ability and error correction effect on the knowledge graph, making the prediction more accurate. Furthermore, the present invention can also flexibly select or adjust the embedding and prediction algorithms according to the needs of specific application scenarios. Not only does it improve the adaptability of the method, but it also provides the possibility of achieving higher-precision knowledge graph conflict correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] 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.

[0031] Figure 1 A schematic diagram of the processing process of the method provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of an embedding-based conflict correction algorithm provided by an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of a conflict correction algorithm provided by an embodiment of the present invention;

[0034] Figure 4 A schematic diagram of a conflict correction framework for a knowledge graph circular path provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] 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.

[0036] First, the terms that may be used in this article are explained as follows:

[0037] 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”.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] The present invention is mainly applied to the field of computer data quality management technology during its specific implementation, and is specifically an implementation scheme for conflict correction of knowledge graph circular paths based on semantic representation learning.

[0044] The present invention specifically provides a conflict correction method based on a circular path, specifically a conflict correction method for a knowledge graph circular path based on semantic representation learning, which mainly uses an automated algorithm to efficiently correct semantic conflicts in the knowledge graph. In this method, by analyzing the circular structure of the erroneous triples in the knowledge graph, the mutual relationship between the triples can be better understood, rather than relying solely on a single structure. By identifying and analyzing the corresponding circular path, the erroneous relationship in the knowledge graph can be corrected more effectively.

[0045] Through the corresponding conflict correction process, the correctness of KG data can be ensured, which plays an important role in supporting complex tasks of knowledge graphs. Therefore, the present invention designs an automated conflict correction implementation scheme to meet the corresponding application requirements.

[0046] In the present invention, the corresponding conflict correction implementation scheme of the knowledge graph circular path based on semantic representation learning mainly transforms the traditional error correction process into the error correction of the relationship ring, which can specifically include three methods, namely: a triple relationship ring extraction method, a knowledge graph circular relationship embedding method and a circular path conflict correction method; wherein, the wrong ring of the wrong triple can be found through the triple relationship ring extraction method, the correct ring can be used for vector embedding through the knowledge graph circular relationship embedding method, and the circular path conflict correction method can use the embedded ring vector (that is, the result obtained by the knowledge graph circular relationship embedding method) to perform conflict correction on the wrong ring (that is, the result obtained based on the triple relationship ring extraction method).

[0047] The specific implementation processes of the three methods mentioned above will be described below respectively.

[0048] (1) The above-mentioned method for extracting a triple relationship ring may include the following steps:

[0049] Step 1, extract all simple loops in the knowledge graph;

[0050] The simple ring means that except for the start node and the end node (which are the same node), there are no other repeated nodes on the path of the ring;

[0051] Step 2, extracting triple relationship rings;

[0052] Specifically, from the simple ring generated in step 1 above, extract one positive ring and one negative ring of the corresponding triple, and return the relationship ring of the two rings, that is, the positive and negative relationship rings of the triple;

[0053] The ring is in the form of a triple, i.e., node-relationship-node. What is returned here is a ring containing only relationships. In this way, when an error is found in the triple later, it is considered that an error has occurred in the relationship in the triple, and the correct relationship can be determined by inferring the two positive and negative relationship ring structures.

[0054] The positive and negative relationship rings of the erroneous triples can be found through the above triple relationship ring extraction method (1).

[0055] (2) The above-mentioned knowledge graph circular relationship embedding method may include the following steps:

[0056] Step 1, extract all simple rings in the graph;

[0057] Step 2: Implement preliminary relationship embedding, that is, use the embedding model to embed the knowledge graph and obtain the vector representation of the corresponding relationship;

[0058] Step 3, extracting non-conflicting rings from the simple ring;

[0059] Specifically, all non-conflicting rings are extracted from the simple rings generated in step 1, and these rings are represented as relational vector rings using the vectors in step 2;

[0060] Among them, the ring containing conflicting triples is a conflicting ring, and the ring not containing conflicting triples is a non-conflicting ring; the conflicting triples can be extracted in a known manner, which will not be described in detail here;

[0061] Step 4: secondary embedding learning of the relation vector based on the non-conflicting ring, that is, secondary embedding based on the correct ring;

[0062] The specific secondary embedding learning process can adopt the learning method of positive and negative samples, with the goal of minimizing the distance between positive samples and maximizing the distance between positive and negative samples, and performing secondary learning on the embedding of the ring relationship in step 3; the objective function of the positive sample learning is that the sum of the relationship vectors on the ring is a zero vector, and the goal of the negative sample is to increase the distance between different relationships; after the learning is completed, the secondary embedding representation of the relationship is returned.

[0063] (3) The above-mentioned method for correcting the conflict of a circular path may include the following steps:

[0064] Step 1, obtaining the positive and negative relationship rings of the error triples based on the above relationship ring extraction method (1);

[0065] The relationship loop extraction method (1) returns the positive and negative relationship loops. The processing result of step 2 of the relationship loop extraction method (1) can randomly extract a loop containing an erroneous triple as a positive loop, and a loop containing a reverse triple (that is, if the original triple is A->B, then the reverse triple is B->A) as a reverse loop.

[0066] Step 2: Generate an embedding vector of the relationship according to the knowledge graph ring relationship embedding method (2) above;

[0067] Step 3, performing direction error detection on the positive and negative relationship loops of the extracted erroneous triples;

[0068] Specifically, the reverse loop can be represented by the vector of step 2 and then input into the multi-layer perceptron to determine whether there is a conflict. If there is no conflict, the reverse triplet is directly used for correction. That is, if there is no conflict, it means that the reverse triplet is correct, and the reverse relationship of the relationship of the reverse triplet can be directly used as the correct relationship of the forward triplet, and the conflict relationship of the conflicting triplet is replaced by the relationship, and the corrected triplet, that is, the correct triplet, is returned. Otherwise, the subsequent conflict correction operation for the positive and negative relationship loops in step 1 is continued until the conflict correction is completed; that is, since the extracted reverse triplet also has a conflict, the reverse triplet cannot be directly used for conflict correction, so it is necessary to perform the subsequent step 4 in combination with other relationships of the positive and negative conflict loops to correct the conflicting triplet;

[0069] Step 4: Predict the correct triple relationship and correct the conflict of the knowledge graph loop path;

[0070] That is to say, in the above step 3, if the reverse triple is correct, the conflict correction can be performed directly, and the triple of its reverse relationship is returned, and the algorithm ends (that is, the conflict correction for the corresponding triple is completed); if the reverse triple is incorrect, it is necessary to combine other relations on the positive and negative rings to perform conflict correction on the corresponding triple, that is, execute step 4 to perform conflict correction on the conflicting triples in combination with other relations on the positive and negative conflict rings;

[0071] Specifically, the conflict correction of the corresponding knowledge graph ring path can be realized by embedding the positive and negative relationship vectors after completing the conflict detection and conflict correction operations based on the embedding model after the secondary embedding learning. The corresponding processing method can specifically include the following process:

[0072] First, the positive and negative relationship loops of the error triples extracted in step 1 are represented by the vectors in step 2; the other relationship vector sequences of the two loops after removing the error triples are input into the prediction model respectively, and the prediction relationship is output, that is, the prediction relationship of the two loops corresponding to the respective outputs is obtained;

[0073] Afterwards, the two predicted relations obtained by the prediction model are used to replace the wrong relations in the positive and negative relation loops of the wrong triplet in step 1, and the two positive and negative relation loops contained in the triplet are respectively put into the multilayer perceptron and the confidence is output. If the confidence of the positive loop is high, it is directly used as the correct relation of the returned triplet. Otherwise, the reverse relation of the predicted relation of the reverse loop is returned as the correct relation of the returned triplet.

[0074] Finally, the conflict-corrected triples are returned to achieve conflict correction of the corresponding knowledge graph circular path.

[0075] The conflict correction method for the circular path of the knowledge graph provided by the present invention can transform the traditional triple error correction into the error correction of the relationship ring in the knowledge graph, thereby improving the accuracy of the overall error correction; the present invention also designs multi-level embedding learning to improve the accuracy of the embedding-based method. Moreover, the present invention can be applied to the conflict correction method for the circular path of different embedding models and prediction models, which not only improves the adaptability of the method, but also provides the possibility of realizing higher-precision knowledge graph conflict correction.

[0076] To facilitate further understanding of the present invention, the conflict correction method of the knowledge graph ring path based on semantic representation learning provided by the present invention will be described in detail below in conjunction with the accompanying drawings. The method can achieve corresponding conflict correction for different embedding models and prediction models.

[0077] For the embedding model, different knowledge graph embedding models such as TransE, RotatE and other relational vector embedding models in the same space can be used. The embedding model is used in the initial embedding of the ring embedding. The stronger the representation ability of the original embedding model, the stronger the ability after the secondary embedding will be.

[0078] For the prediction model, traditional deep learning methods such as multi-layer perceptron can be used. Since the ring can be represented as a sequence, sequence-based models such as long short-term memory neural network (LSTM) models can also be used here. In the case of limited hardware resources, the Euclidean distance on the ring can be directly calculated for the secondary embedding result and the maximum value can be taken for prediction.

[0079] Specifically, Figure 1 As shown, the corresponding triple relationship ring extraction process in the implementation process of the embodiment of the present invention may include the following processing steps:

[0080] Step 1: The process of loop discovery, that is, extracting all simple loops in the knowledge graph;

[0081] Step 2, extracting triple relationship rings based on the simple rings;

[0082] Specifically, one forward ring and one reverse ring of the corresponding triple can be extracted from the simple ring generated in step 1, and the relationship ring (R1, R2;

[0083] After obtaining the positive and negative relationship rings of each triple in the simple ring, the positive and negative relationship rings of the wrong triples, that is, the positive and negative relationship rings of the conflicting triples, can be found.

[0084] like Figure 1 and Figure 2 As shown, the implementation process of the corresponding knowledge graph ring embedding in the embodiment of the present invention may include the following steps:

[0085] Step 1, the process of loop discovery, that is, extracting all simple loops in the knowledge graph;

[0086] Step 2: Preliminary embedding of simple ring relationships, that is, using the preliminary embedding model to embed the knowledge graph and obtain the vector representation of the relationship.

[0087] Step 3, extracting non-conflicting rings;

[0088] Specifically, all non-conflicting rings are extracted from the simple ring generated in step 1, and the extracted non-conflicting rings are represented as relational vector rings using the vectors in step 2; i represents the total amount of relationship vectors in the i-th ring, then the relationship vector of the k-th ring can be expressed as:

[0089] Step 4: Perform secondary embedding learning based on the relation vector of the non-conflicting ring;

[0090] Specifically, we can adopt the learning method of positive and negative samples to minimize the distance between positive samples and maximize the distance between positive samples and negative samples. The objective function of positive sample learning is that the sum of the relationship vectors on the ring is a zero vector, and the learning goal of negative samples is to increase the distance between different relationships; the hth relationship on the kth ring that needs to be applied in the embedding learning process is The loss function can be expressed as: After learning, the secondary embedding representation of the relationship is returned

[0091] In the embodiment of the present invention, the implementation process of the corresponding ring path conflict correction method is as follows: Figure 3 and Figure 4 As shown, the following steps may be included:

[0092] Step 1, relationship ring extraction;

[0093] Specifically, the above relationship ring extraction process can be used to generate the positive and negative direction rings of the error triples (R1, R2;

[0094] Step 2: perform the relationship embedding operation, that is, generate the relationship embedding vector according to the implementation process of the above knowledge graph ring relationship embedding

[0095] Step 3, after the positive and negative direction loops of the error triplet are represented by the vectors in step 2, the direction error detection is performed, that is, the reverse loop is input into the multi-layer perceptron to determine whether there is a conflict. If there is no conflict, it means that the reverse triplet (e2, r, e1) is correct, and the reverse relationship r of the relationship r of the reverse triplet is directly taken as the correct relationship of the forward triplet, and the corrected triplet (e1, r′, e2) is returned; if there is a conflict, the subsequent step 4 is executed;

[0096] Step 4, predict the correct relationship;

[0097] Specifically, the following processing process can be used to predict the corresponding correct relationship:

[0098] The ring extracted in step 1 is represented by the embedding vector obtained in step 2: in Indicates the error relationship of the positive ring, Indicates the wrong relationship of the reverse ring;

[0099] The other relationship vector sequences of the two rings without the wrong relationship are input into the prediction model respectively Output two predicted relations

[0100] The predicted relations of the two outputs are used to replace the wrong relations in the loop extracted in step 1, and the two loops are respectively put into the multi-layer perceptron to output the corresponding confidence C1, C2; among them, if the confidence of the positive loop is high C1>C2, then r is directly p[1] As the correct relation for returning triples (e1,r p[1] ,e2), otherwise, the predicted relationship r of the reverse loop is returned p[2] The inverse relationship As the correct relation for the returned triple

[0101] Returns the conflict-corrected triple.

[0102] After the conflict correction processing in the above steps 3 and 4, the conflict correction for the circular path of the knowledge graph can be achieved.

[0103] The above-mentioned conflict correction method for circular paths of knowledge graphs based on semantic representation learning provided by the present invention can transform traditional triple error correction into error correction for relationship rings in knowledge graphs, that is, through the analysis of the ring structure, potential errors can be discovered and corrected more systematically, thereby improving the accuracy of overall error correction; the present invention also designs multi-level embedding learning to improve the accuracy of embedding-based methods, specifically, by optimizing the preliminary embedding and secondary embedding of relationship vectors multiple times, further improving the model's representation ability and error correction effect on knowledge graphs, making predictions more accurate. Moreover, the present invention can be applied to conflict correction methods for circular paths of different embedding models and prediction models, so that the embedding and prediction algorithms can be flexibly selected or adjusted according to the needs of specific application scenarios, which not only improves the adaptability of the method, but also provides the possibility of achieving higher-precision knowledge graph conflict correction.

[0104] Two public data sets were used to evaluate the effect of the present invention. The corresponding experimental results show that the conflict correction method of the knowledge graph ring path can help effectively correct the conflicts within the ring structure. The Hit10 of both data sets reached more than 95%.

[0105] 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 conflict correction method for knowledge graph circular paths, characterized in that: include: Extract simple loops in the knowledge graph, and extract the positive and negative loops of the corresponding triples to obtain the positive and negative relationship loops of the wrong triples; Using an embedding model to perform embedding learning on the knowledge graph, extracting non-conflicting loops from the simple loops, and then performing secondary embedding learning based on the non-conflicting loop extraction results; The embedding model after secondary embedding learning is used to perform conflict detection on the reverse ring in the positive and negative relationship ring of the erroneous triple. When it is determined that there is no conflict, the reverse relationship of the reverse triple relationship is used as the correct relationship of the forward triple of the triple. Otherwise, when it is determined that the reverse ring of the triple has a conflict, the embedding model after secondary embedding learning is used to use the positive and negative relationship rings obtained after the conflict detection process to predict the correct triplet relationship of the triples with conflicting reverse rings, so as to achieve conflict correction for the triple, until the conflict correction for the circular path of the knowledge graph is completed.

2. The method according to claim 1, characterized in that The secondary embedding learning includes: The learning method of positive and negative samples is adopted, and the goal is to minimize the distance between positive samples and maximize the distance between positive samples and negative samples for secondary embedding learning. The objective function of positive sample learning is that the sum of the relationship vectors on the ring is a zero vector, and the goal of negative sample learning is to increase the distance between different relationships, and after the learning is completed, the secondary embedding representation of the relationship of the ring is returned.

3. The method according to claim 2, characterized in that The secondary embedding learning process also includes: The hth relation on the kth ring The loss function is expressed as: And return the quadratic embedding representation of the relation 4. The method according to claim 1, 2 or 3, characterized in that: The steps of implementing the conflict correction of the corresponding knowledge graph circular path include: Based on the simple loop after the conflict detection process, the embedding model after the secondary embedding learning is used to generate an embedding vector of the corresponding relationship, and the simple loop is represented by the embedding vector of the relationship; The other relationship vector sequences of the forward loop and the reverse loop of the triplet after removing the wrong triplet are input into the prediction model respectively to obtain the output prediction relationship of the two loops; Respectively replacing the erroneous relations in the positive and negative relation loops of the erroneous triple with the predicted relations of the two outputs, and respectively inputting the two loops contained in the triple into the multilayer perceptron to obtain their corresponding confidences; if the confidence of the positive loop is high, directly returning it as the correct relation of the triple; otherwise, returning the reverse relation of the predicted relation of the reverse loop as the correct relation of the triple; Return the conflict-corrected triples to achieve conflict correction of the corresponding knowledge graph circular path.

5. The method according to claim 4, characterized in that The prediction model includes: a traditional deep learning model or a long short-term memory neural network LSTM model, or a method of calculating the Euclidean distance on the ring of the secondary embedding result and taking the maximum value for prediction.

6. The method according to claim 4, characterized in that The process of removing the other relationship vectors of the forward ring and the reverse ring of the triplet from the erroneous triplet respectively comprises: The embedding vectors of the forward and reverse rings of the triplet are expressed as: in Indicates the error relationship of the positive ring, Indicates the wrong relationship of the reverse ring; Then the other relationship vectors after removing the error triples are expressed as:

7. The method according to claim 6, characterized in that The obtaining of the output prediction relationship comprises: The predicted relations of the two outputs corresponding to the two loops are:

8. The method according to claim 7, characterized in that The correct relationship for returning a triple is: (e1,r p[1] ,e2); the reverse relationship of the predicted relationship of the returned reverse loop is the correct relationship of the triple as