A doctor inquiry assisting method and system based on a large language model

The intelligent consultation system based on a large language model automatically identifies keywords in the consultation process, generates diagnostic results and prescriptions, solves the problem of low efficiency for doctors in the consultation process, realizes efficient and accurate diagnosis and treatment suggestions, and improves the quality of medical services.

CN119361125BActive Publication Date: 2025-11-18SHANDONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411478158.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-11-18
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

Doctors spend a lot of time browsing patient records and consulting medical guidelines during consultations, which leads to low work efficiency. Furthermore, different doctors have inconsistent understanding of the latest medical guidelines, which increases the burden on doctors and assistant doctors.

Method used

The system employs an intelligent guided consultation system based on a large language model. By collecting voice communication information between doctors and patients, identifying keywords, obtaining diagnostic results, and generating prescriptions and medical records, it provides doctors with timely and accurate diagnostic and treatment suggestions by combining medical standards and pharmacy data.

Benefits of technology

It significantly improves the efficiency and accuracy of doctors' consultations, reduces repetitive work, provides personalized medical services, and continuously improves system performance through optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119361125B_ABST
    Figure CN119361125B_ABST
Patent Text Reader

Abstract

The application provides a doctor inquiry assisting method and system based on a large language model, and belongs to the technical field of intelligent medical treatment. The scheme comprises the following steps: collecting the communication information between a doctor and a patient in an inquiry process, inputting the communication information into a trained large voice model, and obtaining keywords related to the patient's condition in the communication information; using the keywords to obtain a diagnosis result of the disease suffered by the patient for the doctor to refer; generating a prescription suggestion for the doctor according to the diagnosis result; and preliminarily filling in a medical record through the communication information between the doctor and the patient in the inquiry process and the prescription data, and finally confirming the medical record by the doctor. Through intelligent guided inquiry, historical case matching, diagnosis analysis and doctor assistance, the doctor is provided with comprehensive inquiry assistance and diagnosis support. The efficiency and accuracy of the doctor inquiry can be significantly improved, and more comprehensive and personalized medical services can be provided for the patient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart healthcare technology, and in particular relates to a doctor consultation assistance method and system based on a large language model. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Inquiry into the patient's condition and writing medical records constitute a significant portion of the doctor's consultation process. During this process, doctors often spend considerable time reviewing the patient's medical records, consulting standard treatment procedures and medical guidelines for the relevant disease, and researching the indications and contraindications of medications to formulate a treatment plan tailored to the patient's condition and treatment standards. This tedious research and reading significantly impacts doctors' efficiency and increases their workload. This is especially true in top-tier hospitals, where senior physicians have heavy outpatient workloads and extremely limited time for individual patient consultations. Often, younger doctors and interns are needed to assist in these consultations, transforming the patient's complex and time-spanning medical history into a more valuable and standardized description from the doctor's perspective, and completing the outpatient medical record writing. This repetitive and tedious assistance work also increases the burden on the assisting physicians. Furthermore, clinical treatment procedures and medical guidelines are constantly being updated, and different doctors have varying levels of understanding of the latest guidelines. Therefore, by using cutting-edge computer technology to automatically collect diagnostic and treatment information, establish standard diagnostic and treatment procedures and medical guidelines for related diseases, and automatically match and query drug indications and contraindications, doctors' diagnostic efficiency will be greatly improved, the accuracy and safety of doctors' medical decisions will be greatly enhanced, and the human resources of assistant doctors will be saved.

[0004] In recent years, artificial intelligence (AI) technology, particularly large language model (LLM) technology, has flourished, enabling computers to intelligently analyze dialogues and provide context-sensitive auxiliary information. In the healthcare field, LLMs can automate the generation of all clinical texts needed throughout the entire diagnostic and treatment process, supporting clinical decision-making based on evidence-based medicine regarding patients / problems, interventions, comparative measures, and outcomes. By using LLMs to assist in diagnostic and treatment activities, doctors can receive timely and accurate information support in diagnosis, treatment planning, patient communication, and case recording, ultimately improving the efficiency and quality of healthcare services. Summary of the Invention

[0005] To overcome the shortcomings of the existing technologies, this invention provides a doctor's consultation assistance method and system based on a large language model. Through intelligent guided consultation, historical case matching, diagnostic analysis, and doctor assistance functions, it provides doctors with comprehensive consultation assistance and diagnostic support. This significantly improves the efficiency and accuracy of doctors' consultations, providing patients with more comprehensive and personalized medical services.

