Intelligent medical record generation and quality control method and system based on large model

By constructing a knowledge-enhanced big data model in the medical field, the problems of low efficiency and inconsistent quality in medical record generation have been solved. This has enabled the efficient generation of medical records that meet the standards, and automated quality control has improved the efficiency and quality of medical record generation.

CN121483474BActive Publication Date: 2026-04-14BEIJING YIYONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-09
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing template- or rule-based medical record assistance systems lack flexibility, cannot adapt to complex and ever-changing descriptions of illnesses, and lack deep language understanding capabilities, resulting in low efficiency and inconsistent quality in medical record generation, as well as limited coverage and timeliness of automated quality control.

Method used

We construct a large-scale knowledge-enhancing model for the medical field, which has functions such as intent recognition, medical record generation, terminology standardization check, format integrity check, information extraction, and logical consistency check. Through the generation and quality control of medical records by the large model, combined with an iterative optimization mechanism, we improve the efficiency and quality of medical record generation.

Benefits of technology

Significantly improves the efficiency of medical record writing, ensures that generated medical records meet medical standards, identifies and corrects terminological errors and logical contradictions, achieves standardization and uniformity of medical records, and improves the accuracy and completeness of medical record content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121483474B_ABST
    Figure CN121483474B_ABST
Patent Text Reader

Abstract

The application relates to a large model-based intelligent medical record generation and quality control method and system, and belongs to the technical field of medical information and artificial intelligence, and solves the problems of low medical record writing efficiency and non-uniform quality in the prior art. The method comprises the following steps: constructing a medical field knowledge enhanced large model, which has the capabilities of intent recognition, medical record generation, term standardization checking, format integrity checking, information extraction and logic consistency checking; when input information of a to-be-generated medical record is received, a complete medical record is generated through the intent recognition and medical record generation capabilities of the medical field knowledge enhanced large model, a constructed medical record template library and a medical database; when a to-be-quality-controlled medical record is received, quality control suggestions are generated through the capabilities of term standardization checking, format integrity checking, information extraction and logic consistency checking of the medical field knowledge enhanced large model and a constructed medical knowledge graph. Efficient generation and quality control of medical records are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical information technology and artificial intelligence technology, and in particular to a method and system for intelligent medical record generation and quality control based on a large model. Background Technology

[0002] As legally binding medical documents, medical records bear the core function of recording the entire process of patient diagnosis and treatment, and serve as a crucial basis for clinical diagnosis and treatment, medical research, medical insurance settlement, and legal affairs. In the traditional medical model, the generation of medical records mainly relies on clinicians manually writing or entering them. This process is closely embedded in the doctors' daily work and is the foundational link in medical information collection and organization.

[0003] To improve the efficiency and standardization of medical record writing, some medical record assistance systems have already been applied in clinical practice. These systems are mostly based on pre-set templates or structured rules, providing fill-in-the-blank or multiple-choice options in fixed formats, which to some extent reduces the amount of repetitive text input for doctors and encourages some content to follow established format requirements. This approach can be seen as an initial improvement over paper-based medical records or purely free text entry.

[0004] However, existing template- or rule-based systems have significant limitations. First, they lack flexibility, making it difficult to adapt to the complex and varied descriptions of patient conditions, individualized treatment processes, and diverse professional expression habits across departments in clinical practice. This often results in rigid medical record content and poor contextual adaptability. Second, these systems lack deep natural language understanding capabilities, failing to effectively identify and integrate key information scattered throughout doctor-patient communication and examination reports. They also cannot proactively identify and correct logical inconsistencies, non-standard terminology, and information omissions within the medical record text. Furthermore, post-event quality control of medical records still heavily relies on manual review, with low levels of automation and intelligence, limited quality control coverage and timeliness, and an inability to achieve a real-time, accurate quality control closed loop.

[0005] Therefore, existing template- or rule-based medical record assistance systems are rigid, lack deep language understanding and intelligent quality control capabilities, and cannot fundamentally solve the problems of low efficiency and inconsistent quality in medical record writing. Summary of the Invention

[0006] Based on the above analysis, the embodiments of the present invention aim to provide an intelligent medical record generation and quality control method and system based on a large model, in order to solve the problems of low efficiency and inconsistent quality in existing medical record writing.

[0007] On one hand, embodiments of the present invention provide a method for intelligent medical record generation and quality control based on a large model, comprising the following steps:

[0008] A large-scale knowledge-enhancing model for the medical domain is constructed, capable of performing tasks such as intent recognition, medical record generation, terminology standardization checking, format integrity checking, information extraction, and logical consistency checking. This includes: constructing a unified multi-task instruction dataset; performing domain-adaptive pre-training on a general large language model using a medical corpus to obtain a medical foundation model; and performing supervised fine-tuning training on the medical foundation model using the unified multi-task instruction dataset to obtain the large-scale knowledge-enhancing model for the medical domain. The dataset contains intent recognition samples, medical record generation samples, terminology standardization checking samples, format integrity checking samples, information extraction samples, and logical consistency checking samples; these samples are instruction-response pairs. When input information for generating a medical record is received, the large-scale knowledge-enhancing model generates a complete medical record through its intent recognition and medical record generation functions, as well as the constructed medical record template library and medical database.

[0009] When receiving medical records to be quality controlled, the system uses the functions of the medical domain knowledge-enhanced big data model to check terminology standardization, format integrity, information extraction, and logical consistency, as well as the constructed medical knowledge graph, to generate quality control suggestions.

[0010] This involves collecting user feedback on the generated complete medical records and quality control suggestions, and iteratively optimizing the medical domain knowledge enhancement model based on the feedback.

[0011] Furthermore, upon receiving the input information for the medical record to be generated, the complete medical record is generated in the following manner:

[0012] Based on the input information of the medical record to be generated, an intent recognition command is generated and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs the type of the medical record to be generated through the intent recognition function;

[0013] Based on the type of medical record to be generated and the constructed medical record template library, a structured template for the medical record to be generated is obtained; based on the input information of the medical record to be generated and the constructed medical database, medical knowledge fragments for the medical record to be generated are obtained.

[0014] Based on the input information, type, structured template, and medical knowledge fragments of the medical record to be generated, a medical record generation instruction is generated and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model generates a complete medical record through the medical record generation function.

[0015] Furthermore, the medical database is a structured, vectorized indexed professional database in the medical field; the medical knowledge fragments for the medical record to be generated, obtained based on the input information of the medical record to be generated and the constructed medical database, include:

[0016] The input information of the medical record to be generated is vectorized and semantic similarity is performed in the constructed medical database. At the same time, keyword matching is performed, and the most relevant knowledge fragments are obtained by fusion and ranking. The obtained knowledge fragments are used as the medical knowledge fragments of the medical record to be generated.

[0017] Furthermore, upon receiving medical records awaiting quality control, quality control recommendations are generated using the following methods:

[0018] If terminology quality control is selected, corresponding instructions are generated based on the medical records to be controlled and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs quality control suggestions through terminology standardization checks.

[0019] If format integrity is required for quality control, then based on the medical record to be controlled and the corresponding structured template, a corresponding instruction is generated and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs quality control suggestions through the format integrity check function.

[0020] If logical quality control is selected, information extraction instructions are generated based on the medical records to be controlled and sent to the medical domain knowledge enhancement model. The medical domain knowledge enhancement model outputs each medical triple through the information extraction function. Based on each medical triple and the constructed medical knowledge graph, each contradiction candidate pair is obtained. Based on each contradiction candidate pair and its context information in the medical records to be controlled, corresponding instructions are generated and sent to the medical domain knowledge enhancement model. The medical domain knowledge enhancement model outputs quality control suggestions through the logical consistency check function.

