Knowledge extraction system and knowledge extraction method based on large language model algorithm

Through the combination of modular architecture and external knowledge base, large language model algorithms are used to eliminate noise data, solving the accuracy and consistency problems of the knowledge extraction system when introducing domain background knowledge, achieving more efficient knowledge extraction and storage, and adapting to needs in professional fields.

CN118551840BActive Publication Date: 2024-10-29HUNAN HUISHIWEI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411007623.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-10-29
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Existing knowledge extraction systems are prone to interference from noisy data when introducing domain background knowledge, and fail to give full play to the context learning capabilities of large language models. Moreover, the integration of the system and LLM is not tight enough, resulting in insufficient accuracy and consistency in knowledge extraction. It performs poorly especially in the highly specialized medical field.

Method used

A knowledge extraction system based on large language model algorithm is designed. Through the modular architecture of data collection, filtering, extraction, disambiguation and storage layers, combined with external knowledge base, context learning algorithm is used to eliminate noisy data and realize the integration of entities and relationships. Accurate extraction and disambiguation, and build knowledge graphs to improve the accuracy and consistency of knowledge extraction.

Benefits of technology

It improves the accuracy and consistency of the knowledge extraction system, enhances the utilization of domain background knowledge, reduces the impact of noisy data, achieves more efficient knowledge extraction and storage, and adapts to real-time changing task requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551840B_ABST
    Figure CN118551840B_ABST
Patent Text Reader

Abstract

The present application discloses a knowledge extraction system and a knowledge extraction method based on a large language model algorithm, wherein the knowledge extraction system based on the large language model algorithm includes a data collection and cleaning module, an entity and relationship extraction module, an entity disambiguation and alignment module, and a knowledge storage module, which are respectively arranged in a data collection layer, a data filtering layer, a knowledge extraction layer, a knowledge disambiguation layer, and a knowledge storage layer, for realizing knowledge extraction and dynamically evaluating the actual demand for an external knowledge base during the knowledge extraction process, thereby improving the efficiency of knowledge extraction and outputting higher quality extraction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of semantic analysis, and in particular, relates to a knowledge extraction system and a knowledge extraction method based on a large language model algorithm. Background Art

[0002] In the field of software communication, especially in the medical field, the effective extraction and management of knowledge has always been an important technical problem. With the explosive growth of data, unstructured, semi-structured and structured data coexist. How to efficiently and accurately extract knowledge from these multi-source heterogeneous data has become an urgent problem to be solved. Traditional knowledge extraction methods are often limited by the diversity and complexity of data sources, resulting in low extraction efficiency. At the same time, the extracted knowledge has problems such as low accuracy and consistency. Therefore, how to build a system that can comprehensively collect multi-source data, accurately extract knowledge, effectively eliminate ambiguity and ensure knowledge consistency has become an important direction of current technological development.

[0003] In recent years, with the advent of ChatGPT (Chat Generative Pre-trained Transformer), large language model algorithms have attracted widespread attention. Inspired by it, many scholars have applied large language model algorithms to knowledge extraction tasks in an attempt to alleviate the challenges faced by traditional knowledge extraction systems. Although large language model algorithms can more flexibly adapt to the knowledge extraction needs of general fields, they still face major challenges in the application of knowledge extraction in specific fields. In the process of combining with the large language model algorithm in the general field, the knowledge extraction system lacks a candidate database composed of background knowledge in the professional field, resulting in poor output of the system. For medical field data with strong professionalism and high complexity, it is difficult for the large language model algorithm to accurately extract the knowledge therein. In addition, although the large language model algorithm can update its own knowledge base through fine-tuning, it is difficult to adapt to real-time changing knowledge extraction tasks because fine-tuning requires a lot of time and computing resources.

[0004] In recent years, many knowledge extraction systems have been released at home and abroad, among which typical representatives include DeepDive, NELL, YAGO and other systems. DeepDive is an open source knowledge extraction system developed by Stanford University. The system is based on the probabilistic inference method, manually extracts a large number of features, and uses the factor graph model to classify candidate entities and candidate relationships. NELL (Never-Ending Language Learning) was developed by Carnegie Mellon University and is a real-time knowledge extraction system for continuous learning. The system is based on the Bootstrapping idea and intermittent manual intervention method. It uses coupled pattern learners, coupled scalable chain data extraction and annotation, coupled morphological classifiers, rule learners, etc. to extract knowledge from multiple sources, output candidate fact pairs respectively, and finally complete high-confidence knowledge access through the knowledge integrator and store them in standard facts. YAGO (Yet Another Great Ontology) is a large-scale semantic knowledge extraction system. The system is based on the Resource Description Framework model. The Wikipedia database is expanded on the basis of WordNet Schema (RDFS), and the hierarchical structure of WordNet is used to map the catalog information of Wikipedia to the hierarchical structure of WordNet, so as to extract the Is-A hierarchy of classification and the semantic relationship between entities.

[0005] In recent years, with the rise of large language model algorithms, scholars have begun to try to combine them with entity extraction, and are committed to utilizing their semantic understanding capabilities. Many studies have tried to integrate large language model algorithms such as ChatGPT and InstructGPT-3 with entity extraction tasks, explore potential applications in this task, and have achieved certain breakthroughs. These models have shown amazing potential in understanding long texts, capturing rich contexts, and modeling entity relationships, bringing new ideas and performance improvements to entity extraction tasks. Chen et al. proposed a context-based learning method that regards the pre-trained model as a meta-function, takes instructions, samples, and text as input, and outputs the results of named entity recognition, thereby achieving rapid recognition of new entities, thereby effectively alleviating the problem that traditional entity extraction methods perform poorly under small samples. However, the actual application and effect of large language model algorithms in entity extraction are still under continuous research and exploration.

[0006] Since the advent of LLM (Large Language Model), many scholars have tried to apply LLM to knowledge graph engineering, especially in the process of knowledge extraction. However, the current research on combining LLM with knowledge extraction systems is still insufficient. There are problems such as the introduction of candidate databases composed of noisy domain background knowledge, difficulty in updating own knowledge and affecting the recognition of new entities, and defects in the pipeline extraction and joint extraction processes. The following are the main problems.

