Knowledge base data checking method of service platform and verifier

By using an automated knowledge base data verification method, integrating multiple external knowledge sources, and utilizing mapping rules and similarity calculations, the accuracy and efficiency issues of cross-knowledge source verification in existing technologies are resolved, achieving efficient and reliable knowledge graph data verification.

CN120849397APending Publication Date: 2025-10-28CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510934322.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies lack comprehensive and automated support across multiple knowledge sources in knowledge base verification, resulting in insufficient accuracy and reliability of verification results, especially in scenarios with large data volumes and diverse knowledge sources, leading to low efficiency.

Method used

This paper provides a method for verifying knowledge base data in a service platform. By integrating multiple external knowledge sources through an automated process, and using predefined mapping rules and similarity calculations, the confidence scores of knowledge graph instances are obtained, thereby achieving comprehensive verification across knowledge sources.

Benefits of technology

It improves the accuracy and efficiency of data verification, supports dynamically changing data sources, provides a user-friendly interface, and enhances the consistency and reliability of knowledge graph data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849397A_ABST
    Figure CN120849397A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge base data checking method of a service platform and a verifier, and belongs to the technical field of data verification, and the method comprises the steps: obtaining all knowledge maps to be verified and a plurality of external data sources used for checking the knowledge maps; respectively mapping the knowledge graph and the attribute set of the external data source to a public attribute space through a predefined mapping rule; taking at least two standard attributes as a matching basis, and matching each to-be-verified instance of the knowledge graph with an instance of an external data source; and based on the similarity of the attribute values of each pair of successfully matched instances, obtaining a confidence score of each to-be-verified instance of the knowledge graph, and outputting a data verification result of each to-be-verified instance by comparing a relationship between the confidence score and a set threshold. Through an automatic verification process, manual intervention is reduced, a plurality of external knowledge sources are integrated at the same time, and the data verification speed is remarkably increased under the scene of huge data volume and diversified knowledge sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data verification technology, specifically relating to a knowledge base data verification method and verifier for a service platform. Background Technology

[0002] With the development of big data and artificial intelligence technologies, knowledge graphs are playing an increasingly important role in information management and knowledge representation. Many fields rely on knowledge graphs for data integration, reasoning, and decision support. However, the data quality of knowledge graphs directly affects their application effectiveness, making effective data verification crucial.

[0003] In existing technical solutions, many knowledge base verification methods focus on the verification of a single data source, lacking comprehensiveness across multiple knowledge sources. Most methods employ static rules or comparisons based on specific patterns, failing to effectively address the heterogeneity and dynamic changes between knowledge sources, resulting in insufficient accuracy and reliability of verification results.

[0004] In the existing technical solutions mentioned above, data verification often relies on manual intervention and lacks automation and intelligent support. This makes the verification process cumbersome and error-prone, especially in scenarios with large amounts of data and diverse knowledge sources, where the inefficiency is particularly pronounced. Summary of the Invention

[0005] This invention addresses the shortcomings of existing technologies by providing a knowledge base data verification method and verifier for a service platform. Through an automated verification process, it reduces manual intervention and integrates multiple external knowledge sources, significantly improving the speed of data verification in scenarios with large amounts of data and diverse knowledge sources.

[0006] This invention provides the following technical solution:

[0007] Firstly, a method for verifying knowledge base data on a service platform is provided, including the following steps:

[0008] S1: Obtain all knowledge graphs to be verified from the knowledge base of the service platform, and at the same time obtain multiple external data sources for verifying the knowledge graphs;

[0009] S2: Extract the attribute sets from the knowledge graph and the external data source respectively, and map the attribute sets from the knowledge graph and the external data source to the common attribute space according to the predefined mapping rules;

[0010] S3: Use at least two standard attributes as matching criteria, and match each instance to be verified in the knowledge graph with instances from external data sources;

[0011] S4: Based on the similarity of attribute values ​​of each pair of instances successfully matched by external data sources and knowledge graphs, obtain the confidence score of each knowledge graph instance to be verified, and output the data verification results of each instance to be verified by comparing the relationship between the confidence score and the set threshold.

