Method and device for constructing knowledge graph

By acquiring and processing original data and large-scale knowledge graphs, a new knowledge graph is constructed, which solves the problem that the knowledge graph cannot be updated and expanded in the existing technology, improves the efficiency and accuracy of information processing, and is suitable for applications in specific fields.

CN113268606BActive Publication Date: 2024-10-29TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110586725.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-27
Publication Date
2024-10-29
Estimated Expiration
2041-05-27

AI Technical Summary

Technical Problem

The existing technology cannot dynamically update and expand the knowledge graph during use, resulting in inefficiency in the face of explosive growth in data and applications in specific fields.

Method used

By acquiring original data and large-scale knowledge graphs, we perform knowledge modeling and entity extraction, generate conceptual layer data and entity layer data, and build a new knowledge graph after fusion to achieve dynamic updating and expansion of the knowledge graph.

Benefits of technology

It realizes the dynamic update and expansion of the knowledge graph during use, improves the efficiency and accuracy of information processing, and is suitable for professional applications in specific fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113268606B_ABST
    Figure CN113268606B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for constructing a knowledge graph, the method comprising obtaining raw data and a large-scale knowledge graph; performing knowledge modeling on the raw data to obtain knowledge modeling results; generating conceptual layer data based on the knowledge modeling results and the large-scale knowledge graph; performing knowledge acquisition on the raw data, including entity extraction, entity classification, and first entity attribute extraction, to obtain entities, entity categories, and entity attributes; inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity; fusing the entity, the entity category, the entity attribute, and the entity-related information to obtain complete entity layer data; constructing a new knowledge graph based on the conceptual layer data and the entity layer data. The present invention realizes the construction of a knowledge graph through the above method, and can also use the above steps to realize the update of the knowledge graph during use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for constructing a knowledge graph. Background Art

[0002] The concept of knowledge graph was formally proposed in 2012. Its main purpose is to enhance search efficiency and improve user experience in the era of rapid development of the Internet and explosive growth of network data. With its excellent semantic processing technology and connectivity, knowledge graph has established a foundation for information intelligence applications. It is widely used in search, question and answer, intelligence analysis, etc., promoting the development of information technology from information services to knowledge services. In recent years, all walks of life have been studying the application of knowledge graphs in professional fields to better serve specific fields. However, at present, knowledge graphs are basically built directly and then put into use. There are few methods for dynamic updates and expansion during use. Summary of the invention

[0003] The present invention provides a method and device for constructing a knowledge graph, so as to solve the defect in the prior art that the knowledge graph cannot be updated and expanded during use, and realize the dynamic update of the knowledge graph and the expansion during use.

[0004] In a first aspect, the present invention provides a method for constructing a knowledge graph, comprising:

[0005] Obtain raw data and large-scale knowledge graphs;

[0006] Performing knowledge modeling on the original data to obtain a knowledge modeling result;

[0007] Generate concept layer data based on the knowledge modeling results and the large-scale knowledge graph;

[0008] Performing knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes;

[0009] Inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity;

[0010] The entity, the entity category, the entity attribute, and the entity related information are integrated to obtain complete entity layer data;

[0011] Constructing a new knowledge graph based on the concept layer data and the entity layer data;

[0012] The large-scale knowledge graph is updated based on the new knowledge graph.

[0013] Furthermore, the knowledge graph construction method provided by the present invention, wherein the knowledge modeling result includes concepts;

[0014] Based on the knowledge modeling results and large-scale knowledge graph, conceptual layer data is generated, including:

[0015] Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept;

[0016] The knowledge modeling result and the concept-related information of the concept are integrated to obtain the concept layer data.

[0017] Furthermore, in the knowledge graph construction method provided by the present invention, the step of obtaining entity-related information of the entity specifically includes:

[0018] The name of the entity, the second entity category, and the second entity attribute are obtained.

[0019] Furthermore, the knowledge graph construction method provided by the present invention, wherein the new knowledge graph is constructed based on the concept layer data and the entity layer data, further comprising:

[0020] Concept-related information of the concept includes entities under the concept;

[0021] Compare the entity under the concept with the entity extracted from the entity, and establish a first association relationship between the concept and the entity extracted from the entity;

[0022] Comparing the entity category obtained by the entity classification with the concept obtained by the concept extraction, and establishing a second association relationship between the concept and the entity under the entity category;

[0023] Based on the first association relationship and the second association relationship, the concept layer data and the entity layer data are processed to obtain a new knowledge graph.

[0024] Furthermore, in the knowledge graph construction method provided by the present invention, the method of extracting entities from the original data to obtain the entities includes:

[0025] The original data is subjected to entity linking, keyword extraction and named entity recognition to obtain entity linking results, keyword extraction results and named entity recognition results;

[0026] A union or intersection of the entity linking result, the keyword extraction result, and the named entity recognition result is determined as the entity.

[0027] Furthermore, in the knowledge graph construction method provided by the present invention, the method of extracting keywords from the original data includes:

[0028] The word frequency-inverse document frequency algorithm TF-IDF, TextRank, grammar rule-based, latent semantic analysis LSA or latent semantic retrieval LSI method are used to obtain a keyword vocabulary and the position and importance of each word in the original data.

[0029] In a second aspect, the present invention further provides a knowledge graph construction device, comprising:

[0030] The first processing module is used to obtain raw data and large-scale knowledge graphs;

[0031] A second processing module is used to perform knowledge modeling on the original data to obtain a knowledge modeling result;

[0032] A third processing module generates concept layer data based on the knowledge modeling result and the large-scale knowledge graph;

[0033] A fourth processing module is used to perform knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes;

[0034] A fifth processing module, configured to input the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity;

[0035] A sixth processing module, configured to fuse the entity, the entity category, the entity attribute, and the entity related information to obtain complete entity layer data;

[0036] A seventh processing module, used for constructing a new knowledge graph based on the concept layer data and the entity layer data;

[0037] An eighth processing module is used to update the large-scale knowledge graph based on the new knowledge graph.

[0038] Furthermore, the knowledge graph construction device provided by the present invention includes:

[0039] The knowledge modeling results include concepts;

[0040] The third module is also used for:

[0041] Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept;