[0021] Furthermore, the medical triplet represents medical facts in a structured way through subject, relation, and object; wherein, the subject and object in the medical triplet include at least one of the following medical entities: patient, disease diagnosis, drug, surgical procedure, examination and testing items, clinical manifestation, anatomical location, and medical equipment; the relation includes at least one of the following: suffering from, diagnosed as, receiving treatment, using drugs, used for treatment, undergoing examination, manifesting as, contraindicated in, causing, and combined with;

[0022] The medical knowledge graph adopts an entity-relationship-entity structure; where entities include diseases, symptoms, drugs, examination or test indicators, surgical procedures, anatomical sites, and patients; relationships include disease-symptom relationships, drug-indication relationships, drug-contraindication relationships, and examination indicator-clinical significance relationships;

[0023] The conflict candidate pair types include one or more of the following: conflict between diagnosis and medication contraindications, conflict between treatment drugs and test results, discrepancy between symptom description and diagnostic basis, and conflict between current treatment and past medical history.

[0024] Furthermore, the user's feedback on the generated complete medical record and quality control suggestions includes the user's modifications to the generated medical record, acceptance or rejection of quality control suggestions, and the user's final confirmed version of the medical record; the iterative optimization of the medical domain knowledge enhancement model based on the feedback includes:

[0025] Based on the collected user feedback on the generated complete medical records and quality control suggestions, a supervised fine-tuning sample set and a preference data pair set are generated;

[0026] The medical domain knowledge enhancement model is periodically and incrementally supervised and fine-tuned based on the supervised fine-tuning sample set.

[0027] The medical domain knowledge enhancement model is optimized using reinforcement learning based on the set of preference data pairs.

[0028] Furthermore, the reinforcement learning optimization of the medical domain knowledge enhancement model based on the preference data set includes:

[0029] A hierarchical reward model is trained based on the aforementioned preference data set. The hierarchical reward model includes three reward sub-models: accuracy of medical facts, compliance with norms, and clinical applicability.

[0030] Using the current knowledge-enhancing big data model in the medical field as the strategy model and the hierarchical reward model as the reward function, the strategy optimization algorithm is used to update the parameters of the strategy model under the medical safety constraint mechanism, so as to maximize the comprehensive reward given by the hierarchical reward model.

[0031] The medical safety constraint mechanism applies rewards and penalties to high-risk outputs involving medication contraindications, dosage errors, and diagnostic omissions.

[0032] Furthermore,

[0033] During the supervised fine-tuning training of the medical foundation model using a unified multi-task instruction dataset, a task identifier embedding mechanism is employed to add a unique identifier to each task type; a task-balanced sampling strategy is adopted to dynamically adjust the sampling weights according to the training loss of each task type; progressive multi-task learning is used, introducing training in stages according to task difficulty; and different task samples are mixed in the training batch to promote knowledge sharing between tasks through gradient accumulation.

[0034] Furthermore, when using a unified multi-task instruction dataset to supervise the fine-tuning training of the medical foundation model, the total loss function... Represented as:

[0035] ;

[0036] In the formula, This represents the dynamically weighted loss reflecting the importance and difficulty of integrative medicine. This indicates a loss due to medical logic constraints. The weighting coefficients represent the loss due to logical constraints.

[0037] On the other hand, embodiments of the present invention provide an intelligent medical record generation and quality control system based on a large model, comprising:

[0038] A large-scale model building module is used to construct a large-scale knowledge-enhanced model for the medical domain. This model is capable of performing tasks such as intent recognition, medical record generation, terminology standardization checking, format integrity checking, information extraction, and logical consistency checking. The module includes: constructing a unified multi-task instruction dataset; performing domain-adaptive pre-training on a general-purpose large language model using a medical corpus to obtain a medical foundation model; and performing supervised fine-tuning training on the medical foundation model using the unified multi-task instruction dataset to obtain the large-scale knowledge-enhanced model for the medical domain. The dataset contains intent recognition samples, medical record generation samples, terminology standardization checking samples, format integrity checking samples, information extraction samples, and logical consistency checking samples; these samples are instruction-response pairs.

[0039] The medical record generation module, upon receiving input information for the medical record to be generated, uses the intent recognition and medical record generation functions of the big model enhanced by medical domain knowledge, as well as the constructed medical record template library and medical database, to generate a complete medical record.

[0040] The medical record quality control module is used to generate quality control suggestions when receiving medical records to be quality controlled, through the functions of terminology standardization check, format integrity check, information extraction, and logical consistency check of the medical domain knowledge-enhanced big model, as well as the constructed medical knowledge graph.

[0041] The large model optimization module is used to collect user feedback on the generated complete medical records and quality control suggestions, and to iteratively optimize the medical domain knowledge-enhanced large model based on the feedback.

[0042] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0043] This invention provides an intelligent medical record generation and quality control method and system based on a large-scale model. It utilizes a constructed medical domain knowledge-enhanced large-scale model for intelligent medical record generation and quality control. Upon receiving input information for a medical record to be generated, the large-scale model leverages its intent recognition and record generation functions, along with a built-in medical record template library and medical database, to generate a complete medical record. Furthermore, upon receiving a medical record to be quality controlled, the large-scale model utilizes its terminology standardization checks, format integrity checks, information extraction, and logical consistency checks, along with a constructed medical knowledge graph, to generate quality control suggestions. This significantly improves medical record writing efficiency, allowing for rapid generation of structurally complete medical records with concise instructions, drastically reducing document creation time. Through a built-in professional knowledge base and standardized templates, it ensures that the generated medical records strictly conform to industry standards in medical terminology, chapter format, and writing style, achieving standardization and uniformity. Moreover, quality control can identify problems in medical records that are difficult to detect manually, such as terminology errors, missing formats, and deep logical contradictions, improving the accuracy and completeness of the medical record content.

[0044] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0045] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0046] Figure 1 This is a flowchart illustrating the intelligent medical record generation and quality control method based on a large model provided in Embodiment 1 of the present invention. Detailed Implementation

[0047] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0048] Example 1

[0049] A specific embodiment of the present invention discloses an intelligent medical record generation and quality control method based on a large model, such as... Figure 1 As shown, it includes the following steps:

[0050] A large knowledge-enhancing model for the medical field is constructed, which has the functions of performing tasks such as intent recognition, medical record generation, terminology standardization check, format integrity check, information extraction, and logical consistency check.

[0051] When the input information of the medical record to be generated is received, the intent recognition and medical record generation functions of the big model are enhanced by medical domain knowledge, as well as the constructed medical record template library and medical database, to generate a complete medical record.

[0052] When receiving medical records to be quality controlled, the system uses the functions of the medical domain knowledge-enhanced big data model to check terminology standardization, format integrity, information extraction, and logical consistency, as well as the constructed medical knowledge graph, to generate quality control suggestions.

[0053] This involves collecting user feedback on the generated complete medical records and quality control suggestions, and iteratively optimizing the medical domain knowledge enhancement model based on the feedback.

[0054] It should be noted that users can select medical record generation and quality control through the external interface according to their specific needs; during the execution process, the corresponding steps will be executed according to the user's specific selection.

[0055] It is understood that the medical record generation and quality control method provided in this embodiment can automatically generate medical record content that conforms to the specifications, and perform multi-dimensional quality control on existing or newly generated medical records, which can significantly improve doctors' work efficiency, ensure the standardization and high quality of medical record data, and provide a reliable data foundation for subsequent clinical research, hospital management and intelligent assisted diagnosis.

