A medical literature comorbidity knowledge graph construction method fusing named entity recognition

CN122594501APending Publication Date: 2026-08-18FUDAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610770989.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-01
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

该方法从医学文献中自动识别疾病、症状、药物、检查指标、风险因素和人群特征等实体,并抽取共病、并发、诱发、治疗和风险关联关系,有效解决了医学文献共病知识人工整理效率低、实体表述不统一、跨句关系抽取不足和图谱更新滞后,医学文献共病知识自动化抽取不足、实体冗余严重、关系识别不完整和图谱更新效率低等问题

Benefits of technology

1)本发明将医学文献解析、命名实体识别、关系抽取和共病知识图谱构建形成连续化处理流程,采用PubMedBERT-BiLSTM-CRF模型识别疾病、症状、药物、检查指标、风险因素和人群特征等医学实体,并进一步通过PubMedBERT-Biaffine关系分类模型抽取实体间的共病、并发、诱发、治疗和风险关联关系。与依赖人工整理、词典匹配或规则模板的现有方法相比,本发明能够充分利用医学文本的上下文语义信息,减少实体边界识别错误和关系判断偏差,提高医学文献中共病知识抽取的准确性、完整性和自动化程度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594501A_ABST
    Figure CN122594501A_ABST
Patent Text Reader

Abstract

The application discloses a kind of medical literature comorbidity knowledge graph construction methods of fusion named entity recognition, its characteristics are that the method specifically includes: medical literature collection and structured pretreatment, medical entity recognition, comorbidity relationship extraction, entity standardization and triple fusion, and comorbidity knowledge graph storage and update etc. Step, realize the medical literature comorbidity knowledge graph of retrievable, scalable, traceable. Compared with prior art, the present application has the advantages of automatically identifying diseases, symptoms, drugs, test indicators, risk factors and population characteristics from medical literature, and extracting comorbidity, concurrent, induced, treatment and risk correlation, effectively solving the problems of low efficiency of manual sorting of medical literature comorbidity knowledge, non-uniform entity expression, insufficient cross-sentence relationship extraction and lagging graph update. It has high degree of automation, accurate relationship recognition, traceable knowledge and scalable graph, and has good application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of knowledge graph construction and intelligent analysis of medical information, specifically a method for constructing a medical literature comorbidity knowledge graph that integrates named entity recognition and relation extraction. Background Technology

[0002] With the rapid growth of biomedical research and clinical data, medical literature has become a crucial source of knowledge for disease mechanism research, clinical evidence summarization, treatment optimization, and public health decision-making. A large number of medical studies are continuously published in the form of papers, reviews, case reports, and clinical guidelines, containing rich information on disease co-occurrence, comorbidity associations, risk factor effects, drug intervention efficacy, and population differences. Comorbidity refers to the phenomenon of two or more diseases coexisting or influencing each other in the same patient or population, and it is of great significance in chronic disease management, geriatrics, mental illness assessment, complex disease diagnosis and treatment, and precision medicine research. Systematically mining comorbidity knowledge from medical literature can assist researchers in discovering potential links between diseases and provide clinicians with support for treatment decision-making.

[0003] Currently, the organization of medical comorbidity knowledge mainly relies on manual literature review, expert annotation, and manual database maintenance. While this method offers high professional credibility, it suffers from inefficiency, slow updates, limited coverage, and significant subjective differences when faced with the rapidly growing volume of medical literature. Different studies exhibit substantial variations in disease names, symptom descriptions, drug names, and risk factor descriptions; the same medical concept may have multiple textual expressions, leading to issues such as entity duplication, conceptual confusion, and inconsistent relationships during knowledge integration. Furthermore, comorbidity relationships in medical literature often do not appear directly in fixed sentence structures but are scattered across different paragraphs such as abstracts, results, discussion, and conclusions. The expression of these relationships is implicit, cross-sentence, and context-dependent, placing high demands on automated knowledge extraction.