[0007] (1) When traditional knowledge extraction systems introduce domain background knowledge, they are disturbed by noisy data and fail to give full play to the contextual learning ability of LLM. LLM is pre-trained based on general domain data sets and lacks background knowledge in professional domains. Therefore, when faced with highly professional knowledge extraction tasks in the medical field, it is easily affected by the introduction of irrelevant or low-quality background knowledge, mistaking false correlation knowledge for facts, resulting in hallucinations.

[0008] (2) The knowledge extraction system is not tightly integrated with the LLM. When the knowledge extraction system uses the LLM for semantic understanding and information extraction, it often lacks an effective interactive interface and feedback mechanism, which results in the semantic understanding ability of the LLM not being fully utilized, thus limiting the accuracy of the knowledge extraction system. Summary of the invention

[0009] The embodiments of the present application provide a knowledge extraction system and a knowledge extraction method based on a large language model algorithm, which can improve the accuracy of the knowledge extraction system.

[0010] In a first aspect, an embodiment of the present application provides a knowledge extraction system based on a large language model algorithm, wherein the knowledge extraction system comprises a data collection layer, a data filtering layer, a knowledge extraction layer, a knowledge disambiguation layer and a knowledge storage layer which are sequentially arranged so that data input into the knowledge extraction system passes through them sequentially, and further comprises:

[0011] A data collection and cleaning module is used to collect, fuse and process heterogeneous data from different data sources in the candidate database to obtain processed data, and the data collection and cleaning module is arranged in the data collection layer and the data filtering layer;

[0012] An entity and relationship extraction module, connected to the data collection and cleaning module, for extracting entities and relationships of the processed data from the processed data based on the large language model algorithm, and determining whether to introduce an external knowledge base into the candidate database based on the complexity of the entity, and obtaining knowledge triples of the processed data, wherein the entity and relationship extraction module is arranged in the knowledge extraction layer;

[0013] An entity disambiguation and alignment module, connected to the entity and relation extraction module, for obtaining the anaphoric entity in the entity, disambiguating the anaphoric entity, and performing entity pre-alignment, the entity disambiguation and alignment module being arranged in the knowledge disambiguation layer;

[0014] A knowledge storage module, connected to the entity disambiguation and alignment module, is used to construct an ontology model based on the entities and relationships, and to map the disambiguated and aligned knowledge triples into the ontology model, and to organize and store the knowledge triples in the form of a knowledge graph, and to perform semantic matching and similarity calculation on the knowledge triples, thereby outputting a matching knowledge representation form. The knowledge storage module is arranged in the knowledge storage layer.

[0015] Optionally, the data collection layer is configured as:

[0016] The data collection and cleaning module collects heterogeneous data from different data sources in the candidate database, wherein the heterogeneous data types include at least one of text, web pages, and databases, and the heterogeneous data includes at least one of structured, semi-structured, and unstructured data types;

[0017] The data filtering layer is configured as follows:

[0018] By means of the data collection and cleaning module, at least one of data transcription and data cleaning is performed on the collected heterogeneous data to obtain the processed data;

[0019] The knowledge extraction layer is configured as follows:

[0020] Extracting entities and relations of the processed data from the processed data through the entity and relation extraction module;

[0021] The knowledge disambiguation layer is configured as follows:

[0022] By means of the entity disambiguation and alignment module, based on the large language model algorithm, anaphoric entities in the entity are identified and obtained, antecedent entities corresponding to different anaphoric entities are obtained, and the anaphoric entities are linked to the antecedent entities to eliminate ambiguity in the references of different anaphoric entities; and:

[0023] Through the entity disambiguation and alignment module, based on the large language model algorithm, the knowledge triples are aligned with a preset reliable knowledge base to achieve alignment between equivalent entities;

[0024] The knowledge storage layer is configured as follows:

[0025] Through the knowledge storage module, an ontology model and a knowledge graph are constructed based on disambiguated and aligned entities and relationships.

[0026] Optionally, the data collection and cleaning module includes a data collection module, a data preprocessing module and a data cleaning module; wherein:

[0027] The data collection module is arranged in the data collection layer, and includes at least one of a scheduler, a network requester and a parser, and the data collection module can crawl heterogeneous data from different data sources in the candidate database to collect the heterogeneous data;

[0028] The data preprocessing module and the data cleaning module are arranged in the data filtering layer and connected to the data collection module, and are used to perform at least one of data transcription and data cleaning on the heterogeneous data, the data transcription includes at least one of uppercase to lowercase, full-width to half-width, and traditional Chinese to simplified Chinese, and the data cleaning includes at least one of removing hypertext tags, filtering special symbols, and deleting duplicate data.

[0029] Optionally, the entity and relationship extraction module includes an entity extraction module and a relationship extraction module, wherein:

[0030] The entity extraction module is used to obtain entities from the processed data, wherein the entities include specific semantic information and recognize string information based on a large language model algorithm;

[0031] The relationship extraction module is used to extract the relationship between the entities based on the entities through a large language model algorithm;

[0032] The entity extraction module also includes: based on the large language model algorithm, determining the complexity of the entity; if the complexity is higher than a preset threshold, calling the data collection and cleaning module, collecting the external knowledge base based on a similarity calculation algorithm, and adding one or more external knowledge bases to the candidate database based on similarity sorting; based on the relevance, support and availability of the newly added external knowledge base to the target knowledge, evaluating the quality of the newly added external knowledge base, and determining the timing of adding the newly added external knowledge base.

[0033] Optionally, the entity disambiguation and alignment module includes a reference resolution module and an entity alignment module, wherein:

[0034] The reference resolution module is used to determine the antecedent entities corresponding to different anaphoric entities through the large language model algorithm, and link the anaphoric entity to the antecedent entity to eliminate the ambiguity of the references of different anaphoric entities;

[0035] The entity alignment module is used to match and correspond similar entities with different naming methods in different data sources based on the alignment of the knowledge triples with a preset reliable knowledge base through the large language model algorithm, so as to achieve alignment between equivalent entities.

[0036] Optionally, the knowledge storage module includes an ontology model construction module, a knowledge graph construction module and a knowledge matching module, which are used to construct and maintain a knowledge extraction structure; wherein:

[0037] The ontology model building module is used to build an ontology model based on the candidate database and at least one of the extracted entities and relationships, so as to perform structured expression on the extracted knowledge triples, obtain concepts, attributes and relationships in the candidate database, and thus obtain structured knowledge of the candidate database;

