A method and system for constructing a life science knowledge graph based on a large language model

CN121364853BActive Publication Date: 2026-06-26BEIJING XIANYUN QIYUAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIANYUN QIYUAN TECH CO LTD
Filing Date
2025-12-23
Publication Date
2026-06-26

Smart Images

  • Figure CN121364853B_ABST
    Figure CN121364853B_ABST
Patent Text Reader

Abstract

The application discloses a kind of life group knowledge graph construction method and system based on large language model, it is related to computer data processing technical field.The method includes: obtaining and pre-processing multiple life group data, at least including unstructured biomedical text;Information extraction is carried out on text data based on large language model, and entity mention and relationship description are obtained;Standardization and normalization are carried out on entity mention and relationship description based on large language model and in combination with external knowledge base, and standard knowledge triple is obtained;Triplet is stored in graph data storage system, and knowledge graph is constructed.The present application utilizes the powerful natural language understanding ability of large language model, realizes efficient information extraction by structured prompt or field fine-tuning, and innovatively utilizes model to carry out the entity standardization of relationship perception, significantly improves the accuracy of knowledge fusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data processing technology, and more specifically, to the interdisciplinary field of artificial intelligence and bioinformatics, and to a method and system for constructing a life omics knowledge graph, particularly a method and system for constructing a life omics knowledge graph based on a large language model. Background Technology

[0002] Currently, with the development of technologies such as high-throughput sequencing, data in the field of life omics is exploding at an unprecedented rate, covering multiple levels including genomics, transcriptomics, proteomics, and metabolomics. This massive, multi-source, and heterogeneous data contains crucial knowledge for revealing the mysteries of life, understanding disease mechanisms, and developing novel therapies. However, this knowledge often exists in unstructured (such as research literature and clinical notes) or semi-structured forms, making information extraction and integration extremely difficult.

[0003] Knowledge graphs (KGs), as a powerful knowledge representation technology, can organize scattered biological entities (such as genes, proteins, diseases, and drugs) and their complex interrelationships (such as regulation, interaction, and treatment) into a structured knowledge network, providing strong support for complex queries, reasoning, and data-driven scientific discovery.

[0004] Currently, methods for constructing knowledge graphs in life sciences mainly have the following limitations:

[0005] Traditional Natural Language Processing (NLP) pipeline methods typically employ a multi-stage process of "entity recognition - relation extraction - entity linking." Each stage relies on an independent model (such as BiLSTM-CRF, SVM, etc.), resulting in error accumulation; that is, errors from previous stages can propagate and affect the performance of subsequent stages. Furthermore, these methods heavily depend on large-scale, high-quality manually labeled data, leading to high costs, and have limited ability to understand complex sentence structures, long-distance dependencies, and implicit semantics.

[0006] Methods based on early pre-trained language models (such as BERT and BioBERT): While these methods improve semantic representation capabilities through pre-training on biomedical corpora, their model size is relatively small, and their zero-shot and few-shot learning capabilities are limited. For specific knowledge extraction tasks, they typically still require a large amount of labeled data for fine-tuning and struggle to understand complex natural language instructions, thus still relying on external tools in the knowledge fusion stage.

[0007] Rule-based and ontology-based methods rely on domain experts defining a large number of extraction rules or using existing ontology for matching. Rule formulation and maintenance are time-consuming and labor-intensive, struggle to cover diverse linguistic expressions, resulting in low recall and poor ability to discover new knowledge.

[0008] In summary, existing technologies for constructing life science knowledge graphs generally face challenges such as low automation, insufficient ability to process unstructured text, difficulties in knowledge integration, and poor scalability, making it difficult to efficiently and accurately transform massive amounts of life science data into computable and usable knowledge. Therefore, a more advanced and automated technical solution is urgently needed to address these issues. Summary of the Invention

[0009] The main objective of this invention is to overcome the aforementioned deficiencies of the prior art and provide a method and system for constructing a life omics knowledge graph based on a large language model that is highly automated, accurate, and flexible.

[0010] The first aspect of this invention discloses a method for constructing a life omics knowledge graph based on a large language model; the method includes:

[0011] Includes the following steps:

[0012] S1: Acquire and preprocess multi-dimensional life omics data, which includes at least unstructured biomedical text data;

[0013] S2: Based on the large language model, information is extracted from the preprocessed biomedical text data to obtain entity mentions and relation descriptions;