[0056] During implementation, when receiving input information for the medical record to be generated, a complete medical record is generated in the following manner:

[0057] A1. Based on the input information of the medical record to be generated, an intent recognition instruction is generated and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs the type of the medical record to be generated through the intent recognition function.

[0058] Specifically, the intent recognition instruction is expressed as "Identify the type of medical record to be generated based on the following input: {input information}". For example, the intent recognition instruction is "Identify the type of medical record to be generated based on the following input: {patient has had a fever for three days, cough and sputum}".

[0059] Specifically, the types of medical records include admission records, progress notes, surgery-related records, consultation records, resuscitation records, and discharge summaries.

[0060] A2. Based on the type of medical record to be generated and the constructed medical record template library, a structured template for the medical record to be generated is obtained; based on the input information of the medical record to be generated and the constructed medical database, medical knowledge fragments for the medical record to be generated are obtained.

[0061] Specifically, the medical record template library stores structured templates for various medical record types; the structured templates include the chapters, order, and data items that a medical record must contain.

[0062] Specifically, the medical database is a professional database in the medical field that has undergone structured processing and has been vectorized indexed. In particular, the medical database stores structured knowledge fragments, each fragment containing the original text, its category (guidelines / textbooks / medical record fragments / drug instructions), applicable disease tags, and semantic vectors generated through text embedding models. Based on the semantic vectors, vector encoding is performed to build efficient vector indexes (such as approximate nearest neighbor indexes based on FAISS or Milvus).

[0063] More specifically, the text embedding model is a model based on the BERT architecture and pre-trained on a medical corpus.

[0064] In specific implementation, based on the input information of the medical record to be generated and the constructed medical database, the medical knowledge fragments of the medical record to be generated are obtained, including:

[0065] The input information of the medical record to be generated is vectorized and semantic similarity is performed in the constructed medical database. At the same time, keyword matching is performed, and the top-ranked knowledge fragments are obtained through fusion and ranking. These knowledge fragments are then used as the medical knowledge fragments of the medical record to be generated.

[0066] Specifically, the input information is vectorized using a text embedding model to obtain the query vector. The text embedding model used when constructing the medical database is adopted. For example, the input text is "Male patient, 65 years old, admitted to the hospital due to sudden chest pain for 3 hours, electrocardiogram shows acute anterior wall myocardial infarction", which is vectorized as "[0.12, -0.45, 0.87, 0.02, -0.33, ..., 0.19, 0.55]".

[0067] The first candidate set is obtained by searching the medical database based on cosine similarity; including: calculating the cosine similarity score between each vector in the medical database and the query vector, sorting them from high to low according to the cosine similarity score, and taking the top K1 knowledge fragments to form the first candidate set; for example, K1=20.

[0068] Keyword extraction from input information includes: extracting keywords from input information using a medical named entity recognition model or rules. Keywords include medical entities and terms. For example, a BERT model pre-trained on Chinese medical text is used as an encoder, followed by a linear classification layer for sequence labeling, thereby identifying and extracting medical entities and terms mentioned in the input information as keywords.

[0069] The second candidate set is obtained by retrieving from the medical database based on the BM25 algorithm; including: calculating the relevance score between the extracted keywords and each knowledge fragment in the medical database using the BM25 algorithm, sorting them from high to low relevance scores, and taking the top K2 knowledge fragments to form the second candidate set; for example, K2=20;

[0070] The first and second candidate sets are merged using a reciprocal rank fusion algorithm. The most relevant knowledge fragments are selected as the medical knowledge fragments for generating the medical record. This process includes: sorting the knowledge fragments in the first candidate set by cosine similarity score from highest to lowest; sorting the knowledge fragments in the second candidate set by relevance score from highest to lowest; for knowledge fragments appearing in both candidate sets, their fusion score is the sum of their reciprocals of ranking in both sets; for knowledge fragments appearing only in one candidate set, their fusion score is the reciprocal of their ranking in that candidate set; and sorting all knowledge fragments in both the first and second candidate sets by fusion score from highest to lowest, selecting the top K3 knowledge fragments as the medical knowledge fragments for generating the medical record. For example, K3 = 10.

[0071] This completes the process of retrieving the most relevant medical knowledge fragments from the constructed medical database for the input information.

[0072] A3 generates a medical record generation instruction based on the input information, type, structured template, and medical knowledge fragments of the medical record to be generated, and sends it to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model generates a complete medical record through the medical record generation function.

[0073] Specifically, the medical record generation instruction is expressed as "Generate a [medical record type] based on the following information: {input information}, {medical knowledge fragment}, {structured template}".

[0074] Specifically, the medical knowledge enhancement model uses template constraint decoding technology in the process of generating a complete medical record through the medical record generation function. Specifically, the structured template of the medical record is parsed into chapter sequence constraints. In the autoregressive generation process of the medical knowledge enhancement model, when it is detected that the content of the current chapter has been generated, the sampling probability distribution of the next token is modified to force the insertion of the title token of the next chapter. This ensures that the generated medical record strictly follows the chapter structure and order defined by the template, ensuring that the chapters are complete and the order is correct, and generating a medical record document with accurate content and standardized structure.

[0075] During implementation, when receiving medical records to be quality controlled, quality control recommendations are generated using the following methods:

[0076] B1. If terminology quality control is selected, corresponding instructions are generated based on the medical records to be controlled and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs quality control suggestions through terminology standardization checks.

[0077] Specifically, the instruction for terminology quality control is expressed as: "Check the terminology errors in the following medical record text: {medical record to be quality controlled}"; the quality control suggestions output by the medical domain knowledge augmentation big model in response to the terminology quality control instruction include non-standard, inconsistent or ambiguous medical terms, and provide standardized modified text.

[0078] Specifically, the quality control recommendations for the term "quality control" are represented using structured JSON. For example, a quality control recommendation would be {"errors":[{"term":"Plavix","position":[x,y],"suggestion":"clopidogrel"}]}.

[0079] B2. If format integrity is required for quality control, then based on the medical record to be controlled and the corresponding type of structured template, a corresponding instruction is generated and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs quality control suggestions through the format integrity check function.

[0080] Specifically, the instruction for format integrity quality control is expressed as: "Check the format integrity of the medical record text based on the following: {medical record to be quality controlled}, {structured template}"; the quality control recommendations output by the medical domain knowledge augmentation big model in response to the format integrity quality control instruction include whether the structure of the medical record text is complete and whether there are any missing chapters or data items.

[0081] B3. If logical quality control is selected, an information extraction instruction is generated based on the medical records to be controlled and sent to the medical domain knowledge enhancement model. The medical domain knowledge enhancement model outputs each medical triplet through the information extraction function. Based on each medical triplet and the constructed medical knowledge graph, each contradiction candidate pair is obtained. Based on each contradiction candidate pair and its context information in the medical records to be controlled, a corresponding instruction is generated and sent to the medical domain knowledge enhancement model. The medical domain knowledge enhancement model outputs quality control suggestions through the logical consistency check function.

[0082] Specifically, the information extraction instruction is expressed as "Extract the medical triplet of the following medical records: {medical records to be quality controlled}".

[0083] Specifically, the medical triplet represents structured medical facts through subject, relation, and object; wherein, the subject and object in the medical triplet include at least one of the following medical entities: patient, disease diagnosis, drug, surgical procedure, examination and testing items, clinical manifestation, anatomical location, and medical equipment; the relation includes at least one of the following: suffering from, diagnosed as, receiving treatment, using drugs, used for treatment, undergoing examination, manifesting as, contraindicated in, causing, and combined with;