[0038] The knowledge graph construction module is used to construct a knowledge graph based on the ontology model, and store and represent the knowledge triples in the form of the knowledge graph, including representing the entities through nodes in the knowledge graph, and edges in the knowledge graph representing the relationships between the entities;

[0039] The knowledge matching module is used to run the knowledge matching algorithm and the graph matching algorithm. Based on the constructed knowledge graph, it uses at least one of the edit distance algorithm and the similarity calculation algorithm to identify the entities in the original data to be extracted from the knowledge, and link and match them to the entities and relationships in the knowledge graph, thereby realizing knowledge extraction and matching.

[0040] In a second aspect, an embodiment of the present application provides a knowledge extraction method based on a large language model algorithm, comprising the following steps:

[0041] Collect, fuse and process heterogeneous data from different data sources in the candidate database to obtain processed data;

[0042] Based on a large language model algorithm, extracting entities and relations of the processed data from the processed data, and obtaining knowledge triples of the processed data;

[0043] Acquire an anaphoric entity in the entity, eliminate the ambiguity of the anaphoric entity, and perform entity pre-alignment;

[0044] Based on the disambiguated and compared entities and relations, an ontology model and a knowledge graph are constructed, knowledge triples are organized and stored in the form of the knowledge graph, and the disambiguated and aligned knowledge triples are mapped to the ontology model;

[0045] Based on the ontology model and the knowledge graph, entities in the original data to be subjected to knowledge extraction are identified to achieve knowledge extraction and matching.

[0046] Optionally, collecting heterogeneous data from different data sources in the candidate database includes at least one of the following steps:

[0047] Collecting the heterogeneous data from different data sources in the candidate database, wherein the heterogeneous data types include at least one of text, web pages, and databases, and the heterogeneous data includes at least one of structured, semi-structured, and unstructured data types;

[0048] The fusion and processing comprises at least one of the following steps:

[0049] Performing data transcription on the collected heterogeneous data, wherein the data transcription includes at least one of uppercase to lowercase, full-width to half-width, and traditional Chinese to simplified Chinese;

[0050] The collected heterogeneous data is cleaned, and the data cleaning includes at least one of removing hypertext tags, filtering special symbols, and deleting duplicate data.

[0051] Optionally, the obtaining of the anaphoric entity in the entity, eliminating the ambiguity of the anaphoric entity, and performing entity pre-alignment comprises at least one of the following steps:

[0052] Determine the antecedent entities corresponding to different anaphoric entities through the large language model algorithm, and link the anaphoric entities to the corresponding antecedent entities to eliminate ambiguity in the references of different anaphoric entities;

[0053] Through the large language model algorithm, the knowledge triples are aligned with the preset reliable knowledge base, similar entities with different naming methods in different data sources are matched and corresponded, and alignment between equivalent entities is achieved.

[0054] Optionally, constructing the ontology model and the knowledge graph based on the disambiguated and compared entities and relationships includes at least one of the following steps:

[0055] Building an ontology model based on the candidate database and at least one of the extracted entities and relationships, wherein the ontology model can at least describe the concepts, attributes and relationships of the candidate database;

[0056] Based on the ontology model, construct the knowledge graph, and store and represent the knowledge triples in the form of the knowledge graph;

[0057] The identifying of entities in the original data to be subjected to knowledge extraction based on the ontology model and the knowledge graph, and implementing knowledge extraction and matching includes at least one of the following steps:

[0058] Perform entity and relationship identification on the original data to be subjected to knowledge extraction, obtain entities, relationships and knowledge triples of the original data, link and match them to entities and relationships in the knowledge graph, organize and store the knowledge triples in the form of a knowledge graph, use the entities as nodes of the knowledge graph, and the relationships between the entities as edges of the knowledge graph, perform semantic matching and similarity calculation on the knowledge triples, and output a matching knowledge representation;

[0059] Nebula Graph and at least one of Neo4j and ArangoDB graph databases are used to support the construction and query of the knowledge graph.

[0060] The knowledge extraction system and method based on the large language model algorithm of the present application, with the help of the context learning algorithm of the large language model algorithm, is combined with an external knowledge base, and the external knowledge base is losslessly embedded into a candidate database containing domain knowledge to improve the existing knowledge extraction method. In addition, the present application adopts a unified framework to integrate the process of pipeline extraction and joint extraction, so that the system can flexibly and efficiently complete the knowledge extraction task, and use natural language processing and machine learning technology to extract structured information and knowledge from text data. In addition, the present application decouples the main modules of the knowledge extraction process, clarifies the main process of the system, designs a large model context learning algorithm, analyzes the research motivation and improvement ideas of the algorithm, and proposes an improved knowledge extraction algorithm, knowledge disambiguation algorithm and hybrid extraction process, which can improve the timeliness and flexibility of the knowledge extraction system. The present application aims to extract the original data to be extracted, that is, the information in the text, more quickly and accurately, and convert it into a form that can be understood and processed by the computer, so as to assist the computer system to better understand the world, make decisions and perform tasks. This application uses the contextual learning ability of the large language model algorithm to design an on-demand matching and self-reflection mechanism to improve the matching degree of the candidate database containing background knowledge, and compensates for the defects of the sub-process by integrating the pipeline extraction and joint extraction processes.

[0061] Through the above improvements, the present application can make more full use of the contextual learning ability of the large language model algorithm and provide more effective domain background knowledge for knowledge extraction tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 This is a main architecture diagram of a knowledge extraction system in an embodiment described in this application;

[0063] Figure 2 A diagram showing the composition of a knowledge extraction system module in an embodiment of the present application;

[0064] Figure 3 This is a main flow chart of a knowledge extraction system in one embodiment described in this application;

[0065] Figure 4 A flow chart of heterogeneous data fusion of a knowledge extraction system in an embodiment described in this application;

[0066] Figure 5 A knowledge extraction flow chart of a knowledge extraction system in an embodiment described in the present application;

[0067] Figure 6 A flow chart for constructing a knowledge graph of a knowledge extraction system in one embodiment described in the present application;

[0068] Figure 7 A diagram showing the difference between a traditional and improved knowledge extraction algorithm in one embodiment of the present application;

[0069] Figure 8 Schematic diagram of an improved entity extraction algorithm in an embodiment described in the present application. DETAILED DESCRIPTION

[0070] The illustrative embodiments of the present application include but are not limited to a knowledge extraction system and a knowledge extraction method based on a large language model algorithm.

