Knowledge graph construction method, device, equipment and computer-readable storage medium

By adopting process-based methods and standard input and output definitions based on historical ontology in the construction of knowledge graphs, the reusability and accuracy of the knowledge graph construction process in the existing technology is solved, and efficient and high-quality knowledge graph construction is achieved.

CN114186076BActive Publication Date: 2025-03-25SHENZHEN WANGLIAN ANRUI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111533399.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-03-25
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

The existing knowledge graph construction methods have problems such as unclear connection between processes, poor reusability of the construction process, and low accuracy of the knowledge graph.

Method used

By constructing the current round of knowledge graph ontology based on the historical knowledge graph ontology, and using standard input and output definitions to reduce the coupling between data modules, realizing the reusability of process-based, iterable and construction processes. Specific steps include information extraction, knowledge mapping, knowledge fusion and knowledge verification.

Benefits of technology

The efficiency and quality of knowledge graph construction are improved, the reusability and applicability of the process are realized, and the iterative expansion of knowledge graph data is realized through iterative construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114186076B_ABST
    Figure CN114186076B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence, and provides a knowledge graph construction method, apparatus, device, and computer-readable storage medium to achieve iterative knowledge graph construction, reusable construction process, and improve the efficiency and quality of knowledge graph construction. The method includes: based on the historical knowledge graph ontology, constructing the current round of knowledge graph ontology and outputting it; according to the standard input and output definition, taking the current round of knowledge graph ontology as input, extracting information from the source text data, obtaining the information extraction result and outputting it; taking the information extraction result as input, using the current round of knowledge graph ontology to map the information extraction result, obtaining structured graph data and outputting it; taking the structured graph data as input, integrating the historical structured graph data, obtaining the current round of structured graph data and outputting it; taking the current round of structured graph data as input, verifying the current round of structured graph data, obtaining the final structured graph data and outputting it.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a knowledge graph construction method, device, equipment and computer-readable storage medium. Background Art

[0002] Robots are being used in more and more places. Various robots can be seen working in restaurants, hospitals, supermarkets, warehouses, etc. Robots are highly sophisticated intelligent systems. In addition to the robot itself, a robot also includes hardware units such as various sensors and software programs based on them. Only when the functions of the hardware units and hardware programs are functioning properly can the robot operate normally.

[0003] From 2012 when Google proposed the "Knowledge Graph" to today, knowledge graph technology has developed rapidly, and with the rapid development of big data and artificial intelligence technology, the connotation of knowledge graph has become increasingly rich. At the same time, the advent of the era of big data and artificial intelligence has not only given birth to knowledge graphs, but also laid the necessary foundation for the development of knowledge graph technology and brought new opportunities. The rapid development of data, computing power and models has made large-scale automated knowledge acquisition possible; a large amount of high-quality user-generated content provides a high-quality data source; crowdsourcing technology has made large-scale verification of knowledge possible. New data and new algorithms provide a new technical foundation and development conditions for the construction of large-scale knowledge graphs. As a form of knowledge, knowledge graphs have played an increasingly important role in semantic search, intelligent question and answer, data analysis, natural language understanding, visual understanding, and IoT device interconnection.

[0004] The construction method of knowledge graph generally includes algorithms or processes such as ontology design, entity recognition, relationship extraction and event extraction. However, the existing knowledge graph construction methods have problems such as unclear connection between various processes, poor reusability of the construction process and low accuracy of the constructed knowledge graph. Summary of the invention

[0005] The present application provides a knowledge graph construction method, apparatus, equipment and computer-readable storage medium to realize the process-based, iterative and reusable construction of the knowledge graph, thereby improving the efficiency and quality of the knowledge graph construction.

[0006] On the one hand, the present application provides a knowledge graph construction method, comprising:

[0007] Based on the historical knowledge graph ontology, construct and output the current round of knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process;

[0008] According to the standard input and output definition, the current round of knowledge graph ontology is used as input, information is extracted from the source text data, and the information extraction result is obtained and output, wherein the information extraction result includes knowledge graph triples and event multi-tuple data;