[0012] Optionally, step S2 specifically includes:

[0013] S21: Extract the original attribute set K of the knowledge graph respectively. i and the original attribute set E of each data source j ;

[0014] K i ={p1,p2,...,p l},E j ={p′1,p′2,...,p′ n},

[0015] Where l represents the total number of attribute sets in the knowledge graph; n represents the total number of attribute sets from external data sources; p l Let p′ be the l-th attribute of the knowledge graph. n This refers to the nth property of the external data source.

[0016] S22: Based on predefined mapping rules, map each original attribute of the knowledge graph and external data source to standard attributes, and unify the format of each original attribute value to form standard attribute values;

[0017] S23: Generate a knowledge graph and a set of common attributes from external data sources;

[0018]

[0019] Among them, T std Let T′ be the set of common attributes of the knowledge graph. std Let A be the set of common attributes of the external data source, B be the set of entities of the knowledge graph, C be the set of standard attributes of the knowledge graph, and A′ be the set of entities of the external data source, B′ be the set of standard attributes of the external data source, and C′ be the set of standard attributes of the external data source.

[0020] Optionally, in step S3, matching each instance to be verified in the knowledge graph with instances from external data sources specifically involves:

[0021] For all the standard attributes used as the basis for matching, logical operators are used to combine their matching requirements to form the final matching requirements;

[0022] For the knowledge graph instance a to be verified, it is matched with all instances of each external data source in turn. If the instance a to be verified and the instance x of the external data source meet the final matching requirements, then instance a and instance x are successfully matched.

[0023] Matching instance a with instance x includes matching the current standard attributes of instance a and instance x. Specifically, during matching, if the similarity of the current standard attributes of instance a and instance x meets the corresponding threshold, instance a and instance x meet the matching requirements of the current standard attributes, and the current standard attributes of instance a and instance x are successfully matched.

[0024] Optionally, in step S4, the confidence score of each knowledge graph instance to be verified is obtained, specifically as follows:

[0025] For each triple in the knowledge graph that maps to the common attribute space Calculate its confidence scores from different external knowledge sources;

[0026]

[0027] Where q is an entity in the knowledge graph, p std As a standard attribute of knowledge graphs, These are the standard attribute values ​​for knowledge graphs. For the triples of the knowledge graph in the external knowledge source S i The confidence score is , where sim represents the function used to calculate the similarity between attribute values ​​in the knowledge graph and corresponding attribute values ​​in external knowledge sources; Standard attribute values ​​in knowledge graphs The function to get, For the i-th external data source S i Neutral and attribute values Corresponding standard attribute values The function to retrieve m is the number of external data sources;

[0028] Based on the importance of different external knowledge sources, the confidence scores of different external data sources are weighted and then fused to obtain triples. The weighted confidence level;

[0029]

[0030] in, For triples Weighted confidence score, w i For the i-th external data source S i The weight, 0 <w i <1, W is the set of weights for external knowledge sources;

[0031] The confidence score for each instance to be verified is obtained based on the triplet weighted confidence score of all attributes of each instance to be verified.

[0032]

[0033] Among them, instance confidence (a,S,sim,W) represents the confidence score of the instance a to be verified, and M represents the total number of attributes contained in the instance a to be verified.

[0034] Optionally, the knowledge graph to be verified is obtained by uploading a Turtle file by a user or from a SPARQL endpoint. When the knowledge graph to be verified is obtained by uploading a Turtle file by a user, the file is parsed using Apache Jena or the rdflib library to make it conform to the RDF format. When the knowledge graph to be verified is obtained from a SPARQL endpoint, the RDF format of the returned result is checked. The knowledge graph to be verified needs to be verified for format and integrity before use.

[0035] Secondly, a knowledge base validator for a service platform is provided, including:

[0036] Upload module: Retrieves all knowledge graphs to be verified from the knowledge base of the service platform, and also retrieves multiple external data sources for verifying the knowledge graphs;

[0037] Attribute mapping module: Extracts attribute sets from the knowledge graph and external data source respectively, and maps the attribute sets of the knowledge graph and external data source to the common attribute space according to predefined mapping rules;

