An embedded inconsistency-tolerant ontology reasoning method
By transforming the axioms in OWL language form into natural language form and mapping them to high-dimensional semantic vectors, the problems of semantic information loss and insufficient reasoning ability in existing technologies are solved, and stronger inconsistent ontology reasoning ability and more accurate query results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-03-31
AI Technical Summary
Existing inconsistent ontology reasoning methods suffer from information loss and insufficient reasoning ability when processing semantic information. In particular, doubt reasoning methods ignore the asymmetry of axiom information, global inconsistency-based selection methods ignore semantic features, and linear expansion strategies fail to find the largest consistent subset or lead to conflicting results.
An embedding-based inconsistency-tolerant ontology reasoning method is adopted, which transforms OWL-language axioms into natural language sentences and maps them into semantic vectors in a high-dimensional space. Each axiom is scored by calculating semantic vector similarity and aggregation degree functions, and the largest consistent subset with the highest score is selected as the reasoning result.
Inconsistent ontology reasoning retains more semantic information, possesses stronger reasoning capabilities, can handle inconsistent ontology more reasonably, and provides more accurate query results.
Smart Images

Figure CN115481741B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an embedding-based inconsistency-tolerant ontology reasoning method, belonging to the field of ontology engineering. Background Technology
[0002] For a long time, conceptualizing a domain has been considered a prerequisite for understanding that domain and processing information about it. Ontologies, as explicit specifications of conceptualizations, are considered an important component of information systems and information processing. Ontologies are crucial to the success of the Semantic Web because they provide a formal representation of knowledge shared in Semantic Web applications. With the advent of knowledge graphs, the development of the Semantic Web has accelerated further, enabling the provision of more intelligent services to users, such as more accurate recommendations and searches. Ontologies also have a significant impact on the performance of knowledge graph reasoning. However, knowledge conflicts in ontologies are inevitable. For example, ontology fusion, ontology evolution, and ontology migration can all lead to ontology inconsistencies. Therefore, reasoning about inconsistent ontologies is an important problem in ontology engineering. There are two types of methods for inconsistent ontology reasoning. The first type repairs the inconsistent ontology to obtain a consistent ontology. This type of method generally requires computing the minimum consistent subset of the inconsistent ontology or computing the axioms that cause inconsistencies in the inconsistent ontology, thereby removing certain axioms through scoring. The second category is inconsistency-compatible reasoning methods. These methods do not calculate the minimal inconsistency ontology or the axioms that lead to inconsistency. Instead, they start from the semantics, define new inference relations, and can directly reason from the inconsistency ontology to give consistent query results.
[0003] Currently, the academic community has proposed several research methods for ontology reasoning that is inconsistently compatible. The first basic method is called Skeptical Inference, which states that if an axiom can be inferred from every maximally consistent ontology of an inconsistent ontology, then that axiom can be inferred. An improvement to Skeptical Inference is to use the cardinality-maximally consistent subset of the ontology for reasoning. The second method uses global inconsistency to consider the reliability of the information carried by the formula, then scores the maximally consistent subsets and selects the highest-scoring maximally consistent subset as the result. The third method uses a linear expansion strategy, defining a syntactic association function to check whether inclusion can be inferred.
[0004] The problems existing in the prior art are as follows:
[0005] 1) Skeptical reasoning method based on the maximum consistent subset
[0006] This method considers each maximally consistent subset of the inconsistent ontology; an axiom can be deduced only if it is deduced by every maximally consistent subset. Skeptical reasoning treats all axioms in the axiom knowledge base as equals, ignoring the information asymmetry of axioms, and thus has relatively low reasoning power.
[0007] 2) Reasoning method for selecting the maximum consistent subset based on global inconsistency
[0008] This method leverages global inconsistency to assess the reliability of the information carried by axioms, then scores the most consistent subsets and selects the highest-scoring subset as the result of the inference, which can then be used for subsequent queries. However, because axioms in an ontology contain semantic information, this method ignores the semantic features within the axioms, resulting in information loss.
[0009] 3) Syntactic association test inference method based on linear expansion
[0010] This approach utilizes a linear expansion strategy, checking whether inclusion can be inferred by defining a syntactic association function. However, this method may fail to find the largest consistent subset and may result in conflicting query results. Summary of the Invention
[0011] This invention addresses the shortcomings of existing inconsistency-compatible reasoning methods by providing an embedding-based inconsistency-tolerant ontology reasoning method. This technical solution offers a processing method for reasoning about inconsistent ontology by mapping axioms to vectors in a high-dimensional space based on embedding, thereby preserving more semantic information of the axioms. Compared with existing technologies, it can fully consider the semantic information of the axioms and has stronger reasoning capabilities.
[0012] To achieve the above objectives, the present invention employs the following technical solution: an inconsistency-tolerant reasoning method based on embedded inconsistency ontologies, the method comprising the following steps:
[0013] Step (1) Generate all maximum consistent subsets of the inconsistent ontology;
[0014] Step (2) transforms the axioms in OWL language form into sentences in natural language form;
[0015] Step (3) maps the sentences in natural language form corresponding to the axioms into semantic vectors in a high-dimensional space;
[0016] Step (4) scores the largest consistent subset;
[0017] Step (5) selects the largest consistent subset with the highest score as the result of inconsistency-tolerant reasoning, and can use the largest consistent subset selected by this ontology for querying.
[0018] Furthermore, step (1) generates all maximum consistent subsets of the inconsistent ontology. Assuming there is an ontology K, the generated maximum consistent subset K' is defined as follows:
[0019] ·
[0020] K' is consistent;
[0021] ·like Then "K" is inconsistent.
[0022] Furthermore, step (2) specifically includes the following sub-steps:
[0023] (2.1) Use the NaturalOWL method to process the axioms in OWL language form into triples;
[0024] (2.2) Convert triples into natural language sentences using custom-written code for the dataset.
[0025] Furthermore, step (3) transforms the axioms in natural language form into semantic vectors in high-dimensional space. In step (2), we transform the axioms in OWL language form into sentences in natural language form. In order to represent the semantic information of the axioms and calculate the semantic relationships between axioms, we use the Sentence-BERT technique to map the sentences transformed from the axioms into semantic vectors in high-dimensional space. The semantic vectors mapped from the axioms have the following characteristics: semantic vectors mapped from semantically similar axioms are closer in distance in high-dimensional space.
[0026] Furthermore, step (4) specifically includes the following sub-steps:
[0027] (4.1) Calculate the similarity between semantic vectors. Specific similarity calculation methods can utilize Euclidean distance, cosine distance, etc. The higher the semantic similarity between two axioms, the greater the similarity between their corresponding semantic vectors. The similarity functions based on cosine distance and Euclidean distance are defined as follows:
[0028]
[0029]
[0030] Where v1 and v2 are semantic vectors transformed from two different axioms in step (3), Cosine_Distance(v1,v2) represents the cosine distance between v1 and v2, and Euclidean_Distance(v1,v2) represents the Euclidean distance between v1 and v2.
[0031] (4.2) Substituting the similarity calculated in (4.1), we define the aggregation degree function of an axiom in the largest consistent subset. The aggregation degree of an axiom in a largest consistent subset summarizes the similarity between the axiom and the axioms in the largest consistent subset. The higher the semantic similarity and correlation of the axiom in the largest consistent subset, the higher its aggregation degree in that subset. Different methods for defining the aggregation degree function are given below:
[0032]
[0033]
[0034]
[0035]
[0036] Among them, K i Let α and β be the largest consistent subset of ontology K, respectively. Let α and β be axioms in ontology K, and let Sim(α,β) be the similarity between axioms α and β. That is, through steps (2) and (3), axioms α and β are converted into semantic vectors and then the similarity is calculated using cosine distance or Euclidean distance. k is a parameter used for adjustment, and M is the largest consistent subset of ontology K. k (K i ,α,k) is derived from K i The set of k axioms with the smallest similarity to α, H(K) i ,α),T(K i ,α) are K i The set of axioms that are identical to the head or tail entity of axiom α;
[0037] (4.3) Using the aggregation degree function defined in (4.2), each axiom is scored. If an axiom appears in more maximum consistent subsets and has a higher aggregation degree in the maximum consistent subsets in which it appears, then the axiom is considered more credible and its score is higher. Using the aggregation degree calculation method of axioms in maximum consistent subsets defined above, the following four axiom scoring functions are defined:
[0038]
[0039]
[0040]
[0041]
[0042] Wherein, ontology K is an inconsistent ontology, K iLet α be the largest consistent subset of ontology K, α be an axiom of ontology K, mcs(K) be the set of all largest consistent subsets of ontology K, and agg(K) be the set of all largest consistent subsets of ontology K. i ,α) global agg(K) i ,α,k) knn , The aggregation degree function is defined in (4.2), and k is an adjustable parameter.
[0043] (4.4) Summarize the scores of the axioms in each maximum consistent subset to obtain the score of the maximum consistent subset. The maximum consistent subset containing more axioms and whose axioms are scored higher has a higher score. Select the maximum consistent subset with the highest score as the result of our reasoning, which can be used for subsequent axiomatic reasoning and queries. The set scoring function is defined as follows:
[0044]
[0045]
[0046]
[0047]
[0048] Wherein, ontology K is an inconsistent ontology, K i Let α be the largest consistent subset of ontology K, and let α be an axiom in ontology K. mc(K,α) global mc(K,α,k) knn mc(K,α) local The axiom scoring function is defined in (4.3).
[0049] Compared with the prior art, the advantages of the present invention are as follows:
[0050] 1) When performing inconsistent compatibility reasoning on inconsistent ontologies, this invention, compared to existing methods that utilize the maximum consistent subset and only perform reasoning under propositional logic, fully considers the semantic information of axioms in the ontology and performs reasoning under descriptive logic, which can minimize semantic loss. Thus, the inconsistent compatibility reasoning method of this invention has stronger reasoning ability.
[0051] 2) When performing inconsistent compatibility reasoning on inconsistent ontologies, this invention takes into full account the differences in the axiom status of the ontologies compared to existing methods, thereby defining a more reasonable reasoning relation that satisfies the relevant logical properties and can deduce more reasonable results in inconsistent ontologies.
[0052] 3) This invention is the first to use an embedding method when reasoning about inconsistent ontologies using the largest consistent subset. It maps the axioms in the ontology into embedding vectors in a continuous semantic space, which fully represents the structure and semantics of the ontology in the semantic space, and also facilitates the computer to calculate the semantic relationships between the axioms. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating an embedding-based inconsistency-tolerant ontology reasoning method according to the present invention. Detailed Implementation
[0054] 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 solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0055] Example 1:
[0056] An embedding-based inconsistency-tolerant ontology reasoning method is proposed. In this embodiment, step (1) generates all maximally consistent subsets of the inconsistent ontology. Assuming there is an ontology K, the generated maximally consistent subset K' is defined as follows:
[0057] ·
[0058] K' is consistent;
[0059] ·like Then "K" is inconsistent.
[0060] In this embodiment, step (2) transforms the axioms in OWL language form into sentences in natural language form. This is done by importing the ontology file into the Protege software, using the NaturalOWL plugin to process the OWL axioms into triples, and then converting these triples into natural language sentences using custom-written code. The following example illustrates this process:
[0061] 1)OWL language: ClassAssertion(ObjectMaxCardinality(1:madeFromGrape):product145)
[0062] 2) Triplet: <:product145,maxCardinality(:madeFromGrape),1>
[0063] 3) Natural Language: Product 145 is made from at most one grape.
[0064] In this embodiment, step (3) transforms the axioms in natural language form into semantic vectors in high-dimensional space. In step (2), we transform the axioms in OWL language form into sentences in natural language form. In order to represent the semantic information of the axioms and calculate the semantic relationships between axioms, we use the Sentence-BERT technique to map the sentences transformed from the axioms into semantic vectors in high-dimensional space. The semantic vectors mapped from the axioms have the following characteristics: semantic vectors mapped from semantically similar axioms are closer in distance in high-dimensional space.
[0065] In this embodiment, step (4.1) calculates the similarity between semantic vectors. Specific similarity calculation methods can utilize Euclidean distance, cosine distance, etc. The higher the semantic similarity between two axioms, the greater the similarity between their corresponding semantic vectors. The similarity function based on cosine distance is defined as follows:
[0066]
[0067] Where v1 and v2 are semantic vectors transformed from two different axioms in step (3).
[0068] Furthermore, using this function, any two axioms ψ, their similarity Sim( The function ψ has a range of [0,1]. The closer the function value is to 1, the higher the similarity between the two axioms. Conversely, the closer the function value is to 0, the lower the similarity.
[0069] In this embodiment, step (4.2) is substituted into the similarity calculated in (4.1) to define the aggregation degree function of an axiom in a maximum consistent subset. The aggregation degree of an axiom in a maximum consistent subset summarizes the similarity between the axiom and the axioms in the maximum consistent subset. The higher the semantic similarity and association of the axioms in the maximum consistent subset, the higher its aggregation degree in that subset. We provide different methods for defining the aggregation degree function as follows:
[0070]
[0071]
[0072]
[0073]
[0074] Among them, K i Let M be a maximally consistent subset of ontology K, where α and β are axioms in ontology K, Sim(α,β) is Cosine_Similarity(α,β), k is a parameter used for adjustment, and M... k (Ki ,α,k) is derived from K i H(K) is the set of k axioms that minimize the similarity function value with α. i ,α),T(K i ,α) are K i The set of axioms that are identical to the head entity or tail entity of axiom α.
[0075] In this embodiment, step (4.3) uses the aggregation degree function defined in (4.2) to score each axiom. An axiom is considered more credible and receives a higher score if it appears in more maximum consistent subsets and has a higher aggregation degree in those subsets. Using the aggregation degree calculation method for axioms in maximum consistent subsets defined above, we define the following four axiom scoring functions:
[0076]
[0077]
[0078]
[0079]
[0080] Where mc(K) is the set of all the largest consistent subsets of ontology K.
[0081] In this embodiment, step (4.4) summarizes the scores of the axioms in each maximum consistent subset to obtain the score of the maximum consistent subset. The maximum consistent subset containing more axioms and whose axioms are scored higher has a higher score. The maximum consistent subset with the highest score is selected as the result of our reasoning and can be used for subsequent axiomatic reasoning and queries. The set scoring function is defined as follows:
[0082]
[0083]
[0084]
[0085]
[0086] In this embodiment, step (5) selects the largest consistent subset with the highest score as the result of inconsistency-tolerant inference. If there are more than one consistent ontology with the same score and all of them are the highest scores, then these largest consistent ontologs with the highest scores form a set, and the intersection of the elements of this set is taken as the result of inconsistency-tolerant inference. The largest consistent subset selected by this ontology can be used for querying.
[0087] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An inconsistency-tolerant ontology reasoning method based on embedding, characterized in that, The method comprises the following steps: Step (1) generating all maximal consistent subsets of inconsistent ontology; Step (2) converting axioms in the form of OWL language into sentences in the form of natural language; Step (3) mapping the sentences in the form of natural language corresponding to the axioms into semantic vectors in a high-dimensional space; Step (4) scoring the maximal consistent subsets; Step (5) selecting the maximal consistent subset with the highest score as the result of inconsistent tolerant reasoning; In the step (1), assuming that there is an ontology K, the generated maximal consistent subset K' has the following definition: K' is consistent; If Then K" is inconsistent; Mcs(K) represents a set composed of all maximal consistent subsets of the ontology K; The step (4) specifically comprises the following sub-steps: 4.1) calculating the similarity between semantic vectors, and specifically, the similarity calculation method utilizes cosine distance and Euclidean distance, the higher the semantic similarity between two axioms, the greater the similarity between the corresponding semantic vectors, and the similarity functions based on cosine distance and Euclidean distance are defined as follows: Wherein, v1 and v2 are semantic vectors converted from two different axioms in step (3), Cosine_Distance(v1,v2) represents the cosine distance between v1 and v2, and Euclidean_Distance(v1,v2) represents the Euclidean distance between v1 and v2; 4.2) substituting the similarity calculated in (4.1) to define an aggregation degree function of axioms in the maximal consistent subset, the aggregation degree of an axiom in a maximal consistent subset summarizes the similarity between the axiom and the axioms in the maximal consistent subset, and the higher the semantic similarity between the axiom and the axioms in the maximal consistent subset, the higher the aggregation degree of the axiom in the maximal consistent subset; Different aggregation degree function definition methods are given as follows: 1) 2) 3) 4) where K i is a maximal consistent subset of the ontology K, α, β are axioms in the ontology K respectively, Sim(α,β) is the similarity of axioms α and β, i.e. the similarity is calculated by converting axioms α and β into semantic vectors through steps (2) (3) and then calculating the cosine distance or Euclidean distance, k is a parameter for adjustment, M k (K i ,α,k) is a set formed by the k axioms in K i with the smallest similarity value with α, H(K i ,α), T(K i ,α) are sets respectively composed of axioms in K i with the same head entity or tail entity as the axiom α. 4.3) scoring each axiom by using the aggregation degree function defined in (4.2), if an axiom appears in more maximal consistent subsets and has a higher aggregation degree in the maximal consistent subsets in which it appears, the axiom is considered to be more credible, and the scoring function of the axiom is higher, and the four axiom scoring functions are defined as follows by using the aggregation degree calculation method of the axioms in the maximal consistent subset defined above: 1) 2) 3) 4) where, where, K is an inconsistent ontology, K i is the largest consistent subset of ontology K, a is an axiom in K, mcs(K) is the set of all largest consistent subsets of K, agg(K i , a) global , agg(K i , a, k) knn , is the aggregation function defined in (4.2), k is a tunable parameter; 4.4) aggregating the scores of the axioms in each maximal consistent subset to obtain the score of the maximal consistent subset, the maximal consistent subset containing more axioms and having higher scores of the contained axioms has a higher score, the maximal consistent subset with the highest score is selected as the result of reasoning, and can be used for subsequent axiom reasoning and query, and the set scoring function is defined as follows: 1) 2) 3) 4) where K is an inconsistent ontology, K i is the largest consistent subset of K, and a is an axiom in K, mc(K, a) global , mc(K, a, k) knn , mc(K, a) local is the axiom scoring function defined in (4.3).
2. The inconsistency-tolerant ontology reasoning method based on embedding according to claim 1, wherein, The step (2) specifically comprises the following sub-steps: 2.1) processing the axioms in the form of OWL language into triples by using the NaturalOWL method; 2.2) converting the triples into sentences in natural language by using self-compiled code.
3. The inconsistency-tolerant ontology reasoning method based on embedding according to claim 1, wherein, The step (2) converts the axioms in the form of OWL language into sentences in the form of natural language, and specifically as follows: 1) By importing the ontology file into Protege software, the axioms in the form of OWL language are processed into triples, and the triples are converted into natural language sentences by self-programming code for the dataset.
4. The inconsistency-tolerant ontology reasoning method based on embedding according to claim 1, wherein, The step (3) converts the axioms in the form of natural language into semantic vectors in high-dimensional space, specifically as follows: 1) The axioms in the form of OWL language are converted into sentences in the form of natural language in step (2), in order to represent the semantic information of the axioms and calculate the semantic association between the axioms, the sentences converted by the axioms are mapped into semantic vectors in high-dimensional space by Sentence-BERT technology, and the semantic vectors mapped by the axioms have the characteristics of being closer in high-dimensional space.
5. The inconsistency-tolerant ontology reasoning method based on embedding according to claim 1, wherein, The step (5) selects the maximum consistent subset with the highest score as the result of inconsistency tolerant reasoning, specifically as follows: 1) If there is more than one consistent ontology with the same score and the highest score, these maximum consistent ontologies with the highest score form a set, and the intersection of the elements of the set is taken as the result of inconsistency tolerant reasoning, and the maximum consistent subset selected from the ontology can be used for query.
Citation Information
Patent Citations
Dynamic maintenance system for large-scale semantic knowledge base
CN102402599A
Weak supervision knowledge graph question answering method based on multi-view reasoning
CN113590799A