[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0007] The first aspect of this invention provides a doctor's consultation assistance method based on a large language model;

[0008] A doctor's consultation assistance method based on a large language model includes:

[0009] Collect voice communication information between doctors and patients during the consultation process, input the voice communication information into a trained large language model, and obtain keywords related to the patient's condition from the communication information;

[0010] The diagnostic results of the patient's disease are obtained based on the keywords and provided to the doctor for reference;

[0011] Based on the diagnosis results, a prescription suggestion is generated for the doctor, which includes the recommended laboratory test order, drug selection, usage, and duration.

[0012] The medical records are filled out based on the information exchanged between the doctor and the patient during the consultation process and the prescription data.

[0013] As a further technical solution, the process of collecting communication information between doctors and patients during the consultation, inputting the communication information into a trained large language model, and obtaining keywords related to the patient's condition from the communication information is as follows:

[0014] Collect raw audio data of doctors and patients during consultations and perform real-time speech-to-text conversion to convert the raw audio data into text data;

[0015] Calculate the correlation between characters in the text data and other characters to obtain boundary representations;

[0016] Obtain the dependencies between characters within keywords in the text data to obtain an internal information representation;

[0017] The boundary representation and internal information representation are fused to obtain the predicted keyword type;

[0018] Based on the predicted keyword type, calculate the predicted keyword type score; identify keywords in the input text data based on the predicted keyword type score.

[0019] As a further technical solution, the process of obtaining the diagnosis results of the patient's disease for doctors' reference based on the keywords is as follows: by calling medical standard documents and a finely tuned large language model of clinical diagnosis and treatment guidelines, the diagnosis results of the patient's disease are obtained based on the keywords; the diagnosis results include: the name of the relevant disease, the required diagnosis and treatment process, necessary examinations, treatment drugs, and the usual usage and dosage, indications, contraindications, common adverse reactions, and medical insurance reimbursement ratio of the treatment drugs.

[0020] As a further technical solution, the process of generating prescription suggestions for doctors based on the diagnostic results is as follows: the patient's basic information and diagnostic results are automatically filled into the prescription template; through a comprehensive understanding of the consultation records, medication guidelines, medical standard documents, medical record data and hospital pharmacy data by a large language model, prescription suggestions are generated for doctors; after the doctor checks and improves the prescription, the prescription is uploaded to the prescription database.

[0021] As a further technical solution, the process of initially filling in the medical record based on the communication information between the doctor and the patient and the prescription data during the consultation is as follows: filling in the patient's basic information into the medical record template; summarizing the collected consultation records and filling in the key information of the patient's medical record into the medical record template; integrating the patient's latest treatment plan and automatically filling it into the medical record template; and updating the medical record in the medical record database after the doctor checks, modifies and improves the medical record.

[0022] As a further technical solution, low-rank adaptive LoRA is used to fine-tune the large language model. A low-rank matrix is ​​introduced to update the weights of the pre-trained model, so that only a small number of parameters are modified during the fine-tuning process.

[0023] As a further technical solution, during the fine-tuning of the large language model using Low-Rank Adaptive Relationship (LoRA), the effective weight W' of the original weight W in the large language model after LoRA adjustment is expressed as:

[0024]

[0025] Where W is the weight of the original linear layer; A and B are newly added small matrices, which together constitute the low-rank update part; the product AB is a matrix of the same size as W but with rank r, which serves as the increment of W.

[0026] The second aspect of this invention provides a doctor consultation assistance system based on a large language model.

[0027] A doctor consultation assistance system based on a large language model includes:

[0028] The consultation voice information acquisition module is configured to: collect the voice communication information between the doctor and the patient during the consultation process, input the voice communication information into a trained large language model, and obtain keywords related to the patient's condition from the communication information;

[0029] The diagnosis result output module is configured to: obtain the diagnosis result of the patient's disease based on the keywords for the doctor's reference;

[0030] The prescription issuance assistance module is configured to generate prescription suggestions for doctors based on the diagnosis results. The prescription suggestions include recommended laboratory test orders, drug selection, usage, and duration.

[0031] The medical record generation auxiliary module is configured to: initially fill in the medical record based on the communication information between the doctor and the patient during the consultation process and the prescription data, and then have the doctor make the final confirmation of the medical record.