[0014] S3: Based on the large language model and combined with an external standard knowledge base, perform entity standardization on the entity mentions and relation normalization on the relation descriptions to obtain standardized knowledge triples;

[0015] S4: Store the standardized knowledge triples into a graph data storage system to construct a life omics knowledge graph.

[0016] Preferably, in the above technical solution, the method of information extraction based on the large language model in step S2 includes: designing and applying a structured prompt template, the template including at least a role definition module, a task and knowledge domain constraint module, and a structured output format constraint module, to guide the large language model to perform entity recognition and relation extraction in a zero-shot or few-shot learning manner.

[0017] Preferably, in the above technical solution, the structured prompt template further includes a structured thought chain instruction module, which instructs the large language model to perform information extraction according to preset logical steps.

[0018] Preferably, in the above technical solution, the method of information extraction based on the large language model in step S2 further includes: using an instruction dataset containing biomedical entities and relation annotations to perform parameter efficient fine-tuning (PEFT) on the basic large language model to obtain a domain-enhanced knowledge extraction model.

[0019] Preferably, in the above technical solution, the method for entity standardization of entity mentions in step S3 includes: retrieving a list of candidate standard entities from a standard knowledge base based on the text string of the entity mention; providing the entity mention, its context text, and the candidate list as input to the large language model; and guiding the model to analyze the context and select the most matching standard entity.

[0020] Preferably, in the above technical solution, the input provided to the large language model also includes the relational description related to the entity mentioned in step S2, which is extracted in step S2, to help the model more accurately determine the entity type and make a selection.

[0021] Preferably, the above technical solution also includes guiding the large language model to analyze the wording describing the relationship in the text, configuring a confidence label and evidence text for each relationship, and storing them as attributes of the edge in the knowledge graph.

[0022] Preferably, in the above technical solution, the method further includes step S5: verifying and iteratively optimizing the constructed knowledge graph. This step includes using a large language model for automated preliminary review, combining feedback from domain experts, and automatically generating positive and negative samples for further fine-tuning of the model, forming a closed-loop optimization process.

[0023] A second aspect of this invention discloses a life omics knowledge graph construction system based on a large language model; the system includes:

[0024] The data acquisition and preprocessing module is used to acquire and preprocess multi-dimensional life omics data, which includes at least unstructured biomedical text data.

[0025] The information extraction module is equipped with a large language model, which is used to extract information from the preprocessed biomedical text data to obtain entity mentions and relation descriptions.

[0026] The knowledge fusion module is used to call the large language model and combine it with an external standard knowledge base to perform entity standardization on the entity mentions and relation normalization on the relation descriptions, so as to obtain standardized knowledge triples.

[0027] The graph construction and storage module is used to store the standardized knowledge triples into the graph data storage system to construct a life omics knowledge graph.

[0028] The system also includes:

[0029] The verification and iterative optimization module is used to verify the constructed life omics knowledge graph and automatically generate fine-tuning data based on the verification results and expert feedback to optimize the large language model in the information extraction module.

[0030] Compared with the prior art, the present invention has the following significant advantages:

[0031] Significantly improved automation and efficiency: Leveraging the powerful zero-shot / few-shot capabilities of large language models, the reliance on manual rule definition and data annotation is greatly reduced, enabling an end-to-end or near-end-to-end automated construction process from text to knowledge graph, thus greatly improving construction efficiency.

[0032] Wider knowledge coverage and higher recall: Large language models are good at processing complex, unstructured natural language texts. They can understand long-distance dependencies, deep semantics of context and implicit relationships, thus mining knowledge that is difficult to find by traditional methods from massive amounts of literature and building a more comprehensive knowledge graph.

[0033] Higher extraction accuracy: With its powerful contextual understanding capabilities, this method can effectively resolve ambiguities in biomedical entities (such as homonyms, and the distinction between genes and proteins), accurately identify the directionality of relationships, and thus improve the accuracy of knowledge extraction.

[0034] More effective knowledge fusion: This invention innovatively utilizes a large language model to assist entity standardization, and assists in disambiguation by analyzing context and even extracted relational information, accurately linking entity references from different sources to standard IDs, thus significantly improving the quality of knowledge fusion.

[0035] Highly flexible and scalable: By adjusting the prompt or making minor adjustments to the instructions, it can quickly adapt to new entity types, relationship types, or application scenarios without rewriting complex rules or retraining the entire traditional model.

