Artificial intelligence-based electronic medical record generation method, electronic device, and storage medium

CN122599084APending Publication Date: 2026-08-18SHANGHAI XUNZHEN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610713850.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-22
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

本发明的目的在于提供一种基于人工智能的电子病历生成方法、电子设备及存储介质,旨在至少部分解决现有技术中电子病历生成自动化程度低、准确性不足以及缺乏对医学知识和事实依据有效融合的问题

Benefits of technology

[0003] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the steps of the method in the first aspect. The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements an artificial intelligence-based electronic medical record generation method as described above. Compared with the prior art, the present invention has the following beneficial effects: 1. Improved accuracy and factual consistency of generated medical records: by introducing entity constraint scores. This invention mandates that the generative model faithfully reproduces the key medical entities extracted from the original dialogue during the generation process, effectively suppressing the "illusion" phenomenon of large language models and ensuring a high degree of consistency between the medical record content (such as chief complaint and present illness history) and the facts of doctor-patient communication, thus avoiding information omissions and fabrications. 2. It enhances the medical professionalism and logical consistency of the generated medical records: by introducing knowledge association scores... This invention integrates external, structured medical knowledge graph information into the generation process. This allows the model to follow existing medical logic and knowledge relationships (such as the correspondence between symptoms and diseases, and drugs and indications) when generating chapters requiring reasoning, such as diagnoses and treatment suggestions, thereby significantly improving the professionalism and reliability of the generated content. 3. It achieves end-to-end automated generation from dialogue to medical records: This invention integrates multiple stages such as speech recognition, entity recognition, knowledge graph retrieval, and controlled text generation, constructing a complete automated process that directly generates structured electronic medical records from raw doctor-patient dialogue, greatly reducing the paperwork burden on clinicians and improving work efficiency. 4. It provides a flexible and controllable generation mechanism: By dynamically adjusting the weight coefficients... and This invention can flexibly balance the fidelity to facts and the reliance on medical knowledge according to the different attributes of the generated medical record chapters (factual description type or analytical decision type), and achieves fine control over the generation process, so that the final generated medical record is both factual and has depth and professionalism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122599084A_ABST
    Figure CN122599084A_ABST
Patent Text Reader

Abstract

This invention discloses an artificial intelligence-based electronic medical record generation method, electronic device, and storage medium, relating to the fields of artificial intelligence and medical information processing technology. The method includes: acquiring voice data of doctor-patient dialogue and performing speech recognition on the voice data to obtain unstructured dialogue text; performing medical entity recognition on the unstructured dialogue text to obtain a target entity set; retrieving related information from a preset medical knowledge graph based on the target entity set to obtain a contextual knowledge subgraph; and constructing structured electronic medical record text by integrating the unstructured dialogue text, target entity set, and contextual knowledge subgraph based on a preset large language model, using a sequence generation method. This invention significantly improves the accuracy, factual consistency, and professionalism of generated medical records, realizing the automated and intelligent generation of high-quality structured electronic medical records from doctor-patient dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to the field of artificial intelligence and medical information processing technology, and particularly to an artificial intelligence-based electronic medical record generation method, electronic device, and storage medium. Background Technology With the deepening development of medical informatization, Electronic Medical Records (EMRs) have become an indispensable core component of the modern medical system. EMRs have replaced traditional paper-based medical records, solving the problems of information storage, retrieval, and sharing. However, in current clinical practice, the creation of EMRs mainly relies on manual data entry by doctors. This process not only consumes a significant amount of doctors' valuable time but is also prone to errors or omissions due to fatigue, negligence, and other factors. Furthermore, a large amount of clinical information exists in unstructured or semi-structured text form, making it difficult to directly use for subsequent clinical decision support, medical quality control, and research data analysis. To address these issues, Natural Language Processing (NLP) technology has been introduced into the intelligent processing of EMRs. Among these, Named Entity Recognition (NER) is a key foundational task, aiming to automatically identify entities with specific medical significance, such as symptoms, diseases, medications, and examinations, from unstructured text. Existing technologies still have the following shortcomings in practical applications: First, these technologies all focus on the single task of named entity recognition, that is, "extracting" information from existing text, and fail to address the fundamental need to "generate" a complete and compliant structured electronic medical record directly from the original doctor-patient dialogue. Second, relying solely on entity recognition results cannot construct logically coherent medical records that conform to medical writing standards, especially for sections such as "preliminary diagnosis" and "treatment plan" that require comprehensive analysis and reasoning; existing technologies cannot provide effective support in these areas. Third, while Large Language Models (LLMs) have emerged in recent years and possess powerful text generation capabilities, they exhibit a "phantom" phenomenon when directly applied to high-risk fields such as medicine. This means they may fabricate content that does not conform to the facts of the original dialogue or generate erroneous associations lacking medical common sense, making it difficult to guarantee the reliability of the generated results. Therefore, how to efficiently and accurately convert doctor-patient dialogues into structured electronic medical records while ensuring the medical professionalism and factual accuracy of the record content is a technical problem that urgently needs to be solved in this field. Summary of the Invention The purpose of this invention is to provide an artificial intelligence-based electronic medical record (EMR) generation method, electronic device, and storage medium, aiming to at least partially solve the problems of low automation, insufficient accuracy, and lack of effective integration of medical knowledge and factual evidence in existing EMR generation technologies. To achieve the above objective, this invention provides an artificial intelligence-based EMR generation method comprising: acquiring voice data of doctor-patient dialogue and performing speech recognition on the voice data to obtain unstructured dialogue text; performing medical entity recognition on the unstructured dialogue text to obtain a target entity set; retrieving related information from a preset medical knowledge graph based on the target entity set to obtain a contextual knowledge subgraph; and, based on a preset large language model, integrating the unstructured dialogue text, the target entity set, and the contextual knowledge subgraph to construct a structured EMR text using a sequence generation method.