[0032] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a doctor's consultation assistance method based on a large language model as described in the first aspect of the present invention.

[0033] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a doctor's consultation assistance method based on a large language model as described in the first aspect of the present invention.

[0034] The above one or more technical solutions have the following beneficial effects:

[0035] This invention provides doctors with comprehensive consultation assistance and diagnostic support through functions such as intelligent guided consultation, historical case matching, diagnostic analysis, and doctor assistance. It can significantly improve the efficiency and accuracy of doctors' consultations, providing patients with more comprehensive and personalized medical services. At the same time, the system also has the ability to continuously optimize and train, constantly improving its performance and reliability to meet the actual needs of the medical industry.

[0036] Large Language Models (LLMs) can assist in diagnosis and treatment activities, providing doctors with timely and accurate information support in diagnosis, treatment planning, patient communication, and case recording, ultimately improving the efficiency and quality of medical services.

[0037] By fine-tuning large language models using LoRA, most of the pre-trained weights remain unchanged while only a relatively small number of parameters are added to adapt to new tasks, thereby reducing computational complexity and memory requirements. This significantly reduces computational and storage costs while ensuring model performance.

[0038] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0039] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0040] Figure 1 This is a flowchart of the method in the first embodiment.

[0041] Figure 2 This is a system structure diagram of the second embodiment. Detailed Implementation

[0042] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0043] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.

[0044] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0045] This invention provides doctors with comprehensive consultation assistance and diagnostic support through functions such as intelligent guided consultation, historical case matching, diagnostic analysis, and doctor assistance. It can significantly improve the efficiency and accuracy of doctors' consultations, providing patients with more comprehensive and personalized medical services. The following will further illustrate this application with specific embodiments.

[0046] Example 1

[0047] This embodiment discloses a doctor's consultation assistance method based on a large language model;

[0048] like Figure 1 As shown, a doctor's consultation assistance method based on a large language model includes:

[0049] Step S1: Collect the voice communication information between the doctor and the patient during the consultation, input the voice communication information into the trained large language model, and obtain the keywords related to the patient's condition in the communication information;

[0050] In step S1, the communication information between the doctor and the patient during the consultation is collected, and the communication information is identified to obtain keywords related to the patient's condition. The communication information includes the doctor's inquiry about the patient's chief complaint, present medical history, and other medical information, that is, the symptoms that the patient feels most uncomfortable or concerned about and their duration, as well as the patient's past medical history, surgical and trauma history, allergy history, marital and reproductive history, family history, and lifestyle habits, diet, etc.

[0051] In the process of acquiring keywords related to the patient's condition, it is necessary to correctly identify keyword boundaries and categories. Keyword boundaries refer to the start and end positions of the keywords in the text data, while keyword categories refer to the types of keywords to which the keywords belong. When determining the boundaries, the model needs to consider the contextual information of the keywords. After determining the keyword boundaries, the model needs to further extract internal information of the keywords to enhance the identification of keyword categories. Therefore, step S1 also includes:

[0052] Step S1.1: Convert the voice communication information between the doctor and the patient into text data by real-time speech transcription.

[0053] Step S1.2: Calculate the correlation between characters in the text data and other characters to obtain boundary representations; wherein, a self-attention mechanism is used to calculate character weights and the correlation between the current character and other characters. The text data is then processed into a sequence of character vectors. As input, calculate the weight of each character:

[0054] ;

[0055] Where Q and K are the query matrices in the attention mechanism, and V is the key-value matrix. Let h be the number of dimensions.

[0056] Multiple self-attention mechanisms are concatenated to obtain an enhanced representation of the word vectors. Based on the word vector sequence with enhanced boundary information, the Biaffine attention mechanism is used to obtain the boundary representation.

[0057] ;

[0058] in It is a vector representation of the span of the head and tail. This represents a splicing operation. There are two trainable parameters, where b is the bias. Let ij represent the boundary information, and T is the transpose symbol.

[0059] Step S1.3: Obtain the dependencies between characters within keywords in the text data to obtain the internal information representation; extract the dependency information between characters within keywords through Conditional Layer Normalization (CLN). Conditional Layer Normalization is a deep learning technique that dynamically adjusts the normalization parameters based on the data information input for a specific task, enabling the model to adaptively adjust to different data distributions. This solves the gradient vanishing and gradient exploding problems in deep neural network training. By standardizing the input of each layer of the neural network, it accelerates the convergence speed of the model and improves the expressive power of the network. The formula is as follows:

[0060] ;

[0061] ;

[0062] ;

[0063] In the formula, , These are the character vectors at positions i and j within the span. The effect of the character at index i on the character at index j. , For trainable parameters, , For bias, and These are the mean and standard deviation of the weights for all characters, respectively, and are calculated using the following formula:

[0064] ;

[0065] ;

[0066] In the formula, Let h be the number of dimensions. represent The kth dimension.

[0067] After obtaining the dependency information between all characters within the keyword, to fuse all dependency information, the interaction information obtained at each index position is added to the character vector to obtain a new character vector sequence. To highlight the importance of different characters within the keyword, a linear attention mechanism is used to fuse all character vectors within the span, with the following formula:

[0068]

[0069] ;

[0070] ;

[0071] ;

[0072] In the formula, To integrate character vectors that fuse the relationships between characters, Where t is the span length, and t is the index of the character vector. This represents the information within the span.

[0073] Step S1.4: Feature fusion is performed on the boundary representation and internal information representation to obtain the predicted keyword type; wherein a gating mechanism is used to fuse the boundary representation and internal information representation, and the gating mechanism formula is:

[0074] ;

[0075] In the formula, U is the time gate, and b is the bias. It is an sigmoid function;

[0076] The entity type for each span is predicted using a linear classifier and the SoftMax function, as shown in the formula:

[0077] ;

[0078] ;

[0079] In the formula, To represent the span, These are trainable parameters. It is a bias.

[0080] Step S1.5: Calculate the predicted keyword type score based on the predicted keyword type; identify keywords in the input text data based on the predicted keyword type score. A LOSS function is also introduced to score the keywords, where the Loss function is the cross-entropy loss function.

[0081] ;

[0082] In the formula, M is the number of training samples. It is a predicted type value. This is a true value. During training, the keyword with the highest score in the predicted output is selected as the identified keyword.

[0083] Step S2: Input the keywords back into the trained large language model to obtain the diagnosis results of the patient's disease for the doctor's reference; the diagnosis results include: the name of the relevant disease, the required diagnosis and treatment process, necessary examinations, treatment drugs, and the usual usage and dosage, indications, contraindications, common adverse reactions, and medical insurance reimbursement ratio of the treatment drugs.

[0084] In steps S1 and S2, the large language models are trained on a large dataset, enabling them to understand and generate various types of text, such as articles, dialogues, poems, and code. By learning a large amount of language patterns and contextual information, they can perform a variety of natural language processing tasks, such as answering questions, translating, summarizing text, writing stories, providing suggestions, and generating code.

[0085] In this embodiment, the large language model is Qwen2-7B-Instruct, a medium-sized language model developed by Alibaba Cloud. It has been specially fine-tuned for excellent execution of imperative tasks and boasts 2.7 billion parameters. The model's uniqueness lies in its deep fine-tuning process, particularly in imperative tasks, enabling it to accurately capture and respond to specific user needs. Technically, the model relies on the Transformer architecture, a revolutionary technology that ensures efficient handling of long-range dependencies and understanding of nuanced contextual differences, resulting in coherent, insightful, and near-human-like responses. Furthermore, through continuous learning and optimization, Qwen2-7B-Instruct protects user privacy and ensures content security while continuously improving the diversity and innovation of its generated content.

[0086] In this embodiment, the large language model is also fine-tuned. Specifically, the fine-tuning data mainly consists of medical standard documents, clinical diagnosis and treatment guidelines, and hospital pharmacy data.

[0087] For medical standard documents, manual annotation is performed by individuals with professional medical knowledge. Keyword types include: disease_name, treatment_methods, treatment_plan, and applicable_population. After annotation, the tagged information in the document is processed into JSON format, with the file name data1.json. Disease_name is a composite key, including subkeys treatment_methods, treatment_plan, and applicable_population.

[0088] For the processing of clinical drug use guidelines, the treatment drug types include: drug_name, drug_classification, contraindications, adverse_reactions, usage, and dosage.