[0004] In recent years, natural language processing (NLP) technology has been widely applied in medical text analysis. Named entity recognition (NER) can automatically identify medical entities such as diseases, drugs, symptoms, examination items, and genes from unstructured text, while relation extraction can further determine whether specific medical associations exist between entities. Traditional methods typically rely on rule templates, dictionary matching, or shallow machine learning models, which struggle to fully express the contextual semantics and complex language structures in medical texts. With the development of pre-trained language models, medical text representation methods based on BERT, PubMedBERT, and BioBERT have significantly improved the performance of entity recognition and relation extraction. However, existing methods still have several shortcomings. On the one hand, entity recognition and relation extraction are often treated as two independent tasks, and entity boundary errors in the former directly affect relation judgment in the latter. On the other hand, relation extraction models focus primarily on intra-sentence entity pairs, failing to adequately model cross-sentence relationships, paragraph-level evidence, and document-level comorbidity associations, easily overlooking valuable implicit comorbidity knowledge.

[0005] Knowledge graph technology can organize medical knowledge in the form of nodes, edges, and attributes, connecting concepts such as diseases, symptoms, drugs, examination indicators, and risk factors into a computable semantic network, providing fundamental support for knowledge retrieval, path reasoning, evidence tracing, and intelligent question answering. Existing medical knowledge graphs typically rely on existing medical ontology or structured databases for construction, failing to absorb newly added relationships from the latest literature in a timely manner, and lacking fine-grained relationship extraction and evidence association mechanisms for comorbidity scenarios. Furthermore, the standardization of medical entities remains a key issue in knowledge graph construction. If free text entities in literature cannot be accurately mapped to standard medical concepts such as UMLS, MeSH, ICD, or SNOMED CT, a large number of redundant nodes will appear in the graph, affecting subsequent querying, statistical analysis, and reasoning.

[0006] In summary, existing medical literature suffers from scattered distribution of comorbidity knowledge, inconsistent entity representations, implicit relational expressions with significant cross-sentence dependencies, insufficient cross-sentence relation extraction, and lagging graph updates. Manual compilation methods, in particular, are inefficient, slow to update, and have limited coverage, making it difficult to simultaneously guarantee accurate entity recognition and complete relation extraction. Therefore, it is necessary to propose a method for constructing comorbidity knowledge graphs for medical literature, integrating medical literature acquisition, text structuring, named entity recognition, relation extraction, entity standardization, triple fusion, and graph database storage into a unified design. Summary of the Invention

[0007] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for constructing a medical literature comorbidity knowledge graph that integrates named entity recognition. This method employs a pre-trained medical language model to enhance the semantic understanding of entity and relation extraction, improves the completeness of comorbidity relation identification by introducing cross-sentence modeling and evidence aggregation mechanisms, and enhances the consistency and reliability of the graph through medical ontology mapping and confidence assessment. This method automatically identifies entities such as diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics from medical literature, and extracts comorbidity, concurrence, induction, treatment, and risk associations. It effectively solves problems such as low efficiency of manual compilation of medical literature comorbidity knowledge, inconsistent entity representations, insufficient cross-sentence relation extraction, and lagging graph updates, as well as insufficient automated extraction of medical literature comorbidity knowledge, severe entity redundancy, incomplete relation identification, and low graph update efficiency. It significantly reduces the cost of manually constructing a medical comorbidity knowledge base, improves the efficiency of medical knowledge updates, and provides technical support for disease association analysis, clinical decision support, literature evidence retrieval, and medical intelligent question answering. It has technical advantages such as high automation, accurate relation identification, knowledge traceability, and graph scalability, and has promising application prospects.