[0002] Preferably, when generating each target word, the preset large language model calculates the final generation probability of each candidate word using the following fusion probability model. : ,in, For the current generation time step Target word units, For the generated word sequence, The unstructured dialogue text; The original probability of the target word element output by the large language model; The target word and the target entity set Entity constraint score; The target lexical and the context knowledge subgraph Knowledge-related scores; and The preset weighting coefficients, The normalized exponential function is used. Preferably, the step of performing medical entity recognition on the unstructured dialogue text includes: inputting the unstructured dialogue text into a Transformer encoder model pre-trained on a massive medical corpus to obtain the context feature vector of each word in the unstructured dialogue text; inputting the context feature vector into a Conditional Random Field (CRF) layer to perform sequence labeling on each word to identify and extract medical entities including symptoms, diseases, drugs, examinations, and surgeries, thus forming the target entity set. Preferably, the step of retrieving related information in a preset medical knowledge graph based on the target entity set includes: using each entity in the target entity set as a starting node; and performing a predetermined number of hops in the medical knowledge graph, centered on the starting node. Breadth-first search or random walk algorithms are used to extract nodes that are related to the starting node. The context knowledge subgraph is formed by connecting all entity nodes and relation edges within the jump connection range. Preferably, the entity constraint score... The calculation method is as follows: if the target word Able to interact with the target entity set If the prefixes of any entity that has not yet been fully generated form a continuous text sequence, a preset positive reward is assigned; if the target word... This causes the generated sequence to deviate from the target entity set. Any entity within this framework is assigned a preset negative penalty; otherwise, the entity constraint score is zero. Preferably, the knowledge association score... The calculation method is as follows: the target word unit Embedded vectors and generated word sequences The state vectors are aggregated to obtain the query vector of the current generated state; a graph attention network mechanism is used to calculate the query vector and the context knowledge subgraph. Attention weights are assigned to the embedding vectors of all entities and relations; the knowledge association score is obtained by weighted summation of these attention weights. Preferably, the weight coefficients... and The weights are dynamically adjusted; when generating factual description sections such as the chief complaint and present illness history in structured electronic medical records, the weight coefficients related to entity constraint scores are increased. The value of the knowledge association score is increased when generating analytical decision-making sections such as preliminary diagnosis and treatment plans. The value of . Preferably, the step of constructing the structured electronic medical record text further includes: before inputting the unstructured dialogue text into the large language model, pre-constructing a structured instruction prompt; the structured instruction prompt specifies the chapter template that the electronic medical record should include, and the chapter template includes at least the chief complaint, present illness, past medical history, physical examination, auxiliary examinations, preliminary diagnosis and treatment plan.