[0038] Entity matching module: Based on at least two standard attributes, it matches each instance to be verified in the knowledge graph with instances from external data sources.

[0039] Verification module: Based on the similarity of attribute values ​​of each pair of instances that are successfully matched between external data sources and knowledge graphs, obtain the confidence score of each knowledge graph instance to be verified, and output the data verification results of each instance to be verified by comparing the relationship between the confidence score and a set threshold.

[0040] Optionally, it also includes: a display module: displaying the verification results of each instance to be verified in a set format, the verification results of the instance to be verified including the name, attributes and corresponding confidence score of the instance to be verified.

[0041] Thirdly, a computer device is provided, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the steps of the knowledge base data verification method of the service platform described in any one of the first aspects.

[0042] Fourthly, a computer-readable storage medium is provided for storing a computer program; when the computer program is executed by a processor, it implements the steps of the knowledge base data verification method of the service platform described in any one of the first aspects.

[0043] Compared with the prior art, the beneficial effects of the present invention are:

[0044] This application provides a flexible and scalable solution for efficient verification of knowledge graphs by integrating multiple external knowledge sources through automated data mapping, instance matching, and confidence measurement. Specifically, it improves the accuracy of data verification: Automated verification processes reduce manual intervention, improving the accuracy and consistency of knowledge graph data. It enables comprehensive verification across knowledge sources: Integrating multiple external knowledge sources supports comprehensive verification of heterogeneous data, overcoming the limitations of single data sources. It enhances the efficiency of the verification process: Automated instance matching and confidence measurement significantly improve the speed of data verification, adapting to the processing needs of large-scale data. It provides a user-friendly interface: An intuitive user interface allows users to easily set verification parameters and obtain results, improving the user experience. It supports dynamically changing data sources: A flexible mapping and matching mechanism adapts to the dynamic changes in knowledge sources, ensuring continuous verification effectiveness. Attached Figure Description

[0045] Figure 1 This is a flowchart of the steps of the knowledge base data verification method for the service platform of the present invention;

[0046] Figure 2 This is a structural block diagram of the knowledge base verifier of the service platform of the present invention. Detailed Implementation

[0047] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be used to limit the scope of protection of the present invention. It should be noted that the term "comprising" and any variations thereof in the specification, claims and the above-mentioned drawings of the present invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or devices.

[0048] Before describing the embodiments of this solution, we will first explain some terms that will appear thereafter:

[0049] A knowledge graph is a structured graphical model that represents knowledge through nodes (entities) and edges (relationships), designed to organize and store information in a visual and semantic way. It connects different data and knowledge in the form of a graph, enabling machines to understand the relationships between these pieces of information, thus supporting applications such as intelligent search, recommendation systems, and natural language processing. Knowledge graphs not only contain attribute information of entities but also display various relationships between entities, facilitating richer and more accurate information retrieval.

[0050] Domain Specification (DS) is a specification used in knowledge graph or data validation processes to define the data model and structure. It defines instance types (such as hotels, people, etc.) and their related attributes (such as name, address, etc.), ensuring that different data sources can be consistently mapped to a common format, thereby improving data comparability and consistency. In knowledge base validation, DS helps the system understand the structure and requirements of the data for effective validation and matching.

[0051] Example 1

[0052] like Figure 1 As shown, a method for verifying knowledge base data in a service platform is provided, including the following steps:

[0053] S1: Obtain all knowledge graphs to be verified from the knowledge base of the service platform, and at the same time obtain multiple external data sources for verifying the knowledge graphs.

[0054] Specifically, the knowledge graph to be verified is obtained either through user-uploaded Turtle files or from the SPARQL endpoint. When the knowledge graph to be verified is obtained through user-uploaded Turtle files, the file is parsed using the Apache Jena or rdflib library to make it conform to the RDF format. When the knowledge graph to be verified is obtained from the SPARQL endpoint, the RDF format of the returned result is checked. The knowledge graph to be verified needs to be validated for format and integrity before use. The method of obtaining external data sources can refer to existing technologies.