[0009] According to the standard input and output definition, the information extraction result is used as input, and the information extraction result is mapped using the current round of knowledge graph ontology to obtain structured graph data and output it;

[0010] According to the standard input and output definition, the structured graph data is used as input, and the historical structured graph data is integrated to obtain and output the current round of structured graph data, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process;

[0011] According to the standard input and output definition, the current round of structured graph data is taken as input, the current round of structured graph data is verified, and the final structured graph data is obtained and output.

[0012] On the other hand, the present application provides a knowledge graph construction device, comprising:

[0013] An ontology construction module is used to construct and output the current round of knowledge graph ontology based on the historical knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process;

[0014] An information extraction module is used to extract information from source text data according to the standard input and output definition, taking the current round of knowledge graph ontology as input, obtaining and outputting information extraction results, wherein the information extraction results include knowledge graph triples and event multi-tuple data;

[0015] A knowledge mapping module is used to take the information extraction result as input according to the standard input and output definition, map the information extraction result using the current round of knowledge graph ontology, obtain structured graph data and output it;

[0016] A knowledge fusion module is used to take the structured graph data as input according to the standard input and output definition, fuse the historical structured graph data, obtain the current round of structured graph data and output it, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process;

[0017] The knowledge verification module is used to take the current round of structured graph data as input according to the standard input and output definition, verify the current round of structured graph data, obtain the final structured graph data and output it.

[0018] In the third aspect, the present application provides a device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the technical solution of the above-mentioned knowledge graph construction method when executing the computer program.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of the technical solution of the above-mentioned knowledge graph construction method.

[0020] From the technical solution provided by the present application, it can be seen that since the current round of knowledge graph ontology, information extraction results, structured graph data, current round of structured graph data and final structured graph data are all based on standard input and output definitions, the data output of the previous step is used as the input data of the next step. Therefore, on the one hand, the modules that process these data use fixed input and output definitions, which reduces the coupling between modules, thereby improving the reusability and applicability of the knowledge graph construction process of the present application; on the other hand, the algorithm library and / or method library management is used within the module to facilitate the selection of different algorithms according to different source texts, as well as iterative optimization of the algorithms within the module, thereby improving the accuracy of the module output results; thirdly, the final structured graph data is iteratively constructed to achieve iterative expansion of the knowledge graph data, so that large-scale knowledge graphs can be constructed and updated. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 It is a flowchart of the knowledge graph construction method provided in the embodiment of the present application;

[0023] Figure 2 It is a partial subgraph of the knowledge graph constructed by the knowledge graph construction method provided by the embodiment of the present application by collecting 8000 Wikipedia text data;

[0024] Figure 3 It is a schematic diagram of the structure of the knowledge graph construction device provided in the embodiment of the present application;

[0025] Figure 4 It is a schematic diagram of the structure of the device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] In this specification, adjectives such as first and second may be used only to distinguish one element or action from another element or action, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be interpreted as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.

[0028] In this specification, for the convenience of description, the sizes of various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0029] See also Figure 1 , is the knowledge graph construction method flow provided in the embodiment of the present application, which mainly includes steps S101 to S105, which are described in detail as follows:

[0030] Step S101: Based on the historical knowledge graph ontology, construct and output the current round of knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process.

[0031] It should be noted that since the knowledge graph ontology (Schema) of the present application is not obtained through only one round of knowledge graph construction process, but is the result of multiple rounds of iterations, there is a so-called historical knowledge graph ontology, that is, the knowledge graph ontology output in the previous round of knowledge graph construction process. The technical solution of the present application is first based on the historical knowledge graph ontology to construct and output the current round of knowledge graph ontology. Specifically, it is constructed by experts based on business needs and actual experience and / or constructed through analysis and calculation of the ontology definition library. It should be noted that in order to realize the iterative update of the graph, the constructed current round of knowledge graph ontology should be compatible with the previous round of knowledge graph ontology. Whether it is the historical knowledge graph ontology or the current round of knowledge graph ontology, it mainly defines the subject-predicate-object (SPO) triples of the knowledge graph, describing abstract concepts, attributes and axioms in specific fields.