[0084] For example, the medical record text reads: "The patient was diagnosed with type 2 diabetes, with poor glycemic control. Physical examination: no edema in both lower extremities. Laboratory tests showed: serum creatinine 500 μmol / L. Prescription: metformin 0.5g gtid."; The extracted ternary group is: (patient, diagnosed with type 2 diabetes); (patient, underwent examination, serum creatinine 500 μmol / L); (patient, presented with no edema in both lower extremities); (patient, using medication, metformin).

[0085] Specifically, the medical knowledge graph adopts an entity-relationship-entity structure; wherein, entities include diseases, symptoms, drugs, examination or test indicators, surgical procedures, anatomical sites, and patients; relationships include disease-symptom relationships, drug-indication relationships, drug-contraindication relationships, and examination indicator-clinical significance relationships; the types of conflict candidate pairs include one or more of the following: conflict between diagnosis and drug contraindication, conflict between treatment drugs and test results, inconsistency between symptom description and diagnostic basis, and conflict between current treatment and past medical history.

[0086] It should be noted that the medical knowledge graph is based on a unified medical language system, a drug knowledge base, and clinical guidelines manually added by experts.

[0087] In practice, each medical triplet is used to obtain candidate pairs of contradictions based on the constructed medical knowledge graph, including the association and matching of each medical triplet with the medical knowledge graph; through graph query, candidate pairs of contradictions between each medical triplet are identified.

[0088] For example, the knowledge graph can be used to find "serum creatinine 500 μmol / L indicates severe renal insufficiency" and "metformin is contraindicated in patients with renal insufficiency", thereby identifying (test result: serum creatinine 500) and (medication: metformin) as contradictory candidate pairs.

[0089] Specifically, based on each medical triplet and the constructed medical knowledge graph, candidate pairs of contradictions are obtained, including:

[0090] Each medical entity in each medical triplet is linked to the corresponding entity in the medical knowledge graph through a combination of string matching and semantic similarity calculation.

[0091] Map the relationships in medical triples to the relationship types in a medical knowledge graph;

[0092] For at least one triplet pair in each medical triplet after linking and mapping, query the medical knowledge graph to see if there is a direct or indirect association path between the entities involved in the two triplets that meets the type of contradictory candidate pair; where a direct path is where the two entities are directly connected by an edge in the medical knowledge graph, and an indirect path is where the two entities are connected through one or more other entities.

[0093] If a path supporting the contradictory candidate pair type is found in the medical knowledge graph, and the confidence level of the path is higher than a preset threshold, then the triplet pair is identified as a contradictory candidate pair, and the path is recorded as supporting evidence.

[0094] Specifically, the confidence of an associated path is calculated as follows: for a path consisting of multiple edges, its overall confidence is the product of the confidence of each edge on the path; wherein, the confidence of a single edge is pre-set based on the authority of its knowledge source.

[0095] Specifically, the confidence level of the association path is set after considering domain knowledge, data statistics, business risks, and system performance trade-offs.

[0096] For example, the medical triplet pairs are: Triplet 1: (patient, taking, warfarin), Triplet 2: (patient, taking, aspirin); Searching in the medical knowledge graph, extracting entities: warfarin, aspirin; selecting the conflict between diagnosis and medication contraindications; querying the association paths: direct path: searching for (warfarin, and, aspirin, there is an interaction), indirect path: searching for (warfarin, increases bleeding risk) and (aspirin, increases bleeding risk), associated through the intermediate concept of "bleeding risk"; the medical knowledge graph stores direct knowledge of "the combined use of warfarin and aspirin significantly increases the bleeding risk," or indirect knowledge associated through "bleeding risk"; determining that an association path matching "conflict between diagnosis and medication contraindications" (increases bleeding risk) is found, and the confidence of this path is higher than a preset threshold, therefore (warfarin, aspirin) is determined to be a conflict candidate pair.

[0097] Specifically, based on each candidate pair of contradictions and their contextual information in the medical records to be quality controlled, the generated instruction is expressed as: "Analyze whether there is a logical contradiction in the following medical information, and please provide the reasoning process and conclusion: {each candidate pair of contradictions and their contextual information in the medical records to be quality controlled}". The quality control suggestions output by the medical domain knowledge enhancement big model in response to this instruction include the contradiction analysis process, the final judgment, and the clinical interpretation.

[0098] For example, the quality control recommendation from the logic control is: "A serum creatinine level of 500 μmol / L indicates a significant decrease in eGFR, which is indicative of severe renal insufficiency. Metformin is mainly excreted through the kidneys, and drug accumulation in renal insufficiency can lead to lactic acidosis. Therefore, this prescription presents a contradictory contraindication, and it is recommended to switch to a hypoglycemic drug that is not metabolized by the kidneys."

[0099] Understandably, logical quality control achieves in-depth analysis layer by layer, from structured extraction to knowledge association and then to intelligent reasoning, ensuring the accuracy and interpretability of logical contradiction detection.

[0100] It should be noted that users can select the quality control type through the external interface according to their specific needs, and then perform the corresponding quality control steps based on the selected quality control type. Furthermore, multiple quality control types or all quality control types can be selected simultaneously, and the corresponding steps can be performed separately. After obtaining the quality control suggestions, they can be summarized and fed back to the user's operation interface.

[0101] During implementation, a large-scale knowledge-enhanced model for the medical field will be constructed using the following methods:

[0102] S11. Construct a unified multi-task instruction dataset, which includes intent recognition samples, medical record generation samples, terminology standardization check samples, format integrity check samples, information extraction samples, and logical consistency check samples; the samples are instruction-response pairs.

[0103] In specific implementation, the unified multi-task instruction dataset is constructed based on the acquired raw medical text data. The raw medical text data includes high-quality desensitized electronic medical records, medical knowledge text, standard terminology database, and actual user input. Among them, the high-quality desensitized electronic medical records are obtained by strictly desensitizing and labeling various types of medical records, such as admission records, progress notes, surgical records, and discharge summaries. The medical knowledge text is obtained by segmenting and labeling textbooks, treatment guidelines, drug instructions, and medical encyclopedia entries with knowledge types (such as "pathophysiology", "diagnostic criteria", and "medication guidance"). The standard terminology database is obtained by constructing a synonym mapping table based on ICD-10 diagnostic codes and descriptions, surgical operation classifications, LOINC test items, and generic or brand names of drugs. The actual user input consists of speech-to-text ward round narrations, handwritten medical record recognition text, and keyword input text from the outpatient system.

[0104] In practice,

[0105] The medical record sample is constructed in the following way:

[0106] The process involves: screening standardized medical records from high-quality desensitized electronic medical records; extracting key medical entities and relationships from these records; converting the extracted key medical entities and relationships into one or more descriptive sentences to form simulated doctor input information; and generating corresponding instructions based on the input information and medical record type, such as "Generate a [medical record type] based on the following information: {input information}", which are then paired with the corresponding standardized medical records to form a medical record generation sample.

[0107] Intent recognition samples are constructed in the following way:

[0108] Label each actual user input with a medical record type label; generate the corresponding instruction "Identify the medical record type to be generated for the following input: {actual user input}" based on the actual user input, and pair it with the medical record type label to form an intent recognition sample.

[0109] The terminology standardization check sample was constructed in the following way:

[0110] The rule-based error injection strategy automatically rewrites correct medical records, including replacing standard terms with synonyms, colloquialisms, or abbreviations to obtain erroneous medical records; manually annotates error locations and standard correction schemes to form annotated results in structured JSON format; and generates corresponding instructions based on the erroneous medical records, such as "Check the terminology errors in the following medical record text: {erroneous medical record}", with the annotation results serving as the response to form a terminology standardization check sample.

[0111] The format integrity check sample is constructed in the following way:

[0112] The rule-based error injection strategy automatically rewrites correct medical records, including deleting necessary chapters and rearranging paragraph order; manually annotates error locations, error types, and standard correction schemes, generating annotated results in structured JSON format; and generates corresponding instructions based on the erroneous medical record and its type, such as "Check the format integrity of the medical record text based on the following: {erroneous medical record}, ​​{structured template}", with the annotation results serving as the response to form a format integrity check sample.

[0113] Information extraction samples are constructed in the following way:

[0114] Medical entity recognition and relation extraction annotation are performed on medical record texts to form a set of medical triples including subject, relation, and object; based on the medical record text, the corresponding instruction "extract medical triples of the following medical records: {medical record text}" is generated, and the set of medical triples is used as a response to form an information extraction sample.

[0115] The logical consistency check sample is constructed in the following way:

[0116] A database of typical logical contradiction scenarios was designed by clinical experts, including conflicts between diagnosis and medication contraindications, and discrepancies between examination results and clinical manifestations. Based on this database, contradictions were injected into correct medical records to generate medical record fragments containing logical errors. Candidate contradiction pairs and their contextual information were labeled, and a chain of thought was formed based on the contradictory elements and reasoning chains. Based on each candidate contradiction pair and its contextual information in the medical records under quality control, corresponding instructions were generated, expressed as: "Analyze whether the following medical information contains logical contradictions. Please provide the reasoning process and conclusion: {each candidate contradiction pair and its contextual information in the medical records under quality control}". The chain of thought serves as the response, forming a logical consistency check sample.

[0117] S12. Use medical corpus to perform domain adaptation pre-training on the general large language model to obtain the medical base model.

[0118] Specifically, the general-purpose large language model in this embodiment is an open-source large language model with powerful general-purpose functions, such as the Qwen series, ChatGLM series, and Baichuan-M2 series.

[0119] Specifically, a massive amount of professional medical data is collected, including authoritative medical textbooks, clinical practice guidelines, medical literature, high-quality electronic medical records that have undergone strict desensitization, drug instructions, and ICD and SNOMED CT scans. The collected professional medical data is preprocessed by cleaning, deduplication, and formatting to obtain medical corpus. It is then pre-trained using standard self-supervised learning objectives (such as masked language modeling (MLM) or causal language modeling (CLM)) to obtain a medical foundation model.

[0120] S13. Supervised fine-tuning training of the medical foundation model is performed using a unified multi-task instruction dataset to obtain a large-scale knowledge-enhanced model for the medical field. During training, a task identifier embedding mechanism is used to add a unique identifier to each task type. A task-balanced sampling strategy is adopted to dynamically adjust the sampling weights according to the training loss of each task type. Progressive multi-task learning is adopted, and training is introduced in stages according to the task difficulty. Furthermore, different task samples are mixed in the training batch to promote knowledge sharing between tasks through gradient accumulation, thereby promoting knowledge transfer and sharing between tasks.

[0121] Specifically, the unique identifier added to different functional task instructions, namely the task identifier, enables the base model to more accurately call the corresponding functional modules to execute the corresponding functions.

[0122] For example, the intent recognition instruction is represented as "[GEN_YI] Identify the type of medical record to be generated from the following input: {input information}"; the medical record generation instruction is represented as "[GEN] Generate a [medical record type] based on the following information: {input information}"; and the terminology quality control instruction is represented as "[QC_TERM] Check the following medical record text for terminology errors: {medical record to be quality controlled}".

[0123] Understandably, a specific task identifier is designed for each type of task. During training, this task identifier is used as the starting token of the input sequence, enabling the model to learn to activate the corresponding functional modules based on the task identifier, thus achieving effective differentiation and coordination between tasks. It should be noted that, in practical applications, all instructions must also be accompanied by the same task identifier.

[0124] Specifically, progressive multi-task learning adopts a course-based learning strategy, focusing on basic tasks (such as information extraction and terminology recognition) in the early stages of training, and gradually introducing complex tasks (such as logical reasoning and medical record generation) so that the model can master multi-level functions step by step.

[0125] Specifically, the task-balanced sampling strategy takes into account the problem of uneven sample sizes across different tasks. It adopts a dynamic sampling weight mechanism to dynamically adjust the sampling probability based on the loss value of each task, ensuring that the model learns evenly across all tasks and avoiding overfitting to a particular task.

[0126] Specifically, the unified multi-task instruction dataset is divided into a training set, a dynamic weight validation set, and a regular validation set.

[0127] Preferably, when using a unified multi-task instruction dataset to supervise the fine-tuning training of the medical foundation model, the total loss function is... Represented as:

[0128] ;

[0129] In the formula, This represents the dynamically weighted loss reflecting the importance and difficulty of integrative medicine. This indicates a loss due to medical logic constraints. The weighting coefficients represent the loss due to logical constraints.

[0130] Specifically, The setting should be adjusted according to the specific scenario and the nature of the rules. For example, setting it to 0.1 ensures that the model can fully learn the core task functions from the data, allowing the dynamic weighted loss to take the lead. This can both provide continuous safety guidance and prevent the rules from excessively interfering with the model's learning of the data's patterns.

[0131] Specifically, a dynamic weighted loss that integrates the importance of medicine with the difficulty of the task. Represented as:

[0132] ;

[0133] in,

[0134] ;

[0135] In the formula, This indicates the total number of tasks. Indicates the first Cross-entropy loss for each task, Indicates the first Each task in the training round Dynamic weights, Indicates the first The medical significance of each task Indicates the first Each task in the training round The relative difficulty level of the task Indicates the first Each task in the training round The rate of change of task loss, Represents the weight distribution smoothing coefficient; where the subscript... Indicates the first One task.

[0136] More specifically, the first The medical importance of each task The range is 0.1 to 1; the setting method is to organize a clinical expert committee to independently score (e.g., 1-10 points) based on the potential clinical risks and impact on treatment decisions caused by task errors, and then normalize by taking the average score and dividing by the highest score. For example: logical consistency quality control = 1.0, terminology standardization quality control = 0.7, format integrity quality control = 0.4.

[0137] More specifically, the first Each task in the training round Relative difficulty level of the task Represented as:

[0138] ;

[0139] in,

[0140] ;

[0141] In the formula, Indicates the first Each task in the training round The task loss is calculated on the dynamic weighted validation set at the end; Indicates the first The initial loss of each task is computed on the dynamic weight validation set before the start of the first training round.

[0142] More specifically, the first Each task in the training round Task loss change rate Represented as:

[0143] ;

[0144] In the formula, Indicates the first Each task in the training round The task loss is calculated on the dynamic weighted validation set at the end.

[0145] More specifically, the first Cross-entropy loss for each task Represented as:

[0146] ;

[0147] In the formula, This indicates the number of samples in the current training batch. Indicates the first Number of output categories for each task Indicates the first The sample at the th The first task The true labels of each category are represented by one-hot vectors, meaning that only the correct category is 1 and the rest are 0. Indicates the first The sample at the th The prediction for the task is the first The probability of each category; where the total number of categories is output. It depends on the specific task: for tasks such as medical record generation and logical consistency checks, This refers to the vocabulary size; for tasks such as intent recognition, terminology standardization checking, format integrity checking, and information extraction. The number of predefined category labels.