[0042] The knowledge modeling result and the concept-related information of the concept are integrated to obtain the concept layer data.

[0043] In a third aspect, the present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for constructing a knowledge graph as described in any one of the above are implemented.

[0044] In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for constructing a knowledge graph as described in any one of the above.

[0045] The method and device for constructing a knowledge graph provided by the present invention obtain original data and a large-scale knowledge graph; perform knowledge modeling on the original data to obtain a knowledge modeling result; generate concept layer data based on the knowledge modeling result and the large-scale knowledge graph; and obtain a richer and more complete concept system through this process. The original data is subjected to knowledge acquisition, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes; the entity is input into the large-scale knowledge graph as a keyword to obtain entity-related information of the entity; the entity, the entity category, the entity attribute and the entity-related information are merged to obtain complete entity layer data; this process extracts the entity from the original data, retrieves information related to the entity in the existing knowledge graph, and then merges the retrieved information with the information obtained by processing the original data, so as to obtain rich and complete entity data. A new knowledge graph is constructed based on the concept layer data and the entity layer data. Since the knowledge graph is a database composed of concepts and entities, a new knowledge graph can be obtained by merging the concept layer data with the entity layer data. Furthermore, the present invention realizes dynamic updating of the knowledge graph and expansion during use through the above steps. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 It is one of the flow charts of the method for constructing the knowledge graph provided by the present invention;

[0048] Figure 2 This is the second flow chart of the method for constructing the knowledge graph provided by the present invention;

[0049] Figure 3It is a schematic diagram of the structure of the knowledge graph construction device provided by the present invention;

[0050] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Combine the following Figure 1-Figure 2 Describe the method for constructing a knowledge graph provided by an embodiment of the present invention.

[0053] Step 100, obtaining raw data and a large-scale knowledge graph;

[0054] Raw data (data) is the data used to construct the knowledge graph, which can be text, video, voice, etc. or a mixture of several formats; and a large-scale knowledge graph refers to a large-scale knowledge graph of the entire field / a certain field in a single language or cross-language fusion. Among them, the knowledge graph refers to a database that stores knowledge, which stores some triples, such as (Zhang San, birthplace, Shanghai), etc., each triple represents a fact. The knowledge graph can also be seen as a graph. For example, in the above triples, Yao Ming and Shanghai are nodes, and the birthplace is a directed and labeled edge from Yao Zhang San to Shanghai. Existing large-scale knowledge graphs can choose to use XLORE, CYC common sense knowledge base, multilingual Wikipedia (Wikipedia), Dbpedia, Freebase, YAGO, Wikidata, Nell, Probase, BabelNet, ConceptNet, Schema.org, etc. In the embodiment of the present invention, by obtaining raw data and a large-scale knowledge graph, preparations are made for the construction of a new knowledge graph and the update of a large-scale knowledge graph. For example, in constructing the BJ city tourism map, relevant documents of the "BJ City Tourism Network" including text, pictures, videos, etc. are selected as raw data, and XLORE is selected as the large-scale knowledge graph to be used.

[0055] Step 200, performing knowledge modeling on the original data to obtain a knowledge modeling result;

[0056] Specifically, knowledge modeling refers to building a conceptual model of the knowledge graph. The concept here refers to a type of entity in the knowledge graph, such as fruit, pear, etc. The knowledge modeling part mainly includes concept acquisition, concept and hyponym relationship learning, concept attribute learning, etc. Among them, concept extraction is used to extract concepts from raw data, that is, to obtain sufficient concepts from resources such as text, knowledge base, web pages, and evaluate and collect them. Concept extraction mainly includes two parts: candidate concept generation and candidate concept ranking.

[0057] Candidate concept generation: The task goal of candidate concept generation is to select and generate sufficient entries or words that may become concepts from the corpus. This part is the preparatory stage for concept extraction. Concepts have the following properties: First, a concept generally refers to a phrase with a noun structure and has rich semantic information; second, in terms of content, a concept is often a scientific term with a certain generality and is related to the target field of the current task, that is, the concept should have: phrase nature, that is, a concept is a grammatically correct phrase, generally with noun nature; relevance, that is, a concept should belong to or be related to the target field. Since a concept is a phrase or a word, one or more of the three methods of rule segmentation, statistical segmentation, and rule and statistical mixed segmentation are used in the embodiments of the present invention for segmentation processing.

[0058] Among them, rule segmentation refers to maintaining a dictionary, and matching each string of the sentence with the words in the vocabulary one by one when segmenting the sentence. If the match is successful, it will be segmented, otherwise it will not be segmented; among them, the matching methods include forward maximum matching method, reverse maximum matching method and bidirectional maximum matching method. Statistical segmentation refers to statistical preset text. If the number of connected words appears more in different texts, it means that these connected words are a word; the statistical segmentation method includes two steps, the first step is to establish a statistical language model, and the second step is to divide the text into words; among them, statistical segmentation includes methods based on hidden Markov HMM and conditional random field CRF. The rule and statistical mixed segmentation refers to first segmenting based on the dictionary method, and then using the statistical segmentation method for assistance. For example, "BJ City Chaoyang" is a compound noun composed of two nouns, so when performing segmentation, there may be three situations: "BJ City", "Chaoyang" and "BJ City Chaoyang". Therefore, it is necessary to use a certain method to make the segmentation result conform to the context context when segmenting. Therefore, in the embodiment of the present invention, a method of maintaining a dictionary may be adopted first, and then statistics may be performed on the text to determine which one is the concept in the text.

[0059] Since the concept has noun nature, the method of part-of-speech tagging is used to tag different phrases and words. Part-of-speech is the basic grammatical attribute of vocabulary. Part-of-speech tagging is the process of determining the grammatical category of each word in a given sentence, determining its part-of-speech and tagging it, that is, tagging the part-of-speech of each result according to the grammatical rules for the word segmentation results obtained by the word segmentation method. For example, "Finally, the 10-man team A defeated team B 3 to 1." The precise word segmentation result can be "Finally / , / 10 / people / challenged / of / team A / 3 / to / 1 / defeated / team B / ." The part-of-speech tagging result is "Finally d / , wp / 10m / people n / challenged v / of u / team A ni / 3m / to v / 1m / defeated v / team B ni / .Wp". Among them, d represents adverbs, wp represents punctuation marks, m represents numerals, n represents names, v represents verbs, u represents auxiliary words, and ni represents institutional teams.