[0032] Step S102: According to the standard input and output definition, the current round of knowledge graph ontology is used as input, information is extracted from the source text data, and the information extraction results are obtained and output, wherein the information extraction results include knowledge graph triples and event multi-tuple data.

[0033] In an embodiment of the present application, the standard input and output definition actually defines the standard interface between the output module and the input module. Since the interfaces between modules are defined according to the standard input and output, the coupling between modules is reduced, thereby improving the reusability and applicability of the modules, and also improving the reusability and applicability of the knowledge graph construction process of the present application. In addition to using the current round of knowledge graph ontology as the input information source, the input also includes source text data, namely target text data, which is also the text data based on which the knowledge graph will be built. Information extraction from source text data includes entity extraction, relationship extraction, attribute extraction and event extraction from source text data. Among them, entity extraction is named entity recognition (NER), which refers to the automatic identification of named entities from source text data. Relationship extraction is to extract the association relationship between entities from source text data and other related corpora, and connect entities through relationships. Specifically, it can be achieved by manually constructing grammar and semantic rules (i.e. pattern matching), statistical machine learning, or combining information extraction methods for open domains with methods for closed domains. Attribute extraction refers to the collection of attribute information of specific entities from different source text data. Specifically, data mining methods can be used to directly mine the relationship pattern between entity attributes and attribute values ​​from source text data, thereby locating attribute names and attribute values ​​in source text data. Event extraction is to extract the main elements that make up an event from source text data through trigger word recognition, event type classification, argument recognition and role classification algorithms: trigger words, event types, arguments and argument roles.

[0034] As an embodiment of the present application, information extraction is performed on the source text data, and the information extraction result obtained can be: if the source text data is structured data, then the structured data is extracted by rule matching, and the information extraction result is obtained and a rule extraction method library is formed; if the source text data is unstructured data or semi-structured data, then the unstructured data or semi-structured data is extracted by regular and model methods, and the information extraction result is obtained and a model extraction method library or a regular extraction method library is formed. Since structured data is data with a clear and definite structure such as a relational database, for structured data, a rule matching method can be used to extract information from it, and the information extraction result is obtained and a rule extraction method library is formed. Specifically, it can be directly using a pre-built machine learning model to extract information from structured data, determine the core information data contained in the structured data, and achieve the unification of data format and mode. For data with a certain data structure but needing further extraction and organization, such as semi-structured data such as data in encyclopedias and web pages, and unstructured data such as audio, video and pictures, due to their complex structures or lack of fixed structures, regular and model methods can be used to extract information from unstructured data or semi-structured data, obtain information extraction results and form a model extraction method library or a regular extraction method library. Specifically, the unstructured data or semi-structured data is generally converted into text information first, and then the text information is subjected to natural language processing (Natural Language Processing, NLP), such as machine learning methods, etc., and then the information obtained by NLP is subjected to feature processing, such as vectorization and Hash Trick, etc. Finally, the data obtained after the above processing is input into the machine learning model, and the machine learning model is used to extract information, obtain information extraction results and form a model extraction method library or a regular extraction method library. It should be noted that the above-mentioned NLP for text information can also be a deep learning method. Unlike machine learning algorithms, which generally require a series of data conversions, deep learning methods automatically complete the conversion of data and vectors through deep neural network structures. Specifically, the input is text information and the output is the information extraction result, omitting a series of explicit data conversion operations in the middle. The above information extraction of source text data obtains information extraction results including knowledge graph triples and event multi-tuple data, where the knowledge graph triples include entities, objects, and the relationship between entities and objects, and the event multi-tuple includes event trigger words, event types, event arguments, and argument roles.