[0148] It should be noted that the cross-entropy loss for each task is calculated directly during the forward propagation process of each training batch.

[0149] More specifically, , , All are calculated on the dynamic weight validation set, and their calculation formulas are the same as those for... They are the same, but their calculation timing differs, specifically: To compute the first iteration of the model on the entire dynamic weight validation set using the initial model parameters after model initialization and before formal training begins. The loss of one task; For the model in training rounds At the end, the model parameters at this point are used to compute the first [number]th ... The loss of one task; For the model in training rounds At the end, the first value calculated on the entire dynamic weight validation set. The loss of each task.

[0150] More specifically, the weight distribution smoothing coefficient This is a hyperparameter, ranging from 0.2 to 5.

[0151] Specifically, medical logic constraint loss Represented as:

[0152] ;

[0153] In the formula, This represents the number of samples in the current training batch, and K represents the total number of preset medical logic rules. Indicates violation of Article The penalty weight of each rule; Indicates the first The sample violated the first The indicator function for this rule has a value of 1 when it is violated and a value of 0 when it is not violated.

[0154] Specifically, the medical logic rules are written by medical experts based on clinical guidelines, drug instructions, and common diagnostic and treatment errors. Each rule should include: triggering conditions, constraints, and severity levels, with severity levels including fatal contraindications, strong dissuasion, and weak disadvantage.

[0155] For example, if an entity "Disease D" exists and "Drug M" is on the contraindication list, they should not both exist.

[0156] Specifically, according to the first The severity level of each rule sets the penalty weight. For example, the penalty weight for fatal taboo is set to 5, the penalty weight for strong dissuasion is set to 2, and the penalty weight for weak dissuasion is set to 0.5.

[0157] In implementation, the user's feedback on the generated complete medical record and quality control suggestions includes the user's modifications to the generated medical record, acceptance or rejection of quality control suggestions, and the user's final confirmed version of the medical record; the iterative optimization of the medical domain knowledge enhancement model based on the feedback includes:

[0158] Based on the collected user feedback on the generated complete medical records and quality control suggestions, a supervised fine-tuning sample set and a preference data pair set are generated;

[0159] The medical domain knowledge enhancement model is periodically and incrementally supervised and fine-tuned based on the supervised fine-tuning sample set.

[0160] The medical domain knowledge enhancement model is optimized using reinforcement learning based on the set of preference data pairs.

[0161] Specifically, the supervised fine-tuning sample set is generated in the following way:

[0162] Extract the final version of the medical record confirmed by the doctor from user feedback as the standard response text; pair the original instruction that triggered the generation of the medical record with the standard response text to form a supervised fine-tuning sample.

[0163] Specifically, the preference data set is generated in the following way:

[0164] When a user selects or ranks multiple model outputs (including the initial generated version and / or different modification suggestions) under the same input context, the selection result is recorded; the outputs that the user adopts or ranks better are marked as preferred responses, and the outputs that the user rejects or ranks worse are marked as inferior responses, forming (preferred response, inferior response) preference data pairs.

[0165] For example, when two generated versions, A and B, are provided for the same doctor's dictation, and the doctor chooses version A, the system records the preference pair (A, B). If the doctor modifies version A to obtain version C, the system can generate the preference pair (C, A). For quality control recommendations, if the doctor adopts recommendations 1 and 3 from multiple recommendations and rejects recommendation 2, a preference pair (recommendation 1+3, recommendation 2) can be generated.

[0166] In specific implementation, the reinforcement learning optimization of the medical domain knowledge enhancement model based on the preference data set includes:

[0167] A hierarchical reward model is trained based on the aforementioned preference data set. The hierarchical reward model includes three reward sub-models: accuracy of medical facts, compliance with norms, and clinical applicability.

[0168] Using the current knowledge-enhancing big model in the medical field as the strategy model and the hierarchical reward model as the reward function, the parameters of the strategy model are updated using a policy optimization algorithm (PPO) under the medical safety constraint mechanism, so as to maximize the comprehensive reward given by the hierarchical reward model.

[0169] The medical safety constraint mechanism applies rewards and penalties to high-risk outputs involving medication contraindications, dosage errors, and diagnostic omissions.

[0170] Specifically, in the policy optimization algorithm, the medical safety constraint mechanism, in each round of interaction between the policy model and the environment (i.e., the reward model), after the policy model generates candidate medical record text based on the current state (input instruction), immediately calls a rule-based high-risk pattern detector to scan the text. If the detected content triggers a preset high-risk rule (such as the simultaneous presence of drugs and diseases with a clear contraindication, drug dosage exceeding the safety threshold, or omission of key diagnostic descriptions), a significantly increased fixed negative reward value (e.g., -10) is directly added to the comprehensive reward score calculated by the hierarchical reward model. This punitive reward, together with the original reward, constitutes the input for calculating the PPO advantage function, thereby applying a strong negative gradient signal to the policy parameters that generate such high-risk outputs during policy gradient updates, guiding the policy model to significantly reduce the probability of generating such illegal content in the future. This mechanism ensures that the reinforcement learning optimization process always takes place within the preset medical safety boundaries, preventing the model from pursuing the improvement of other reward indicators at the expense of safety at the algorithmic level.

[0171] Specifically, training a hierarchical reward model based on the preference data set includes:

[0172] The training of the medical fact accuracy reward sub-model involves using preference data to train on the content of TCM fact corrections (such as diagnosis corrections and medication adjustments). This sub-model learns to quantify the severity of medical fact errors. Specifically, the input to this sub-model is a pair of preference data, i.e., a concatenated sequence of dominant and subdominant responses; the output is a continuous scalar reward value used to quantify the correctness of the generated text at the medical fact level. The model structure employs a lightweight, Transformer-based encoder, pre-trained on a large amount of medical text, followed by a regression output layer. The training objective is optimized based on preference data pairs constructed from user feedback: for a given preference pair, the model is trained to maximize the reward difference between the preferred and subdominant responses; its loss function is designed as a cross-entropy loss based on the Bradley-Terry model. In this way, the model learns to map misuse, omission, or logical contradictions of medical entities (such as diseases, drugs, and examinations) into significant negative rewards.

[0173] The training of the normativity compliance reward sub-model involves training on the content related to terminology, formatting, and writing norms corrections using preference data. This sub-model learns to quantify penalties for various degrees of non-standardization. Specifically, the input to this sub-model is the same as that of the medical fact accuracy reward sub-model, and the output is a scalar reward value. The model structure adopts an architecture that shares the underlying encoder with the fact accuracy sub-model but has an independent upper-layer network to capture normativity-related features. The training objective is also to maximize the reward difference along the normativity dimension, and its loss function is consistent with that of the medical fact accuracy reward sub-model. Through learning a large number of such preference pairs, the model can accurately deduct points for issues such as non-standard terminology, missing formatting, and colloquial expressions.

[0174] The training of the clinical usability reward sub-model involves training on the overall quality assessment of clarity of expression, logical coherence, and clinical decision support using preference data. This sub-model learns to comprehensively score the clinical usability of text. Specifically, the input of this sub-model is the same as that of the medical fact accuracy reward sub-model, and the output is a scalar reward value. The model structure includes modules for multi-dimensional evaluation of text coherence, information density, fluency of professional expression, and clinical decision support (such as whether it contains clear follow-up treatment suggestions). The training loss function can be designed as a list-based ranking loss, which encourages the model to give a systematic higher reward to text sequences that doctors clearly prefer, enabling the sub-model to learn more subtle and comprehensive clinical writing preferences.