[0060] Candidate concept ranking. The task goal of candidate concept ranking is to reasonably evaluate the candidate concepts obtained in the candidate concept generation step. The general method is to generate a confidence score for each candidate concept and then rank them. Therefore, when evaluating the model, evaluation and ranking indicators are often used. This stage is the core link for improving the quality of concept extraction. The confidence evaluation method can distinguish which concepts can be real concepts, that is, concepts that are categories of entities.

[0061] Using the above method, the concepts obtained for "BJ City Tourism Network" include "scenic spots", "routes", "hotels", "heritage sites", "royal gardens", "world cultural heritage", etc.

[0062] Concept hyponymy learning is to determine whether there is a hyponymy relationship between two given concepts, or between concepts and instances, such as determining whether "machine learning" is a hyponymy concept of "artificial intelligence". In this embodiment, the method for raw data is to extract from the text. The construction method based on text extraction can be divided into two steps. First, the hyponymy relationship pairs are extracted from the text. Secondly, the hyponymy relationship pairs are organized into a classification system and then the hyponymy data of the previously extracted concepts are directly called using a large-scale knowledge graph to obtain the concept. Finally, the two parts of the hyponymy relationship are merged. Among them, there are several methods that can be used for the extraction of hyponymy pairs. The method based on heuristic rules is mainly to use the lexical, syntactic and other information of the concept to infer. Some templates can be recommended, such as A includes B, A gives an example of B, A such as B, A including B, etc., to obtain the hyponymy relationship between A and B. The method based on supervised training is to treat the hyponymy recognition task as a binary classification problem and construct a supervised data set to train the hyponymy classifier.

[0063] For concept attribute extraction, it is to extract the most representative set of attributes for a concept. Through this set of attributes, the entities under this concept can be well characterized. For example, for the concept of country, the attributes to be extracted include capital, population, national flag, national anthem, etc. Regarding concept attribute extraction, a template-based method is used to extract attributes, such as A belongs to B, A's B, A of B, at / in A of C, by A of C, etc.; the method of joint extraction of entities and attributes can also be used. If an attribute is an important attribute of a concept, then this attribute will be shared by many entities under the concept. Conversely, if an entity is an important entity under a concept, then this entity will have many important attributes under this concept. For example, the entities of metal, such as gold, silver, and copper, are all conductive, so it can be judged that metals are conductive. On the contrary, if "national first-class protected animals" have the attribute "protected by the state", then "Crowned Ibis" as an important entity under the concept of "national first-class protected animals" also has the attribute of "protected by the state".

[0064] Therefore, knowledge modeling is performed on the original data, that is, concept extraction, concept hypernymy learning, and concept attribute extraction are performed on the original data to obtain the extracted concepts, concept hypernymy, and concept attributes. For example, the concepts obtained for "BJ City Tourism Network" include "scenic area", "route", "hotel", "heritage and monuments", "royal gardens", "world cultural heritage", etc. Using hypernymy learning, it can be obtained that "heritage and monuments" are the subordinate concepts of "scenic area", and "royal gardens" are the subordinate concepts of "heritage and monuments". At the same time, according to the concept attribute extraction, the concept "scenic area" can be obtained with attributes such as "ticket price", "address", and "business hours".

[0065] Step 300, generating concept layer data based on the knowledge modeling result and the large-scale knowledge graph;

[0066] Specifically, large-scale knowledge graphs provide data support for knowledge modeling. Based on knowledge modeling results and large-scale knowledge graphs, concept layer data consisting of multiple concepts can be generated.

[0067] Step 400, performing knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes;

[0068] Specifically, knowledge acquisition refers to extracting structured knowledge from different sources and structured input data. Entity extraction is performed on the original data, that is, entities are extracted from the original data, where the entity represents a specific physical object, such as apples, hawthorns, etc. The goal of entity classification is to classify the instanceof relationship of a given entity in a text or knowledge base. That is, which category the entity belongs to in the text or knowledge base. Entity classification can be divided into entity classification in the knowledge base and in the text. The goal of knowledge base entity classification is to assign category information to free entities in the knowledge base and hang the entity on the classification tree, that is, to find all category information of an entity. Entity classification can be implemented in many ways. Traditional features can be used to characterize entities in the knowledge base. A variety of representation learning methods can also be used to improve the effect. Or the entity classification in the text and the entity classification task in the knowledge base can be organically combined.

[0069] Instance attribute extraction is to extract the most representative set of attributes for an instance. Through this set of attributes, the entity under this instance can be well characterized. For example, for the instance of "Zhang San", the attributes and attribute values ​​to be extracted include "nationality-China", "place of birth-a certain district in Shanghai", "height-226cm", etc. Regarding concept attribute extraction, a template-based method is used to extract attributes, such as A belongs to B, A's B, A of B, at / in A of C, by A of C, etc.; relation extraction methods can also be used. Relation extraction refers to the automatic identification of the relationship between entities from text. The purpose of attribute extraction is achieved through relation extraction. Relation extraction can be based on supervised, semi-supervised, remotely supervised, fused, and remotely supervised relation extraction methods based on deep neural networks.

[0070] For example, using the entity extraction function in knowledge acquisition for "BJ City Tourism Network", we can get "A Street", "B Palace", "BJ City C Botanical Garden", "BJ City D Museum", etc. Classifying all entities, we can get "B Palace", "BJ City C Botanical Garden", "BJ City D Museum", "C Underwater World", etc., which are all instances under the concept of "attractions". Relationship extraction can get the relationship between entities, for example, "C Underwater World" is "Underwater Theme Park", etc. For the "C Underwater World" entity attribute extraction, we can get the attribute value of the attribute "attraction phone number" is "010-65913397", the attribute value of the attribute "approximate tour time" is "3 hours", etc.

[0071] Step 500, inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity;

[0072] Specifically, the large-scale knowledge graph provides support for knowledge acquisition, that is, entities in knowledge acquisition are input as keywords into the large-scale knowledge graph to obtain entity-related information of the entities in the large-scale knowledge graph.

