Simulation inquiry method, device and equipment based on clinical teaching
By performing lossy compression and fine-tuning of the pre-trained model, the problems of wasted resources and inaccurate virtual patient information in simulated consultation training are solved, and the training effect and efficiency are significantly improved.
Patent Information
- Application Number
- CN202411825119.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The prior art has waste of resources, performance bottlenecks, and hallucinations in virtual patients in simulated consultation training, resulting in medical students receiving inconsistent or inaccurate information during consultation, affecting the training effect.
By obtaining the consultation training data set, inputting the pre-trained model for question-and-answer training, determining whether the update energy of the weight is less than the threshold, deleting the unimportant weight, obtaining the compressed model, and fine-tuning it to train it to obtain the target reply model.
It significantly reduces the storage demand and inference calculation of the model, speeds up the inference speed, improves the model's performance in simulation consultation training, and improves the training effect.
Smart Images

Figure CN119964843A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical teaching technology, and in particular to a simulated medical consultation method, device and equipment based on clinical teaching. Background Art
[0002] Interview training in clinical teaching refers to the cultivation of clinical skills of medical students or residents by simulating the actual interview process during medical education. Interview training is crucial in clinical education. It not only improves the clinical skills of medical students, 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 uses artificial intelligence technology to realistically reproduce the consultation process through deep learning language models, and restore the real clinical diagnosis and treatment process as much as possible. Based on the consultation cases of experienced clinical doctors, medical students are trained in "Diagnostics" consultation simulation, the consultation process is recorded, and the consultation records are evaluated to achieve automation and intelligence of clinical thinking ability examinations, which greatly reduces the investment in consultation training, improves students' human-centered clinical thinking ability, and provides technical support for improving the quantity and quality of general practitioner training.
[0004] In recent years, the application of large language models in the field of clinical teaching has become more and more extensive. Large language models refer to natural language processing models with a large number of parameters trained using deep learning technology, especially transformer architecture. Large models can analyze massive amounts of medical literature and case data, help students quickly acquire the latest medical knowledge, and conduct consultation and decision-making exercises in a virtual environment. In addition, with the support of large models, teachers can more effectively evaluate students' performance and provide targeted feedback, thereby improving teaching quality and learning outcomes. In short, the introduction of large models has brought innovative teaching methods to clinical teaching and promoted the modernization of medical education.
[0005] With the widespread use of large models in various applications, how to efficiently train and optimize these models, especially professional large models for specific fields or tasks, has become an important research direction. Existing technologies often lack systematicity and pertinence in the model training process, resulting in resource waste and performance bottlenecks.
[0006] At present, large models used for simulated consultations usually have many parameters, which consume a lot of computing resources and memory during training, and the cost of model training is high. At the same time, due to too many parameters, the reasoning time is too slow, which affects the interactive experience of consultation training. In addition, when large models are used for simulated consultation training, the simulated virtual patients will experience hallucinations, causing medical students to receive inconsistent or inaccurate information during the consultation process, which will interfere with students' understanding of clinical scenarios, affect their decision-making ability and the development of clinical thinking, and thus affect the training effect.
[0007] Therefore, how to provide a training method for optimizing large models to improve training results is a technical problem that needs to be solved urgently. Summary of the invention
[0008] In view of the above problems, the present invention provides a simulated consultation method, device and equipment based on clinical teaching that overcome the above problems or at least partially solve the above problems.
[0009] In a first aspect, the present invention provides a simulated consultation method based on clinical teaching, comprising:
[0010] Acquire a medical inquiry training data set, wherein the medical inquiry training data set is determined based on medical inquiry data;
[0011] Inputting the medical question training data set into a pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model;
[0012] Determining whether the update energy of each weight is less than a threshold, wherein the threshold is determined based on the momentum value distribution of the pre-trained model;
[0013] If yes, delete the weights to obtain a compressed training model;
[0014] Fine-tune the compression training model to obtain a target response model;
[0015] Based on the target response model, medical students or residents are given simulated consultation training.
[0016] Preferably, a medical inquiry training data set is obtained, wherein the medical inquiry training data set is determined based on medical inquiry data and includes:
[0017] Build a knowledge graph based on the consultation data;
[0018] Extracting entity information and relationship information related to the medical consultation from the knowledge graph;
[0019] Based on the entity information and relationship information, a medical inquiry training data set is formed.
[0020] Preferably, the step of inputting the medical question training data set into a pre-training model for question-answering training and determining the update energy of each weight of the pre-training model comprises:
[0021] The medical question training data set is input into the pre-training model for question-answering training, and the update energy of each weight of the pre-training model is determined according to the following calculation formula:
[0022] v t =βv t-1 +(1-β)g t
[0023] v t is the update energy of any weight at the current moment, v t-1 is the update energy of any weight at the previous moment, β is the update energy coefficient, g t is 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 of momentum and the standard deviation of momentum;
[0026] Based on the mean value of the momentum and the standard deviation of the momentum, the threshold is determined according to the following calculation formula:
[0027] Threshold = μ-kσ
[0028] Wherein, μ is the mean value of the momentum, σ is the standard deviation of the momentum, and k is a preset multiple.
[0029] Preferably, fine-tuning the compression training model to obtain a target response model includes:
[0030] Get the fine-tuning label dataset;
[0031] The compression training model is trained based on the fine-tuning label dataset to fine-tune each word output by the compression training model to obtain a target answer model.
[0032] Preferably, obtaining a fine-tuning label dataset includes:
[0033] The data in the medical consultation training data set is divided into question data and answer data;
[0034] Taking question data as input data and answer data as output data, forming a first label data set;
[0035] The question data and the answer data are concatenated to form concatenated data as input data, and the answer data is used as output data to form a second labeled data set;
[0036] The answer data is used as input data, and the question data is used as output data to form a third labeled data set;
[0037] Using the spliced data as input data and the question data as output data to form a fourth label data set;
[0038] A fine-tuning 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 compression training model is trained based on the fine-tuning label data set to fine-tune the probability of each word output by the compression training model to obtain a target answer model, including:
[0040] The compression training model is trained based on the fine-tuning label data set to obtain a target answer model, and during the training process, the probability of each word output by the compression training model is divided by a control parameter to obtain a fine-tuning probability;
[0041] Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing the result through a softmax function.
[0042] Preferably, based on the target response model, a simulated consultation training is performed for medical students or residents, including:
[0043] Inputting a question into the target answer model, the question being a question asked by the medical student or resident doctor, and the target answer model outputting a first target answer;
[0044] concatenating the question with the first target answer to form a concatenated sentence;
[0045] Inputting the concatenated sentence into the target answer model so that the target answer model outputs a second target answer;
[0046] determining whether the second target response is consistent with the first target response;
[0047] If not, it will prompt that another way of asking the question is needed;
[0048] If so, output the first target response.
[0049] In a second aspect, the present invention further provides a simulated medical consultation device based on clinical teaching, comprising:
[0050] An acquisition module, used for acquiring a medical inquiry training data set, wherein the medical inquiry training data set is determined based on medical inquiry data;
[0051] A determination module, used for inputting the medical question training data set into a pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model;
[0052] A judgment module, used to judge whether the update energy of each weight is less than a threshold, wherein the threshold is determined based on the momentum value distribution of the pre-trained model;
[0053] A deleting module, used for deleting the weights if yes, to obtain a compressed training model;
[0054] An obtaining module is used to fine-tune the compression training model to obtain a target response model;
[0055] The training module is used to conduct simulated consultation training for medical students or residents based on the target response model.
[0056] In a third aspect, the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0057] In a fourth aspect, the present invention further 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] The present invention provides a simulated medical consultation method based on clinical teaching, comprising: obtaining a medical consultation training data set, wherein the medical consultation training data set is determined based on medical consultation data; inputting the medical consultation training data set into a pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model; judging whether the update energy of each weight is less than a threshold value, wherein the threshold value is determined based on the momentum value distribution of the pre-training model; if so, deleting the weight to obtain a compressed compressed training model; fine-tuning the compressed training model to obtain a target answer model; fine-tuning the compressed training model to obtain a target answer model; based on the target answer model, performing simulated medical consultation training on medical students or residents, deleting unimportant weights or neurons through lossy compression of the model, significantly reducing the storage requirement of the model and reducing the amount of model inference calculation, accelerating the inference speed, thereby improving the performance of the model in the simulated medical consultation training, and thus improving the training effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Also, throughout the accompanying drawings, the same reference figures are used to represent the same components. In the drawings:
[0061] Figure 1 A schematic diagram of the steps of a simulated medical consultation method based on clinical teaching in an embodiment of the present invention is shown;
[0062] Figure 2 A schematic diagram showing a chest pain case of a virtual patient Mr. Li in an embodiment of the present invention is shown;
[0063] Figure 3 A schematic diagram showing a case of hematemesis of a virtual patient named Wang in an embodiment of the present invention is shown;
[0064] Figure 4 A schematic diagram showing a case of abdominal pain and black stools of a virtual patient named Zhang in an embodiment of the present invention is shown;
[0065] Figure 5 A schematic diagram showing a case of abdominal pain and black stools of a virtual patient named Zhang in an embodiment of the present invention is shown;
[0066] Figure 6 A schematic diagram showing a case of chest pain and fever of a virtual patient in an embodiment of the present invention is shown;
[0067] Figure 7 A schematic diagram showing a simulated consultation process for a hematemesis case in an embodiment of the present invention;
[0068] Figure 8 A schematic diagram showing a simulated consultation process for a chest pain case in an embodiment of the present invention;
[0069] Fig. 9 A schematic diagram of a simulated medical consultation device based on clinical teaching in an embodiment of the present invention is shown;
[0070] Fig.10 A schematic diagram of a computer device for implementing a simulated medical consultation method based on clinical teaching in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0071] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0072] Embodiment 1
[0073] The embodiment of the present invention provides a simulated consultation method based on clinical teaching, such as Figure 1 As shown, including:
[0074] S101, obtaining a medical consultation training data set, where the medical consultation training data set is determined based on medical consultation data;
[0075] S102, inputting the medical question training data set into the pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model;
[0076] S103, determining whether the update energy of each weight is less than a threshold, where the threshold is determined based on the momentum value distribution of the pre-trained model;
[0077] S104, if yes, delete the weight to obtain a compressed training model;
[0078] S105, fine-tuning the compression training model to obtain a target response model;
[0079] S106, based on the target response model, conduct simulated consultation training for medical doctors or residents.
[0080] The overall idea of this solution is to perform lossy compression on the pre-trained model, prepare clinical consultation data, train the compressed model again, design downstream tasks, and fine-tune the trained model to obtain the target response model. This target response model is used to conduct simulated consultation training for medical students or residents, which solves the problems of high cost, poor interactive experience, and inaccurate response information of large models in simulated consultation training applications in clinical education, thereby improving the effect of simulated consultation training.
[0081] S101, obtaining a medical consultation training data set, where the medical consultation training data set is determined based on medical consultation data.
[0082] Specifically, based on the consultation data, a knowledge graph is constructed;
[0083] Extract entity information and relationship information related to the consultation from the knowledge graph;
[0084] Based on entity information and relationship information, a medical consultation training data set is formed.
[0085] In a specific implementation, the collected medical consultation data is used to construct a knowledge graph using a knowledge graph construction tool. The medical consultation data is mainly the conversation content between the doctor and the patient, including: the doctor's questions, the patient's answers, and the corresponding relationship between them. Entity information and relationship information related to the medical consultation are extracted from the knowledge graph. Then, the extracted entity information and relationship information are integrated to form a medical consultation training data set, wherein the medical consultation training data set includes elements such as instructions, context, and input text, so as to provide a pre-trained model for correct reasoning and generation.
[0086] Next, the pre-training model is trained, and the pre-training model may be an LLaMA model or a BERT model. S102 is executed to input the medical question training data set into the pre-training model for question-answering training, and determine the update energy of each weight of the pre-training model.
[0087] Specifically, the medical question training data set is input into the pre-training model for question-answering training, and the update energy of each weight of the pre-training model is determined according to the following calculation formula:
[0088] v t =βv t-1 +(1-β)g t
[0089] v t is the update energy of any weight at the current moment, v t-1 is the update energy of any weight at the previous moment, β is the update energy coefficient, g t is the gradient at the current moment.
[0090] Specifically, the calculation formula for each weight is as follows:
[0091] w t =w t-1 -αv t
[0092] w t is any weight at the current moment, w t-1 is the corresponding weight at the previous moment of the current moment, and α is the learning rate.
[0093] By inputting new training data each time, the updated 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, where the threshold is determined based on the momentum value distribution of the pre-trained model.
[0095] The threshold is determined as follows:
[0096] Based on the momentum value distribution of the pre-trained model, determine the mean of momentum and the standard deviation of momentum;
[0097] Based on the mean of momentum and the standard deviation of momentum, the threshold is determined according to the following calculation formula;
[0098] Threshold = μ-kσ
[0099] Among them, μ is the mean of momentum, σ is the standard deviation of momentum, and k is the preset multiple.
[0100] Momentum in machine learning is an optimization algorithm that is mainly used to accelerate the gradient descent process and help the model converge faster. The momentum algorithm introduces historical gradient information so that parameter updates not only depend on the current gradient direction, but also take into account the historical gradient direction and size.
[0101] By determining whether the update energy of each weight of the pre-trained model during the iteration process is less than the threshold, then executing S104, if so, deleting the weight to obtain a compressed compressed training model.
[0102] Specifically, the weight in the pre-trained model is a value used to indicate the degree of influence of each feature or parameter on the final prediction result during the model training process. It is used to measure the importance of data or features. The weights of the update energy less than the threshold are deleted, thereby obtaining a compressed training model.
[0103] Next, execute S105 to fine-tune the compressed training model to obtain the target response model.
[0104] Specifically, obtain a fine-tuning label dataset;
[0105] The compression training model is trained based on the fine-tuning label dataset to fine-tune each word output by the compression training model to obtain a target answer model.
[0106] First, obtain the fine-tuning label dataset, including:
[0107] The data in the medical consultation training data set is divided into question data and answer data;
[0108] Taking question data as input data and answer data as output data, forming a first label data set;
[0109] The question data and the answer data are concatenated to form concatenated data as input data, and the answer data is used as output data to form a second labeled data set;
[0110] The answer data is used as input data, and the question data is used as output data to form a third labeled data set;
[0111] The concatenated data is used as input data, and the problem data is used as output data to form a fourth labeled data set;
[0112] A fine-tuning label dataset is formed based on the first label dataset, the second label dataset, the third label dataset, and the fourth label dataset.
[0113] When forming the splicing data, the splicing is specifically performed in the following manner:
[0114] sentence_pair=sentence_1+[SEP]+sentence_2
[0115] Here, sentence_1 represents question data, sentence_2 represents answer data, [SEP] is used to split the two data, and sentence_pair is the concatenated data.
[0116] By adopting a variety of labeled data sets, we can enrich data samples, improve the generalization ability of the model, reduce the risk of overfitting, and improve the performance of the model.
[0117] Next, the compression training model is trained based on the fine-tuning label dataset to fine-tune each word output by the compression training model to obtain the target answer model.
[0118] Specifically, the compression training model is trained based on the fine-tuning label data set to obtain the target answer model. During the training process, the probability of each word output by the compression training model is divided by the control parameter to obtain the fine-tuning probability;
[0119] Based on the fine-tuning probability, the normalized probability distribution is obtained through the softmax function normalization.
[0120] In a specific implementation, the probability of each word output by the compression training model is adjusted to further improve the prediction accuracy. Specifically, the process of determining the fine-tuning probability 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 output by the compression training model. When T<1, the randomness of the output can be reduced, so that the generated reply content is more deterministic and more common. When T=1, the output maintains the original distribution; when T>1, the randomness of the output can be increased, so that the generated reply content is more diverse and more creative. By adjusting the control parameters, the output content of the compression training model can be adjusted.
[0123] Next, normalization is performed, specifically:
[0124]
[0125] Through normalization, we can more clearly see the probability distribution of each word output by the fine-tuned model.
[0126] After fine-tuning the compressed training model, the target response model is obtained. The performance analysis of the target response model is as follows. Taking the LLaMa model as an example, the before and after performance of the target response model is calculated:
[0127]
[0128] Next, S106 is executed to conduct simulated consultation training for medical students or residents based on the target response model.
[0129] Specifically, a question is input into the target answer model, the question is a question asked by a medical student or a resident doctor, and the target answer model outputs a first target answer;
[0130] splicing the question with the first target answer to form a spliced sentence;
[0131] Inputting the concatenated sentence into the target response model so that the target response model outputs a second target response;
[0132] determining whether the second target response is consistent with the first target response;
[0133] If not, the user will be prompted to change the questioning method.
[0134] If so, output the first target response.
[0135] Prompt to change the question to another one so that the model can understand it.
[0136] This step is the application of the model, that is, after obtaining the target response model, the target response model can simulate the patient's response and can provide consultation training for medical students or residents who need to learn and train.
[0137] Next, the performance of the target response model is evaluated by various metrics.
[0138] 1. Precision
[0139]
[0140] Among them, TP is a true positive (generated correctly) and FP is a false positive (generated incorrectly).
[0141] 2. Recall
[0142]
[0143] Among them, FN is the false negative example (omission generation).
[0144] 3. F1-score
[0145]
[0146] 4. Cosine Similarity
[0147]
[0148] Among them, A and B are both word frequency vectors, A·B is the dot product of two word frequency vectors, and ||A|| and ||B|| are the norms of the two word frequency vectors respectively.
[0149] The following are five cases: Figure 2 to Figure 6 As shown, the indicator performance of the corresponding target response model in each case is calculated respectively.
[0150] Case 1: The case of chest pain in virtual patient Li; Case 2: The case of vomiting blood in virtual patient Wang; Case 3: The case of abdominal pain and black stool in virtual patient Zhang; Case 4: The case of chest pain in virtual patient Yin; Case 5: The case of chest pain and fever in virtual patient.
[0151] Through analysis, we can get the corresponding index performance:
[0152]
[0153] The complex model can be used to conduct simulated consultation training for medical students or residents, and the actual effect can be seen through real consultation training. Figure 7 As shown in the figure, it is a simulated consultation process for a case of vomiting blood. Figure 8 Shown is a simulated consultation process for a chest pain case.
[0154] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
[0155] The present invention provides a simulated medical consultation method based on clinical teaching, comprising: obtaining a medical consultation training data set, wherein the medical consultation training data set is determined based on medical consultation data; inputting the medical consultation training data set into a pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model; judging whether the update energy of each weight is less than a threshold value, wherein the threshold value is determined based on the momentum value distribution of the pre-training model; if so, deleting the weight to obtain a compressed compressed training model; fine-tuning the compressed training model to obtain a target answer model; fine-tuning the compressed training model to obtain a target answer model; based on the target answer model, performing simulated medical consultation training on medical students or residents, deleting unimportant weights or neurons through lossy compression of the model, significantly reducing the storage requirement of the model and reducing the amount of model inference calculation, accelerating the inference speed, thereby improving the performance of the model in the simulated medical consultation training, and thus improving the training effect.
[0156] Embodiment 2
[0157] Based on the same inventive concept, the embodiment of the present invention also provides a simulated consultation device based on clinical teaching, such as Fig. 9 As shown, including:
[0158] An acquisition module 901 is used to acquire a medical inquiry training data set, where the medical inquiry training data set is determined based on medical inquiry data;
[0159] A determination module 902 is used to input the medical question training data set into a pre-training model for question-answering training, and determine the update energy of each weight of the pre-training model;
[0160] A judgment module 903 is used to judge whether the update energy of each weight is less than a threshold, where the threshold is determined based on the momentum value distribution of the pre-trained model;
[0161] A deleting module 904 is used to delete the weights to obtain a compressed training model;
[0162] Obtaining module 905, for fine-tuning the compression training model to obtain a target response model;
[0163] The training module 906 is used to conduct simulated consultation training for medical students or residents based on the target response model.
[0164] In an optional implementation, the acquisition module 901 is used to:
[0165] Build a knowledge graph based on the consultation data;
[0166] Extracting entity information and relationship information related to the medical consultation from the knowledge graph;
[0167] Based on the entity information and relationship information, a medical inquiry training data set is formed.
[0168] In an optional implementation, the determination module 902 is configured to:
[0169] The medical question training data set is input into the pre-training model for question-answering training, and the update energy of each weight of the pre-training model is determined according to the following calculation formula:
[0170] v t =βv t-1 +(1-β)g t
[0171] v t is the update energy of any weight at the current moment, v t-1 is the update energy of any weight at the previous moment, β is the update energy coefficient, g t is the gradient at the current moment.
[0172] In an 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 of momentum and the standard deviation of momentum;
[0174] Based on the mean value of the momentum and the standard deviation of the momentum, the threshold is determined according to the following calculation formula:
[0175] Threshold = μ-kσ
[0176] Wherein, μ is the mean value of the momentum, σ is the standard deviation of the momentum, and k is a preset multiple.
[0177] In an optional implementation, a module 905 is obtained for:
[0178] Get the fine-tuning label dataset;
[0179] The compression training model is trained based on the fine-tuning label dataset to fine-tune each word output by the compression training model to obtain a target answer model.
[0180] In an optional implementation, a module 905 is obtained for:
[0181] The data in the medical consultation training data set is divided into question data and answer data;
[0182] Taking question data as input data and answer data as output data, forming a first label data set;
[0183] The question data and the answer data are concatenated to form concatenated data as input data, and the answer data is used as output data to form a second labeled data set;
[0184] The answer data is used as input data, and the question data is used as output data to form a third labeled data set;
[0185] Using the spliced data as input data and the question data as output data to form a fourth label data set;
[0186] A fine-tuning 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 an optional implementation, a module 905 is obtained for:
[0188] The compression training model is trained based on the fine-tuning label data set to obtain a target answer model, and during the training process, the probability of each word output by the compression training model is divided by a control parameter to obtain a fine-tuning probability;
[0189] Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing the result through a softmax function.
[0190] In an optional embodiment, the training module 906 is used to
[0191] Inputting a question into the target answer model, the question being a question asked by the medical student or resident doctor, and the target answer model outputting a first target answer;
[0192] concatenating the question with the first target answer to form a concatenated sentence;
[0193] Inputting the concatenated sentence into the target answer model so that the target answer model outputs a second target answer;
[0194] determining whether the second target response is consistent with the first target response;
[0195] If not, it will prompt that another way of asking the question is needed;
[0196] If so, output the first target response.
[0197] Embodiment 3
[0198] Based on the same inventive concept, an embodiment of the present invention provides a computer device, such as Fig.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, the steps of the above-mentioned simulated consultation method based on clinical teaching are implemented.
[0199] Among them, Fig.10 In the embodiment of the present invention, a bus architecture (represented by bus 1000) is shown, bus 1000 may include any number of interconnected buses and bridges, bus 1000 links 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 peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described 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, namely 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 when performing operations.
[0200] Embodiment 4
[0201] Based on the same inventive concept, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above-mentioned simulated consultation method based on clinical teaching are implemented.
[0202] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0203] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0204] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recorded in each embodiment. More specifically, as reflected in each embodiment, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0205] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0206] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in a specific embodiment, any one of the claimed embodiments may be used in any combination.
[0207] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in a simulation consultation device based on clinical teaching and a computer device according to an embodiment of the present invention. The present invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0208] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A simulated medical consultation method based on clinical teaching, characterized in that: include: Acquire a medical inquiry training data set, wherein the medical inquiry training data set is determined based on medical inquiry data; Inputting the medical question training data set into a pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model; Determining whether the update energy of each weight is less than a threshold, wherein the threshold is determined based on the momentum value distribution of the pre-trained model; If yes, delete the weights to obtain a compressed training model; Fine-tune the compression training model to obtain a target response model; Based on the target response model, medical students or residents are given simulated consultation training.
2. The method according to claim 1, characterized in that Obtaining a medical inquiry training data set, wherein the medical inquiry training data set is determined based on medical inquiry data and includes: Build a knowledge graph based on the consultation data; Extracting entity information and relationship information related to the medical consultation from the knowledge graph; Based on the entity information and relationship information, a medical inquiry training data set is formed.
3. The method according to claim 1, characterized in that The step of inputting the medical question training data set into the pre-training model for question-answering training and determining the update energy of each weight of the pre-training model includes: The medical question training data set is input into the pre-training model for question-answering training, and the update energy of each weight of the pre-training model is determined according to the following calculation formula: v t =βv t-1 +(1-β)g t v t is the update energy of any weight at the current moment, v t-1 is the update energy of any weight at the previous moment, is the update energy coefficient, g t is the gradient at the current moment.
4. The method according to claim 1, characterized in that 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 of momentum and the standard deviation of momentum; Based on the mean value of the momentum and the standard deviation of the momentum, the threshold is determined according to the following calculation formula: Threshold = μ-kσ Wherein, μ is the mean value of the momentum, σ is the standard deviation of the momentum, and k is a preset multiple.
5. The method according to claim 1, characterized in that Fine-tuning the compression training model to obtain a target response model includes: Get the fine-tuning label dataset; The compression training model is trained based on the fine-tuning label dataset to fine-tune each word output by the compression training model to obtain a target answer model.
6. The method according to claim 5, characterized in that Get the fine-tuning label dataset, including: The data in the medical consultation training data set is divided into question data and answer data; Taking question data as input data and answer data as output data, forming a first label data set; The question data and the answer data are concatenated to form concatenated data as input data, and the answer data is used as output data to form a second labeled data set; The answer data is used as input data, and the question data is used as output data to form a third labeled data set; Using the spliced data as input data and the question data as output data to form a fourth label data set; A fine-tuning label dataset is formed based on the first label dataset, the second label dataset, the third label dataset, and the fourth label dataset.
7. The method according to claim 5, characterized in that The compression training model is trained based on the fine-tuning label data set to fine-tune the probability of each word output by the compression training model to obtain a target answer model, including: The compression training model is trained based on the fine-tuning label data set to obtain a target answer model, and during the training process, the probability of each word output by the compression training model is divided by a control parameter to obtain a fine-tuning probability; Based on the fine-tuning probability, a normalized probability distribution is obtained by normalizing the result through a softmax function.
8. The method according to claim 1, characterized in that Based on the target response model, medical students or residents are given simulated consultation training, including: Inputting a question into the target answer model, the question being a question asked by the medical student or resident doctor, and the target answer model outputting a first target answer; concatenating the question with the first target answer to form a concatenated sentence; Inputting the concatenated sentence into the target answer model so that the target answer model outputs a second target answer; determining whether the second target response is consistent with the first target response; If not, it will prompt that another way of asking the question is needed; If so, output the first target response.
9. A simulated medical consultation device based on clinical teaching, characterized in that: include: An acquisition module, used for acquiring a medical inquiry training data set, wherein the medical inquiry training data set is determined based on medical inquiry data; A determination module, used for inputting the medical question training data set into a pre-training model for question-answering training, and determining the update energy of each weight of the pre-training model; A judgment module, used to judge whether the update energy of each weight is less than a threshold, wherein the threshold is determined based on the momentum value distribution of the pre-trained model; A deleting module, used for deleting the weights if yes, to obtain a compressed training model; An obtaining module is used to fine-tune the compression training model to obtain a target response model; The training module is used to conduct simulated consultation training for medical students or residents based on the target response model.
10. 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, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and device for establishing prediction model
CN115546576A
Self-training iterative artificial intelligence model training method
CN116628510A
Depth convolutional neural network compression method based on annealing attenuation
CN117131908A
Image representation model pruning method based on multi-granularity importance measurement
CN117292182A
Data processing method based on pre-training language model and related equipment
CN117555990A