[0008] The objective of this invention is achieved as follows: a method for constructing a comorbidity knowledge graph in medical literature that integrates named entity recognition. The method is characterized by using the Entrez interface to acquire PubMed medical literature, utilizing GROBID and scispaCy for full-text parsing and corpus structuring, identifying medical entities such as diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics through the PubMedBERT-BiLSTM-CRF model, further employing the PubMedBERT-Biaffine relation classification model and Graph Attention Network to extract intra-sentence and cross-sentence comorbidity relationships, and combining this with the BioSyn entity normalization model to map extracted entities to standard medical concepts such as UMLS, MeSH, ICD-10, and SNOMED CT. Finally, a comorbidity knowledge graph with evidence traceability is constructed based on Neo4j. The method includes the following steps: Step 1: Use the Entrez interface to crawl medical literature from PubMed, parse the full-text PDF using GROBID, and use scispaCy to perform sentence segmentation, word segmentation, and lexical reconstruction. Output a BioC corpus containing document numbers, sentence indexes, and paragraph positions, specifically including: 1.1: Use NCBI Entrez Programming Utilities to retrieve PubMed bibliographic records, abstracts, keywords, and PMID metadata based on the disease co-occurrence search query.

[0009] 1.2: Use GROBID to convert the full-text PDF to a TEI XML structure while preserving the title, abstract, main text, table descriptions, and reference boundaries.

[0010] 1.3: The en_core_sci_lg model of scispaCy is used to complete medical text sentence segmentation, word segmentation, abbreviation expansion and BioC format conversion.

[0011] Step 2: Perform named entity recognition using the PubMedBERT-BiLSTM-CRF model. Extract medical entities such as diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics based on the BIOES annotation system. Specifically, this includes: 2.1: Construct the BIOES sequence labeling dataset and set diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics as entity categories.

[0012] 2.2: PubMedBERT is used as the context encoder, connected to a BiLSTM layer to capture semantic dependencies before and after, and then the optimal label sequence is output by the CRF layer.

[0013] 2.3: Use the AdamW optimizer to fine-tune the model parameters, and use the entity-level F1 score to select the optimal model weights, saving the entity boundary and class results.

[0014] Step 3: Entity pair relations are extracted using the PubMedBERT-Biaffine relation classification model, and a Graph Attention Network is introduced to model cross-sentence entity dependencies, identifying comorbidity, concurrence, triggering, treatment, and risk associations. Specifically, this includes: 3.1: Construct candidate entity pairs based on the named entity recognition results, and filter invalid combinations using entity type constraints, sentence distance thresholds, and paragraph position.

[0015] 3.2: The candidate entity pairs are fed into the PubMedBERT-Biaffine relation classifier, and the medical relation category is predicted using the biaffine scoring function.

[0016] 3.3 Construct a local text graph with entities as nodes and candidate relations as edges, and use GAT to update node representations to enhance the ability to extract cross-sentence relations.

[0017] Step 4: Using the BioSyn entity normalization model, the extracted entities are mapped to UMLS, MeSH, ICD-10, and SNOMED CT. High-confidence triples are generated by combining confidence calculation, synonym merging, and conflict resolution. Specifically, this includes: 4.1 The BioSyn model is used to calculate the dense vector similarity between entity text and medical standard concepts, and UMLS concept number mapping is completed.

[0018] 4.2: Synonymous entities are merged based on MeSH, ICD-10 and SNOMED CT codes, while retaining the original entity name as an evidence traceability attribute.

[0019] 4.3: Calculate the confidence of triples based on relational model probability, standardized similarity, and document source weight, and delete low-confidence conflicting triples.

[0020] Step 5: Store comorbidity triples using the Neo4j graph database, build entity indexes, relation indexes, and evidence indexes using Cypher, and perform missing relation completion and graph quality assessment using the TransE graph embedding model, specifically including: 5.1: Write the disease, symptoms, drugs, test indicators, and population characteristics into the Neo4j node, and write the concept number, entity category, and source fields.

[0021] 5.2: Write the associations of comorbidity, complications, triggers, treatments, and risks into Neo4j edges, and configure PMID, evidence sentences, confidence levels, and publication time attributes.

[0022] 5.3: Train the TransE graph embedding model to obtain entity and relation vectors, identify candidate missing edges based on link prediction scores, and submit them for manual review.

