An ontology completion method and device based on hierarchical semantic perception and dynamic topology adaptation

By employing a hierarchical semantic awareness and dynamic topology adaptation approach, the problem of insufficient hierarchical structure and topology adaptation in ontology completion is solved, achieving efficient and accurate ontology completion and improving the integrity and adaptability of the ontology.

CN120805910BActive Publication Date: 2026-01-27SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510943053.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2026-01-27
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

Existing ontology completion methods lack deep perception of ontology hierarchical structure and dynamic topology adaptation capabilities, resulting in limited completion performance.

Method used

We adopt a method based on hierarchical semantic perception and dynamic topology adaptation. We generate ontology structure through unsupervised clustering, map entity vectors using a deep semantic representation model, design an objective function that integrates hierarchical attention mechanism, and optimize the insertion position of candidate entities by combining semantic loss and topology loss functions.

Benefits of technology

It significantly improves the accuracy and efficiency of ontology completion, ensures semantic consistency and structural rationality, and is suitable for dynamic knowledge completion in complex domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805910B_ABST
    Figure CN120805910B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on hierarchical semantic perception and dynamic topology adaptation ontology completion method and device, the method includes data acquisition and pre-processing, ontology construction, candidate entity input, semantic representation, hierarchical semantic perception and dynamic topology adaptation, and design target function of fusion multi-level semantic similarity calculation and hierarchical attention mechanism, realize the efficient, accurate completion of candidate entity.The application ensures the semantic consistency and structural rationality of completion result by hierarchical semantic perception and dynamic topology adaptation.The application also provides a kind of computer system, comprising processor, memory and input / output interface, for receiving text to be completed, and outputting the ontology after completion.Significantly improve the efficiency and precision of ontology completion, applicable to ontology extraction in computer field, the construction of knowledge graph provides service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, ontology engineering, and information extraction technology, specifically to an ontology completion method based on hierarchical semantic perception and dynamic topology adaptation, which is applicable to ontology extraction and knowledge graph construction in the computer field. Background Technology

[0002] Ontology, as a formal knowledge representation method, is widely used in knowledge graphs, semantic web, intelligent search, and other fields. However, with the continuous updating of knowledge and the expansion of domains, existing ontologies often suffer from incompleteness or obsolescence. How to efficiently and accurately complete ontologies has become an urgent problem to be solved. Existing ontology completion methods mostly rely on rule matching or simple semantic similarity calculations, lacking deep perception of the ontology's hierarchical structure and dynamic topological adaptation capabilities, resulting in limited completion effectiveness.

[0003] To address the aforementioned issues, there is an urgent need for an ontology completion method based on hierarchical semantic awareness and dynamic topology adaptation to perform deep perception and dynamic topology completion of ontology hierarchical structures. Summary of the Invention

[0004] The purpose of this invention is to provide an ontology completion method based on hierarchical semantic awareness and dynamic topology adaptation, to solve the technical problems of inaccurate ontology completion and poor adaptability in existing technologies. This method, through hierarchical semantic awareness and dynamic topology adaptation, ensures the semantic consistency and structural rationality of the completion results, significantly improving the efficiency and accuracy of ontology completion.

[0005] To achieve the above-mentioned objectives, the specific steps of the technical solution adopted by this invention include:

[0006] S1. Obtain a domain-specific text set D from academic databases, encyclopedia knowledge bases, or other structured data sources, where D = {d1, d2, ..., d...} n}, where d n This represents the nth text segment.

[0007] S2. An unsupervised clustering algorithm is used to process the domain text set D to generate a preliminary ontology structure. Let the generated ontology be O = (V, E), where V = {v1, v2, ..., v...} m} represents a set of entities, E = {e1, e2, ..., e} k} represents a set of relationships between entities.

[0008] S3. Given a candidate entity c to be completed and its attributes A(c) = {a1, a2, ..., a...} p The name and attributes of the candidate entity c are used as input for ontology completion.

