Knowledge graph verification method, device and storage medium

By calculating the multi-dimensional verification data of the knowledge graph, the spatial calculation results, attribute similarity matrix and global score are generated, which solves the problem of low accuracy in traditional verification methods and achieves more efficient knowledge graph verification.

CN120429445BActive Publication Date: 2025-09-02SHENZHEN ANXUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510927763.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-09-02
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

Traditional solutions have low accuracy in verifying knowledge graphs, especially when dealing with complex knowledge graphs, which are prone to missed verification errors.

Method used

By determining the triple to be verified of the target knowledge graph, the vector spatial operation results corresponding to the header entity and the relationship are calculated, the attribute similarity matrix is ​​generated, and the embedding operation is performed based on the preset model to generate a global score, and finally comprehensively verify the spatial operation results, attribute similarity matrix and global score.

Benefits of technology

Improve the accuracy of knowledge graph verification, effectively filter error triplets, and improve the reliability and practicality of knowledge graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429445B_ABST
    Figure CN120429445B_ABST
Patent Text Reader

Abstract

The present application discloses a verification method, device and storage medium for a knowledge graph. The present application relates to the field of data processing technology. The method determines the triples to be verified of the target knowledge graph, wherein the triples to be verified include a head entity, a relationship and a tail entity. Then, based on the triples to be verified, the spatial operation result between the head entity and the corresponding vector of the relationship is calculated. Then, the attribute set of the head entity and the tail entity is extracted, and an attribute similarity matrix is ​​generated through a graph attention network. Then, an embedding operation is performed on the triples to be verified based on a preset model to generate a corresponding global score. Finally, the spatial operation result, the attribute similarity matrix and the global score are verified, and the target knowledge graph is saved after the verification is passed. The above method improves the accuracy of verifying the knowledge graph by calculating multi-dimensional verification data of the knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a verification method, device and storage medium for a knowledge graph. Background Art

[0002] Currently, knowledge graphs are generally verified using Alibaba Cloud's knowledge graph platform. Alibaba Cloud uses traditional rule-based reasoning and logical constraints to check the rationality of knowledge based on predefined semantic rules. It then verifies attribute values ​​using data type rules to complete knowledge graph verification. However, when processing complex knowledge graphs, Alibaba Cloud's limited verification dimensions can lead to omissions and errors when relying solely on traditional rules, resulting in low knowledge graph verification accuracy.

[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] This application provides a knowledge graph verification method, device and storage medium, aiming to solve the problem of low accuracy of knowledge graph verification in traditional solutions.

[0005] To achieve the above objectives, this application provides a knowledge graph verification method, which includes the following steps:

[0006] Determine a triple to be verified of the target knowledge graph, where the triple to be verified includes a head entity, a relationship, and a tail entity;

[0007] Obtaining a spatial operation result between the head entity and the relationship corresponding vector according to the triple to be verified;

[0008] Extracting the attribute sets of the head entity and the tail entity, and generating an attribute similarity matrix through a graph attention network;

[0009] Performing an embedding operation on the triple to be verified based on a preset model to generate a corresponding global score;

[0010] The spatial operation results, the attribute similarity matrix and the global score are verified, and the target knowledge graph is saved after the verification is passed.

[0011] In one embodiment, the step of verifying the spatial operation result, the attribute similarity matrix, and the global score, and saving the target knowledge graph after the verification is passed, includes:

[0012] Verify whether the distance between the spatial operation result and the tail entity vector is less than a preset threshold;

[0013] Verifying whether the attribute similarity mean corresponding to the attribute similarity matrix exceeds the domain adaptation threshold;

[0014] Verifying whether the global score is lower than a preset threshold;

[0015] When the verifications corresponding to the spatial operation results, the attribute similarity matrix and the global score are all passed, the target knowledge graph is saved.

[0016] In one embodiment, after the step of verifying whether the distance between the spatial operation result and the tail entity vector is less than a preset threshold, the method further includes:

[0017] Aggregate the attribute set of the adjacent nodes of the head entity and the tail entity;

[0018] The association weights between attributes are calculated through a multi-head attention mechanism, and the attribute similarity mean is generated based on the weighted average of the association weights.

[0019] In one embodiment, after the step of performing an embedding operation on the triple to be verified based on a preset model to generate a corresponding global score, the method further includes:

[0020] If there is a conflict verification result in the target knowledge graph, determine the conflict entity corresponding to the conflict verification result;

[0021] Determining the knowledge source of the conflicting entity and performing a credibility evaluation on the knowledge source to obtain an evaluation score;

[0022] Calculate the comprehensive score corresponding to each of the conflict verification results according to the evaluation score;

[0023] A verification result with a score greater than a preset score in the comprehensive score is selected as the target verification result of the triplet to be verified.

[0024] In one embodiment, the step of performing credibility assessment on the knowledge source to obtain an assessment score includes:

[0025] Based on the historical accuracy and data coverage of the knowledge source, a credibility value is calculated using a weighted formula;

[0026] Determining an authority score for the knowledge source and adding the authority score to the credibility value;

[0027] Determining a timeliness weight value according to the difference between the data update time of the knowledge source and the current system time;

[0028] The evaluation score is determined according to the timeliness weight value and the superimposed credibility value.

[0029] In one embodiment, the step of calculating the credibility value using a weighted formula based on the historical accuracy and data coverage of the knowledge source includes:

[0030] Obtaining the accuracy rate of the knowledge source in historical verification tasks, and using the accuracy rate as the historical accuracy rate;

[0031] Counting the proportion of domain entities covered in the knowledge source and using this as the data coverage;

[0032] The historical accuracy and data coverage are weighted and summed using a weighted formula to obtain the credibility value.

[0033] In one embodiment, after the step of verifying the spatial operation result, the attribute similarity matrix, and the global score, and saving the target knowledge graph after the verification is passed, the method further includes:

[0034] Determining a target entity in the target knowledge graph;

[0035] Determining the semantic ambiguity and context complexity of the target entity based on a pre-trained model;

[0036] Compare the difference between the target entity in the domain knowledge graph and the general knowledge graph to determine the domain-specific value;

[0037] Inputting the semantic ambiguity, the context complexity, and the domain-specific value into a weighted fusion function to generate a labeling difficulty score;

[0038] Sort the samples according to the difficulty of labeling in descending order, and select a predetermined number of samples with high scores as target labeling objects;

[0039] The pre-trained model is iteratively updated according to the target labeled object.

[0040] In one embodiment, the pre-trained model includes a category prediction model and a context probability model, and the step of determining the semantic ambiguity and context complexity of the target entity based on the pre-trained model includes:

[0041] Determining a category prediction probability distribution of the target entity based on the category prediction model, and generating the semantic ambiguity;

[0042] The occurrence probability of the target entity in the domain context is determined based on the context probability model, and the context complexity is generated according to the occurrence probability.

[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a knowledge graph verification device, which includes: a memory, a processor, and a computer program stored on the memory and runnable on the processor, and the computer program is configured to implement the steps of the knowledge graph verification method as described above.

[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the knowledge graph verification method as described above are implemented.

[0045] The present application provides a knowledge graph verification method, a knowledge graph verification device and a storage medium, which determines the triples to be verified of the target knowledge graph, wherein the triples to be verified include a head entity, a relationship and a tail entity, and then calculates the spatial operation result between the head entity and the corresponding vector of the relationship based on the triples to be verified, and then extracts the attribute sets of the head entity and the tail entity, and generates an attribute similarity matrix through a graph attention network, and then performs an embedding operation on the triples to be verified based on a preset model to generate a corresponding global score, and finally verifies the spatial operation result, the attribute similarity matrix and the global score, and saves the target knowledge graph after the verification is passed. The present application improves the accuracy of verifying the knowledge graph by calculating multi-dimensional verification data of the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0048] Figure 1 This is a flowchart of the first embodiment of the knowledge graph verification method of this application;

[0049] Figure 2 This is a flow chart of the second embodiment of the knowledge graph verification method of this application;

[0050] Figure 3 This is a flowchart of the third embodiment of the knowledge graph verification method of the present application;

[0051] Figure 4This is a schematic diagram of the architecture of the hardware operating environment of the knowledge graph verification device involved in the embodiments of the present application.

[0052] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0054] To better understand the above technical solutions, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0055] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0056] The main solution of this application is to: determine the triples to be verified in the target knowledge graph, wherein the triples to be verified include a head entity, a relationship, and a tail entity;

[0057] Obtaining a spatial operation result between the head entity and the relationship corresponding vector according to the triple to be verified;

[0058] Extracting the attribute sets of the head entity and the tail entity, and generating an attribute similarity matrix through a graph attention network;

[0059] Performing an embedding operation on the triple to be verified based on a preset model to generate a corresponding global score;

[0060] The spatial operation results, the attribute similarity matrix and the global score are verified, and the target knowledge graph is saved after the verification is passed.

[0061] Currently, knowledge graphs are generally verified using Alibaba Cloud's knowledge graph platform. Alibaba Cloud uses traditional rule-based reasoning and logical constraints to check the rationality of knowledge based on predefined semantic rules. It then verifies attribute values ​​using data type rules to complete knowledge graph verification. However, when processing complex knowledge graphs, Alibaba Cloud's limited verification dimensions can lead to omissions and errors when relying solely on traditional rules, resulting in low knowledge graph verification accuracy.

[0062] By determining the triples to be verified of the target knowledge graph, the triples to be verified include a head entity, a relationship and a tail entity, and then calculating the spatial operation result between the head entity and the corresponding vector of the relationship based on the triples to be verified, and then extracting the attribute sets of the head entity and the tail entity, and generating an attribute similarity matrix through the graph attention network, and then performing an embedding operation on the triples to be verified based on the preset model to generate a corresponding global score, and finally verifying the spatial operation result, the attribute similarity matrix and the global score, and saving the target knowledge graph after the verification is passed. This application improves the accuracy of verifying the knowledge graph by calculating the multi-dimensional verification data of the knowledge graph.