[0023] Step 6: Construction and Incremental Update of Comorbidity Knowledge Graph Step 6: Construction and Incremental Update of Comorbidity Knowledge Graph Based on newly added medical literature, incremental entity recognition, relation extraction, and triple fusion are performed. A timestamp version management and conflict detection mechanism are used to update the knowledge graph. Graph reasoning and consistency verification are used to maintain the integrity of the graph structure and the timeliness of knowledge. Specifically, this includes: 6.1: Regularly monitor newly added medical literature in PubMed, establish an incremental update queue based on PMID and publication time, and perform entity identification and relation extraction only on newly added or revised literature; 6.2: Perform entity alignment and relation conflict detection between the newly added triples and the existing knowledge graph, and complete the graph fusion and update based on confidence level, document timeliness and evidence quantity; 6.3: A joint verification method of rule reasoning and graph embedding is adopted to detect isolated nodes, duplicate relationships and semantic conflicts, and the version number and timestamp are used to record the graph update history to realize dynamic maintenance of the knowledge graph.

[0024] Compared with the prior art, the present invention has the following beneficial technical effects and significant technical progress: 1) This invention establishes a continuous processing flow for medical literature parsing, named entity recognition, relation extraction, and comorbidity knowledge graph construction. It employs the PubMedBERT-BiLSTM-CRF model to identify medical entities such as diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics. Furthermore, it uses the PubMedBERT-Biaffine relation classification model to extract comorbidity, concurrence, precipitation, treatment, and risk associations between entities. Compared to existing methods that rely on manual collation, dictionary matching, or rule templates, this invention fully utilizes the contextual semantic information of medical texts, reduces entity boundary recognition errors and relation judgment biases, and improves the accuracy, completeness, and automation of comorbidity knowledge extraction from medical literature.

[0025] 2) This invention introduces a Graph Attention Network to model cross-sentence entity dependencies and local text graph structures, and combines it with a BioSyn model to perform entity standardization, mapping free text entities in the literature to standard medical concepts such as UMLS, MeSH, ICD-10, and SNOMED CT. Then, highly reliable comorbidity knowledge is generated through confidence calculation, synonym merging, and conflict triple filtering. Compared with existing methods that only rely on intra-sentence relation extraction or simple entity co-occurrence statistics, this invention can effectively identify implicit comorbidity relationships scattered across different sentences and paragraphs, reduce entity redundancy and relation noise, and improve the consistency, traceability, and clinical application value of the knowledge graph. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 is a schematic diagram of the specific operation of Example 1. Detailed Implementation

[0027] This invention first constructs a medical literature corpus oriented towards comorbidity research, cleaning, segmenting, word segmentation, paragraph location, and BioC format conversion of bibliographic records, abstracts, and full texts to form standardized input data with document numbers, sentence indexes, and evidence locations. Second, a medical entity category system is established, using PubMedBERT to extract contextual semantic representations, combining BiLSTM to capture sequence dependencies, and outputting the globally optimal entity label sequence through a CRF layer. Then, candidate entity pairs are constructed based on entity recognition results, and the PubMedBERT-Biaffine model is used to calculate the matching scores of entity pairs on different relation types. GAT is used to encode cross-sentence entity dependencies and local text graph structures to obtain relation results such as comorbidity, concurrence, induction, treatment, and risk association. Subsequently, BioSyn is used to complete entity normalization and synonym merging. Triple confidence is calculated based on relation prediction probability, standardized similarity, number of evidence sentences, and document source weights to filter out low-confidence and conflicting knowledge. Finally, the high-confidence triples are written into the Neo4j graph database to establish entity indexes, relation indexes, and evidence indexes. The TransE graph embedding model is then used to predict missing relations and assess graph quality, thereby forming a searchable, scalable, and traceable medical literature comorbidity knowledge graph.