[0036] Supporting continuous optimization and constantly improving quality: The verification and iterative optimization closed-loop mechanism proposed in this invention can efficiently transform expert knowledge into the "experience" of the model. By automatically generating fine-tuning data, the quality of the knowledge graph can be continuously improved in a continuous feedback loop. Attached Figure Description

[0037] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0038] Figure 1 This is a flowchart of a method for constructing a life omics knowledge graph based on a large language model according to an embodiment of the present invention;

[0039] Figures 2a-2b This is a schematic diagram of a structured prompt template for information extraction according to an embodiment of the present invention;

[0040] Figure 3 This is a structural diagram of a life omics knowledge graph construction system based on a large language model according to an embodiment of the present invention;

[0041] Figure 4 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] This invention aims to address the challenges currently faced in constructing knowledge graphs in the field of life omics, particularly the low efficiency in handling massive, heterogeneous (especially unstructured text) data, low levels of automation, difficulty in accurately capturing complex relationships between biological entities, and challenges in knowledge fusion. This invention proposes a novel method that leverages the powerful natural language understanding and generation capabilities of Large Language Models (LLMs) to automatically, efficiently, and accurately extract and integrate knowledge from diverse life omics data and construct knowledge graphs. Its ultimate goal is to better integrate and utilize the explosive growth of life omics data, accelerating the progress of biomedical research, drug discovery, and precision medicine.

[0044] Explanation of relevant terms:

[0045] Life Omics: A collection of disciplines that study the overall, systematic molecular composition of organisms (such as genes, RNA, proteins, metabolites, etc.) and their interactions, including genomics, transcriptomics, proteomics, metabolomics, etc.

[0046] Knowledge Graph (KG): A database technology that represents knowledge in the form of a graph. It consists of nodes (representing entities, such as genes or diseases) and edges (representing relationships between entities, such as "treatment" or "association"), and can include attributes of nodes (such as the sequence of a gene) and attributes of edges (such as the source literature of a relationship).

[0047] Large Language Models (LLMs) are natural language processing models trained using deep learning (especially the Transformer architecture) and possessing massive amounts of parameters (typically in the billions to trillions). They are pre-trained on large amounts of text data and exhibit powerful text understanding, generation, summarization, question answering, translation, and even a certain degree of reasoning ability. Examples include the GPT series (OpenAI), LLaMA series (Meta), Gemini series (Google), and Claude series (Anthropic).

[0048] Named Entity Recognition (NER): The process of identifying entities of predefined categories (such as person names, place names, organization names; in this invention, it specifically refers to biomedical entities, such as gene names, protein names, disease names, drug names, etc.) from text.

[0049] Relation Extraction (RE): The process of identifying specific semantic relationships between identified entities in text (e.g., protein A inhibits protein B, drug C treats disease D).

[0050] Entity Normalization / Linking: The process of mapping entities identified in text (which may have aliases, abbreviations, or different expressions) to unique, authoritative identifiers (IDs) in a standard database (such as NCBI Gene, UniProtKB, MeSH).

[0051] Prompt Engineering: Techniques for designing and optimizing text prompts input to large language models to guide them in producing the desired output.

[0052] Fine-tuning: The process of further training a pre-trained large language model using data from a specific task or domain to better adapt the model to the target task or domain.

[0053] Instruction Tuning: A fine-tuning method that trains an LLM using a dataset containing “instructions” (describing the task) and “instances” (input-output pairs) to better understand and follow various natural language instructions to complete tasks.

[0054] Zero-shot learning: LLM's ability to perform a task without seeing any labeled samples for a specific task, relying solely on its pre-trained knowledge and task description (usually via a prompt).

[0055] Few-shot learning: Prompts provide a small number (usually 1 to dozens) of task examples to help LLMs better understand task requirements and complete tasks.

[0056] Graph Database: A database system specifically designed for storing and querying graph-structured data, such as Neo4j and JanusGraph.

[0057] RDF (Resource Description Framework): A standard data model defined by the W3C for representing information in knowledge graphs, typically stored as subject-predicate-object triples. RDF stores are systems used to store and retrieve RDF data, such as Apache Jena and Virtuoso.

[0058] PubMed, PMC: A biomedical literature database containing abstracts and full texts of numerous research papers.

[0059] GenBank, UniProt, KEGG, TCGA, DrugBank, MeSH, ChEBI, UMLS, NCBI Gene: Important public bioinformatics and medical databases that store information on gene sequences, proteins, metabolic pathways, cancer genomes, drugs, medical subject terms, chemical entities, Unified Medical Language System, and genes.