[0063] Example 1

[0064] Based on this, the present application embodiment provides a knowledge graph verification method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the knowledge graph verification method of this application, which includes steps S10 to S50:

[0065] Step S10: Determine the triples to be verified in the target knowledge graph, where the triples to be verified include a head entity, a relationship, and a tail entity.

[0066] In this embodiment, the processing action is performed by the knowledge graph verification system. A knowledge graph is a graph-structured representation of knowledge, consisting of entities (nodes) and relationships (edges). Triples are the basic building blocks of a knowledge graph and are in the form of (head entity, relationship, tail entity). It should be noted that the target knowledge graph includes domain knowledge graphs and general knowledge graphs. The domain knowledge graphs are sourced from professional databases, domain literature, industry standards, and expert annotation data, while the general knowledge graphs are sourced from encyclopedia data (Wikipedia), public datasets (Freebase), and web crawled data.

[0067] Specifically, we first traverse the graph database of the target knowledge graph to retrieve all triples. We then use a preset triple confidence threshold to preliminarily screen the retrieved triples, removing those with significantly low confidence, specifically those with a confidence below 0.3. We then select representative triples of different type combinations based on the type distribution characteristics of entities and relationships.

[0068] Optionally, when constructing a domain knowledge graph, the schema is strictly defined based on the ontology, and expert rules and small sample learning are adopted. For general knowledge graphs, the schema is open and constructed based on large-scale unsupervised learning. The schema (model / outline) refers to the logical organizational structure of database objects, including the definitions of objects such as tables, views, indexes, and stored procedures.

[0069] Step S20: Calculate the spatial operation result between the head entity and the relationship corresponding vector according to the triple to be verified.

[0070] In this embodiment, the spatial operation result measures the degree of match between the head entity vector and the relationship vector, reflecting the logical correspondence between the head entity and the relationship in vector space. In the TransE model, the sum of the head entity vector and the relationship vector is expected to be close to the tail entity vector. The result of the spatial operation here is the sum of the head entity vector and the relationship vector.

[0071] Specifically, a pre-trained embedding model, such as the TransE or TransH model, is first used to map the head entity and relation into a low-dimensional vector space, obtaining their corresponding vector representations. Taking the TransE model as an example, by optimizing the objective function on the training data, vector representations of entities and relations are learned, such that the correct triple satisfies h + r ≈ t in the vector space (where h is the head entity vector, r is the relation vector, and t is the tail entity vector). Next, the result of the operation between the head entity vector and the relation vector is calculated using the spatial operation defined by the model, such as addition in the TransE model. In the TransE model, calculating h + r yields a vector that should ideally be close to the tail entity vector. The distance between this result vector and the tail entity vector is then calculated using a distance metric (such as Euclidean distance or Manhattan distance). The smaller the distance, the closer the spatial operation between the head entity and relation vectors matches the tail entity, and the higher the likelihood of verification passing.

[0072] Step S30: extract the attribute sets of the head entity and the tail entity, and generate an attribute similarity matrix through a graph attention network.

[0073] In this embodiment, the attribute set refers to the attribute information possessed by the head entity and the tail entity. The graph attention network is a neural network based on the attention mechanism, which is used to capture the relationship between entities and their attributes. The attribute similarity matrix is ​​used to quantify the similarity between the attributes of the head entity and the tail entity.

[0074] Specifically, all attribute information for the head entity h and the tail entity t is extracted from the attribute storage module of the knowledge graph to form an attribute set. This attribute set is then fed into a pre-trained Graph Attention Network (GAT), which uses a self-attention mechanism to calculate the similarity score between each pair of attributes. The similarity scores for all attribute pairs are then combined into a matrix, with rows and columns corresponding to the attributes of the head and tail entities, respectively. The attribute similarity matrix is ​​normalized to limit its value range to [0, 1] to enhance interpretability.

[0075] Step S40: performing an embedding operation on the triple to be verified based on a preset model to generate a corresponding global score.

[0076] In this embodiment, the preset model is an embedding model, such as TransE, RotatE, or a variant thereof, for calculating the global rationality of triples. The global score is a quantitative score for the overall rationality of a triple, taking into account both entity and relationship embeddings. It is typically based on a distance metric, such as the triple score function S(h,r,t)=||E(h)+E(r)-E(t)||).

[0077] Specifically, vector representations of the head entity h, relation r, and tail entity t are obtained from the pretrained embedding model. A global score for the triple is calculated based on the embedding model's scoring function. The global score is normalized (e.g., mapped to the [0, 1] interval) to facilitate integration with other validation metrics. The normalized global score is stored in an intermediate result buffer for subsequent comprehensive validation.

