Big data medical record linkage analysis method based on knowledge graph
By constructing a multi-level medical record knowledge graph using improved BioBERT and Graphormer models and employing the Dual-AMN method for entity alignment, the problem of integrating multi-source medical record data and cross-regional linkage was solved, achieving high-precision medical record analysis and prediction and enhancing the application value of medical record data.
Patent Information
- Application Number
- CN202511744638.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-01-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing medical big data analysis methods are difficult to effectively integrate multi-source heterogeneous medical record data, lack cross-institutional and cross-regional collaborative analysis capabilities, and existing knowledge graph technologies ignore temporal and structural features when aligning entities, resulting in insufficient entity alignment accuracy and affecting the accuracy of disease prediction and recommendation.
We employ an improved BioBERT model and an improved Graphormer model for unified modeling and analysis of medical record data. We construct patient-level, disease-level, and region-level knowledge graphs, and use the Dual-AMN method for entity alignment to generate similar medical record recommendations, complication predictions, and population pattern discovery results. These results are then presented through graph visualization and interactive queries.
It achieves efficient fusion and accurate alignment of multi-source medical record data, improves the accuracy of disease diagnosis, complication prediction and population disease research, and enhances the clinical decision support capabilities of medical record data.
Smart Images

Figure CN121439265A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical big data processing and artificial intelligence technology, and in particular to a big data medical record linkage analysis method based on knowledge graphs. Background Technology
[0002] With the continuous advancement of medical informatization, electronic medical records, laboratory testing systems, medical image archiving systems, and electronic prescription systems are widely used in medical institutions at all levels, resulting in massive amounts of medical record data. This medical record data covers multi-source heterogeneous information such as disease diagnosis, symptom description, laboratory indicators, imaging reports, and drug prescriptions, and is characterized by diverse data types, complex semantic expressions, and large time spans. Traditional medical record management methods mainly rely on structured storage and single-dimensional statistical analysis, which makes it difficult to comprehensively depict the disease evolution process and the characteristics of patient groups, thus limiting the value of medical record data in clinical decision support, complication prediction, and disease pattern research.
[0003] Existing medical big data analysis methods largely rely on rule-based processing or single machine learning models. These methods typically focus only on a single type of data, such as entity recognition only for electronic medical record text or numerical analysis only for laboratory indicators, lacking unified modeling for multi-source medical record data. Furthermore, medical record data from different sources suffers from inconsistencies in terminology, formatting, and timestamps, making it difficult to directly link medical record information across institutions and regions, thus hindering the in-depth mining of data value.
[0004] In recent years, knowledge graph technology has gradually emerged in the medical field. Knowledge graphs can uniformly represent medical entities and their relationships through nodes and edges, providing a new approach for semantic modeling and interconnected analysis of medical record data. However, existing medical research based on knowledge graphs largely focuses on publicly available medical literature or drug databases, lacking multi-level modeling and cross-graph alignment methods for real medical record data. Furthermore, in the alignment stage, traditional entity matching methods often rely solely on string similarity or simple vector similarity, failing to consider both temporal and structural features in medical record data, resulting in insufficient entity alignment accuracy and thus affecting the accuracy of similar case recommendations and disease prediction.
[0005] Therefore, how to provide a big data medical record linkage analysis method based on knowledge graphs is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a big data medical record linkage analysis method based on knowledge graphs. This invention comprehensively utilizes medical record data preprocessing, an improved BioBERT model, an improved Graphormer model, and the Dual-AMN method to uniformly model and analyze electronic medical record texts, test indicators, medical imaging reports, and prescription records. It constructs patient-level, disease-level, and region-level medical record knowledge graphs, completes medical entity extraction, relationship identification, and cross-graph entity alignment, generates similar medical record recommendations, complication predictions, and population pattern discovery results, and realizes case tracking, similar case retrieval, and disease evolution pattern analysis through graph visualization and interactive queries. It has the advantages of high data fusion, high entity recognition and alignment accuracy, and support for clinical decision support and population disease research.
[0007] A method for big data medical record linkage analysis based on knowledge graph according to an embodiment of the present invention includes the following steps:
[0008] Collect electronic medical record texts, laboratory indicators, medical imaging reports, and prescription records, and preprocess them to obtain preprocessed medical record data;
[0009] Based on preprocessed medical record data, the improved BioBERT model was used to extract five categories of medical entities: disease, symptoms, examination, test, and drug. Co-morbidity, temporal, and similarity relationships were identified to obtain a set of medical entities and a set of relationships.
[0010] Using medical entity sets as nodes and relation sets as edges, a patient-level medical record knowledge graph, a disease-level medical record knowledge graph, and a region-level medical record knowledge graph are constructed using a graph database.
[0011] Based on the medical record knowledge graph, an improved Graphormer model is used for representation learning to generate low-dimensional vector representations containing features of the medical record knowledge graph.
[0012] The Dual-AMN method is used to map low-dimensional vector representations. The alignment of medical entities in different medical record knowledge graphs is completed through structural attention and semantic attention mechanisms. Based on the alignment results, similar medical record recommendations, complication predictions and group pattern discovery results are generated.
[0013] The results of similar case recommendations, complication predictions, and population pattern discovery are presented through graph visualization and interactive queries, generating services for case tracking, similar case retrieval, and disease evolution pattern analysis.
[0014] Optionally, the preprocessing specifically includes:
[0015] Electronic medical record texts are segmented, noise characters are removed, terminology is standardized, and mapped to a medical coding system to form structured text data;
[0016] Unit conversion and dimension unification of the test indicators are performed, missing value filling and outlier detection are carried out, and numerical calibration is performed according to the reference interval, while retaining the data collection time information;
[0017] The medical imaging report is structured and parsed, the examination site and conclusive description are extracted, the site is standardized and mapped to the imaging terminology set to form structured imaging fields;
[0018] Standardize the generic name, dosage form and specifications of the drugs in the prescription records, analyze the dosage, frequency of administration and route of administration, and map them to the drug classification code;
[0019] Unify patient identifiers and timestamps for electronic medical record texts, laboratory indicators, medical imaging reports, and prescription records; construct a time series of visits; and perform field consistency and integrity checks, merging duplicate records.
[0020] The preprocessed electronic medical record texts, test results, medical imaging reports, and prescription records are stored in a unified format to form preprocessed medical record data.
[0021] Optionally, the improved BioBERT model specifically includes:
[0022] The improved BioBERT model includes an input layer, an embedding layer, an encoding layer, a decoding layer, a conflict resolution module, a relation recognition module, and a fine-tuning module.
[0023] The input layer segments the preprocessed medical record data, retains the character offset and timestamp index, and adds the visit time interval code and source type code to each token;
[0024] The embedding layer loads weights that are pre-trained based on a large-scale electronic medical record corpus. Word embeddings, time interval embeddings, and source type embeddings are concatenated and then input into a fully connected layer for linear mapping. After layer normalization, a unified input representation is formed.
[0025] The coding layer stacks multiple bidirectional Transformer encoders, introduces relative position bias and temporal mask in attention calculation, performs context modeling on the unified input representation, and generates a tag-level representation vector containing semantic dependencies and temporal constraints;
[0026] The decoding layer constructs a fragment-level decoder consisting of a Biaffine scorer and two fully connected network layers. It performs boundary determination and category classification on the labeled representation vectors and outputs disease, symptom, examination, test and drug candidate entities and their corresponding confidence scores.
[0027] The conflict resolution module sorts overlapping and cross-candidates from high to low confidence, uses the longest span priority strategy to resolve boundary conflicts, and uses the category priority rule to optimize in the case of multi-class overlap, generating a medical entity set;
[0028] The relationship recognition module takes a set of medical entities as input, determines the comorbidity relationship based on co-occurrence frequency and a fixed threshold within the same patient's same consultation time window, establishes directed edges according to timestamp order to form temporal relationships, and identifies similarity relationships by combining cosine similarity of context representation with consistency constraints of medical synonym vocabulary. Comorbidity relationship, temporal relationship and similarity relationship are combined to form a relationship set;
[0029] The fine-tuning module uses the LoRA method, which inserts low-rank decomposition parameters into the attention projection matrix to limit the update range and keep the original parameters frozen. The training objective is a weighted combination of sequence labeling cross-entropy loss, fragment classification cross-entropy loss, and relation classification cross-entropy loss.
[0030] Output the medical entity set and relation set.
[0031] Optionally, the construction of patient-level, disease-level, and region-level medical record knowledge graphs using a graph database, with medical entity sets as nodes and relation sets as edges, specifically includes:
[0032] Using disease, symptom, examination, test and drug entities in a single patient's medical record as nodes, and comorbidity, temporal relationship and similarity relationship identified in the medical record as edges, the knowledge graph of patient-level medical records is constructed by storing and connecting them in a graph database.
[0033] Standardized disease entities belonging to the same disease category in multiple patient medical records are used as core nodes, and related symptom, examination, test and drug entities are used as extension nodes. Co-morbidity, temporal and similarity relationships obtained across patients are used as edges. The data is organized in a graph database to construct a disease-level medical record knowledge graph.
[0034] Using patient-level and disease-level medical record knowledge graphs as subgraphs, and combining them with unified patient identifiers and disease classification rules within the region, along with comorbidity, temporal, and similarity relationships after cross-institutional integration as edges, the graph database is used to complete overall linking and merging, thus constructing a regional-level medical record knowledge graph.
[0035] Optionally, the improved Graphormer model specifically includes:
[0036] The improved Graphormer model includes an input layer unit, an embedding layer unit, a graph structure encoding layer unit, a global modeling module, a stability enhancement module, and an output layer unit.
[0037] The input layer unit receives medical entity sets from patient-level medical record knowledge graphs, disease-level medical record knowledge graphs, and region-level medical record knowledge graphs as node inputs, and receives co-disease relationships, temporal relationships, and similarity relationships contained in the relationship set as edge inputs. It generates a set of node features containing semantic features, attribute features, and contextual information, as well as a set of edge features containing relationship type, direction, and time interval information.
[0038] The embedding layer unit jointly encodes the node feature set and the edge feature set. It adds node degree, node betweenness and node clustering coefficient to the node features, and adds relation type encoding and time interval encoding to the edge features to form an extended feature set. The extended feature set is then concatenated and mapped and normalized by a fully connected layer to output a unified input representation.
[0039] The graph structure coding layer unit receives a unified input representation, uses a multi-layer graph Transformer encoder for propagation and updating, introduces a weight factor based on relation type and a bias term based on time interval in the attention calculation, and outputs a node representation vector containing semantic dependencies, structural dependencies and temporal constraints.
[0040] The global modeling module receives node representation vectors, introduces virtual global nodes and connects them to all nodes, aggregates context information across nodes and subgraphs, and generates an enhanced representation that includes global context.
[0041] The stability enhancement module receives the enhanced representation, applies residual connections and layer normalization in each layer of the graph Transformer encoder, applies random deactivation in the feedforward sublayer, and performs learning rate scheduling and weight regularization during training, outputting a representation vector with stability control.
[0042] The output layer unit receives the representation vector, performs average pooling and attention-based weighted pooling on all node representations, and generates a low-dimensional vector representation with a dimension smaller than the input feature dimension. The low-dimensional vector representation contains the semantic features, structural features and temporal features of the medical record knowledge graph.
[0043] Optionally, the Dual-AMN method is used to map the low-dimensional vector representation, and the alignment of medical entities in different medical record knowledge graphs is completed through structural attention and semantic attention mechanisms. Based on the alignment results, similar medical record recommendations, complication predictions, and group pattern discovery results are generated, specifically including:
[0044] The Dual-AMN method receives low-dimensional vector representations and inputs medical entities from patient-level medical record knowledge graphs, disease-level medical record knowledge graphs, and region-level medical record knowledge graphs.
[0045] The structural attention mechanism is used to calculate the structural similarity of medical entities in different medical record knowledge graphs. The structural similarity is calculated based on the adjacency relationship of the entities.
[0046] The semantic attention mechanism is used to calculate the semantic similarity of medical entities in different medical record knowledge graphs. The semantic similarity is calculated based on the context features in the low-dimensional vector representation.
[0047] A comprehensive similarity matrix is generated by combining structural similarity and semantic similarity. Based on the comprehensive similarity matrix and a preset threshold, the alignment relationship of medical entities is determined, and the entity alignment results across the medical record knowledge graph are output.
[0048] Merge low-dimensional vector representations mapped to the same medical entity to form a single entity node. Connect medical entities with time attributes in the order of timestamps to form a temporal chain. Establish parallel relationships between medical entities with co-occurrence relationships to form a co-disease link.
[0049] Based on entity alignment results, perform similar case recommendation, retrieve and sort cases with high entity alignment, and output similar case recommendations. Based on entity alignment results, perform complication prediction, analyze temporal chains and infer potential complications, and output complication predictions. Based on entity alignment results, perform group pattern discovery, aggregate alignment relationships of similar entities and generate group pattern discovery results output.
[0050] Optionally, the results of similar case recommendations, complication predictions, and population pattern discovery are displayed through graph visualization and interactive queries to generate case tracking, similar case retrieval, and disease evolution pattern analysis services, specifically including:
[0051] It receives similar medical record recommendation results, complication prediction results, and group pattern discovery results, and establishes indexes and associations with patient-level medical record knowledge graphs, disease-level medical record knowledge graphs, and regional medical record knowledge graphs to form a callable data set;
[0052] The medical entity set and relation set are loaded into the query results of the graph database, and a visual graph structure containing nodes and edges is constructed. Nodes represent disease, symptom, examination, test and drug entities, and edges represent comorbidity, temporal relationship and similarity relationship.
[0053] The similar case recommendation results are mapped to a visual subgraph, and the recommended cases are highlighted according to the similarity score.
[0054] The complication prediction results are mapped to a time evolution graph, which displays the predicted potential complication nodes in the order of timestamps, and distinguishes between diseases that have occurred and predicted diseases by color coding, generating an interactive evolution chain.
[0055] The population pattern discovery results are mapped to an aggregated graph structure to display the disease patterns that frequently occur within the population. The population-level pattern atlas is generated by overlaying the alignment relationships of multiple cases.
[0056] Receive search instructions, perform interactive queries on similar case recommendation results, and return relevant case subgraphs according to the medical entity input conditions;
[0057] Perform interactive queries on complication prediction results to retrieve potential complication pathways by patient identifier or time criteria;
[0058] Perform interactive queries on the group pattern discovery results, and retrieve aggregated patterns according to disease classification or regional scope;
[0059] During the presentation, node scaling, edge filtering, and attribute tag loading are performed, and the hierarchy and range of the visualization graphics can be dynamically adjusted.
[0060] Ultimately, it generates case tracking services, similar case retrieval services, and disease evolution pattern analysis services, and ensures that the query and display results are consistent with the underlying data.
[0061] The beneficial effects of this invention are:
[0062] This invention addresses the challenges of direct data linkage caused by the multi-source heterogeneity, inconsistent terminology, and missing timestamps in existing medical record data by uniformly preprocessing electronic medical record text, laboratory indicators, medical imaging reports, and prescription records. By introducing an improved BioBERT model for medical entity extraction and relation recognition, it significantly improves the accuracy of disease, symptom, examination, test, and drug entity recognition, and can simultaneously identify comorbidity, temporal, and similarity relationships, overcoming the limitations of traditional methods that can only identify single pieces of information. Furthermore, by constructing a multi-level medical record knowledge graph at the patient, disease, and regional levels using medical entity sets as nodes and relation sets as edges, it achieves cross-patient, cross-disease, and cross-regional medical record data organization and semantic modeling, overcoming the limitations of existing knowledge graph applications that are restricted to single corpora or databases. This invention employs an improved Graphormer model in the representation learning process, jointly introducing structural features and temporal biases to ensure that low-dimensional vector representations simultaneously incorporate semantic, structural, and temporal features, thereby enhancing the expressive power of medical record knowledge graph representations. By combining the Dual-AMN method to map low-dimensional vector representations, precise alignment of medical entities across knowledge graphs is achieved under the joint constraints of structural attention and semantic attention mechanisms, addressing the problem of insufficient alignment accuracy caused by existing methods neglecting temporal and structural features. Through intelligent reasoning on the entity alignment results, it can automatically generate similar medical record recommendations, complication predictions, and population pattern discovery results, which are further displayed through graph visualization and interactive queries, generating services for case tracking, similar case retrieval, and disease evolution pattern analysis, enhancing the interpretability and clinical applicability of medical record analysis. This invention realizes a full-chain technical solution from medical record data collection, preprocessing, knowledge graph construction to cross-graph alignment and result display, effectively supporting clinical auxiliary diagnosis, complication risk prediction, and population disease pattern research, improving the integration and application value of medical record data. Attached Figure Description
[0063] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0064] Figure 1 This is a flowchart of a big data medical record linkage analysis method based on knowledge graph proposed in this invention;
[0065] Figure 2 This is a framework diagram of the improved BioBERT model in a big data medical record linkage analysis method based on knowledge graph proposed in this invention;
[0066] Figure 3 This is a framework diagram of the improved Graphormer model in the big data medical record linkage analysis method based on knowledge graph proposed in this invention. Detailed Implementation
[0067] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0068] refer to Figure 1-3 A big data medical record linkage analysis method based on knowledge graphs includes the following steps:
[0069] Collect electronic medical record texts, laboratory indicators, medical imaging reports, and prescription records, and preprocess them to obtain preprocessed medical record data;
[0070] Based on preprocessed medical record data, the improved BioBERT model was used to extract five categories of medical entities: disease, symptoms, examination, test, and drug. Co-morbidity, temporal, and similarity relationships were identified to obtain a set of medical entities and a set of relationships.
[0071] Using medical entity sets as nodes and relation sets as edges, a patient-level medical record knowledge graph, a disease-level medical record knowledge graph, and a region-level medical record knowledge graph are constructed using a graph database.
[0072] Based on the medical record knowledge graph, an improved Graphormer model is used for representation learning to generate low-dimensional vector representations containing features of the medical record knowledge graph.
[0073] The Dual-AMN method is used to map low-dimensional vector representations. The alignment of medical entities in different medical record knowledge graphs is completed through structural attention and semantic attention mechanisms. Based on the alignment results, similar medical record recommendations, complication predictions and group pattern discovery results are generated.
[0074] The results of similar case recommendations, complication predictions, and population pattern discovery are presented through graph visualization and interactive queries, generating services for case tracking, similar case retrieval, and disease evolution pattern analysis.
[0075] In this embodiment, the preprocessing specifically includes:
[0076] Electronic medical record texts are segmented, noise characters are removed, terminology is standardized, and mapped to a medical coding system to form structured text data;
[0077] Unit conversion and dimension unification of the test indicators are performed, missing value filling and outlier detection are carried out, and numerical calibration is performed according to the reference interval, while retaining the data collection time information;
[0078] The medical imaging report is structured and parsed, the examination site and conclusive description are extracted, the site is standardized and mapped to the imaging terminology set to form structured imaging fields;
[0079] Standardize the generic name, dosage form and specifications of the drugs in the prescription records, analyze the dosage, frequency of administration and route of administration, and map them to the drug classification code;
[0080] Unify patient identifiers and timestamps for electronic medical record texts, laboratory indicators, medical imaging reports, and prescription records; construct a time series of visits; and perform field consistency and integrity checks, merging duplicate records.
[0081] The preprocessed electronic medical record texts, test results, medical imaging reports, and prescription records are stored in a unified format to form preprocessed medical record data.
[0082] This implementation method ensures data consistency and integrity by standardizing and timestamping electronic medical record texts, test indicators, medical imaging reports, and prescription records, thereby achieving a structured representation of multi-source medical record data and providing a clean and comparable data foundation.
[0083] In this embodiment, the improved BioBERT model specifically includes:
[0084] The improved BioBERT model includes an input layer, an embedding layer, an encoding layer, a decoding layer, a conflict resolution module, a relation recognition module, and a fine-tuning module.
[0085] The input layer segments the preprocessed medical record data, retains the character offset and timestamp index, and adds the visit time interval code and source type code to each tag. The source type code distinguishes between electronic medical record text, test indicators, medical imaging reports and prescription records.
[0086] The embedding layer loads weights that are pre-trained based on a large-scale electronic medical record corpus. Word embeddings, time interval embeddings, and source type embeddings are concatenated and then input into a fully connected layer for linear mapping. After layer normalization, a unified input representation is formed.
[0087] The coding layer stacks multiple bidirectional Transformer encoders, introduces relative position bias and temporal mask in attention calculation, performs context modeling on the unified input representation, and generates a tag-level representation vector containing semantic dependencies and temporal constraints;
[0088] The decoding layer constructs a fragment-level decoder consisting of a Biaffine scorer and two fully connected network layers. It performs boundary determination and category classification on the labeled representation vectors and outputs disease, symptom, examination, test and drug candidate entities and their corresponding confidence scores.
[0089] The conflict resolution module sorts overlapping and cross-candidates from high to low confidence, uses the longest span priority strategy to resolve boundary conflicts, and uses the category priority rule to optimize in the case of multi-class overlap, generating a medical entity set;
[0090] The relationship recognition module takes a set of medical entities as input. Within the same patient's same consultation time window, it determines the comorbidity relationship based on co-occurrence frequency and a fixed threshold. It establishes directed edges according to timestamp order to form a temporal relationship. It identifies similarity relationships by combining the cosine similarity of context representation with the consistency constraint of the medical synonym vocabulary. In the similarity relationship recognition, for any two medical entities, the semantic similarity is calculated using the context representation vector to obtain a score reflecting the degree of semantic closeness. At the same time, the two medical entities are mapped to the medical synonym vocabulary. If they belong to the same vocabulary concept, they are determined to have synonym consistency. The semantic similarity and synonym consistency are weighted and fused according to a preset weight ratio to form a joint similarity score. When the score is greater than or equal to the set threshold, it is determined that there is a similarity relationship between the two entities. The combination of comorbidity relationship, temporal relationship and similarity relationship forms a relationship set.
[0091] The fine-tuning module uses the LoRA method, inserting low-rank decomposition parameters into the attention projection matrix to limit the update range and keep the original parameters frozen. The training objective is a weighted combination of sequence labeling cross-entropy loss, fragment classification cross-entropy loss, and relation classification cross-entropy loss to achieve efficient adaptation of cross-institutional medical record data.
[0092] Output the medical entity set and relation set.
[0093] This implementation addresses the problems of inaccurate entity boundary recognition, insufficient handling of category overlap, and single dimension of relationship recognition in traditional BioBERT when processing medical record data. It achieves high-precision entity and relationship extraction across medical records, multiple modalities, and multiple time dimensions, effectively improving the completeness and accuracy of medical record knowledge graph construction and providing reliable data support for subsequent knowledge graph representation learning and linkage analysis.
[0094] In this embodiment, the construction of patient-level, disease-level, and region-level medical record knowledge graphs using a graph database with medical entity sets as nodes and relation sets as edges specifically includes:
[0095] Using disease, symptom, examination, test and drug entities in a single patient's medical record as nodes, and comorbidity, temporal relationship and similarity relationship identified in the medical record as edges, the knowledge graph of patient-level medical records is constructed by storing and connecting them in a graph database.
[0096] Standardized disease entities belonging to the same disease category in multiple patient medical records are used as core nodes, and related symptom, examination, test and drug entities are used as extension nodes. Co-morbidity, temporal and similarity relationships obtained across patients are used as edges. The data is organized in a graph database to construct a disease-level medical record knowledge graph.
[0097] Using patient-level and disease-level medical record knowledge graphs as subgraphs, and combining them with unified patient identifiers and disease classification rules within the region, along with comorbidity, temporal, and similarity relationships after cross-institutional integration as edges, the graph database is used to complete overall linking and merging, thus constructing a regional-level medical record knowledge graph.
[0098] This implementation breaks through the limitations of single medical records and single institutions by organizing medical entity sets and relation sets into patient-level, disease-level, and region-level knowledge graphs, and realizes cross-patient, cross-disease, and cross-regional semantic modeling and global association of medical records.
[0099] In this embodiment, the improved Graphormer model specifically includes:
[0100] The improved Graphormer model includes an input layer unit, an embedding layer unit, a graph structure encoding layer unit, a global modeling module, a stability enhancement module, and an output layer unit.
[0101] The input layer unit receives medical entity sets from patient-level medical record knowledge graphs, disease-level medical record knowledge graphs, and region-level medical record knowledge graphs as node inputs, and receives co-disease relationships, temporal relationships, and similarity relationships contained in the relationship set as edge inputs. It generates a set of node features containing semantic features, attribute features, and contextual information, as well as a set of edge features containing relationship type, direction, and time interval information.
[0102] The embedding layer unit jointly encodes the node feature set and the edge feature set. It adds node degree, node betweenness and node clustering coefficient to the node features, and adds relation type encoding and time interval encoding to the edge features to form an extended feature set. The extended feature set is then concatenated and mapped and normalized by a fully connected layer to output a unified input representation.
[0103] The graph structure coding layer unit receives a unified input representation, uses a multi-layer graph Transformer encoder for propagation and updating, introduces a weight factor based on relation type and a bias term based on time interval in the attention calculation, and outputs a node representation vector containing semantic dependencies, structural dependencies and temporal constraints.
[0104] The global modeling module receives node representation vectors, introduces virtual global nodes and connects them to all nodes, aggregates context information across nodes and subgraphs, and generates an enhanced representation that includes global context.
[0105] The stability enhancement module receives the enhanced representation, applies residual connections and layer normalization in each layer of the graph Transformer encoder, applies random deactivation in the feedforward sublayer, and performs learning rate scheduling and weight regularization during training, outputting a representation vector with stability control.
[0106] The output layer unit receives the representation vector, performs average pooling and attention-based weighted pooling on all node representations, and generates a low-dimensional vector representation with a dimension smaller than the input feature dimension. The low-dimensional vector representation contains the semantic features, structural features and temporal features of the medical record knowledge graph.
[0107] This implementation method introduces structural features and temporal biases to perform representation learning on knowledge graphs, generating low-dimensional vector representations. This overcomes the problem of insufficient expressive power in existing methods and realizes a vectorized representation of knowledge graphs that simultaneously incorporates semantic, structural, and temporal features.
[0108] In this embodiment, the Dual-AMN method is used to map the low-dimensional vector representation, and the alignment of medical entities in different medical record knowledge graphs is completed through structural attention and semantic attention mechanisms. Based on the alignment results, similar medical record recommendations, complication predictions, and group pattern discovery results are generated, specifically including:
[0109] The Dual-AMN method receives low-dimensional vector representations and inputs medical entities from patient-level medical record knowledge graphs, disease-level medical record knowledge graphs, and region-level medical record knowledge graphs.
[0110] The structural attention mechanism is used to calculate the structural similarity of medical entities in different medical record knowledge graphs. The structural similarity is calculated based on the adjacency relationship of the entities.
[0111] The semantic attention mechanism is used to calculate the semantic similarity of medical entities in different medical record knowledge graphs. The semantic similarity is calculated based on the context features in the low-dimensional vector representation.
[0112] A comprehensive similarity matrix is generated by combining structural similarity and semantic similarity. Based on the comprehensive similarity matrix and a preset threshold, the alignment relationship of medical entities is determined, and the entity alignment results across the medical record knowledge graph are output.
[0113] Merge low-dimensional vector representations mapped to the same medical entity to form a single entity node. Connect medical entities with time attributes in the order of timestamps to form a temporal chain. Establish parallel relationships between medical entities with co-occurrence relationships to form a co-disease link.
[0114] Based on entity alignment results, perform similar case recommendation, retrieve and sort cases with high entity alignment, and output similar case recommendations. Based on entity alignment results, perform complication prediction, analyze temporal chains and infer potential complications, and output complication predictions. Based on entity alignment results, perform group pattern discovery, aggregate alignment relationships of similar entities and generate group pattern discovery results output.
[0115] This implementation uses the Dual-AMN method to map low-dimensional vector representations and perform cross-graph entity alignment. By integrating structural attention and semantic attention mechanisms, it effectively solves the problem of low entity matching accuracy, achieves accurate alignment of cross-graph medical entities, and provides reliable support for multi-graph linkage analysis.
[0116] In this embodiment, the presentation of similar case recommendations, complication predictions, and population pattern discovery results through graph visualization and interactive querying, generating services for case tracking, similar case retrieval, and disease evolution pattern analysis, specifically includes:
[0117] It receives similar medical record recommendation results, complication prediction results, and group pattern discovery results, and establishes indexes and associations with patient-level medical record knowledge graphs, disease-level medical record knowledge graphs, and regional medical record knowledge graphs to form a callable data set;
[0118] The medical entity set and relation set are loaded into the query results of the graph database, and a visual graph structure containing nodes and edges is constructed. Nodes represent disease, symptom, examination, test and drug entities, and edges represent comorbidity, temporal relationship and similarity relationship.
[0119] The similar case recommendation results are mapped to a visual subgraph, and the recommended cases are highlighted according to the similarity score, showing the entity overlap and similarity relationship between the cases.
[0120] The complication prediction results are mapped to a time evolution graph, which displays the predicted potential complication nodes in the order of timestamps, and distinguishes between diseases that have occurred and predicted diseases by color coding, generating an interactive evolution chain.
[0121] The population pattern discovery results are mapped to an aggregated graph structure to display the disease patterns that frequently occur within the population. The population-level pattern atlas is generated by overlaying the alignment relationships of multiple cases.
[0122] Upon receiving a search command, the system performs an interactive query on the recommended results of similar medical cases and returns relevant case sub-images according to the input conditions of medical entities, thus realizing the retrieval of similar cases.
[0123] Interactive queries can be performed on complication prediction results to retrieve potential complication pathways by patient identifier or time criteria, enabling case tracking.
[0124] Perform interactive queries on the population pattern discovery results, retrieve aggregated patterns by disease category or regional scope, and display disease evolution patterns;
[0125] During the presentation, node scaling, edge filtering, and attribute tag loading are performed, and the hierarchy and range of the visualization are dynamically adjusted to achieve a graphical interactive display of the results.
[0126] Ultimately, it generates case tracking services, similar case retrieval services, and disease evolution pattern analysis services, and ensures that the query and display results are consistent with the underlying data.
[0127] This implementation method uses graph visualization and interactive queries to present the results of similar case recommendations, complication predictions, and population pattern discovery in the form of case tracking, similar case retrieval, and disease evolution pattern analysis. This enhances the interpretability of the results and enables medical staff to intuitively understand and efficiently utilize complex medical case data.
[0128] Example 1:
[0129] To verify the feasibility of this invention in practice, it was applied to real medical record data from a general hospital. Over the past five years, this hospital has collected approximately 460,000 electronic medical records, 130 million laboratory test data points, 380,000 medical imaging reports, and 550,000 prescription records. The medical record data sources cover more than twenty departments, including internal medicine, surgery, cardiology, neurology, and oncology, and the patients span different age groups and various disease types. Traditional methods mainly rely on manual queries and single database searches, resulting in low analysis efficiency and a lack of interdisciplinary and cross-disease linkage in the results, making it difficult to meet the needs of clinical decision support and research. This embodiment uses the method of this invention to process and analyze the above-mentioned multi-source medical record data, verifying its application value in a real-world scenario.
[0130] Firstly, in the data acquisition and preprocessing stage, all electronic medical record texts were segmented, disease names and symptom descriptions were standardized, and mapped to the ICD-10 coding system. Laboratory indicator data underwent unit conversion and reference interval calibration; for example, hemoglobin was standardized to g / L, and blood glucose to mmol / L, with some missing values filled in. Imaging reports were parsed to extract examination sites and conclusive descriptions, standardized, and mapped to an imaging terminology glossary. Prescription data was standardized according to generic drug names, dosage forms, and specifications, and uniformly mapped to ATC drug classification codes. Ultimately, structured medical record data covering the entire patient's diagnosis and treatment process was formed, increasing data completeness from the original 78% to 96%.
[0131] Next, an improved BioBERT model was used for medical entity extraction and relation recognition. On the test set, the accuracy rates for disease entity recognition reached 93.7%, symptom entity recognition 91.2%, examination and testing entity recognition 92.5% and 90.8%, respectively, and drug entity recognition 94.1%. In relation recognition, the accuracy rates for comorbidity relationships were 89.6%, temporal relationships 90.3%, and similarity relationships 88.7%. This represents an overall improvement of approximately 8–12 percentage points compared to the traditional BiLSTM-CRF method.
[0132] In the knowledge graph construction phase, a patient-level medical record knowledge graph is built using patient medical records as the basic unit. Then, it is aggregated according to disease categories to form a disease-level knowledge graph. Finally, it is integrated based on a unified patient identifier within the region to form a regional-level medical record knowledge graph. Ultimately, a multi-level medical record knowledge graph with over 3.2 million nodes and 5.6 million edges is formed in the Neo4j graph database.
[0133] In the representation learning phase, an improved Graphormer model is used to generate low-dimensional vector representations. After introducing structural features and temporal bias, the model achieves an AUC of 0.927 on the knowledge graph link prediction task, which is significantly better than the unimproved GraphSAGE model (AUC 0.873).
[0134] In the cross-graph alignment stage, the Dual-AMN method was used to align entities across different levels of the medical record knowledge graph. In entity matching experiments on cross-institutional datasets, the alignment accuracy of the method presented in this invention reached 92.4%, nearly 20 percentage points higher than traditional string similarity-based methods. Table 1 below shows typical analysis results for some patients after alignment:
[0135] Table 1. Analysis results after patient alignment
[0136] Patient ID age Main diagnosis Test indicator - Blood glucose (mmol / L) Laboratory indicator - Blood pressure (mmHg) Drug treatment Complication prediction results Number of similar cases Group pattern discovery P001 62 Coronary heart disease 7.8 150 / 95 aspirin, nitroglycerin Hypertensive heart disease 15 Cardiovascular disease patients commonly have hypertension. P002 55 hypertension 6.2 165 / 100 Valsartan Coronary heart disease 21 The incidence of coronary heart disease increases in hypertensive patients within 10 years. P003 70 diabetes 9.5 155 / 90 Metformin, insulin Diabetic nephropathy 18 Kidney complications are common in diabetic patients. P004 48 arrhythmia 5.7 140 / 85 Amiodarone Coronary heart disease 12 Patients with arrhythmias have an increased risk of coronary heart disease. P005 67 Cerebral infarction 8.1 160 / 90 Clopidogrel, Atorvastatin Second stroke 16 The recurrence rate of cerebral infarction patients is relatively high within 5 years.
[0137] The tabular data shows that the system can align medical entities in different patient records and predict potential complications based on temporal chains and comorbid relationships. For example, after alignment, patient P001 was indicated to have a risk of hypertensive heart disease, which is consistent with his long-term history of high blood pressure. Patient P002's hypertension case and coronary heart disease case formed a cross-pattern alignment, suggesting a future risk of coronary heart disease. Population pattern discovery further reveals the common evolutionary pathways of hypertension and coronary heart disease, and these results have important reference value for clinical prevention and treatment.
[0138] During the results display and interactive query phase, doctors can click on a patient's node through a visual interface to view the complete medical record trajectory, or quickly find similar cases by entering search criteria. In this experiment, cardiologists completed a case tracking task that would normally require hours of manual searching in less than 5 minutes, and obtained more than 20 valuable cases through similar case recommendations.
[0139] This embodiment verifies the feasibility and effectiveness of the present invention in real hospital medical record data. By unifying preprocessing and knowledge graph modeling, the problem of difficult integration of heterogeneous medical record data is solved; by using improved BioBERT and Graphormer models, the accuracy of medical entity recognition and knowledge representation is significantly improved; through Dual-AMN cross-graph alignment, intelligent analysis of similar cases, complications, and group patterns is achieved; and through graph visualization and interactive queries, the efficiency of case retrieval and tracking is greatly improved. Overall results show that the present invention not only outperforms existing methods in accuracy but also significantly reduces the workload of doctors and enhances the utilization value of medical record data in clinical applications.
[0140] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1.A knowledge graph-based big data medical record linkage analysis method, characterized in that, The method comprises the following steps: Collecting electronic medical record texts, test indexes, medical image reports and prescription records, and preprocessing to obtain preprocessed medical record data; Based on the preprocessed medical record data, an improved BioBERT model is used to extract five types of medical entities including diseases, symptoms, examinations, tests and drugs, and to identify comorbidity relationships, time sequence relationships and similarity relationships, to obtain a medical entity set and a relationship set; Using the medical entity set as nodes and the relationship set as edges, a graph database is used to construct patient-level medical record knowledge graphs, disease-level medical record knowledge graphs and regional-level medical record knowledge graphs; Based on the medical record knowledge graph, an improved Graphormer model is used for representation learning to generate low-dimensional vector representations containing medical record knowledge graph features; A Dual-AMN method is used to map the low-dimensional vector representations, and the alignment of medical entities in different medical record knowledge graphs is completed through structural attention and semantic attention mechanisms, and based on the alignment results, similar medical record recommendations, complication predictions and group pattern discovery results are generated; The similar medical record recommendations, complication predictions and group pattern discovery results are displayed through graph visualization and interactive query methods to generate case tracking, similar case retrieval and disease evolution pattern analysis services. 2.The knowledge graph-based big data medical record linkage analysis method of claim 1, characterized in that, The preprocessing specifically includes: Carrying out word segmentation, removing noise characters, unifying term expression and mapping to a medical coding system on the electronic medical record texts to form structured text data; Converting units and unifying dimensions on the test indexes, performing missing value filling and abnormal value detection, and performing numerical calibration according to the reference interval while retaining the acquisition time information; Carrying out structured analysis on the medical image reports, extracting the examination site and conclusion description, standardizing the site and mapping to an image term set to form structured image fields; Standardizing the drug generic name, dosage form and specification of the prescription records, analyzing the drug dosage, frequency and route, and mapping to a drug classification code; Unifying the patient identifier and timestamp of the electronic medical record texts, test indexes, medical image reports and prescription records, constructing the visit time sequence, and performing field consistency and integrity checking to merge duplicate records; Storing the preprocessed electronic medical record texts, test indexes, medical image reports and prescription records in a unified format to form preprocessed medical record data. 3.The knowledge graph-based big data medical record linkage analysis method of claim 1, characterized in that, The improved BioBERT model specifically includes: The improved BioBERT model includes an input layer, an embedding layer, an encoding layer, a decoding layer, a conflict resolution module, a relationship identification module and a fine-tuning module; The input layer performs word segmentation on the preprocessed medical record data, retains character offset and timestamp index, and adds visit time interval encoding and source type encoding to each token; The embedding layer loads weights pre-trained based on a large-scale electronic medical record corpus, concatenates word embedding, time interval embedding and source type embedding, inputs a full connection layer for linear mapping, and forms a unified input representation through layer normalization; The encoding layer stacks multiple bidirectional Transformer encoders, introduces relative position bias and time mask in attention calculation, and models the context of the unified input representation to generate token-level representation vectors containing semantic dependency and time constraints; The decoding layer construction comprises a segment-level decoder composed of a Biaffine scorer and a two-layer fully connected network, performs boundary determination and class classification on the token-level representation vector, and outputs disease, symptom, examination, test and drug candidate entities and corresponding confidence; The conflict resolution module sorts the overlapping and intersecting candidates according to confidence from high to low, adopts the longest span first strategy to solve boundary conflicts, and adopts the class priority rule to optimize in the case of multi-class overlap, and generates a medical entity set; The relationship identification module takes the medical entity set as input, determines the comorbidity relationship according to the co-occurrence frequency and the fixed threshold in the same patient and the same time window, establishes a directed edge to form a time sequence relationship according to the timestamp order, and identifies a similarity relationship through the cosine similarity of the context representation combined with the consistency constraint of the medical synonym table, and the comorbidity relationship, the time sequence relationship and the similarity relationship are combined to form a relationship set; The fine-tuning module adopts the LoRA method, inserts low-rank decomposition parameters in the attention projection matrix, limits the update range and keeps the original parameters frozen, and the training target is a weighted combination of sequence labeling cross-entropy loss, segment classification cross-entropy loss and relationship classification cross-entropy loss; Output the medical entity set and the relationship set. 4.The knowledge graph-based big data medical record linkage analysis method of claim 1, wherein, The medical entity set is taken as a node, and the relationship set is taken as an edge, and a graph database is used to construct a patient-level medical record knowledge graph, a disease type-level medical record knowledge graph and a regional-level medical record knowledge graph, which specifically comprises: The disease, symptom, examination, test and drug entities in a single patient medical record are taken as nodes, the comorbidity relationship, time sequence relationship and similarity relationship identified in the medical record are taken as edges, and storage and connection are performed in the graph database to construct a patient-level medical record knowledge graph; The standardized disease entities belonging to the same disease category in multiple patient medical records are taken as core nodes, the related symptom, examination, test and drug entities are taken as extension nodes, and the comorbidity relationship, time sequence relationship and similarity relationship obtained by cross-patient integration are taken as edges, and organization is performed in the graph database to construct a disease type-level medical record knowledge graph; The patient-level medical record knowledge graph and the disease type-level medical record knowledge graph are taken as subgraphs, the unified patient identifier and disease classification rules in the regional range are combined, the comorbidity relationship, time sequence relationship and similarity relationship after cross-institution integration are taken as edges, and the overall linking and merging is completed in the graph database to construct a regional-level medical record knowledge graph. 5.The knowledge graph-based big data medical record linkage analysis method of claim 1, characterized in that, The improved Graphormer model specifically comprises: The improved Graphormer model comprises an input layer unit, an embedding layer unit, a graph structure coding layer unit, a global modeling module, a stability enhancement module and an output layer unit; The input layer unit receives the medical entity set in the patient-level medical record knowledge graph, the disease type-level medical record knowledge graph and the regional-level medical record knowledge graph as node input, receives the comorbidity relationship, the time sequence relationship and the similarity relationship in the relationship set as edge input, generates a node feature set containing semantic features, attribute features and context information, and an edge feature set containing relationship types, directions and time interval information; The embedding layer unit jointly encodes the node feature set and the edge feature set, adds node degree, node betweenness and node clustering coefficient in the node feature, adds relationship type encoding and time interval encoding in the edge feature to form an extended feature set, splices the extended feature set, maps it through a fully connected layer and normalizes the layer to output a unified input representation; The graph structure encoding layer unit receives the unified input representation, propagates and updates it using a multi-layer graph Transformer encoder, introduces a relationship type-based weight factor and a time interval-based bias term in attention calculation, and outputs a node representation vector containing semantic dependency, structural dependency and temporal constraint; The global modeling module receives the node representation vector, introduces a virtual global node connected to all nodes, aggregates cross-node and cross-subgraph context information, and generates an enhanced representation containing global context; The stability enhancement module receives the enhanced representation, applies residual connection and layer normalization in each graph Transformer encoder, applies random inactivation in the feedforward sublayer, and performs learning rate scheduling and weight regularization during the training process to output a representation vector controlled by stability; The output layer unit receives the representation vector, performs average pooling and attention-based weighted pooling on all node representations to generate a low-dimensional vector representation with a dimension smaller than the input feature dimension, which contains semantic features, structural features and temporal features of the medical record knowledge graph. 6.The knowledge graph-based big data medical record linkage analysis method of claim 1, wherein, The low-dimensional vector representation is mapped using the Dual-AMN method, the alignment of medical entities in different medical record knowledge graphs is completed through structural attention and semantic attention mechanisms, and based on the alignment results, similar medical record recommendations, complication prediction and group pattern discovery results are generated, specifically including: Receiving the low-dimensional vector representation, inputting medical entities in patient-level medical record knowledge graphs, disease-level medical record knowledge graphs and regional-level medical record knowledge graphs into the Dual-AMN method; Calculate the structural similarity of medical entities in different medical record knowledge graphs using the structural attention mechanism, which is based on the adjacency relationship of entities; Calculate the semantic similarity of medical entities in different medical record knowledge graphs using the semantic attention mechanism, which is based on the context features in the low-dimensional vector representation; Generate a comprehensive similarity matrix by combining the structural similarity and the semantic similarity, determine the medical entity alignment relationship according to the comprehensive similarity matrix and the preset threshold, and output the entity alignment result across medical record knowledge graphs; Merge low-dimensional vector representations mapped to the same medical entity to form a single entity node, connect medical entities with time attributes in timestamp order to form a time sequence chain, establish a parallel relationship between medical entities with co-occurrence relationship, and form a co-disease link; Based on the entity alignment result, perform similar medical record recommendation, retrieve and sort medical records with high entity alignment degree, output similar medical record recommendation, perform complication prediction based on the entity alignment result, analyze the time sequence chain and infer potential complications, output complication prediction, and perform group pattern discovery based on the entity alignment result, aggregate the alignment relationship of similar entities and output the group pattern discovery result. 7.The knowledge graph-based big data medical record linkage analysis method of claim 1, wherein, The similar medical record recommendation, complication prediction and group mode discovery results are visualized and displayed through interactive query, case tracking, similar case retrieval and disease evolution mode analysis services are generated, specifically including: Receiving similar medical record recommendation results, complication prediction results and group mode discovery results, indexing and correlating the results with patient-level medical record knowledge graph, disease-level medical record knowledge graph and regional-level medical record knowledge graph to form a callable data set; Load medical entity set and relationship set as graph database query results, build a visual graph structure containing nodes and edges, nodes represent disease, symptom, examination, test and drug entity, edges represent comorbidity relationship, time sequence relationship and similarity relationship; Map similar medical record recommendation results to visual subgraphs, highlight recommended cases according to similarity ranking; Map the complication prediction results to the time evolution graph, display the predicted potential complication nodes in chronological order, and distinguish the occurred diseases from the predicted diseases through color coding, and generate an interactive evolution chain; Map the group mode discovery results to the aggregation graph structure, display the high-frequency disease patterns in the group range, and generate the group-level mode atlas after superimposing the alignment relationships of multiple cases; Receive search instructions, execute interactive query on similar medical record recommendation results, and return relevant case subgraphs according to medical entity input conditions; Perform interactive query on complication prediction results, retrieve potential complication paths according to patient identifier or time conditions; Perform interactive query on group mode discovery results, retrieve aggregated patterns according to disease classification or regional range; Perform node scaling, edge filtering and attribute label loading during display to support dynamic adjustment of the level and range of the visual graph; Finally, generate case tracking services, similar case retrieval services and disease evolution mode analysis services, and ensure that the query and display results are consistent with the underlying data.
Citation Information
Cited By
Chronic disease patient clinical data analysis method and system based on knowledge graph
CN121983294A