[0055] Specifically, users can enter the URL of the SPARQL endpoint, and the system will retrieve the data via an HTTP request and use SPARQL query statements to extract relevant knowledge graph information; or users can choose to upload a local Turtle file, and the system will read the file into memory for parsing.

[0056] Uploaded Turtle files and data retrieved from the SPARQL endpoint will undergo format and integrity validation. For uploaded files, libraries such as Apache Jena or rdflib are used to parse the files, ensuring they conform to RDF format. For data retrieved from the SPARQL endpoint, the RDF format of the returned results is also checked. Subsequently, the data is validated to ensure its integrity by verifying that it contains the required attributes and instances. If the data fails validation, an error message will be returned with suggested modifications.

[0057] Once the data passes format and integrity validation, it is transformed into a unified internal representation and stored in a backend database (such as MongoDB or PostgreSQL) for subsequent processing and validation. Finally, a summary of the uploaded or retrieved data is displayed to the user, including the number of instances and attributes, confirming that the data has been successfully imported, and providing options to continue processing, such as selecting a domain specification or starting data validation.

[0058] The above methods can effectively obtain the knowledge graph to be verified from the service platform's knowledge base, ensuring the validity and accuracy of the data.

[0059] S2: Extract the attribute sets from the knowledge graph and the external data source respectively, and map the attribute sets from the knowledge graph and the external data source to the common attribute space according to the predefined mapping rules.

[0060] A common attribute space is defined based on the input domain specification (DS) to ensure that data from all knowledge sources can be mapped uniformly. For example, a hotel's phone number can be stored using different attribute names in different knowledge sources, such as phone, telephone, or phone_number. These attributes will be uniformly mapped to a standard attribute contact_number.

[0061] To achieve this goal, a mapping rule needs to be established to map attribute names from different knowledge sources to a common attribute space. Users can create a mapping configuration file in the system to record the correspondence between attribute names from various external knowledge sources and common attributes. For example, "phone" in Wikidata maps to "contact_number," and "telephone" in DBpedia also maps to "contact_number."

[0062] During mapping, the validator iterates through each instance of the input knowledge graph, extracts selected attributes, and transforms each attribute into a common attribute according to the mapping rules. The same operation is performed for external data sources to ensure data consistency.

[0063] The above methods can effectively map the knowledge graph to be verified and external data sources to a common attribute space, thereby ensuring data consistency and comparability.

[0064] Step S2 specifically includes the following sub-steps:

[0065] S21: Extract the original attribute set K of the knowledge graph respectively. i and the original attribute set E of each data source j .

[0066] K i ={p1,p2,...,p l},E j ={p′1,p′2,...,p′ n},

[0067] Where l represents the total number of attribute sets in the knowledge graph; n represents the total number of attribute sets in the external data source.

[0068] S22: Based on predefined mapping rules, map each original attribute of the knowledge graph and external data source to standard attributes, and unify the format of each original attribute value to form standard attribute values.

[0069] Specifically, the domain specification (DS) is loaded: The domain specification (DS) defines the mapping rule as: primitive attribute → standard attribute. Optionally: DS = {phone → contact_umber, telephone → contact_umber}.

[0070] Perform property mapping: Map each primitive property to a standard property.

[0071]

[0072] Where, p std Let p represent the standard set of attributes of the knowledge graph, p represent the original attributes in the knowledge graph, m() represent the mapping rules defined in the domain specification (DS), and p' std p' represents the standard set of properties of the external data source, and p' represents the original properties in the external data source.

[0073] Standardize attribute values; after mapping, unify the format of attribute values ​​(such as unit conversion or date formatting).

[0074] Let a k For the raw attribute values ​​in the knowledge graph, use the normalization function norm(): in, The standard attribute values ​​representing a knowledge graph.

[0075] Let bk For the raw property values ​​from the external data source, use the normalization function norm(): in, The standard attribute value representing the external data source.

[0076] S23: Generate a knowledge graph and a set of common attributes from external data sources;

[0077]