[0035] Step S103: According to the standard input and output definition, the information extraction result is used as input, and the information extraction result is mapped using the current round of knowledge graph ontology to obtain structured graph data and output it.

[0036] Specifically, the information extraction results are mapped into structured graph data based on the entities, objects, and relationships between entities and objects defined in the current round of knowledge graph ontology, wherein the structured graph data includes nodes, edges between nodes, attributes on edges, and weights between edges. For example, the vector space model can be used to normalize entities / objects, and the normalized entities / objects can be mapped to abstract concepts. Specifically, an entity / object feature vector can be constructed based on the entity / object, and multiple abstract concept feature vectors can be constructed based on the abstract concept; a similarity metric can be used to evaluate the similarity between the entity / object feature vector and each abstract concept feature vector; and the entity / object feature vector can be mapped to the abstract concept corresponding to the abstract concept feature vector that has the greatest similarity to the entity / object feature vector.

[0037] Step S104: According to the standard input and output definition, the structured graph data is taken as input, and the historical structured graph data is integrated to obtain the current round of structured graph data and output it, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process.

[0038] As an embodiment of the present application, taking structured graph data as input and fusing historical structured graph data to obtain the current round of structured graph data can be: mapping the entities of the structured graph data to a preset structured knowledge base to obtain entity attribute information; according to preset rules and preset algorithms, using the entity attribute information to complete the attributes and relationships of the structured graph data to obtain a completed knowledge graph; fusing the completed knowledge graph with the historical structured graph data to obtain the current round of structured graph data. In the above embodiment, the preset structured knowledge base can be a known unambiguous structured knowledge base, such as an open source knowledge base and an industry internal database, and mapping the entities of the structured graph data to the preset structured knowledge base can be using entity disambiguation technology to perform data docking between the entities of the structured graph data and the preset structured knowledge base. The preset rules of the above-mentioned embodiments include attribute alignment rules, attribute coverage rules and / or NLP rules, etc. The preset algorithms mainly include link prediction algorithms and knowledge reasoning algorithms, etc. The completed knowledge graph is integrated with the historical structured graph data. The fusion tool used is mainly a rule-based graph data fusion method, such as attribute alignment, attribute coverage, attribute accumulation and relationship appending rules.

[0039] As another embodiment of the present application, structured graph data is taken as input, and historical structured graph data is integrated to obtain the current round of structured graph data: according to the spatial vectors corresponding to the entities and relationships defined in the current round of knowledge graph ontology, the first entity and relationship of the knowledge graph triple are selected, the vector of the last entity is calculated, and the last entity ranked in the top k in reasoning and its scoring score are obtained; according to the concept type of the entity, the last entity ranked in the top k is compared with a predetermined candidate set, and entities not in the candidate set are removed; according to the scoring score of the last entity ranked in the top k in reasoning, the confidence of the inferred entity is determined, and the inferred entity ranked in the top m in confidence is taken to supplement the relationship between it and the first entity or the last entity, and the structured graph data is completed to obtain the completed knowledge graph; the completed knowledge graph is integrated with the historical structured graph data to obtain the current round of structured graph data, wherein the integration of the completed knowledge graph with the historical structured graph data to obtain the current round of structured graph data is similar to the aforementioned embodiment. Before selecting the first entity and relationship of the knowledge graph triple according to the spatial vectors corresponding to the entities and relationships defined in the current round of knowledge graph ontology, calculating the vector of the last entity, and obtaining the last entity with the top k reasoning ranking and its scoring score, it is necessary to output the spatial vectors corresponding to the entities and relationships defined in the current round of knowledge graph ontology according to the structured graph data.