[0028] The specific implementation of this invention is as follows: First, a medical literature acquisition and preprocessing module is constructed. NCBIEntrez Programming Utilities is used to retrieve PubMed literature titles, abstracts, keywords, PMIDs, publication dates, and source journal information according to the comorbidity topic search query. The acquired full-text PDFs are parsed into TEI XML structured text using GROBID, extracting the title, abstract, main text, figure and table descriptions, and conclusion paragraphs. The en_core_sci_lg model of scispaCy is used for sentence segmentation, word segmentation, lexical reconstruction, and abbreviation expansion. Each sentence is bound to PMID, paragraph number, sentence number, and original text position, and converted into BioC format corpus. Next, a medical entity recognition module is constructed, setting six entity labels: disease, symptom, drug, examination indicators, risk factors, and population characteristics. Training samples are generated using the BIOES annotation method. The text is input into the PubMed BERT encoder to obtain a context vector representation, and then input into a BiLSTM layer to capture sequential dependencies. Finally, the optimal entity label sequence is obtained through CRF layer decoding, outputting the entity name, entity category, start and end positions, sentence number, and recognition confidence. Subsequently, a relation extraction module was constructed to generate candidate entity pairs based on entity recognition results. Invalid entity pairs were filtered out according to entity type combination, inter-sentence distance threshold, and paragraph range. The candidate entity pairs and their contexts were then input into the PubMedBERT-Biaffine relation classification model. The model predicted comorbidity, concurrence, precipitation, treatment, and risk associations through a dual affine scoring function. At the same time, entities in adjacent sentence groups of the same document were constructed as local text graphs. Entities were used as nodes and candidate relations as edges. The Graph Attention Network was used to update the entity representations and classify cross-sentence entity relations. Finally, a knowledge fusion and graph storage module was constructed. The BioSyn model was used to calculate the similarity between extracted entities and standard concepts of UMLS, MeSH, ICD-10, and SNOMED CT. The highest matching concept was selected to complete entity standardization. Synonymous entities were merged into unified nodes. The confidence of triples was calculated according to relation prediction probability, entity standardization similarity, number of evidence sentences, and literature source weight. Low-confidence triples and conflicting triples were deleted. The retained head entity, relation type, tail entity, PMID, evidence sentence, confidence, and publication time were written into the Neo4j graph database. Entity index, relation index, and evidence index were established. The TransE model was used to train entity vectors and relation vectors to predict links for candidate missing relations, forming a medical literature comorbidity knowledge graph that can be incrementally updated.

[0029] See Figure 1 The present invention specifically includes the following steps: Step 1: Medical Literature Collection The Entrez interface was used to crawl medical literature from PubMed, full-text PDFs were parsed using GROBID, and scispaCy was used for sentence segmentation, word segmentation, and lexical reconstruction. The output was a BioC corpus containing reference numbers, sentence indexes, and paragraph positions, specifically including: 1.1: Use NCBI Entrez Programming Utilities to retrieve PubMed bibliographic records, abstracts, keywords, and PMID metadata based on the disease co-occurrence search query.

[0030] 1.2: Use GROBID to convert the full-text PDF to a TEI XML structure while preserving the title, abstract, main text, table descriptions, and reference boundaries.

[0031] 1.3: The en_core_sci_lg model of scispaCy is used to complete medical text sentence segmentation, word segmentation, abbreviation expansion and BioC format conversion.

[0032] Step 2: Full Text Analysis and Corpus Preprocessing The PubMedBERT-BiLSTM-CRF model was used to perform named entity recognition. Based on the BIOES annotation system, medical entities such as diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics were extracted, specifically including: 2.1: Construct the BIOES sequence labeling dataset and set diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics as entity categories.

[0033] 2.2: PubMedBERT is used as the context encoder, connected to a BiLSTM layer to capture semantic dependencies before and after, and then the optimal label sequence is output by the CRF layer.

[0034] 2.3: Use the AdamW optimizer to fine-tune the model parameters, and use the entity-level F1 score to select the optimal model weights, saving the entity boundary and class results.

[0035] Step 3: Medical Named Entity Recognition The PubMedBERT-Biaffine relation classification model is used for entity pair relation extraction, and a GraphAttention Network is introduced to model cross-sentence entity dependencies, identifying comorbidity, concurrence, triggering, treatment, and risk associations, specifically including: 3.1: Construct candidate entity pairs based on the named entity recognition results, and filter invalid combinations using entity type constraints, sentence distance thresholds, and paragraph position.

