Knowledge graph completion method and system based on concept graph
By generating conceptual knowledge through segmentation algorithms and neural networks, combining incompatible concept detection and named entity verification, and utilizing graph traversal rule mining and path walking methods, the problem of lack of novelty and accuracy of newly generated nodes in knowledge graphs is solved, achieving higher quality common sense knowledge graph completion.
Patent Information
- Application Number
- CN202310498632.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-05-05
AI Technical Summary
In existing technologies, newly generated nodes in knowledge graphs lack novelty, model performance and application scenarios are limited, and the accuracy and quality of the graphs are low.
Explicit and implicit concept knowledge is generated through segmentation algorithms and neural network methods, combined with incompatible concept detection and named entity recognition verification, and common sense knowledge graph completion is performed using graph traversal rule mining and path walking methods.
It improves the coverage and accuracy of concept graphs, identifies entities and their relationships with novelty and diversity, expands the coverage of common sense knowledge, eliminates erroneous common sense, and enhances the quality and accuracy of knowledge graphs.
Smart Images

Figure CN116992040B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a knowledge graph completion method based on concept graphs. Background Art
[0002] Knowledge graphs, due to their unique knowledge structure and powerful semantic processing capabilities, are playing an increasingly powerful role in numerous AI applications. However, the widespread data sparsity problem inherent in knowledge graphs has become increasingly pronounced and acute. Therefore, knowledge graph completion has become a hot research topic within knowledge graph technology. The processing of commonsense knowledge is widely recognized within the international AI community as a core challenge in AI. The presence or absence of commonsense knowledge is the fundamental difference between humans and computers, and the ability to solve commonsense problems is linked to the viability of AI. Commonsense is relative to professional knowledge, also known as domain knowledge, which is widely used in various expert systems and domain software. Commonsense knowledge is universally known and applicable across all domains. It is well-known and self-evident knowledge that has been verified and used by human society for a long time. While the accumulated professional knowledge of humanity is vast, it is only the tip of the iceberg compared to commonsense knowledge. The breadth of commonsense knowledge is incomparable to that of professional knowledge. Various theoretical studies on commonsense issues have significantly promoted the development of commonsense completion research, and some of this research has even progressed towards practical application.
[0003] The existing Chinese invention patent application number 202211247682.7 discloses a method and device for adaptively completing a knowledge graph based on 3D convolution. The method includes extracting triple information based on knowledge base data; constructing a head entity vector, a relationship vector, and a tail entity vector based on the triple set; reshaping the relationship vector into a 3D matrix; and splitting the head entity vector into several block vectors, and reshaping any of the split block vectors into a 3D convolution filter; using the 3D matrix as the input of a convolution layer, convolving the input based on the constructed filter to generate a corresponding convolution feature map based on any of the filters; flattening and stacking each convolution feature map into a target vector; using a fully connected layer to project the target vector into the vector space of the relationship vector and perform an inner product with the tail entity vector to obtain a knowledge vector; and using the knowledge vector to complete the knowledge graph. However, training a 3D convolution model requires more computing resources and is prone to overfitting during training, resulting in the method performing well on the training set but poorly on the test set, causing the model to tend to produce samples similar to the training set.
[0004] An existing Chinese invention patent application with application number 202211234641.4 discloses a training method and apparatus for a knowledge graph completion model. The method comprises: converting a triple query training dataset into a search query training dataset; constructing positive and negative documents corresponding to each search query training data set to obtain a positive document set and a negative document set; using the search query training dataset, the positive document set, and the negative document set to pre-train a knowledge retrieval module so that the knowledge retrieval module can output multiple documents related to each triple query training data set; concatenating these multiple documents with the corresponding search query training data set and inputting them into a reading comprehension module to predict the tail entity of the triple query training data set, and using the cross-entropy between the predicted tail entity and the correct tail entity as a loss function to optimize model parameters to obtain a trained completion model. However, this solution only considers the textual information of the query and document, and does not consider other semantic information, such as structural information and knowledge relationships, which limits the model's performance and application scenarios.
[0005] The existing Chinese invention patent application number 202210710090.8 discloses a knowledge graph completion method that combines subgraph structure and relationship type. The method includes first preprocessing the knowledge graph positive sample data, converting the original knowledge graph into a relationship graph, augmenting the sample data through negative sampling, and extracting a sample subgraph for each sample. The initial features of the relationship are then randomly initialized, and the initial features of the entity are set based on the location information. The relationship features are then optimized through a graph autoencoder, and the structural information of the subgraph is extracted using a graph neural network to update the entity features, and the model is trained. When performing a specific completion task, after obtaining the embedded features of the candidate triples, the triple scores are calculated using a scoring function, and finally the completion task is completed based on the score sorting results. The method uses negative sampling technology to augment the positive sample data, but when negative sampling, it often only selects entities that have no relationship with the current entity as negative samples. This selection of negative samples may lead to bias problems and affect the generalization ability of the model. Summary of the Invention
[0006] The present invention aims to solve at least one of the technical problems in the prior art, namely, the lack of novelty of newly generated nodes, limited performance and application scenarios of the model, and low accuracy and quality of the graph.
[0007] To this end, the first aspect of the present invention provides a knowledge graph completion method based on concept graph.
[0008] The second aspect of the present invention provides a knowledge graph completion system based on concept graph.
[0009] The present invention provides a knowledge graph completion method based on a concept graph, comprising the following steps:
[0010] S1. Extract semi-structured data through segmentation algorithms to obtain the hypernym relationship of entities and generate explicit concept knowledge. Extract unstructured text through neural network methods to obtain the hypernym relationship of concepts, obtain the concept of entities, and mine the implicit representation in semantics to generate implicit concept knowledge.
[0011] S2: Verify the concepts generated by S1 from the perspectives of incompatible concepts and named entity recognition, filter out incorrect concepts, improve the quality of the concept map, and complete the construction of the concept map.
[0012] S3. Use graph traversal-based rule mining methods to mine the rich contextual information in the concept graph, obtain more entities and their relationships related to common sense concepts in the real world, and explore a wider range of triples;
[0013] S4. Concept completion of the common sense knowledge graph is achieved through a knowledge completion method based on path walking.
[0014] The knowledge graph completion method based on the concept graph according to the above technical solution of the present invention may also have the following additional technical features:
[0015] In the above technical solution, extracting semi-structured data through a segmentation algorithm to obtain the hypernym relationship of entities and generate explicit conceptual knowledge includes:
[0016] Get the concept entity and the word sequence corresponding to the concept entity;
[0017] Take the last three words in the word sequence as the candidate window;
[0018] Use point mutual information to evaluate the probability that the words connected together are a hypernym.
[0019] If the point-wise mutual information of the last two words in the candidate window is greater than that of the first two words, the last two words are concatenated as a whole; if the point-wise mutual information of the last two words in the candidate window is less than that of the first two words, the third word is discarded.
[0020] Slide the candidate window forward by one word to get three more candidates, and repeat the previous step until the first word in the word sequence appears in the candidate window;
[0021] If the point-wise mutual information of the first two words in the candidate window is greater than the point-wise mutual information of the last two words, the first two words are concatenated as a whole and the candidate window is slid back one word unit.
[0022] Determine the length of the word sequence. When the word sequence length is 2, if the point mutual information of the two words after being connected is greater than the set threshold, the two words are concatenated and output as the conceptual knowledge of the entity; if the point mutual information of the two words after being connected is less than the set threshold, the latter word is used as the conceptual knowledge of the entity; the point mutual information of the two words after being connected is used as the credibility of the conceptual knowledge.
[0023] In the above technical solution, the neural network method is used to extract unstructured text to obtain the hyponym and hyponym relationships of concepts, obtain the concepts of entities, and mine the implicit representations in semantics to generate implicit concept knowledge, including:
[0024] Build a dictionary containing all word representations, start symbol representations, and unknown symbol representations;
[0025] Convert the input word into the corresponding id according to the dictionary, and then use the pre-trained word embedding vector to initialize the vector;
[0026] Character-based and word-based representations are used as input, and a convolutional neural network with a max-pooling function is used to extract the feature vector of each word;
[0027] Concatenate word embedding and character embedding to obtain the embedding matrix;
[0028] Feed the embedding matrix into a bidirectional LSTM layer to obtain the latent vector of the word;
[0029] Using word latent vectors for concept knowledge sequence prediction.
[0030] In the above technical solution, the use of latent vectors of words to predict concept knowledge sequences includes:
[0031] Use a layer of long short-term memory network to process the hidden vector of the word to obtain the decoder feature vector s. In each training stage, the long short-term memory network is based on the word embedding feature w of the previous time sequence word. t-1 and the context feature s of the previous time series t-1 and the target word feature y of the previous time series prediction t-1 To predict the generated concept knowledge word e of t time series t , the calculation method is:
[0032]
[0033]
[0034] in, W d is the weight matrix, b d is the deviation value.
[0035] In the above technical solution, the conceptual knowledge generated by S1 is verified from the incompatible concept dimension, including:
[0036] Use the transformer-based pre-trained model as a recognizer to identify incompatible concepts in the concept graph;
[0037] Among them, the pre-training model uses masked semantics to perform pre-training on large-scale corpus, removes a certain word or phrase in the corpus, and then predicts it as the correct answer.
[0038] In the above technical solution, the pre-training model adopts a multi-layer transformer architecture;
[0039] The training settings of the pre-trained model include:
[0040] Use the [SEP] special character to separate the two sentences, and use a special sentence ID to identify which sentence the word belongs to;
[0041] The combination of the hypernym c1 and its adjacent nodes in the concept graph is used as the first sentence, and the combination of the hypernym c2 and its adjacent nodes in the concept graph is used as the second sentence. [CLS] is introduced before the first sentence to indicate whether the two hypernyms c1 and c2 are incompatible nodes.
[0042] The [CLS] output feature of the last layer of the pre-trained model is used as the final embedding feature expression, and then a fully connected network is connected to it to perform binary classification using the cross entropy loss function, thereby obtaining incompatible pairs of hypernyms in the concept graph;
[0043] If a hypernym of an entity e exists in both c1 and c2, the similarity between the entity e and c1 and c2 is calculated, and the concept knowledge with greater similarity is taken as correct knowledge, while the concept knowledge with less similarity is filtered out as incorrect knowledge. The embedding representation of entity e comes from the vocabulary representation of a pre-trained model pre-trained on a large-scale corpus using masked semantics. The method is as follows:
[0044]
[0045] The embedding representations of the hypernyms c1 and c2 are obtained by aggregating the embedding representations of adjacent entities as follows:
[0046]
[0047] in, e i are all the hyponyms corresponding to the hypernym c. By aggregating the embedding representations of the hyponym nodes, we get the feature embedding representation of the hypernym c.
[0048] The feature embeddings of entity e and c1, c2 are calculated using cosine similarity as follows:
[0049] .
[0050] In the above technical solution, the conceptual knowledge generated by S1 is verified from the dimension of named entity recognition, including:
[0051] Named entity recognition is performed from the corpus using a named entity algorithm based on a pre-trained model, including: given a text T, the goal of named entity recognition is to detect entity sets from the text T and classify them into predefined categories; this work is defined as a sequence labeling problem, let T={t 1 ,t 2 ,…,t n } represents an input of size n, y= {y 1 ,y 2 ,…,y n } is the corresponding sequence;
[0052] Use the pre-trained model as a text encoder for a sequence of size n T={t 1 ,t 2 ,…,t n } , two special characters are inserted into the text training T, [CLS] is added to the beginning and [SEP] is added to the end of the text to obtain the output of the pre-trained model T o ={t 0 ,t 1 ,t 2 ,…,t n ,t n+1 } , and finally T o Send it to the CRF layer to get all named entities;
[0053] Use named entities to verify the authenticity of conceptual knowledge, including: To express the support of hypernym H as a named entity, s(H)=NE(H) / total(H), where NE(H) represents the number of times H appears as a named entity, and total(H) represents the total number of times H appears; set the noise threshold , and filter out those whose support is greater than the threshold conceptual knowledge.
[0054] In the above technical solution, the rule mining method based on graph traversal is used to mine the rich context information in the concept graph, obtain more entities and their relationships related to common sense concepts in the real world, and explore a wider range of triples, including:
[0055] An atom is defined as a relation / fact with two variables: subject and predicate;
[0056] A rule is defined as consisting of a head and a body, where the head is an atom and the body is a collection of atoms. If all atoms in the body appear in the knowledge graph, then the rule is considered a rule instance. The confidence of a rule is used to measure the universality and generality of a rule. The greater the confidence of a rule, the more general it is, indicating that the rule is a common sense rule. The confidence of a rule is represented by the number of rule instances that exist in the knowledge graph.
[0057] The common sense knowledge graph and concept graph are used as input, and rules are mined from them to obtain a completion rule set as output. For each common sense fact triple in the common sense knowledge graph, an entity detection model is used to perform entity detection and identify the entities in the head node and tail node. These entities are the anchor points for common sense knowledge completion. Then, common sense fact triples that are exactly the same except for the entities in the common sense triples are found as inspiration examples for common sense graph completion. Using the concept graph, the relationship between different entities in the inspiration examples is discovered, and then abstracted as the completion rules, thereby achieving the purpose of rule mining.
[0058] In the above technical solution, the concept completion of the common sense knowledge graph is achieved through the knowledge completion method based on path walking, including:
[0059] The common sense knowledge graph, concept graph and the completion rule set mined in step S3 are used as input, and the completed common sense knowledge graph is used as output; for each common sense fact triple in the common sense knowledge graph, all entities in its head entity and tail entity are identified through the entity detection method to form an entity set; for each entity ent1 in the entity set, the completion rule set is used to walk the path in the concept graph to find entity ent2, replace entity ent1 in the common sense fact triple with entity ent2, introduce it into the common sense knowledge graph, and use it as a new completed fact triple to finally obtain the completed common sense knowledge graph M ′ (Vc ′ ,Ec ′ ) .
[0060] The present invention also provides a knowledge graph completion system based on a concept graph, which uses the method described in any of the above technical solutions to complete the knowledge graph, including a concept graph construction unit and a graph completion unit;
[0061] The concept map construction unit includes a generation module and a verification module;
[0062] The generation module is used to extract semi-structured data through a segmentation algorithm to obtain the hypernym relationship of entities and generate explicit concept knowledge; extract unstructured text through a neural network method to obtain the hypernym relationship of concepts, obtain the concept of the entity, and mine the implicit representation in the semantics to generate implicit concept knowledge;
[0063] The verification module is used to perform concept verification on the concept knowledge generated by the generation module from the incompatible concept dimension and the named entity recognition dimension, filter out erroneous concept knowledge, improve the quality of the concept map, and complete the construction of the concept map;
[0064] The graph completion unit is used to mine the rich upper and lower information in the concept graph based on the rule mining method of graph traversal, obtain more entities and their relationships related to common sense concepts in the real world, explore a larger range of triples, and then realize the concept completion of the common sense knowledge graph through the knowledge completion method based on path walking.
[0065] In summary, due to the adoption of the above technical features, the beneficial effects of the present invention are:
[0066] The data-driven concept graph construction model proposes a concept generation method for text information of different structures, and verifies and cleans it from multiple dimensions. It can solve problems such as the limited existing concept space, coarse-grained concepts, and difficulty in mining implicit semantic concepts. The concept-based knowledge graph completion method helps to identify entities and relationships with novelty and diversity, and expand the coverage of common sense knowledge.
[0067] Specifically, the present invention generates explicit concept knowledge from semi-structured data and implicit concept knowledge from unstructured text, thereby improving the coverage of concept graphs. The present invention uses incompatible concept detection and named entity verification to clean and filter the generated concepts, thereby improving the accuracy of concept graphs. The present invention complements the common sense knowledge graph through concept graphs, designs a graph traversal-based rule mining method, automatically mines the hierarchical relationships in the concept graph, and utilizes an external knowledge base to generate diverse and novel common sense knowledge nodes.
[0068] The crawled data sources are high-quality Wikipedia and Baidu Encyclopedia, whose authenticity has been verified by users. Using neural networks to construct concept graphs, we can better capture the different semantic information of the same entity in different paragraphs, thereby accurately generating entities and their hypernyms from the paragraphs. The generated common sense concepts are verified using neural networks and the characteristics of named entities in common sense concepts, eliminating a large number of common sense errors.
[0069] Additional aspects and advantages of the invention will become apparent from the description which follows, or may be learned by practice of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
[0071] Figure 1 This is a framework diagram of a knowledge graph completion method based on a concept graph according to an embodiment of the present invention;
[0072] Figure 2 1 is a schematic diagram of a concept knowledge generation model based on a neural network in a knowledge graph completion method based on a concept graph according to an embodiment of the present invention;
[0073] Figure 3 It is a schematic diagram of an incompatible concept identification model in a knowledge graph completion method based on a concept graph according to an embodiment of the present invention. DETAILED DESCRIPTION
[0074] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0075] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0076] Refer to the following Figures 1 to 3 To describe the knowledge graph completion method based on concept graph provided according to some embodiments of the present invention.
[0077] Some embodiments of the present application provide a knowledge graph completion method based on a concept graph.
[0078] The first embodiment of the present invention proposes a knowledge graph completion method based on a concept graph, which mainly includes the following steps: extracting semi-structured data from Wikipedia through a segmentation algorithm to generate explicit concept knowledge, extracting unstructured text through a neural network method to generate implicit concept knowledge, performing concept verification from three dimensions: incompatible concepts, named entity recognition, and grammatical rules, filtering out erroneous concept knowledge to improve the quality of the concept graph, and completing the construction of the concept graph. A rule mining method based on graph traversal is used to mine the rich hierarchical and hierarchical information in the concept graph, obtain more entities and their relationships related to common sense concepts in the real world, explore a wider range of triples, and then realize the concept completion of the common sense knowledge graph through a knowledge completion method based on path walking. It can be understood that in this embodiment, the data source comes from a network information collection platform. The network information collection platform can be of multiple types. In this specification, Wikipedia and Baidu Encyclopedia are taken as examples.
[0079] like Figure 1 As shown in FIG, the method is mainly divided into two units: concept map construction and graph completion. The concept map construction unit includes a generation module and a verification module.
[0080] Regarding concept generation. Common sense concepts can provide knowledge support for computers to understand human thinking and enable them to have common sense reasoning capabilities. This embodiment proposes a common sense concept generation model that uses point mutual information between phrases and a concept knowledge generation algorithm based on a deep neural network to extract common sense concepts from public unstructured data such as Wikipedia. First, the title concept knowledge generation and summary concept knowledge generation in this method are introduced, namely, explicit concept knowledge generation and implicit concept knowledge generation.
[0081] 1. Explicit Concept Knowledge Generation Based on Segmentation Algorithm
[0082] The corpus of Wikipedia and other sources contains a wealth of concept hierarchical relationships. Extracting content from Wikipedia can generate a large-scale concept graph. This embodiment designs explicit concept knowledge generation based on a segmentation algorithm.
[0083] Concept knowledge generation based on segmentation algorithm mainly obtains the hypernym relationship of entities from Wikipedia titles. The input of the algorithm is a disambiguated entity. Indicates that is the entity name, It is a noun compound word. Is the length of The output of the algorithm is the hypernym of the input entity. Represents a string concatenation operation. The algorithm starts with the three rightmost elements of the word sequence and traverses the word sequence from right to left. It is understandable that the front and back sides of the word sequence can be manually defined, and the left side of the word sequence can be defined as the front side, or the right side of the word sequence can be defined as the front side. The specific algorithm rules are as follows:
[0084] Input: entity and its corresponding word sequence
[0085] Output: Entity and its hypernym
[0086] start
[0087] i=n-1
[0088] Step 1: Known , if PMI( , ) <PMI( , ) holds true, then the algorithm proceeds to step 2, otherwise it goes to step 3;
[0089] Step 2: Concatenate the two words on the right side of the sequence to get , then move the sliding window to the left by one word to obtain , proceed to step 1;
[0090] Step 3: Move the sliding window to the left by one word to obtain , proceed to step 1;
[0091] Step 4: When the leftmost element When in a sliding window, the sequence Meet PMI( , )>PMI( , ), then Cascade and move the window to the right to get , when the word sequence length is 2, if PMI( , ) is greater than a certain threshold, the two sequences are concatenated to obtain the final concept entity , otherwise the latter is taken as the final conceptual entity ;
[0092] Conceptual Entity The point mutual information value is used as the credibility of the concept knowledge.
[0093] First, the concept entity and the word sequence corresponding to the concept entity are obtained; the last three words in the word sequence are used as the candidate window; the point mutual information is used to evaluate the probability that the words are a hypernym after being connected; if the point mutual information of the last two words in the candidate window is greater than the point mutual information of the first two words, that is, PMI ( , ) <PMI( , ), then the probability that the last two words are hypernyms after being connected is greater than the probability that the first two words are hypernyms after being connected, and the last two words are concatenated as a whole; if the point mutual information after the last two words in the candidate window are connected is smaller than the point mutual information after the first two words are connected, that is, PMI( , )>PMI( , ), then the following two words cannot be concatenated, so the third word is discarded;
[0094] Slide the candidate window to the left by one word to get three more candidates. Repeat the previous step until the first word in the word sequence appears in the candidate window.
[0095] When the leftmost element When located in a sliding window, if the point mutual information of the first two words in the candidate window is greater than the point mutual information of the last two words, the sequence Meet PMI( , )>PMI( , ), then Cascade and move the window to the right to get ;
[0096] Determine the length of the word sequence. When the word sequence length is 2, if the point mutual information PMI ( , ) is greater than the set threshold, the two words are concatenated and output as the conceptual knowledge of the entity; if the point mutual information after the two words are connected is less than the set threshold, the latter word is used as the conceptual knowledge of the entity; the point mutual information after the two words are connected is used as the credibility of the conceptual knowledge.
[0097] The point mutual information is calculated as follows:
[0098]
[0099] Here, p(x) represents the probability of x appearing in the corpus (number of occurrences divided by the total number of words, N); p(x,y) represents the probability of x and y appearing together in a sentence (number of times x and y appear together divided by the square of N); p(x|y) represents the conditional probability of x appearing given the presence of y; and p(y|x) represents the conditional probability of y appearing given the presence of x. A larger PMI(x,y) indicates a more pronounced positive sentiment bias for x.
[0100] It should be noted that the segmentation algorithm shown in this embodiment can also be replaced by a graph segmentation algorithm, which represents data in the form of a graph and then achieves the purpose of data segmentation by dividing the nodes or edges in the graph.
[0101] 2. Implicit Concept Knowledge Generation Based on Neural Networks
[0102] Neural network methods are used to obtain the hyponym and hyponym relationships of concepts from descriptive texts in encyclopedias, obtain the concepts of entities from the abstraction of entities, and mine implicit representations in semantics. Figure 2 The basic architecture of neural network-based concept knowledge generation in some embodiments is shown. The model consists of two parts: an encoder and a decoder. The encoder module includes an embedding layer and a bidirectional long short-term memory network. The decoder module includes an attention layer and a long short-term memory network concept knowledge generation network.
[0103] In this embodiment, a dictionary V is first constructed, which includes representations of all words, representations of start symbols (SOS), and representations of unknown symbols (UNK).
[0104] The embedding layer includes word embedding layer and character embedding layer. Given a sentence x=(x1,x2,…,x n ) and the corresponding target concept knowledge {(y s1 ,y e1 ),(y s2 ,y e2 ),…,(y sn ,y en )}. This embodiment first converts the input word into the corresponding id according to the dictionary V, and then uses the pre-trained word embedding vectors to initialize these vectors. The formula is as follows:
[0105]
[0106] in , Word represents the word embedding. Since NLP word tagging tools are often affected by segmentation, concept extraction performance is severely affected. To address this issue, this embodiment uses character-based and word-based representations as input and uses a convolutional neural network with a maximum pooling function to extract the feature vector of each word. The formula is as follows:
[0107]
[0108] Concatenate word embedding and character embedding to obtain the embedding matrix, which is represented as input w=(w1,w2,…,w n ).
[0109]
[0110] Since bidirectional LSTM has a strong ability to extract sentence features, this embodiment feeds word embeddings into a bidirectional LSTM layer to obtain the word's latent vector. The formula is as follows:
[0111]
[0112] The decoder uses the word hidden vector obtained by BiLSTM in the encoder to predict the concept knowledge sequence. In order to predict the concept knowledge, a layer of long short-term memory network is used to obtain the decoder feature vector s. In each training stage, the long short-term memory network is based on the word embedding feature w of the previous time sequence word. t-1 and the context feature s of the previous time series t-1 and the target word feature y of the previous time series prediction t-1 To predict the generated concept knowledge word e of t time series t The formula is as follows:
[0113]
[0114]
[0115] Among them, W d is the weight matrix, b d is a bias. Through the decoder, the corresponding implicit concept knowledge about the input text is generated.
[0116] After extracting titles and abstracts from Wikipedia using segmentation and neural network algorithms, a large amount of incorrect concept knowledge is found. Filtering this incorrect concept knowledge can improve the quality of the concept graph. This embodiment proposes a common sense concept verification model that utilizes the incompatible concepts between phrases and the special features of named entity recognition to verify common sense concepts.
[0117] 1. Incompatible concept detection
[0118] For example, the concepts "singer" and "actor" are compatible because they share some common entities. In some cases, two concepts are incompatible, such as "person" and "book," which share no common entities. Therefore, this embodiment implements isA relationship error filtering by detecting incompatible concept pairs. Neural network-based incompatible concept detection consists of two parts: incompatible concept identification and incorrect concept knowledge detection.
[0119] Figure 3 The incompatible concept recognition model of this embodiment is shown, in which a widely used transformer-based pre-training model, such as BERT, is used as a recognizer. The pre-training model BERT is pre-trained on a large-scale corpus using a masked semantic method, eliminating a certain word or phrase in the corpus, and then predicting it as the correct answer. Using this form of self-supervised training method can well capture the semantic meaning of the concept and give the same word the ability to express different meanings in different contexts. BERT uses a multi-layer transformer architecture, which can better capture task-related features in large-scale predictions. This embodiment adopts a universal training setting, in which the [SEP] special character is used to separate two sentences, and a special sentence IDs is used to identify which sentence the word belongs to. The present invention uses the combination of the hypernym c1 and its adjacent nodes in the concept knowledge as the first sentence, and the combination of the hypernym c2 and its adjacent nodes in the concept knowledge as the second sentence, and introduces [CLS] in front of the first sentence to indicate whether the two hypernyms c1 and c2 are incompatible nodes. This example uses the BERT[CLS] output features of the last layer as the final embedded feature representation, and then connects a fully connected network layer to perform binary classification. All parameters in the model, except those in the last fully connected layer, can be initialized from the pre-trained model. The following cross-entropy loss function is used based on the output s:
[0120]
[0121] The incompatible pairs of hypernyms in the concept graph are obtained. If a hypernym of an entity e exists in both c1 and c2, the present invention calculates the similarity between the entity e and c1 and c2, and filters out the concept knowledge with greater similarity as correct knowledge and the concept knowledge with less similarity as incorrect knowledge. The embedding representation of entity e comes from the vocabulary representation of BERT, which is pre-trained on a large-scale corpus using masked semantics. The embedding representations of hypernyms c1 and c2 are obtained by aggregating the embedding representations of adjacent entities.
[0122]
[0123]
[0124]
[0125] where e i These are all the hyponyms corresponding to the hypernym c. By aggregating the embedding representations of the hyponym nodes, we get the feature embedding of the hypernym c, and calculate the feature embeddings of entity e and c1, c2 using cosine similarity.
[0126] 2. Named Entity Recognition Verification
[0127] Whether a hypernym is a named entity plays an important role in detecting incorrect concept knowledge relationships, as named entities are generally not hypernyms of entities. For example, the concept knowledge isA(iPhone, United States) is an incorrect isA relationship because iPhone is a hypernym of the United States. This example proposes a concept verification algorithm based on named entity recognition. First, named entities are identified from the corpus, and then the authenticity of the concept knowledge is verified using the named entities.
[0128] For named entity recognition from corpus, the present invention adopts a named entity algorithm based on BERT. Task description: Given a text T, the goal of named entity recognition is to detect entity sets from the text T and classify them into predefined categories, specifically people, places, organizations, and others. This embodiment defines this task as a sequence labeling problem. T={t 1 ,t 2 ,…,t n } represents an input of size n, y={y 1 ,y 2 ,…,y n } is the corresponding sequence.
[0129] Since BERT has the ability to learn different expressions for the same word in different contexts, this paper uses BERT as a text encoder. For a sequence of size n T={t 1 ,t 2 ,…,t n } , two special characters are inserted into the training text T, [CLS] is added to the beginning and [SEP] is added to the end of the text to obtain the output of BERT T o ={t 0 , t 1 ,t 2 ,…,t n ,tn+1 } , and finally T o Feed it into the CRF layer to get all named entities.
[0130] For the verification of the authenticity of concept knowledge using named entities. To represent the support of the hypernym H as a named entity, in particular, s(H) = NE(H) / total(H), where NE(H) represents the number of times H appears as a named entity, and total(H) represents the total number of times H appears. We set a noise threshold , and filter out those whose support is greater than the threshold In this way, the concept verification based on named entity recognition is completed.
[0131] Concept graphs contain a wealth of contextual knowledge, which is highly beneficial for understanding common sense knowledge texts. Because common sense knowledge texts often contain relatively little information, the appropriate use of contextual knowledge can enrich the contextual information of common sense knowledge and enhance the coverage of the common sense knowledge graph. Specifically, contextual knowledge can be used to instantiate concepts within common sense knowledge and abstract (or conceptualize) entities within the graph, thereby expanding the common sense knowledge graph.
[0132] 1. Rule mining based on graph traversal
[0133] The completeness and reliability of the rule set are necessary prerequisites for completing the common sense knowledge graph. The completeness of the rules can improve the richness of the knowledge graph completion, and the reliability of the rules can ensure the authenticity of the knowledge graph completion. Improving the number and quality of rules in the rule set can improve the effect of knowledge graph completion and obtain more complete and authentic common sense knowledge. Previous work usually uses manually defined rule sets to complete the knowledge graph. These rule sets often rely on people's prior knowledge and ability to observe and understand data, consuming a lot of manpower and time. In addition, the defined rule sets are sparse and specific, which seriously limits the research and development of rule-based common sense knowledge graph completion. Due to the incompleteness and non-portability of manually defined rule sets, we propose a rule mining method based on graph traversal to obtain a large number of reliable rule sets to complete the common sense knowledge graph.
[0134] (1) Definition of concepts
[0135] For the convenience of description, this embodiment defines the following concepts:
[0136] Definition 1: An atom is a relation / fact with two variables: subject and predicate.
[0137] Definition 2: A rule consists of a head and a body, where the head is an atom and the body is a set of atoms. Indicates the head, Indicates the subject.
[0138]
[0139] If all atoms in the subject appear in the knowledge graph, then the rule can be called a rule instance. For example, to mine a rule between the entity cola and the entity milk tea in the concept graph, the rule instance isA(milk tea, water) and isA(cola, water) can be abstracted to obtain the rule. .
[0140] The confidence of a rule is used to measure the universality and generality of a rule. The greater the confidence of a rule, the more general it is, indicating that the rule is a common sense rule. The confidence of a rule is represented by the number of rule instances that exist in the knowledge graph.
[0141] (2) Mining of rule sets
[0142] Give a common sense knowledge graph and concept maps , V c , V Represent all nodes in the common sense knowledge graph and concept graph respectively, E c , E Represent all fact triples in the common sense knowledge graph and concept graph respectively. This paper mines the rule set using a graph traversal-based method. The specific algorithm steps are as follows:
[0143] Input: Common Sense Knowledge Graph M(V c ,E c ) , concept map G(V,E) , threshold ;
[0144] Output: Rules, a set of rules that can be used to complete common sense knowledge graphs;
[0145] for common sense triple inMdo;
[0146] Identify entities in the head node and tail node through entity detection method;
[0147] The common sense triples that are identical except for the entities in the triples are used as the common sense graph completion sample group;
[0148] Combine entities in the common sense graph completion sample group into graph completion entity pairs<x,y> ;
[0149] for common sense concepts inGdo;
[0150] Find a path between x and y as a rule instance;
[0151] Abstract rule instances into rules ;
[0152] If rule rin rule set Rules:
[0153] Rule weight +1;
[0154] else:
[0155] Add rule r to the rule set, and the rule weight = 1;
[0156] Endfor;
[0157] Endfor;
[0158] for rulesrin rule setRules:
[0159] Rule confidence = rule weight / total number of rules;
[0160] If rule confidence < :
[0161] Remove r from the rule set;
[0162] Returns the ruleset Rules.
[0163] Specifically, this embodiment takes the common sense knowledge graph and concept graph as input, mines rules from them, and obtains a set of completion rules as output. For each common sense fact triple in the common sense knowledge graph, it uses the entity detection model to perform entity detection and identify the entities in the head node and tail node. These entities are the anchor points for common sense knowledge completion. Then, common sense fact triples that are identical except for the entities in the common sense triples are found as inspiration examples for common sense graph completion. Using the concept graph, the relationship between different entities in the inspiration examples is discovered, and then abstracted as the rules for completion, thereby achieving the purpose of rule mining.
[0164] When mining rules, we find the paths connecting different entities between heuristic samples as a rule instance, and use variables to abstract the entities in the rule instance to obtain candidate rules. If the candidate rule already appears in the rule set, the weight of the candidate rule is +1, otherwise, the rule is introduced into the rule set and its weight is set to 1. After mining all candidate rules, the confidence of the rule is calculated, and the calculation formula is: rule confidence = rule weight / total number of rules.
[0165] Since some rules are only valid between entities in some heuristic examples and not valid in most other entities, the introduction of these rules will greatly reduce the reliability of the rule set. In order to improve the quality of the common sense knowledge graph completion rule set, this paper sets the rule confidence level to be less than a preset threshold. Candidate rules are eliminated, and the rules with confidence greater than the threshold are retained Candidate rules.
[0166] 2. Knowledge completion based on path walking
[0167] The key issue in completing the common sense knowledge graph is to find common sense fact triples that can be used for completion and determine the new common sense fact triples after completion. Transparency and explainability in the common sense knowledge graph completion process are directly related to the rationality of the completed common sense knowledge graph. In order to improve the transparency and explainability of the common sense knowledge graph completion process, this paper uses a completion rule set to propose a knowledge graph completion method based on path walking. The specific algorithm steps are as follows:
[0168] Input: Common Sense Knowledge Graph M(V c ,E c ) , concept knowledge graph G(V,E) , complete the rule set Rules;
[0169] Output: Completed common sense knowledge graph M ′ (Vc ′ ,Ec ′ ) ;
[0170] for common sense fact triple inMdo;
[0171] Identify entities in nodes through entity detection methods;
[0172] Forent1inentsdo;
[0173] Find entity ent1 that is identical to entity ent1 in the concept knowledge graph G. ′ ;
[0174] for common sense rules rulein complete the rule set Rulesdo;
[0175] Use rules to navigate the concept knowledge graph and discover entity ent2;
[0176] Replace entity ent1 in the common sense fact triple with entity ent2 and introduce it into the common sense knowledge graph as a new completed fact triple;
[0177] Endfor;
[0178] Endfor;
[0179] Endfor;
[0180] Common sense knowledge graph after return completion M ′ (Vc ′ ,Ec ′ ) .
[0181] Specifically, this embodiment takes the common sense knowledge graph, the concept graph and the mined completion rule set Rules as input, and takes the completed common sense knowledge graph as output. Specifically, for each common sense fact triple in the common sense knowledge graph, the entity detection method is used to identify all entities in its head entity and tail entity to form the entity set ents. For each entity ent1 in the entity set, the completion rule set is used to perform path wandering in the concept graph to find entity ent2, replace entity ent1 in the common sense fact triple with entity ent2, introduce it into the common sense knowledge graph, and use it as a new completed fact triple. Finally, the completed common sense knowledge graph is obtained. M ′ (Vc ′ ,Ec ′ ) .
[0182] The second embodiment of the present invention proposes a knowledge graph completion system based on a concept graph, which uses the method described in any of the above embodiments to complete the knowledge graph, including a concept graph construction unit and a graph completion unit;
[0183] The concept map construction unit includes a generation module and a verification module;
[0184] The generation module is used to extract semi-structured data through a segmentation algorithm to obtain the hypernym relationship of entities and generate explicit concept knowledge; extract unstructured text through a neural network method to obtain the hypernym relationship of concepts, obtain the concept of the entity, and mine the implicit representation in the semantics to generate implicit concept knowledge;
[0185] The verification module is used to perform concept verification on the concept knowledge generated by the generation module from the incompatible concept dimension and the named entity recognition dimension, filter out erroneous concept knowledge, improve the quality of the concept map, and complete the construction of the concept map;
[0186] The graph completion unit is used to mine the rich upper and lower information in the concept graph based on the rule mining method of graph traversal, obtain more entities and their relationships related to common sense concepts in the real world, explore a larger range of triples, and then realize the concept completion of the common sense knowledge graph through the knowledge completion method based on path walking.
[0187] As shown in Table 1, the knowledge graph completion system based on the concept graph proposed in this embodiment was used to extract 19,345 paragraphs from 11,532 web pages, and extracted 35,346 concept knowledge, including 1,293 hypernyms and 5,275 hyponyms. In order to evaluate the accuracy of common sense concepts, the present invention randomly extracted 800 concept knowledge from the 35,346 concept knowledge and manually tested whether these concept knowledge were correct common sense concepts. After manual evaluation, it was found that 772 of the knowledge were correct common sense concepts and 28 were incorrect common sense concepts. The accuracy rate of concept graph construction reached 96.5%.
[0188] Table 1 Concept knowledge graph construction
[0189]
[0190] To prove that each component module in the model is reasonable and effective, this embodiment conducts ablation experiments on the concept generation model and the concept verification model, respectively, removing each component module of the model. The experimental results are shown in Tables 2 and 3.
[0191] As shown in Table 2, all modules in the concept knowledge generation model achieved excellent results. When the model did not use the segmentation or neural network algorithms, all data points decreased significantly. Compared with the segmentation algorithm, the neural network algorithm generated a larger number of conceptual knowledge, hyponyms, and concepts. This is because the segmentation algorithm generates concepts from semi-structured data and can only obtain explicit conceptual knowledge, and its scale is limited by the size of the encyclopedia itself. The neural network algorithm, on the other hand, extracts open-ended text, has a broader range of conceptual knowledge, and can also extract implicit concepts. The combined use of the two models can simultaneously mine both explicit and implicit concepts in encyclopedia pages, significantly improving the model's concept coverage.
[0192] Table 2 Ablation experiment of concept generation model
[0193]
[0194] As shown in Table 3, all modules in the concept knowledge verification model achieved good results. When the model did not use incompatible concept detection or named entity verification, all data points decreased significantly. Incompatible concept detection requires more hyponymous and hyponymous concept features and constraints, so it detected fewer incorrect concepts than named entity verification, but with higher accuracy. Combining the two and adopting different verification methods can effectively detect different error types and improve the model's concept accuracy.
[0195] Table 3 Ablation experiments of the proof-of-concept model
[0196]
[0197] As shown in Table 4, the experiment mined different numbers of rule sets by setting different parameters. l Indicates the maximum length of the mined rules, where l =2, 3, 5, 7. Represents the confidence threshold, which is used to measure whether the rule is universal. =0.5, 0.6, 0.7, 0.8.
[0198] Table 4 Effect of parameters on rule mining
[0199]
[0200] The number of rules mined by the model under different parameters is different. l =7, = 0.5, the maximum number of rules mined is 112. l =2, = 0.8, the minimum number of rules mined is 12. Under the condition of constant confidence, the number of rules increases with the length of the maximum path, and under the condition of constant length, the number of rules decreases with the increase of confidence threshold. =0.5 to = 0.8, we compared the growth of rules with different lengths and found that as the length of the rules increased, a large number of non-universal rules were mined into the rule set. = 0.5, the rule set with a maximum walk length of 7 adds 53 rules compared to the rule set with a maximum walk length of 5. = 0.8, the rule set with a maximum walk length of 7 has 6 more rules than the rule set with a maximum walk length of 5.
[0201] The experiment uses a rule set with a confidence threshold of 0.8 and a maximum rule length of 4 to complete the common sense knowledge graph. The COMET model and the CKCC model of this embodiment complete the test sets from ASER and ATOMIC to generate triples, and various metrics are applied to the results, as shown in Table 5.
[0202] Table 5 Analysis of common sense knowledge concept completion results
[0203]
[0204] To evaluate and analyze experimental results, appropriate metrics need to be set. The commonsense knowledge concept completion experiment evaluates the completed commonsense knowledge graph based on both diversity and novelty. Diversity is assessed using the metrics Dist-1, Dist-2, and Dist-N. Dist-1 represents the number of distinct words per node, Dist-2 represents the number of distinct bigrams per node, and Dist-N represents the number of distinct nodes per node. Due to the varying number of generated triples, the results are normalized by the number of nodes. Novelty is assessed using the metrics N / TN and N / UN. N / TN represents the proportion of novel nodes (i.e., nodes not present in the training set) among all generated nodes, while N / UN represents the proportion of new and distinct nodes among all distinct nodes. Furthermore, because the generation method can produce nodes with essentially the same meaning but slight variations in form, the generated nodes are normalized by removing structural words such as determiners, auxiliary verbs, and pronouns. The normalized metrics are denoted as Dist-N-Norm, N / TN-Norm, and N / UN-Norm, respectively.
[0205] As shown in Table 5, the CKCC model achieves impressive results on both the ASER and ATOMIC datasets, demonstrating a significant advantage in improving the coverage of the commonsense knowledge graph. The diversity results clearly demonstrate that the CKCC model significantly improves on the Dist-1, Dist-2, and Dist-N metrics. This is because, given the characteristic head nodes and relations, the COMET model generates most triplets that are similar to each other, with a relatively low number of distinct nodes, words, and bigrams. Improvements in the novelty metrics N / TN and N / UN further demonstrate that the nodes generated by the COMET model are generally similar to those in the training set. Furthermore, compared to the raw diversity and novelty metrics of the COMET model, the Dist-N-Norm, N / TN-Norm, and N / UN-Norm metrics drop dramatically after normalizing the generated triples. This suggests that the COMET model may generate slightly different nodes that explain each other, unlike the CKCC model, where the generated nodes mostly discuss different entities, resulting in diverse and novel results.
[0206] In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in any one or more embodiments or examples.
[0207] Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A knowledge graph completion method based on concept graph, characterized in that: The following steps are involved: S1. Extract semi-structured data through segmentation algorithms to obtain the hypernym relationship of entities and generate explicit concept knowledge. Extract unstructured text through neural network methods to obtain the hypernym relationship of concepts, obtain the concept of entities, and mine the implicit representation in semantics to generate implicit concept knowledge. S2: Conduct conceptual verification on the conceptual knowledge generated by S1 from the perspectives of incompatible concepts and named entity recognition, filter out erroneous conceptual knowledge, improve the quality of the concept map, and complete the construction of the concept map. S3. Use graph traversal-based rule mining methods to mine the rich contextual information in the concept graph, obtain more entities and their relationships related to common sense concepts in the real world, and explore a wider range of triples; S4. Use the knowledge completion method based on path walking to realize the concept completion of the common sense knowledge graph; As described in S1, the neural network method is used to extract unstructured text to obtain the hyponym and hyponym relationships of concepts, obtain the concepts of entities, and mine the implicit representations in semantics to generate implicit conceptual knowledge, including: Build a dictionary containing all word representations, start symbol representations, and unknown symbol representations; Convert the input word into the corresponding id according to the dictionary, and then use the pre-trained word embedding vector to initialize the vector; Character-based and word-based representations are used as input, and a convolutional neural network with a max-pooling function is used to extract the feature vector of each word; Concatenate word embedding and character embedding to obtain the embedding matrix; Feed the embedding matrix into a bidirectional LSTM layer to obtain the latent vector of the word; Use word latent vectors for concept knowledge sequence prediction; The method of using the latent vector of a word to predict a concept knowledge sequence includes: Use a layer of long short-term memory network to process the hidden vector of the word to obtain the decoder feature vector s. In each training stage, the long short-term memory network is based on the word embedding feature w of the previous time sequence word. t-1 and the context feature s of the previous time series t-1 and the target word feature y of the previous time series prediction t-1 To predict the generated concept knowledge word e of t time series t , the calculation method is: Among them, W d is the weight matrix, b d is the deviation value, s t is the context feature of time series t.
2. The knowledge graph completion method based on concept graph according to claim 1 is characterized in that: The segmentation algorithm is used to extract semi-structured data to obtain the hypernym relationship of entities and generate explicit conceptual knowledge, including: Get the concept entity and the word sequence corresponding to the concept entity; Take the last three words in the word sequence as the candidate window; Use point mutual information to evaluate the probability that the words connected together are a hypernym. If the point-wise mutual information of the last two words in the candidate window is greater than that of the first two words, the last two words are concatenated as a whole; if the point-wise mutual information of the last two words in the candidate window is less than that of the first two words, the third word is discarded. Slide the candidate window forward by one word to get three more candidates, and repeat the previous step until the first word in the word sequence appears in the candidate window; If the point-wise mutual information of the first two words in the candidate window is greater than the point-wise mutual information of the last two words, the first two words are concatenated as a whole and the candidate window is slid back one word unit; Determine the length of the word sequence. When the word sequence length is 2, if the point mutual information of the two words after being connected is greater than the set threshold, the two words are concatenated and output as the conceptual knowledge of the entity; if the point mutual information of the two words after being connected is less than the set threshold, the latter word is used as the conceptual knowledge of the entity; the point mutual information of the two words after being connected is used as the credibility of the conceptual knowledge.
3. The knowledge graph completion method based on concept graph according to claim 1 is characterized in that: Conduct conceptual verification of the conceptual knowledge generated by S1 from the perspective of incompatible concepts, including: Use the transformer-based pre-trained model as a recognizer to identify incompatible concepts in the concept graph; Among them, the pre-training model uses masked semantics to perform pre-training on large-scale corpus, removes a certain word or phrase in the corpus, and then predicts it as the correct answer.
4. The knowledge graph completion method based on concept graph according to claim 3 is characterized in that: The pre-training model adopts a multi-layer transformer architecture; The training settings of the pre-trained model include: Use the [SEP] special character to separate the two sentences, and use a special sentence ID to identify which sentence the word belongs to; The combination of the hypernym c1 and its adjacent nodes in the concept graph is used as the first sentence, and the combination of the hypernym c2 and its adjacent nodes in the concept graph is used as the second sentence. [CLS] is introduced before the first sentence to indicate whether the two hypernyms c1 and c2 are incompatible nodes. The [CLS] output feature of the last layer of the pre-trained model is used as the final embedding feature expression, and then a fully connected network is connected to it to perform binary classification using the cross entropy loss function, thereby obtaining incompatible pairs of hypernyms in the concept graph; If a hypernym of an entity e exists in both c1 and c2, the similarity between the entity e and c1 and c2 is calculated, and the concept knowledge with greater similarity is taken as correct knowledge, while the concept knowledge with less similarity is filtered out as incorrect knowledge. The embedding representation of entity e comes from the vocabulary representation of a pre-trained model pre-trained on a large-scale corpus using masked semantics. The method is as follows: The embedding representations of the hypernyms c1 and c2 are obtained by aggregating the embedding representations of adjacent entities as follows: in, e i are all the hyponyms corresponding to the hypernym c. By aggregating the embedding representations of the hyponym nodes, we get the feature embedding representation of the hypernym c. The feature embeddings of entity e and c1, c2 are calculated using cosine similarity as follows: 。 5. The knowledge graph completion method based on concept graph according to claim 1 is characterized in that: The conceptual knowledge generated by S1 is verified from the perspective of named entity recognition, including: Named entity recognition is performed from the corpus, using a named entity algorithm based on a pre-trained model, including: given a text T, the goal of named entity recognition is to detect entity sets from the text T and classify them into predefined categories; this work is defined as a sequence labeling problem, let T={t 1 ,t 2 ,…,t n } represents an input of size n, y={y 1 , y 2 ,…,y n } is the corresponding sequence; Use the pre-trained model as a text encoder for a sequence of size n T={t 1 ,t 2 ,…,t n } , two special characters are inserted into the text training T, [CLS] is added to the beginning and [SEP] is added to the end of the text to obtain the output of the pre-trained model T o ={t 0 ,t 1 ,t 2 ,…,t n ,t n+1 } , and finally T o Send it to the CRF layer to get all named entities; Use named entities to verify the authenticity of conceptual knowledge, including: To express the support of hypernym H as a named entity, s(H)=NE(H) / total(H), where NE(H) represents the number of times H appears as a named entity, and total(H) represents the total number of times H appears; set the noise threshold , and filter out those whose support is greater than the threshold conceptual knowledge.
6. The knowledge graph completion method based on concept graph according to claim 1 is characterized in that: The rule mining method based on graph traversal is used to mine the rich contextual information in the concept graph, obtain more entities and their relationships related to common sense concepts in the real world, and explore a wider range of triples, including: An atom is defined as a relation / fact with two variables: subject and predicate; A rule is defined as consisting of a head and a body, where the head is an atom and the body is a collection of atoms. If all atoms in the body appear in the knowledge graph, then the rule is considered a rule instance. The confidence of a rule is used to measure the universality and generality of a rule. The greater the confidence of a rule, the more general it is, indicating that the rule is a common sense rule. The confidence of a rule is represented by the number of rule instances that exist in the knowledge graph. The common sense knowledge graph and concept graph are used as input, and rules are mined from them to obtain a completion rule set as output. For each common sense fact triple in the common sense knowledge graph, an entity detection model is used to perform entity detection and identify the entities in the head node and tail node. These entities are the anchor points for common sense knowledge completion. Then, common sense fact triples that are exactly the same except for the entities in the common sense triples are found as inspiration examples for common sense graph completion. Using the concept graph, the relationship between different entities in the inspiration examples is discovered, and then abstracted as the completion rules, thereby achieving the purpose of rule mining.
7. The knowledge graph completion method based on concept graph according to claim 1 is characterized in that: The path-walking-based knowledge completion method is used to complete the concepts of the common sense knowledge graph, including: The common sense knowledge graph, the concept graph, and the completion rule set mined in step S3 are used as input, and the completed common sense knowledge graph is used as output; for each common sense fact triple in the common sense knowledge graph, all entities in its head entity and tail entity are identified through the entity detection method to form an entity set; for each entity ent1 in the entity set, the completion rule set is used to walk the path in the concept graph to find entity ent2, replace entity ent1 in the common sense fact triple with entity ent2, introduce it into the common sense knowledge graph, and use it as a new completed fact triple to finally obtain the completed common sense knowledge graph M ′ (Vc ′ ,Ec ′ ) .
8. A knowledge graph completion system based on concept graph, characterized in that: A method according to any one of claims 1 to 7 is used to complete a knowledge graph, comprising a concept graph construction unit and a graph completion unit; The concept map construction unit includes a generation module and a verification module; The generation module is used to extract semi-structured data through a segmentation algorithm to obtain the hypernym relationship of entities and generate explicit concept knowledge; extract unstructured text through a neural network method to obtain the hypernym relationship of concepts, obtain the concept of the entity, and mine the implicit representation in the semantics to generate implicit concept knowledge; The verification module is used to perform concept verification on the concept knowledge generated by the generation module from the incompatible concept dimension and the named entity recognition dimension, filter out erroneous concept knowledge, improve the quality of the concept map, and complete the construction of the concept map; The graph completion unit is used to mine the rich upper and lower information in the concept graph based on the rule mining method of graph traversal, obtain more entities and their relationships related to common sense concepts in the real world, explore a larger range of triples, and then realize the concept completion of the common sense knowledge graph through the knowledge completion method based on path walking.
Citation Information
Patent Citations
Knowledge graph completion method combining subgraph structure and relation type
CN115186819A
Knowledge graph completion model training method and device
CN115525773A
Knowledge graph adaptive completion method and device based on 3D convolution
CN115630163A
Knowledge graph and affair graph fusion method, device and system
CN114417004A
Knowledge prompt-based concept extraction model
CN114911947A