[0071] It will be understood that, as used, the term "module" may refer to or include, or be part of, an application specific integrated circuit (ASIC), an electronic circuit, a process (shared, dedicated, or group) and / or memory that executes one or more software or firmware programs, a combinational logic circuit, and / or other appropriate hardware components that provide the described functionality.

[0072] It can be understood that in each embodiment of the present application, the knowledge extraction system and knowledge extraction method based on the large language model algorithm can be implemented by a microprocessor, a digital signal processor, a microcontroller module, etc., and / or any combination thereof.

[0073] The embodiments of the present application will be described in further detail below in conjunction with the accompanying drawings.

[0074] The main architecture diagram of the knowledge extraction system based on the large language model algorithm is as follows Figure 1 As shown in the figure, the system architecture mainly consists of data collection layer, data filtering layer, knowledge extraction layer, knowledge disambiguation layer and knowledge storage layer. Among them, the data collection layer collects multi-source data such as unstructured, semi-structured and structured data to obtain knowledge data related to the required field.

[0075] The data filtering layer is responsible for preprocessing, cleaning, and fusing heterogeneous data from multiple sources of candidate databases, smoothing out noisy data and outliers, and unifying the organization of data. The knowledge extraction layer extracts entities and relationships from multi-source heterogeneous data based on the large language model algorithm, thereby realizing knowledge extraction. The candidate database is related to the required field and contains the required field knowledge.

[0076] The knowledge disambiguation layer uses the large language model algorithm to disambiguate and align the same entities in different data sources through reference resolution and entity alignment to ensure the accuracy and consistency of knowledge. The knowledge storage layer designs the ontology model based on the processing results of the knowledge disambiguation layer, builds the corresponding knowledge graph based on the ontology model, and provides support for application scenarios such as question-answering systems, recommendation systems, and intelligent search through knowledge matching, thereby providing an efficient data access interface.

[0077] The module composition diagram of the knowledge extraction system based on the large language model algorithm is as follows Figure 2 The knowledge extraction system based on the large language model algorithm consists of four modules: data collection and cleaning module, entity and relationship extraction module, entity disambiguation and alignment module, and knowledge storage module.

[0078] The data collection and cleaning module includes data collection, data preprocessing, data cleaning and other modules. This module is responsible for collecting, preprocessing, cleaning and other operations on heterogeneous data from different data sources, so as to output high-quality and clean data.

[0079] The entity and relationship extraction module consists of an entity extraction module and a relationship extraction module. This module aims to use the large language model algorithm to consider the necessity of introducing an external knowledge base in the extraction process, match knowledge in parallel as needed, reflect on the relevance of the matching results, thereby reducing the introduction of noise data, and at the same time, embed the domain background knowledge in the candidate database into the context information losslessly to achieve the extraction of entities and relationships, and then complete knowledge extraction.

[0080] The entity disambiguation and alignment module consists of a coreference resolution module and an entity alignment module. This module collects candidate anaphoric entities and pre-aligned entities, uses a large language model algorithm to identify entity pairs that satisfy equivalence relations, thereby eliminating the ambiguity of anaphoric entities and aligning knowledge triples with a preset reliable knowledge base.

[0081] The knowledge storage module consists of an ontology model building module, a knowledge graph building module, and a knowledge matching model. This module maps the input knowledge triples to the concepts and relationships in the ontology knowledge base, organizes and stores the knowledge in the form of a knowledge graph, and performs semantic matching and similarity calculations on the knowledge triples, thereby outputting the most matching knowledge representation.

[0082] The data collection and cleaning module includes the data collection module, the data preprocessing module and the data cleaning module. It is mainly responsible for acquiring the original data and preprocessing and cleaning it so that subsequent tasks such as entity and relationship extraction, entity disambiguation and alignment can be performed on high-quality data.

[0083] In some embodiments, the data collection module crawls open resources by designing a main control program, a scheduler, a network requester and a parser to obtain the original data set. The dataset consists of structured datasets , semi-structured dataset With unstructured datasets composition.

[0084] The data preprocessing module is responsible for transcribing the data set, achieving preliminary processing and conversion through steps such as uppercase to lowercase, full-width to half-width, traditional Chinese to simplified Chinese, etc., to generate a preprocessed data set , the process design is shown in formula (2.1).

[0085]

[0086] in, Representative The preprocessing operation of the step is to convert uppercase to lowercase , Full-width to half-width operation Converting Traditional Chinese to Simplified Chinese composition.

[0087] The entity and relation extraction module aims to extract entities and relations from text, and then realize the extraction of knowledge triples. This module includes the entity extraction module and the relation extraction module, and completes the knowledge extraction task by integrating the pipeline extraction and joint extraction processes.

[0088] The entity extraction module is used to extract entities with specific semantic information from natural language based on the output results of the data collection and cleaning module. The entity extraction module uses the large language model algorithm to identify character strings using the self-reflection mechanism and language understanding ability of the large language model algorithm. The information of is used to improve the entity extraction algorithm. The extraction process is designed as shown in formula (2.2). Represents a named entity, the entity type representing the entity, Represents the entity extraction result.

[0089]

[0090] The relation extraction module extracts the relationship between entities based on the output of the entity extraction module. The influence of words around entities on entity relationships is analyzed, the dependency information between entities is analyzed, and the relationship between entity pairs is identified. The extraction process is designed as shown in formula (2.3). Indicates relationship, ” represents the functional expression of the extraction relationship.

[0091]

[0092] The entity disambiguation and alignment module aims to eliminate the ambiguity of anaphoric entities and associate entities in different data sources to establish cross-data source associations, thereby providing a solid data foundation for subsequent knowledge storage modules. This module includes the coreference resolution module and the entity alignment module.

[0093] The reference resolution module is responsible for solving the reference problem of the anaphoric entity. For different anaphoric entities, the reference resolution module determines the antecedent entity with the help of a large language model algorithm, thereby eliminating the ambiguity of the reference.

[0094] The entity alignment module is responsible for matching and corresponding entities in different data sources. For similar entities with different naming methods in multi-source datasets, the entity alignment module uses a large language model algorithm to align equivalent entities, thereby unifying the content of the multi-source datasets.