[0003] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the steps of the method in the first aspect. The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements an artificial intelligence-based electronic medical record generation method as described above. Compared with the prior art, the present invention has the following beneficial effects: 1. Improved accuracy and factual consistency of generated medical records: by introducing entity constraint scores. This invention mandates that the generative model faithfully reproduces the key medical entities extracted from the original dialogue during the generation process, effectively suppressing the "illusion" phenomenon of large language models and ensuring a high degree of consistency between the medical record content (such as chief complaint and present illness history) and the facts of doctor-patient communication, thus avoiding information omissions and fabrications. 2. It enhances the medical professionalism and logical consistency of the generated medical records: by introducing knowledge association scores... This invention integrates external, structured medical knowledge graph information into the generation process. This allows the model to follow existing medical logic and knowledge relationships (such as the correspondence between symptoms and diseases, and drugs and indications) when generating chapters requiring reasoning, such as diagnoses and treatment suggestions, thereby significantly improving the professionalism and reliability of the generated content. 3. It achieves end-to-end automated generation from dialogue to medical records: This invention integrates multiple stages such as speech recognition, entity recognition, knowledge graph retrieval, and controlled text generation, constructing a complete automated process that directly generates structured electronic medical records from raw doctor-patient dialogue, greatly reducing the paperwork burden on clinicians and improving work efficiency. 4. It provides a flexible and controllable generation mechanism: By dynamically adjusting the weight coefficients... and This invention can flexibly balance the fidelity to facts and the reliance on medical knowledge according to the different attributes of the generated medical record chapters (factual description type or analytical decision type), and achieves fine control over the generation process, so that the final generated medical record is both factual and has depth and professionalism. Attached Figure Description To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Figure 1 This is a flowchart illustrating an artificial intelligence-based electronic medical record generation method provided in an embodiment of the present invention. Figure 2 This is a flowchart illustrating the probability calculation step in an artificial intelligence-based electronic medical record generation method provided in an embodiment of the present invention. Detailed Implementation The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention. Please refer to... Figure 1 , Figure 1This invention illustrates an artificial intelligence-based electronic medical record generation method according to an embodiment of the present invention. This method can be applied to medical information systems, doctor workstation software, or mobile medical applications. The method of this embodiment mainly includes the following steps: Step S101: Acquire voice data of doctor-patient dialogue and perform speech recognition on the voice data to obtain unstructured dialogue text. Specifically, during the diagnosis and treatment process, the voice dialogue between the doctor and patient can be collected in real time through a microphone array deployed in the examination room or a mobile device worn by the doctor. The collected voice data is transmitted to an Automatic Speech Recognition (ASR) engine. This ASR engine can be a deep learning-based model, such as an end-to-end model based on the Transformer or Conformer architecture, which has been pre-trained and fine-tuned on a large amount of general and medical domain voice data to ensure high recognition accuracy for medical terminology and colloquial expressions. After processing the voice data, the ASR engine outputs unstructured dialogue text corresponding to the dialogue content. Step S102: Extract information from the unstructured dialogue text, including medical entity recognition and knowledge graph retrieval. This step is further broken down into two sub-steps: First, extract information from the unstructured dialogue text... Perform medical entity recognition to obtain a set of target entities. In this embodiment, this step employs an advanced sequence labeling model. Specifically, the text is... The input is fed into a Transformer encoder model (e.g., PubMedBERT) pre-trained on a massive medical corpus (such as PubMed summaries, publicly available electronic medical record datasets, etc.). This encoder generates a context-rich feature vector for each token in the text. These feature vector sequences are then fed into a Conditional Random Field (CRF) layer. The CRF layer learns the transition probabilities between tags, effectively solving the tag dependency problem, thus performing sequence labeling for each token (e.g., using the BIO labeling system). By decoding the output of the CRF layer, predefined medical entity categories in the text can be identified and extracted, such as symptoms (e.g., "headache," "cough"), diseases (e.g., "hypertension," "diabetes"), medications (e.g., "aspirin"), examinations (e.g., "CT scan"), and surgeries (e.g., "appendectomy"). All identified entities constitute the target entity set. Secondly, based on the target entity set Retrieve relevant information from the pre-defined medical knowledge graph to obtain a contextual knowledge subgraph. A medical knowledge graph is a large-scale semantic network where nodes represent medical concepts (entities) and edges represent relationships between these concepts (e.g., "symptom-manifestation-disease", "drug-treatment-disease"). In this embodiment, the target entity set... Each entity in the graph serves as the starting node. A predetermined number of hops are performed on the graph, centered on each starting node. (For example, Graph traversal algorithms, such as breadth-first search (BFS) or weighted random walks, are used. During the traversal, all graphs in the graph are collected. The entity nodes within the jump connection range and the edges connecting them together form a contextual knowledge subgraph that is highly relevant to the current dialogue content. This subgraph provides structured external medical knowledge support for subsequent medical record generation. Step S103: Based on a pre-set large language model, the unstructured dialogue text C, the target entity set E, and the contextual knowledge subgraph G are fused to construct structured electronic medical record text. This step is the core of the invention. It uses a pre-trained large language model (LLM), such as the GPT series models, as the basic generator. To achieve controllable and accurate generation, the invention designs a novel fusion probability model, such as... Figure 2 As shown. For each target term in the generation of structured electronic medical records. Instead of directly using the raw output probabilities of LLM, the final generation probability is calculated through a fusion model. The calculation formula for this model is as follows: The following is a detailed explanation of each component in the formula: In time step The target word to be generated It is a sequence of tokens that has already been generated. It is the unstructured dialogue text that serves as the primary context input. It is the basic large language model in a given context and the generated prefix Under the condition of generating word elements The original probability. Usually, the logits value before the Softmax layer is taken, i.e. This is to facilitate linear combination with other fractions. This is the entity constraint score, used to ensure that the generated content faithfully reflects the facts of the dialogue. It is calculated by examining the current candidate lexical units. Can it be concatenated with the tail of an already generated sequence to form a target entity set? If a prefix is ​​found for a given entity, a pre-defined positive reward (e.g., +5.0) is awarded to encourage the model to continue generating that entity. If the generated sequence already contains... All entities in, or the current word element If the generated text deviates from the possible sequence of any entity, a pre-defined negative penalty (e.g., -5.0) is applied to prevent the model from "phantomizing" entities not mentioned in the dialogue. In other general cases, the score is zero, and no intervention is performed. This is a knowledge association score, used to guide the generated content to conform to medical logic. Its calculation method is as follows: First, candidate words are... The embedding vector and the state vector of the LLM decoder at the current time step (representing the generated sequence) The information is aggregated to form a query vector. Then, a Graph Attention Network (GAT) mechanism is used to compute the query vector and the context knowledge subgraph. Attention weights are assigned to the embedding vectors of all entity nodes and relation edges in the knowledge subgraph. These weights reflect the strength of the association between the current generated state and each medical concept in the knowledge subgraph. Finally, the knowledge association score is obtained by weighted summation or taking the maximum value of all attention weights. The higher the score, the stronger the candidate noun. The closer the connection to the medical knowledge related to the dialogue. and These are preset weighting coefficients used to balance the importance of factual constraints and knowledge guidance. In a preferred embodiment, these two coefficients are dynamically adjusted. For example, when generating strongly factual sections such as "Chief Complaint" and "Present Illness," the weighting coefficient is increased. The value (e.g.) This ensures that the content strictly adheres to the original dialogue. However, when generating sections requiring medical reasoning, such as "Preliminary Diagnosis" and "Treatment Plan," the processing time is increased. The value (e.g.) This allows for greater reliance on knowledge graphs for logical inference. Furthermore, to ensure the structural integrity and standardization of the generated medical records, a pre-processing step is included before step S103: inputting unstructured dialogue text into the large language model. Previously, a structured instruction prompt was pre-assembled. This prompt clearly defined the chapter templates that the electronic medical record should include, for example: "Please generate a structured electronic medical record containing the following chapters based on the following doctor-patient dialogue: [Chief Complaint], [Present Illness], [Past Medical History], [Physical Examination], [Ancillary Examinations], [Preliminary Diagnosis], [Treatment Plan]. The dialogue content is as follows:..." This helps guide the LLM to organize and generate content according to the standard medical document format. Accordingly, this invention also provides an artificial intelligence-based electronic medical record generation system, which includes: a data acquisition module, an information extraction module, and a medical record generation module. The data acquisition module is responsible for executing step S101. The information extraction module is responsible for executing step S102, and its internal structure can be further divided into an entity recognition unit and a knowledge retrieval unit. The medical record generation module is responsible for executing step S103, the core of which is to implement the aforementioned fusion probability model. The functions of these modules correspond one-to-one with the aforementioned method steps, and their specific implementation can be completed by the processor executing computer program instructions stored on the storage medium. It will be understood by those skilled in the art that the above embodiments are illustrative and not restrictive. Various modifications, substitutions, or variations can be made to the above embodiments without departing from the spirit and scope of the invention, all of which will fall within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.

[0004] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

[0005] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0006] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0007] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.