[0009] S4. Employ a deep semantic representation model to map entities and candidate entities in the ontology to a low-dimensional vector space. Let the set of embedding vectors in the ontology be V' = {v1, v2, ..., v...}. m}, where the embedding vector of the candidate entity is c, d is the dimension of the embedding vector.

[0010] S5. Design the objective function L for the fusion hierarchical attention mechanism, comprehensively considering the hierarchical semantic relationship between candidate entities and entities in the ontology library, as well as the dynamic adaptability of the ontology topology. The formal expression of the objective function L is as follows:

[0011] L=α·L sem +β·L topo

[0012] L sem L is the semantic loss function, calculated through multi-hop hierarchical semantic similarity. topo Let L be the topological loss function, used to measure the impact of inserting candidate entity c on the ontology's topological structure. α and β are weighting coefficients used to adjust the proportions of semantic loss and topological loss in the objective function. sem The calculation formula is:

[0013]

[0014] K represents the maximum number of hops at the semantic level (e.g., K=3 indicates the calculation of three-hop semantic similarity between the candidate entity and the entity in the ontology database), γk represents the weight coefficient of the k-th hop, used to adjust the proportion of semantic similarity at different levels in the loss function, and satisfies w i,k Representing candidate entity c and entity v i Attention weights at the k-th hop level, sim k (c,v i ) represents candidate entity c and entity v i Semantic similarity at the k-th hop level. For the semantic similarity at the k-th hop level, sim k (c,v i The calculation method is as follows: For one-hop semantic similarity, directly calculate the similarity between candidate entity c and ontology entity v. i Cosine similarity between the embedding vectors.

[0015]

[0016] For multi-hop semantic similarity, the semantic similarity at the k-th hop (k>2) level is determined by aggregating candidate entity c with ontology entity v. i The semantic relationships on the k-hop path are calculated. Let path k(c,v i ) represents the candidate entity c to entity v i If a path is a k-hop path, then the semantic similarity of that path is:

[0017]

[0018] in, and Let represent the embedding vectors of the input and output entities at the j-th hop in the path, respectively.

[0019] Finally, the semantic similarity of the k-th hop is sim k (c,v i The mean of semantic similarity for all valid paths is:

[0020]

[0021] Among them, P k (c,v i ) represents the candidate entity c to entity v i The set of all k-hop paths.

[0022] Attention weight w i,k Used to measure the relationship between candidate entity c and entity v i The semantic relevance at the k-th hop level is calculated using the following formula:

[0023]

[0024] Topological loss function L topo The formula used to measure the impact of inserting candidate entity c on the ontology topology is as follows:

[0025]

[0026] Where impact(e,c) represents the topological impact of candidate entity c on edge e, and the specific formula is as follows:

[0027] impact(e,c)=dist(e,c)·deg(v j )

[0028] Where dist(e,c) is the semantic distance between candidate entity c and edge e, and deg(v j ) for entity v j The degree.

[0029] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform an ontology completion method based on hierarchical semantic awareness and dynamic topology adaptation.

[0030] This application also provides a computer system, including:

[0031] A processor is used to execute instructions stored in a storage medium to implement an ontology completion method that combines hierarchical semantic awareness and dynamic topology adaptation.

[0032] The memory is used to store the network text and intermediate results generated during the computation of the ontology completion method with hierarchical semantic awareness and dynamic topology adaptation.

[0033] The input / output interface is used to receive specified text or completion information and output the corrected ontology elements.

[0034] This application also provides an ontology completion device based on hierarchical semantic awareness and dynamic topology adaptation, which is configured to: acquire a domain text set; construct an ontology; input candidate entities; perform semantic representation; and perform hierarchical semantic awareness and dynamic topology adaptation.

[0035] The ontology completion method and apparatus based on hierarchical semantic awareness and dynamic topology adaptation proposed in this application have the following advantages:

[0036] 1. This method can capture the semantic relationships and hierarchical structure between entities, effectively identify and complete missing entities, attributes or relationships in the ontology, and improve the integrity and accuracy of the ontology.

[0037] 2. This method clearly defines the completion target, narrows the search space through candidate set filtering, and improves the efficiency and relevance of completion.

[0038] 3. By adaptively adjusting node connection relationships (such as adding / deleting edges), computational complexity is reduced and processing efficiency is improved, making it particularly suitable for high-dimensional and sparse data scenarios.

[0039] 4. This method, by combining hierarchical semantic modeling and dynamic topology optimization, significantly improves the accuracy, efficiency, adaptability, and interpretability of completion, and is suitable for the dynamic completion needs of complex domain knowledge. Attached Figure Description

[0040] Figure 1 This is the overall flowchart of the method. Detailed Implementation

[0041] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0042] The technical solution of the present invention will be described in detail below through a specific embodiment. The example scenario is inserting the candidate entity "Oil Painting Starry Sky" into the ontology of an art collection.

[0043] 1. Data Acquisition and Preprocessing

[0044] Retrieve a collection D of domain-specific texts related to artworks from academic databases and encyclopedic knowledge bases. The text collection includes:

[0045] D = {

[0046] Oil painting is a form of painting that is often used to depict landscapes and figures.

[0047] "Van Gogh's 'Starry Night' is a famous oil painting."

[0048] "Artworks include various forms such as painting, sculpture, and photography."

[0049] }

[0050] Preprocessing operations such as word segmentation, deduplication, and annotation are performed on the text to obtain a cleaned text set.

[0051] 2. Ontology Construction

[0052] The K-means algorithm was used to cluster the preprocessed text, generating a preliminary ontology structure O = (V, E). The generated ontology structure is as follows:

[0053] V = {"Oil painting", "Painting", "Sculpture", "Photography", "Van Gogh", "Starry Night"}

[0054] E = {("Oil painting","Painting"),("Painting","Sculpture"),("Painting","Photography"),("Van Gogh","Starry Night")}

[0055] Where V represents the set of entities and E represents the set of relationships between entities.

[0056] 3. Candidate Entity Input

[0057] The user inputs the candidate entity c = "Starry Night in Oil Painting" and its attribute A(c) = {Author: Van Gogh}.

[0058] 4. Semantic Representation

[0059] Using a pre-trained BERT model, entities V and candidate entities c from the ontology are mapped to a 768-dimensional vector space, generating an embedding vector set V′ and an embedding vector c for the candidate entities:

[0060] V'={

[0061] "Oil painting":[0.12,0.34,0.56,...,0.78],

[0062] "Painting":[0.23,0.45,0.67,...,0.89],

[0063] "Sculpture":[0.34,0.56,0.78,...,0.90],

[0064] "Photography":[0.45,0.67,0.89,...,0.91],

[0065] "Van Gogh":[0.56,0.78,0.90,...,0.92],

[0066] "Starry Sky": [0.67, 0.89, 0.91, ..., 0.93]

[0067] }