[0073] Step 600, integrating the entity, the entity category, the entity attribute, and the entity related information to obtain complete entity layer data;

[0074] Specifically, the entities, entity attributes obtained in step 400 and entity related information obtained in step 500 are entity fused, wherein entities from different sources are fused to form a unified knowledge representation and association, and the obtained fused entity is the obtained complete entity layer data.

[0075] Step 700, constructing a new knowledge graph based on the concept layer data and the entity layer data;

[0076] Specifically, the acquired concept layer data and entity layer data are fused. Since the boundary between concepts and entities is not clear, some entities can be both concepts and entities. For example, "BJ City People" can be both an entity under the concept of Chinese and an entity category of entity classification of entities such as "BJ City Students" and "BJ City Teachers". Therefore, by fusion of the acquired concept layer data and the acquired entity layer data, new triples of concepts, entities and relationships are established, and together with the existing triples in the concept layer data and entity layer data, a new knowledge graph is formed.

[0077] Step 800: Update the large-scale knowledge graph based on the new knowledge graph.

[0078] Specifically, since the information in the new knowledge graph comes from two aspects, namely the original data and the large-scale knowledge graph, the triples in the new knowledge graph may not exist in the large-scale knowledge graph. Therefore, the large-scale knowledge graph can be updated by using the new knowledge graph. For example, the original data in the "BJ City Tourism Network" is obtained through knowledge modeling and knowledge acquisition tools to obtain the concept layer and instance layer data, and the large-scale knowledge graph data is selectively updated according to the confidence level.

[0079] The method and device for constructing a knowledge graph provided by the present invention obtain original data and a large-scale knowledge graph; perform knowledge modeling on the original data to obtain knowledge modeling results; generate concept layer data based on the knowledge modeling results and the large-scale knowledge graph; and obtain a richer and more complete concept system through this process. The original data is subjected to knowledge acquisition, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes; the entity is input into the large-scale knowledge graph as a keyword to obtain entity-related information of the entity; the entity, the entity category, the entity attribute and the entity-related information are merged to obtain complete entity layer data; this process extracts the entity from the original data, retrieves information related to the entity in the existing knowledge graph, and then merges the retrieved information with the information obtained by processing the original data, so as to obtain rich and complete entity data. A new knowledge graph is constructed based on the concept layer data and the entity layer data. Since the knowledge graph is a database composed of concepts and entities, a new knowledge graph can be obtained by merging the concept layer data with the entity layer data. Furthermore, the present invention realizes dynamic updating of the knowledge graph and expansion during use through the above steps.

[0080] Further, in one embodiment of the present invention, the knowledge modeling result includes concepts;

[0081] Based on the knowledge modeling results and large-scale knowledge graph, conceptual layer data is generated, including:

[0082] Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept;

[0083] The knowledge modeling result and the concept-related information of the concept are integrated to obtain the concept layer data.

[0084] Specifically, the above text and the description extract the concepts from the original data to obtain the concepts in the original data. Then, the obtained concepts are input as keywords into the large-scale knowledge graph for retrieval to obtain the concept-related information of the concept in the large-scale knowledge graph, including the concept name, superordinate concept, subordinate concept and concept attribute of the concept in the large-scale knowledge graph, and in addition, there are entities under the concept. For example, in the knowledge modeling part, for a certain concept obtained after the original data is processed, the data in XLORE can use keywords as conditions to query the concept in XLORE for the concept data, and obtain the brief information of the concept, including the name of the concept, superordinate concept, subordinate concept and concept attribute information. For example, the query of "BJ City Tourism" can obtain the superordinate concepts such as "China City Tourism" and "BJ City", and the subordinate concepts such as "BJ City Tourist Attractions" and "BJ City Hotel". The concept "BJ City Tourism" has instances such as "A Certain Great Wall" and "A Certain Valley Great Wall". By looking up the relevant information of the concept "BJ City Hotel", we can obtain attributes such as "location" and "business hours", and related concepts such as "BJ City Museum", "BJ City Conference Center", "BJ City Hotel A", "Wangfu Hotel B" and other instances.

[0085] The conceptual layer data obtained by knowledge modeling has two sources, namely, the results obtained by the original data through the concept acquisition, concept upper and lower relationship learning, concept attribute learning and other tools in the knowledge modeling tool, and the concept upper and lower information, concept attributes, related concepts, concept instances and other information obtained by XLORE using keywords as conditions to query the concept data in XLORE for the concept instance. Then, the two parts of data can be integrated by using knowledge fusion to obtain a more complete knowledge modeling data. For example, the upper-level concepts obtained above through the functions in knowledge modeling include "Chinese City Tourism" and "BJ City", and the lower-level concepts include "BJ City Tourist Attractions" and "BJ City Hotel". The concept "BJ City Tourism" has instances such as "A certain platform Great Wall" and "A certain valley Great Wall". Through XLORE to check the relevant information of the concept "BJ City Hotel", you can get attributes such as "location" and "business hours", related concepts such as "BJ City Museum", "BJ City Conference Center", "BJ City A Hotel", "Wangfu B Hotel" and other instances. By integrating these two parts together, a more complete upper-level concept system can be obtained.

[0086] Further, in an embodiment of the present invention, the acquiring entity-related information of the entity specifically includes:

[0087] The name of the entity, the second entity category, and the second entity attribute are obtained.

[0088] Specifically, the entities obtained by entity extraction of the original data are input as keywords into the large-scale knowledge graph for retrieval, and the entity name, second entity category and entity attributes of the entity in the large-scale knowledge graph are obtained.

[0089] For example, querying the instance information of the instance "C Underwater World" shows that its concept classifications include "attractions" and "underwater theme park", and its attributes include "opening hours" is "8:00-20:00 in summer, 8:30-18:30 in winter", "ticket price" is "150 yuan", etc. By fusing the above instance attributes, we can get the attributes of "C Underwater World" including "attraction phone number" with the attribute value of "010-65913397", "approximate tour time" with the attribute value of "3 hours", "opening hours" with the attribute value of "8:00-20:00 in summer, 8:30-18:30 in winter", and "ticket price" with the attribute value of "150 yuan", etc.

