Semi-automatic construction method and system of domain knowledge graph ontology based on topic model

Through a method based on the theme model, the field corpus is dimensionalized and clustered, the field term vocabulary is extracted, the word embedding model is used to fusion, and the domain knowledge graph ontology is constructed, which solves the problem that requires a large number of experts to participate in the existing technology, and realizes efficient field ontology construction.

CN117131932BActive Publication Date: 2025-08-08CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311069943.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2025-08-08
Estimated Expiration
2043-08-23

AI Technical Summary

Technical Problem

In the prior art, the construction of ontology requires the participation of a large number of experts in the field, and the efficiency is low and the standards are not unified, making it difficult to efficiently construct a knowledge graph in vertical fields.

Method used

Using a theme model-based method, the domain corpus is obtained for dimensionality reduction and clustering, the domain term vocabulary is extracted, and the word embedding model is used for feature extraction and fusion, and the domain knowledge graph ontology is constructed to reduce expert participation.

Benefits of technology

It improves the accuracy of field candidate term extraction, reduces expert participation, optimizes feature extraction, improves field ontology construction efficiency, and shortens knowledge graph construction time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131932B_ABST
    Figure CN117131932B_ABST
Patent Text Reader

Abstract

The present invention provides a semi-automatic construction method for a domain knowledge graph ontology based on a topic model, comprising the following steps: S1: obtaining a domain corpus Corpus, performing dimensionality reduction and clustering on the domain corpus Corpus to obtain a topic cluster distribution; S2: performing domain term extraction on the topic cluster distribution to obtain a domain term vocabulary Terms; S3: constructing a word embedding model word2vec, performing feature extraction and fusion on the domain term vocabulary Terms through the word embedding model word2vec to obtain a fused word embedding representation matrix Keywords Embeddings; S4: performing dimensionality reduction and clustering on the fused word embedding representation matrix Keywords Embeddings to obtain a domain term cluster distribution; S5: constructing a domain knowledge graph ontology based on the domain term cluster distribution. The present invention constructs a domain knowledge graph ontology by performing dimensionality reduction and clustering on the fused word embedding representation matrix, requiring only a small number of domain experts to participate in the ontology construction work, thereby improving the efficiency of domain ontology construction and accelerating the construction process of the domain knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph construction, and in particular to a method and system for semi-automatic construction of a domain knowledge graph ontology based on a topic model. Background Art

[0002] The knowledge graph is divided into two parts: the schema layer and the data layer. The schema layer is the core of the knowledge graph and stores refined knowledge; the data layer stores specific data information. The schema belongs to the schema layer and is used to standardize the domain and description objects of the knowledge graph. Designing a schema for a knowledge graph is equivalent to constructing its ontology. The ontology construction mentioned in this article is equivalent to designing a schema.

[0003] Ontology construction is a key step in building a knowledge graph. Ontology construction refers to the process of defining and modeling concepts, entities, attributes, and relationships within a specific domain. Ontologies are typically used to describe the conceptual system within a domain, organizing entities and concepts into a hierarchical structure and defining the attributes and relationships between them. Knowledge graphs in vertical domains typically only require defining entity types, relationship types, and attribute types. By defining and building an ontology, the entities, attributes, and relationships within the knowledge graph can be clarified, making the knowledge graph more structured and standardized, and enabling more accurate representation and expression of domain knowledge.

[0004] The introduction of topic models and clustering methods has improved the efficiency of domain term extraction, allowing for clustering and analysis based on textual similarity in corpora. However, supervised topic models and clustering methods also rely on large datasets for feature learning to ensure the accuracy and reliability of the learning results. Consequently, existing ontology construction typically requires the participation of numerous domain experts, resulting in low efficiency, time-consuming development, and inconsistent standards. Summary of the Invention

[0005] To solve the above technical problems, the present invention provides a method for semi-automatically constructing a domain knowledge graph ontology based on a topic model, comprising:

[0006] S1: Obtain the domain corpus Corpus, perform dimensionality reduction and clustering on the domain corpus Corpus to obtain the topic cluster distribution;

[0007] S2: Extract domain terms from the topic cluster distribution to obtain the domain term vocabulary Terms;

[0008] S3: Build a word embedding model word2vec, use the word2vec model to extract and fuse features of the domain term vocabulary Terms, and obtain the fused word embedding representation matrix Keywords Embeddings;

[0009] S4: Perform dimensionality reduction and clustering on the fused word embedding representation matrix Keywords Embeddings to obtain the cluster distribution of domain terms;