[0060] The Explosive Growth and Challenges of Omics Data: With the development of high-throughput sequencing and multi-omics analysis technologies, we have accumulated massive amounts of omics data (genomics, transcriptomics, proteomics, metabolomics, etc.). This data holds immense potential for revealing the laws governing life activities, understanding disease mechanisms, and discovering drug targets and biomarkers. However, this data is characterized by its massive volume, diverse sources, heterogeneity, high dimensionality, and complexity. Knowledge is often dispersed across various carriers, including:

[0061] Unstructured data includes research literature (such as PubMed abstracts and PMC full texts), clinical notes, and free text portions of electronic health records (EHRs). This is a primary source of knowledge, but information extraction from it is the most challenging.

[0062] Semi-structured data: web pages, partial database records, and lab reports.

[0063] Structured data: Tabular data in public databases (such as GenBank, UniProt, KEGG, DrugBank, etc.).

[0064] The value of knowledge graphs in life sciences: Knowledge graphs (KGs) have become a powerful tool for effectively integrating and utilizing scattered knowledge. They can:

[0065] This connects entities from different sources (such as genes, proteins, diseases, and drugs) and their relationships (such as interactions, regulation, and treatment) to form a unified knowledge network.

[0066] It supports complex knowledge queries and reasoning, such as discovering potential drug-target-disease pathways.

[0067] Promoting data-driven scientific discovery:

[0068] Rule-based: Relies on domain experts to define a large number of pattern rules, which is poorly adaptable to the diversity and flexibility of language expression, usually has low recall (coverage), and is difficult to maintain.

[0069] Traditional machine learning / NLP requires a large amount of labeled data to train specific entity recognition and relation extraction models. The models have limited generalization ability, poor adaptability to new entity / relation types, difficulty in handling long-distance dependencies and contextual information, and weak ability to extract implicit relations.

[0070] Information integration is difficult: accurately linking entities from different sources and with different naming methods to standard IDs (entity linking / standardization) is a huge challenge, and ambiguity is common.

[0071] Opportunities presented by Large Language Models (LLM): In recent years, LLMs have made groundbreaking progress in understanding and generating natural language. They possess the following characteristics:

[0072] Powerful contextual understanding capabilities: It can better understand semantic information at the sentence, paragraph, and even document levels.

[0073] The ability to handle linguistic ambiguity and diversity: better robustness to synonyms and the same meaning expressed in different sentence structures.

[0074] A certain level of reasoning ability: able to infer implicit information from the context.

[0075] Zero-shot / few-shot learning capability: It can perform specific tasks without requiring a large amount of labeled data, using carefully designed prompts.

[0076] Fine-tunability: Performance can be further improved by fine-tuning on domain data.

[0077] The first aspect of this invention discloses a method for constructing a life omics knowledge graph based on a large language model. (See also...) Figure 1 and Figures 2a-2b This invention provides a method for constructing a life omics knowledge graph based on a large language model. The core idea is to utilize a large language model (LLM) as the core processing engine to build an efficient and automated process for extracting and fusing knowledge from diverse and heterogeneous life omics data sources, and ultimately constructing a structured knowledge graph. The method specifically includes the following steps:

[0078] Step 1 (S1): Acquisition and Preprocessing of Multi-Omics Data

[0079] The purpose of this step is to prepare clean, uniformly formatted data for subsequent knowledge extraction.

[0080] Data sources may include, but are not limited to:

[0081] Unstructured text data: This is a primary source of knowledge, such as full-text biomedical research papers obtained from PubMed Central (PMC) or paper abstracts obtained from PubMed. It may also include clinical trial records (such as ClinicalTrials.gov), anonymized text in electronic health records (EHRs), etc.

[0082] Structured / semi-structured data: primarily sourced from public bioinformatics databases, such as NCBI Gene (genetic information), UniProtKB (protein information), KEGG (metabolic pathways), DrugBank (drug information), MeSH (Medical Subject Headings, used for disease standardization), and ChEBI (chemical entities). This data serves both as a direct source of knowledge and as an authoritative reference for entity standardization.

[0083] The preprocessing process includes: cleaning the text data (such as removing HTML tags and handling special characters), formatting, and segmenting the text according to the input length constraints of the selected LLM (such as segmenting by sentence, paragraph, or fixed number of tokens). Structured data is then parsed to extract the mapping relationship between entities and their identifiers (IDs).