[0090] Furthermore, in one embodiment of the present invention, constructing a new knowledge graph based on the concept layer data and the entity layer data further includes:

[0091] Concept-related information of the concept includes entities under the concept;

[0092] Compare the entity under the concept with the entity extracted from the entity, and establish a first association relationship between the concept and the entity extracted from the entity;

[0093] Comparing the entity category obtained by the entity classification with the concept obtained by the concept extraction, and establishing a second association relationship between the concept and the entity under the entity category;

[0094] Based on the first association relationship and the second association relationship, the concept layer data and the entity layer data are processed to obtain a new knowledge graph.

[0095] Specifically, as can be seen from the above, the concept-related information obtained by inputting the concept as a keyword into the large-scale knowledge graph includes the entities under the concept. The entities under the concepts in the concept layer are compared with the entity layer, the same entities are found, and then a new connection between the concept and the entities in the entity layer is established, which is equivalent to providing a new entity category for the entities in the entity layer.

[0096] Similarly, by comparing the entity categories in the entity layer with the concepts in the concept layer, finding the concepts that are the same as the entity categories is equivalent to establishing a new connection between the entities under the entity categories in the entity layer and the concepts in the concept layer, that is, providing new entities for the concepts in the concept layer.

[0097] Then, a new knowledge graph can be obtained based on the relationship between the new concepts and entities as well as the concept layer data and entity layer data.

[0098] For example, the knowledge modeling part realizes the association with the instance layer data by querying the instances under the concepts in XLORE, and the knowledge acquisition part realizes the association with the concept layer data through the entity classification function and the classification information of the instances in XLORE. The concepts extracted from the knowledge modeling part provide concept categories for the entity classification of the knowledge acquisition part, and the instance classification of the knowledge acquisition part provides instances for the concepts of the knowledge modeling part. For example, the concept "BJ City Tourism" has instances "a certain platform Great Wall" and "a certain valley Great Wall", etc., which can realize the association between the concept "BJ City Tourism" and the instances "a certain platform Great Wall" and "a certain valley Great Wall". The knowledge acquisition part can obtain the association between the instance "a certain gate" and the concept "attractions" through the entity classification function. Querying the instance "a certain C underwater world" in XLORE for information query can obtain that its concept classification includes "attractions" and "underwater theme park", etc., realizing the association with the concept layer data.

[0099] Further, in one embodiment of the present invention, a method for extracting entities from the original data to obtain the entities includes:

[0100] The original data is subjected to entity linking, keyword extraction and named entity recognition to obtain entity linking results, keyword extraction results and named entity recognition results respectively;

[0101] A union or intersection of the entity linking result, the keyword extraction result, and the named entity recognition result is determined as the entity.

[0102] Specifically, entity linking is to map certain strings in a text to corresponding entities in the knowledge base. Given a document and a knowledge base, entity linking aims to identify all entity mentions in the text and find the entity corresponding to each entity mention in the knowledge base. If the knowledge base does not include the entity referred to by the entity mention, it needs to be mapped to an empty entity. The entity linking task is generally divided into three steps: entity discovery, candidate entity generation, and candidate entity disambiguation. Entity discovery aims to identify all entity mentions in the document, and candidate entity generation finds the knowledge base entity that each entity mention may refer to, which is called the candidate entity set. Candidate entity disambiguation is to determine the knowledge base entity referred to by the entity mention. For example, by performing entity linking on the original text based on all the data in XLORE, we can get the key words in it, such as "A certain C underwater world is an entertaining and educational underwater theme park. There are 8,000 tons of water, more than 6,000 rare marine creatures, more than a dozen kinds of huge and ferocious sharks, and a 120-meter ultra-long panoramic underwater tunnel, taking you on an extraordinary underwater journey!" For this sentence, we can get entity link results such as "A certain C underwater world", "theme park", "rare marine creatures", and "sharks".

[0103] Keyword extraction is to extract the words that are most relevant to the meaning of the article from the text. Keyword extraction refers to extracting words that are important for understanding the core information of the document to help users understand the main information of the text. For example, if all texts are subjected to keyword extraction, the keywords that can be obtained include "a certain B Palace Museum", "Marco Polo Bridge", "BJ City ST Hotel", etc.

[0104] In addition, named entity recognition refers to extracting all entities in a document, where entities represent specific things in the real world or abstract concepts. Such as people, organizations, places, or "machine learning", "artificial intelligence", etc. Different from the "named entities" in most studies, the entities referred to in this article include named entities (mainly people, organizations, places), common entities (such as movies, books, songs, cultural customs, food, materials, etc.) and abstract concepts (concepts without physical form generated by human abstract thinking). In the knowledge base, an entity may correspond to multiple concepts. For example, player A belongs to both the category "basketball player" and the category "recipient of a certain medal" in Wikipedia. Entity recognition refers to identifying entities with specific meanings in the text, mainly including names of people, places, organizations, proper nouns, etc. For example, using a rule-based method to perform entity recognition on the original document, we can get organizations such as "Q University", "R University", etc., names such as "historical figure A", "historical figure B", "historical figure C", etc., and places such as "A Street", "BJ City West Station", etc.

[0105] Then the union or intersection of the entity linking results, keyword extraction results and named entity recognition results is taken as the entity.

[0106] Specifically, for the vocabulary intersection extracted by entity linking, keyword extraction and named entity recognition, all the entities obtained are merged, and the overlap within the word is processed according to the rules. For example, the original sentence is "ABCDEFGHIJ", where each letter represents a word, for example, the word linked to the entity link is "DEFG", the keyword or named entity recognition extraction is CD, then the result is corrected to CDEFG, the keyword or named entity recognition is CDEFG, then the result is corrected to CDEFG, the keyword or named entity recognition is CDEFGH, then the result is corrected to CDEFGH, the keyword or named entity recognition is DE, then the result is corrected to DEFG, the keyword or named entity recognition is DEFG, then the result is DEFG. That is, it is manifested as determining the union of the vocabulary results obtained by entity linking, keyword extraction and named entity recognition as the entity merging result.