[0040] As another embodiment of the present application, structured graph data is taken as input, and historical structured graph data is integrated to obtain the current round of structured graph data: entity-entity triples of structured graph data are completed using transfer rules, antisymmetric rules and entity association rules, and entity-attribute triples of structured graph data are completed using attribute association rules to obtain the knowledge graph after the first completion; entities, attributes, entity relationships and attribute relationships in the knowledge graph after the first completion are converted into entity embedding vectors, attribute embedding vectors, entity relationship embedding vectors and attribute relationship embedding vectors respectively; entity embedding vectors, attribute embedding vectors, entity relationship embedding vectors and attribute relationship embedding vectors are trained to obtain trained entity embedding vectors, attribute embedding vectors, entity relationship embedding vectors and attribute relationship embedding vectors; entity prediction algorithms, attribute prediction algorithms and relationship prediction algorithms are used to complete the knowledge graph for the second time with the trained entity embedding vectors, attribute embedding vectors, entity relationship embedding vectors and attribute relationship embedding vectors to obtain the completed knowledge graph; the completed knowledge graph is integrated with the historical structured graph data to obtain the current round of structured graph data. In the above embodiment, the entity embedding vector, attribute embedding vector, entity relationship embedding vector and attribute relationship embedding vector are trained to obtain the trained entity embedding vector, attribute embedding vector, entity relationship embedding vector and attribute relationship embedding vector. Specifically, the entity embedding vector, attribute embedding vector, entity relationship embedding vector and attribute relationship embedding vector are used as the input of the preset model, and the scoring function on the entity-entity triples, the loss function on the entity-entity triples, the scoring function on the entity-attribute triples and the loss function on the entity-attribute triples are defined, and the preset model training algorithm is used to train the entity-entity triples and entity-attribute triples to obtain the trained entity embedding vector, attribute embedding vector, entity relationship embedding vector and attribute relationship embedding vector, and the completed knowledge graph is merged with the historical structured graph data to obtain the current round of structured graph data, which is similar to the above embodiment and will not be repeated.

[0041] Step S105: According to the standard input and output definition, the current round of structured graph data is used as input, the current round of structured graph data is verified, and the final structured graph data is obtained and output.

[0042] The current round of structured graph data is taken as input, and the verification of the current round of structured graph data mainly includes algorithm verification and manual verification. Among them, the algorithm verification adopts big data rule initial screening to complete the simple initial screening verification of the overall graph and reduce the subsequent manual workload. The manual verification adopts the knowledge crowdsourcing algorithm and uses explicit crowdsourcing and implicit crowdsourcing methods to continuously improve the graph quality.

[0043] In order to verify the knowledge graph constructed by this application, this application collected 8,000 Wikipedia text data as of May 8, 2021, and constructed the knowledge graph according to the modular knowledge graph construction method of this application. The ontology construction module was used to construct 13 entities such as people, organizations, schools, occupations, and places, as well as 40 relationships such as related, graduated from, parents, spouses, children, and affiliated with, which together constitute the ontology definition of the knowledge graph. After information extraction, knowledge mapping, knowledge fusion, and knowledge verification, a knowledge graph with 13,808 entities and 16,243 relationship data was formed, such as Figure 2 As shown, it is a partial subgraph of the knowledge graph constructed by the modular knowledge graph construction method of this application.

[0044] From the above attached Figure 1 It can be seen from the example knowledge graph construction method that since the current round of knowledge graph ontology, information extraction results, structured graph data, current round of structured graph data and final structured graph data are all based on standard input and output definitions, the data output of the previous step is used as the input data of the next step. Therefore, on the one hand, the modules that process these data use fixed input and output definitions, which reduces the coupling between modules, thereby improving the reusability and applicability of the knowledge graph construction process of this application; on the other hand, the algorithm library and / or method library management is used within the module to facilitate the selection of different algorithms according to different source texts, as well as iterative optimization of the algorithms within the module, thereby improving the accuracy of the module output results; thirdly, the final structured graph data is iteratively constructed to achieve iterative expansion of the knowledge graph data, so that large-scale knowledge graphs can be constructed and updated.

[0045] Please refer to the attached Figure 3 , is a knowledge graph construction device provided in an embodiment of the present application, which may include an ontology construction module 301, an information extraction module 302, a knowledge mapping module 303, a knowledge fusion module 304 and a knowledge verification module 305, which are described in detail as follows:

[0046] An ontology construction module 301 is used to construct and output the current round of knowledge graph ontology based on the historical knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process;

[0047] The information extraction module 302 is used to extract information from the source text data according to the standard input and output definition, taking the current round of knowledge graph ontology as input, obtaining and outputting information extraction results, wherein the information extraction results include knowledge graph triples and event multi-tuple data;

[0048] The knowledge mapping module 303 is used to take the information extraction result as input according to the standard input and output definition, use the current round of knowledge graph ontology to map the information extraction result, obtain structured graph data and output it;

[0049] The knowledge fusion module 304 is used to take the structured graph data as input according to the standard input and output definition, fuse the historical structured graph data, obtain the current round of structured graph data and output it, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process;

[0050] The knowledge verification module 305 is used to take the current round of structured graph data as input according to the standard input and output definition, verify the current round of structured graph data, obtain the final structured graph data and output it.

[0051] From the above attached Figure 3 It can be seen from the example knowledge graph construction device that since the current round of knowledge graph ontology, information extraction results, structured graph data, current round of structured graph data and final structured graph data are all based on standard input and output definitions, the data output of the previous step is used as the input data of the next step. Therefore, on the one hand, the modules that process these data use fixed input and output definitions, which reduces the coupling between modules, thereby improving the reusability and applicability of the knowledge graph construction process of this application; on the other hand, the algorithm library and / or method library management is used within the module to facilitate the selection of different algorithms according to different source texts, as well as iterative optimization of the algorithms within the module, thereby improving the accuracy of the module output results; thirdly, the final structured graph data is iteratively constructed to achieve iterative expansion of the knowledge graph data, so that large-scale knowledge graphs can be constructed and updated.

[0052] Figure 4 Schematic diagram of the structure of the device provided by an embodiment of the present application. Figure 4 As shown, the device 4 of this embodiment mainly includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40, such as a program of the knowledge graph construction method. When the processor 40 executes the computer program 42, the steps in the above-mentioned knowledge graph construction method embodiment are implemented, such as Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 3 The functions of the ontology construction module 301, the information extraction module 302, the knowledge mapping module 303, the knowledge fusion module 304 and the knowledge verification module 305 are shown.

[0053] Exemplarily, the computer program 42 of the knowledge graph construction method mainly includes: based on the historical knowledge graph ontology, construct the current round of knowledge graph ontology and output blocks, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process; according to the standard input and output definition, take the current round of knowledge graph ontology as input, extract information from the source text data, obtain information extraction results and output, wherein the information extraction results include knowledge graph triples and event multi-tuple data; according to the standard input and output definition, take the information extraction results as input , using the current round of knowledge graph ontology to map the information extraction results, obtain structured graph data and output; according to the standard input and output definition, taking the structured graph data as input, integrating the historical structured graph data, obtaining the current round of structured graph data and output, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process; according to the standard input and output definition, taking the current round of structured graph data as input, verifying the current round of structured graph data, obtaining the final structured graph data and output. The computer program 42 can be divided into one or more modules / units, one or more modules / units are stored in the memory 41 and executed by the processor 40 to complete the present application. One or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the device 4.For example, the computer program 42 can be divided into the functions of an entity construction module 301, an information extraction module 302, a knowledge mapping module 303, a knowledge fusion module 304 and a knowledge verification module 305 (modules in the virtual device), and the specific functions of each module are as follows: an ontology construction module 301, which is used to construct and output the current round of knowledge graph ontology based on the historical knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process; an information extraction module 302, which is used to extract information from the source text data according to the standard input and output definition, taking the current round of knowledge graph ontology as input, and obtaining and outputting the information extraction results, wherein the information extraction results include knowledge graph triples and event tuples Data; a knowledge mapping module 303, which is used to take the information extraction result as input according to the standard input and output definition, and use the current round of knowledge graph ontology to map the information extraction result to obtain structured graph data and output it; a knowledge fusion module 304, which is used to take the structured graph data as input according to the standard input and output definition, and fuse the historical structured graph data to obtain the current round of structured graph data and output it, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process; a knowledge verification module 305, which is used to take the current round of structured graph data as input according to the standard input and output definition, and verify the current round of structured graph data to obtain the final structured graph data and output it.