[0089] After annotation, the tagging information in the document is processed into JSON format, with the file name data2.json. `drug_name` is the composite key, including subkeys `drug_classification`, `contraindications`, `adverse_reactions`, `usage`, and `dosage`. For drug treatment principles in the document, the types are categorized as `disease_name`, `drug_name`, and `precautions`. These are processed into JSON format, with the file name data3.json. `disease_name` is the composite key, including subkeys `drug_name` and `precautions`.

[0090] First, these raw data need to be labeled and processed to meet the data quality and format requirements of the large language model fine-tuning function. The fine-tuning data processing methods and strategies mainly include data cleaning and preprocessing, data augmentation, and data partitioning.

[0091] Fine-tuning methods vary depending on the specific large language model product, such as reading fine-tuning data files locally or remotely calling fine-tuning APIs. When selecting a fine-tuning scheme, considering parameter efficiency, flexibility, ease of use, generalization ability, scalability, and multi-task processing, Low-Rank Adaptation (LoRA) has some unique advantages over other PEFT methods.

[0092] LoRA is a parameter-efficient fine-tuning method. Its core idea is to update the weights of the pre-trained model by introducing a low-rank matrix, thus modifying only a small number of parameters during the fine-tuning process. LoRA allows the model to adapt to new tasks by adding only a relatively small number of parameters while keeping most of the pre-trained weights unchanged, thereby reducing computational complexity and memory requirements.

[0093] The effective weights W' of the original weights W of the large language model after LoRA adjustment can be expressed as:

[0094]

[0095] Where W is the weight of the original linear layer; A and B are newly added small matrices, which together constitute the low-rank update part; the product AB is a matrix of the same size as W but with rank r, which serves as the increment of W.

[0096] The process of fine-tuning a large language model using Low-Rank Adaptive LoRA is as follows:

[0097] For the input fine-tuning data, Qwen2-7B-Instruct generates a sequence of word vectors. The words are then categorized into sets M, B, S, and E based on their character positions. Set M stores words whose characters are in the middle, set B stores words whose characters are in the first position, set S stores words containing the character, and set E stores words whose characters are in the last position.

[0098] The weights of words within each word set are calculated using a linear attention mechanism, and the weighted set of words within each word set is calculated using the following formula:

[0099]

[0100]

[0101]

[0102] in , This is the vocabulary index within the vocabulary set. After dynamically weighting the vocabulary set representation, the four vocabulary sets are concatenated to represent the final representation of each character:

[0103]

[0104] The embedded input data is passed to the model for forward propagation. During LoRA fine-tuning, the model uses the embedded input data and the parameters of the LoRA adapter for computation. The model's forward propagation process is updated as follows:

[0105]

[0106] Since the keys in each JSON file are different, fine-tuning with the same parameters would reduce the accuracy of the large language model in answering questions. Therefore, the three documents are fine-tuned separately. By changing the LoRA configuration, the fine-tuned qwen2-7B-instruct model can achieve the best performance. The training parameters remain unchanged in each round, and the fine-tuning order is data1.json, data2.json, and data3.json.

[0107] The first round of fine-tuning uses a small `r` value and a high `lora_dropout`, which keeps the model simple, prevents premature overfitting, and quickly obtains a basic model. The second round of fine-tuning increases the `r` value and decreases `lora_dropout`, allowing the model to learn more details while still retaining some regularization. The third round of fine-tuning further increases the `r` value and decreases `lora_dropout`. The model has gained enough information from the previous rounds and can focus on fine-tuning to achieve optimal performance.

[0108] When fine-tuning data1.json, the LoRA configuration is r=4, lora_alpha=16, target_modules=["query","key","value"], lora_dropout=0.1.

[0109] When fine-tuning data2.json, the LoRA configuration is r=8,lora_alpha=32,target_modules=["query","key","value"], lora_dropout=0.05.

[0110] When fine-tuning data3.json, the LoRA configuration is r=16, lora_alpha=64, target_modules=["query","key","value"], lora_dropout=0.01.

[0111] Where r is the rank of the LoRA matrix decomposition, lora_alpha is used to scale the LoRA weights, lora_dropout is used for the dropout ratio of the LoRA layer, which helps prevent overfitting, and target_modules specifies which modules or layers will have the LoRA adapter applied.

[0112] After training is complete, evaluate the model's performance and save the fine-tuned model.