[0107] If the keyword or named entity is recognized as DEFGH, the result will be DEFG. If the keyword or named entity is recognized as EF, the result will be corrected to EF. If the keyword or named entity is recognized as EFG, the result will be corrected to EFG. For example, the entity linking result is "Chinese Super League". According to the previously set rules, it is retained as "a certain Super League". The results obtained by keyword extraction are corrected and supplemented with knowledge. The "a certain Super League" in the text can be obtained as "a certain football Super League" in the football field by considering the context content in the entity linking, while the keyword may only be "a certain Super", and "a certain Super" may refer to "a certain volleyball Super League", "a certain badminton Super League" and other events, then the keyword becomes "a certain football Super League". The entity linking function provides disambiguation for the keyword extraction function, supplementing the background knowledge of "a certain football association Super League (abbreviated as "a certain Super" or "a certain Super League") is the highest level of professional football league in a certain region. Its lower leagues are the A-level League of a certain football association, the B-level League of a certain football association and the Champions League of a certain football association member association." That is, through entity linking, the "certain Super League" in the entity refers to the "certain Football Super League", while the "certain Super League" in the keyword may refer to the "certain Volleyball Super League", "certain Badminton Super League" and other events, that is, multiple subsets are presented, but in this document, the final "certain Super League" refers to the "certain Football Super League", which is expressed as the intersection of the vocabulary results obtained by entity linking, keyword extraction and named entity recognition as the entity merging result.

[0108] Furthermore, in the knowledge graph construction method in the embodiment of the present invention, the method for extracting keywords from the original data includes:

[0109] The word frequency-inverse document frequency algorithm TF-IDF, TextRank, grammar rule-based, latent semantic analysis LSA or latent semantic retrieval LSI method are used to obtain a keyword vocabulary and the position and importance of each word in the original data.

[0110] Specifically, the methods in the above embodiments are described as follows:

[0111] In order to construct the knowledge graph of BJ City Tourism. The original data obtained are the relevant documents of "BJ City Tourism Network", including text, pictures, videos, etc. The existing large-scale knowledge graph uses the large-scale cross-language knowledge graph XLORE. XLORE contains about 2.35 million concepts and 26 million entities, which is the knowledge graph containing the most Chinese structured knowledge. The knowledge modeling part mainly includes concept acquisition, concept upper and lower relationship learning, concept attribute learning, etc. Knowledge acquisition includes entity extraction, entity classification, relationship extraction, instance attribute extraction, etc. The concepts obtained for "BJ City Tourism Network" include "scenic area", "route", "hotel", "heritage monuments", "royal gardens", "world cultural heritage", etc. Using upper and lower relationship learning, it can be obtained that "heritage monuments" are the subordinate concepts of "scenic area" and "royal gardens" are the subordinate concepts of "heritage monuments". At the same time, according to the concept attribute extraction, the concept "scenic area" has "ticket price", "address", "business hours" and other attributes. Using the entity extraction function in knowledge acquisition, we can get "Street A", "Palace B", "Botanical Garden C in BJ City", "Museum D in BJ City", etc. Classifying all entities, we can get "Palace B", "Botanical Garden C in BJ City", "Museum D in BJ City", "Underwater World C", etc., which are all instances under the concept of "attractions". Relationship extraction can get the relationship between entities, for example, "Underwater World C" is "Underwater Theme Park", etc. For the entity attribute extraction of "Underwater World C", we can get the attribute value of the attribute "Attraction Phone Number" is "010-65913397", and the attribute value of the attribute "Approximate Tour Time" is "3 hours", etc. XLORE knowledge graph is dynamically expanded and updated according to the daily data update of Baidu Encyclopedia.

[0112] XLORE provides data support for knowledge modeling and knowledge acquisition. In the knowledge modeling part, for a concept obtained after processing the original data, the data in XLORE can use keywords as conditions to query the concept data in XLORE and obtain the brief information of the concept, including the name of the concept, the upper concept, the lower concept and the concept attribute. For example, the query of "BJ City Tourism" can obtain the upper concepts such as "China City Tourism" and "BJ City", the lower concepts such as "BJ City Tourist Attractions" and "BJ City Hotel", and the concept "BJ City Tourism" has instances such as "A certain platform Great Wall" and "A certain valley Great Wall". Then, by consulting the relevant information of the concept "BJ City Hotel", we can obtain the attributes such as "location" and "business hours", and the related concepts such as "BJ City Museum", "BJ City Conference Center", "BJ City A Hotel", "Wangfu B Hotel" and other instances. In the knowledge acquisition part, use keywords as conditions to query the instances in XLORE and obtain the brief information of the instances: including the name of the instance, instance classification information and instance attributes. By querying the instance information of the instance "C Underwater World", we can get the concept classifications of "attractions", "underwater theme park", etc., and the attributes include "opening hours" of "8:00-20:00 in summer and 8:30-18:30 in winter" and "ticket price" of "150 yuan".

[0113] The conceptual layer data obtained by knowledge modeling has two sources, namely, the results obtained by the original data through the concept acquisition, concept upper and lower relationship learning, concept attribute learning and other tools in the knowledge modeling tool, and the concept upper and lower information, concept attributes, related concepts, concept instances and other information obtained by XLORE using keywords as conditions to query the concept data in XLORE for the concept instance. Then, the two parts of data can be integrated by using knowledge fusion to obtain a more complete knowledge modeling data. For example, the upper-level concepts obtained above through the functions in knowledge modeling include "Chinese City Tourism" and "BJ City", and the lower-level concepts include "BJ City Tourist Attractions" and "BJ City Hotel". The concept "BJ City Tourism" has instances such as "A certain platform Great Wall" and "A certain valley Great Wall". Through XLORE to check the relevant information of the concept "BJ City Hotel", you can get attributes such as "location" and "business hours", related concepts such as "BJ City Museum", "BJ City Conference Center", "BJ City A Hotel", "Wangfu B Hotel" and other instances. By integrating these two parts together, a more complete upper-level concept system can be obtained.