[0084] Step 2 (S2): Entity Recognition (NER) and Relation Extraction (RE) Based on Large Language Model (LLM)

[0085] The large language model can be the open-source Qwen2 7B / 72B or Qwen1.5, or the Qwen series models or similar open-source models such as Mistral 7B;

[0086] This step can be implemented in one of the following two ways or in combination:

[0087] I. Based on Prompt Engineering

[0088] This method is suitable for zero-sample or few-sample scenarios and does not require training of the LLM. The key lies in designing an efficient and structured prompt template. This invention proposes a joint extraction prompt template comprising multiple modules:

[0089] A. Role Definition Module: Assign expert roles to LLMs, such as "You are a senior researcher proficient in molecular biology...", to activate their relevant knowledge.

[0090] B. Task and Knowledge Domain Constraint Module: Clearly define the entity types (such as Gene, Protein, Disease) and relation types (such as inhibits, treats) to be extracted, and specify the target database for entity standardization (such as NCBIGene, MeSH) to ensure the standardization of the output.

[0091] C. Dynamic Few-Sample Example Module: Provides 1-5 high-quality "input-output" examples, especially examples addressing the difficulties in the biomedical field (such as gene / protein ambiguity and uncertain representations), guiding LLMs to learn how to handle them.

[0092] D. Structured Chain-of-Thought Instruction Module: Forces LLM to follow a step-by-step logical reasoning process, such as "Step 1: Identify all entity mentions. Step 2: Analyze the context and link to standard IDs. Step 3: Extract relationships between standardized entities...", improving the accuracy of complex tasks.

[0093] E. Strict Output Format Constraint Module: Requires the LLM to output results in a uniform, machine-readable format (such as JSON), including all necessary fields (such as entity text, standard ID, relation, evidence text, confidence level, etc.) to facilitate automated parsing. Figures 2a-2b This schematically illustrates the structure of such a structured prompt template, in which... Figure 2a It includes the four necessary first steps. Figure 2b The fifth step is optional; in Figure 2a After being stored in the graph data storage system, it can also be used for... Figure 2b The steps in the process involve knowledge graph verification and iterative optimization.

[0094] In some embodiments, specifically,

[0095] Role definition: A senior researcher with expertise in molecular biology, pharmacology, and bioinformatics;

[0096] Task: Extract structured life omics knowledge from given biomedical texts;

[0097] Task objective: Please analyze the input text and extract the following information:

[0098] 1. Entity Recognition: Identify genes, proteins, diseases, chemicals / drugs, and mutations in text.

[0099] 2. Entity Standardization: Utilize your internal knowledge to provide the entity's standard database ID (such as NCBIGeneID, UniProtID, MeSHID, DrugBankID). If you cannot determine this, please mark it as null.

[0100] 3. Relation Extraction (RE): Identifying semantic relationships between entities.

[0101] Limited to the following relation types: [targets, inhibits, activates, binds_to, associated_with, treats, causes];

[0102] 4. Evidence and Confidence: Extract the original text passages that support the relationship and assess the confidence level (High / Medium / Low).

[0103] For Chain-of-Thought Instructions, please strictly follow these steps for reasoning:

[0104] Step 1: Read the text and identify all relevant biological entities. Pay attention to the contextual differences between genes (DNA level) and proteins (executive function level).

[0105] Step 2: Standardize the mapping of the identified entities.

[0106] Step 3: Analyze the syntactic and semantic relationships between pairs of entities to determine the direction of the relationship (Subject->Object).

[0107] Step 4: Assess the confidence level based on the wording used in the text (e.g., "suggests" vs. "demonstrates").

[0108] Step 5: Format the result as a strict JSON object.

[0109] Output format constraints: The output must be a plain JSON string conforming to the following schema, and must not contain Markdown tags or other explanatory text:

[0110] {"entities":[{"id":"e1","text":"Entity text","type":"Type","standard_id":"Database ID or null"}],"relations":[{"subject_id":"e1","relation":"Relation type","object_id":"e2","evidence":"Excerpt of original evidence","confidence":"High / Medium / Low"}]}

[0111] Input text (InputText) {{INPUT_TEXT}}.

[0112] II. Domain-Based Instruction Fine-tuning

[0113] For scenarios requiring higher performance and stability, this invention employs Parametric Efficient Fine-Tuning (PEFT) techniques (such as LoRA or QLoRA) to fine-tune the basic LLM.