[0078] Among them, T std Let T′ be the set of common attributes of the knowledge graph. std Let A be the set of common attributes of the external data source, B be the set of entities of the knowledge graph, C be the set of standard attributes of the knowledge graph, and A′ be the set of entities of the external data source, B′ be the set of standard attributes of the external data source, and C′ be the set of standard attributes of the external data source.

[0079] S3: Use at least two standard attributes as matching criteria and match each instance of the knowledge graph to be verified with instances from external data sources.

[0080] Users select at least two attributes (such as name and geographic coordinates) on the interface as the basis for instance matching. These attributes will serve as key elements for subsequent matching and mapping. The system extracts these attribute values ​​from the knowledge graph and external data sources and preprocesses them to ensure consistent formatting. Based on the extracted attribute values, the system constructs matching conditions, using logical operators to combine matching requirements for multiple attributes, ensuring that all selected attribute values ​​meet strict matching criteria. Subsequently, the system uses a similarity calculation algorithm (such as Jaccard similarity or cosine similarity) to perform instance matching, directly comparing attribute values ​​or calculating similarity, and returning matching results above a certain threshold. Finally, the matched instances and their detailed information (such as matched attributes and similarity scores) are returned to the validator to prepare data for subsequent confidence measurements.

[0081] Specifically, for all the standard attributes used as the basis for matching, logical operators are used to combine their matching requirements to form the final matching requirements; the logical operators include: OR (||), AND (&&), and NOT (!), which correspond to the OR, AND, and NOT operations in propositional logic, respectively.

[0082] For the knowledge graph instance a to be verified, it is matched with all instances of each external data source in turn. If the instance a to be verified and the instance x of the external data source meet the final matching requirements, then instance a and instance x are successfully matched.

[0083] Matching instance a with instance x includes matching the current standard attributes of instance a and instance x. Specifically, during matching, if the similarity of the current standard attributes of instance a and instance x meets the corresponding threshold, instance a and instance x meet the matching requirements of the current standard attributes, and the current standard attributes of instance a and instance x are successfully matched.

[0084] The similarity of the current standard attributes of instance a and instance x can refer to existing technologies, such as Jaccard similarity or cosine similarity.

[0085] Step S3 effectively identifies identical instances in the knowledge graph and external data sources, ensuring data consistency and comparability.

[0086] S4: Based on the similarity of attribute values ​​of each pair of instances successfully matched by external data sources and knowledge graphs, obtain the confidence score of each knowledge graph instance to be verified, and output the data verification results of each instance to be verified by comparing the relationship between the confidence score and the set threshold.

[0087] First, for each triple, the system calculates its confidence score, based on the similarity between attribute values ​​from external sources and attribute values ​​in the user's knowledge graph. The similarity is calculated using a syntax matching method, assigning different weights to each attribute. Users can allocate weights based on the importance of different knowledge sources, and the system calculates the final triple confidence score using a weighted average.

[0088] Specifically, step S4 includes:

[0089] S41: For each triple in the knowledge graph that maps to the common attribute space Calculate its confidence scores from different external knowledge sources;

[0090]

[0091] Where q is an entity in the knowledge graph, p std As a standard attribute of knowledge graphs, These are the standard attribute values ​​for knowledge graphs. For the triples of the knowledge graph in the external knowledge source S i The confidence score is , where sim represents the function used to calculate the similarity between attribute values ​​in the knowledge graph and corresponding attribute values ​​in external knowledge sources; Standard attribute values ​​in knowledge graphs The function to get, For the i-th external data source S i Neutral and attribute values Corresponding standard attribute values The function to retrieve data, where m is the number of external data sources.

[0092] S42: Based on the importance of different external knowledge sources, weights are assigned to the confidence scores of different external data sources, and then weighted fusion is performed to obtain triples. The weighted confidence level;

[0093]

[0094] in, For triples Weighted confidence score, w i For the i-th external data source S i The weight, 0 <w i <1, W is the set of weights for external knowledge sources; the sum of the weights of all external data sources is 1.

[0095] S43: Obtain the confidence score for each instance to be verified based on the triplet weighted confidence score of all attributes of each instance to be verified;

[0096]