[0054] The device 4 may include but is not limited to a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of device 4 and does not constitute a limitation of device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, a computing device may also include input and output devices, network access devices, buses, etc.

[0055] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0056] The memory 41 may be an internal storage unit of the device 4, such as a hard disk or memory of the device 4. The memory 41 may also be an external storage device of the device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device 4. Further, the memory 41 may also include both the internal storage unit of the device 4 and the external storage device. The memory 41 is used to store computer programs and other programs and data required by the device. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0057] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0058] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0059] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0060] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0061] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0062] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0063] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-temporary computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing related hardware through a computer program. The computer program of the knowledge graph construction method can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned method embodiments, that is, based on the historical knowledge graph ontology, the current round of knowledge graph ontology is constructed and output, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process; according to the standard input and output definition, the current round of knowledge graph ontology is used as input, and information is extracted from the source text data to obtain and output the information extraction result, wherein the information The extraction results include knowledge graph triples and event multi-tuple data; according to the standard input and output definition, the information extraction results are used as input, and the information extraction results are mapped using the current round of knowledge graph ontology to obtain structured graph data and output; according to the standard input and output definition, the structured graph data is used as input, and the historical structured graph data is integrated to obtain the current round of structured graph data and output, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process; according to the standard input and output definition, the current round of structured graph data is used as input, and the current round of structured graph data is verified to obtain the final structured graph data and output. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Non-temporary computer-readable media may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the non-temporary computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, non-temporary computer-readable media do not include electric carrier signals and telecommunication signals. The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein by equivalent; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application.The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present invention.

Claims

1. A knowledge graph construction method, characterized in that: The method uses fixed input and output definitions between modules for processing data, which reduces coupling between modules and improves the reusability and applicability of the knowledge graph construction process; the module uses algorithm library and / or method library management to facilitate the selection of different algorithms according to different source texts, and iteratively optimizes the algorithm within the module to improve the accuracy of the module output results; The final structured graph data is constructed through iteration to achieve iterative expansion of knowledge graph data, making it possible to build and update large-scale knowledge graphs, including: Based on the historical knowledge graph ontology, construct and output the current round of knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process; According to the standard input and output definition, the current round of knowledge graph ontology is used as input, information is extracted from the source text data, and the information extraction result is obtained and output, wherein the information extraction result includes knowledge graph triples and event multi-tuple data; According to the standard input and output definition, the information extraction result is used as input, and the information extraction result is mapped using the current round of knowledge graph ontology to obtain structured graph data and output it; According to the standard input and output definition, the structured graph data is used as input, and the historical structured graph data is integrated to obtain and output the current round of structured graph data, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process; According to the standard input and output definition, the current round of structured graph data is used as input, the current round of structured graph data is verified, and the final structured graph data is obtained and output; The extracting information from the source text data to obtain the information extraction result includes: If the source text data includes structured data, information is extracted from the structured data using a rule matching method to obtain information extraction results and form a rule extraction method library; If the source text data includes unstructured data or semi-structured data, extract information from the unstructured data or semi-structured data using regular and model methods to obtain information extraction results and form a model extraction method library or a regular extraction method library; The current round of knowledge graph ontology is used to map the information extraction result to obtain structured graph data, including: Based on the entities, objects and the relationship between the entities and objects defined in the current round of knowledge graph ontology, the information extraction results are mapped into structured graph data, and the structured graph data includes nodes, edges between nodes, attributes on the edges and weights between the edges.