[0078] Step S50: Verify the spatial operation result, the attribute similarity matrix and the global score, and save the target knowledge graph after verification.

[0079] In this embodiment, comprehensive verification involves integrating the spatial computation results, the attribute similarity matrix, and the global score, and then applying pre-defined verification rules, including threshold comparison and weighted summation, to determine whether a triple has passed verification. Upon passing verification, the target knowledge graph is saved to a designated storage location.

[0080] Specifically, the spatial operation results, attribute similarity matrix and global score are read from the intermediate result buffer. According to the preset fusion strategy, which can be a weighted sum, such as Score = α * spatial operation result + β * attribute similarity matrix + γ * global score, the comprehensive verification score of the triple is calculated. The comprehensive verification score is compared with the preset threshold. If the score is greater than the threshold, the triple is determined to have passed the verification. Repeat the above operation for all triples to be verified, reintegrate the verified triples into the target knowledge graph, and save the updated knowledge graph to the database.

[0081] Optionally, in this embodiment, step S50 includes:

[0082] Verify whether the distance between the spatial operation result and the tail entity vector is less than a preset threshold; verify whether the attribute similarity mean corresponding to the attribute similarity matrix exceeds the domain adaptation threshold; verify whether the global score is lower than the preset boundary value; when the verification corresponding to the spatial operation result, the attribute similarity matrix and the global score are all passed, save the target knowledge graph.

[0083] Specifically, the distance metric between the combined result of the head entity and relation vector (h + r) calculated using a vector space model (such as TransE) and the tail entity vector (t) is used. The attribute similarity mean corresponding to the attribute similarity matrix is ​​the average of all similarity scores in the attribute similarity matrix generated by the Graph Attention Network (GAT). The domain-adaptive threshold refers to the lower limit of similarity that is dynamically adjusted based on the domain characteristics of the knowledge graph and is used to determine whether the attribute similarity between the head and tail entities is sufficiently high. The preset boundary value refers to the upper limit of the score set based on the overall quality requirements of the knowledge graph and is used to judge the overall rationality of the triple. For example, in the TransE model, the global score is typically based on the triple score function S(h,r,t) = ||E(h) + E(r) - E(t)||, where a lower score indicates a more reasonable triple.

[0084] In this embodiment, the calculated spatial operation result is first obtained, and then the vector representation of the tail entity t is obtained from the pre-trained Embedding model. The distance between the combined result vector and the tail entity vector is calculated. The calculated distance is compared with the preset threshold. If the distance is less than the threshold, the verification is determined to be passed. Then the generated attribute similarity matrix is ​​obtained, and all similarity scores are extracted from it. The mean of these similarity scores is calculated. According to the domain characteristics of the knowledge graph, the domain adaptive threshold is determined. The calculated attribute similarity mean is compared with the domain adaptive threshold. If the mean exceeds the threshold, the verification is determined to be passed. Finally, the generated global score is obtained from step S40, and the global score is compared with the preset boundary value. If the global score is lower than the preset boundary value, the verification is determined to be passed. Check all verification results to confirm whether all have passed, and after all verifications have passed, mark the triple as "verified", update its status information, and then store the updated knowledge graph in a structured manner in the database.

[0085] Furthermore, in this embodiment, after the step of verifying whether the distance between the spatial operation result and the tail entity vector is less than a preset threshold, the method further includes:

[0086] Aggregate the attribute sets of the adjacent nodes of the head entity and the tail entity; calculate the association weights between the attributes through the multi-head attention mechanism, and generate the attribute similarity mean based on the weighted average of the association weights.

[0087] Specifically, adjacent nodes refer to other entities directly connected to the head or tail entity in the knowledge graph. Attribute sets refer to the attribute information possessed by these adjacent nodes. Aggregated attribute sets combine the attribute information of the adjacent nodes of the head and tail entities. The multi-head attention mechanism is a neural network mechanism that can simultaneously focus on multiple different feature subspaces and capture the associations between attributes. Association weights are numerical values ​​calculated by the attention mechanism that represent the importance of different attributes.

[0088] All adjacent nodes of the head and tail entities are located in the knowledge graph. This can be obtained by querying the edge relationships in the graph database. Attribute information is then extracted from these adjacent nodes to form multiple attribute sets, one for each adjacent node. Feature vectorization techniques are then used to convert the unstructured text attributes in the attribute sets into vector representations. The attribute vectors of all adjacent nodes are concatenated or pooled to generate a comprehensive attribute set vector. This comprehensive attribute set vector is then input into a multi-head attention model. The multi-head attention model uses multiple attention heads in parallel to calculate the association weights between attributes, with each attention head focusing on different semantic features. The output of each attention head is normalized to obtain a normalized association weight matrix between attribute pairs. Finally, the association weight matrix is ​​element-wise multiplied with the original attribute similarity matrix to obtain a weighted attribute similarity matrix. The mean of these weighted attribute similarity matrices is then calculated to generate the final attribute similarity mean.