[0097] Among them, instance confidence (a, S, sim, W) represents the confidence score of the instance a to be verified, and M represents the total number of attributes contained in the instance a to be verified (the number of attributes in the attribute value set of instance a). Given the attribute value set P = {p1, ..., p...} of instance a. M},p k ∈P, 1≤k≤M.

[0098] S44: Compare the calculated instance confidence score with the preset threshold t. If the condition is met, the instance... confidence If t ∈ [0, 1], then the instance is correct.

[0099] After completing all confidence measurements, the system will generate the final verification results and present them to the user in a graphical user interface. The results page will include detailed summary information of the instances, displaying the name, attributes, and corresponding confidence scores of each instance to be verified, allowing users to quickly browse and find what they need. Furthermore, the triplet confidence scores for each instance will be clearly listed, enabling users to intuitively understand the credibility of each attribute.

[0100] The system will also display the matching status of instances with external data sources, showing the similar attributes of each instance, the matching external sources, and the similarity score, helping users understand which attributes are reliable and which may be inconsistent. Simultaneously, the overall verification report will summarize the accuracy assessment of all instances, providing the number of instances that meet and do not meet the thresholds, allowing users to quickly evaluate the overall quality of the knowledge graph.

[0101] Furthermore, users can choose further actions based on the displayed results, such as exporting the verification results, adjusting the input data for re-verification, or directly comparing and analyzing the results with external data sources. The system also provides feedback functionality, allowing users to evaluate the results and system performance for continuous optimization. Through these methods, the system not only provides clear and comprehensive verification results but also enhances users' understanding of data quality and the convenience of subsequent operations, improving the overall efficiency and experience of knowledge base data verification.

[0102] Example 2

[0103] like Figure 2 As shown, a knowledge base validator for a service platform is provided, comprising:

[0104] Upload module: Retrieves all knowledge graphs to be verified from the knowledge base of the service platform, and also retrieves multiple external data sources for verifying the knowledge graphs;

[0105] Attribute mapping module: Extracts attribute sets from the knowledge graph and external data source respectively, and maps the attribute sets of the knowledge graph and external data source to the common attribute space according to predefined mapping rules;

[0106] Entity matching module: Based on at least two standard attributes, it matches each instance to be verified in the knowledge graph with instances from external data sources.

[0107] Verification module: Based on the similarity of attribute values ​​of each pair of instances that are successfully matched between external data sources and knowledge graphs, obtain the confidence score of each knowledge graph instance to be verified, and output the data verification results of each instance to be verified by comparing the relationship between the confidence score and a set threshold.

[0108] It's worth noting that when building the knowledge base validator, the first step is to determine the technology stack. This includes using JavaScript frameworks (such as React, Vue, or Angular) combined with Bootstrap to design the user interface, and using Node.js or Python's Flask / Django to build the backend service, choosing MongoDB or PostgreSQL to store the data. Secondly, the system architecture is designed, and the user interface is created to allow users to upload knowledge graphs, select domain specifications, and set weights for external data sources. Simultaneously, a RESTful API interface is developed to handle data uploads, instance matching, and confidence calculations.

[0109] In front-end development, a data upload module needs to be implemented, supporting users to upload Turtle-formatted RDF datasets or input SPARQL endpoints; a configuration selection module, providing dropdown menus for users to select the domain specification (DS) and displaying related attributes; and a results display module, showing validation results, including detailed instance information and triple confidence scores. On the back-end logic side, the uploaded RDF data is first parsed, using appropriate libraries (such as rdflib.js or Apache Jena) to map the data to a common format, and access to external data sources (such as Wikidata, DBpedia) is implemented, along with a general data retrieval module.

[0110] In some other embodiments, the validator displays the loading progress of all knowledge graphs to be verified on the user interface to improve the user experience, ensuring that users can understand the current processing status in real time and reduce anxiety while waiting. Simultaneously, the validator parses the input data, checking its structure and attributes to prepare for subsequent mapping and verification steps, ensuring the smooth progress of the process.

