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.

CN120805910AActive Publication Date: 2025-10-17SHANGHAI JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing ontology completion methods lack a deep understanding of hierarchical structures and dynamic topologies, resulting in poor completion performance.

Method used

We employ a hierarchical semantic perception and dynamic topology adaptation approach. We generate ontology structures through unsupervised clustering, map entity vectors using a deep semantic representation model, design an objective function that integrates hierarchical attention mechanisms, and optimize the insertion position of candidate entities by combining semantic loss and topology loss.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805910A_ABST
    Figure CN120805910A_ABST
Patent Text Reader

Abstract

The invention discloses an ontology completion method and device based on hierarchical semantic perception and dynamic topology adaptation, and the method comprises the steps: data acquisition and preprocessing, ontology construction, candidate entity input, semantic representation, and hierarchical semantic perception and dynamic topology adaptation. And designing a target function fusing multi-level semantic similarity calculation and a level attention mechanism to realize efficient and accurate completion of candidate entities. Through hierarchical semantic perception and dynamic topology adaptation, semantic consistency and structural rationality of a completion result are ensured. The invention also provides a computer system which comprises a processor, a memory and an input / output interface and is used for receiving the to-be-complemented text and outputting the complemented body. The efficiency and precision of ontology completion are remarkably improved, and the method is suitable for providing services for ontology extraction and knowledge graph construction in the field of computers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence, ontology engineering and information extraction technology, and specifically to an ontology completion method based on hierarchical semantic perception and dynamic topology adaptation, which is suitable for ontology extraction in the computer field and provides services for the construction of knowledge graphs. Background Art

[0002] Ontology, as a formalized knowledge representation method, is widely used in fields such as knowledge graphs, the semantic web, and intelligent search. However, with the continuous updating of knowledge and the expansion of domains, existing ontologies are often incomplete or outdated. Efficiently and accurately completing ontologies has become a pressing issue. Existing ontology completion methods often rely on rule matching or simple semantic similarity calculations, lacking deep understanding of the ontology hierarchy and the ability to dynamically adapt to topologies, resulting in limited completion effectiveness.

[0003] In order to solve the above problems, there is an urgent need for an ontology completion method based on hierarchical semantic perception and dynamic topology adaptation to complete the deep perception and dynamic topology of the ontology hierarchy. Summary of the Invention

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

[0005] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention specifically comprises the following steps:

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

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

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

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

[0010] S5, designing a target function L of the fusion hierarchical attention mechanism, which comprehensively considers the hierarchical relationship between the candidate entity and the entities in the ontology library in terms of semantics and the dynamic adaptability of the ontology topology. The target function L is expressed as follows:

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

[0012] L sem is a semantic loss function, which is calculated by multi-hop hierarchical semantic similarity, and L topo is a topology loss function, which is used to measure the influence of the candidate entity c on the ontology topology after being inserted, and a and β are weight coefficients for adjusting the proportion of semantic loss and topology loss in the target function. The calculation formula of L sem is as follows:

[0013]

[0014] K represents the maximum number of semantic levels (e.g., K = 3), which means calculating the three-hop semantic similarity of the candidate entity and the entities in the ontology library, γk represents the weight coefficient of the kth hop, which is used to adjust the proportion of different levels of semantic similarity in the loss function, and satisfies w i,k represents the attention weight of the candidate entity c and the entity v i on the kth hop, and sim k (c, v i ) represents the semantic similarity of the candidate entity c and the entity v i on the kth hop. For the semantic similarity sim k (c, v i ) on the kth hop, the calculation method is as follows: for one-hop semantic similarity, the cosine similarity between the embedding vectors of the candidate entity c and the entity v i in the ontology library is directly calculated.

[0015]

[0016] For multi-hop semantic similarity, the semantic similarity on the kth hop (k > 2) is calculated by aggregating the semantic relationships of the candidate entity c and the entity v i on the k-hop path. Let path k(c, v i ) is a k-hop path from candidate entity c to entity v i , the semantic similarity of the path is:

[0017]

[0018] wherein, and represent the embedding vectors of the input entity and the output entity of the jth hop in the path, respectively.

[0019] Finally, the semantic similarity sim k (c, v i ) of the kth hop is:

[0020]

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

[0022] The attention weight w i,k is used to measure the semantic relevance of candidate entity c and entity v i at the kth hop level, and the calculation formula is:

[0023]

[0024] The topology loss function L topo is used to measure the influence of the candidate entity c on the ontology topology after being inserted, and the calculation formula is:

[0025]

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

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

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

[0029] The application also provides a computer readable storage medium, which stores a computer program, and when the program is executed by a processor, the processor executes the ontology completion method based on hierarchical semantic perception and dynamic topology adaptation.

[0030] The application also provides a computer system, comprising:

[0031] A processor is configured to execute instructions stored in a storage medium to implement the ontology completion method based on hierarchical semantic perception and dynamic topology adaptation.

[0032] A memory is configured to store network texts and intermediate results generated in the computing process of the ontology completion method based on hierarchical semantic perception and dynamic topology adaptation.

[0033] An input / output interface is configured to receive specified texts or completion information and output corrected ontology elements.

[0034] The application also provides an ontology completion device based on hierarchical semantic perception and dynamic topology adaptation, which is configured to: acquire a set of domain texts; construct an ontology; input candidate entities; represent semantics; and perform hierarchical semantic perception and dynamic topology adaptation.

[0035] The ontology completion method and device based on hierarchical semantic perception and dynamic topology adaptation have the following effects:

[0036] 1. The method can capture semantic associations and hierarchical structures between entities, effectively identify and complete missing entities, attributes or relationships in the ontology, and improve the completeness and accuracy of the ontology.

[0037] 2. The method has a clear completion target, narrows the search space through candidate set screening, and improves the completion efficiency and pertinence.

[0038] 3. By adaptively adjusting the connection relationship of nodes (such as adding / deleting edges), the computational complexity is reduced, the processing efficiency is improved, and it is especially suitable for high-dimensional and sparse data scenarios.

[0039] 4. The method combines hierarchical semantic modeling and dynamic topology optimization, and has significant improvements in completion accuracy, efficiency, adaptability and interpretability, and is suitable for dynamic completion requirements of complex domain knowledge. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 The figure is a whole flowchart of the method. DETAILED DESCRIPTION

[0041] The specific embodiments of the application are described below to facilitate understanding of the application by those skilled in the art, but it should be clear that the application is not limited to the scope of the specific embodiments. For those skilled in the art, it is obvious that all kinds of changes within the spirit and scope of the application defined and determined by the appended claims are obvious, and all kinds of applications utilizing the concept of the application are included in the protection.

[0042] The technical solutions of the present application are described in detail below through a specific embodiment. The example scenario is to insert the candidate entity "painting starry sky" into the ontology of an art collection.

[0043] 1. Data acquisition and preprocessing

[0044] Acquire a set of domain texts D related to art works from academic databases and encyclopedic knowledge bases. The text set includes:

[0045] D={

[0046] "Painting is a form of painting, often used to depict landscapes and figures."

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

[0048] "Art works include paintings, sculptures, photography and other forms."

[0049] }

[0050] Perform preprocessing operations such as word segmentation, deduplication and annotation on the text to obtain the cleaned text set.

[0051] 2. Ontology construction

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

[0053] V={"painting", "painting", "sculpture", "photography", "van Gogh", "starry sky"}

[0054] E={("painting", "painting"), ("painting", "sculpture"), ("painting", "photography"), ("van Gogh", "starry sky")}

[0055] Where V represents the entity set, and E represents the relationship set between entities.

[0056] 3. Candidate entity input

[0057] The user inputs the candidate entity to be completed c="painting starry sky" and its attributes A(c)={author: van Gogh}.

[0058] 4. Semantic representation

[0059] Use the pre-trained BERT model to map the entities V in the ontology library and the candidate entity c to a 768-dimensional vector space to generate the embedding vector set V' and the embedding vector c of the candidate entity:

[0060] V'={

[0061] "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] "star sky": [0.67, 0.89, 0.91,..., 0.93]

[0067] }

[0068] c = "painting star sky": [0.51, 0.72, 0.83,..., 0.95]

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

[0070] Design the objective function L = a · L sem + β · L topo , determine the optimal insertion position of the candidate entity c by optimizing the objective function.

[0071] 5.1 Semantic loss function

[0072] Calculate the semantic loss function L using multi-hop hierarchical semantic similarity. sem Take K = 2 as an example, calculate the direct similarity of candidate entity c and entity v i in the ontology library.

[0073] One-hop semantic similarity:

[0074]

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

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

[0077] 5.2 Topology loss function

[0078] Calculate the impact of the candidate entity c on the ontology topology after insertion. For example, assume that a new edge (c, oil painting) is added after inserting c:

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

[0080] 5.3 Optimization objective function

[0081] Optimize the objective function L by gradient descent method to find the minimum value and determine the optimal insertion position of the candidate entity c. For example, the insertion position is to establish a direct relationship with the entity "painting":

[0082] New edge: ("painting starry sky", "painting")

[0083] 6. Ontology completion results

[0084] The completed ontology structure is as follows:

[0085] V = {"painting", "drawing", "sculpture", "photography", "van gogh", "starry sky", "painting starry sky"}

[0086] E = {("painting", "drawing"), ("drawing", "sculpture"), ("drawing", "photography"), ("van gogh", "starry sky"), ("painting starry sky", "painting")}