[0008] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0009] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0010] In addition, the memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0011] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0012] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0013] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0014] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0015] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0016] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0017] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by electronic devices. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0018] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0019] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0020] It should be noted that although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0021] It should be understood that when the terms "first," "second," "third," and "fourth," etc., are used in the claims, specification, and drawings of this application, they are used only to distinguish different objects and not to describe a specific order. The terms "comprising" and "including" as used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.

[0022] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.

[0023] Although the embodiments of this application are described above, the content is merely an example adopted for the purpose of facilitating understanding of this application and is not intended to limit the scope and application scenarios of this application. Any person skilled in the art described in this application may make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be determined by the scope defined in the appended claims.

Claims

1. A method for generating electronic medical records based on artificial intelligence, characterized in that, include: Acquire the voice data of the doctor-patient dialogue, and perform speech recognition on the voice data to obtain unstructured dialogue text; The unstructured dialogue text is subjected to medical entity recognition to obtain a target entity set; and related information is retrieved in a preset medical knowledge graph based on the target entity set to obtain a context knowledge subgraph; based on a preset large language model, the unstructured dialogue text, the target entity set and the context knowledge subgraph are fused to construct a structured electronic medical record text in a sequence generation manner.

2. The method for generating electronic medical records based on artificial intelligence according to claim 1, characterized in that, When generating each target word, the pre-defined large language model calculates the final generation probability of each candidate word using the following fusion probability model. : ,in, For the current generation time step Target word units, For the generated word sequence, The unstructured dialogue text; The original probability of the target word element output by the large language model; The target word and the target entity set Entity constraint score; The target lexical and the context knowledge subgraph Knowledge-related scores; and The preset weighting coefficients, It is a normalized exponential function.