[0036] 3.2: The candidate entity pairs are fed into the PubMedBERT-Biaffine relation classifier, and the medical relation category is predicted using the biaffine scoring function.

[0037] 3.3: Construct a local text graph with entities as nodes and candidate relations as edges, and use GAT to update node representations to enhance the ability to extract cross-sentence relations.

[0038] Step 4: Extraction of comorbidity relationships The BioSyn entity normalization model is used to map extracted entities to UMLS, MeSH, ICD-10, and SNOMED CT. High-confidence triples are generated by combining confidence calculation, synonym merging, and conflict resolution. Specifically, this includes: 4.1: The BioSyn model is used to calculate the dense vector similarity between entity text and medical standard concepts, and the UMLS concept number mapping is completed.

[0039] 4.2: Synonymous entities are merged based on MeSH, ICD-10 and SNOMED CT codes, while retaining the original entity name as an evidence traceability attribute.

[0040] 4.3: Calculate the confidence of triples based on relational model probability, standardized similarity, and document source weight, and delete low-confidence conflicting triples.

[0041] Step 5: Entity Standardization and Triple Integration The Neo4j graph database was used to store comorbidity triples. Cypher was used to build entity, relation, and evidence indexes. The TransE graph embedding model was employed for missing relation completion and graph quality assessment, specifically including: 5.1: Write the disease, symptoms, drugs, test indicators, and population characteristics into the Neo4j node, and write the concept number, entity category, and source fields.

[0042] 5.2: Write the associations of comorbidity, complications, triggers, treatments, and risks into Neo4j edges, and configure PMID, evidence sentences, confidence levels, and publication time attributes.

[0043] 5.3: Train the TransE graph embedding model to obtain entity and relation vectors, identify candidate missing edges based on link prediction scores, and submit them for manual review.

[0044] Step 6: Construction and Incremental Update of Comorbidity Knowledge Graph Based on newly added medical literature, incremental entity recognition, relation extraction, and triple fusion are performed. A timestamp version management and conflict detection mechanism are used to update the knowledge graph. Graph reasoning and consistency verification are used to maintain the integrity of the graph structure and the timeliness of knowledge. Specifically, this includes: 6.1: Regularly monitor newly added medical literature in PubMed, establish an incremental update queue based on PMID and publication time, and perform entity identification and relation extraction only on newly added or revised literature.

[0045] 6.2: The newly added triples are aligned with the existing knowledge graph for entity alignment and relation conflict detection. The graph is then fused and updated based on confidence level, document timeliness, and the amount of evidence.

[0046] 6.3: A joint verification method of rule reasoning and graph embedding is adopted to detect isolated nodes, duplicate relationships and semantic conflicts, and the version number and timestamp are used to record the graph update history to realize dynamic maintenance of the knowledge graph.

[0047] The invention will be further described below with reference to specific examples and accompanying drawings. Example

[0048] See Figure 2 This embodiment uses English medical literature related to diabetes and cardiovascular disease indexed in PubMed as the data source. The specific steps are as follows: Step 1: Entrez retrieves bibliographic records, abstracts, and PMIDs. The NCBI Entrez Programming Utilities were used to set up a search query to obtain the title, abstract, keywords, PMID, publication year, and journal source information of the literature, and to download the available full-text PDF files.

[0049] Step 2: Parse the full-text PDF using GROBID GROBID 0.8.0 was used to parse the PDF into TEI XML format, extract the text of the title, abstract, main text, results, discussion and conclusion, and remove references, author information, headers and footers and duplicate paragraphs.

[0050] Step 3: scispaCy generates BioC format corpus The en_core_sci_lg model of scispaCy is used for sentence segmentation, word segmentation, lexical reconstruction and abbreviation recognition. Each sentence is bound to PMID, paragraph number, sentence number and character offset position to generate BioC format corpus file.