[0113] Step S3: Based on the diagnostic results, a prescription suggestion is generated for the doctor. The prescription suggestion includes recommended laboratory tests, drug selection, usage, and duration. In step S3, the patient's basic information is automatically entered into the prescription; the doctor searches for medical information, and the prescription assistance interface provides relevant drug options, displaying drug information (such as name, dosage, usage, brand, etc.). The doctor makes a decision to select tests and drugs, as well as the dosage, usage, and intended duration of the drug; data collected through dialogue is processed and entered into the prescription; the doctor can click the preview button to view the complete prescription, and after confirming that it is correct, the doctor clicks the submit button, and the prescription will be uploaded to the database and synchronized to relevant examination departments, pharmacies, etc.

[0114] Step S4 involves filling out the medical record initially based on the information exchanged between the doctor and the patient during the consultation and the prescription data, and then having the doctor make the final confirmation of the medical record.

[0115] In step S4, the patient's basic information is entered into the medical record template; the collected consultation records are summarized, and the key information of the patient's medical record is entered into the medical record template; the patient's latest treatment plan is integrated and automatically entered into the medical record template; after the doctor checks, modifies and improves the medical record, the medical record is updated in the medical record database.

[0116] Example 2

[0117] This embodiment discloses a doctor consultation assistance system based on a large language model;

[0118] like Figure 2 As shown, a doctor consultation assistance system based on a large language model includes:

[0119] The consultation voice information acquisition module is configured to: collect the voice communication information between the doctor and the patient during the consultation process, input the voice communication information into a trained large language model, and obtain keywords related to the patient's condition from the communication information;

[0120] The diagnosis result output module is configured to: obtain the diagnosis result of the patient's disease based on the keywords for the doctor's reference;

[0121] The prescription issuance assistance module is configured to generate prescription suggestions for doctors based on the diagnosis results. The prescription suggestions include recommended laboratory test orders, drug selection, usage, and duration.

[0122] The medical record generation auxiliary module is configured to: initially fill in the medical record based on the communication information between the doctor and the patient during the consultation process and the prescription data, and then have the doctor make the final confirmation of the medical record.

[0123] Example 3

[0124] The purpose of this embodiment is to provide a computer-readable storage medium.

[0125] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a doctor's consultation assistance method based on a large language model as described in Embodiment 1 of this disclosure.

[0126] Example 4

[0127] The purpose of this embodiment is to provide an electronic device.

[0128] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in a doctor's consultation assistance method based on a large language model as described in Embodiment 1 of this disclosure.

[0129] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0130] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0131] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A doctor's consultation assistance method based on a large language model, characterized in that, include: The process involves collecting voice communication information between doctors and patients during consultations, inputting this information into a trained large language model, and extracting keywords related to the patient's condition from the communication information. Specifically, the process of extracting keywords related to the patient's condition from the communication information is as follows: Collect raw audio data of doctors and patients during consultations and perform real-time speech-to-text conversion to convert the raw audio data into text data; The correlation between characters in the text data and other characters is calculated to obtain the boundary representation; wherein, a self-attention mechanism is used to calculate the character weight and the correlation between the current character and other characters; Obtain the dependency relationships between characters within keywords in the text data to obtain the internal information representation; specifically, extract the dependency information between characters within keywords through conditional layer normalization. The boundary representation and internal information representation are fused to obtain the predicted keyword type; wherein, a gating mechanism is used to fuse the boundary representation and internal information representation. Based on the predicted keyword type, calculate the predicted keyword type score; identify keywords in the input text data based on the predicted keyword type score; The diagnostic results of the patient's disease are obtained based on the keywords for the doctor's reference. Specifically, the process of obtaining the diagnostic results of the patient's disease based on the keywords is as follows: The large language model, fine-tuned by calling medical guidelines and clinical treatment guidelines, is used to obtain the diagnostic results of the patient's disease based on the keywords. Low-rank adaptive LoRA is used to fine-tune the large language model, introducing a low-rank matrix to update the weights of the pre-trained model, thus modifying only a small number of parameters during the fine-tuning process. Specifically, during the fine-tuning of the large language model using low-rank adaptive LoRA, the effective weight W' of the original weight W in the large language model after LoRA adjustment is expressed as: Where W is the weight of the original linear layer; A and B are newly added small matrices, which together constitute the low-rank update part; the product AB is a matrix of the same size as W but with rank r, which serves as the increment of W. The diagnostic results include: the name of the relevant disease, the required diagnosis and treatment process, necessary examinations, treatment drugs, and the usual usage and dosage, indications, contraindications, common adverse reactions, and medical insurance reimbursement ratio of the treatment drugs; Based on the diagnosis results, a prescription suggestion is generated for the doctor, which includes the recommended laboratory test order, drug selection, usage, and duration. The medical record is initially filled out based on the information exchanged between the doctor and the patient during the consultation process and the prescription data, and then the doctor makes the final confirmation of the medical record.