3. The method for generating electronic medical records based on artificial intelligence according to claim 1, characterized in that, The steps for medical entity recognition of the unstructured dialogue text include: inputting the unstructured dialogue text into a Transformer encoder model pre-trained on a massive medical corpus to obtain the context feature vector of each word in the unstructured dialogue text; inputting the context feature vector into a Conditional Random Field (CRF) layer to perform sequence labeling on each word to identify and extract medical entities including symptoms, diseases, drugs, examinations, and surgeries, thus forming the target entity set.

4. The method for generating electronic medical records based on artificial intelligence according to claim 1, characterized in that, The step of retrieving related information in a preset medical knowledge graph based on the target entity set includes: taking each entity in the target entity set as a starting node; and performing a predetermined number of hops in the medical knowledge graph, centered on the starting node. Breadth-first search or random walk algorithms are used to extract nodes that are related to the starting node. The context knowledge subgraph is formed by connecting all entity nodes and relation edges within the jump range.

5. The method for generating electronic medical records based on artificial intelligence according to claim 2, characterized in that, The entity constraint score The calculation method is as follows: if the target word Able to interact with the target entity set If the prefixes of any entity that has not yet been fully generated form a continuous text sequence, a preset positive reward is assigned; if the target word... This causes the generated sequence to deviate from the target entity set. Any entity in the constraint is assigned a preset negative penalty; except as described above, the entity constraint score is zero.

6. The method for generating electronic medical records based on artificial intelligence according to claim 2, characterized in that, The knowledge-related score The calculation method is as follows: the target word unit Embedded vectors and generated word sequences The state vectors are aggregated to obtain the query vector of the current generated state; a graph attention network mechanism is used to calculate the query vector and the context knowledge subgraph. The attention weights of all entity and relation embedding vectors are calculated; the weighted sum of the attention weights is the knowledge association score.

7. The method for generating electronic medical records based on artificial intelligence according to claim 2, characterized in that, The weighting coefficient and The weights are dynamically adjusted; when generating factual description sections such as the chief complaint and present illness history in structured electronic medical records, the weight coefficients related to entity constraint scores are increased. The value of the knowledge association score is increased when generating analytical decision-making sections such as preliminary diagnosis and treatment plans. The value of .

8. The method for generating electronic medical records based on artificial intelligence according to claim 1, characterized in that, The step of constructing structured electronic medical record text further includes: before inputting the unstructured dialogue text into the large language model, pre-constructing structured instruction prompts; the structured instruction prompts specify the chapter templates that the electronic medical record should include, and the chapter templates include at least the chief complaint, present illness, past medical history, physical examination, auxiliary examinations, preliminary diagnosis, and treatment plan.

9. An electronic device comprising a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the method of any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of claims 1-8.