2. The knowledge graph construction method according to claim 1, characterized in that: The step of taking the structured graph data as input and fusing the historical structured graph data to obtain the current round of structured graph data includes: Mapping the entities of the structured graph data to a preset structured knowledge base to obtain entity attribute information; According to preset rules and preset algorithms, the entity attribute information is used to complete the attributes and relationships of the structured graph data to obtain a completed knowledge graph; The completed knowledge graph is merged with the historical structured graph data to obtain the current round of structured graph data.

3. The knowledge graph construction method according to claim 1, characterized in that: The step of taking the structured graph data as input and fusing the historical structured graph data to obtain the current round of structured graph data includes: According to the space vectors corresponding to the entities and relationships defined in the current round of knowledge graph ontology, select the first entity and relationship of the knowledge graph triple, calculate the vector of the last entity, and obtain the first entity with the inference ranking. The final entity and its scoring score; According to the concept type of the entity, the top The final entity is compared with the predetermined candidate set, and entities not in the candidate set are removed; According to the above reasoning, the ranking is The score of the last entity is used to determine the confidence of the inferred entity, and the confidence ranking is taken as the first The inference entity supplements the relationship between it and the first entity or the last entity, completes the structured graph data, and obtains a completed knowledge graph; The completed knowledge graph is merged with the historical structured graph data to obtain the current round of structured graph data.

4. The knowledge graph construction method according to claim 3, characterized in that: Before selecting the first entity and relationship of the knowledge graph triple according to the space vectors corresponding to the entities and relationships defined in the current round of knowledge graph ontology, calculating the vector of the last entity, and obtaining the last entity with the top k inference ranking and its scoring score, the method further includes: According to the structured graph data, the spatial vectors corresponding to the entities and relationships defined in the current round of knowledge graph ontology are output.

5. The knowledge graph construction method according to claim 1, characterized in that: The step of taking the structured graph data as input and fusing the historical structured graph data to obtain the current round of structured graph data includes: The entity-entity triples of the structured graph data are completed using the transfer rule, the antisymmetric rule and the entity association rule, and the entity-attribute triples of the structured graph data are completed using the attribute association rule to obtain the knowledge graph after the first completion; Converting entities, attributes, entity relationships and attribute relationships in the first completed knowledge graph into entity embedding vectors, attribute embedding vectors, entity relationship embedding vectors and attribute relationship embedding vectors respectively; Training the entity embedding vector, attribute embedding vector, entity relationship embedding vector, and attribute relationship embedding vector to obtain trained entity embedding vector, attribute embedding vector, entity relationship embedding vector, and attribute relationship embedding vector; Using an entity prediction algorithm, an attribute prediction algorithm, and a relationship prediction algorithm, the trained entity embedding vectors, attribute embedding vectors, entity relationship embedding vectors, and attribute relationship embedding vectors are used to complete the knowledge graph for a second time to obtain a completed knowledge graph; The completed knowledge graph is merged with the historical structured graph data to obtain the current round of structured graph data.

6. A knowledge graph construction device, characterized in that: The device implements the knowledge graph construction method according to claim 1, comprising: An ontology construction module is used to construct and output the current round of knowledge graph ontology based on the historical knowledge graph ontology, wherein the historical knowledge graph ontology includes the knowledge graph ontology output in the previous round of knowledge graph construction process; An information extraction module is used to extract information from source text data according to the standard input and output definition, taking the current round of knowledge graph ontology as input, obtaining and outputting information extraction results, wherein the information extraction results include knowledge graph triples and event multi-tuple data; A knowledge mapping module is used to take the information extraction result as input according to the standard input and output definition, map the information extraction result using the current round of knowledge graph ontology, obtain structured graph data and output it; A knowledge fusion module is used to take the structured graph data as input according to the standard input and output definition, fuse the historical structured graph data, obtain the current round of structured graph data and output it, wherein the historical structured graph data includes the structured graph data output after verification in the previous round of knowledge graph construction process; The knowledge verification module is used to take the current round of structured graph data as input according to the standard input and output definition, verify the current round of structured graph data, obtain the final structured graph data and output it.

7. A knowledge graph construction device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.