[0051] Step 4: PubMedBERT-BiLSTM-CRF Recognition of Medical Entities The PubMedBERT-BiLSTM-CRF model was used for medical named entity recognition. The entity categories were set as diseases, symptoms, drugs, examination indicators, risk factors and population characteristics. The BIOES annotation system was used to mark the entity boundaries. PubMedBERT output a 768-dimensional context vector, the BiLSTM hidden layer dimension was set to 256, and the CRF layer output the globally optimal label sequence to obtain the entity name, entity category, start and end positions and recognition confidence.

[0052] Step 5: Construct candidate entity pairs within and across sentences Candidate entity pairs are constructed based on the recognition results. Entity pairs within the same sentence and entity pairs within three adjacent sentence windows are used as inputs for relation extraction. Candidate pairs that do not conform to the rules for combinations of diseases with diseases, diseases with risk factors, diseases with symptoms, diseases with drugs, and diseases with examination indicators are eliminated. For cross-sentence candidate relations, a local text graph is constructed with entities as nodes and candidate relations as edges. A two-layer Graph Attention Network is used to update the entity representations, and the updated entity vectors are input into a Softmax classification layer to obtain the cross-sentence relation results.

[0053] Step 6: Extract medical relationships Relation extraction was performed using the PubMedBERT-Biaffine model, with relation categories set as comorbidity, concomitant, precipitating, treatment, risk association, and no relation. The two affine layers output scores for each relation category.

[0054] Step 7: Enhance the judgment of cross-sentence relationships The records are grouped into triples consisting of the head entity, relation type, tail entity, PMID, evidence sentence, paragraph position, publication year, and confidence level. Records with a confidence level below 0.70 are deleted.

[0055] Step 8: BioSyn maps UMLS and other standard concepts After relation extraction, the BioSyn model is used to map entity names to UMLS, MeSH, ICD-10 and SNOMEDCT standard concepts, and the concept with the highest weighted similarity between dense vectors and sparse word surface is taken as the standard entity.

[0056] Step 9: Neo4 writes the triple and TransE Standard diseases, symptoms, medications, examination indicators, risk factors, and population characteristics are written into the Neo4j 5.0 graph database. Comorbidities, complications, triggers, treatments, and risks are written into relation edges. Entity name index, standard concept index, PMID index, and relation type index are established. A 128-dimensional entity vector and relation vector are trained using the TransE model to obtain a knowledge graph of diabetes and cardiovascular disease comorbidity.

[0057] The above description is only a preferred embodiment of the present invention. Modifications may be made within the scope defined by the claims of the present invention, but all such modifications shall fall within the protection scope of the present invention.

Claims

1. A method for constructing a medical literature comorbidity knowledge graph integrating named entity recognition, characterized in that, The method includes the following steps: Step 1: Medical Literature Collection We use the Entrez interface to crawl medical literature from PubMed, use GROBID to parse full-text PDFs, and use scispaCy to perform sentence segmentation, word segmentation, and lexical reconstruction, outputting BioC corpus containing document numbers, sentence indexes, and paragraph positions. Step 2: Full Text Analysis and Corpus Preprocessing The PubMedBERT-BiLSTM-CRF model was used to perform named entity recognition, and medical entities such as diseases, symptoms, drugs, examination indicators, risk factors and population characteristics were extracted based on the BIOES annotation system. Step 3: Medical Named Entity Recognition The PubMedBERT-Biaffine relation classification model is used to extract entity pairs, and a GraphAttention Network is introduced to model cross-sentence entity dependencies to identify comorbidity, concurrence, precipitation, treatment and risk associations. Step 4: Extraction of comorbidity relationships The extracted entities are mapped to UMLS, MeSH, ICD-10 and SNOMED CT using the BioSyn entity normalization model, and high-confidence triples are generated by combining confidence calculation, synonym merging and conflict resolution. Step 5: Entity Standardization and Triple Integration The Neo4j graph database was used to store comorbid triples. Cypher was used to build entity indexes, relation indexes and evidence indexes. TransE graph embedding model was used to complete missing relations and assess graph quality. Step 6: Construction and Incremental Update of Comorbidity Knowledge Graph Based on newly added medical literature, incremental entity recognition, relation extraction and triple fusion are performed. The knowledge graph is updated with timestamp version management and conflict detection mechanisms. The integrity of the graph structure and the timeliness of knowledge are maintained through graph reasoning and consistency verification.