[0095] The knowledge storage module is responsible for building and maintaining the structure of knowledge extraction for subsequent knowledge query and reasoning. The module includes an ontology model construction module, a knowledge graph construction module and a knowledge matching module, wherein the ontology model construction module constructs an ontology model based on domain knowledge and extracted entities, relationships and other information. By constructing an ontology model, the extracted knowledge triples are formally expressed, and the concepts, attributes and relationships in the candidate database are described, thereby organizing knowledge in a structured manner. Based on the ontology model, the knowledge graph construction module stores and represents the structured knowledge triples in the form of a graph. Entities are represented by nodes, and the relationships between entities are represented by edges, thereby representing and organizing rich semantic information and association relationships in the knowledge graph structure to provide support for complex knowledge query and reasoning. The knowledge matching module is used to run the knowledge matching algorithm, which can identify entity mentions in strings based on the constructed knowledge graph by using the edit distance algorithm, similarity calculation algorithm and other methods, and link them to entities and relationships. Finally, the matching of entities and relationships is completed in the knowledge graph through the graph matching algorithm, thereby realizing knowledge matching.

[0096] Knowledge extraction methods based on large language model algorithms include Figure 3 As shown in the figure, it is mainly divided into three parts, namely, heterogeneous data fusion process, knowledge extraction process and knowledge graph construction process. Among them, the heterogeneous data fusion process includes sub-processes such as domain data collection, heterogeneous data preprocessing, and heterogeneous data cleaning. The knowledge extraction process includes sub-processes such as entity and relationship extraction and entity and relationship alignment. The knowledge graph construction process includes sub-processes such as ontology model construction and knowledge graph construction.

[0097] The input of the heterogeneous data fusion process is a heterogeneous data set from multiple data sources, and the output is a fused homogeneous data set. The overall fusion process is as follows: Figure 4 shown.

[0098] The heterogeneous data fusion process consists of sub-processes such as heterogeneous data collection, heterogeneous data preprocessing, and heterogeneous data cleaning, and is mainly responsible for collecting, cleaning, and fusing heterogeneous data from different data sources.

[0099] In some embodiments, the heterogeneous data fusion process is designed as the process shown in formula (2.4), where , and For the dataset Structured, semi-structured and unstructured data subsets, This process filters and removes similar information between different structured data subsets, and realizes structural unification and data merging of multi-source data sets.

[0100]

[0101] The heterogeneous data collection process is the first step in the heterogeneous data fusion process. This process is responsible for collecting data from data sources related to multiple fields, including text, web pages, databases and other data, including at least one of the structured, semi-structured and unstructured data types.

[0102] The heterogeneous data preprocessing process is the second step of the heterogeneous data fusion process. This subprocess is responsible for basic processing of the collected data to improve the quality of the heterogeneous data set. The heterogeneous data preprocessing process includes steps such as converting uppercase to lowercase, converting full-width to half-width, and converting traditional Chinese to simplified Chinese. The data generated will be further cleaned, converted, and fused in the heterogeneous data cleaning process.

[0103] The heterogeneous data cleaning process is responsible for cleaning and integrating the collected data to ensure the quality and consistency of the data, thereby providing data support for the subsequent knowledge extraction and knowledge graph construction process. The heterogeneous data cleaning process includes steps such as removing hypertext tags, filtering special symbols, and deleting duplicate data. The data generated will provide high-quality data input for subsequent processes.

[0104] The knowledge extraction process mainly consists of two sub-processes: entity and relationship extraction and entity and relationship alignment. The overall process is as follows: Figure 5 This process aims to extract entities and relations from raw data to form structured knowledge triples, identify anaphoric entities and link them to antecedent entities, and align and associate knowledge triples with existing reliable knowledge bases, thereby providing high-quality data support for the construction of knowledge graphs.

[0105] The entity and relationship extraction process includes two steps: entity extraction and relationship extraction. Its main task is to extract entities, entity types and relationships from the string s, and then extract knowledge triples. The process design is shown in formula (2.5), where head represents the whole, rela represents the relationship, and tail represents the tail entity. Represents the extracted knowledge triples.

[0106]

[0107] The entity and relationship alignment process is responsible for disambiguating and aligning the extraction results. This process uses a large language model algorithm to resolve the reference of the extraction results and align them with an existing reliable knowledge base.

[0108] The knowledge graph construction process mainly consists of two sub-processes: ontology model construction and knowledge graph construction. Figure 6 This process is responsible for organizing the structured knowledge extracted from the original data into the form of a knowledge graph, thereby realizing the organization, representation and storage of knowledge, and providing support for application scenarios such as knowledge matching and knowledge reasoning.

[0109] The ontology model building subprocess builds an ontology model based on the candidate database and the extracted entities, relationships and other information. It describes the concepts, attributes and relationships in the domain through formal knowledge representation and provides a structured way to organize and represent knowledge.

[0110] The knowledge graph construction subprocess stores and represents the knowledge extraction results in the form of a knowledge graph based on the ontology model. In this process, the structured knowledge extracted from the original data is first classified, categorized, and annotated to conform to the description and organization of the ontology model, and then the structured knowledge is stored and represented in the form of a knowledge graph, where the entities serve as nodes of the knowledge graph and the relationships between entities serve as edges of the knowledge graph. Finally, graph databases such as Nebula Graph are used to support the construction and query of the knowledge graph.

[0111] In some embodiments, the structured knowledge is classified, categorized and annotated, which corresponds to the classification of entities into specific candidate databases, and can also be replaced by semantic retrieval to classify entities into different candidate databases.

[0112] In some embodiments, the appropriate background knowledge introduction strategy is the key to improving the accuracy of knowledge extraction. To address this phenomenon, a more refined knowledge extraction algorithm is proposed by leveraging the contextual learning capability of the large language model algorithm. By matching the availability of background knowledge and self-reflective knowledge on demand, the impurities in the candidate database containing background knowledge are filtered out, thereby alleviating the defects of traditional knowledge extraction methods. Figure 7 shown.

[0113] The knowledge extraction system of the large language model algorithm in this application improves the extraction effect through the following two improvements.

[0114] (1) On-demand matching: The algorithm designs an on-demand matching mechanism, which enables the large language model algorithm to dynamically evaluate the actual demand for external background knowledge (external knowledge base) during the knowledge extraction process based on the specific content of the input text. This on-demand matching strategy enables the large language model algorithm to dynamically adjust the amount of candidate database introduced according to the complexity of the knowledge extraction task.