[0111] Next, an instance matching algorithm was developed to match based on user-specified attributes (such as name and coordinates), and the accuracy of the matching was evaluated using a similarity calculation algorithm (such as Jaccard similarity or cosine similarity). The confidence measurement module calculates the confidence score for each triple based on the matching results and normalizes it according to the weights of external knowledge sources. After development is complete, unit testing is performed to ensure the correct functionality of each module, and user testing is conducted to collect feedback to optimize the user experience.

[0112] Finally, deploy the validator to a cloud service platform (such as AWS or Heroku) to ensure high system availability, and regularly update the interfaces and system functions of external data sources to guarantee the effectiveness and accuracy of data verification. Through these steps, an efficient and reliable knowledge base validator can be built, helping users verify the accuracy and consistency of knowledge graph data.

[0113] In some other embodiments, a knowledge base verifier for a service platform further includes: a display module: displaying the verification result of each instance to be verified in a set format, wherein the verification result of the instance to be verified includes the name, attributes and corresponding confidence score of the instance to be verified.

[0114] This application constructs a knowledge base validator, providing a complete process from user-input knowledge graph to data verification. This includes acquiring the knowledge graph to be verified, mapping it to a public attribute space, performing instance matching, calculating confidence scores, and outputting verification results. Users can obtain data via a SPARQL endpoint or by uploading Turtle format files. The system automatically verifies the data format and integrity, performs instance matching based on user-selected attributes, and evaluates matching accuracy using similarity calculation methods. Confidence scores are calculated for each triple and instance using a weighted approach and compared to a set threshold. The final results are clearly displayed in the user interface, including detailed instance information, matching status, and overall quality assessment, providing users with intuitive verification results and subsequent operation options, thus improving the efficiency and experience of knowledge base data verification.

[0115] For more detailed information on the above methods, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0116] Example 3

[0117] The present invention provides a computer device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the steps of the knowledge base data verification method of the above-mentioned service platform.

[0118] For more detailed information on the above methods, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0119] Example 4

[0120] This invention provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, it implements the steps of the knowledge base data verification method of the above-mentioned service platform.

[0121] For more detailed information on the above methods, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0122] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The systems, devices, and storage media disclosed in the embodiments are described simply because they correspond to the methods disclosed in the embodiments; relevant details can be found in the method section.

[0123] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.

[0124] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A method for verifying knowledge base data in a service platform, characterized in that, Includes the following steps: S1: Obtain all knowledge graphs to be verified from the knowledge base of the service platform, and at the same time obtain multiple external data sources for verifying the knowledge graphs; S2: Extract the attribute sets from the knowledge graph and the external data source respectively, and map the attribute sets from the knowledge graph and the external data source to the common attribute space according to the predefined mapping rules; S3: Use at least two standard attributes as matching criteria, and match each instance to be verified in the knowledge graph with instances from external data sources; S4: Based on the similarity of attribute values ​​of each pair of instances successfully matched by external data sources and knowledge graphs, obtain the confidence score of each knowledge graph instance to be verified, and output the data verification results of each instance to be verified by comparing the relationship between the confidence score and the set threshold.

2. The knowledge base data verification method for the service platform according to claim 1, characterized in that, Step S2, specifically: S21: Extract the original attribute set K of the knowledge graph respectively. i and the original attribute set E of each data source j ; TO i ={p1,p2,...,p l },E j ={p′1,p′2,...,p′ n }, Where l represents the total number of attribute sets in the knowledge graph; n represents the total number of attribute sets from external data sources; p l Let p′ be the l-th attribute of the knowledge graph. n This refers to the nth property of the external data source. S22: Based on predefined mapping rules, map each original attribute of the knowledge graph and external data source to standard attributes, and unify the format of each original attribute value to form standard attribute values; S23: Generate a knowledge graph and a set of common attributes from external data sources; Among them, T std Let T′ be the set of common attributes of the knowledge graph. std Let A be the set of common attributes of the external data source, B be the set of entities of the knowledge graph, C be the set of standard attributes of the knowledge graph, and A′ be the set of entities of the external data source, B′ be the set of standard attributes of the external data source, and C′ be the set of standard attributes of the external data source.