[0175] The outputs of each reward sub-model are fused together by a learnable weighted network to form the final integrated reward signal. Specifically, the network structure is a simple multilayer perceptron, whose input is a vector composed of three reward scores and whose output is the final fused reward. This network is fine-tuned end-to-end together with each sub-model in the later stages of training.

[0176] Understandably, by iteratively optimizing the knowledge-enhancing model in the medical field based on feedback, it can continuously learn doctors' modification preferences and clinical norms in actual use, enabling the generation and quality control performance to evolve over time and become increasingly adaptable. This results in high-quality, structured medical record data, providing a reliable and standardized data foundation for refined hospital management, clinical scientific research, medical big data analysis, and the development of next-generation clinical decision support systems.

[0177] Compared with existing technologies, this embodiment provides an intelligent medical record generation and quality control method based on a large model. It utilizes a constructed medical domain knowledge-enhanced large model for intelligent medical record generation and quality control. Upon receiving input information for a medical record to be generated, the large model leverages its intent recognition, medical record generation functions, and a built-in medical record template library and medical database to generate a complete medical record. Furthermore, upon receiving a medical record to be quality controlled, the large model utilizes its terminology standardization checks, format integrity checks, information extraction, and logical consistency checks, along with a constructed medical knowledge graph, to generate quality control suggestions. This significantly improves medical record writing efficiency, allowing for rapid generation of structurally complete medical records with concise instructions, drastically reducing document creation time. Through a built-in professional knowledge base and standardized templates, it ensures that the generated medical records strictly conform to industry standards in medical terminology, chapter format, and writing style, achieving standardization and uniformity. Moreover, quality control can identify issues in medical records that are difficult to detect manually, such as terminology errors, missing formats, and deep logical contradictions, improving the accuracy and completeness of the medical record content.

[0178] Example 2

[0179] A specific embodiment of the present invention discloses an intelligent medical record generation and quality control system based on a large model, comprising:

[0180] A large-scale model building module is used to construct a large-scale knowledge-enhanced model for the medical domain. This model is capable of performing tasks such as intent recognition, medical record generation, terminology standardization checking, format integrity checking, information extraction, and logical consistency checking. The module includes: constructing a unified multi-task instruction dataset; performing domain-adaptive pre-training on a general-purpose large language model using a medical corpus to obtain a medical foundation model; and performing supervised fine-tuning training on the medical foundation model using the unified multi-task instruction dataset to obtain the large-scale knowledge-enhanced model for the medical domain. The dataset contains intent recognition samples, medical record generation samples, terminology standardization checking samples, format integrity checking samples, information extraction samples, and logical consistency checking samples; these samples are instruction-response pairs.

[0181] The medical record generation module, upon receiving input information for the medical record to be generated, uses the intent recognition and medical record generation functions of the big model enhanced by medical domain knowledge, as well as the constructed medical record template library and medical database, to generate a complete medical record.

[0182] The medical record quality control module is used to generate quality control suggestions when receiving medical records to be quality controlled, through the functions of terminology standardization check, format integrity check, information extraction, and logical consistency check of the medical domain knowledge-enhanced big model, as well as the constructed medical knowledge graph.

[0183] The large model optimization module is used to collect user feedback on the generated complete medical records and quality control suggestions, and to iteratively optimize the medical domain knowledge-enhanced large model based on the feedback.

[0184] The specific implementation process of this invention can be found in the above method embodiments, and will not be repeated here.

[0185] Since this embodiment is based on the same principle as the above method embodiments, this system also has the corresponding technical effects of the above method embodiments.

[0186] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0187] 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 changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for intelligent medical record generation and quality control based on a large model, characterized in that, Includes the following steps: A large-scale knowledge-enhancing model for the medical domain is constructed, capable of performing tasks such as intent recognition, medical record generation, terminology standardization checking, format integrity checking, information extraction, and logical consistency checking. The process includes: constructing a unified multi-task instruction dataset; performing domain-adaptive pre-training on a general large language model using a medical corpus to obtain a medical foundation model; and performing supervised fine-tuning training on the medical foundation model using the unified multi-task instruction dataset to obtain the large-scale knowledge-enhancing model for the medical domain. The dataset includes intent recognition samples, medical record generation samples, terminology standardization checking samples, format integrity checking samples, information extraction samples, and logical consistency checking samples; the samples are instruction-response pairs. When the input information of the medical record to be generated is received, the intent recognition and medical record generation functions of the big model are enhanced by medical domain knowledge, as well as the constructed medical record template library and medical database, to generate a complete medical record. When receiving medical records to be quality controlled, the system uses the functions of the medical domain knowledge-enhanced big data model to check terminology standardization, format integrity, information extraction, and logical consistency, as well as the constructed medical knowledge graph, to generate quality control suggestions. This involves collecting user feedback on the generated complete medical records and quality control suggestions, and iteratively optimizing the medical domain knowledge enhancement model based on the feedback. Among them, when using a unified multi-task instruction dataset to perform supervised fine-tuning training of the medical foundation model, the total loss function is... Represented as: ; In the formula, This represents the dynamically weighted loss reflecting the importance and difficulty of integrative medicine. This indicates a loss due to medical logic constraints. The weighting coefficients representing the logical constraint loss; Dynamic weighted loss based on the importance of integrated medicine and the difficulty of the task Represented as: ; in, ; In the formula, This indicates the total number of tasks. Indicates the first Cross-entropy loss for each task, Indicates the first Each task in the training round Dynamic weights, Indicates the first The medical significance of each task Indicates the first Each task in the training round The relative difficulty level of the task Indicates the first Each task in the training round The rate of change of task loss, Represents the weight distribution smoothing coefficient; where the subscript... Indicates the first One task; Medical logical constraint loss Represented as: ; In the formula, This represents the number of samples in the current training batch, and K represents the total number of preset medical logic rules. Indicates violation of Article The penalty weight of each rule; Indicates the first The sample violated the first The indicator function for this rule has a value of 1 when it is violated and a value of 0 when it is not violated. The user feedback on the generated complete medical record and quality control suggestions includes the user's modifications to the generated medical record, acceptance or rejection of quality control suggestions, and the user's final confirmed version of the medical record; the iterative optimization of the medical domain knowledge enhancement model based on the feedback includes: Based on the collected user feedback on the generated complete medical records and quality control suggestions, a supervised fine-tuning sample set and a preference data pair set are generated; The medical domain knowledge enhancement model is periodically and incrementally supervised and fine-tuned based on the supervised fine-tuning sample set. A hierarchical reward model is trained based on the aforementioned preference data set. The hierarchical reward model includes three reward sub-models: accuracy of medical facts, compliance with norms, and clinical applicability. Using the current knowledge-enhancing big data model in the medical field as the strategy model and the hierarchical reward model as the reward function, the strategy optimization algorithm is used to update the parameters of the strategy model under the medical safety constraint mechanism, so as to maximize the comprehensive reward given by the hierarchical reward model. The medical safety constraint mechanism applies rewards and penalties to high-risk outputs involving medication contraindications, dosage errors, and diagnostic omissions.