[0115] (2) Self-reflection: This algorithm allows the large language model algorithm to reflect on the integrated external knowledge, so that the large language model algorithm will score the relevance of knowledge from multiple dimensions such as relevance, support, and availability. Based on these scores, the model will screen out the best candidate databases containing background knowledge to ensure that the information in the context is the most relevant and useful. This method can not only improve the efficiency of knowledge extraction, but also remove noise data in the domain candidate database, enhance the model's ability to understand the context, and thus output higher quality extraction results.

[0116] Through the above improvements, the knowledge extraction algorithm of the present application can make more full use of the contextual learning ability of the large language model algorithm and provide more effective domain background knowledge for knowledge extraction tasks.

[0117] like Figure 8As shown, in one embodiment, the improved entity extraction algorithm mainly consists of five steps, namely, considering the necessity of external knowledge base, matching external knowledge base in parallel as needed, reflecting on the relevance of external knowledge base, filtering knowledge based on relevance score, and building prompts and embedding them into input. In the case where an external knowledge base is required, the algorithm will match the external knowledge base as needed until the domain background knowledge in the matching candidate database is sufficient to support the large language model algorithm to correctly identify the entities in the input text, and then output the entities based on the context information; otherwise, the large language model algorithm will directly extract entities based on the input text.

[0118] For the text to be extracted, the improved entity extraction algorithm will guide the large language model algorithm to consider whether it is necessary to use an external knowledge base to complete entity extraction. If the large language model algorithm believes that the entities in the text to be extracted are relatively complex, or the corresponding extraction results are prone to hallucinations, a necessity token will be generated. The process is shown in formula (2.6), where represents the prompt text sequence for zero-shot learning, A token representing the necessity of matching an external knowledge base. It is a mathematical operator. The value of the argument at which the function reaches its maximum value. In other words, argmax returns the argument that maximizes the function. It represents the probability of Y given X. It is a conditional probability that describes the likelihood of Y occurring after observing X.

[0119]

[0120] Afterwards, the knowledge extraction system will be based on The results are used to retrieve the external knowledge base, match the external knowledge base in parallel as needed, and select the candidate knowledge set sim(·) based on the similarity calculation algorithm. The process is shown in formula (2.7).

[0121]

[0122] in, Represents input text The corresponding probability distribution is, represents a serialized external knowledge base, represent The corresponding probability distribution is, Represents the Jaccard similarity calculation algorithm, represents the improved KL divergence algorithm, and Respectively represent and The weight coefficient of the Jaccard similarity calculation algorithm is shown in formula (2.8).

[0123]

[0124] The improved KL divergence algorithm is shown in formula (2.9), where , ,and . Since the distance measurement must be symmetrical, this application makes improvements based on the KL divergence, using the mean distribution as a bridge to smooth the calculation results of different probability distributions, making the forward and reverse calculation results equal, and using this symmetrical algorithm as the distance measurement standard between probability distributions, thereby calculating the similarity between candidate entities.

[0125]

[0126] If the similarity between the external knowledge base and the input text is greater than the threshold, the external knowledge base is added. Add candidate sample set ,The candidate sample set is mapped to the candidate database, and the external knowledge base is sorted according to the similarity.,Afterwards, through the reflection process of the large language model algorithm, the quality of the candidate samples is evaluated in terms of relevance, support, and usability, and the corresponding scores are generated.

[0127]

[0128] The reflection process of the large language model algorithm is shown in formula (2.10), where A sequence of prompt texts representing the reflection process, Representative candidate sample set A sample of external knowledge bases in , and The tokens represent the relevance, support, and availability scores respectively.

[0129] Table 1 Special Token function definition table for auxiliary judgment

[0130]

[0131] In some embodiments, by introducing Special tokens of the same type as , etc., give the large language model algorithm the ability to independently determine whether an external knowledge base is needed according to actual needs, and decide the timing and parameters of calling the matching external knowledge base interface. In order to achieve this goal, GPT-4 is used to annotate the corresponding supervised data set and fine-tune the large language model algorithm. The fine-tuned model will be able to output when an external knowledge base is needed. Special Tokens of the type, and output them separately when evaluating the relevance, support and availability of background knowledge , and To ensure that the model can perform corresponding operations according to different instruction prompts, these special tokens are defined as shown in Table 1 above.

[0132]

[0133] Based on the results of the large language model algorithm reflection, the score of each sample is calculated and sorted again to remove the candidate sample set The knowledge impurity in the The process is shown in equation (2.11), where Represents the sub-weight scores under different availability, It is the sub-weighted score of item i, where i can be Rel, Sup or Use.

[0134]

[0135]

[0136]

[0137] In formula (2.12), , and Represents the total weighted scores of relevance, support and availability, respectively. , and Represent the sub-weighted scores of relevance, support and availability respectively. The calculation process of each sub-weighted score is shown in formulas (2.12), (2.13) and (2.14), where , and Special tokens representing relevance, support and availability. It represents the sub-weight scores under different availability.

[0138]

[0139] Finally, the sample set The results are sequentially concatenated into , as a hint of the original input text to implement the few-shot learning process, and make LLM output the recognition result. The process is shown in formula (2.15), where represents the prompt text sequence for few-shot learning, Represents the transformation of the output text sequence to the entity set E. This transformation is based on the prompt Semantic information and format specifications are used to extract entity sets from text sequences .

[0140]

[0141] For the relation extraction algorithm, based on the entity extraction algorithm, adjust its prompt instructions and design the transformation from the output text sequence to the relation set , realize the relationship extraction task and extract the relationship R. Its output process is shown in formula (2.16).

[0142] The relationship extraction algorithm effect test table is shown in Table 2 below:

[0143] Table 2 Relationship extraction algorithm effect test table

[0144]

[0145] The knowledge extraction system and knowledge extraction method can be applied in the following fields:

[0146] Healthcare: Use knowledge extraction systems to extract key information from medical literature, medical records, and clinical trial data to support clinical decision-making, research, and policy making.

[0147] Legal and Compliance: Helps legal professionals quickly understand and respond to legal issues by automatically identifying and extracting important entities and relationships in legal documents.

[0148] Financial Services: Extract valuable information from financial reports, market news and transaction data for market analysis, risk management and investment decision making.

[0149] Education and academic research: Extract key concepts and relationships from academic articles and scientific research data to accelerate knowledge accumulation and innovation.

[0150] Potential application areas:

[0151] Enterprise Knowledge Management: Developing an internal knowledge base to enhance the organization's knowledge sharing and decision-making capabilities by extracting and organizing information from internal documents and communications.

[0152] Smart Cities and Public Management: Apply knowledge extraction techniques from government open data and social media to analyze citizen needs, optimize city services, and respond to emergencies.

[0153] Artificial Intelligence Ethics and Transparency: Extract and display the basis for decision-making in algorithms and machine learning models to increase system transparency and public trust.

[0154] Application

[0155] Improvements to models and algorithms: Use large language model algorithms and contextual learning algorithms to improve the accuracy and efficiency of knowledge extraction, reduce manual intervention, and achieve automated and efficient knowledge management.

[0156] Cross-domain knowledge fusion: Combine data from multiple fields or sources to improve the coverage and depth of knowledge through joint extraction and context embedding technology.

[0157] Real-time knowledge updating and maintenance: Use online learning and incremental learning methods to continuously update and maintain the knowledge base to adapt to the rapidly changing information environment.

[0158] User interaction and customized services: Develop smarter user interfaces and interaction methods to allow users to customize knowledge extraction and presentation according to their personal needs, thereby improving user experience and satisfaction.

[0159] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the knowledge extraction system and knowledge extraction method based on the large language model algorithm. In other embodiments of the present application, more or fewer components than shown in the figure may be included, or some components may be combined, or some components may be split, or different component arrangements may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0160] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0161] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner.

[0162] Program code can be implemented with high-level programming language or target area-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0163] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical discs, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0164] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0165] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0166] It should be noted that, in the examples and description of the present application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "comprise one" do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.

[0167] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. A knowledge extraction system based on a large language model algorithm, characterized in that: It can be used in the field of healthcare, at least to extract knowledge from medical literature, medical records and clinical trial data to support clinical decision-making, research and policy making; The knowledge extraction system includes a data collection layer, a data filtering layer, a knowledge extraction layer, a knowledge disambiguation layer and a knowledge storage layer which are arranged in sequence, so that the data input into the knowledge extraction system passes through in sequence, and further includes: A data collection and cleaning module, used for collecting, fusing and processing heterogeneous data from different data sources in the candidate database to obtain processed data, and the data collection and cleaning module is arranged in the data collection layer and the data filtering layer; An entity and relationship extraction module, connected to the data collection and cleaning module, for extracting entities and relationships of the processed data from the processed data based on the large language model algorithm, and determining whether to introduce an external knowledge base into the candidate database based on the complexity of the entity, and obtaining knowledge triples of the processed data, wherein the entity and relationship extraction module is arranged in the knowledge extraction layer; An entity disambiguation and alignment module, connected to the entity and relation extraction module, for obtaining the anaphoric entity in the entity, disambiguating the anaphoric entity, and performing entity pre-alignment, the entity disambiguation and alignment module being arranged in the knowledge disambiguation layer; A knowledge storage module, connected to the entity disambiguation and alignment module, for constructing an ontology model according to the entities and relationships, for mapping the knowledge triples after disambiguation and alignment into the ontology model, for organizing and storing the knowledge triples in the form of a knowledge graph, and for performing semantic matching and similarity calculation on the knowledge triples, thereby outputting a matching knowledge representation form, wherein the knowledge storage module is arranged in the knowledge storage layer; When the entity and relationship extraction module performs entity extraction, the following steps are included: considering the necessity of the external knowledge base, matching the external knowledge base in parallel as needed, reflecting on the relevance of the external knowledge base with the original data to be extracted, filtering the external knowledge base based on the relevance score, and constructing and embedding prompts into the original data to be extracted; The entity and relationship extraction module includes an entity extraction module and a relationship extraction module, wherein: The entity extraction module is used to obtain entities from the processed data, wherein the entities include specific semantic information and recognize string information based on a large language model algorithm; The relationship extraction module is used to extract the relationship between the entities based on the entities through a large language model algorithm; The entity extraction module also includes: based on the large language model algorithm, determining the complexity of the entity; if the complexity is higher than a preset threshold, calling the data collection and cleaning module, collecting the external knowledge base based on a similarity calculation algorithm, and adding one or more external knowledge bases to the candidate database based on similarity sorting; based on the relevance, support and availability of the newly added external knowledge base to the target knowledge, evaluating the quality of the newly added external knowledge base, and determining the timing of adding the newly added external knowledge base.

2. The knowledge extraction system based on the large language model algorithm according to claim 1 is characterized in that: The data collection layer is configured to: The data collection and cleaning module collects heterogeneous data from different data sources in the candidate database, wherein the heterogeneous data types include at least one of text, web pages, and databases, and the heterogeneous data includes at least one of structured, semi-structured, and unstructured data types; The data filtering layer is configured as follows: By means of the data collection and cleaning module, at least one of data transcription and data cleaning is performed on the collected heterogeneous data to obtain the processed data; The knowledge extraction layer is configured as follows: Extracting entities and relations of the processed data from the processed data through the entity and relation extraction module; The knowledge disambiguation layer is configured as follows: By means of the entity disambiguation and alignment module, based on the large language model algorithm, the anaphoric entities in the entity are identified and obtained, and the antecedent entities corresponding to different anaphoric entities are obtained, and the anaphoric entities are linked to the antecedent entities to eliminate the ambiguity of the references of different anaphoric entities; as well as: Through the entity disambiguation and alignment module, based on the large language model algorithm, the knowledge triples are aligned with a preset reliable knowledge base to achieve alignment between equivalent entities; The knowledge storage layer is configured as follows: Through the knowledge storage module, an ontology model and a knowledge graph are constructed based on disambiguated and aligned entities and relationships.

3. The knowledge extraction system based on the large language model algorithm according to claim 1 is characterized in that: The data collection and cleaning module includes a data collection module, a data preprocessing module and a data cleaning module; wherein: The data collection module is arranged in the data collection layer, and includes at least one of a scheduler, a network requester and a parser, and the data collection module can crawl heterogeneous data from different data sources in the candidate database to collect the heterogeneous data; The data preprocessing module and the data cleaning module are arranged in the data filtering layer and connected to the data collection module, and are used to perform at least one of data transcription and data cleaning on the heterogeneous data, the data transcription includes at least one of uppercase to lowercase, full-width to half-width, and traditional Chinese to simplified Chinese, and the data cleaning includes at least one of removing hypertext tags, filtering special symbols, and deleting duplicate data.