[0089] In the technical solution provided in this embodiment, by determining the triples to be verified of the target knowledge graph, the triples to be verified include a head entity, a relationship, and a tail entity, and then calculating the spatial operation result between the head entity and the corresponding vector of the relationship based on the triples to be verified, and then extracting the attribute sets of the head entity and the tail entity, and generating an attribute similarity matrix through the graph attention network, and then performing an embedding operation on the triples to be verified based on the preset model to generate a corresponding global score, and finally verifying the spatial operation result, the attribute similarity matrix and the global score, and saving the target knowledge graph after the verification is passed. This embodiment improves the accuracy of verifying the knowledge graph by calculating multi-dimensional verification data of the knowledge graph.

[0090] Furthermore, spatial operations ensure the legitimacy of entities and relationships in the vector space, the attribute similarity matrix captures the degree of fit between entity semantics, and the global score provides a quantitative basis for overall legitimacy. The comprehensive verification mechanism, by integrating multiple metrics, effectively filters out erroneous triplets while retaining high-confidence knowledge, enhancing the reliability and practicality of the knowledge graph.

[0091] Example 2

[0092] Based on any embodiment, the present application also provides a second embodiment, referring to Figure 2 , Figure 2 This is a flow chart of the second embodiment of the knowledge graph verification method of the present application. After the step of performing embedding operation on the triple to be verified based on the preset model and generating the corresponding global score, it also includes steps S60 to S90:

[0093] Step S60: If there is a conflict verification result in the target knowledge graph, determine the conflict entity corresponding to the conflict verification result.

[0094] Step S70: Determine the knowledge source of the conflicting entity, and perform credibility evaluation on the knowledge source to obtain an evaluation score.

[0095] Step S80: Calculate a comprehensive score corresponding to each conflict verification result according to the evaluation score.

[0096] Step S90: Selecting a verification result with a score greater than a preset score in the comprehensive score as a target verification result of the triplet to be verified.

[0097] In this embodiment, the conflicting verification result refers to the inconsistent verification conclusions drawn by different verification indicators for the same triple during the knowledge graph verification process. The conflicting entity refers to the entity that causes these verification results to conflict, which may be the head entity, the tail entity, or both. The knowledge source refers to the source of entity information in the knowledge graph, including domain knowledge graphs (such as UMLS in the medical field), general knowledge graphs (such as Wikipedia), industry standards, expert annotation data, etc. Credibility assessment is a quantitative scoring of the reliability of the knowledge source through a specific algorithm. The comprehensive score is the final score calculated by combining the credibility assessment score of the knowledge source and the specific indicators of the conflict verification result, which is used to judge the reliability of the conflict verification result. The preset score is a comprehensive score threshold set according to the application scenario and quality requirements of the knowledge graph, which is used to screen reliable verification results. The target verification result refers to the verification result whose comprehensive score exceeds the threshold, which will be used as the final triple verification conclusion.

[0098] Specifically, by examining the knowledge graph's verification log, we identify all triples that failed verification. By comparing the verification results of these triples, we identify which entities cause conflicts across multiple verification metrics. We use a conflict detection algorithm to locate the conflicting entities, and query their metadata in the knowledge graph to obtain their source information. We then use a credibility assessment model, combining multiple metrics such as authority analysis, timeliness weighting, and coverage assessment, to score the knowledge source.

[0099] Optionally, the authority analysis is based on the score of the publishing organization or author of the knowledge source, such as using the improved PageRank algorithm to evaluate the academic influence of the source. Timeliness weighting takes into account the update frequency of information and the relevance to the current time, and generates an evaluation score based on the above factors. The evaluation scores of all knowledge sources corresponding to the conflict verification results are collected. The evaluation score of each knowledge source is weighted according to the preset weight distribution strategy. Use weighted summation / or other fusion strategies. Such as weighted average, maximum value selection, etc. to calculate the comprehensive score of each conflict verification result. Compare the comprehensive score of all conflict verification results with the preset score. Finally, select the verification result with a comprehensive score greater than the preset score as the final verification result of the triple to be verified. If there are multiple verification results that meet the conditions, they can be further sorted according to the score and the result with the highest score is selected.

[0100] Optionally, in this embodiment, the step of performing credibility assessment on the knowledge source to obtain an assessment score includes:

[0101] Based on the historical accuracy and data coverage of the knowledge source, a credibility value is calculated through a weighted formula; the authority score of the knowledge source is determined, and the authority score is superimposed on the credibility value; based on the difference between the data update time of the knowledge source and the current system time, a timeliness weight value is determined; based on the timeliness weight value and the superimposed credibility value, the evaluation score is determined.