[0068] c = "Oil Painting Starry Sky": [0.51, 0.72, 0.83, ..., 0.95]

[0069] 5. Hierarchical semantic awareness and dynamic topology adaptation

[0070] Design the objective function L = α·L sem +β·L topo By optimizing the objective function, the optimal insertion position of candidate entity c is determined.

[0071] 5.1 Semantic Loss Function

[0072] The semantic loss function L is calculated using multi-hop hierarchical semantic similarity. sem Taking K=2 as an example, calculate the relationship between candidate entity c and entity v in the ontology library. i Direct similarity.

[0073] One-hop semantic similarity:

[0074]

[0075] Two-hop semantic similarity, calculating the semantic similarity of c->oil painting->painting:

[0076] sim2(c,v 绘画 ) = sim1(c,v 油画 )·sim1(v 油画 ,v 绘画 )

[0077] 5.2 Topological Loss Function

[0078] Calculate the impact of inserting candidate entity c on the ontology topology. For example, suppose that inserting c creates a new edge (c, painting), then:

[0079] impact((c,oil painting),c)=dist((c,oil painting),c)·deg(oil painting)

[0080] 5.3 Optimize the objective function

[0081] The objective function L is optimized using gradient descent to find its minimum value, thus determining the optimal insertion position for candidate entity c. For example, the insertion position could be one that establishes a direct relationship with the entity "oil painting".