4. The knowledge extraction system based on the large language model algorithm according to claim 1, characterized in that: The entity disambiguation and alignment module includes a reference resolution module and an entity alignment module, wherein: The reference resolution module is used to determine the antecedent entities corresponding to different anaphoric entities through the large language model algorithm, and link the anaphoric entity to the antecedent entity to eliminate the ambiguity of the references of different anaphoric entities; The entity alignment module is used to match and correspond similar entities with different naming methods in different data sources based on the alignment of the knowledge triples with a preset reliable knowledge base through the large language model algorithm, so as to achieve alignment between equivalent entities.

5. The knowledge extraction system based on the large language model algorithm according to claim 1, characterized in that: The knowledge storage module includes an ontology model construction module, a knowledge graph construction module and a knowledge matching module, which are used to construct and maintain the structure of knowledge extraction; wherein: The ontology model building module is used to build an ontology model according to the candidate database and at least one of the extracted entities and relationships, so as to perform structured expression on the extracted knowledge triples, obtain concepts, attributes and relationships in the candidate database, and thus obtain structured knowledge of the candidate database; The knowledge graph construction module is used to construct a knowledge graph based on the ontology model, and store and represent the knowledge triples in the form of the knowledge graph, including representing the entities through nodes in the knowledge graph, and edges in the knowledge graph representing the relationships between the entities; The knowledge matching module is used to run the knowledge matching algorithm and the graph matching algorithm. Based on the constructed knowledge graph, it uses at least one of the edit distance algorithm and the similarity calculation algorithm to identify the entities in the original data to be extracted from the knowledge, and link and match them to the entities and relationships in the knowledge graph, thereby realizing knowledge extraction and matching.

6. A knowledge extraction method based on a large language model algorithm, characterized in that: It can be used in the field of healthcare, and at least can realize knowledge extraction from medical literature, medical records and clinical trial data to support clinical decision-making, research and policy making, including the following steps: Collect, fuse and process heterogeneous data from different data sources in the candidate database to obtain processed data; Based on a large language model algorithm, extracting entities and relations of the processed data from the processed data, and obtaining knowledge triples of the processed data; Acquire an anaphoric entity in the entity, eliminate the ambiguity of the anaphoric entity, and perform entity pre-alignment; Based on the disambiguated and aligned entities and relations, an ontology model and a knowledge graph are constructed, knowledge triples are organized and stored in the form of the knowledge graph, and the disambiguated and aligned knowledge triples are mapped to the ontology model; Based on the ontology model and the knowledge graph, entities in the original data to be subjected to knowledge extraction are identified to achieve knowledge extraction and matching; When performing entity extraction, the following steps are included: considering the necessity of an external knowledge base, matching the external knowledge base in parallel as needed, reflecting on the relevance of the external knowledge base with the original data to be extracted, filtering the external knowledge base based on the relevance score, and constructing and embedding prompts into the original data to be extracted; The extracting entities and relations of the processed data from the processed data includes: obtaining entities from the processed data, the entities including specific semantic information, and identifying information of character strings based on a large language model algorithm; Based on the entities, extracting the relationship between the entities through a large language model algorithm; The knowledge extraction method also includes: based on the large language model algorithm, determining the complexity of the entity; if the complexity is higher than a preset threshold, calling the data collection and cleaning module, collecting the external knowledge base based on a similarity calculation algorithm, and adding one or more external knowledge bases to the candidate database based on similarity sorting; based on the relevance, support and availability of the newly added external knowledge base to the target knowledge, evaluating the quality of the newly added external knowledge base, and determining the time point for adding the newly added external knowledge base.

7. The knowledge extraction method based on the large language model algorithm according to claim 6 is characterized in that: The collecting of heterogeneous data from different data sources in the candidate database comprises at least one of the following steps: Collecting the heterogeneous data from different data sources in the candidate database, wherein the heterogeneous data types include at least one of text, web pages, and databases, and the heterogeneous data includes at least one of structured, semi-structured, and unstructured data types; The fusion and processing comprises at least one of the following steps: Performing data transcription on the collected heterogeneous data, wherein the data transcription includes at least one of uppercase to lowercase, full-width to half-width, and traditional Chinese to simplified Chinese; The collected heterogeneous data is cleaned, and the data cleaning includes at least one of removing hypertext tags, filtering special symbols, and deleting duplicate data.

8. The knowledge extraction method based on the large language model algorithm according to claim 6 is characterized in that: The obtaining of the anaphoric entity in the entity, eliminating the ambiguity of the anaphoric entity, and performing entity pre-alignment comprises at least one of the following steps: Determine the antecedent entities corresponding to different anaphoric entities through the large language model algorithm, and link the anaphoric entities to the corresponding antecedent entities to eliminate ambiguity in the references of different anaphoric entities; Through the large language model algorithm, the knowledge triples are aligned with the preset reliable knowledge base, similar entities with different naming methods in different data sources are matched and corresponded, and alignment between equivalent entities is achieved.

9. The knowledge extraction method based on the large language model algorithm according to claim 6 is characterized in that: The step of constructing an ontology model and a knowledge graph based on disambiguated and aligned entities and relationships comprises at least one of the following steps: Building an ontology model based on the candidate database and at least one of the extracted entities and relationships, wherein the ontology model can at least describe the concepts, attributes and relationships of the candidate database; Based on the ontology model, construct the knowledge graph, and store and represent the knowledge triples in the form of the knowledge graph; The identifying of entities in the original data to be subjected to knowledge extraction based on the ontology model and the knowledge graph, and implementing knowledge extraction and matching includes at least one of the following steps: Perform entity and relationship identification on the original data to be subjected to knowledge extraction, obtain entities, relationships and knowledge triples of the original data, link and match them to entities and relationships in the knowledge graph, organize and store the knowledge triples in the form of a knowledge graph, use the entities as nodes of the knowledge graph, and the relationships between the entities as edges of the knowledge graph, perform semantic matching and similarity calculation on the knowledge triples, and output a matching knowledge representation; Nebula Graph and at least one of Neo4j and ArangoDB graph databases are used to support the construction and query of the knowledge graph.

Citation Information

Patent Citations

  • Entity relationship extraction method and system based on deep learning

    CN116796744A

  • Knowledge graph-based test case generation method and device

    CN117130938A