3. The knowledge base data verification method for the service platform according to claim 1, characterized in that, In step S3, matching each instance to be verified in the knowledge graph with instances from external data sources specifically involves: For all the standard attributes used as the basis for matching, logical operators are used to combine their matching requirements to form the final matching requirements; For the knowledge graph instance a to be verified, it is matched with all instances of each external data source in turn. If the instance a to be verified and the instance x of the external data source meet the final matching requirements, then instance a and instance x are successfully matched. Matching instance a with instance x includes matching the current standard attributes of instance a and instance x. Specifically, during matching, if the similarity of the current standard attributes of instance a and instance x meets the corresponding threshold, instance a and instance x meet the matching requirements of the current standard attributes, and the current standard attributes of instance a and instance x are successfully matched.

4. The knowledge base data verification method for the service platform according to claim 1, characterized in that, In step S4, the confidence score of each knowledge graph instance to be verified is obtained, specifically as follows: For each triple in the knowledge graph that maps to the common attribute space Calculate its confidence scores from different external knowledge sources; Where q is an entity in the knowledge graph, p std As a standard attribute of knowledge graphs, These are the standard attribute values ​​for knowledge graphs. For the triples of the knowledge graph in the external knowledge source S i The confidence score is , where sim represents the function used to calculate the similarity between attribute values ​​in the knowledge graph and corresponding attribute values ​​in external knowledge sources; Standard attribute values ​​in knowledge graphs The function to obtain, For the i-th external data source S i Neutral and attribute values Corresponding standard attribute values The function to retrieve data, where m is the number of external data sources; Based on the importance of different external knowledge sources, the confidence scores of different external data sources are weighted and then fused to obtain triples. The weighted confidence level; in, For triples Weighted confidence score, w i For the i-th external data source S i The weight, 0 <w i <1, W is the set of weights for external knowledge sources; The confidence score for each instance to be verified is obtained based on the triplet weighted confidence score of all attributes of each instance to be verified. Among them, instance confidence (a,S,sim,W) represents the confidence score of the instance a to be verified, and M represents the total number of attributes contained in the instance a to be verified.

5. The knowledge base data verification method for the service platform according to claim 1, characterized in that, The knowledge graph to be verified is obtained either through user-uploaded Turtle files or from the SPARQL endpoint. When the knowledge graph to be verified is obtained through user-uploaded Turtle files, the file is parsed using the Apache Jena or rdflib library to make it conform to the RDF format. When the knowledge graph to be verified is obtained from the SPARQL endpoint, the RDF format of the returned result is checked. The knowledge graph to be verified needs to undergo format and integrity verification before use.

6. A knowledge base validator for a service platform, characterized in that, include: Upload module: Retrieves all knowledge graphs to be verified from the knowledge base of the service platform, and also retrieves multiple external data sources for verifying the knowledge graphs; Attribute mapping module: Extracts attribute sets from the knowledge graph and external data source respectively, and maps the attribute sets of the knowledge graph and external data source to the common attribute space according to predefined mapping rules; Entity matching module: Based on at least two standard attributes, it matches each instance to be verified in the knowledge graph with instances from external data sources. Verification module: Based on the similarity of attribute values ​​of each pair of instances that are successfully matched between external data sources and knowledge graphs, obtain the confidence score of each knowledge graph instance to be verified, and output the data verification results of each instance to be verified by comparing the relationship between the confidence score and a set threshold.

7. A knowledge base validator for a service platform according to claim 6, characterized in that, Also includes: Display module: Displays the verification results of each instance to be verified in a set format. The verification results of the instance to be verified include the name, attributes and corresponding confidence score of the instance to be verified.

8. A computer device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the steps of the knowledge base data verification method of the service platform according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, Used to store computer programs; when the computer programs are executed by a processor, they implement the steps of the knowledge base data verification method of the service platform according to any one of claims 1-6.

Citation Information

Patent Citations

  • Data mapping method, electronic device, storage medium and computer program product

    CN117520453A

  • Multi-source data-based power grid knowledge graph construction method

    CN119886298A

  • Artificial intelligence (AI) based data matching and alignment

    EP4086787A1