2. The method for constructing a medical literature comorbidity knowledge graph based on named entity recognition according to claim 1, characterized in that, The specific operations of step 1 include: 1.1: Use NCBI Entrez Programming Utilities to retrieve PubMed bibliographic data, abstracts, keywords, and PMID metadata based on disease co-occurrence search terms; 1.2: Use GROBID to convert the full-text PDF to a TEI XML structure, while preserving the title, abstract, main text, table descriptions, and reference boundaries; 1.3: The en_core_sci_lg model of scispaCy is used to complete medical text sentence segmentation, word segmentation, abbreviation expansion and BioC format conversion.

3. The method for constructing a medical literature comorbidity knowledge graph integrating named entity recognition according to claim 1, characterized in that, Step 2 includes the following specific operations: 2.1: Construct the BIOES sequence labeling dataset, and set diseases, symptoms, drugs, examination indicators, risk factors, and population characteristics as entity categories; 2.2: PubMedBERT is used as the context encoder, connected to a BiLSTM layer to capture semantic dependencies before and after, and then the optimal label sequence is output by the CRF layer; 2.3: Use the AdamW optimizer to fine-tune the model parameters, and use the entity-level F1 score to select the optimal model weights, saving the entity boundary and class results.

4. The method for constructing a medical literature comorbidity knowledge graph integrating named entity recognition according to claim 1, characterized in that, The specific operations of step 3 include: 3.1: Construct candidate entity pairs based on the named entity recognition results, and filter invalid combinations using entity type constraints, inter-sentence distance thresholds, and paragraph position; 3.2: The candidate entity pairs are fed into the PubMedBERT-Biaffine relation classifier, and the medical relation category is predicted using the biaffine scoring function; 3.3: Construct a local text graph with entities as nodes and candidate relations as edges, and use GAT to update node representations to enhance the ability to extract cross-sentence relations.

5. The method for constructing a medical literature comorbidity knowledge graph integrating named entity recognition according to claim 1, characterized in that, The specific operations of step 4 include: 4.1: The BioSyn model is used to calculate the dense vector similarity between entity text and medical standard concepts, and UMLS concept number mapping is completed; 4.2: Synonymous entities are merged based on MeSH, ICD-10, and SNOMED CT codes, while retaining the original entity names as evidence tracing attributes; 4.3: Calculate the confidence of triples based on relational model probability, standardized similarity, and document source weight, and delete low-confidence conflicting triples.

6. The method for constructing a medical literature comorbidity knowledge graph integrating named entity recognition according to claim 1, characterized in that, The specific operations of step 5 include: 5.1: Write the disease, symptoms, drugs, test indicators, and population characteristics into the Neo4j node, and write the concept number, entity category, and source field; 5.2: Write the associations of comorbidity, complications, triggers, treatments, and risks into Neo4j edges, and configure PMID, evidence sentences, confidence levels, and publication time attributes; 5.3: Train the TransE graph embedding model to obtain entity and relation vectors, identify candidate missing edges based on link prediction scores, and submit them for manual review.

7. The method for constructing a medical literature comorbidity knowledge graph integrating named entity recognition according to claim 1, characterized in that, The specific operations of step 6 include: 6.1: Regularly monitor newly added medical literature in PubMed, establish an incremental update queue based on PMID and publication time, and perform entity identification and relation extraction only on newly added or revised literature; 6.2: Perform entity alignment and relation conflict detection between the newly added triples and the existing knowledge graph, and complete the graph fusion and update based on confidence level, document timeliness and evidence quantity; 6.3: A joint verification method of rule reasoning and graph embedding is adopted to detect isolated nodes, duplicate relationships and semantic conflicts, and the version number and timestamp are used to record the graph update history to realize dynamic maintenance of the knowledge graph.