[0114] The instance layer data obtained by knowledge acquisition has two sources: the results obtained by processing the original data using entity extraction, entity classification, relationship extraction, instance attribute extraction and other functions in knowledge acquisition, and querying the large-scale knowledge graph XLORE. The two parts of data are fused through instance fusion and attribute fusion. Using the entity extraction function in knowledge acquisition, we can get "A Street", "B Palace", "BJ City C Botanical Garden", "BJ City D Museum", etc. Classifying all entities can get "B Palace", "BJ City C Botanical Garden", "BJ City D Museum", "C Underwater World", etc. are all instances under the concept "attractions". Relationship extraction can get the relationship between entities, for example, "C Underwater World" is "Underwater Theme Park", etc. For the "C Underwater World" entity attribute extraction, the attribute value of the attribute "attraction phone" is "010-65913397", and the attribute value of the attribute "approximate tour time" is "3 hours", etc. In the knowledge acquisition part, using entity classification to classify "XXX gate" can get it as an instance under the concept "attractions", thus realizing the association between the instance "XXX gate" and the concept "attractions". In addition, keywords are used as conditions to query instances in XLORE and obtain brief information about the instances: including the name of the instance, instance classification information, and instance attributes. By querying the instance information of the instance "XXX Underwater World", it can be obtained that its concept classifications include "attractions", "underwater theme park", etc., and the attributes that can be obtained include "opening hours" is "8:00-20:00 in summer, 8:30-18:30 in winter", "ticket price" is "150 yuan" and other information. By fusing the above instance attributes, we can get the following information about the attributes of "C Underwater World": the attribute value of "attraction phone number" is "010-65913397", the attribute value of "approximate tour time" is "3 hours", the attribute value of "opening hours" is "8:00-20:00 in summer, 8:30-18:30 in winter", and the attribute value of "ticket price" is "150 yuan". In this way, we get more complete instance-level data information.

[0115] The knowledge modeling part realizes the association with the instance layer data by querying the instances under the concepts in XLORE, and the knowledge acquisition part realizes the association with the concept layer data by the entity classification function and the classification information of the instances in XLORE. The concepts extracted from the knowledge modeling part provide concept categories for the entity classification of the knowledge acquisition part, and the instance classification of the knowledge acquisition part provides instances for the concepts of the knowledge modeling part. For example, the concept "BJ City Tourism" has instances "a certain platform Great Wall" and "a certain valley Great Wall", which can realize the association between the concept "BJ City Tourism" and the instances "a certain platform Great Wall" and "a certain valley Great Wall". The knowledge acquisition part can obtain the association between the instance "a certain gate" and the concept "attractions" through the entity classification function. Querying the instance "a certain C underwater world" in XLORE for information query can obtain that its concept classification includes "attractions" and "underwater theme park", which realizes the association with the concept layer data. The original data in "BJ City Tourism Network" is obtained through knowledge modeling and knowledge acquisition tools. The concept layer and instance layer data are selectively updated according to the confidence level to realize the update of large-scale knowledge graph data.

[0116] refer to Figure 3 The present invention provides a knowledge graph construction device, including:

[0117] The first processing module 31 is used to obtain raw data and a large-scale knowledge graph;

[0118] The second processing module 32 is used to perform knowledge modeling on the original data to obtain a knowledge modeling result;

[0119] A third processing module 33 generates concept layer data based on the knowledge modeling result and the large-scale knowledge graph;

[0120] The fourth processing module 34 is used to perform knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes;

[0121] A fifth processing module 35 is used to input the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity;

[0122] A sixth processing module 36 is used to merge the entity, the entity category, the entity attribute, and the entity related information to obtain complete entity layer data;

[0123] A seventh processing module 37, configured to construct a new knowledge graph based on the concept layer data and the entity layer data;

[0124] The eighth processing module 38 is used to update the large-scale knowledge graph based on the new knowledge graph.

[0125] Since the device provided in the embodiment of the present invention can be used to execute the method described in the above embodiment, its working principle and beneficial effects are similar, so they are not described in detail here. For specific contents, please refer to the introduction of the above embodiment.

[0126] Further, in one embodiment of the present invention, the knowledge modeling result includes concepts;

[0127] The sixth processing module is further used for:

[0128] Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept;

[0129] The knowledge modeling result and the concept-related information of the concept are integrated to obtain the concept layer data.

[0130] Specifically, the above text and the description extract the concepts from the original data to obtain the concepts in the original data. Then, the obtained concepts are input as keywords into the large-scale knowledge graph for retrieval to obtain the concept-related information of the concept in the large-scale knowledge graph, including the concept name, superordinate concept, subordinate concept and concept attribute of the concept in the large-scale knowledge graph, and in addition, there are entities under the concept. For example, in the knowledge modeling part, for a certain concept obtained after the original data is processed, the data in XLORE can use keywords as conditions to query the concept in XLORE for the concept data, and obtain the brief information of the concept, including the name of the concept, superordinate concept, subordinate concept and concept attribute information. For example, the query of "BJ City Tourism" can obtain the superordinate concepts such as "China City Tourism" and "BJ City", and the subordinate concepts such as "BJ City Tourist Attractions" and "BJ City Hotel". The concept "BJ City Tourism" has instances such as "A Certain Great Wall" and "A Certain Valley Great Wall". By looking up the relevant information of the concept "BJ City Hotel", we can obtain attributes such as "location" and "business hours", and related concepts such as "BJ City Museum", "BJ City Conference Center", "BJ City Hotel A", "Wangfu Hotel B" and other instances.

[0131] The conceptual layer data obtained by knowledge modeling has two sources, namely, the results obtained by the original data through the concept acquisition, concept upper and lower relationship learning, concept attribute learning and other tools in the knowledge modeling tool, and the concept upper and lower information, concept attributes, related concepts, concept instances and other information obtained by XLORE using keywords as conditions to query the concept data in XLORE for the concept instance. Then, the two parts of data can be integrated by using knowledge fusion to obtain a more complete knowledge modeling data. For example, the upper-level concepts obtained above through the functions in knowledge modeling include "Chinese City Tourism" and "BJ City", and the lower-level concepts include "BJ City Tourist Attractions" and "BJ City Hotel". The concept "BJ City Tourism" has instances such as "A certain platform Great Wall" and "A certain valley Great Wall". Through XLORE to check the relevant information of the concept "BJ City Hotel", you can get attributes such as "location" and "business hours", related concepts such as "BJ City Museum", "BJ City Conference Center", "BJ City A Hotel", "Wangfu B Hotel" and other instances. By integrating these two parts together, a more complete upper-level concept system can be obtained.