2. The doctor's consultation assistance method based on a large language model as described in claim 1, characterized in that, The process of generating prescription suggestions for doctors based on the diagnosis results is as follows: the patient's basic information and diagnosis results are automatically filled into the prescription template; through a comprehensive understanding of the consultation records, medication guidelines, medical standard documents, medical record data and hospital pharmacy data by a large language model, prescription suggestions are generated for doctors; after the doctor checks and improves the prescription, the prescription is uploaded to the prescription database.

3. The doctor's consultation assistance method based on a large language model as described in claim 1, characterized in that, The process of initially filling in the medical record based on the information exchanged between the doctor and the patient during the consultation and the prescription data is as follows: filling in the patient's basic information into the medical record template; summarizing the collected consultation records and filling in the key information of the patient's medical record into the medical record template; integrating the patient's latest treatment plan and automatically filling it into the medical record template; and updating the medical record in the medical record database after the doctor checks, modifies and improves the medical record.

4. A doctor consultation assistance system based on a large language model, characterized in that, include: The consultation voice information acquisition module is configured to: acquire voice communication information between the doctor and the patient during the consultation process, input the voice communication information into a trained large language model, and extract keywords related to the patient's condition from the communication information; specifically, the process of extracting keywords related to the patient's condition from the communication information is as follows: Collect raw audio data of doctors and patients during consultations and perform real-time speech-to-text conversion to convert the raw audio data into text data; The correlation between characters in the text data and other characters is calculated to obtain the boundary representation; wherein, a self-attention mechanism is used to calculate the character weight and the correlation between the current character and other characters; Obtain the dependency relationships between characters within keywords in the text data to obtain the internal information representation; specifically, extract the dependency information between characters within keywords through conditional layer normalization. The boundary representation and internal information representation are fused to obtain the predicted keyword type; wherein, a gating mechanism is used to fuse the boundary representation and internal information representation. Based on the predicted keyword type, calculate the predicted keyword type score; identify keywords in the input text data based on the predicted keyword type score; The diagnostic result output module is configured to: obtain the diagnostic results of the patient's disease based on the keywords for the doctor's reference; specifically, the process of obtaining the diagnostic results of the patient's disease based on the keywords for the doctor's reference is as follows: by calling the medical standard documents and clinical treatment guidelines, and fine-tuning the large language model, the diagnostic results of the patient's disease are obtained based on the keywords; wherein, low-rank adaptive LoRA is used to fine-tune the large language model, and a low-rank matrix is ​​introduced to update the weights of the pre-trained model, so that only a small number of parameters are modified during the fine-tuning process; specifically, during the fine-tuning process of the large language model using low-rank adaptive LoRA, the effective weight W' of the original weight W in the large language model after LoRA adjustment is expressed as: Where W is the weight of the original linear layer; A and B are newly added small matrices, which together constitute the low-rank update part; the product AB is a matrix of the same size as W but with rank r, which serves as the increment of W. The diagnostic results include: the name of the relevant disease, the required diagnosis and treatment process, necessary examinations, treatment drugs, and the usual usage and dosage, indications, contraindications, common adverse reactions, and medical insurance reimbursement ratio of the treatment drugs; The prescription issuance assistance module is configured to generate prescription suggestions for doctors based on the diagnosis results. The prescription suggestions include recommended laboratory test orders, drug selection, usage, and duration. The medical record generation auxiliary module is configured to: initially fill in the medical record based on the communication information between the doctor and the patient during the consultation process and the prescription data, and then have the doctor make the final confirmation of the medical record.

5. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by the processor, the program implements the steps in the doctor consultation assistance method based on a large language model as described in any one of claims 1-3.

6. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the doctor consultation assistance method based on a large language model as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Entity relationship joint extraction method based on span and knowledge enhancement

    CN112214610A

  • Disease inquiry process auxiliary information generation method based on large language model

    CN117690581A