[0102] Specifically, historical accuracy refers to the correct proportion of information provided by a knowledge source in the past, which is usually determined by testing the verification results of previous data of the knowledge source. Data coverage refers to the breadth of entities and relationships covered by a knowledge source, which is usually measured by the number of entity categories and relationship types included. The credibility value is a score obtained by weighted calculation of the comprehensive historical accuracy and data coverage. The authority score is an indicator to measure the reputation of the publishing organization or author of the knowledge source in a specific field. It is usually a score obtained by multi-dimensional evaluation based on expert evaluation, number of citations, industry status, etc. The timeliness weight value is a weight value determined based on the update frequency of the knowledge source data and the difference between the update time and the current system time, which is used to reflect the timeliness of the knowledge source information.

[0103] In this embodiment, historical verification records of the knowledge source are collected and their historical accuracy is calculated. The data coverage of the knowledge source is then evaluated by calculating the ratio of the number of entity categories and relationship types contained in it to the domain standard. The credibility value is then calculated using the weighted formula: credibility value = α * historical accuracy + β * data coverage (where α and β are weight coefficients).

[0104] Query the publishing organization and author information of the knowledge source and obtain its authority score from authoritative databases and expert systems. Add the authority score directly to the credibility value to obtain the updated credibility value. The specific formula is: credibility value = initial credibility value + authority score * weight factor. Then, obtain the time when the knowledge source was last updated and calculate the difference Δt between the current system time and the knowledge source data update time. Calculate the timeliness weight using the time decay function Wt = exp(-λΔt) (λ is the decay coefficient, set according to data timeliness requirements).

[0105] Furthermore, in this embodiment, the step of calculating the credibility value by a weighted formula based on the historical accuracy and data coverage of the knowledge source includes:

[0106] Obtain the accuracy of the knowledge source in historical verification tasks, and use the accuracy as the historical accuracy; count the proportion of domain entities covered in the knowledge source, and use it as the data coverage; perform weighted summation of the historical accuracy and data coverage through a weighted formula to obtain the credibility value.

[0107] Specifically, historical verification tasks refer to all knowledge graph verification processes in which a knowledge source has participated in the past. The accuracy rate refers to the proportion of information provided by the knowledge source that was verified as correct in these tasks. Domain entities refer to all relevant entities defined within a specific knowledge domain. The proportion of domain entities covered is the ratio of the number of entities included in the knowledge source to the total number of known entities in the domain, which is used to measure the breadth of the knowledge source.

[0108] Next, access the knowledge graph's verification history database and filter out all verification records related to the current knowledge source. Count the number of triples marked "verified" in these records, as well as the total number of verified triples, and calculate the accuracy. This calculated accuracy is used as the historical accuracy and stored in a temporary variable library for subsequent calculations. Next, obtain the total known entity set in the domain, extract all entities from the current knowledge source, and match them against the domain's total entity set. Count the number of entities contained in the knowledge source and calculate the percentage of domain entities covered: Coverage ratio = number of entities in the knowledge source / total number of domain entities. Then, determine the weights for historical accuracy and data coverage. These weights can be determined based on domain requirements or optimization algorithms. Finally, substitute the historical accuracy and data coverage into the weighted formula: Credibility value = Weight 1 * Historical Accuracy + Weight 2 * Data Coverage. Calculate the resulting credibility value and perform normalization (e.g., constrain the result to a value between 0 and 1).

[0109] In the technical solution provided in this embodiment, the conflict problem in knowledge graph verification is effectively solved by introducing knowledge source credibility evaluation and comprehensive scoring mechanism. When there are conflicting verification results, the system not only focuses on the verification indicators themselves, but also deeply analyzes the credibility of the knowledge source, making the verification process more objective and reliable. This method is particularly suitable for knowledge graph scenarios that integrate cross-domain or multi-data sources. It can significantly improve the quality control level of knowledge graphs, reduce misjudgments caused by differences in data sources, and provide strong guarantees for the accuracy and credibility of knowledge graphs.

[0110] Example 3

[0111] Please refer to Figure 3 , this application also provides a third embodiment, referring to Figure 3 , Figure 3 This is a flow chart of the third embodiment of the knowledge graph verification method of the present application, which includes steps S100 to S150 after verifying the spatial operation results, the attribute similarity matrix, and the global score, and saving the target knowledge graph after the verification is passed:

[0112] Step S100: Determine the target entity in the target knowledge graph.

[0113] Step S110: Determine the semantic ambiguity and context complexity of the target entity based on the pre-trained model.

[0114] Step S120: Compare the difference between the target entity in the domain knowledge graph and the general knowledge graph to determine the domain-specific value.

[0115] Step S130: inputting the semantic ambiguity, the context complexity and the domain-specific value into a weighted fusion function to generate a labeling difficulty score.

[0116] Step S140: sorting in descending order according to the annotation difficulty scores, and selecting a predetermined number of high-score samples as target annotation objects.

[0117] Step S150: iteratively updating the pre-trained model according to the target labeled object.