[0132] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the knowledge graph construction method, which includes: obtaining original data and a large-scale knowledge graph; performing knowledge modeling on the original data to obtain a knowledge modeling result; generating concept layer data based on the knowledge modeling result and the large-scale knowledge graph; performing knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain an entity, an entity category and an entity attribute; inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity; integrating the entity, the entity category, the entity attribute and the entity-related information to obtain complete entity layer data; constructing a new knowledge graph based on the concept layer data and the entity layer data; updating the large-scale knowledge graph based on the new knowledge graph.

[0133] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0134] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the knowledge graph construction method provided by the above methods, which includes: obtaining original data and a large-scale knowledge graph; performing knowledge modeling on the original data to obtain knowledge modeling results; generating concept layer data based on the knowledge modeling results and the large-scale knowledge graph; performing knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes; inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity; fusing the entity, the entity category, the entity attribute and the entity-related information to obtain complete entity layer data; constructing a new knowledge graph based on the concept layer data and the entity layer data; updating the large-scale knowledge graph based on the new knowledge graph.

[0135] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned methods for constructing a knowledge graph, the method comprising: obtaining original data and a large-scale knowledge graph; performing knowledge modeling on the original data to obtain knowledge modeling results; generating concept layer data based on the knowledge modeling results and the large-scale knowledge graph; performing knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes; inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity; fusing the entity, the entity category, the entity attribute and the entity-related information to obtain complete entity layer data; constructing a new knowledge graph based on the concept layer data and the entity layer data; and updating the large-scale knowledge graph based on the new knowledge graph.

[0136] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A knowledge graph construction method, characterized in that: include: Obtain raw data and large-scale knowledge graphs. Raw data is the data used to build knowledge graphs, which can be text, video, voice, or a mixture of several formats. Performing knowledge modeling on the original data to obtain a knowledge modeling result; Generate concept layer data based on the knowledge modeling results and the large-scale knowledge graph; Performing knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes; Inputting the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity; The entity, the entity category, the entity attribute, and the entity related information are integrated to obtain complete entity layer data; Constructing a new knowledge graph based on the concept layer data and the entity layer data; Updating the large-scale knowledge graph based on the new knowledge graph; The knowledge modeling results include concepts; Based on the knowledge modeling results and large-scale knowledge graph, conceptual layer data is generated, including: Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept; Merging the knowledge modeling result with the concept-related information of the concept to obtain the concept layer data; Constructing a new knowledge graph based on the concept layer data and the entity layer data also includes: Concept-related information of the concept includes entities under the concept; Compare the entity under the concept with the entity extracted from the entity, and establish a first association relationship between the concept and the entity extracted from the entity; Comparing the entity category obtained by the entity classification with the concept obtained by the concept extraction, and establishing a second association relationship between the concept and the entity under the entity category; Based on the first association relationship and the second association relationship, the concept layer data and the entity layer data are processed to obtain a new knowledge graph.

2. The knowledge graph construction method according to claim 1, characterized in that: The acquiring entity-related information of the entity specifically includes: The name of the entity, the second entity category, and the second entity attribute are obtained.

3. The knowledge graph construction method according to claim 1, characterized in that: The method of extracting entities from the original data to obtain the entities includes: The original data is subjected to entity linking, keyword extraction and named entity recognition to obtain entity linking results, keyword extraction results and named entity recognition results respectively; A union or intersection of the entity linking result, the keyword extraction result, and the named entity recognition result is determined as the entity.

4. The knowledge graph construction method according to claim 3, characterized in that: The method for extracting keywords from raw data includes: The word frequency-inverse document frequency algorithm TF-IDF, TextRank, grammar rule-based, latent semantic analysis LSA or latent semantic retrieval LSI method are used to obtain a keyword vocabulary and the position and importance of each word in the original data.

5. A device for constructing a knowledge graph, characterized in that: include: The first processing module is used to obtain raw data and large-scale knowledge graphs. Raw data is the data used to build knowledge graphs, which is text, video, voice or a mixture of several formats; A second processing module is used to perform knowledge modeling on the original data to obtain a knowledge modeling result; A third processing module generates concept layer data based on the knowledge modeling result and the large-scale knowledge graph; A fourth processing module is used to perform knowledge acquisition on the original data, including entity extraction, entity classification and first entity attribute extraction, to obtain entities, entity categories and entity attributes; A fifth processing module, configured to input the entity as a keyword into the large-scale knowledge graph to obtain entity-related information of the entity; A sixth processing module, configured to fuse the entity, the entity category, the entity attribute, and the entity related information to obtain complete entity layer data; A seventh processing module, used for constructing a new knowledge graph based on the concept layer data and the entity layer data; An eighth processing module, configured to update the large-scale knowledge graph based on the new knowledge graph; The knowledge modeling results include concepts; Based on the knowledge modeling results and large-scale knowledge graph, conceptual layer data is generated, including: Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept; Merging the knowledge modeling result with the concept-related information of the concept to obtain the concept layer data; Constructing a new knowledge graph based on the concept layer data and the entity layer data also includes: Concept-related information of the concept includes entities under the concept; Compare the entity under the concept with the entity extracted from the entity, and establish a first association relationship between the concept and the entity extracted from the entity; Comparing the entity category obtained by the entity classification with the concept obtained by the concept extraction, and establishing a second association relationship between the concept and the entity under the entity category; Based on the first association relationship and the second association relationship, the concept layer data and the entity layer data are processed to obtain a new knowledge graph.

6. The device for constructing a knowledge graph according to claim 5, characterized in that: The knowledge modeling results include concepts; The third processing module is also used for: Inputting the concept as a keyword into the large-scale knowledge graph to obtain concept-related information of the concept; The knowledge modeling result and the concept-related information of the concept are integrated to obtain the concept layer data.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the knowledge graph construction method as described in any one of claims 1 to 4 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the knowledge graph construction method as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Construction method of knowledge graph library for network fault analysis and application thereof

    CN110008288A

  • Domain event graph construction method and device fusing multiple types of facts and entity knowledge

    CN110968700A