A clinical teaching-based simulated diagnosis method, device and equipment
By performing lossy compression and fine-tuning training on a large language model, the structure of the consultation model was optimized, solving the problems of high computational resource consumption and inaccurate information. This improved the efficiency and effectiveness of simulated consultation training and enhanced the clinical skills of medical students.
Patent Information
- Application Number
- CN202411825119.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing large language models suffer from high computational resource consumption, high training costs, long inference time, and inaccurate virtual patient information in simulated medical consultation training, which affects the development of medical students' clinical thinking and decision-making abilities.
By acquiring a medical consultation training dataset, a knowledge graph is constructed, and lossy compression and fine-tuning training of the pre-trained model are performed. Unimportant weights are removed, the model structure is optimized, and a target response model is formed for simulated medical consultation training for medical students.
It significantly reduces the model's storage requirements and inference computation, improves the interactive experience and training effect of simulated consultation, ensures information accuracy, and enhances medical students' clinical thinking ability.
Smart Images

Figure CN119964843B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical teaching technology, and in particular to a simulated consultation method, device, and equipment based on clinical teaching. Background Technology
[0002] In clinical teaching, history taking training refers to the process of simulating actual medical history taking to cultivate the clinical skills of medical students or resident physicians. History taking training is crucial in clinical education, as it not only improves medical students' clinical skills but also enhances their empathy and understanding of patients, ultimately improving the quality of medical services.
[0003] In the field of clinical education, simulated consultation training utilizes artificial intelligence technology to realistically reproduce the consultation process through deep learning language models, striving to replicate the actual clinical diagnosis and treatment process as closely as possible. Based on consultation cases from experienced clinicians, simulated consultation training is provided to medical students for their "Diagnostics" course. The consultation process is recorded, and the records are evaluated, achieving automation and intelligence in the examination of clinical reasoning ability. This significantly reduces the financial investment in consultation training, enhances students' human-centered clinical reasoning ability, and provides technical support for improving the quantity and quality of general practitioner training.
[0004] In recent years, large language models have been increasingly widely used in clinical teaching. Large language models refer to natural language processing models trained with a large number of parameters using deep learning techniques, particularly transformer architectures. These models can analyze massive amounts of medical literature and case data, helping students quickly acquire the latest medical knowledge and practice consultation and decision-making in virtual environments. Furthermore, with the support of large models, teachers can more effectively assess student performance and provide targeted feedback, thereby improving teaching quality and learning outcomes. In conclusion, the introduction of large models has brought innovative teaching methods to clinical education and promoted the modernization of medical education.
[0005] With the widespread application of large-scale models in various applications, how to efficiently train and optimize these models, especially specialized large-scale models for specific domains or tasks, has become an important research direction. Existing technologies often lack systematicity and specificity in the model training process, leading to resource waste and performance bottlenecks.
[0006] Currently, large-scale models used for simulated medical consultations typically have numerous parameters, requiring significant computational resources and memory for training, resulting in high training costs. Furthermore, the excessive number of parameters leads to slow inference times, negatively impacting the interactive experience during consultation training. Additionally, during simulated consultation training, the virtual patients in these large models may experience hallucinations, causing medical students to receive inconsistent or inaccurate information during the consultation process. This can interfere with students' understanding of clinical scenarios, affecting their decision-making abilities and the development of clinical reasoning, thereby impacting training effectiveness.
[0007] Therefore, how to provide a method to optimize the training of large models in order to improve training results is a technical problem that urgently needs to be solved. Summary of the Invention
[0008] In view of the above problems, the present invention provides a simulated consultation method, apparatus and equipment based on clinical teaching that overcomes or at least partially solves the above problems.
[0009] In a first aspect, the present invention provides a simulated consultation method based on clinical teaching, comprising:
[0010] Obtain a medical history training dataset, which is determined based on medical history data;
[0011] The consultation training dataset is input into the pre-trained model for question-answering training to determine the update energy of each weight in the pre-trained model.
[0012] Determine whether the update energy of each weight is less than a threshold, the threshold being determined based on the momentum value distribution of the pre-trained model;
[0013] If so, delete the weights to obtain the compressed training model;
[0014] The compressed training model is fine-tuned to obtain the target response model;
[0015] Based on the aforementioned target response model, medical students or resident physicians undergo simulated consultation training.
[0016] Preferably, a medical history training dataset is obtained, wherein the medical history training dataset is determined based on medical history data and includes:
[0017] A knowledge graph is constructed based on the consultation data;
[0018] Extract entity and relationship information related to medical consultation from the knowledge graph;
[0019] Based on the entity information and relationship information, a diagnostic training dataset is formed.
[0020] Preferably, the step of inputting the consultation training dataset into the pre-trained model for question-answering training and determining the update energy of each weight of the pre-trained model includes:
[0021] The consultation training dataset is input into the pre-trained model for question-answering training. The update energy of each weight in the pre-trained model is determined according to the following calculation formula:
[0022] v t =βv t-1 +(1-β)g t
[0023] v t v represents the updated energy of any weight at the current moment. t-1 Let g be the update energy of any weight from the previous time step, β be the update energy coefficient, and g be the update energy coefficient. t This represents the gradient at the current moment.
[0024] Preferably, the threshold is determined based on the momentum value distribution of the pre-trained model, including:
[0025] Based on the momentum value distribution of the pre-trained model, determine the mean and standard deviation of the momentum;
[0026] Based on the mean and standard deviation of the momentum, the threshold is determined according to the following formula:
[0027] Threshold = μ - kσ
[0028] Where μ is the mean of the momentum, σ is the standard deviation of the momentum, and k is a preset multiple.
[0029] Preferably, the compressed training model is fine-tuned to obtain the target response model, including:
[0030] Obtain the fine-tuned label dataset;
[0031] The compressed training model is trained based on the fine-tuned label dataset to fine-tune each word output by the compressed training model, thereby obtaining the target response model.
[0032] Preferably, the fine-tuned label dataset is obtained, including:
[0033] The data in the medical consultation training dataset is divided into question data and response data;
[0034] Using question-type data as input data and response-type data as output data, a first labeled dataset is formed;
[0035] Question-type data and response-type data are concatenated to form concatenated data, which is used as input data. Response-type data is used as output data to form a second labeled dataset.
[0036] The third-label dataset is formed by using response data as input data and question data as output data.
[0037] The spliced data is used as input data, and the question-type data is used as output data to form the fourth label dataset;
[0038] A fine-tuned label dataset is formed based on the first label dataset, the second label dataset, the third label dataset, and the fourth label dataset.
[0039] Preferably, the compressed training model is trained based on the fine-tuned label dataset to fine-tune the probability of each word output by the compressed training model, thereby obtaining the target response model, including:
[0040] The compressed training model is trained based on the fine-tuned label dataset to obtain the target response model. During the training process, the probability of each word output by the compressed training model is divided by the control parameter to obtain the fine-tuning probability.
[0041] Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing it using the softmax function.
[0042] Preferably, based on the target response model, simulated consultation training is conducted for medical students or resident physicians, including:
[0043] Input a question into the target response model, the question being a question asked by the medical student or resident physician, and the target response model outputs a first target response;
[0044] The question is concatenated with the response from the first target to form a concatenated statement;
[0045] The concatenated statement is input into the target response model so that the target response model outputs a second target response;
[0046] Determine whether the second target response is consistent with the first target response;
[0047] If not, then you need to ask the question in a different way;
[0048] If so, output the response for the first target.
[0049] Secondly, the present invention also provides a simulated consultation device based on clinical teaching, comprising:
[0050] The acquisition module is used to acquire the consultation training dataset, which is determined based on consultation data;
[0051] The determination module is used to input the consultation training dataset into the pre-trained model for question-answering training and determine the update energy of each weight of the pre-trained model.
[0052] The judgment module is used to determine whether the update energy of each weight is less than a threshold, the threshold being determined based on the momentum value distribution of the pre-trained model;
[0053] The deletion module is used to delete the weights if the condition is met, thereby obtaining a compressed training model.
[0054] The module is used to fine-tune the compressed training model to obtain the target response model;
[0055] The training module is used to train medical students or resident physicians in simulated consultations based on the target response model.
[0056] Thirdly, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0057] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0058] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
[0059] This invention provides a simulated consultation method based on clinical teaching, comprising: acquiring a consultation training dataset, which is determined based on consultation data; inputting the consultation training dataset into a pre-trained model for question-answering training, and determining the update energy of each weight in the pre-trained model; determining whether the update energy of each weight is less than a threshold, which is determined based on the momentum value distribution of the pre-trained model; if so, deleting the weight to obtain a compressed training model; fine-tuning the compressed training model to obtain a target response model; fine-tuning the compressed training model to obtain the target response model; and conducting simulated consultation training for medical students or resident physicians based on the target response model. By using lossy compression of the model to delete unimportant weights or neurons, the storage requirements and inference computation of the model are significantly reduced, and the inference speed is accelerated, thereby improving the model's performance in simulated consultation training and thus enhancing the training effect. Attached Figure Description
[0060] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0061] Figure 1 A flowchart illustrating the steps of a simulated consultation method based on clinical teaching in an embodiment of the present invention is shown.
[0062] Figure 2 A schematic diagram of a virtual patient, Mr. Li, experiencing chest pain, is shown in an embodiment of the present invention.
[0063] Figure 3 A schematic diagram of a virtual patient, Wang, vomiting blood, is shown in an embodiment of the present invention;
[0064] Figure 4 A schematic diagram of a virtual patient, Mr. Zhang, experiencing abdominal pain and black stools, is shown in an embodiment of the present invention.
[0065] Figure 5 A schematic diagram of a virtual patient, Mr. Zhang, experiencing abdominal pain and black stools, is shown in an embodiment of the present invention.
[0066] Figure 6 A schematic diagram of a virtual patient experiencing chest pain and fever in an embodiment of the present invention is shown;
[0067] Figure 7 A schematic diagram of a simulated consultation process for a case of hematemesis in an embodiment of the present invention is shown;
[0068] Figure 8 A schematic diagram of a simulated consultation process for a chest pain case in an embodiment of the present invention is shown;
[0069] Figure 9 A schematic diagram of a simulated consultation device based on clinical teaching in an embodiment of the present invention is shown;
[0070] Figure 10 A schematic diagram of a computer device for implementing a simulated consultation method based on clinical teaching is shown in an embodiment of the present invention. Detailed Implementation
[0071] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0072] Example 1
[0073] Embodiments of the present invention provide a simulated consultation method based on clinical teaching, such as... Figure 1 As shown, it includes:
[0074] S101, Obtain the medical history training dataset, which is determined based on the medical history data;
[0075] S102, Input the consultation training dataset into the pre-trained model for question-answering training, and determine the update energy of each weight of the pre-trained model;
[0076] S103, determine whether the update energy of each weight is less than the threshold, the threshold is determined based on the momentum value distribution of the pre-trained model;
[0077] S104, if so, delete the weight to obtain the compressed training model;
[0078] S105, Fine-tune the compressed training model to obtain the target response model;
[0079] S106, based on the target response model, is used to train medical professionals or resident physicians in simulated consultations.
[0080] The overall approach of this solution is as follows: by performing lossy compression on the pre-trained model, preparing clinical consultation data, retraining the compressed model, designing downstream tasks, and fine-tuning the trained model, a target response model is obtained. This target response model is then used to train medical students or resident physicians in simulated consultations. This approach solves the problems of high cost, poor interactive experience, and inaccurate response information when using large models in simulated consultation training in clinical education, thereby improving the effectiveness of simulated consultation training.
[0081] S101, Obtain the medical history training dataset, which is determined based on the medical history data.
[0082] Specifically, a knowledge graph is constructed based on the consultation data;
[0083] Extract entity and relationship information related to medical consultation from the knowledge graph;
[0084] A diagnostic training dataset is formed based on entity and relationship information.
[0085] In a specific implementation, the collected consultation data is used to construct a knowledge graph using a knowledge graph construction tool. This consultation data mainly consists of dialogue content between doctors and patients, including: the doctor's questions, the patient's responses, and the corresponding relationships between them. Entity and relationship information related to the consultation is extracted from the knowledge graph. Next, the extracted entity and relationship information is integrated to form a consultation training dataset. This training dataset includes elements such as instructions, context, and input text to provide pre-trained models for correct reasoning and generation.
[0086] Next, the pre-trained model is trained. The pre-trained model can be an LLaMA model or a BERT model. Step S102 involves inputting the question-and-answer training dataset into the pre-trained model for question-answering training, determining the update energy of each weight in the pre-trained model.
[0087] Specifically, the consultation training dataset is input into the pre-trained model for question-answering training, and the update energy of each weight in the pre-trained model is determined according to the following calculation formula:
[0088] v t =βv t-1 +(1-β)g t
[0089] v t v represents the updated energy of any weight at the current moment. t-1 Let g be the update energy of any weight from the previous time step, β be the update energy coefficient, and g be the update energy coefficient. t This represents the gradient at the current moment.
[0090] Specifically, the formula for calculating each weight is as follows:
[0091] w t =w t-1 -αv t
[0092] w t For any weight at the current time, w t-1 Let α be the weight of the previous time step at the current time step, and α be the learning rate.
[0093] By inputting new diagnostic training data, the update energy of each weight is recorded.
[0094] Then, S103 is executed to determine whether the update energy of each weight is less than a threshold, which is determined based on the momentum value distribution of the pre-trained model.
[0095] The process for determining the threshold is as follows:
[0096] Based on the momentum value distribution of the pre-trained model, determine the mean and standard deviation of the momentum;
[0097] Based on the mean and standard deviation of momentum, the threshold is determined according to the following formula;
[0098] Threshold = μ - kσ
[0099] Where μ is the mean of momentum, σ is the standard deviation of momentum, and k is a preset multiple.
[0100] Momentum in machine learning is an optimization algorithm primarily used to accelerate the gradient descent process, helping the model converge faster. By incorporating information from historical gradients, the momentum algorithm ensures that parameter updates depend not only on the current gradient direction but also on historical gradients, directions, and magnitudes.
[0101] By determining whether the update energy of each weight in the pre-trained model during the iteration process is less than the threshold, S104 is then executed. If so, the weight is deleted, and the compressed training model is obtained.
[0102] Specifically, weights in a pre-trained model are numerical values used during model training to represent the degree to which each feature or parameter influences the final prediction result. They are used to measure the importance of data or features. Weights with update energy below a certain threshold are removed, resulting in a compressed training model.
[0103] Next, execute S105 to fine-tune the compressed training model and obtain the target response model.
[0104] Specifically, obtain the fine-tuned label dataset;
[0105] The compressed training model is trained based on the fine-tuned label dataset, and each word output by the compressed training model is fine-tuned to obtain the target response model.
[0106] First, obtain the fine-tuned label dataset, including:
[0107] The data in the medical consultation training dataset is divided into question data and response data;
[0108] Using question-type data as input data and response-type data as output data, a first labeled dataset is formed;
[0109] Question-type data and response-type data are concatenated to form concatenated data, which is used as input data. Response-type data is used as output data to form a second labeled dataset.
[0110] The third-label dataset is formed by using response data as input data and question data as output data.
[0111] The concatenated data is used as input data, and the question-type data is used as output data to form the fourth-label dataset;
[0112] A fine-tuned label dataset is formed based on the first label dataset, the second label dataset, the third label dataset, and the fourth label dataset.
[0113] Specifically, the data is spliced in the following manner when it is generated:
[0114] sentence_pair=sentence_1+[SEP]+sentence_2
[0115] Here, sentence_1 represents question data, sentence_2 represents response data, [SEP] is used to separate the two data sets, and sentence_pair is used to concatenate the data.
[0116] By using multiple labeled datasets, the data samples are enriched, the generalization ability of the model is improved, the risk of overfitting is reduced, and the performance of the model is enhanced.
[0117] Next, the compressed training model is trained based on the fine-tuned label dataset to fine-tune each word output by the compressed training model, thus obtaining the target response model.
[0118] Specifically, the compressed training model is trained based on the fine-tuned label dataset to obtain the target response model. During the training process, the probability of each word output by the compressed training model is divided by the control parameter to obtain the fine-tuning probability.
[0119] Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing it using the softmax function.
[0120] In a specific implementation, the prediction accuracy is further improved by adjusting the probability of each word output by the compressed training model. Specifically, the process of determining the fine-tuned probabilities is as follows:
[0121]
[0122] Where p′(i) is the fine-tuning probability, T is the control parameter, and p(i) is the probability of each word in the output of the compressed training model. When T < 1, the randomness of the output can be reduced, making the generated responses more deterministic and common. When T = 1, the output maintains its original distribution; when T > 1, the randomness of the output can be increased, making the generated responses more diverse and creative. By adjusting the control parameter, the output content of the compressed training model can be adjusted.
[0123] Next, normalization is performed, specifically:
[0124]
[0125] By normalizing the model, we can more clearly see the probability distribution of each word in the model's output after fine-tuning.
[0126] After fine-tuning the compressed training model, the target response model is obtained. The performance analysis of this target response model is as follows. Taking the LLaMa model as an example, the performance of the target response model before and after is calculated:
[0127]
[0128] Next, S106 is executed, which involves conducting simulated consultation training for medical students or resident physicians based on the target response model.
[0129] Specifically, the target response model is input with a question, which is a question asked by a medical student or a resident physician, and the target response model outputs the first target response.
[0130] Combine the question with the answer to the first target to form a concatenated statement;
[0131] Input the concatenated statement into the target response model so that the target response model outputs the second target response;
[0132] Determine whether the response to the second objective is consistent with the response to the first objective;
[0133] If not, then you are advised to try a different approach to the question.
[0134] If so, output the first target response.
[0135] By prompting the model to change the question to a different format, it becomes easier for the model to understand.
[0136] This step involves the application of the model. After obtaining the target response model, this model can simulate the patient's response and can be used to train medical students or resident physicians who need to learn and practice.
[0137] Below, we will evaluate the performance of the target response model using a variety of metrics.
[0138] 1. Precision
[0139]
[0140] In this context, TP represents a true positive (correctly generated) and FP represents a false positive (incorrectly generated).
[0141] 2. Recall
[0142]
[0143] FN represents false negatives (those that were not generated).
[0144] 3. F1 score
[0145]
[0146] 4. Cosine similarity
[0147]
[0148] Where A and B are both word frequency vectors, A·B is the dot product of the two word frequency vectors, and ||A|| and ||B|| are the norms of the two word frequency vectors respectively.
[0149] The following five cases illustrate this point. Figures 2-6 As shown, the performance metrics of the target response model for each case are calculated.
[0150] Case 1: Virtual patient Li Moumou's chest pain case; Case 2: Virtual patient Wang Moumou's hematemesis case; Case 3: Virtual patient Zhang Moumou's abdominal pain and melena case; Case 4: Virtual patient Yin Moumou's chest pain case; Case 5: Virtual patient's chest pain and fever case.
[0151] The corresponding performance indicators can be obtained through analysis:
[0152]
[0153] In S106, based on the target response model, simulated patient consultation training is conducted for medical students or resident physicians. This allows them to observe the actual effects through real-world patient consultation training. For example... Figure 7 The image shows a simulated consultation process for a case of hematemesis, as shown below. Figure 8 The image shows a simulated consultation process for a case of chest pain.
[0154] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
[0155] This invention provides a simulated consultation method based on clinical teaching, comprising: acquiring a consultation training dataset, which is determined based on consultation data; inputting the consultation training dataset into a pre-trained model for question-answering training, and determining the update energy of each weight in the pre-trained model; determining whether the update energy of each weight is less than a threshold, which is determined based on the momentum value distribution of the pre-trained model; if so, deleting the weight to obtain a compressed training model; fine-tuning the compressed training model to obtain a target response model; fine-tuning the compressed training model to obtain the target response model; and conducting simulated consultation training for medical students or resident physicians based on the target response model. By using lossy compression of the model to delete unimportant weights or neurons, the storage requirements and inference computation of the model are significantly reduced, and the inference speed is accelerated, thereby improving the model's performance in simulated consultation training and thus enhancing the training effect.
[0156] Example 2
[0157] Based on the same inventive concept, embodiments of the present invention also provide a simulated consultation device for clinical teaching, such as... Figure 9 As shown, it includes:
[0158] The acquisition module 901 is used to acquire the consultation training dataset, which is determined based on the consultation data;
[0159] The determination module 902 is used to input the consultation training dataset into the pre-trained model for question-answering training and determine the update energy of each weight of the pre-trained model.
[0160] The judgment module 903 is used to determine whether the update energy of each weight is less than a threshold, the threshold being determined based on the momentum value distribution of the pre-trained model;
[0161] Deletion module 904 is used to delete the weights if the condition is met, to obtain the compressed training model.
[0162] Module 905 is used to fine-tune the compressed training model to obtain the target response model;
[0163] Training module 906 is used to train medical students or resident physicians to conduct simulated consultations based on the target response model.
[0164] In one optional implementation, the acquisition module 901 is used for:
[0165] A knowledge graph is constructed based on the consultation data;
[0166] Extract entity and relationship information related to medical consultation from the knowledge graph;
[0167] Based on the entity information and relationship information, a diagnostic training dataset is formed.
[0168] In one alternative implementation, the determining module 902 is configured to:
[0169] The consultation training dataset is input into the pre-trained model for question-answering training. The update energy of each weight in the pre-trained model is determined according to the following calculation formula:
[0170] v t =βv t-1 +(1-β)g t
[0171] v t v represents the updated energy of any weight at the current moment. t-1 Let g be the update energy of any weight from the previous time step, β be the update energy coefficient, and g be the update energy coefficient. t This represents the gradient at the current moment.
[0172] In one optional implementation, the threshold is determined based on the momentum value distribution of the pre-trained model, including:
[0173] Based on the momentum value distribution of the pre-trained model, determine the mean and standard deviation of the momentum;
[0174] Based on the mean and standard deviation of the momentum, the threshold is determined according to the following formula:
[0175] Threshold = μ - kσ
[0176] Where μ is the mean of the momentum, σ is the standard deviation of the momentum, and k is a preset multiple.
[0177] In one alternative implementation, module 905 is obtained, which is used for:
[0178] Obtain the fine-tuned label dataset;
[0179] The compressed training model is trained based on the fine-tuned label dataset to fine-tune each word output by the compressed training model, thereby obtaining the target response model.
[0180] In one alternative implementation, module 905 is obtained, which is used for:
[0181] The data in the medical consultation training dataset is divided into question data and response data;
[0182] Using question-type data as input data and response-type data as output data, a first labeled dataset is formed;
[0183] Question-type data and response-type data are concatenated to form concatenated data, which is used as input data. Response-type data is used as output data to form a second labeled dataset.
[0184] The third-label dataset is formed by using response data as input data and question data as output data.
[0185] The spliced data is used as input data, and the question-type data is used as output data to form the fourth label dataset;
[0186] A fine-tuned label dataset is formed based on the first label dataset, the second label dataset, the third label dataset, and the fourth label dataset.
[0187] In one alternative implementation, module 905 is obtained, which is used for:
[0188] The compressed training model is trained based on the fine-tuned label dataset to obtain the target response model. During the training process, the probability of each word output by the compressed training model is divided by the control parameter to obtain the fine-tuning probability.
[0189] Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing it using the softmax function.
[0190] In one alternative implementation, the training module 906 is used for
[0191] Input a question into the target response model, the question being a question asked by the medical student or resident physician, and the target response model outputs a first target response;
[0192] The question is concatenated with the response from the first target to form a concatenated statement;
[0193] The concatenated statement is input into the target response model so that the target response model outputs a second target response;
[0194] Determine whether the second target response is consistent with the first target response;
[0195] If not, then you need to ask the question in a different way;
[0196] If so, output the response for the first target.
[0197] Example 3
[0198] Based on the same inventive concept, embodiments of the present invention provide a computer device, such as... Figure 10 As shown, it includes a memory 1004, a processor 1002, and a computer program stored in the memory 1004 and executable on the processor 1002. When the processor 1002 executes the program, it implements the steps of the simulated consultation method based on clinical teaching described above.
[0199] Among them, Figure 10 In this document, a bus architecture (represented by bus 1000) is used. Bus 1000 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 1002 and memory represented by memory 1004. Bus 1000 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 1006 provides an interface between bus 1000 and receiver 1001 and transmitter 1003. Receiver 1001 and transmitter 1003 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 1002 is responsible for managing bus 1000 and general processing, while memory 1004 may be used to store data used by processor 1002 during operation.
[0200] Example 4
[0201] Based on the same inventive concept, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described simulated consultation method based on clinical teaching.
[0202] 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.
[0203] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0204] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are explicitly recited in each embodiment. Rather, as reflected in each embodiment, inventive aspects lie in fewer than all features of the single embodiment disclosed above. Therefore, the claims, following the detailed description, are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0205] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0206] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the specific implementation, any of the claimed embodiments can be used in any combination.
[0207] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the simulated consultation device or computer device based on clinical teaching according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0208] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
Claims
1. A simulated consultation method based on clinical teaching, characterized in that, include: Obtain a medical history training dataset, which is determined based on medical history data; The consultation training dataset is input into the pre-trained model for question-answering training to determine the update energy of each weight in the pre-trained model. Determine whether the update energy of each weight is less than a threshold, the threshold being determined based on the momentum value distribution of the pre-trained model; If so, delete the weights to obtain the compressed training model; The compressed training model is fine-tuned to obtain the target response model; Based on the aforementioned target response model, simulated consultation training is conducted for medical students or resident physicians. The step of inputting the consultation training dataset into the pre-trained model for question-answering training and determining the update energy of each weight of the pre-trained model includes: The consultation training dataset is input into the pre-trained model for question-answering training. The update energy of each weight in the pre-trained model is determined according to the following calculation formula: For the updated energy of any weight at the current moment, For the current moment, it represents the updated energy of any weight from the previous moment. To update the energy coefficient, The gradient at the current time step; The threshold is determined based on the momentum value distribution of the pre-trained model, including: Based on the momentum value distribution of the pre-trained model, determine the mean and standard deviation of the momentum; Based on the mean and standard deviation of the momentum, the threshold is determined according to the following formula: in, The mean of the momentum, The standard deviation of the momentum is... This is a preset multiple.
2. The method as described in claim 1, characterized in that, Obtain the medical history training dataset, which is determined based on the medical history data and includes: A knowledge graph is constructed based on the consultation data; Extract entity and relationship information related to medical consultation from the knowledge graph; Based on the entity information and relationship information, a diagnostic training dataset is formed.
3. The method as described in claim 1, characterized in that, The compressed training model is fine-tuned to obtain the target response model, including: Obtain the fine-tuned label dataset; The compressed training model is trained based on the fine-tuned label dataset to fine-tune each word output by the compressed training model, thereby obtaining the target response model.
4. The method as described in claim 3, characterized in that, Obtain the fine-tuned label dataset, including: The data in the medical consultation training dataset is divided into question data and response data; Using question-type data as input data and response-type data as output data, a first labeled dataset is formed; Question-type data and response-type data are concatenated to form concatenated data, which is used as input data. Response-type data is used as output data to form a second labeled dataset. The third-label dataset is formed by using response data as input data and question data as output data. The spliced data is used as input data, and the question-type data is used as output data to form the fourth label dataset; A fine-tuned label dataset is formed based on the first label dataset, the second label dataset, the third label dataset, and the fourth label dataset.
5. The method as described in claim 3, characterized in that, The compressed training model is trained based on the fine-tuned label dataset to fine-tune the probability of each word output by the compressed training model, resulting in a target response model, including: The compressed training model is trained based on the fine-tuned label dataset to obtain the target response model. During the training process, the probability of each word output by the compressed training model is divided by the control parameter to obtain the fine-tuning probability. Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing it using the softmax function.
6. The method as described in claim 1, characterized in that, Based on the aforementioned target response model, simulated patient consultation training is conducted for medical students or resident physicians, including: Input a question into the target response model, the question being a question asked by the medical student or resident physician, and the target response model outputs a first target response; The question is concatenated with the response from the first target to form a concatenated statement; The concatenated statement is input into the target response model so that the target response model outputs a second target response; Determine whether the second target response is consistent with the first target response; If not, then you need to ask the question in a different way; If so, output the response for the first target.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Depth convolutional neural network compression method based on annealing attenuation
CN117131908A
Data processing method based on pre-training language model and related equipment
CN117555990A