[0118] In this embodiment, the pre-trained model refers to a deep learning model that has been trained with large-scale data and is used to understand the semantic information of the text. Semantic ambiguity refers to the degree of semantic ambiguity of an entity in different contexts, which is usually measured by the probability distribution predicted by the model. Context complexity refers to the complexity of the contextual environment in which the entity appears in the knowledge graph, which is usually evaluated by the diversity or length of the context. Differentiation is the difference in representation of the target entity in the domain knowledge graph and the general knowledge graph. Domain-specific values ​​are used to measure the uniqueness of an entity in a specific domain. The weighted fusion function refers to a function that combines multiple indicators, such as semantic ambiguity, context complexity, and domain-specific values, into a comprehensive score through weight coefficients. The annotation difficulty score is used to measure the difficulty of entity annotation, and the higher the score, the more difficult the annotation.

[0119] Specifically, all entities in the target knowledge graph are traversed and initially screened based on filtering criteria, including entity type, frequency of occurrence, and verification history. The screened entities are classified, for example, into high-attention entities and low-attention entities. The high-attention entity is selected as the target entity. The target entity and its surrounding context are then fed into a pre-trained model. The model outputs a probability distribution of the entity across different semantic categories. Semantic ambiguity is calculated as 1 − max(probability distribution), which is the complement of the maximum value in the probability distribution. Context complexity is calculated as the norm of the average embedding vector of the context text, or the logarithm of the context length. The target entity's embedding vector is then extracted from the domain knowledge graph and the general knowledge graph, and the cosine similarity or other distance metric is calculated between the two embedding vectors. The domain-specific value is calculated as 1 − similarity, meaning that lower similarity indicates higher domain-specific value. Weight coefficients are then determined for semantic ambiguity, context complexity, and domain-specific value. A weighted fusion function is used to calculate a labeling difficulty score, which is then normalized. Finally, all target entities are sorted in descending order by their difficulty scores. A predetermined number of high-scoring examples are selected as target annotation objects. The manual annotation results for these target objects are collected to form a new training dataset. The new dataset is merged with the original training dataset and data preprocessing is performed. The pretrained model is retrained using the merged dataset, and model parameters are adjusted to optimize performance metrics (such as precision and recall). The performance of the updated model is evaluated to ensure that it outperforms the old model on the validation set.

[0120] Optionally, in this embodiment, step S110 includes:

[0121] Based on the category prediction model, the category prediction probability distribution of the target entity is determined, and the semantic ambiguity is generated; based on the context probability model, the occurrence probability of the target entity in the domain context is determined, and the context complexity is generated according to the occurrence probability.

[0122] Specifically, the pre-trained model includes a category prediction model and a context probability model. The category prediction model refers to a trained machine learning model that is used to predict the probability distribution of entities belonging to different semantic categories. Semantic ambiguity refers to the uncertainty of an entity in different semantic categories, which is usually measured by the maximum value of the probability distribution. The context probability model refers to a trained model that is used to predict the probability of an entity appearing in a specific domain context. Context complexity refers to the diversity of entities appearing in different contextual environments, which is usually measured by the distribution of occurrence probabilities.

[0123] The technical solution provided in this embodiment introduces an active learning mechanism to assess the difficulty of labeling target entities in the knowledge graph and select high-value samples for labeling. This ensures a comprehensive analysis of entity semantics and context, enabling the system to accurately identify entities most in need of manual intervention. Target labeling objects are selected based on their scores and the pre-trained model is iteratively updated, forming a closed-loop optimization process that improves the model's labeling efficiency and accuracy.

[0124] The present application provides a knowledge graph verification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the knowledge graph verification method in the above-mentioned embodiment one.

[0125] Reference below Figure 4 , which shows a schematic diagram of the structure of a knowledge graph verification device suitable for implementing the embodiments of the present application. The knowledge graph verification device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The knowledge graph verification device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present application.

[0126] like Figure 4As shown, the knowledge graph verification device may include a processing device 1001 (e.g., a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes based on a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the knowledge graph verification device. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the knowledge graph verification device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a knowledge graph verification device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or have instead.

[0127] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0128] The knowledge graph verification device provided by this application adopts the knowledge graph verification method in the above embodiment, which can solve the technical problem of low accuracy of knowledge graph verification in traditional solutions. Compared with the prior art, the beneficial effects of the knowledge graph verification device provided by this application are the same as the beneficial effects of the knowledge graph verification method provided by the above embodiment, and the other technical features in the knowledge graph verification device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0129] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0130] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0131] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, and the computer-readable program instructions are used to execute the knowledge graph verification method in the above-mentioned embodiment.

[0132] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0133] The above-mentioned computer-readable storage medium may be included in the verification device of the knowledge graph; or it may exist independently without being assembled into the verification device of the knowledge graph.