[0114] Fine-tuning data construction: The fine-tuning data uses JSONL files in instruction format. Each data entry contains an instruction (task description), input (text to be processed), and output (the expected structured golden answer). This data can come from existing labeled datasets or be automatically generated through the iterative optimization mechanism in step five of this invention.

[0115] Fine-tuning process: Select a suitable base model (such as LLaMA, Mistral series), train it with a small learning rate (such as 1e-4), fewer training cycles (such as 1-3 epochs) and specific LoRA parameters (such as rank r=16, alpha=32) to obtain an expert model focused on extracting knowledge from life omics.

[0116] Step 3 (S3): Entity Standardization and Relationship Normalization

[0117] This step aims to resolve the issues of ambiguity and heterogeneity in knowledge and is crucial for knowledge fusion. This invention innovatively utilizes LLM (Limited Learning Model) to assist in this process.

[0118] 1. Relation-Aware Entity Normalization

[0119] Traditional entity linking methods primarily rely on string matching and local context. This invention proposes a more advanced collaborative decision-making mechanism:

[0120] Candidate generation: For an entity mention (such as "p53"), a list of candidate IDs (such as TP53 gene ID, p53 protein ID) is first obtained by searching standard databases (such as NCBIGene, UniProt).

[0121] LLM decision: Provide the entity mention, the context sentence in which it is located, and all relation descriptions related to the entity extracted in step S2 (such as “mutation in p53”, “phosphorylation of p53”) to the LLM.

[0122] Reasoning process: LLM is guided to analyze this information. For example, "mutation" is a strong signal at the gene level, while "phosphorylation" is a strong signal at the protein level. LLM uses this domain knowledge, combined with context, to accurately link "p53" in different contexts to the corresponding gene ID or protein ID with a very high probability.

[0123] 2. Relationship Normalization

[0124] LLM is also used to map extracted, diverse natural language relation representations (such as "A inhibits B", "B is inhibited by A", "the inhibition of B by A") to predefined, unique predicates (such as inhibits(A,B)). This is a classification task based on the powerful semantic understanding capabilities of LLM.

[0125] Step 4 (S4): Knowledge Graph Construction and Storage

[0126] This step transforms standardized knowledge triples into a graph structure and stores them persistently.

[0127] Graph construction: Standardized entities (identified by their unique IDs) are used as nodes in the graph, and normalized relationships are used as edges connecting the corresponding nodes.

[0128] Attribute addition: Add attributes to nodes, such as standard name, alias, type, source database link, etc. Adding rich attributes to edges is another feature of this invention, including at least:

[0129] Provenance: such as the PMID of the original document or the sentence number.

[0130] Evidence: The original text that supports the relationship.

[0131] Confidence: The confidence level (e.g., Fact, Strongly Suggested, Hypothesis) is assessed by the LLM during extraction based on the wording of the original text (e.g., "results demonstrate" vs. "may suggest"), which enables knowledge graphs to express the uncertainty of scientific discoveries.

[0132] Storage: The constructed graph is stored in a professional graph data storage system, such as an attribute graph database (Neo4j, JanusGraph) or an RDF triple library (Apache Jena, Virtuoso), to facilitate efficient subsequent querying and analysis.

[0133] Step 5 (S5): Knowledge Graph Validation and Iterative Optimization (Optional but Recommended)

[0134] To ensure continuous improvement in the quality of knowledge graphs, this invention designs a closed-loop, human-machine collaborative optimization process.

[0135] Automated preliminary review: Using LLM as a "primary reviewer", specific "review-type prompts" are designed to check the logical consistency of newly added knowledge in the graph (e.g., a drug cannot simultaneously strongly activate and strongly inhibit the same target), whether it violates basic common sense in the domain, and to predict possible missing links.

[0136] Expert feedback capture: Submit the questionable points or graph samples identified by the LLM review to domain experts for final confirmation or correction through an interactive interface. The system background automatically captures every action of the experts (such as correcting a relation, deleting an incorrect triple, or adding a missing triple).

[0137] Automated fine-tuning sample generation: This is one of the key innovations of this invention. The system automatically converts expert feedback into high-quality fine-tuning data.

[0138] For correction operations: For example, an expert corrects relationships from activates to inhibits. The system automatically generates a pair of "contrast" samples: a negative sample (explicitly indicating that the original activates output is incorrect) and a positive sample (with the expert-corrected inhibits as the correct output).

