A domain knowledge graph construction method and system based on large model iterative enhancement, a terminal, and a medium
Patent Information
- Application Number
- CN202610994039.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-06
AI Technical Summary
[0004]然而,尽管大语言模型在通用语料上展现出强大的语言理解和生成能力,其在特定领域知识图谱构建中的性能往往未达实用要求,常需大量微调工作
[0016]有益效果:与现有技术相比,本发明提供了一种基于大模型迭代增强的领域知识图谱构建方法,首先基于通用领域知识图谱构建通用领域指令微调数据集,基于通用领域指令微调数据集对大语言模型进行微调,得到通用知识图谱构建大模型,并对通用知识图谱构建大模型进行迭代式微调,得到专有领域知识图谱构建大模型。然后,基于专有领域知识图谱构建大模型对专有领域文本进行抽取,得到五元组集合,所述五元组集合反映了专有领域的实体、实体之间的关系以及属性描述。接着,基于所述五元组集合中专有领域的实体与属性描述,使用扩散模型,生成语义相关图像,并将所述语义相关图像作为增强知识。最后,基于所述五元组集合与所述增强知识生成图数据库可执行的操作语言,并基于所述操作语言实现专有领域知识图谱的自动化构建。
Smart Images

Figure CN122547986B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, and in particular to a method, system, terminal, and medium for constructing a domain knowledge graph based on large model iterative enhancement. Background Technology
[0002] With the rapid development of artificial intelligence technology, knowledge graphs, as an efficient way of organizing information, have demonstrated significant value in multiple fields. However, traditional text-based knowledge graph construction methods often face challenges such as difficulties in data acquisition, inaccurate entity and relation extraction, and limited semantic understanding and expression capabilities.
[0003] Large Language Models (LLMs) can effectively extract structured knowledge from data of different formats by following predefined instructions, and can achieve domain transfer through continuous learning, making them highly suitable for knowledge extraction tasks. Agents built on large models can perceive and understand multimodal data and invoke external tools, endowing large models with the ability to interact with their environment.
[0004] However, despite the powerful language understanding and generation capabilities of large language models on general corpora, their performance in building knowledge graphs in specific domains often falls short of practical requirements, often requiring extensive fine-tuning.
[0005] Therefore, existing technologies still have shortcomings. Summary of the Invention
[0006] The technical problem to be solved by this invention is to provide a domain knowledge graph construction system, method, terminal, and medium based on large model iterative enhancement, addressing the aforementioned deficiencies of existing technologies. The technical solution adopted by this invention is as follows: In a first aspect, the present invention provides a method for constructing a domain knowledge graph based on large-model iterative enhancement, the method comprising: A general domain instruction fine-tuning dataset is constructed based on a general domain knowledge graph. The large language model is then fine-tuned based on the general domain instruction fine-tuning dataset to obtain a large model for constructing a general knowledge graph. Finally, the large model for constructing a general knowledge graph is iteratively fine-tuned to obtain a large model for constructing a proprietary domain knowledge graph. A large model is constructed based on a domain-specific knowledge graph to extract domain-specific text, resulting in a set of quintuples. The set of quintuples reflects the entities in the domain, the relationships between entities, and attribute descriptions. Based on the entity and attribute descriptions of the domain in the quintuple set, a diffusion model is used to generate semantically related images, and these semantically related images are used as augmented knowledge. An executable operation language based on the set of quintuples and the enhanced knowledge generation graph database is used to automatically construct a domain-specific knowledge graph.
[0007] In one implementation, a general knowledge graph construction model is iteratively fine-tuned to obtain a domain-specific knowledge graph construction model, including: A domain-specific dataset is constructed, and the original corpus in the domain-specific dataset is input into a general knowledge graph to construct a large model for coarse knowledge extraction, resulting in coarsely extracted tuples. The original corpus consists of unlabeled domain text in the domain-specific dataset. Based on the coarsely extracted tuples, a domain-specific instruction fine-tuning dataset is constructed, and the general knowledge graph construction model is fine-tuned based on the domain-specific instruction fine-tuning dataset to obtain the domain-specific knowledge graph construction model.
[0008] In one implementation, a domain-specific instruction fine-tuning dataset is constructed based on the coarse-extracted tuples, including: Based on the filtering rules, non-domain entities and invalid entity relationships in the coarsely extracted tuples are filtered to obtain the filtered coarsely extracted tuples. The missing attribute descriptions in the filtered coarsely extracted tuples are supplemented, and erroneous entity relations in the filtered coarsely extracted tuples are corrected. A domain-specific instruction fine-tuning dataset is then constructed.
[0009] In one implementation, based on the domain-specific entity and attribute descriptions in the quintuple set, a diffusion model is used to generate semantically related images, including: The domain-specific entity and attribute descriptions in the quintuple set are input as prompt words into the diffusion model; Based on the diffusion model, cross-modal mapping is performed to generate semantically related images, wherein the semantically related images are images corresponding to entities in a proprietary domain. If the proprietary domain is the medical domain, then the entities include organs and diseases, and the corresponding semantically related images include images of organs and diseases.
[0010] In one implementation, the executable language based on the quintuple set and the enhanced knowledge generation graph database includes: Construct intelligent agents based on graph databases; Based on the agent, the set of quintuples and the augmented knowledge are traversed according to the data structure rules of the graph database to generate an executable operating language for the graph database.
[0011] In one implementation, based on the agent traversing the set of quintuples and the enhanced knowledge according to the data structure rules of the graph database, an executable language for the graph database is generated, including: Based on the agent, entity and attribute descriptions of the domain-specific quintuple set are extracted from the agent and combined with semantically related images in the augmented knowledge to generate entity node creation statements. Based on the relationships between entities in the quintuple set, generate a relation creation statement; Based on the entity node creation statement and the relationship creation statement, an executable operation language for the graph database is obtained.
[0012] In one implementation, the automated construction of a domain-specific knowledge graph is achieved based on the operating language, including: The agent executes the operation language by calling the graph database interface. Based on the entity node creation statement and relation creation statement in the operation language, the entity nodes and relations are created, and the attribute descriptions are assigned values to obtain a domain-specific knowledge graph. The assigned attribute descriptions include image links of semantically related images.
[0013] Secondly, embodiments of the present invention also provide a domain knowledge graph construction system based on large model iterative enhancement, the system being used to implement the steps of the domain knowledge graph construction method based on large model iterative enhancement as described in any of the above schemes, the system comprising: The proprietary domain large model construction module is used to construct a general domain instruction fine-tuning dataset based on a general domain knowledge graph, fine-tune a large language model based on the general domain instruction fine-tuning dataset to obtain a general knowledge graph construction large model, and iteratively fine-tune the general knowledge graph construction large model to obtain a proprietary domain knowledge graph construction large model. The domain knowledge extraction module is used to extract domain text based on a large model constructed from a domain knowledge graph, resulting in a set of quintuples. The set of quintuples reflects the entities in the domain, the relationships between entities, and attribute descriptions. The knowledge enhancement module is used to generate semantically related images based on the entity and attribute descriptions of the domain in the quintuple set, using a diffusion model, and to use the semantically related images as enhanced knowledge. A proprietary domain knowledge graph construction module is used to automatically construct a proprietary domain knowledge graph based on the executable operation language of the quintuple set and the enhanced knowledge generation graph database, and based on the operation language.
[0014] Thirdly, embodiments of the present invention also provide a terminal, wherein the terminal includes a memory, a processor, and a domain knowledge graph construction program based on large model iteration enhancement stored in the memory and executable on the processor. When the processor executes the domain knowledge graph construction program based on large model iteration enhancement, it implements the steps of the domain knowledge graph construction method based on large model iteration enhancement of any of the above schemes.
[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a domain knowledge graph construction program based on large model iterative enhancement, the domain knowledge graph construction program based on large model iterative enhancement implements the steps of the domain knowledge graph construction method based on large model iterative enhancement as described in any of the above schemes on the computer-readable storage medium.
[0016] Beneficial Effects: Compared with existing technologies, this invention provides a domain knowledge graph construction method based on large-scale model iterative enhancement. First, a general domain instruction fine-tuning dataset is constructed based on a general domain knowledge graph. A large language model is then fine-tuned using this dataset to obtain a large general knowledge graph construction model. This model is then iteratively fine-tuned to obtain a large domain-specific knowledge graph construction model. Next, domain-specific text is extracted using the large domain-specific knowledge graph construction model to obtain a set of quintuples. These quintuples reflect the entities, relationships between entities, and attribute descriptions within the domain. Then, based on the domain-specific entity and attribute descriptions in the quintuples, a diffusion model is used to generate semantically relevant images, which are then used as augmented knowledge. Finally, an executable operating language is generated based on the quintuples and the augmented knowledge graph database, and the automated construction of the domain-specific knowledge graph is achieved using this operating language.
[0017] This invention enhances knowledge extraction capabilities by fine-tuning a large language model, then performs multimodal completion on the extraction results based on knowledge enhancement methods, and finally achieves interaction with a graph database. This optimizes the traditional knowledge graph construction process, retains the advantages of large language models in semantic extraction, and solves the problem of incomplete knowledge representation through multimodal completion, thus realizing the automated construction of knowledge graphs. Attached Figure Description
[0018] Figure 1 A flowchart of a preferred embodiment of the domain knowledge graph construction method based on large model iterative enhancement provided in this invention.
[0019] Figure 2 This is a schematic diagram of the technical process of the domain knowledge graph construction method based on large model iterative enhancement provided in an embodiment of the present invention.
[0020] Figure 3 This is a schematic diagram of the principle framework of a domain knowledge graph construction system based on large model iterative enhancement provided in an embodiment of the present invention.
[0021] Figure 4 A schematic diagram of a terminal provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0023] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content, operations, or steps, nor does it require execution in the described order. For example, some operations or steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0024] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0025] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. For example, "first control information" and "second control information" are only used to distinguish different control information and do not limit their order.
[0026] Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or the order of execution, and that the words "first" and "second" do not necessarily imply that they are different.
[0027] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0028] To address the problems of existing technologies, this embodiment provides a domain knowledge graph construction method based on large-scale model iterative enhancement. This method improves the efficiency and quality of knowledge graph construction, reduces the need for manual intervention, and can be quickly transferred to knowledge graph construction tasks in specific domains. In specific applications, this embodiment first constructs a general domain instruction fine-tuning dataset based on a general domain knowledge graph. Based on this dataset, a large language model is fine-tuned to obtain a general knowledge graph construction model. This model is then iteratively fine-tuned to obtain a specific domain knowledge graph construction model. Next, based on the specific domain knowledge graph construction model, specific domain text is extracted to obtain a set of quintuples. These quintuple sets reflect the entities, relationships between entities, and attribute descriptions within the specific domain. Then, based on the entity and attribute descriptions within the quintuple sets, a diffusion model is used to generate semantically relevant images, which are then used as augmented knowledge. Finally, based on the quintuple sets and the augmented knowledge, an executable operating language is generated from the graph database, and the automated construction of the specific domain knowledge graph is achieved using this operating language.
[0029] The domain knowledge graph construction method based on large model iteration enhancement in this embodiment can be applied to terminals, including intelligent products such as computers. Furthermore, in practical applications, the terminal can be equipped with intelligent agents. An intelligent agent refers to an artificial entity with intention and action capabilities, capable of using sensors to perceive its surrounding environment, making decisions, and using actuators to take corresponding actions. For example, an intelligent agent based on a large language model can improve its reasoning and planning abilities through techniques such as thought chains and problem decomposition. It can also learn from feedback and execute new actions to gain the ability to interact with the environment, providing possibilities for tool invocation. Specifically, such as... Figure 1 As shown in the figure, the domain knowledge graph construction method based on large model iteration enhancement in this embodiment includes the following steps: Step S100: Construct a general domain instruction fine-tuning dataset based on the general domain knowledge graph, fine-tune the large language model based on the general domain instruction fine-tuning dataset to obtain a general knowledge graph construction model, and iteratively fine-tune the general knowledge graph construction model to obtain a specific domain knowledge graph construction model.
[0030] Knowledge graph construction encompasses multiple technical aspects, including knowledge extraction and knowledge fusion. Knowledge extraction, a fundamental step, involves extracting knowledge from multi-source data and storing it in the knowledge graph, primarily including entity recognition and relation extraction. In practical applications, it is combined with... Figure 2As shown in the figure, this embodiment first constructs a general domain instruction fine-tuning dataset based on a general domain knowledge graph. This general domain instruction fine-tuning dataset includes 12 general domains: people, geographical regions, building structures, works, organisms, man-made objects, natural sciences, organizations, transportation, events, astronomical objects, and medicine (specifically as follows). Figure 2 The knowledge extraction topics (General Domain 1, General Domain 2, General Domain 3, etc.) cover the vast majority of general domain knowledge extraction tasks, forming supervised data for general domain knowledge extraction. In this embodiment, the large language model selects the Transformer model with a single decoder, which has excellent dialogue and language understanding capabilities. After constructing the general domain instruction fine-tuning dataset, this embodiment uses the general domain instruction fine-tuning dataset to fine-tune the parameters of the large language model. The fine-tuning parameters are set as follows: lora_rank (rank in the low-rank matrix) = 64, lora_dropout = 0.05, training steps of 12,000 steps, and learning rate of 0.01. The principle of lora_dropout is to randomly drop some neurons in the model with a certain probability during training, thereby avoiding co-adaptation between neurons and improving the generalization ability of the model. The core logic of fine-tuning the parameters of a large language model is to freeze the pre-trained parameters in the large language model, insert a low-rank matrix, train only a small number of parameters, reduce training overhead, and thus obtain a general knowledge graph construction model. This general knowledge graph construction model can stably extract a structured set of quintuples from the input text. Furthermore, after constructing the general knowledge graph construction model, this embodiment can also evaluate it based on three evaluation metrics: node coverage completeness, precision, and recall. Node coverage completeness is evaluated by comparing the number of entities output by the general knowledge graph construction model with the number of manually labeled entities, assessing the coverage completeness of entities in a specific general domain.
[0031] Furthermore, after obtaining the general knowledge graph construction model, this embodiment iteratively fine-tunes the general knowledge graph construction model to obtain a domain-specific knowledge graph construction model. Specifically, this embodiment first constructs a domain-specific dataset. Taking the medical field as an example, the domain-specific dataset can be constructed based on medical literature. Then, the original corpus in the domain-specific dataset is input into the general knowledge graph construction model for coarse knowledge extraction, resulting in coarsely extracted tuples. The original corpus consists of unlabeled domain text in the domain-specific dataset. Next, a domain-specific instruction fine-tuning dataset is constructed based on the coarsely extracted tuples. Specifically, this embodiment can filter out non-domain entities and invalid entity relationships in the coarsely extracted tuples based on filtering rules, obtaining filtered coarsely extracted tuples. Then, missing attribute descriptions in the filtered coarsely extracted tuples are supplemented, and erroneous entity relationships in the filtered coarsely extracted tuples are corrected, thereby constructing the domain-specific instruction fine-tuning dataset. After obtaining the domain-specific instruction fine-tuning dataset, this embodiment can fine-tune the general knowledge graph construction model based on the domain-specific instruction fine-tuning dataset to obtain the domain-specific knowledge graph construction model. Therefore, this embodiment uses an iterative mechanism of "coarse extraction → filtering → retraining" to construct the domain-specific knowledge graph construction model. This iterative mechanism can be summarized in three parts: 1. Using the general knowledge graph construction model to coarsely extract knowledge from the original domain corpus; 2. Filtering low-quality results to construct the domain-specific instruction fine-tuning dataset; 3. Retraining the general knowledge graph construction model based on the domain-specific instruction fine-tuning dataset to obtain the domain-specific knowledge graph construction model, thus improving the domain-specific knowledge extraction performance and laying the foundation for subsequent knowledge augmentation and knowledge graph construction.
[0032] Step S200: Based on the domain knowledge graph, a large model is constructed to extract domain text and obtain a set of quintuples. The set of quintuples reflects the entities in the domain, the relationships between entities, and attribute descriptions.
[0033] After constructing a large-scale model using a domain-specific knowledge graph, this embodiment can utilize the domain-specific knowledge graph model to extract domain-specific text, obtaining a set of quintuples. The set of quintuples in this embodiment is represented as follows: ,in This represents the entity set corresponding to a specific domain. and These represent two entities within the same proprietary domain; for example, in the medical field, the entities are organs and diseases. Represents the set of directed relations between entities, where This indicates the relationship between two entities within that proprietary domain. A set of attribute descriptions representing an entity. and These represent attribute descriptions of two entities within the proprietary domain. These descriptions can be text or other modal information, such as a textual description of an organ or a disease in the medical field.
[0034] Step S300: Based on the entity and attribute descriptions of the domain in the quintuple set, a diffusion model is used to generate semantically related images, and the semantically related images are used as augmented knowledge.
[0035] Specifically, in this embodiment, the domain-specific entities and attribute descriptions in the quintuple set are input as prompt words into the diffusion model. Then, cross-modal mapping is performed based on the diffusion model to generate semantically relevant images, providing visual completion for knowledge. These semantically relevant images are images corresponding to entities within the domain. For example, if the domain is medicine, the entities include organs and diseases, and the corresponding semantically relevant images include images of organs and diseases. In practical applications, the diffusion model in this embodiment can be the Stable Diffusion model, an open-source latent diffusion model, primarily positioned as a text-driven multimodal generation tool. Based on this Stable Diffusion model, text entity prompts can be transformed into visual content, accurately capturing detailed features within entities. This allows for the generation of semantically relevant images through a cross-modal mapping mechanism. The generated images can compensate for the shortcomings of traditional knowledge graphs that rely solely on text and lack complete representation, providing visual supplements for subsequent graphs and offering more intuitive, multi-dimensional knowledge representations for downstream tasks.
[0036] Step S400: Based on the set of five tuples and the executable operation language of the enhanced knowledge generation graph database, and based on the operation language, realize the automated construction of the domain knowledge graph.
[0037] Specifically, this embodiment first constructs an intelligent agent based on a graph database. Then, based on the intelligent agent, it traverses the quintuple set and the enhanced knowledge according to the data structure rules of the graph database to generate an executable operation language for the graph database. In this embodiment, the graph database is Neo4j, a graph database written in Java. The corresponding executable operation language for the graph database is Cypher, a declarative graph query language specific to Neo4j. When generating the executable operation language for the graph database, the intelligent agent in this embodiment automatically extracts domain-specific entities (such as...) from the quintuple set. ) and attribute description ( Combining semantically relevant images from enhanced knowledge, an entity node creation statement is generated. Taking the medical field as an example, the generated entity node creation statement is: `CREATE (:MedicalEntity {name: "Trisomy 18 syndrome", type: "chromosomal disease", image: "generate image link"})`. This embodiment can also generate a relation creation statement based on the relationships between entities in the quintuple set. For example, the generated relation creation statement is: `CREATE ((a)-[:symptoms]->(b))`. Finally, based on the entity node creation statement and the relation creation statement, an executable operation language for the graph database is obtained.
[0038] After obtaining an executable operation language for the graph database, this embodiment can automatically construct a domain-specific knowledge graph based on the operation language. Specifically, this embodiment executes the operation language by having the agent call the graph database's interface. Then, based on the entity node creation statements and relation creation statements in the operation language, the entity nodes and relations are created, and attribute descriptions are assigned values to obtain the domain-specific knowledge graph. The assigned attribute descriptions include image links to semantically related images. Therefore, this embodiment simplifies the construction process of the domain-specific knowledge graph by generating an executable operation language for the graph database and directly manipulating the graph database. Thus, this embodiment utilizes the powerful semantic understanding capabilities of a large language model for knowledge extraction, leverages a multimodal agent for semantic completion, and achieves efficient knowledge graph construction through interaction between the agent and the Neo4j graph database.
[0039] The method in this embodiment can be successfully applied to the construction of medical knowledge graphs. Furthermore, the method in this embodiment performs well in knowledge extraction tasks. It can generate multimodal knowledge graphs in graph databases based on quintuple sets and augmented knowledge through intelligent agents, greatly simplifying the construction process and providing more accurate and comprehensive knowledge representation and reasoning capabilities.
[0040] Based on the above embodiments, the present invention also provides a domain knowledge graph construction system based on large model iterative enhancement, the system being used to implement the steps in the above method embodiments. Specifically, as Figure 3As shown, the system in this embodiment includes: a domain-specific large model construction module 10, a domain-specific knowledge extraction module 20, a knowledge enhancement module 30, and a domain-specific knowledge graph construction module 40. Specifically, the domain-specific large model construction module 10 is used to construct a general domain instruction fine-tuning dataset based on a general domain knowledge graph, fine-tune a large language model based on the general domain instruction fine-tuning dataset to obtain a general knowledge graph construction large model, and iteratively fine-tune the general knowledge graph construction large model to obtain a domain-specific knowledge graph construction large model. The domain-specific knowledge extraction module 20 is used to extract domain-specific text based on the domain-specific knowledge graph construction large model to obtain a set of quintuples, which reflects the entities, relationships between entities, and attribute descriptions of the domain. The knowledge enhancement module 30 is used to generate semantically relevant images based on the domain-specific entity and attribute descriptions in the quintuple set using a diffusion model, and uses the semantically relevant images as enhanced knowledge. The proprietary domain knowledge graph construction module 40 is used to automatically construct the proprietary domain knowledge graph based on the executable operation language of the quintuple set and the enhanced knowledge generation graph database, and based on the operation language.
[0041] The domain knowledge graph construction system based on large model iteration enhancement in this embodiment is based on the same principle as the steps in the above method embodiments, and will not be elaborated further here.
[0042] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 4 As shown. The terminal may include one or more processors 100 ( Figure 4 (Only one is shown in the image), memory 101, and computer program 102 stored in memory 101 and executable on one or more processors 100. For example, a domain knowledge graph construction program based on large model iteration enhancement. When one or more processors 100 execute computer program 102, they can implement the various steps in the embodiment of the domain knowledge graph construction method based on large model iteration enhancement. Alternatively, when one or more processors 100 execute computer program 102, they can implement the functions of various modules / units in the embodiment of the domain knowledge graph construction system based on large model iteration enhancement, which is not limited here.
[0043] In one embodiment, the processor 100 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0044] In one embodiment, memory 101 may be an internal storage unit of an electronic device, such as a hard drive or RAM. Memory 101 may also be an external storage device of the electronic device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital Card (SD), or Flash Card. Furthermore, memory 101 may include both internal and external storage units. Memory 101 is used to store computer programs and other programs and data required by the terminal. Memory 101 can also be used to temporarily store data that has been output or will be output.
[0045] Those skilled in the art will understand that Figure 4 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0046] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), direct memory bus RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0047] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a domain knowledge graph based on large-model iterative enhancement, characterized in that, The method includes: A general domain instruction fine-tuning dataset is constructed based on a general domain knowledge graph. The large language model is then fine-tuned based on the general domain instruction fine-tuning dataset to obtain a large model for constructing a general knowledge graph. Finally, the large model for constructing a general knowledge graph is iteratively fine-tuned to obtain a large model for constructing a proprietary domain knowledge graph. A large model is constructed based on a domain-specific knowledge graph to extract domain-specific text, resulting in a set of quintuples. The set of quintuples reflects the entities in the domain, the relationships between entities, and attribute descriptions. Based on the entity and attribute descriptions of the domain in the quintuple set, a diffusion model is used to generate semantically related images, and these semantically related images are used as augmented knowledge. Based on the set of five tuples and the executable operation language of the enhanced knowledge generation graph database, and based on the operation language, the automated construction of a domain-specific knowledge graph is realized; Iterative fine-tuning of the general knowledge graph construction model yields a domain-specific knowledge graph construction model, including: A domain-specific dataset is constructed, and the original corpus in the domain-specific dataset is input into a general knowledge graph to construct a large model for coarse knowledge extraction, resulting in coarsely extracted tuples. The original corpus consists of unlabeled domain text in the domain-specific dataset. Based on the coarsely extracted tuples, a domain-specific instruction fine-tuning dataset is constructed, and the general knowledge graph construction model is fine-tuned based on the domain-specific instruction fine-tuning dataset to obtain the domain-specific knowledge graph construction model. Based on the coarsely extracted tuples, a domain-specific instruction fine-tuning dataset is constructed, including: Based on the filtering rules, non-domain entities and invalid entity relationships in the coarsely extracted tuples are filtered to obtain the filtered coarsely extracted tuples. The missing attribute descriptions in the filtered coarsely extracted tuples are supplemented, and the erroneous entity relations in the filtered coarsely extracted tuples are corrected. A domain-specific instruction fine-tuning dataset is constructed. Based on the domain-specific entity and attribute descriptions in the aforementioned quintuple set, a diffusion model is used to generate semantically relevant images, including: The domain-specific entity and attribute descriptions in the quintuple set are input as prompt words into the diffusion model; Cross-modal mapping is performed based on the diffusion model to generate semantically relevant images, wherein the semantically relevant images are images corresponding to entities in a proprietary domain.
2. The domain knowledge graph construction method based on large model iterative enhancement according to claim 1, characterized in that, An executable language based on the set of quintuples and the enhanced knowledge generation graph database includes: Construct intelligent agents based on graph databases; Based on the agent, the set of quintuples and the augmented knowledge are traversed according to the data structure rules of the graph database to generate an executable operating language for the graph database.
3. The domain knowledge graph construction method based on large model iterative enhancement according to claim 2, characterized in that, Based on the agent's traversal of the quintuple set and the enhanced knowledge according to the data structure rules of the graph database, an executable language for the graph database is generated, including: Based on the agent, entity and attribute descriptions of the domain-specific quintuple set are extracted from the agent and combined with semantically related images in the augmented knowledge to generate entity node creation statements. Based on the relationships between entities in the quintuple set, generate a relation creation statement; Based on the entity node creation statement and the relationship creation statement, an executable operation language for the graph database is obtained.
4. The domain knowledge graph construction method based on large model iterative enhancement according to claim 3, characterized in that, The automated construction of domain-specific knowledge graphs based on the aforementioned operating language includes: The agent executes the operation language by calling the graph database interface. Based on the entity node creation statement and relation creation statement in the operation language, the entity nodes and relations are created, and the attribute descriptions are assigned values to obtain a domain-specific knowledge graph. The assigned attribute descriptions include image links of semantically related images.
5. A domain knowledge graph construction system based on large model iterative enhancement, characterized in that, The system is used to implement the steps of the domain knowledge graph construction method based on large model iterative enhancement as described in any one of claims 1-4, and the system includes: The proprietary domain large model construction module is used to construct a general domain instruction fine-tuning dataset based on a general domain knowledge graph, fine-tune a large language model based on the general domain instruction fine-tuning dataset to obtain a general knowledge graph construction large model, and iteratively fine-tune the general knowledge graph construction large model to obtain a proprietary domain knowledge graph construction large model. The domain knowledge extraction module is used to extract domain text based on a large model constructed from a domain knowledge graph, resulting in a set of quintuples. The set of quintuples reflects the entities in the domain, the relationships between entities, and attribute descriptions. The knowledge enhancement module is used to generate semantically related images based on the entity and attribute descriptions of the domain in the quintuple set, using a diffusion model, and to use the semantically related images as enhanced knowledge. A proprietary domain knowledge graph construction module is used to automatically construct a proprietary domain knowledge graph based on the executable operation language of the quintuple set and the enhanced knowledge generation graph database, and based on the operation language.
6. A terminal, characterized in that, The terminal includes a memory, a processor, and a domain knowledge graph construction program based on large model iteration enhancement stored in the memory and executable on the processor. When the processor executes the domain knowledge graph construction program based on large model iteration enhancement, it implements the steps of the domain knowledge graph construction method based on large model iteration enhancement as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a domain knowledge graph construction program based on large model iterative enhancement, and the domain knowledge graph construction program based on large model iterative enhancement implements the steps of the domain knowledge graph construction method based on large model iterative enhancement as described in any one of claims 1-4 on the computer-readable storage medium.
Citation Information
Patent Citations
Multi-modal knowledge graph construction method and device, server and storage medium
CN110472107A
Knowledge graph construction method and device for target culture resources and electronic equipment
CN119539044A