[0082] Added border: ("Oil Painting Starry Sky", "Oil Painting")

[0083] 6. Ontology completion results

[0084] The completed ontology structure is as follows:

[0085] V = {"Oil painting", "Painting", "Sculpture", "Photography", "Van Gogh", "Starry Night", "Oil painting Starry Night"}

[0086] E = {("Oil painting","Painting"),("Painting","Sculpture"),("Painting","Photography"),("Van Gogh","Starry Night"),("Oil painting Starry Night","Oil painting")}

[0087] 10. Summary

[0088] Through the above steps, the candidate entity "Oil Painting Starry Sky" was successfully inserted into the ontology of the artwork collection and a semantic relationship was established with the related entity "Oil Painting". This ensured the semantic consistency and structural rationality of the ontology such as "Oil Painting", enhanced the integrity of the related knowledge graph construction, improved the accuracy and adaptability of the ontology, and provided service support for ontology extraction and knowledge graph construction in the computer field.

Claims

1. An ontology completion method based on hierarchical semantic awareness and dynamic topology adaptation, characterized in that, Includes the following steps: S1: Retrieves the domain text collection; S2: Ontology construction; S3: Candidate entity input; S4: Semantic representation; S5: Hierarchical Semantic Awareness and Dynamic Topology Adaptation; An objective function L is designed that integrates a hierarchical attention mechanism, comprehensively considering the hierarchical semantic relationship between candidate entities and entities in the ontology library, as well as the dynamic adaptability of the ontology topology; the formal expression of the objective function L is as follows: The semantic loss function is calculated through multi-hop hierarchical semantic similarity. This is the topology loss function, used to measure the impact of inserting candidate entity c on the ontology's topology. and These are weighting coefficients used to adjust the proportions of semantic loss and topological loss in the objective function; where The calculation formula is: K represents the maximum number of hops at the semantic level, indicating the calculation of the three-hop semantic similarity between the candidate entity and the entity in the ontology. Let represent the weight coefficient of the k-th hop, used to adjust the proportion of semantic similarity at different levels in the loss function, and satisfy . , Representing candidate entity c and entity Attention weights at the k-th hop level, Representing candidate entity c and entity Semantic similarity at the k-th hop level; for semantic similarity at the k-th hop level The calculation method is as follows: For one-hop semantic similarity, directly calculate the similarity between candidate entity c and entities in the ontology library. Cosine similarity between embedding vectors: For multi-hop semantic similarity, the semantic similarity at the k-th hop level is k > 2, which is determined by aggregating candidate entity c with entities in the ontology library. Calculate the semantic relationships on the k-hop path; let... For candidate entity c to entity If a path is a k-hop path, then the semantic similarity of that path is: in, and These represent the embedding vectors of the input and output entities at the j-th hop in the path, respectively. Finally, the semantic similarity of the k-th hop. The mean of semantic similarity for all valid paths: in, Represents the relationship between candidate entity c and entity c. The set of all k-hop paths; Attention weight Used to measure the difference between candidate entity c and entity c. The semantic relevance at the k-th hop level is calculated using the following formula: Topology loss function The formula used to measure the impact of inserting candidate entity c on the ontology topology is as follows: in, The formula representing the topological influence of candidate entity c on edge e is as follows: Let be the semantic distance between candidate entity c and edge e. For entities The degree.