2. The intelligent medical record generation and quality control method based on a large model according to claim 1, characterized in that, When the input information for generating a medical record is received, a complete medical record is generated in the following manner: Based on the input information of the medical record to be generated, an intent recognition command is generated and sent to the medical knowledge enhancement big data model. The medical knowledge-enhanced big data model outputs the type of medical record to be generated through intent recognition function; Based on the type of medical record to be generated and the constructed medical record template library, a structured template for the medical record to be generated is obtained; Based on the input information of the medical record to be generated and the constructed medical database, medical knowledge fragments of the medical record to be generated are obtained. Based on the input information, type, structured template, and medical knowledge fragments of the medical record to be generated, a medical record generation instruction is generated and sent to the medical domain knowledge enhancement big model. The medical knowledge enhancement model generates complete medical records through its medical record generation function.

3. The intelligent medical record generation and quality control method based on a large model according to claim 2, characterized in that, The medical database is a professional database in the medical field that has undergone structured processing and has been indexed using vectorization. Based on the input information of the medical record to be generated and the constructed medical database, the medical knowledge fragments of the medical record to be generated are obtained, including: The input information of the medical record to be generated is vectorized and semantic similarity is performed in the constructed medical database. At the same time, keyword matching is performed, and the most relevant knowledge fragments are obtained by fusion and ranking. The obtained knowledge fragments are used as the medical knowledge fragments of the medical record to be generated.

4. The intelligent medical record generation and quality control method based on a large model according to claim 1, characterized in that, When receiving medical records awaiting quality control, generate quality control recommendations using the following methods: If terminology quality control is selected, corresponding instructions are generated based on the medical records to be controlled and sent to the medical domain knowledge enhancement model; the medical domain knowledge enhancement model outputs quality control suggestions through terminology standardization checks. If the format integrity is checked, then based on the medical record to be checked and the corresponding structured template, the corresponding instructions are generated and sent to the medical knowledge enhancement big model. The medical knowledge enhancement model outputs quality control suggestions through its format integrity check function; If logical quality control is selected, information extraction instructions are generated based on the medical records to be controlled and sent to the medical knowledge enhancement model. The medical domain knowledge enhancement model outputs medical triples through information extraction; based on each medical triple and the constructed medical knowledge graph, it obtains each contradiction candidate pair; based on each contradiction candidate pair and its context information in the medical records to be quality controlled, it generates corresponding instructions and sends them to the medical domain knowledge enhancement model. The medical knowledge-enhancing big data model outputs quality control suggestions through a logical consistency check function.

5. The intelligent medical record generation and quality control method based on a large model according to claim 4, characterized in that, The medical triplet represents structured medical facts through subject, relation, and object; wherein, the subject and object in the medical triplet include at least one of the following medical entities: patient, disease diagnosis, drug, surgical procedure, examination and testing items, clinical manifestation, anatomical location, and medical equipment; the relation includes at least one of the following: suffering from, diagnosed as, receiving treatment, using drugs, used for treatment, undergoing examination, manifesting as, contraindicated in, causing, and combined with. The medical knowledge graph adopts an entity-relationship-entity structure; where entities include diseases, symptoms, drugs, examination or test indicators, surgical procedures, anatomical sites, and patients; relationships include disease-symptom relationships, drug-indication relationships, drug-contraindication relationships, and examination indicator-clinical significance relationships; The conflict candidate pair types include one or more of the following: conflict between diagnosis and medication contraindications, conflict between treatment drugs and test results, discrepancy between symptom description and diagnostic basis, and conflict between current treatment and past medical history.

6. The intelligent medical record generation and quality control method based on a large model according to claim 1, characterized in that, During the supervised fine-tuning training of the medical foundation model using a unified multi-task instruction dataset, a task identifier embedding mechanism is employed to add a unique identifier to each task type; a task-balanced sampling strategy is adopted to dynamically adjust the sampling weights according to the training loss of each task type; progressive multi-task learning is used, introducing training in stages according to task difficulty; and different task samples are mixed in the training batch to promote knowledge sharing between tasks through gradient accumulation.

7. A large-scale model-based intelligent medical record generation and quality control system, characterized in that, include: A large-scale model building module is used to construct a large-scale knowledge-enhanced model for the medical domain. This model is capable of performing tasks such as intent recognition, medical record generation, terminology standardization checking, format integrity checking, information extraction, and logical consistency checking. The module includes: constructing a unified multi-task instruction dataset; performing domain-adaptive pre-training on a general-purpose large language model using a medical corpus to obtain a medical foundation model; and performing supervised fine-tuning training on the medical foundation model using the unified multi-task instruction dataset to obtain the large-scale knowledge-enhanced model for the medical domain. The dataset contains intent recognition samples, medical record generation samples, terminology standardization checking samples, format integrity checking samples, information extraction samples, and logical consistency checking samples; these samples are instruction-response pairs. The medical record generation module, upon receiving input information for the medical record to be generated, uses the intent recognition and medical record generation functions of the big model enhanced by medical domain knowledge, as well as the constructed medical record template library and medical database, to generate a complete medical record. The medical record quality control module is used to generate quality control suggestions when receiving medical records to be quality controlled, through the functions of terminology standardization check, format integrity check, information extraction, and logical consistency check of the medical domain knowledge-enhanced big model, as well as the constructed medical knowledge graph. The large model optimization module is used to collect user feedback on the generated complete medical records and quality control suggestions, and to iteratively optimize the medical domain knowledge-enhanced large model based on the feedback. Among them, when using a unified multi-task instruction dataset to perform supervised fine-tuning training of the medical foundation model, the total loss function is... Represented as: ; In the formula, This represents the dynamically weighted loss reflecting the importance and difficulty of integrative medicine. This indicates a loss due to medical logic constraints. The weighting coefficients representing the logical constraint loss; Dynamic weighted loss based on the importance of integrated medicine and the difficulty of the task Represented as: ; in, ; In the formula, This indicates the total number of tasks. Indicates the first Cross-entropy loss for each task, Indicates the first Each task in the training round Dynamic weights, Indicates the first The medical significance of each task Indicates the first Each task in the training round The relative difficulty level of the task Indicates the first Each task in the training round The rate of change of task loss, Represents the weight distribution smoothing coefficient; where the subscript... Indicates the first One task; Medical logical constraint loss Represented as: ; In the formula, This represents the number of samples in the current training batch, and K represents the total number of preset medical logic rules. Indicates violation of Article The penalty weight of each rule; Indicates the first The sample violated the first The indicator function for this rule has a value of 1 when it is violated and a value of 0 when it is not violated. The user feedback on the generated complete medical record and quality control suggestions includes the user's modifications to the generated medical record, acceptance or rejection of quality control suggestions, and the user's final confirmed version of the medical record; the iterative optimization of the medical domain knowledge enhancement model based on the feedback includes: Based on the collected user feedback on the generated complete medical records and quality control suggestions, a supervised fine-tuning sample set and a preference data pair set are generated; The medical domain knowledge enhancement model is periodically and incrementally supervised and fine-tuned based on the supervised fine-tuning sample set. A hierarchical reward model is trained based on the aforementioned preference data set. The hierarchical reward model includes three reward sub-models: accuracy of medical facts, compliance with norms, and clinical applicability. Using the current knowledge-enhancing big data model in the medical field as the strategy model and the hierarchical reward model as the reward function, the strategy optimization algorithm is used to update the parameters of the strategy model under the medical safety constraint mechanism, so as to maximize the comprehensive reward given by the hierarchical reward model. The medical safety constraint mechanism applies rewards and penalties to high-risk outputs involving medication contraindications, dosage errors, and diagnostic omissions.

Citation Information

Patent Citations

  • Medical service method based on large medical model and related device

    CN119742047A

  • Electronic medical record generation method, task execution method, equipment, medium and product

    CN120600202A