[0010] S5: Construct domain knowledge graph ontology through clustering distribution of domain terms.

[0011] Preferably, step S1 is specifically as follows:

[0012] S11: Obtain domain documents, and make the character length of each document in the domain documents within 512 characters by sentence segmentation and splicing, and obtain the domain corpus Corpus;

[0013] S12: Map sentences and paragraphs in the domain corpus Corpus to a 512-dimensional dense vector space to obtain the word embedding representation matrix Corpus Embeddings;

[0014] S13: Reduce the dimensionality of the word embedding representation matrix Corpus Embeddings using the UMAP dimensionality reduction algorithm to obtain the word embedding reduced dimensionality representation matrix UMAP Embeddings;

[0015] S14: Use the HDBSACN clustering algorithm to perform topic clustering on the word embedding dimensionality reduction representation matrix UMAP Embeddings to obtain the topic cluster distribution.

[0016] Preferably, step S2 is specifically as follows:

[0017] S21: Treat a single cluster in the topic cluster distribution as a document and extract candidate terms from each document;

[0018] S22: Calculate the TF-IDF value of each candidate term using the TF-IDF algorithm, and construct a term matrix based on the TF-IDF value of each candidate term;

[0019] S23: Set the threshold of each cluster in the topic cluster distribution, take the candidate terms with TF-IDF values higher than the threshold of the corresponding cluster as domain terms, obtain all domain terms and construct the domain term vocabulary Terms.

[0020] Preferably, step S3 is specifically as follows:

[0021] S31: Obtain the initial word embedding model, adjust the parameters of the initial word embedding model through the domain corpus Corpus and the domain terminology vocabulary Terms, and obtain the word embedding model word2vec;

[0022] S32: Use the word2vec word embedding model to map the domain term vocabulary Terms to a multi-dimensional dense vector space to obtain the domain term word embedding representation matrix Terms Embeddings;

[0023] S33: Use the word2vec word embedding model to perform part-of-speech extraction and length extraction on the domain term vocabulary Terms, and obtain the part-of-speech embedding representation matrix POS Embeddings and the length embedding representation matrix Size Embeddings;

[0024] S34: Fuse the domain term embedding representation matrix Terms Embeddings, the part-of-speech embedding representation matrix POSEmbeddings, and the length embedding representation matrix Size Embeddings to obtain the fused word embedding representation matrix Keywords Embeddings.

[0025] Preferably, step S4 is specifically as follows:

[0026] S41: Reduce the dimensionality of the fused word embedding representation matrix Keywords Embeddings using the UMAP dimensionality reduction algorithm to obtain the fused word embedding reduced dimensionality representation matrix UMAP Keywords Embeddings;

[0027] S42: Use the HDBSACN clustering algorithm to perform term clustering on the fused word embedding reduced dimension representation matrix UMAP KeywordsEmbeddings to obtain the domain term clustering distribution.

[0028] Preferably, step S5 is specifically as follows:

[0029] S51: Consider each cluster in the domain term cluster distribution as a class Class, and obtain the classification representation matrix Clusters of the domain term;

[0030] S52: Set the entity type and attribute type of each category in each classification representation matrix Clusters, and construct the domain knowledge graph ontology through entity type, attribute type, relationship type between entity types, and relationship type between entity type and attribute type.

[0031] A semi-automatic construction system of domain knowledge graph ontology based on topic model, including:

[0032] The topic cluster distribution acquisition module is used to obtain the domain corpus Corpus, perform dimensionality reduction and clustering on the domain corpus Corpus, and obtain the topic cluster distribution;

[0033] The domain term vocabulary acquisition module is used to extract domain terms from the topic cluster distribution and obtain the domain term vocabulary Terms;

[0034] The fusion word embedding representation matrix acquisition module is used to build the word embedding model word2vec. The word embedding model word2vec is used to extract and fuse the features of the domain term vocabulary Terms to obtain the fusion word embedding representation matrix KeywordsEmbeddings.

[0035] The domain term cluster distribution acquisition module is used to reduce the dimension and cluster the fusion word embedding representation matrix Keywords Embeddings to obtain the domain term cluster distribution;

[0036] The domain knowledge graph ontology construction module is used to construct the domain knowledge graph ontology through the clustering distribution of domain terms.

[0037] The present invention has the following beneficial effects:

[0038] By reducing the dimensionality and clustering the domain corpus to obtain the topic cluster distribution, topic clustering can significantly improve the accuracy of domain candidate term extraction; obtaining the domain term vocabulary through the TF-IDF algorithm reduces the degree of expert participation and can effectively save manpower and material resources; using the word embedding model to extract and fuse the domain term vocabulary, it optimizes the impact of heterogeneous data on feature extraction; by reducing the dimensionality and clustering the fused word embedding representation matrix to construct the domain knowledge graph ontology, only a small number of domain experts are required to participate in the ontology construction work, which can improve the efficiency of domain ontology construction and accelerate the construction process of the domain knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of a method according to an embodiment of the present invention;

[0040] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

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

[0042] Reference Figure 1 The present invention provides a method for semi-automatically constructing a domain knowledge graph ontology based on a topic model, comprising:

[0043] S1: Obtain the domain corpus Corpus, perform dimensionality reduction and clustering on the domain corpus Corpus to obtain the topic cluster distribution;

[0044] S2: Extract domain terms from the topic cluster distribution to obtain the domain term vocabulary Terms;

[0045] S3: Build a word embedding model word2vec, use the word2vec model to extract and fuse features of the domain term vocabulary Terms, and obtain the fused word embedding representation matrix Keywords Embeddings;

[0046] S4: Perform dimensionality reduction and clustering on the fused word embedding representation matrix Keywords Embeddings to obtain the cluster distribution of domain terms;

[0047] S5: Construct domain knowledge graph ontology through clustering distribution of domain terms.

[0048] Furthermore, step S1 is specifically as follows:

[0049] S11: Obtain domain documents, and make the character length of each document in the domain documents within 512 characters by sentence segmentation and splicing, and obtain the domain corpus Corpus;

[0050] Specifically, within a specific field, we use crawlers, OCR and other technologies to obtain documents in that field, and after processing, we get the domain corpus, where |Corpus| is the total number of corpuses (the same below);

[0051] S12: Map sentences and paragraphs in the domain corpus Corpus to a 512-dimensional dense vector space to obtain the word embedding representation matrix Corpus Embeddings;

[0052] Specifically, using the domain corpus as the data source, we use the SentenceTransformer distiluse-base-multilingual-cased pre-trained model. This model maps sentences and paragraphs into a 512-dimensional dense vector space and supports Chinese corpus, which can be used for tasks such as clustering or semantic search. This step obtains the Corpus word embedding representation matrix CorpusEmbeddings, with a dimension of (|Corpus|, 512).

[0053] S13: Reduce the dimensionality of the word embedding representation matrix Corpus Embeddings using the UMAP dimensionality reduction algorithm to obtain the word embedding reduced dimensionality representation matrix UMAP Embeddings;

[0054] Specifically, first initialize the UMAP dimensionality reduction algorithm. Parameters need to be provided based on the specific task: n_components is the number of dimensions to be reduced. It is recommended that n_components∈[2,100]∩Z, where Z is an integer set (the same below); n_epochs is the number of model training iterations. This parameter value decreases as |Corpus| increases. Use Corpus Embeddings to train UMAP. This step obtains the word embedding dimensionality reduction matrix UMAP Embeddings. The dimension of UMAP Embeddings is (|Corpus|, n_components).

[0055] S14: Use the HDBSACN clustering algorithm to perform topic clustering on the UMAP Embeddings matrix to obtain the topic cluster distribution;

[0056] Specifically, we first initialize the HDBSACN clustering algorithm. We need to provide parameters based on the specific task: min_cluster_size is the minimum number of data points contained in a single cluster, meaning the number of clusters decreases as min_cluster_size increases; min_simples is used to measure how conservative the user wants the clustering to be; the larger the value, the more conservative the clustering, meaning more points will be considered noise and the clusters will be restricted to increasingly dense areas; min_simples∈(0,1], HDBSACN is trained using UMAP Embeddings; this step yields the topic clustering distribution of the domain corpus.

[0057] Furthermore, step S2 is specifically as follows:

[0058] S21: Treat a single cluster in the topic cluster distribution as a document and extract candidate terms from each document;

[0059] S22: Calculate the TF-IDF value of each candidate term using the TF-IDF algorithm, and construct a term matrix based on the TF-IDF value of each candidate term;

[0060] Specifically, a single cluster is considered as a document, and the number of clusters is considered as the number of documents in the entire corpus N. The TF-IDF algorithm is used to extract candidate domain terms. The TF-IDF value is calculated as shown in the formula:

[0061]

[0062] Among them, W t,d is the TF-IDF value of term t in cluster d, tf t,d is the frequency of term t in cluster d, df tis the number of clusters of term t included in the total clusters;