2. The method according to claim 1, characterized in that, In step S1, a domain text set D is obtained from academic databases, encyclopedia knowledge bases, or other structured data sources. ,in This represents the nth text segment.

3. The method according to claim 1, characterized in that, In step S2, an unsupervised clustering algorithm is used to process the domain text set D to generate a preliminary ontology structure; let the generated ontology be... ,in Represents a set of entities. Represents a set of relationships between entities.

4. The method according to claim 1, characterized in that, In step S3, given the candidate entity c to be completed and its attributes... The name and attributes of the candidate entity c are used as input for ontology completion.

5. The method according to claim 1, characterized in that, In step S4, a deep semantic representation model is used to map entities and candidate entities in the ontology library to a low-dimensional vector space; let the embedding vector set of the ontology library be V'= The embedding vector of the candidate entity is c, where d is the dimension of the embedding vector.

6. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform any one of the ontology completion methods based on hierarchical semantic awareness and dynamic topology adaptation as claimed in claims 1-5.

7. A computer system, comprising: A processor for executing instructions stored in a storage medium to implement the ontology completion method of hierarchical semantic awareness and dynamic topology adaptation as described in any one of claims 1-5; The memory is used to store the network text and intermediate results generated during the computation of the ontology completion method of hierarchical semantic awareness and dynamic topology adaptation. The input / output interface is used to receive specified text or completion information and output the corrected ontology elements.

8. An ontology completion device based on hierarchical semantic perception and dynamic topology adaptation, characterized in that, The device is configured to: acquire a domain text set; construct an ontology; input candidate entities; perform semantic representation; implement hierarchical semantic awareness and dynamic topology adaptation; design an objective function L that integrates a hierarchical attention mechanism, comprehensively considering the hierarchical semantic relationship between candidate entities and entities in the ontology library, as well as the dynamic adaptability of the ontology topology; the formal expression of the objective function L is as follows: The semantic loss function is calculated through multi-hop hierarchical semantic similarity. This is the topology loss function, used to measure the impact of inserting candidate entity c on the ontology's topology. and These are weighting coefficients used to adjust the proportions of semantic loss and topological loss in the objective function; where The calculation formula is: K represents the maximum number of hops at the semantic level, indicating the calculation of the three-hop semantic similarity between the candidate entity and the entity in the ontology. Let represent the weight coefficient of the k-th hop, used to adjust the proportion of semantic similarity at different levels in the loss function, and satisfy . , Representing candidate entity c and entity Attention weights at the k-th hop level, Representing candidate entity c and entity Semantic similarity at the k-th hop level; for semantic similarity at the k-th hop level The calculation method is as follows: For one-hop semantic similarity, directly calculate the similarity between candidate entity c and entities in the ontology library. Cosine similarity between embedding vectors: For multi-hop semantic similarity, the semantic similarity at the k-th hop level is k > 2, which is determined by aggregating candidate entity c with entities in the ontology library. Calculate the semantic relationships on the k-hop path; let... For candidate entity c to entity If a path is a k-hop path, then the semantic similarity of that path is: in, and These represent the embedding vectors of the input and output entities at the j-th hop in the path, respectively. Finally, the semantic similarity of the k-th hop. The mean of semantic similarity for all valid paths: in, Represents the relationship between candidate entity c and entity c. The set of all k-hop paths; Attention weight Used to measure the difference between candidate entity c and entity c. The semantic relevance at the k-th hop level is calculated using the following formula: Topology loss function The formula used to measure the impact of inserting candidate entity c on the ontology topology is as follows: in, The formula representing the topological influence of candidate entity c on edge e is as follows: Let be the semantic distance between candidate entity c and edge e. For entities The degree.

Citation Information

Patent Citations

  • Entity description and topological structure information enhanced knowledge graph completion method

    CN117725228A

  • Streaming query semantic map adaptive enhancement method and system based on cognitive calculation

    CN119669298A