[0139] For addition operations: the system will generate a supplementary positive sample whose output includes the original model output and the knowledge added by the expert.

[0140] Model iteration: The accumulated incremental fine-tuning data is used to periodically fine-tune the knowledge extraction LLM, enabling it to learn from expert knowledge, avoid making similar mistakes in the future, and improve recall. Example

[0141] To better illustrate the present invention, a specific embodiment is given below.

[0142] This embodiment aims to construct a knowledge subgraph about "drug-target-disease" from PubMed abstracts.

[0143] Data acquisition and preprocessing: Download the latest literature abstracts related to specific diseases (such as "non-small cell lung cancer") in batches from PubMed and perform text cleaning.

[0144] Model Selection and Preparation: Select an open-source large language model that has been fine-tuned with instructions, such as Mistral-7B-Instruct. Then, use an instruction dataset containing approximately 2000 high-quality labeled drug-target-disease triples to fine-tune it using LoRA, resulting in an expert model, BioKG-Extractor-7B.

[0145] In this embodiment, LoRA fine-tuning uses a rank of r=16, alpha=32, a learning rate of 2e-4, a batch size of 64, and is trained for 2 epochs.

[0146] Information Extraction: The preprocessed summary text is input into the BioKG-Extractor-7B model. The model is instructed to output all (drug, target, disease) entities in the summary, their (targets, inhibits, treats, associated_with) relationships, confidence labels for each relationship, and evidence text in JSON format all at once.

[0147] Knowledge integration:

[0148] For the entity “Osimertinib”, the candidate ID DB09330 was obtained by searching DrugBank.

[0149] For the entity "EGFR", the context is "Osimertinib is an inhibitor of EGFR...L858R mutation in EGFR gene...", and the relation (Osimertinib, inhibitor of, EGFR) is extracted.

[0150] The system provides this information to the LLM, which, based on clues such as "inhibitor" and "mutation," can accurately link the first "EGFR" to the protein ID of UniProt and the second to the gene ID of NCBI Gene.

[0151] Graph construction and storage: The standardized triples, such as (DrugBank:DB09330,targets,UniProt:P00533), along with their source PMID, evidence text, and confidence level Fact, are loaded into the Neo4j graph database.

[0152] Validation and optimization:

[0153] LLM's automated review found that for the same drug and target, one paper extracted the inhibitors relationship, while another extracted the activates relationship. These were marked as "potential contradictions" and submitted to experts.

[0154] After expert review, it was confirmed that different effects did exist under different cell line conditions. Therefore, the two edges were retained, but an "experimental condition" attribute was added to them. This operation was captured by the system, and a new fine-tuning instruction was generated, teaching the model to pay attention to and extract experimental conditions from the context when extracting relations in the future.

[0155] The instruction dataset used in this embodiment is composed of 2,000 document abstract annotation data obtained from PubTator, which has been manually reviewed and constructed according to the instruction format of this invention.

[0156] The innovation of this invention lies in combining a large model and a knowledge base to construct a knowledge graph, without comparing the performance on individual tasks such as entity recognition and relation extraction.

[0157] In summary, the life omics knowledge graph construction method and system proposed in this invention achieves efficient and automatic conversion from unstructured text to structured knowledge through end-to-end design, and innovatively introduces a human-machine collaborative closed-loop optimization mechanism, which can construct a life omics knowledge graph with broader coverage, higher accuracy and continuously improving quality, providing a solid data foundation for subsequent biomedical research and applications.

[0158] The second aspect of this invention discloses a life omics knowledge graph construction system based on a large language model. Figure 3 This is a structural diagram of a life omics knowledge graph construction system based on a large language model according to an embodiment of the present invention; such as Figure 3 As shown, the system 100 includes:

[0159] The data acquisition and preprocessing module 101 is used to acquire and preprocess multi-dimensional life omics data, which includes at least unstructured biomedical text data.

[0160] The information extraction module 102 is equipped with a large language model and is used to extract information from the preprocessed biomedical text data to obtain entity mentions and relation descriptions.

[0161] The knowledge fusion module 103 is used to call the large language model and combine it with an external standard knowledge base to perform entity standardization on the entity mentions and relation normalization on the relation descriptions, so as to obtain standardized knowledge triples.

[0162] The graph construction and storage module 104 is used to store the standardized knowledge triples into the graph data storage system to construct a life omics knowledge graph.