[0063] S23: Set the threshold of each cluster in the topic cluster distribution, take the candidate terms with TF-IDF values higher than the threshold of the corresponding cluster as domain terms, obtain all domain terms and construct the domain term vocabulary Terms.

[0064] Furthermore, step S3 is specifically as follows:

[0065] S31: Obtain the initial word embedding model, adjust the parameters of the initial word embedding model through the domain corpus Corpus and the domain terminology vocabulary Terms, and obtain the word embedding model word2vec;

[0066] Specifically, we use the word2vec word embedding model based on Chinese encyclopedia corpus. The word2vec word embedding model is more suitable for completing similar word calculation tasks. The word embedding dimension dims is predefined, generally dims∈[50,300]∩Z;

[0067] S32: Use the word2vec word embedding model to map the domain term vocabulary Terms to a multi-dimensional dense vector space to obtain the domain term word embedding representation matrix Terms Embeddings;

[0068] Specifically, the dimension of Terms Embeddings is (|Terms|, dims);

[0069] S33: Use the word2vec word embedding model to perform part-of-speech extraction and length extraction on the domain term vocabulary Terms, and obtain the part-of-speech embedding representation matrix POS Embeddings and the length embedding representation matrix Size Embeddings;

[0070] S34: Fuse the domain term embedding representation matrix Terms Embeddings, the part-of-speech embedding representation matrix POSEmbeddings, and the length embedding representation matrix Size Embeddings to obtain the fused word embedding representation matrix Keywords Embeddings;

[0071] Specifically, the Terms Embeddings, POS Embeddings, and Size Embeddings are fused using a non-parametric average pooling layer, and the dimension of Keywords Embeddings is (|Terms|, dims).

[0072] Furthermore, step S4 is specifically as follows:

[0073] S41: Reduce the dimensionality of the fused word embedding representation matrix Keywords Embeddings using the UMAP dimensionality reduction algorithm to obtain the fused word embedding reduced dimensionality representation matrix UMAP Keywords Embeddings;

[0074] Specifically, re-initialize the UMAP dimensionality reduction algorithm, and provide parameters based on the specific task: n_components is the size of the dimension to be reduced, and n_components∈[2,100]∩Z is recommended; n_epochs is the number of model training iterations, and the value of this parameter decreases as |Terms| increases; use Keywords Embeddings to train UMAP; this step obtains the fused word embedding dimensionality reduction representation matrix UMAP Keywords Embeddings, and the dimension of UMAP Keywords Embeddings is (|Terms|, n_components);

[0075] S42: Use the HDBSACN clustering algorithm to perform term clustering on the fused word embedding reduced dimension representation matrix UMAP KeywordsEmbeddings to obtain the domain term cluster distribution;

[0076] Specifically, to reinitialize the HDBSACN clustering algorithm, parameters need to be provided based on the specific task: min_cluster_size is the minimum number of data points contained in a single cluster, that is, the number of clusters decreases as min_cluster_size increases; min_simples is used to measure the degree of conservatism that the user wants the clustering to be. The larger the value, the more conservative the clustering is, which means that more points will be regarded as noise and the clusters will be restricted to gradually denser areas; min_simples∈(0,1], HDBSACN is trained using UMAP Keywords Embeddings; this step obtains the cluster distribution of domain terms.

[0077] Furthermore, step S5 is specifically as follows:

[0078] S51: Consider each cluster in the domain term cluster distribution as a class Class, and obtain the classification representation matrix Clusters of the domain term;

[0079] Specifically, each cluster in the clustering results of the above domain terms is regarded as a class in the ontology, and the word embedding is decoded into the Chinese character representation of the domain term. Each cluster contains multiple domain terms. This step obtains the classification representation matrix Clusters of the domain terms, that is, Terms is divided into m classes, each class contains different domain terms.

[0080] S52: Set the entity type and attribute type of each category in each classification representation matrix Clusters, and construct the domain knowledge graph ontology through the entity type, attribute type, relationship type between entity types, and relationship type between entity types and attribute types;

[0081] Specifically, the above Clusters are handed over to domain experts, who determine the conceptual expression of each class based on the domain terminology of the class, and then determine the entity type, relationship type, and attribute type to complete the construction of the domain knowledge graph ontology.

[0082] A semi-automatic construction system of domain knowledge graph ontology based on topic model, including:

[0083] The topic cluster distribution acquisition module is used to obtain the domain corpus Corpus, perform dimensionality reduction and clustering on the domain corpus Corpus, and obtain the topic cluster distribution;

[0084] The domain term vocabulary acquisition module is used to extract domain terms from the topic cluster distribution and obtain the domain term vocabulary Terms;

