Medical record data key information extraction and reconstruction method based on human-in-loop
By introducing people in circuit technology and large language models, combined with expert feedback optimization models, it solves the problem of high accuracy and high credibility in medical text processing, and achieves high -efficiency and accurate medical records. And structured reconstruction.
Patent Information
- Application Number
- CN202411587851.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art has difficulty meeting the needs of high precision and credibility when dealing with complex and diverse medical texts, especially in understanding medical expertise and extracting critical information.
Using human-in-the-loop technology, human experts are introduced into the automated processing process, and the accuracy and reliability of information extraction and reconstruction are optimized through multiple rounds of feedback and interaction. Use large language models and expert prior knowledge to clean and standardize unstructured medical record data, enhance the semantic retrieval and information understanding capabilities of the model, and verify and optimize the model through expert feedback to ensure that key information is extracted and reconstructed more efficiently. precise.
It significantly improves the accuracy and reliability of the extraction and structural reconstruction of key information in medical record data, meets the medical industry's demand for high accuracy and high reliability, and reduces the need for subsequent manual verification.
Smart Images

Figure CN119361059A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of large language models and natural language processing, and in particular to a method for extracting and reconstructing key information of medical record data based on a large language model and a human-in-the-loop. Background Art
[0002] With the development of modern medical technology and the improvement of the informatization of medical systems, the amount of medical data generated in clinical practice has shown explosive growth. These data come from a wide range of sources, including electronic medical records (EMR), imaging reports, pathology reports, laboratory test results, etc., in various forms and mostly unstructured text data. This unstructured data contains a large amount of important basis and medical knowledge for clinical decision-making, but its free text form poses a huge challenge to automated information processing. How to effectively extract and reconstruct key information from these huge and complex unstructured data for use in clinical decision support, medical research, personalized medicine and other fields is an urgent problem that needs to be solved.
[0003] The information extraction methods of existing technologies usually rely on rule-based systems or machine learning models. Although they can handle some structured tasks to a certain extent, they are often powerless for complex and diverse medical texts. The development of deep learning and natural language processing technology, especially the emergence of large language models (LLMs), has brought new opportunities for the processing of medical data. Large language models can automatically extract key information from complex medical texts with their advantages in language understanding and generation. However, although large language models perform well in many tasks, there are still many challenges when dealing with tasks involving medical expertise, including the model's understanding bias for subtle medical semantics, insufficient accuracy of domain-specific knowledge, and the model's limited ability to handle uncertainty and low-confidence outputs. In addition, the sensitivity of medical data and its high reliance on accuracy make it risky to rely entirely on automated systems to process medical record data. Incorrect extraction of key information or structural reconstruction may directly affect clinical decision-making and cause serious consequences. Therefore, in practical applications, automated processing systems that rely solely on models often find it difficult to meet the requirements of high precision and high credibility. Summary of the invention
[0004] The purpose of the present invention is to provide a method for extracting and reconstructing key information of medical record data based on human in the loop in view of the deficiencies of the prior art. By adopting human in the loop technology, by introducing human experts into the automated processing flow, the system can combine the efficient processing capabilities of automated tools and the professional knowledge of human experts, thereby continuously optimizing the accuracy and reliability of information extraction and reconstruction in multiple rounds of feedback and interaction. The real-time feedback and correction of experts can not only reduce the uncertainty of the model, but also manually verify the output of low confidence, ensuring that the extraction and reconstruction of key information are more accurate and meet clinical needs. On the basis of model automated processing, this method can further improve the reliability of structured data through expert feedback and correction, ensure the practical application value of the system in complex medical scenarios, and effectively solve the problem that the automated processing system is difficult to meet high precision and high credibility. It can be used in scenarios such as medical record data processing, clinical decision support, intelligent medical record analysis, personalized diagnosis and treatment plan formulation, and medical research data mining, and has broad application prospects in the field of clinical medicine.
[0005] The specific technical scheme for achieving the purpose of the present invention is: a method for extracting and reconstructing key information of medical record data based on human-in-the-loop, which is characterized by adopting a method of introducing human-in-the-loop technology into a large language model, using a large language model and expert prior knowledge to clean and normalize unstructured medical record data, and enhancing the semantic retrieval and information understanding capabilities of the model through a medical vector library to achieve efficient extraction of key information. The model generates confidence through self-evaluation and triggers human expert verification in the case of low confidence. The model is continuously optimized and updated through expert feedback from human-in-the-loop to achieve structured output of medical record data with higher credibility. The method specifically includes the following steps:
[0006] Step 1: Cleaning unstructured medical records data based on prior knowledge
[0007] Use regular expressions to define noise information in a specific format, such as timestamps, signature information, or templated content specific to a hospital. For example, filtering timestamps can be achieved with the following regular expression: regex_timestamp = \d{4}-\d{2}-\d{2}. This regular expression will match timestamps such as "2024-01-02 12:34:56" and remove them from the data.
[0008] After removing specific noise information, in order to process repeated text information, the system uses the cosine similarity method to detect and remove redundant text. For two text vectors A and B, the cosine similarity is defined by the following formula (a):
[0009]
[0010] If the similarity is greater than a preset threshold value θ, it can be determined as redundant information and deleted or merged. Here, the threshold θ is usually set above 0.9 to ensure that highly similar long text paragraphs can be identified, and often similar physical characteristics information, such as blood pressure, body temperature, etc., are skipped; similar short text information is also skipped to prevent the deletion of similar normal patient medical records.
[0011] The system can predict the correct spelling of words based on context by training neural network models (such as BERT, GPT, etc.). Given an input sequence X and a candidate spelling correction vocabulary W = {ω1, ω2, ..., ωn}, the system selects the most likely correct spelling by calculating the conditional probability P(ωi|X) of each candidate word in the context. The parameter ω represents the best candidate word selected by the system, which is defined by the following formula (b):
[0012]
[0013] Step 2: Construction of medical vector library based on expert knowledge
[0014] Using the word embedding strategy, professional medical terms are mapped into a high-dimensional space, making similar concepts closer. To generate vector embeddings for medical terms, word embedding models (such as Word2Vec, FastText) and pre-trained language models (such as BERT or BioBERT) are used to construct professional medical word embeddings. For an input phrase or sentence S = {w1, w2, …, wn}, its embedding is expressed by the following formula (c):
[0015] S=({w1,w2,…,wn};θ) (c).
[0016] Where g is the embedding function of the bidirectional encoder representation; θ represents the parameters of the model, which determines how to map the input vocabulary to a vector representation in a high-dimensional space.
[0017] The large language model generates a global embedding S based on the context information of the sentence, thereby capturing the semantics of medical phrases or sentences. For example, "heart disease" and "coronary heart disease" have a high similarity, and "acute myocardial infarction" and "sudden myocardial necrosis" have a high similarity. Through the above formula (c), the system can effectively determine the semantic relationship between medical terms, thereby constructing a vector library with medical field characteristics, so that similar medical concepts are close in the vector space.
[0018] In order to further enhance the expressive power of the vector library, the present invention introduces the Medical Knowledge Graph (KG), which is constructed by medical experts and contains the relationships between concepts such as symptoms, diseases, diagnoses, and treatment methods. Knowledge graph embedding uses graph embedding methods (such as TransE and Node2Vec) to represent nodes in high dimensions, converting each node (i.e., each concept) and edge (i.e., each relationship) in the knowledge graph into a vector representation. In graph embedding, the objective function for defining a given node (concept) pair (h, t) and relationship r is expressed by the following formula (d):
[0019] f(h,r,t)=‖h+rt‖ (d).
[0020] Among them, h and t are node vectors, and r is the relationship vector.
[0021] The optimization goal is to minimize the value of this function to maintain the semantic and structural relationship between nodes. For example, the relationship between "diabetes" and "insulin treatment" is minimized by the above objective function to ensure that they are adjacent in the vector space. After completing the embedding of vocabulary, phrases, sentences and knowledge graphs, the final medical vector library is constructed through clustering analysis and dimensionality reduction methods. To ensure the accuracy and availability of the medical vector library, a clustering algorithm (such as K-means or DBSCAN) is first used to perform cluster analysis on similar concepts or diagnoses so that similar medical terms are clustered together. Given a set of embedding vectors X = {x1, x2,…, xn}, the clustering algorithm is defined by minimizing the intra-class distance function as follows (e):
[0022]
[0023] Among them, μ7 is the centroid parameter of the kth cluster.
[0024] Through cluster analysis, the system can classify similar medical concepts into the same category, thereby improving the matching degree in the information extraction process.
[0025] Step 3: Extracting key information driven by a large language model based on retrieval enhancement
[0026] Retrieval-Augmented Generation (RAG) technology is used in combination with a large language model (LLM) to accurately extract key medical information from medical record data.
[0027] In the query generation process, the system generates query vectors based on the input of medical record data through the query generator to retrieve the most relevant medical literature, guidelines, and information in the knowledge base. This process uses a large language model encoder to generate semantic vectors to match the query semantics with the knowledge base content.
[0028] Given medical record data X = {x1, x2, …, xn}, the query generator q(·) generates a query vector q by the following formula (f):
[0029] q=q(X;θ) (f).
[0030] Among them, θ is the parameter of the large language model, and the accuracy of the query generator in the semantic space is ensured by optimizing the loss function. The system retrieves the knowledge base content with high similarity to the cosine according to the query vector q to ensure that the retrieval results meet the requirements of the input medical records. The retrieved relevant content is fused with the input data through the context augmentation module (Context Augmentation Module) to supplement the input context information of the large language model, thereby improving the accuracy of the model in key extraction tasks. This step adopts a multimodal embedding method based on semantic fusion to splice and match the semantic vectors of medical record data and retrieval content.
[0031] Assume that the retrieved content vector is r, and the semantic vector of the input medical record is x. The context enhancement module obtains the enhanced input vector c represented by the following formula (g) through concatenation operation:
[0032] c=[x;r](g).
[0033] Where [;] represents the vector concatenation operation.
[0034] The system then inputs the enhanced input vector c into the decoder part of the large language model to process the fused contextual data and optimize the accuracy of the extraction results. Finally, the context-enhanced large language model enters the information extraction stage to identify and extract key medical information from the medical record data, such as the patient's main symptoms, diagnosis, and treatment plan. The model uses a conditional probability generation function to extract key information from the medical record data. Given the context-enhanced input vector c, the generation probability P(Y|c) of the output information extraction result Y is calculated by the following formula (h):
[0035]
[0036] Among them, T is the information length, yt is the key information generated at the current moment, and y<t is the content generated previously. During the training process, by minimizing the cross-entropy loss function, the generation probability is optimized to ensure that the model can accurately generate high-quality key information.
[0037] Step 4: Structured data reconstruction based on key information
[0038] The system maps the key information extracted by the large language model to the labels required for structured data to achieve label alignment. Based on the multi-classifier model, the system classifies the key information according to medical record attributes (such as symptoms, diagnoses, medications, treatments, etc.) to form a preliminary mapping matrix. Let the key information set K = {k1, k2, …, kn} and the label set T = {t1, t2, …, tm}, the mapping process is represented by the mapping function M(ki) in the following formula (i):
[0039] M(K·T) = Fm 5G H 9*J = softmax(W·K5) (i).
[0040] Among them, W is the mapping matrix weight m ij represents the mapping weight between k i and the label t j , and softmax is used to ensure that the mapping value is between [0, 1].
[0041] After information mapping, the system converts the content of each data label into a standardized format. The data normalization module encodes information such as diagnoses and medications using expert-defined medical standards (such as ICD-10, SNOMED CT) to ensure consistent formats. For example, given the diagnosis information D, the data normalization module encodes it into the standard code d represented by the following formula (j):
[0042] d = f standard (D) (j).
[0043] Among them, fstandard is the normalization mapping function. The normalization module encodes the key information according to the domain standards to ensure compatibility in subsequent processing.
[0044] After label alignment and data normalization, the system enters the structured generation stage and fills the information into a predefined structured form. The system uses a Sequence Filling model to fill the key information into the structured fields one by one to generate complete structured medical record data. For the structured data form S, let the field sequence be F = {f1, f2, …, fk}, the key information filling process can be described by the following formula (k) as the sequence generation function:
[0045]
[0046] Among them, P(f G |k,F<j) is the probability of generating field f j under the condition of key information K. By optimization, each field is accurately filled with the corresponding key information.
[0047] Step Five: Obtaining Confidence Based on Model Self-Evaluation
[0048] Use a confidence scoring function to calculate the credibility of the model for each extraction result. Given the extraction information Y = {y1, y2, …, yn}, the model generates a confidence score c i for each piece of information, representing an estimate of the accuracy of that information. Let P(Y∣X) be the probability of generating medical record information, and its confidence is calculated by the following formula (l):
[0049] c i = logP(yi∣X) (l).
[0050] Through the logarithmic probability logP(yi∣X), the system controls the confidence within a reasonable range while ensuring the stability of the output. Extraction results with a confidence lower than the threshold are corrected twice through an error feedback module. The feedback correction module uses the constructed medical vector library and domain knowledge library to re-evaluate uncertain information to ensure the accuracy of key data. Given a low-confidence item y i the system updates the confidence ci’ represented by the following formula (m) through the adaptive correction function g(y i ; θ):
[0051] ci’ = g(y i ; θ) (m).
[0052] Among them, θ is the parameter of feedback correction, and the accuracy of low-confidence information is improved through adaptive optimization
[0053] Step Six: Human Expert Verification for Low-Confidence Outputs
[0054] The system marks the output information with a confidence lower than the preset threshold in the self-evaluation module, and filters out the data subset that needs to be manually verified. Given the confidence scoring set C = {c1, c2, …, c n}, the system filters out all information items Y i where c low < τ, and τ is the confidence threshold. The information item Y low is defined by the following formula (n) as:
[0055] Y low = {y i ∣c i < τ} (n).
[0056] The information item Y of this subset low Contains all low-confidence key information for further review by experts. After screening, the low-confidence information enters the human expert verification process. Experts review and confirm the key information generated by the system based on medical knowledge, and make corrections as needed to ensure that the medical record information meets the medical accuracy standards. i , experts judge its correctness and mark the correction as the following (o) expression:
[0057] y i ′=h(y i ) (o).
[0058] Among them, h(y i ) represents the human expert correction operation, generating the final confirmation information y i ′.
[0059] After the verification is completed, the system will reintegrate the information confirmed by the expert into the medical record database and update the learning model. The feedback optimization module converts the verification results into supervision signals to optimize the performance of the model in low-confidence information recognition and generation. Suppose the information item corrected by the expert is Y′, then the model parameter θ is optimized through the feedback function L(Y,Y′), and the optimized model parameter θ′ is expressed by the following (p) formula:
[0060] θ′=argminθL(Y,Y′) (p).
[0061] This optimization process improves the accuracy of the model in low-confidence outputs and reduces the need for subsequent manual verification.
[0062] Step 7: Highly reliable structured data based on human-in-the-loop optimization
[0063] The human-in-the-Loop (HITL) mechanism is used to continuously integrate the feedback of human experts into the model training and reasoning process to further improve the credibility and consistency of structured medical record data. The low-confidence information verified by human experts is accumulated into the feedback database to form a dynamic expert knowledge base to provide a reference for future data processing. Let the expert feedback set be F = {f1, f2, …, fm}, and each feedback fj contains the expert's verification and correction of specific medical record information. The knowledge base is updated regularly to ensure that it covers the latest medical judgments.
[0064] Using the expert feedback database, the system optimizes the large language model parameters θ through supervised learning and fine-tuning mechanisms. This process defines the optimization objective function L HITL(θ), so that the large language model gradually adapts to the expert standard to reduce future low-confidence outputs. The large language model obtains the optimized model parameters θ′ through back propagation. This process is the optimization function expressed by the following (q) formula:
[0065] θ′=argminθL HITL (θ; F) (q).
[0066] The above optimization function iteratively adjusts the model weights under the drive of feedback signals, so that the key information extraction and data reconstruction results of the model gradually approach the expert level. After completing the model fine-tuning, the system uses the optimized large language model to reprocess the structured data to ensure the high confidence of the generated data. For the medical record data X, the new model generates a structured result S that meets the high confidence requirement. The structured result S is expressed by the following formula (r):
[0067] S=argmaxS'P(S'∣X; θ') (r).
[0068] Generating structured data S through the parameter-optimized model ensures high reliability and consistency, reducing future manual verification work and meeting the high-precision and high-reliability requirements of the medical industry.
[0069] Compared with the prior art, the present invention improves the accuracy and efficiency of the extraction and structural reconstruction of key information in medical record data. By introducing a large language model combined with a human-in-the-loop optimization mechanism, and utilizing expert prior knowledge and retrieval enhancement technology, the model's ability to understand and process medical terminology and complex clinical information is significantly improved. At the same time, through the screening of low-confidence data and expert verification, and dynamic optimization of the model in combination with a feedback mechanism, the system can gradually improve the reliability of automated medical record processing and reduce the need for manual intervention. In addition, based on multi-level data cleaning, normalization, and structural regeneration, high-quality output of medical information at the structured and standardized level is achieved, providing strong data support for scenarios such as medical analysis and decision support. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0071] The present invention is further described in detail with reference to the following specific embodiments and drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are common knowledge and common common sense in the art and are not particularly limited by the present invention.
[0072] Example 1
[0073] See also Figure 1 , extract and reconstruct key information of medical record data according to the following steps:
[0074] Step 1: Cleaning unstructured medical records data based on prior knowledge
[0075] Use regular expressions to define noise information in a specific format, such as timestamps, signature information, or templated content specific to a hospital. For example, filtering timestamps can be achieved with the following regular expression: regex_timestamp = \d{4}-\d{2}-\d{2}. This regular expression will match timestamps such as "2024-01-02 12:34:56" and remove them from the data.
[0076] After removing specific noise information, in order to process repeated text information, the system uses the cosine similarity method to detect and remove redundant text. For two text vectors A and B, the cosine similarity is defined by the following formula (a):
[0077]
[0078] If the similarity is greater than a preset threshold value θ, it can be determined as redundant information and deleted or merged. Here, the threshold θ is usually set above 0.9 to ensure that highly similar long text paragraphs can be identified, and often similar physical characteristics information, such as blood pressure, body temperature, etc., are skipped; similar short text information is also skipped to prevent the deletion of similar normal patient medical records.
[0079] The system can predict the correct spelling of words based on context by training neural network models (such as BERT, GPT, etc.). Given an input sequence X and a candidate spelling correction vocabulary W = {ω1, ω2, ..., ωn}, the system selects the most likely correct spelling by calculating the conditional probability P(ωi|X) of each candidate word in the context. The parameter ω represents the best candidate word selected by the system, which is defined by the following formula (b):
[0080]
[0081] Step 2: Construction of medical vector library based on expert knowledge
[0082] Using the word embedding strategy, professional medical terms are mapped into a high-dimensional space, making similar concepts closer. To generate vector embeddings for medical terms, word embedding models (such as Word2Vec, FastText) and pre-trained language models (such as BERT or BioBERT) are used to build professional medical word vectors.
[0083] For an input phrase or sentence S = {w1, w2, ..., wn}, its embedding is expressed by the following formula (c):
[0084] S=({w1,w2,…,wn};θ) (c).
[0085] Where g is the embedding function of the bidirectional encoder representation; θ represents the parameters of the model, which determines how to map the input vocabulary to a vector representation in a high-dimensional space.
[0086] The large language model generates a global embedding S based on the context information of the sentence, thereby capturing the semantics of medical phrases or sentences. For example, "heart disease" and "coronary heart disease" have a high similarity, and "acute myocardial infarction" and "sudden myocardial necrosis" have a high similarity. Through the above formula (c), the system can effectively determine the semantic relationship between medical terms, thereby constructing a vector library with medical field characteristics, so that similar medical concepts are close in the vector space.
[0087] In order to further enhance the expressive power of the vector library, the present invention introduces the Medical Knowledge Graph (KG), which is constructed by medical experts and contains the relationships between concepts such as symptoms, diseases, diagnoses, and treatment methods. Knowledge graph embedding uses graph embedding methods (such as TransE and Node2Vec) to represent nodes in high dimensions, converting each node (i.e., each concept) and edge (i.e., each relationship) in the knowledge graph into a vector representation. In graph embedding, the objective function for defining a given node (concept) pair (h, t) and relationship r is expressed by the following formula (d):
[0088] f(h,r,t)=‖h+rt‖ (d).
[0089] Among them, h and t are node vectors, and r is the relationship vector.
[0090] The optimization goal is to minimize the value of this function to maintain the semantic and structural relationship between nodes. For example, the relationship between "diabetes" and "insulin treatment" is minimized by the above objective function to ensure that they are adjacent in the vector space. After completing the embedding of vocabulary, phrases, sentences and knowledge graphs, this method constructs the final medical vector library through clustering analysis and dimensionality reduction methods.
[0091] To ensure the accuracy and availability of the medical vector library, clustering algorithms (such as K-means or DBSCAN) are first used to perform clustering analysis on similar concepts or diagnoses so that similar medical terms are clustered together. Given a set of embedding vectors X = {x1, x2, ..., xn}, the clustering algorithm is defined by the following formula (e) by minimizing the intra-class distance function:
[0092]
[0093] Among them, μ7 is the centroid of the kth cluster.
[0094] Through cluster analysis, the system can classify similar medical concepts into the same category, thereby improving the matching degree in the information extraction process.
[0095] Step 3: Extracting key information driven by a large language model based on retrieval enhancement
[0096] Retrieval-Augmented Generation (RAG) is used in combination with a large language model (LLM) to accurately extract key medical information from medical record data. During the query generation process, the system generates a query vector based on the input of medical record data through a query generator to retrieve the most relevant medical literature, guidelines, and information in the knowledge base. This process uses a large language model encoder to generate semantic vectors to match the query semantics with the knowledge base content. Given medical record data X = {x1, x2, …, …, xn}, the query generator q(·) generates a query vector q using the following formula (f):
[0097] q=q(X;θ) (f).
[0098] Among them, θ is the parameter of the large language model, and the accuracy of the query generator in the semantic space is ensured by optimizing the loss function. The system retrieves the knowledge base content with high similarity to the cosine according to the query vector q to ensure that the retrieval results meet the requirements of the input medical records. The retrieved relevant content is fused with the input data through the context augmentation module (Context Augmentation Module) to supplement the input context information of the large language model, thereby improving the accuracy of the model in key extraction tasks. This step adopts a multimodal embedding method based on semantic fusion to splice and match the semantic vectors of medical record data and retrieval content.
[0099] Assume that the retrieved content vector is r, and the semantic vector of the input medical record is x. The context enhancement module obtains the enhanced input vector c represented by the following formula (g) through concatenation operation:
[0100] c=[x;r](g).
[0101] Where [;] represents the vector concatenation operation.
[0102] The system then inputs the enhanced input vector c into the decoder part of the large language model to process the fused context data and optimize the accuracy of the extraction results. Finally, the large language model with context enhancement enters the information extraction stage to identify and extract key medical information from the medical record data, such as the patient's main symptoms, diagnosis, and treatment plan. The model uses the Conditional Probability Generation function based on conditional probability to extract key information from the medical record data. Given the context-enhanced input vector c, the generation probability P(Y|c) of the information extraction result Y is calculated by the following formula (h):
[0103]
[0104] where T is the information length, yt is the key information generated at the current moment, and y<t is the previously generated content. During the training process, by minimizing the cross-entropy loss function, the generation probability is optimized to ensure that the model can accurately generate high-quality key information.
[0105] Step Four: Structured Data Reconstruction Based on Key Information
[0106] The system maps the key information extracted by the large language model to the labels required for structured data to achieve label alignment. Based on the multi-classifier model, the system classifies the key information according to medical record attributes (such as symptoms, diagnosis, drugs, treatment, etc.) to form a preliminary mapping matrix. Let the key information set K = {k1, k2,..., kn} and the label set T = {t1, t2,..., tm}, the mapping process is represented by the mapping function M(ki) of the following formula (i):
[0107] M(K·T) = Fm 5G H 9*J = softmax(W·K5) (i).
[0108] where W is the mapping matrix weight m ij represents the mapping weight between k i and the label t j , and softmax is used to ensure that the mapping value is between [0, 1].[[]END]]
[0109] After information mapping, the system converts the content of each data label into a standardized format. The data normalization module encodes information such as diagnosis and drugs using medical standards defined by experts (such as ICD-10, SNOMED CT) to ensure consistent formats. For example, given the diagnosis information D, the data normalization module encodes it into the standard code d represented by the following formula (j):
[0110] d = f standard (D) (j).
[0111] Among them, fstandard is the normalization mapping function. The normalization module encodes the key information according to the domain standard to ensure compatibility for subsequent processing.
[0112] After tag alignment and data normalization, the system enters the structured generation stage, filling the information into a predefined structured form. The system adopts a Sequence Filling model, filling the key information into the structured fields one by one to generate complete structured medical record data. For the structured data form S, let the field sequence be F = {f1, f2, …, fk}, and the key information filling process can be described by the following formula (k) as a sequence generation function:
[0113]
[0114] where P(f G |k,F<j) is the probability of generating field f j under the condition of key information K, and through optimization, each field accurately fills the corresponding key information.
[0115] Step Five: Obtaining Confidence Based on Model Self-Assessment
[0116] Use a confidence scoring function to calculate the credibility of the model for each extraction result. Given the extraction information Y = {y1, y2, …, yn}, the confidence score c i of the model for generating each piece of information is represented, which is an estimate of the accuracy of this information. Let P(Y∣X) be the probability of generating medical record information, and its confidence is calculated by the following formula (l):
[0117] c i = logP(yi∣X) (l).
[0118] Through the logarithmic probability logP(yi∣X), the system controls the confidence within a reasonable range and ensures the stability of the output. The extraction results with a confidence lower than the threshold are corrected twice through the error feedback module. The feedback correction module uses the constructed medical vector library and domain knowledge base to re-evaluate the uncertain information to ensure the accuracy of the key data. Given a low-confidence item y i , the system updates the confidence ci’ represented by the following formula (m) through the adaptive correction function g(y i ; θ):
[0119] ci’ = g(y i ; θ) (m).
[0120] where θ is the parameter of feedback correction, and the accuracy of low-confidence information is improved through adaptive optimization
[0121] Step 6: Human Expert Verification of Low Confidence Outputs
[0122] In the self-assessment module, the system marks the output information with confidence levels lower than the preset threshold, and selects the data subset that needs to be manually verified. Given a confidence score set C = {c1, c2, …, c n}, the system filters out all c i <τ Information item Y low , where τ is the confidence threshold, the information item Y low It is defined by the following formula (n):
[0123] Y low ={y i ∣c i <τ} (n).
[0124] The information item Y of this subset low Contains all low-confidence key information for further review by experts. After screening, the low-confidence information enters the human expert verification process. Experts review and confirm the key information generated by the system based on medical knowledge, and make corrections as needed to ensure that the medical record information meets the medical accuracy standards. i , experts judge its correctness and mark the correction as the following (o) expression:
[0125] y i ′=h(y i ) (o).
[0126] Among them, h(y i ) represents the human expert correction operation, generating the final confirmation information y i ′.
[0127] After the verification is completed, the system will reintegrate the information confirmed by the expert into the medical record database and update the learning model. The feedback optimization module converts the verification results into supervision signals to optimize the performance of the model in low-confidence information recognition and generation. Suppose the information item corrected by the expert is Y′, then the model parameter θ is optimized through the feedback function L(Y,Y′), and the optimized model parameter θ′ is expressed by the following (p) formula:
[0128] θ′=argminθL(Y,Y′) (p).
[0129] This optimization process improves the accuracy of the model in low-confidence outputs and reduces the need for subsequent manual verification.
[0130] Step 7: Highly reliable structured data based on human-in-the-loop optimization
[0131] Using the human-in-the-Loop (HITL) mechanism, human expert feedback is continuously integrated into the model training and reasoning process to further improve the credibility and consistency of structured medical record data. Low-confidence information verified by human experts is accumulated in the feedback database to form a dynamic expert knowledge base, which provides a reference for future data processing. Suppose the expert feedback set is F = {f1, f2,…, fm}. Each feedback fj contains the expert's verification and correction of specific medical record information. The knowledge base is updated regularly to ensure that the latest medical judgments are covered. Using the expert feedback database, the system optimizes the large language model parameters θ through supervised learning and fine-tuning mechanisms. This process defines the optimization objective function L HITL (θ), so that the large language model gradually adapts to the expert standard to reduce future low-confidence outputs. The large language model obtains the optimized model parameters θ′ through back propagation. This process is the optimization function expressed by the following (p) formula:
[0132] θ′=argminθL HITL (θ; F) (q).
[0133] This optimization function iteratively adjusts the model weights driven by feedback signals, so that the model's key information extraction and data reconstruction results gradually approach the expert level. After completing model fine-tuning, the system uses the optimized large language model to reprocess the structured data to ensure high confidence in the generated data. For medical record data X, the new model generates a structured result S that meets the high confidence requirement. The structured result S is expressed by the following formula (r):
[0134] S=argmaxS'P(S'∣X; θ')(r).
[0135] Generating structured data S through the parameter-optimized model ensures high reliability and consistency, reducing future manual verification work and meeting the high-precision and high-reliability requirements of the medical industry.
[0136] The present invention accurately and efficiently extracts key medical information from complex, unstructured medical records and reconstructs it into structured data. By using the powerful semantic understanding ability of the large language model, the core information in the medical record, such as the patient's basic information, diagnosis results, treatment plan, drug information, etc., is automatically identified by performing semantic analysis and information extraction on the pre-processed unstructured medical record data. After being trained with large-scale medical corpus, the large language model can more accurately understand medical terms and their contextual relationships, thereby extracting key information with clinical significance from the text. Considering the high accuracy and rigor of information extraction in the medical field, the present invention further introduces a "human in the loop" mechanism. Specifically, based on the automatic extraction of information by the large language model, the system calculates the confidence of each output. When the output confidence of the model is low or faces a complex clinical situation, it is automatically marked as an uncertain result and submitted to human medical experts for manual verification and feedback. Through this feedback mechanism, experts can correct inaccurate information to ensure that the extracted key information meets clinical needs. The information provided by experts is not only used for current data processing, but can also be used in reverse to train and optimize large language models, thereby improving their processing capabilities in subsequent tasks and gradually enhancing the accuracy and robustness of the system.
[0137] The above is only a further explanation of the present invention and is not intended to limit this patent. Any equivalent implementation of the present invention should be included in the scope of the claims of this patent.
Claims
1. A method for extracting and reconstructing key information from medical record data based on human-in-the-loop, characterized in that: The method of introducing human-in-the-loop technology into a large language model is adopted. The large language model and expert prior knowledge are used to clean and normalize the unstructured medical record data. The medical vector library is used to enhance the model's extraction of key information, and confidence is generated through self-assessment. In the case of low confidence, human expert verification is triggered. The model is continuously optimized and updated through expert feedback from human-in-the-loop to achieve structured output of medical record data. The method specifically includes the following steps: Step 1: Clean the unstructured medical record data based on prior knowledge; Step 2: Use expert knowledge to build a medical vector library; Step 3: Extract key information based on the retrieval-enhanced large language model; Step 4: Structural reconstruction of medical record data based on the extracted key information; Step 5: Obtain the confidence of the key information extraction results through model self-evaluation; Step 6: Perform human expert verification on low-confidence output data; Step 7: Generate highly reliable structured medical record data based on the human-in-the-loop optimization mechanism.
2. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1 is characterized in that: The step 1 specifically includes: 1) Data noise filtering, spelling checking and correction; 2) Correction based on expert prior knowledge; 3) Filter and adjust abnormal data with unreasonable temperature and invalid timestamp.
3. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1 is characterized in that: The step 2 specifically includes: 1) Use word embedding or entity embedding methods to convert key medical terms and concepts defined by experts into high-dimensional vector representations; 2) Based on domain knowledge, semantic clustering and relationship annotation are performed on the symptoms, diagnoses and treatment plans in the medical records to generate a medical vector library.
4. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1 is characterized in that: The step three specifically includes: 1) Obtain preliminary text representation through pre-training models; 2) Use external medical vector libraries for semantic matching and related information enhancement; 3) Optimize the key information extraction results based on the matching results to enhance the model's recognition accuracy of key information.
5. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1 is characterized in that: The step 4 specifically includes: 1) Use the information mapping function to map the extracted key information to the structured fields; 2) Use the sequence filling model to gradually fill in the medical record structured form to achieve structured output of medical record data.
6. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1, characterized in that: The step five specifically includes: 1) Calculate the confidence of each extraction result based on the probability scoring function; 2) The low confidence screening module is used to mark information below the preset threshold as objects that need to be verified.
7. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1, characterized in that: The step six specifically includes: 1) For low-confidence information, human experts verify and confirm the data output by the system; 2) Systematically store the feedback information confirmed by experts.
8. The method for extracting and reconstructing key information of medical record data based on human-in-the-loop according to claim 1, characterized in that: The step seven specifically includes: 1) Accumulate human expert verification feedback and update the medical knowledge base; 2) Use expert feedback data to fine-tune model parameters and gradually optimize the model's credibility in extracting and reconstructing key information from medical record data; 3) Regenerate high-confidence structured data to ensure the integrity and accuracy of medical record data.
Citation Information
Patent Citations
Cardiovascular disease medical record structuring system based on NLP
CN114530223A
Geological named entity recognition method and system based on reinforcement learning and human-in-the-loop
CN116776882A
Care question and answer model training method based on transfer learning and expert feedback
CN117542471A
Medical field language model construction and electronic medical record text structuring method and system
CN117577254A
A ship test training scenario question and answer method, system, device and medium
CN118113855A
Cited By
Backtracking verification method and device for navigation announcement analysis result and electronic equipment
CN120106047A
Retrospective verification method, device and electronic equipment for NOTAM analysis results
CN120106047B
Medical care data intelligent retrieval and evaluation system and method driven by artificial intelligence
CN120353904A
LLM-based alarm event evaluation method and device
CN121217391A