[0163] The system also includes:

[0164] The verification and iterative optimization module is used to verify the constructed life omics knowledge graph and automatically generate fine-tuning data based on the verification results and expert feedback to optimize the large language model in the information extraction module.

[0165] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the life omics knowledge graph construction method based on a large language model according to any one of the first aspects of this invention.

[0166] Figure 4 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 4 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0167] Those skilled in the art will understand that Figure 4 The structure shown is merely a structural diagram of the part related to the technical solution of this disclosure and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0168] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for constructing a life omics knowledge graph based on a large language model, as described in any of the first aspects of this invention.

[0169] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention application. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this invention application should be determined by the appended claims.

Claims

1. A method for constructing a life omics knowledge graph based on a large language model, characterized in that, Includes the following steps: S1: Acquire and preprocess multi-dimensional life omics data, which includes at least unstructured biomedical text data; S2: Information extraction is performed on the preprocessed biomedical text data based on a large language model to obtain entity mentions and relation descriptions; S3: Based on the large language model and combined with an external standard knowledge base, perform entity standardization on the entity mentions and relation normalization on the relation descriptions to obtain standardized knowledge triples; S4: Store the standardized knowledge triples into a graph data storage system to construct a life omics knowledge graph; In step S2, the information extraction method based on the large language model includes: Design and apply a structured prompt template, which includes at least a role definition module, a task and knowledge domain constraint module, and a structured output format constraint module, to guide the large language model to perform entity recognition and relation extraction in a zero-shot or few-shot learning manner. The structured prompt template also includes a structured thought chain instruction module, which is used to instruct the large language model to perform information extraction according to preset logical steps. The logical steps include: first identifying entities, then standardizing entities, then extracting the relationships between standardized entities, and evaluating the credibility of the relationships. In step S2, the information extraction method based on the large language model includes: Using an instruction dataset containing biomedical entity and relation annotations, the parameters of a basic large language model are efficiently fine-tuned to obtain a domain-enhanced knowledge extraction model, which is then used to perform entity recognition and relation extraction. In step S3, the method for entity standardization of the entity mentions includes: Based on the text string mentioned by the entity, retrieve a list of candidate standard entities from one or more standard knowledge bases; The entity mention, its context text, and the candidate standard entity list are taken as input and provided to the large language model. The large language model is guided to analyze the context text and select the standard entity that best matches the context semantics from the candidate standard entity list, and its unique identifier is used as the result of entity standardization. The input provided to the large language model also includes relational descriptions related to the entity mentions extracted in step S2; the large language model is guided to prioritize the use of these relational descriptions as core clues for determining the biological type of the entity, in order to assist in its selection. In step S2 or S3, the method further includes guiding the large language model to analyze the wording describing relationships in the biomedical text data, and assigning a confidence label and corresponding evidence text fragments to each extracted relationship. In step S4, the confidence labels and evidence text fragments are stored as attributes of the edges corresponding to the knowledge triples in the graph data storage system; The method further includes step S5: validating and iteratively optimizing the constructed life omics knowledge graph, including: The large language model is used to perform an automated preliminary review of the knowledge in the graph to identify potential logical contradictions, common sense violations, or missing links; Submit the review results or map data to domain experts for confirmation or correction, and capture the experts' feedback; Based on the feedback from the experts, high-quality positive and / or negative samples are automatically generated to form an incremental fine-tuning dataset. The large language model is further fine-tuned using the incremental fine-tuning dataset to improve accuracy and recall in subsequent knowledge graph construction.

2. A life omics knowledge graph construction system based on a large language model, wherein the system employs the method described in claim 1, characterized in that, The system includes: The data acquisition and preprocessing module is used to acquire and preprocess multi-dimensional life omics data, which includes at least unstructured biomedical text data. The information extraction module is equipped with a large language model, which is used to extract information from the preprocessed biomedical text data to obtain entity mentions and relation descriptions. The knowledge fusion module is used to call the large language model and combine it with an external standard knowledge base to perform entity standardization on the entity mentions and relation normalization on the relation descriptions, so as to obtain standardized knowledge triples. The graph construction and storage module is used to store the standardized knowledge triples into the graph data storage system to construct a life omics knowledge graph; The verification and iterative optimization module is used to verify the constructed life omics knowledge graph and automatically generate fine-tuning data based on the verification results and expert feedback to optimize the large language model in the information extraction module.