[0087] 10. Summary

[0088] Through the above steps, the candidate entity "painting starry sky" is successfully inserted into the ontology of the art works set and establishes semantic relationship with the related entity "painting", ensuring the semantic consistency and structural rationality of the ontology of paintings and other ontologies, enhancing the completeness of the related ontology graph construction, improving the accuracy and adaptability of the ontology, and providing service support for ontology extraction and knowledge graph construction in the field of computer.

Claims

1. An ontology completion method based on hierarchical semantic perception and dynamic topology adaptation, characterized in that: The following steps are involved: S1: Get domain text collection; S2: ontology construction; S3: candidate entity input; S4: semantic representation; S5: Hierarchical semantic perception and dynamic topology adaptation.

2. The method according to claim 1, characterized in that In step S1, a domain text set D is obtained from an academic database, encyclopedia knowledge base or other structured data sources, where D = {d1, d2, ..., d n }, where d n 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 O = (V, E), where V = {v1, v2, ..., v m } represents an entity set, E={e1,e2,...,e k } represents a set of relationships between entities.

4. The method according to claim 1, wherein In step S3, given the candidate entity c to be completed and its attributes A(c) = {a1, a2, ..., a p }, the name of the candidate entity c and its attributes are used as the input for ontology completion.

5. The method according to claim 1, wherein In step S4, a deep semantic representation model is used to map the 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'={v1,v2,...,v m }, the embedding vector of the candidate entity is c, where d is the dimension of the embedding vector.

6. The method according to claim 1, characterized in that In step S5, the objective function L that integrates the hierarchical attention mechanism is designed, which comprehensively considers the semantic hierarchical relationship between the candidate entity and the entity in the ontology library and the dynamic adaptability of the ontology topology structure; the objective function L is formally expressed as follows: L=α·L sem +β·L topo L sem is the semantic loss function, which is calculated by multi-hop semantic similarity. topo is the topological loss function, which is used to measure the impact of the candidate entity c on the ontology topology after insertion. α and β are weight coefficients, which are used to adjust the ratio of semantic loss and topological loss in the objective function. sem The calculation formula is: K represents the maximum number of hops in the semantic level, which means calculating the three-hop semantic similarity between the candidate entity and the entity in the ontology library. γk represents the weight coefficient of the k-th hop, which is used to adjust the proportion of semantic similarity at different levels in the loss function and satisfies w i,k Represents candidate entity c and entity v i The attention weight at the k-th hop level, sim k (c,v i ) represents the candidate entity c and entity v i Semantic similarity at the k-th hop level; for 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 candidate entity c and the ontology library entity v i Cosine similarity between the embedding vectors of : For multi-hop semantic similarity, the semantic similarity at the k-th hop level, k>2, is obtained by aggregating the candidate entity c and the ontology library entity v. i Calculate the semantic relationship on the k-hop path; let path k (c,v i ) is the candidate entity c to entity v i If there is a k-hop path, the semantic similarity of the path is: in, and They represent the embedding vectors of the input entity and output entity of the j-th hop in the path respectively; Finally, the semantic similarity sim of the k-th hop k (c,v i ) is the mean of the semantic similarity of all valid paths: Among them, P k (c,v i ) represents the candidate entity c to entity v i The set of all k-hop paths; Attention weight w i,k Used to measure the difference between candidate entity c and entity v i The semantic relevance at the k-th hop level is calculated as: Topological loss function L topo It is used to measure the impact of the candidate entity c on the ontology topology after insertion. The calculation formula is: Among them, impact(e,c) represents the topological impact of candidate entity c on edge e. The specific formula is: impact(e,c)=dist(e,c)·deg(v j ) dist(e,c) is the semantic distance between candidate entity c and edge e, deg(v j ) is the entity v j degree.

7. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to execute the ontology completion method based on hierarchical semantic perception and dynamic topology adaptation described in claims 1-6.

8. A computer system comprising: A processor, configured to execute instructions stored in a storage medium to implement the ontology completion method with hierarchical semantic perception and dynamic topology adaptation described in claims 1-6; Memory, used to store network text and intermediate results generated during the calculation process of the ontology completion method with hierarchical semantic perception and dynamic topology adaptation; The input / output interface is used to receive the specified text or completion information and output the corrected ontology elements.

9. 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 collection; construct an ontology; input candidate entities; represent semantics; and perform hierarchical semantic perception and dynamic topology adaptation.

Citation Information

Patent Citations

  • File semantic association storage system and method based on knowledge graph

    CN113961528A

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

    CN117725228A

  • Complementation method and system for knowledge graph in numerical control programming field

    CN119311898A

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

    CN119669298A

  • Method, apparatus, device, and storage medium for clustering extraction of entity relationships

    US20240311931A1