[0134] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the verification device of the knowledge graph, the verification device of the knowledge graph enables: to determine the triples to be verified of the target knowledge graph, and the triples to be verified include a head entity, a relationship and a tail entity; to calculate the spatial operation result between the head entity and the corresponding vector of the relationship based on the triples to be verified; to extract the attribute sets of the head entity and the tail entity, and generate an attribute similarity matrix through the graph attention network; to perform embedding operation on the triples to be verified based on a preset model to generate a corresponding global score; to verify the spatial operation result, the attribute similarity matrix and the global score, and to save the target knowledge graph after the verification is passed.

[0135] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0137] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0138] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned knowledge graph verification method. This computer-readable storage medium can address the technical issue of low accuracy in traditional knowledge graph verification. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the knowledge graph verification method provided in the aforementioned embodiments, and are not further elaborated here.

[0139] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the knowledge graph verification method as described above.

[0140] The computer program product provided in this application can solve the technical problem of low accuracy in traditional knowledge graph verification. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as those of the knowledge graph verification method provided in the above embodiments, and will not be repeated here.

[0141] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A knowledge graph verification method, characterized in that: The knowledge graph verification method includes the following steps: Determine a triple to be verified of the target knowledge graph, where the triple to be verified includes a head entity, a relationship, and a tail entity; Obtaining a spatial operation result between the head entity and the relationship corresponding vector according to the triple to be verified; Extracting the attribute sets of the head entity and the tail entity, and generating an attribute similarity matrix through a graph attention network; Performing an embedding operation on the triple to be verified based on a preset model to generate a corresponding global score; Verify whether the distance between the spatial operation result and the tail entity vector is less than a preset threshold; Verifying whether the attribute similarity mean corresponding to the attribute similarity matrix exceeds the domain adaptation threshold; Verifying whether the global score is lower than a preset threshold; When the verifications corresponding to the spatial operation result, the attribute similarity matrix, and the global score are all passed, the target knowledge graph is saved; After the step of performing embedding operation on the triple to be verified based on the preset model to generate a corresponding global score, the method further includes: If there is a conflict verification result in the target knowledge graph, determine the conflict entity corresponding to the conflict verification result; Determining the knowledge source of the conflicting entity and performing a credibility evaluation on the knowledge source to obtain an evaluation score; Calculate the comprehensive score corresponding to each of the conflict verification results according to the evaluation score; A verification result with a score greater than a preset score in the comprehensive score is selected as the target verification result of the triplet to be verified.

2. The method according to claim 1, wherein After the step of verifying whether the distance between the spatial operation result and the tail entity vector is less than a preset threshold, the method further includes: Aggregate the attribute set of the adjacent nodes of the head entity and the tail entity; The association weights between attributes are calculated through a multi-head attention mechanism, and the attribute similarity mean is generated based on the weighted average of the association weights.

3. The method according to claim 1, wherein The step of performing credibility assessment on the knowledge source to obtain an assessment score includes: Based on the historical accuracy and data coverage of the knowledge source, a credibility value is calculated using a weighted formula; Determining an authority score for the knowledge source and adding the authority score to the credibility value; Determining a timeliness weight value according to the difference between the data update time of the knowledge source and the current system time; The evaluation score is determined according to the timeliness weight value and the superimposed credibility value.

4. The method according to claim 3, wherein The step of calculating the credibility value by a weighted formula based on the historical accuracy and data coverage of the knowledge source includes: Obtaining the accuracy rate of the knowledge source in historical verification tasks, and using the accuracy rate as the historical accuracy rate; Counting the proportion of domain entities covered in the knowledge source and using this as the data coverage; The historical accuracy and data coverage are weighted and summed using a weighted formula to obtain the credibility value.

5. The method according to claim 1, wherein After verifying the spatial operation result, the attribute similarity matrix and the global score, and saving the target knowledge graph after the verification is passed, the method further includes: Determining a target entity in the target knowledge graph; Determining the semantic ambiguity and context complexity of the target entity based on a pre-trained model; Compare the difference between the target entity in the domain knowledge graph and the general knowledge graph to determine the domain-specific value; Inputting the semantic ambiguity, the context complexity, and the domain-specific value into a weighted fusion function to generate a labeling difficulty score; Sort the samples according to the difficulty of labeling in descending order, and select a predetermined number of samples with high scores as target labeling objects; The pre-trained model is iteratively updated according to the target labeled object.

6. The method according to claim 5, wherein The pre-trained model includes a category prediction model and a context probability model. The step of determining the semantic ambiguity and context complexity of the target entity based on the pre-trained model includes: Determining a category prediction probability distribution of the target entity based on the category prediction model, and generating the semantic ambiguity; The occurrence probability of the target entity in the domain context is determined based on the context probability model, and the context complexity is generated according to the occurrence probability.

7. A knowledge graph verification device, characterized in that: The knowledge graph verification device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the knowledge graph verification method as described in any one of claims 1 to 6.

8. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the knowledge graph verification method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Knowledge graph error detection method, system and device

    CN118277584A

  • System and method using global and local-aware denoising framework for commonsense knowledge graph noise detection

    US20250117572A1