A medical diagnosis method and system based on human-computer collaboration
By employing a human-machine collaborative online medical diagnosis method, combining BERT+CRF and DQN, efficient and accurate online medical diagnosis has been achieved, solving the problem of balancing efficiency and accuracy in traditional methods and improving patient satisfaction.
Patent Information
- Application Number
- CN202210693972.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-19
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-06-19
AI Technical Summary
Traditional human-based online consultation methods are inefficient, while machine-based online consultation methods are inaccurate. Furthermore, the medical field has high security requirements, making it difficult to balance efficiency and accuracy in online medical diagnosis.
A human-machine collaborative medical diagnostic method is adopted, which uses BERT+CRF to identify patient symptoms, combines DQN learning network to select inquiry strategies, generates natural language responses, and is then reviewed by human doctors to give the final diagnosis.
It improves the efficiency and accuracy of online consultations, reduces the workload of human doctors, lowers time costs, and increases patient satisfaction.
Smart Images

Figure CN115132350B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of medical information technology, and particularly relates to a medical diagnosis method and system based on human-computer cooperation. BACKGROUND
[0002] Online medical diagnosis refers to that a doctor communicates with a patient about a disease, diagnoses the disease and provides relevant medical advice on a website. Since most medical diagnoses are routine follow-ups and chronic disease diagnoses, online medical diagnosis is of great significance for balancing medical resources, breaking through the bottleneck of medical service supply, avoiding cross infection, reducing out-of-town medical treatment of patients, saving time and cost of patients, and has become a popular choice for patients and medical professionals.
[0003] Based on human doctors for online consultation, the reliability is high, and the disease diagnosis accuracy is high combined with the doctor's experience and professional knowledge. However, the current artificial online consultation platform such as Good Doctor, Spring Rain Doctor and Wellframe has the problems of tight medical resources, heavy burden of doctors, low efficiency of online consultation relying on doctors, long waiting time of patients for medical treatment and the like. According to statistics, each online consultation of doctors is more than 40 rounds, and since the doctors on the online platform are in-service doctors, they have a lot of work such as outpatient service, surgery and ward round, and can only reply to patients with rest time and fragmented time. The waiting time of patients is not fixed, which is fast for several minutes and slow for several hours.
[0004] Based on machine, online consultation such as medical dialogue system can communicate with patients in real time and collect patient information, so the efficiency is high. There are two common methods to build medical dialogue system: the first method is based on pipeline, which is composed of four functional modules (natural language understanding, dialogue state tracking, strategy learning and natural language generation). Different modules may spread error information during training period. The second method is based on end-to-end deep learning: it is usually completely data-driven and relies on a large number of expert-labeled training samples. In addition, the safety requirement of medical field is extremely high, and the accuracy of machine diagnosis is low and unreliable, which cannot be solved by machine intelligence alone, and a small error may also lead to disastrous consequences. SUMMARY
[0005] Technical problems to be solved
[0006] The traditional artificial online consultation method has high reliability but low efficiency, and the machine-based online consultation method has high efficiency but low accuracy. The safety requirement in the medical field is extremely high, and therefore the online consultation method based on man-machine cooperation provided in the application can improve the consultation efficiency and patient satisfaction on the premise of ensuring accuracy. In order to avoid the defects of the prior art, the application provides a medical diagnosis method and system based on man-machine cooperation.
[0007] Technical scheme
[0008] A medical diagnosis method based on man-machine cooperation, characterized in that it comprises:
[0009] Step 1: patient state recognition (PSR): the machine recognizes and extracts the symptom information of the patient by encoding the patient conversation, and adopts the BERT+CRF method to quickly recognize the patient symptoms;
[0010] Step 2: physician behavior learning (PAL): a learning network based on DQN is adopted, and the machine asks the patient about the appropriate symptoms according to the patient state;
[0011] Step 3: machine-generated response (MGR): natural language reflecting the doctor's behavior is generated to have a conversation with the patient and ask about the patient's state information;
[0012] Step 4: machine disease diagnosis (MDD): after inquiring about the patient's symptoms, the machine generates an electronic medical record and performs disease pre-diagnosis;
[0013] Step 5: human-machine decision response (HMR): a human medical expert makes subsequent medical diagnosis according to the results generated by the machine; the machine asks about the symptoms and generates an electronic medical record, and the human doctor makes a re-examination based on the machine results and modifies them if necessary to give the final diagnosis result.
[0014] Further technical scheme of the application: step 1 is specifically as follows:
[0015] Given the patient conversation X=(x1,…,x t , the hidden representation of each sentence of the patient conversation is obtained by using the BERT pre-training model for encoding:
[0016]
[0017] Wherein, represents the embedding representation of the i-th round and the j-th word;
[0018] After obtaining the feature representation of the sequence by using BERT to recognize the BIO label of each word, a CRF output layer is added for decoding; then the symptoms are standardized in medical terminology according to the symptom dictionary.
[0019] The further technical solution of the application is that step 2 is specifically as follows:
[0020] First, the CNN is used to convolve the symptom space when selecting the symptom, the obtained feature is input into the GRU to obtain the embedding representation of each symptom, and then the embedding representation is input into the AVG_POOL layer to obtain the intermediate hidden tensor, and finally the Q value of each action is obtained through the MLP; after the inquiry of the patient's symptoms is finished, the medical knowledge base is combined to obtain the pre-diagnosis of the disease.
[0021] The further technical solution of the application is that step 4 is specifically as follows:
[0022] After the inquiry of the symptoms of the patient is finished, the machine compares the medical knowledge base according to the known symptoms of the patient to pre-diagnose the disease of the patient, and the disease probability P(dis) is calculated through the following formula:
[0023]
[0024] Wherein, Count(sym all ) represents all the symptoms of the disease A, and Count(sym') represents all the symptoms of the known patient known by the doctor agent;
[0025] Different diseases may have similar symptoms, if the probability of disease A and disease B is not much different, the scoring system can be used for further determination; it is assumed that disease A has a symptom group Disease B has a symptom group If the symptom sym' is in sym A , disease A gets 1 point; if the symptom sym' is in sym B , disease B gets 1 point; if sym' is in sym A And sym' is in sym B , each gets 0.5 points.
[0026] A medical diagnosis system based on human-machine cooperation, characterized by comprising: a patient state recognition module, a doctor behavior learning module, a machine generated response module, a machine disease diagnosis module, a human-machine decision response module,
[0027] The patient state recognition module: the machine obtains the vector representation of the patient description by coding the patient description, recognizes the symptom information in the patient description, standardizes the symptoms according to the medical terminology reference library, and translates the symptoms into standard professional medical terms;
[0028] The doctor behavior learning module: the machine simulates the process of human doctor inquiry, selects the symptoms that need to be inquired and confirmed with the patient according to the existing symptoms of the patient;
[0029] The machine generates a response module: through patient symptom identification, doctor behavior learning, machine needs to generate natural language response and patient symptom inquiry and conversation;
[0030] The machine disease diagnosis module: after inquiring the symptoms of the patient, the machine compares the known symptoms of the patient with the medical knowledge base to make a pre-diagnosis of the disease suffered by the patient;
[0031] The man-machine decision response module: after the machine inquiry, the human expert can understand the basic situation of the patient and make a re-diagnosis by checking the electronic medical record and disease pre-diagnosis provided by the doctor agent.
[0032] Beneficial effects
[0033] The medical diagnosis method and system based on man-machine cooperation provided by the application can effectively identify the symptoms described in the patient's oral language by adopting the BERT+CRF and symptom normalization method. The method based on DQN can make the machine select as many symptoms as possible related to the symptoms described by the patient for inquiry. The machine combines the knowledge base to calculate the probability of the disease suffered by the patient, obtains the disease pre-diagnosis and generates the electronic medical record. Finally, the human doctor intervenes, combines the machine pre-diagnosis result and the professional knowledge and experience of the human doctor to obtain the final disease diagnosis result.
[0034] The method effectively combines human intelligence and machine intelligence, improves the reliability and patient satisfaction of online medical diagnosis, ensures the accuracy of diagnosis, greatly improves the efficiency of online inquiry, and reduces the workload of human doctors. Compared with pure manual work, the time cost of reliable medical diagnosis is reduced to 36% compared with pure manual online inquiry. BRIEF DESCRIPTION OF DRAWINGS
[0035] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application, and the same reference numerals in the drawings refer to the same or similar elements.
[0036] Figure 1 The flowchart of the online medical diagnosis method and system based on man-machine cooperation in the application example.
[0037] Figure 2 The model diagram for patient symptom identification based on BERT+CRF.
[0038] Figure 3 The machine symptom selection model diagram based on DQN.
[0039] Figure 4 The effect of the online medical diagnosis method based on man-machine cooperation on the disease diagnosis accuracy and the average inquiry time is shown.
[0040] Figure 5System structure diagram of the present application. DETAILED DESCRIPTION
[0041] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0042] The present application utilizes the following principle: Generally speaking, online medical diagnosis can be divided into two stages. The first stage is the inquiry stage. When patients consult medical problems online, they will first describe their current state (including some symptoms). Based on this, the human doctor will ask the patient whether there are other symptoms and conditions. The second stage is the diagnosis stage. According to the patient's answers, the human doctor can judge the possible diseases according to the patient's symptoms and provide medical advice. It can be seen that the inquiry stage is relatively traditional and mechanized, with lower safety requirements, suitable for machine execution; the diagnosis stage involves medical professional knowledge, with higher safety requirements, suitable for human doctors to perform. Therefore, an online medical diagnosis method based on human-computer collaboration is proposed and a corresponding medical diagnosis system is constructed. In the query stage, the system uses a machine. It uses BERT+CRF to identify symptoms in patient dialogue and uses a DQN-based method to ask about symptoms. In the diagnosis stage, the system uses a machine and a person. The machine generates a pre-diagnosis result and an electronic medical record by calculating the disease probability. Then, the human doctor checks the pre-diagnosis result and modifies it if necessary to give the final diagnosis result.
[0043] As shown in Figure 1 , the specific steps of the present application are as follows:
[0044] Step 1: Patient State Recognition (PSR): In the process of online medical diagnosis, the patient will first describe his or her recent physical condition, which usually includes some of the patient's existing symptoms. However, this is usually a patient's verbal description, such as describing "abdominal pain" as "stomach pain". Patient state recognition refers to the machine obtaining a vector representation of the patient's description by encoding the patient's description, identifying the symptom information in the patient's description, normalizing the symptoms according to the medical terminology reference library, and translating the symptoms into standard professional medical terminology. The present application uses BIO format to mark symptoms in patient description.
[0045] Given a patient dialogue X = (x1,..., x t ), the hidden representation of each sentence of the patient is obtained by using the BERT pre-training model for encoding:
[0046]
[0047] where, represents the embedding representation of the ith round, jth word.
[0048] At the same time, the BIO tags of each word are identified by BERT, and the feature representation of the sequence is obtained. Then, a CRF output layer is added for decoding. Then, according to the symptom dictionary, the symptoms are standardized in medical terminology.
[0049] Step 2: Physician Action Learning (PAL): Physician Action Learning refers to the process of simulating human doctors in the process of medical examination, and selecting the symptoms that need to be asked and confirmed with the patient next according to the existing symptoms of the patient. By using a DQN-based method, the machine learns the behavior of the doctor.
[0050] The relevant settings in the task are introduced below. Conversation state S: including the symptoms requested by the machine and the symptoms informed by the patient in the tth round, the previous behavior of the patient, and the previous behavior of the machine. According to the symptom representation vector, its dimension is equal to the number of all symptoms, and the unasked symptom is (0, 0, 0), the asked correct symptom is (1, 0, 0), the asked wrong symptom is (0, 1, 0), and the asked uncertain symptom is (0, 0, 1). Each state consists of a 3x66 tensor. Machine behavior A: consisting of symptoms, a total of 66. State transition T: in the tth round, according to the previous patient behavior a p,t-1 and the current machine behavior a d,t , the conversation state is transferred from s t-1 to s t . Reward R: in this task, the machine is encouraged to ask the correct symptoms, that is, the symptoms possessed by the patient. The reward r = R(s t-1 , a d,t ). If the symptoms asked by the machine contain all the true symptoms of the patient and the conversation is ended, the reward is 1; otherwise, if the conversation does not reach the maximum round, the reward is 0, and if the maximum round is reached but the correct symptoms are not asked, the reward is -1. The conversation strategy π outputs the probability distribution of all possible behaviors of the machine π(a|s) = P(A t = a | S t = s).
[0051] The application proposes a DQN for inquiring patient symptoms, which can avoid the problem of too large action selection space. First, the CNN is used to convolve the symptom space when selecting symptoms, the obtained features are input into the GRU to obtain the embedding representation of each symptom, and then input into the AVG_POOL layer to obtain the intermediate hidden tensor, and finally through the MLP to obtain the Q value of each action. After inquiring the patient's symptoms, the medical knowledge base is combined to obtain the pre-diagnosis of the disease. In order to better train the network, the target network and experience replay method are adopted. Before training, the buffer Buffer is filled with randomly selected experiences to hot start. At each time step, the buffer B stores the previous experience, denoted as e t (s t ,a t ,r t ,s t+1 ). If the current network is better than the previous one, update the buffer. There are three ways to explore the action space: in the warm-up phase, a random method is used; in the training phase, an ∈-greedy strategy is used to select behavior, as follows: with an ∈ probability, the next behavior is randomly selected, and with a 1-∈ probability, the behavior with the maximum action value is selected.
[0052]
[0053]
[0054]
[0055] In the test phase, the greedy method is used. The Q network takes s t as input, and outputs the Q value Q(s,a;θ) of all behaviors, according to the Bellman equation, the Q value can be calculated by the following formula:
[0056]
[0057] Where Q(s t ,a t |θ′ i ) is the target network with parameters θ′ i obtained from the previous generation, and γ is the discount rate.
[0058] Step 3: Machine-generated response (MGR): After patient symptom recognition and doctor behavior learning, the machine needs to generate natural language responses for symptom inquiry and conversation with the patient. In order to ensure the stability of the generated response, template-based natural language generation is used to generate human-like sentences. According to the common replies of online doctors, templates are designed. The colloquial symptom-medical term pair used in the PSR part is used to convert the medical terms used in the conversation into daily expressions, which is convenient for patients to understand.
[0059] The generation of electronic medical record is similar to the generation of response, and the template is designed in advance according to the traditional medical record. After the conversation, the symptoms of the patient are filled in the slot according to the patient's self-reports and machine confirmation.
[0060] Step 4: Machine Disease Diagnosis (MDD): After the end of the conversation with the patient, the machine makes a preliminary diagnosis of the disease of the patient according to the known symptoms of the patient and compares the medical knowledge base. The disease probability P(dis) is calculated by the following formula:
[0061]
[0062] Where Count(sym represents all the symptoms of disease A, and Count(sym') represents all the symptoms of the patient known by the doctor agent. all
[0063] Different diseases may have similar symptoms, and if the probability of disease A and disease B is not much different, the scoring system can be used for further determination. Assuming that disease A has symptom group Disease B has symptom group If symptom sym'∈sym A , disease A gets 1 point; if symptom sym'∈sym B , disease B gets 1 point; if sym'∈sym A and sym'∈sym B , each gets 0.5 points.
[0064] Step 5: Human-machine decision response (HMR): After the end of the machine inquiry, the human expert can understand the basic situation of the patient more quickly by checking the electronic medical record and disease pre-diagnosis issued by the doctor agent, and make a re-examination. If the disease probability is greater than or equal to the threshold τ, the doctor agent can respond to the patient; if it is lower than the threshold τ, the human doctor is reminded to pay attention.
[0065] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any skilled person in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A method for medical diagnosis based on human-machine collaboration, characterized in that Comprise: Step 1: patient state recognition PSR: the machine recognizes and extracts the patient's symptom information by encoding the patient's dialogue, adopts the method of BERT+CRF to quickly identify the patient's symptoms; Use BIO format to mark symptoms in patient description: Given patient dialogue , the hidden representation of each sentence of the patient's dialogue is obtained by encoding with the BERT pre-training model: wherein, representing the first wheel, the first word embedding representation; At the same time, use BERT to identify the BIO label of each word, obtain the feature representation of the sequence, add a CRF output layer, and decode; then, according to the symptom dictionary, standardize the expression of the symptoms in medical terminology; Step 2: doctor behavior learning PAL: adopt a learning network based on DQN, and the machine asks the patient appropriate symptoms according to the patient's state; Related settings in the task: Dialogue state S: includes the machine's symptom request and the patient's reported symptoms in round t, the patient's previous behavior, and the machine's previous behavior; based on the symptom representation vector, its dimension is equal to the number of all symptoms, with no symptom requested being... Asking for the correct symptoms is Asking about incorrect symptoms Inquire about uncertain symptoms Each state consists of a 3×66 tensor; Machine behavior A: consists of symptoms, totaling 66; State transition T: in the ... Wheel, based on previous patient behavior and current machine behavior The dialogue state is changed from Transferred to Reward R: In this task, the machine is encouraged to ask for the correct symptoms, that is, the symptoms the patient has; Reward If the machine's query includes all of the patient's actual symptoms and the dialogue ends, a reward of 1 is given; otherwise, if the dialogue hasn't reached its maximum round, a reward of 0 is given, and if the correct symptoms are not queried by the maximum round, a reward of -1 is given; Dialogue Strategy Output the probability distribution of all possible machine actions. ; A DQN for asking patient symptoms is proposed, which can avoid the problem of too large action selection space: first, use CNN to do convolution on the symptom space when selecting symptoms, input the obtained features into GRU to obtain the embedding representation of each symptom, then input into AVG_POOL layer to obtain the intermediate hidden tensor, and finally get the Q value of each action through MLP; after ending the inquiry of patient symptoms, combined with the medical knowledge base, the pre-diagnosis of the disease is obtained; in order to better train the network, the target network and experience replay method are adopted; before training, the buffer Buffer is filled with randomly selected experiences to warm up; at each time step, the buffer B stores the previous experience, represented as ; if the current network is better than the previous one, update the buffer; there are three ways to explore the action space: in the warm-up phase, a random way is adopted; in the training phase, the policy selection behavior is as follows: randomly select the next behavior with a probability, select the action with the maximum value of the action value with a probability: In the test phase, the agent uses the method; the Q-network takes as input, and outputs the Q-value for all actions According to the Bellman equation, the Q-value can be computed by wherein is a parameter obtained from a previous generation of the target network, is a discount rate; Step 3: machine generated response MGR: generate natural language reflecting the doctor's behavior and patient dialogue to inquire about the patient's state information; After patient symptom recognition and doctor behavior learning, the machine needs to generate natural language responses to inquire about symptoms and have a dialogue with the patient; In order to ensure the stability of the generated response, a template-based natural language generation is used to generate human-like sentences; According to the common replies of online doctors, templates are designed; The medical terms used in the dialogue are converted into daily expressions by using the colloquial symptom-medical term pair in the PSR part, so as to facilitate the understanding of the patient; The generation of electronic medical record is similar to the generation of response, and the template is designed according to the traditional medical record; After the dialogue, the patient's symptoms are filled in the slot according to the patient's self-description and the machine's confirmation; Step 4: machine disease diagnosis MDD: after inquiring about the patient's symptoms, the machine generates an electronic medical record and performs disease pre-diagnosis; After the end of the inquiry of the symptoms from the patient, the machine makes a pre-diagnosis of the disease suffered by the patient, comparing the symptoms known to be suffered by the patient with a medical knowledge base, the probability of the disease The calculation is made by the following formula: wherein, represents all symptoms that the disease A has, represents all symptoms that the physician agent knows the patient has; Different diseases can have similar symptoms, and if the probabilities of disease A and disease B are not very different, a "point system" can be used to further determine the disease; suppose disease A has symptom group , and disease B has symptom group , if symptom , disease A gets 1 point; if symptom , disease B gets 1 point; if , each gets 0.5 points; Step 5: human-machine decision response HMR: human medical experts make follow-up medical diagnosis based on the results generated by the machine; The machine asks symptoms and generates an electronic medical record, and the human doctor makes a re-examination based on the machine result and modifies it if necessary to give the final diagnosis result.
2. A human-machine collaboration based medical diagnosis system for implementing the method of claim 1, characterized in that Comprise: patient state recognition module, doctor behavior learning module, machine generated response module, machine disease diagnosis module, human-machine decision response module, The patient state recognition module: the machine obtains the vector representation of the patient's description by encoding the patient's description, recognizes the symptom information in the patient's description, standardizes the symptoms according to the medical terminology reference library, and translates the symptoms into standard professional medical terminology; The doctor behavior learning module: the machine simulates the process of human doctor inquiry, selects the symptoms that need to be asked and confirmed with the patient according to the patient's existing symptoms; The machine generated response module: after patient symptom recognition and doctor behavior learning, the machine needs to generate natural language responses to inquire about symptoms and have a dialogue with the patient; The machine disease diagnosis module: after inquiring about the patient's symptoms, the machine compares the medical knowledge base according to the known symptoms of the patient to make a pre-diagnosis of the patient's disease; The human-machine decision response module: after the machine inquiry, the human experts can quickly understand the patient's basic situation and make a re-examination by checking the electronic medical record and disease pre-diagnosis provided by the doctor agent.
Citation Information
Patent Citations
Deep reinforcement learning-based inquiry method and system
CN114613489A