[0085] The fusion word embedding representation matrix acquisition module is used to build the word embedding model word2vec. The word embedding model word2vec is used to extract and fuse the features of the domain term vocabulary Terms to obtain the fusion word embedding representation matrix KeywordsEmbeddings.

[0086] The domain term cluster distribution acquisition module is used to reduce the dimension and cluster the fusion word embedding representation matrix Keywords Embeddings to obtain the domain term cluster distribution;

[0087] The domain knowledge graph ontology construction module is used to construct the domain knowledge graph ontology through the clustering distribution of domain terms.

[0088] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0089] The serial numbers of the embodiments of the present invention are for descriptive purposes only and do not represent superiority or inferiority of the embodiments. In a unit claim that lists several means, several of these means may be embodied by the same item of hardware. The use of the terms first, second, and third, etc., does not denote any order and should be construed as identifiers.

[0090] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A semi-automatic construction method of domain knowledge graph ontology based on topic model, characterized in that: include: S1: Obtaining domain corpus , for the domain corpus Perform dimensionality reduction and clustering to obtain topic cluster distribution; S2: Extract domain terms from the topic cluster distribution to obtain the domain term vocabulary ; S3: Building a word embedding model , through word embedding model Domain term vocabulary Perform feature extraction and fusion to obtain the fused word embedding representation matrix ; S4: Fusion word embedding representation matrix Perform dimensionality reduction and clustering to obtain the cluster distribution of domain terms; S5: Construct domain knowledge graph ontology through clustering distribution of domain terms; Wherein, step S1 is specifically as follows: S11: Obtain domain documents, and make the character length of a single document in the domain document within 512 characters by sentence segmentation and splicing to obtain the domain corpus ; S12: Domain Corpus The sentences and paragraphs in the text are mapped to a 512-dimensional dense vector space to obtain the word embedding representation matrix ; S13: Pass Dimensionality reduction algorithm for word embedding representation matrix Perform dimensionality reduction to obtain the word embedding dimensionality reduction representation matrix ; S14: Pass Clustering algorithm reduces the dimension of word embedding representation matrix Perform topic clustering to obtain topic cluster distribution; Step S2 is specifically as follows: S21: Treat a single cluster in the topic cluster distribution as a document and extract candidate terms from each document; S22: Pass The algorithm calculates the value of each candidate term Value, through each candidate term Values construct term matrix; S23: Set the threshold of each cluster in the topic cluster distribution. Candidate terms with values higher than the threshold of the corresponding cluster are used as domain terms, and all domain terms are obtained to build a domain term vocabulary. .

2. The method for semi-automatic construction of domain knowledge graph ontology based on topic model according to claim 1 is characterized in that: Step S3 is specifically as follows: S31: Get the initial word embedding model through the domain corpus and domain terminology vocabulary Adjust the parameters of the initial word embedding model to obtain the word embedding model ; S32: Through word embedding model Domain term vocabulary Mapping to a multi-dimensional dense vector space to obtain the domain term word embedding representation matrix ; S33: Through word embedding model Domain term vocabulary Perform part-of-speech extraction and length extraction respectively to obtain the part-of-speech embedding representation matrix and length embedding representation matrix ; S34: Embedding domain terminology into a representation matrix , part-of-speech embedding representation matrix and length embedding representation matrix Perform feature fusion to obtain the fused word embedding representation matrix .

3. The method for semi-automatic construction of domain knowledge graph ontology based on topic model according to claim 1 is characterized in that: Step S4 is specifically as follows: S41: Pass Dimensionality reduction algorithm for fusion word embedding representation matrix Perform dimensionality reduction to obtain the fusion word embedding dimensionality reduction representation matrix ; S42: Pass Clustering algorithm for fusion word embedding dimensionality reduction representation matrix Perform term clustering to obtain domain term cluster distribution.

4. The method for semi-automatic construction of domain knowledge graph ontology based on topic model according to claim 1 is characterized in that: Step S5 is specifically as follows: S51: Treat each cluster in the domain term cluster distribution as a class Class, and obtain the classification representation matrix of the domain term ; S52: Set each classification representation matrix The entity types and attribute types of each category in the domain knowledge graph ontology are constructed through entity types, attribute types, relationship types between entity types, and relationship types between entity types and attribute types.

5. A semi-automatic construction system of domain knowledge graph ontology based on topic model, characterized by: Used to implement the semi-automatic construction method of domain knowledge graph ontology based on topic model as described in any one of claims 1 to 4.