Auxiliary diagnosis method, device and computer equipment based on medical questioning session
By using the feature extraction model to extract and identify keywords and sentences in the consultation dialogue during medical consultation, the problem of high misdiagnosis rate caused by information omission is solved and more accurate and complete diagnostic information is achieved.
Patent Information
- Application Number
- CN202110997039.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-08-27
AI Technical Summary
In the medical field, doctors have a high misdiagnosis rate due to omission of information during the consultation process. Existing technology is difficult to effectively capture keywords and sentences, resulting in incomplete diagnostic information.
Using an auxiliary diagnosis method based on consultation conversations, the trained feature extraction model is used to extract characteristic words and sentences from the consultation conversation, and differentiate them in the conversation text to provide auxiliary diagnostic information for doctors to view. .
By extracting and identifying key feature words and sentences, the misdiagnosis rate of doctors during diagnosis is reduced and the integrity and accuracy of the information are ensured.
Smart Images

Figure CN113707299B
Abstract
Description
Technical Field
[0001] The present application relates to the fields of artificial intelligence technology and digital medicine, and in particular to an auxiliary diagnosis method, device, computer equipment and storage medium based on medical consultation conversation. Background Art
[0002] With the substantial increase in computing power and data volume, artificial intelligence technology has been further developed, and the application of artificial intelligence to solve problems in the medical field has become a hot topic. In the medical field, doctors generally interview patients and then infer the patient's condition based on the interview results.
[0003] Due to the limitations of the patient's expression and the long consultation dialogue, the doctor needs to concentrate highly to capture the key words in the patient's description during the consultation. Even so, there will still be omissions of key words, resulting in omissions of diagnostic information and a high misdiagnosis rate. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose an auxiliary diagnosis method, apparatus, computer device and storage medium based on a medical consultation session to solve the problem of a high misdiagnosis rate.
[0005] In order to solve the above technical problems, the present application embodiment provides an auxiliary diagnosis method based on a medical consultation session, which adopts the following technical solution:
[0006] Acquire a conversation text generated during the consultation process, wherein the conversation text includes a consultation conversation between a doctor and a patient;
[0007] Extracting feature words from the medical consultation dialogue using the trained first feature extraction model to obtain target feature words in each sentence of the medical consultation dialogue;
[0008] Extracting feature sentences from the conversation text using the trained second feature extraction model to obtain target feature sentences in the medical consultation process;
[0009] The target feature words and the target feature sentences are differentially identified in the dialogue text and displayed as auxiliary diagnosis information of the consultation process.
[0010] Furthermore, before obtaining the dialogue text generated during the consultation process, the method further includes:
[0011] Constructing a first feature extraction model and a second feature extraction model;
[0012] Pre-training the first feature extraction model using first medical data to obtain a pre-trained first feature extraction model;
[0013] Taking the disease diagnosis cross entropy loss as the optimization target, the pre-trained first feature extraction model and the second feature extraction model are jointly trained through the second medical data.
[0014] Furthermore, the step of pre-training the first feature extraction model using the first medical data to obtain the pre-trained first feature extraction model includes:
[0015] Constructing a first pre-training task based on word mask prediction according to the first medical data; and
[0016] Constructing a second pre-training task based on context sentence prediction according to the first medical data;
[0017] Based on the first pre-training task and the second preset training task, the first feature extraction model is pre-trained.
[0018] Furthermore, the step of constructing a first pre-training task based on word mask prediction according to the first medical data includes:
[0019] Performing random word masking on the initial sentence sample in the first medical data by using a random mask block to obtain a masked sample sentence;
[0020] Performing word mask prediction on masked words in the masked sample sentence to obtain a prediction result sentence;
[0021] Calculating a first error loss between the prediction result sentence and the initial sentence sample;
[0022] The first pre-training task is constructed with the goal of minimizing the first error loss.
[0023] Furthermore, the step of constructing a second pre-training task based on context sentence prediction according to the first medical data includes:
[0024] Taking the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample as the upper sentence, randomly matching the lower sentence for the initial sentence sample to form a sample sentence pair;
[0025] Predicting the upper and lower sentences of the sample sentence pair to obtain a prediction result;
[0026] Calculating a second error loss between the prediction result and a correct sample sentence pair, wherein the correct sample sentence pair includes an initial sentence sample and a corresponding correct next sentence;
[0027] The second pre-training task is constructed with the goal of minimizing the second error loss.
[0028] Furthermore, the step of jointly training the pre-trained first feature extraction model and the second feature extraction model through the second medical data with the disease diagnosis cross entropy loss as the optimization target includes:
[0029] Connecting the pre-trained first feature extraction model and the second feature extraction model to obtain a connected model;
[0030] Training the connected model through the second medical data, and during the training process, adjusting the parameters in the pre-trained first feature extraction model and the second feature extraction model through the back propagation of the disease diagnosis cross entropy loss;
[0031] After the connected model is trained until convergence or a preset number of iterations is reached, the trained first feature extraction model and the trained second feature extraction model are obtained.
[0032] Furthermore, the step of differentially marking the target feature words and the target feature sentences in the dialogue text includes:
[0033] Visually expressing the target feature word through a first visualization element, wherein the first visualization element is determined according to the confidence of the target feature word, wherein the confidence of the target feature word is obtained through the output of the first feature extraction model;
[0034] Visually expressing the target feature sentence through a second visualization element, wherein the second deification element is determined according to a weight of the target feature sentence, wherein the weight of the target feature sentence is obtained through the output of the second feature extraction model;
[0035] The consultation process is visualized by a third visualization element, and the third visualization element is determined according to the time sequence of the consultation dialogue in the dialogue text.
[0036] In order to solve the above technical problems, the embodiment of the present application further provides an auxiliary diagnosis device based on a medical consultation session, which adopts the following technical solution:
[0037] An acquisition module, used to acquire a dialogue text generated during the consultation process, wherein the dialogue text includes the consultation dialogue between the doctor and the patient;
[0038] A first extraction module is used to extract feature words from the medical consultation dialogue using a trained first feature extraction model to obtain target feature words in each sentence of the medical consultation dialogue;
[0039] A second extraction module is used to extract feature sentences from the dialogue text through a trained second feature extraction model to obtain target feature sentences in the consultation process;
[0040] A display module is used to differentiate the target feature words and the target feature sentences in the dialogue text and display them as auxiliary diagnosis information of the consultation process.
[0041] In order to solve the above technical problems, an embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the auxiliary diagnosis method based on the medical consultation session are implemented.
[0042] In order to solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the auxiliary diagnosis method based on the medical consultation session are implemented.
[0043] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: after obtaining the dialogue text generated during the medical consultation process, the feature words of the medical consultation dialogue are extracted through the trained first feature extraction model to obtain the feature words in each sentence in each medical consultation dialogue; the feature sentences of the dialogue text are extracted through the trained second feature extraction model to obtain the feature sentences in the medical consultation process; the feature words and feature sentences in the medical consultation process are formed into auxiliary diagnosis information for the doctor to view. When the doctor diagnoses the patient, the doctor can focus on the feature words and feature sentences in the auxiliary diagnosis information by viewing the auxiliary diagnosis information, which is intuitive and will not be missed. The auxiliary diagnosis information can reduce the doctor's misdiagnosis rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0046] Figure 2 is a flowchart of an embodiment of an auxiliary diagnosis method based on a medical consultation session according to the present application;
[0047] Figure 3 is a flow chart of another embodiment of the auxiliary diagnosis method based on the medical consultation session according to the present application;
[0048] Figure 4 yes Figure 3A flowchart of an embodiment of step S302;
[0049] Figure 5 yes Figure 2 A flowchart of an embodiment of step S204;
[0050] Figure 6 is a structural schematic diagram of an embodiment of an auxiliary diagnosis device based on a medical consultation session according to the present application;
[0051] Figure 7 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0053] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0054] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0055] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0056] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0057] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0058] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0059] It should be noted that the auxiliary diagnosis method based on the medical consultation session provided in the embodiment of the present application is generally executed by a server, and accordingly, the auxiliary diagnosis device based on the medical consultation session is generally set in the server.
[0060] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0061] Continue to refer Figure 2 , shows a flow chart of an embodiment of an auxiliary diagnosis method based on a medical consultation session according to the present application. The auxiliary diagnosis method based on a medical consultation session comprises the following steps:
[0062] Step S201, obtaining the dialogue text generated during the consultation process.
[0063] In this embodiment, the auxiliary diagnosis method based on the consultation session is executed on the electronic device (eg Figure 1 The server shown in the figure) can communicate with the terminal through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0064] Specifically, the server obtains the dialogue text generated during the consultation process. The above consultation process can be an offline consultation process or an online consultation process.
[0065] During the offline consultation process, the doctor and the patient can communicate face to face. The conversation between the doctor and the patient during the consultation process can be collected through a voice pickup device, and the collected conversation can be uploaded to the server. The conversation between the doctor and the patient can be converted into text through the voice recognition technology deployed on the server to obtain the corresponding consultation dialogue.
[0066] During the online consultation process, doctors and patients can communicate through a chat window or Internet voice. The server can obtain the chat window content or Internet voice content in real time or at a scheduled time. After the consultation is completed, the doctor can upload the chat window content or Internet voice content to the server.
[0067] A dialogue text may correspond to a medical consultation process. It is understandable that a dialogue text may include one or more sentences of medical consultation dialogue. The medical consultation dialogue may consist of a dialogue between a doctor and a patient, or may consist of a unilateral self-narration by the patient.
[0068] Specifically, during the online consultation process, the doctor can communicate with the patient through the doctor terminal, and the patient can communicate with the doctor through the patient terminal. During the communication between the doctor and the patient, a corresponding dialogue text can be generated. For example, the dialogue text can be as follows:
[0069] Patient: There are many red bumps on my baby's buttocks
[0070] Doctor: Hello, I am Doctor A from the XX Dermatology Department. I am happy to serve you. Does it itch?
[0071] Patient: It should be a little itchy.
[0072] Patient: What's going on?
[0073] Doctor: How long have these symptoms been present?
[0074] Doctor: It seems serious.
[0075] Patient: About a week.
[0076] Patient: It just grows up suddenly, then disappears after a while, and it keeps coming back.
[0077] Doctor: Will the symptoms subside on their own within 24 hours?
[0078] Patient: Yes
[0079] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned consultation dialogue, the above-mentioned consultation dialogue can also be stored in a blockchain node.
[0080] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0081] Step S202: extracting feature words from the medical consultation dialogue using the trained first feature extraction model to obtain target feature words in each sentence of the medical consultation dialogue.
[0082] Specifically, a trained first feature extraction model is deployed in the server, and the server extracts feature words from the medical consultation dialogue by calling the trained first feature extraction model. The above target feature words can be important words in each sentence of the medical consultation dialogue. For example, in the medical consultation dialogue "The baby has many red bumps on his buttocks", buttocks and red bumps are important words in the medical consultation dialogue. Therefore, the trained first feature extraction model will output the two words buttocks and red bumps as target feature words.
[0083] When the server obtains the conversation text generated during the consultation process, it will call the first feature extraction model, and input the consultation dialogue in the conversation text into the first feature extraction model in time sequence in units of sentences for processing. The first feature extraction model will output the important words in each sentence of the consultation dialogue as the target feature words.
[0084] More specifically, each sentence of the medical consultation dialogue in the dialogue text is encoded with a word vector, and the encoded word vector of each medical consultation dialogue is input into the first feature extraction model for feature extraction to extract important words in each medical consultation dialogue.
[0085] Step S203, extracting feature sentences from all the consultation dialogues during the consultation process through the trained second feature extraction model to obtain target feature sentences during the consultation process.
[0086] Specifically, a trained second feature extraction model is deployed in the server, and the server extracts feature sentences from the dialogue text by calling the trained second feature extraction model. The above target feature sentences can be important sentences in the consultation process. For example, in the dialogue text, the consultation dialogue "The baby's buttocks have many red bumps" is an important sentence, and the trained second feature extraction model will output "The baby's buttocks have many red bumps" as the target feature sentence.
[0087] The second feature extraction model can be constructed based on the time series model, so that the second feature extraction model can ensure that the semantics are well transmitted along the time series of the medical consultation dialogue.
[0088] Step S204: Differentiate and mark the target feature words and the target feature sentences in the dialogue text, and display them as auxiliary diagnosis information of the consultation process.
[0089] Specifically, the target feature words and target feature sentences can be differentially identified based on the dialogue text, so as to obtain auxiliary diagnosis information of the consultation process. Since the target feature words and target feature sentences are differentially identified, important words and important sentences can be easily captured and paid attention to by doctors.
[0090] In this embodiment, after obtaining the dialogue text generated during the medical consultation process, the feature words of the medical consultation dialogue are extracted through the trained first feature extraction model to obtain the feature words in each sentence in each medical consultation dialogue; the feature sentences of the dialogue text are extracted through the trained second feature extraction model to obtain the feature sentences in the medical consultation process; the feature words and feature sentences in the medical consultation process are formed into auxiliary diagnosis information for the doctor to view. When the doctor diagnoses the patient, the doctor can focus on the feature words and feature sentences in the auxiliary diagnosis information by viewing the auxiliary diagnosis information, which is intuitive and will not be missed. The auxiliary diagnosis information can reduce the doctor's misdiagnosis rate.
[0091] For further information, please refer to Figure 3 , Figure 3 A flowchart of another embodiment of the auxiliary diagnosis method based on the medical consultation session according to the present application is shown. Before obtaining the dialogue text generated during the medical consultation process, the auxiliary diagnosis method based on the medical consultation session further includes:
[0092] Step S301, constructing a first feature extraction model and a second feature extraction model.
[0093] Specifically, the server constructs a first feature extraction model and a second feature extraction model, and the first feature extraction model may be a feature extraction model constructed based on a neural network.
[0094] More specifically, the first feature extraction model may include a word segmentation module, a word vector module, and a first feature extraction module. The first feature extraction model inputs a medical consultation conversation s. The word segmentation module can segment the medical consultation conversation s to obtain a word segmentation sequence {w1, w2, ..., wn}. The word vector module can encode the word segmentation sequence {w1, w2, ..., wn} into a word vector to obtain a word vector {E1, E2, ..., En} of the medical consultation conversation s. The first feature extraction module is used to extract feature words from the word vector {E1, E2, ..., En} to obtain target feature words.
[0095] In a possible embodiment, the first feature extraction model may also include a first output module and a second output module. After the first feature extraction module extracts feature words from the word vector {E1, E2, …, En}, target feature words are obtained. The target feature words can be output through the first output module, and the word vector {E1, E2, …, En} is output to the second feature extraction model through the second output module.
[0096] The second feature extraction model may be a feature extraction model constructed based on a time series model.
[0097] More specifically, the input of the second feature extraction model is the dialogue text, and the second feature extraction model may include a word segmentation module, a word vector module, and a second feature extraction module, wherein the word segmentation module and the word vector module in the second feature extraction model may be the same as the word segmentation module and the word vector module in the first feature extraction model. The second feature extraction module is used to extract feature sentences to obtain target feature sentences in the dialogue text.
[0098] In a possible embodiment, the second feature extraction model shares a word segmentation module and a word vector module with the first feature extraction model, and the first feature extraction model outputs the word vector vs to the second feature extraction model through the second output module. At this time, the second feature extraction model inputs a word vector sequence corresponding to the conversation text. For example, if there are m sentences of medical consultation in the conversation text, there are m word vectors, and the word vector sequence corresponding to the conversation text is {s1, s2, ..., sm}, where the above word vector sequence can also be called a text vector.
[0099] In a possible embodiment, the second feature extraction model may further include a prediction module, a third output module and a fourth output module, wherein the prediction module is used to predict the diagnosis result and can predict the disease diagnosis result corresponding to the current dialogue text. The third output module is used to output the target feature sentence, and the fourth output module is used to output the disease diagnosis result.
[0100] Step S302: pre-train the first feature extraction model using the first medical data to obtain a pre-trained first feature extraction model.
[0101] Specifically, after constructing the first feature extraction model, the server can pre-train the first feature extraction model through the first medical data. The first medical data can be medical corpus, which can be obtained by sorting out corpus channels such as Baidu Encyclopedia, medical papers, medical journals, and medical articles.
[0102] More specifically, symptom words corresponding to various disease diagnoses can be sorted out from the first medical data as feature words, the feature words in each sentence of the corpus can be annotated, the unannotated corpus can be input into the first feature extraction model for processing, the error between the extracted feature words and the annotated feature words in the corpus can be calculated, and the error between the extracted feature words and the annotated feature words in the corpus can be obtained. With the goal of minimizing the error between the extracted feature words and the annotated feature words in the corpus, the first feature extraction model is iteratively trained until a predetermined number of times is reached or the error between the extracted feature words and the annotated feature words in the corpus is minimized, then a trained first feature extraction model is obtained.
[0103] It should be noted that after the prediction training, the first feature extraction model has become a model that can be used independently and can be directly used to extract feature words in the medical consultation dialogue.
[0104] Step S303, taking the disease diagnosis cross entropy loss as the optimization target, jointly training the pre-trained first feature extraction model and the second feature extraction model through the second medical data.
[0105] Specifically, after constructing the second feature extraction model, the server connects the pre-trained first feature extraction model with the second feature extraction model, and then jointly trains the pre-trained first feature extraction model and the second feature extraction model through the second medical data. The second medical data may be a medical corpus, which may be obtained by collating corpus channels such as Baidu Encyclopedia, medical papers, medical journals, and medical articles.
[0106] In this embodiment, after constructing a first pre-training task based on word mask prediction and a second pre-training task based on context sentence prediction, the first feature extraction model can be pre-trained according to the first pre-training task and the second pre-training task, so that the first feature extraction model and the second feature extraction model can be better fitted in the joint training stage.
[0107] Furthermore, the pre-trained first feature extraction model and the second feature extraction model can be connected to obtain a connected model. The connected model is trained by the second medical data, and during the training process, the parameters in the pre-trained first feature extraction model and the second feature extraction model are adjusted by back propagation of the disease diagnosis cross entropy loss. After the connected model is trained to convergence or reaches a preset number of iterations, a trained first feature extraction model and a trained second feature extraction model are obtained.
[0108] Specifically, the hidden layer output of the pre-trained first feature extraction model may be connected to the input of the second feature extraction model.
[0109] In a possible embodiment, the first feature extraction model includes a word segmentation module, a word vector module, a first feature extraction module, a first output module, and a second output module. The word vector module can perform word vector encoding on the word segmentation sequence {w1, w2, ..., wn} to obtain the word vector {E1, E2, ..., En} of the consultation session s, and input the word vector {E1, E2, ..., En} into the first feature extraction module and the second output module. The first feature extraction module is used to extract feature words from the word vector {E1, E2, ..., En} to obtain target feature words, and output them through the first output module. The first feature extraction model is connected to the second feature extraction model through the second output module.
[0110] More specifically, the second feature extraction model includes a prediction module, a third output module, and a fourth output module, which can sort out sample texts corresponding to various disease diagnoses from the second medical data, label each sample text with a disease diagnosis, input the unlabeled sample text into the second feature extraction model for processing, output the extracted feature sentences through the third output module, predict the sample text through the prediction module, and output the predicted result of the disease diagnosis through the fourth module. The disease diagnosis cross entropy loss can be shown as follows:
[0111]
[0112] Among them, p(x i ) is the label of the disease diagnosis, that is, the true value, q(x i ) is the prediction result of disease diagnosis, that is, the predicted value, H(p,q) is the cross entropy loss of disease diagnosis, and the smaller the cross entropy loss H(p,q) of disease diagnosis is, the more accurate the prediction result of disease diagnosis is.
[0113] In a possible embodiment, the second feature extraction model can also be pre-trained using the second medical data to obtain a pre-trained second feature extraction model. Specifically, sentences corresponding to various disease diagnoses can be sorted out from the second medical data as feature sentences, the feature sentences in the sample text can be annotated, the unannotated sample text can be input into the second feature extraction model for processing, the error between the extracted feature sentences and the annotated feature sentences in the sample text can be calculated, and the error between the extracted feature sentences and the annotated feature sentences in the sample text can be obtained. With the goal of minimizing the error between the extracted feature sentences and the annotated feature sentences in the sample text, the second feature extraction model is iteratively trained until a predetermined number of times is reached or the error between the extracted feature sentences and the annotated feature sentences in the sample text is minimized, thereby obtaining a trained second feature extraction model.
[0114] The pre-trained first feature extraction model and the pre-trained second feature extraction model are jointly trained to obtain the joint training model, and then the joint training model is trained with new sample texts, and the cross entropy loss of disease diagnosis is used as the optimization target for this training. The new sample text refers to the sample text that is not used for the second feature extraction model.
[0115] Of course, it is not necessary to pre-train the second feature extraction model. When performing joint training with the disease diagnosis cross entropy loss as the optimization target, it is sufficient to increase the error optimization between the extracted feature sentences output by the third output module and the feature sentences marked in the sample text.
[0116] It should be noted that the errors between the extracted feature words and the feature words marked in the corpus, as well as the errors between the extracted feature sentences and the feature sentences marked in the sample text, these two error forms can adopt cross entropy loss, mean square error loss, logarithmic loss, etc.
[0117] In this embodiment, the pre-trained first feature extraction model and the second feature extraction model are jointly trained. Since the parameters of the first feature extraction model only need to be fine-tuned, the second feature extraction model is easier to fit during the training process, thereby improving the training speed.
[0118] For further information, please continue to refer to Figure 4 , Figure 4 A flowchart of an embodiment of a method for pre-training a first feature extraction model according to the present application is shown. The steps of pre-training the first feature extraction model using first medical data to obtain the pre-trained first feature extraction model include:
[0119] Step S3021, constructing a first pre-training task based on word mask prediction according to the first medical data.
[0120] Specifically, symptom words corresponding to various disease diagnoses can be extracted from the first medical data as feature words, and the feature words in each sentence of the corpus can be annotated.
[0121] The first pre-training task based on word mask prediction can be understood as masking the words in the corpus so that some words in the corpus are masked, and then inputting the masked corpus into the first feature extraction model so that the first feature extraction model still outputs the correct feature words, and the correct feature words are the feature words marked in the corresponding corpus.
[0122] Furthermore, the random mask block can be used to perform random word masking on the initial sentence sample in the first medical data to obtain a masked sample sentence. The masked words in the masked sample sentence are predicted by word masking to obtain a predicted result sentence. The first error loss between the predicted result sentence and the initial sentence sample is calculated. The first pre-training task is constructed with the goal of minimizing the first error loss.
[0123] For example, the corpus is "baby has many red bumps on his butt", which becomes "baby has many ■ bumps on his butt" after masking. The first pre-training task is to correctly predict "baby has many red bumps on his butt" when the input is "baby has many ■ bumps on his butt".
[0124] Furthermore, the random mask block can be used to perform random word masking on the initial sentence sample in the first medical data to obtain a masked sample sentence. The masked words in the masked sample sentence are predicted by word masking to obtain a predicted result word. The error loss between the predicted result word and the feature word in the initial sentence sample is calculated. The first pre-training task is constructed with the goal of minimizing the error loss.
[0125] For example, the corpus is "baby has many red bumps on his butt", which becomes "baby has many ■ bumps on his butt" after masking. The first pre-training task is to correctly extract the feature word "red bumps" when the input is "baby has many ■ bumps on his butt".
[0126] In this embodiment, random word masking is performed on the initial sentence samples in the first medical data through a random mask block, and word masking prediction is performed on the masked words in the masked sample sentences. After the predicted result sentences are obtained, the first pre-training task can extract feature words for incomplete sentences, thereby increasing the robustness of the first feature extraction network in the case of wrong words or missing words.
[0127] Step S3022: construct a second pre-training task based on context sentence prediction according to the first medical data.
[0128] Specifically, contexts corresponding to various disease diagnoses can be extracted and sorted out from the first medical data, and the correct contexts are marked as positive sample sentence pairs, and the incorrect contexts are marked as negative sample sentence pairs. For example, "Mountains and rivers are so steep that it seems there is no way out" is a sample sentence, and its positive sample sentence pair is "Mountains and rivers are so steep that it seems there is no way out, but when you look up, you will see another village", and its negative sample sentence can be "Mountains and rivers are so steep that it seems there is no way out, but in front of the dead tree, thousands of trees are in bloom".
[0129] The second pre-training task based on context prediction can be understood as follows: for a sample sentence, there are correct next sentences and incorrect next sentences. The sample sentence and the corresponding correct next sentence can form a positive sample sentence pair, and the sample sentence and the incorrect next sentence can form a negative sample sentence pair. When the positive sample sentence pair is input into the first feature extraction model, the output is correct. When the negative sample sentence pair is input into the first feature extraction model, the output is incorrect.
[0130] Furthermore, the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample can be used as the upper sentence, and the lower sentence can be randomly matched for the initial sentence sample to form a sample sentence pair; the upper and lower sentences of the sample sentence pair are predicted to obtain a prediction result; the second error loss between the prediction result and the correct sample sentence pair is calculated, and the correct sample sentence pair includes the initial sentence sample and the corresponding correct lower sentence; and a second pre-training task is constructed with the goal of minimizing the second error loss.
[0131] For example, the second pre-training task is to output correct input when the sentence “After many twists and turns, there seems to be no way out, but when the dark clouds turn, there is another village”, and to output incorrect input when the sentence “After many twists and turns, there seems to be no way out, but when the dead tree turns into bloom, there is another village”.
[0132] In a possible embodiment, the sample sentences in the sample sentence pair may also be word masked. In this case, the second pre-training task is to output correct when the input is "The mountains are so high that there seems to be no way out, but when the willows are dark and the flowers are bright, there is another village"; and to output wrong when the input is "The mountains are so high that there seems to be no way out, but when the dead tree is in front of it, thousands of trees are in bloom".
[0133] In this embodiment, the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample is used as the upper sentence, and the lower sentence is randomly matched to the initial sentence sample to form a sample sentence pair. The sample sentence pair is used to predict right or wrong, so that the second pre-training task can extract feature sentences for the context of incorrect semantics, further increasing the robustness of the first feature extraction network in the case of incorrect sentences.
[0134] Step S3023: pre-training the first feature extraction model based on the first pre-training task and the second preset training task.
[0135] Specifically, the first pre-training task and the second preset training task can be performed separately or alternately. When performing word masking on the sample sentences in the sample sentence pair, the first pre-training task and the second preset training task can be performed simultaneously.
[0136] In this embodiment, after constructing a first pre-training task based on word mask prediction and a second pre-training task based on context sentence prediction, the first feature extraction model can be pre-trained according to the first pre-training task and the second pre-training task, so that the first feature extraction model and the second feature extraction model can be better fitted in the joint training stage.
[0137] For further information, please continue to refer to Figure 5 , Figure 5 A flowchart of an embodiment of a method for displaying a medical consultation process according to the present application is shown. The step of differentially marking target feature words and target feature sentences in the dialogue text includes:
[0138] Step S2041: Visually express the target feature word through the first visualization element.
[0139] Specifically, the first visualization element can be determined according to the confidence of the target feature word, wherein the confidence of the target feature word is obtained by outputting the first feature extraction model. Visualizing the target feature word can be understood as rendering the target feature word through the first visualization element based on the dialogue text, so that the target feature word can be highlighted and more attractive to the doctor.
[0140] The first feature extraction model will output the triple information of the target feature word. The triple information includes the target feature word, the position of the target feature word in the sentence, and the confidence. For example, the first target feature word in "The baby's buttocks have many red bumps" is "buttocks", and the positions of the first target feature word in the sentence are 3 and 4. The confidence indicates the probability that "buttocks" is the first target feature word. The higher the confidence, the greater the probability that "buttocks" is the first target feature word, which means that the word "buttocks" is more important. The second target feature word in "The baby's buttocks have many red bumps" is "red bumps", and the positions of the first target feature word in the sentence are 8, 9, and 10. The confidence indicates the probability that "red bumps" is the second target feature word. The higher the confidence, the greater the probability that "red bumps" is the second target feature word, which means that the word "red bumps" is more important.
[0141] The first visualization element can be color. For example, the greater the confidence corresponding to "butt", the more prominent the font color of "butt". Taking the dialogue text with black background and white text as an example, the first visualization element is red. The greater the confidence corresponding to "butt", the redder the font color of "butt".
[0142] The first visualization element may also be size. For example, the greater the confidence level corresponding to “butt”, the larger the font size of “butt”.
[0143] Of course, the first visual element may also be a combination of color and size.
[0144] Step S2042: Visually express the target feature sentence through a second visualization element.
[0145] Specifically, the second visualization element can be different from the first visualization element. For example, when the first visualization element is color, the second visualization element can be size; when the first visualization element is size, the second visualization element can be color; when the first visualization element is a combination of color and size, the second visualization element can be an additional graphic or a combination of an additional graphic with color and size. The additional graphic can be a bar chart or pie chart before the medical consultation dialogue. The longer the bar chart, the more important the medical consultation dialogue is; the larger the proportion of the pie chart, the more important the medical consultation dialogue is.
[0146] Specifically, the second visualization element can be determined according to the weight of the target feature sentence, wherein the weight of the target feature sentence is obtained by outputting the second feature extraction model. The second feature extraction module can be determined according to the second feature extraction module in the second feature extraction model, and the second feature extraction module is used to extract feature sentences to obtain the target feature sentence in the dialogue text. The second feature extraction module outputs a triplet of information through the third output module, and the triplet of information includes the target feature sentence, the position of the target feature sentence in the dialogue text, and the weight of the target feature sentence. The weight of the target feature sentence can be the confidence of the target feature sentence.
[0147] In a possible embodiment, in the above-mentioned second feature extraction model, the second feature extraction module may be a feature extraction module of an attention mechanism, which weights each sentence of the medical consultation dialogue in the dialogue text through the attention mechanism to obtain the weight corresponding to each sentence of the medical consultation dialogue.
[0148] Based on the dialogue text, visual expression of the target feature sentence can be understood as rendering or adding graphics to the target feature sentence through a second visual element, so that the target feature sentence can be highlighted and more attractive to the doctor.
[0149] Step S2043: Visually express the consultation process through a third visualization element.
[0150] Specifically, the third visualization element can be determined according to the time sequence of the medical consultation dialogue in the dialogue text. The third visualization element can be understood as the display of the dialogue text, in which each sentence of the medical consultation dialogue is arranged in a corresponding time sequence. Of course, in some possible embodiments, the third visualization element can also be determined according to the importance of the medical consultation dialogue in the dialogue text, for example, the medical consultation dialogue with the highest importance is placed at the front. The importance of the medical consultation dialogue can be obtained by adding the confidence of the target feature word and the weight of the medical consultation dialogue.
[0151] In a possible embodiment, the predicted result of the disease diagnosis of the dialogue text can also be visualized through the fourth visualization element, and the predicted result of the disease diagnosis can be output through the fourth output module in the second feature extraction model. Specifically, for the dialogue text, a binary information can be output, and the binary information includes the predicted result of the disease diagnosis and the corresponding confidence, such as: "Dermatitis: 36.16%", where dermatitis is the predicted result of the disease diagnosis, and 36.16% is the confidence of dermatitis. The predicted result of the disease diagnosis can be multiple, such as "Dermatitis: 36.16%", "Rash: 28.12%", "Eczema: 19.07%", "Papular urticaria: 8.35%", "Urticaria: 1.38%", etc.
[0152] In this embodiment, when a patient visits an Internet hospital for treatment, the patient and the doctor have a dialogue and communication. The system first collects the patient's medical information through the dialogue between the doctor and the patient, and then the system uses the auxiliary diagnosis model to diagnose the patient's suspected disease based on the collected medical information, and assists the doctor in making a disease judgment when consulting the patient, wherein the auxiliary diagnosis model includes a first feature extraction model and a second feature extraction model. In addition, the auxiliary diagnosis model can provide strong evidence for the current diagnosis made, and give which sentences and keywords in the dialogue between the doctor and the patient are used to give the current diagnosis, so that the doctor can make a judgment. Through this auxiliary diagnosis system, the quality and efficiency of medical services can be effectively improved. By visualizing the target feature words and target feature sentences, it will better assist doctors in making judgments, rather than giving a black box diagnosis result so that the doctor does not know what the result is based on.
[0153] This application can be applied in the field of smart cities to promote the construction of smart cities. For example, this application can be applied in the field of smart medical care, such as digital medical care, Internet hospitals and other application fields involving medical consultation.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0155] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0156] Further references Figure 6 , as a response to the above Figure 2 The present application provides an embodiment of an auxiliary diagnosis device based on a medical consultation session. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0157] like Figure 6 As shown, the auxiliary diagnosis device 600 based on the medical consultation session described in this embodiment includes: an acquisition module 601, a first extraction module 602, a second extraction module 603 and a display module 604, wherein:
[0158] The acquisition module 601 is used to acquire the dialogue text generated during the consultation process, and the dialogue text includes the consultation dialogue between the doctor and the patient.
[0159] The first extraction module 602 is used to extract feature words from the medical consultation dialogue using the trained first feature extraction model to obtain target feature words in each sentence of the medical consultation dialogue.
[0160] The second extraction module 603 is used to extract feature sentences from the dialogue text through the trained second feature extraction model to obtain target feature sentences in the consultation process.
[0161] The display module 604 is used to differentiate the target feature words and target feature sentences in the dialogue text and display them as auxiliary diagnosis information in the consultation process.
[0162] In this embodiment, after obtaining the dialogue text generated during the medical consultation process, the feature words of the medical consultation dialogue are extracted through the trained first feature extraction model to obtain the feature words in each sentence in each medical consultation dialogue; the feature sentences of the dialogue text are extracted through the trained second feature extraction model to obtain the feature sentences in the medical consultation process; the feature words and feature sentences in the medical consultation process are formed into auxiliary diagnosis information for the doctor to view. When the doctor diagnoses the patient, the doctor can focus on the feature words and feature sentences in the auxiliary diagnosis information by viewing the auxiliary diagnosis information, which is intuitive and will not be missed. The auxiliary diagnosis information can reduce the doctor's misdiagnosis rate.
[0163] In some optional implementations of this embodiment, the auxiliary diagnosis device 600 based on the consultation session further includes a construction module, a pre-training module and a joint training module, wherein:
[0164] The construction module is used to construct a first feature extraction model and a second feature extraction model.
[0165] The pre-training module is used to pre-train the first feature extraction model using first medical data to obtain a pre-trained first feature extraction model.
[0166] The joint training module is used to jointly train the pre-trained first feature extraction model and the second feature extraction model through the second medical data with the disease diagnosis cross entropy loss as the optimization target.
[0167] In this embodiment, by pre-training the first feature extraction model, the first feature extraction model and the second feature extraction model can be better fitted in the joint training stage.
[0168] In some optional implementations of this embodiment, the pre-training module includes: a first construction sub-module, a second construction sub-module and a pre-training sub-module, wherein:
[0169] The first construction submodule is used to construct a first pre-training task based on word mask prediction according to the first medical data.
[0170] The second construction submodule is used to construct a second pre-training task based on context sentence prediction according to the first medical data.
[0171] The pre-training submodule is used to pre-train the first feature extraction model based on the first pre-training task and the second preset training task.
[0172] In this embodiment, after constructing a first pre-training task based on word mask prediction and a second pre-training task based on context sentence prediction, the first feature extraction model can be pre-trained according to the first pre-training task and the second pre-training task, so that the first feature extraction model and the second feature extraction model can be better fitted in the joint training stage.
[0173] In some optional implementations of this embodiment, the first construction submodule includes: a mask unit, a first prediction unit, a first calculation unit, and a first construction unit, wherein:
[0174] The masking unit is used to perform random word masking on the initial sentence sample in the first medical data through a random masking block to obtain a masked sample sentence.
[0175] The first prediction unit is used to perform word mask prediction on masked words in the masked sample sentence to obtain a prediction result sentence.
[0176] The first calculation unit is used to calculate a first error loss between the prediction result sentence and the initial sentence sample.
[0177] The first construction unit is used to construct a first pre-training task with the goal of minimizing a first error loss.
[0178] In this embodiment, random word masking is performed on the initial sentence samples in the first medical data through a random mask block, and word masking prediction is performed on the masked words in the masked sample sentences. After the predicted result sentences are obtained, the first pre-training task can extract feature words for incomplete sentences, thereby increasing the robustness of the first feature extraction network in the case of wrong words or missing words.
[0179] In some optional implementations of this embodiment, the second construction submodule includes: a pairing unit, a second prediction unit, a second calculation unit, and a second construction unit, wherein:
[0180] The pairing unit is used to take the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample as the upper sentence, and randomly match the lower sentence for the initial sentence sample to form a sample sentence pair.
[0181] The second prediction unit is used to predict the upper and lower sentences of the sample sentence pair to obtain a prediction result.
[0182] The second calculation unit is used to calculate a second error loss between the prediction result and a correct sample sentence pair, where the correct sample sentence pair includes an initial sentence sample and a corresponding correct next sentence.
[0183] The second construction unit is used to construct a second pre-training task with the goal of minimizing the second error loss.
[0184] In this embodiment, the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample is used as the upper sentence, and the lower sentence is randomly matched to the initial sentence sample to form a sample sentence pair. The sample sentence pair is used to predict right or wrong, so that the second pre-training task can extract feature sentences for the context of incorrect semantics, further increasing the robustness of the first feature extraction network in the case of incorrect sentences.
[0185] In some optional implementations of this embodiment, the joint training module includes: a connection submodule, a joint training submodule and an iteration submodule, wherein:
[0186] A connection submodule, used to connect the pre-trained first feature extraction model with the second feature extraction model to obtain a connected model;
[0187] A joint training submodule, used for training the connected model through the second medical data, and during the training process, adjusting the parameters in the pre-trained first feature extraction model and the second feature extraction model through the back propagation of the disease diagnosis cross entropy loss;
[0188] The iterative submodule is used to train the connected model until convergence or reaching a preset number of iterations, thereby obtaining a trained first feature extraction model and a trained second feature extraction model.
[0189] In this embodiment, the pre-trained first feature extraction model and the second feature extraction model are jointly trained. Since the parameters of the first feature extraction model only need to be fine-tuned, the second feature extraction model is easier to fit during the training process, thereby improving the training speed.
[0190] In some optional implementations of this embodiment, the display module 604 includes: an entity recognition unit, a question screening unit, and a similarity calculation unit, wherein:
[0191] a first visualization submodule, configured to visualize the target feature word through a first visualization element, wherein the first visualization element is determined according to the confidence of the target feature word, wherein the confidence of the target feature word is obtained through the output of the first feature extraction model;
[0192] A second visualization submodule is used to visualize the target feature sentence through a second visualization element, and the second deification element is determined according to the weight of the target feature sentence, wherein the weight of the target feature sentence is obtained through the output of the second feature extraction model;
[0193] The third visualization submodule is used to visualize the medical consultation process through a third visualization element, and the third visualization element is determined according to the time sequence of the medical consultation dialogue in the dialogue text.
[0194] In this embodiment, by visualizing the target feature words and target feature sentences, doctors can be better assisted in making judgments, rather than providing a diagnosis result in a black box manner so that the doctor does not know the basis for the result.
[0195] To solve the above technical problems, the present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.
[0196] The computer device 7 includes a memory 71, a processor 72, and a network interface 73 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 7 with components 71-73, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0197] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0198] The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 71 can be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 can also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 7. Of course, the memory 71 can also include both the internal storage unit of the computer device 7 and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the computer device 7, such as computer-readable instructions of the auxiliary diagnosis method based on the consultation session, etc. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or are to be output.
[0199] The processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 72 is generally used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is used to run the computer-readable instructions stored in the memory 71 or process data, such as computer-readable instructions for running the auxiliary diagnosis method based on the consultation session.
[0200] The network interface 73 may include a wireless network interface or a wired network interface. The network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.
[0201] The computer device provided in this embodiment can execute the steps of the auxiliary diagnosis method based on the above-mentioned medical consultation session. The steps of the auxiliary diagnosis method based on the medical consultation session here can be the steps of the auxiliary diagnosis method based on the medical consultation session in the above-mentioned various embodiments.
[0202] In this embodiment, after obtaining the dialogue text generated during the medical consultation process, the feature words of the medical consultation dialogue are extracted through the trained first feature extraction model to obtain the feature words in each sentence in each medical consultation dialogue; the feature sentences of the dialogue text are extracted through the trained second feature extraction model to obtain the feature sentences in the medical consultation process; the feature words and feature sentences in the medical consultation process are formed into auxiliary diagnosis information for the doctor to view. When the doctor diagnoses the patient, the doctor can focus on the feature words and feature sentences in the auxiliary diagnosis information by viewing the auxiliary diagnosis information, which is intuitive and will not be missed. The auxiliary diagnosis information can reduce the doctor's misdiagnosis rate.
[0203] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the auxiliary diagnosis method based on the consultation session as described above.
[0204] In this embodiment, after obtaining the matching sentence pairs and candidate sentences, the matching sentence pairs are used as positive samples, the entities in the candidate sentences are identified and deleted to obtain entity-free sentences, and the candidate sentences and their corresponding entity-free sentences are used as negative samples. When training the initial sentence matching model, when faced with two sentences with high similarity but negative samples of each other, entity information can be captured based on the attention mechanism, which strengthens the importance of entities in sentences during sentence matching and improves the matching accuracy of the sentence matching model obtained after training; when the user question is input into the sentence matching model, the inventory sentence matching the user question can be accurately determined from the question and answer library, and the answer information corresponding to the inventory sentence can be displayed, thereby improving the accuracy of information retrieval.
[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0206] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. An auxiliary diagnosis method based on a medical questioning session, characterized in that: The steps include: Acquire a conversation text generated during the consultation process, wherein the conversation text includes a consultation conversation between a doctor and a patient; Extracting feature words from the medical consultation dialogue using the trained first feature extraction model to obtain target feature words in each sentence of the medical consultation dialogue; Extracting feature sentences from the conversation text using a trained second feature extraction model to obtain target feature sentences in the medical consultation process; wherein the second feature extraction model is constructed based on a time series model; Differentiating and marking the target characteristic words and the target characteristic sentences in the dialogue text, and displaying them as auxiliary diagnosis information of the consultation process; Before obtaining the dialogue text generated during the consultation process, the method further includes: Constructing a first feature extraction model and a second feature extraction model; Pre-training the first feature extraction model using first medical data to obtain a pre-trained first feature extraction model; Sentences corresponding to various disease diagnoses are sorted out from the second medical data as feature sentences, the feature sentences in the sample text are annotated, the unannotated sample text is input into the second feature extraction model for processing, the error between the extracted feature sentences and the annotated feature sentences in the sample text is calculated to obtain the error between the extracted feature sentences and the annotated feature sentences in the sample text, and the second feature extraction model is iteratively trained with the goal of minimizing the error between the extracted feature sentences and the annotated feature sentences in the sample text until a predetermined number of times is reached or the error between the extracted feature sentences and the annotated feature sentences in the sample text is minimized, thereby obtaining a pre-trained second feature extraction model; Connecting the pre-trained first feature extraction model with the pre-trained second feature extraction model to obtain a connected model; Training the connected model through the second medical data, and during the training process, adjusting the parameters in the pre-trained first feature extraction model and the pre-trained second feature extraction model through back propagation of disease diagnosis cross entropy loss; After training the connected model until convergence or reaching a preset number of iterations, the trained first feature extraction model and the trained second feature extraction model are obtained; The step of differentially marking the target feature words and the target feature sentences in the dialogue text includes: Visually expressing the target feature word through a first visualization element, wherein the first visualization element is determined according to the confidence of the target feature word, wherein the confidence of the target feature word is obtained through the output of the first feature extraction model; Visually expressing the target feature sentence through a second visualization element, wherein the second visualization element is determined according to a weight of the target feature sentence, wherein the weight of the target feature sentence is obtained through the output of the second feature extraction model; The consultation process is visualized by a third visualization element, and the third visualization element is determined according to the time sequence of the consultation dialogue generated during the consultation process.
2. The auxiliary diagnosis method based on the medical questioning session according to claim 1, characterized in that: The step of pre-training the first feature extraction model by using the first medical data to obtain the pre-trained first feature extraction model comprises: Constructing a first pre-training task based on word mask prediction according to the first medical data; constructing a second pre-training task based on context sentence prediction according to the first medical data; and Based on the first pre-training task and the second pre-training task, the first feature extraction model is pre-trained.
3. The auxiliary diagnosis method based on the medical questioning session according to claim 2, characterized in that: The step of constructing a first pre-training task based on word mask prediction according to the first medical data comprises: Performing random word masking on the initial sentence sample in the first medical data by using a random mask block to obtain a masked sample sentence; Performing word mask prediction on masked words in the masked sample sentence to obtain a prediction result sentence; Calculating a first error loss between the prediction result sentence and the initial sentence sample; The first pre-training task is constructed with the goal of minimizing the first error loss.
4. The auxiliary diagnosis method based on the medical questioning session according to claim 3 is characterized in that: The step of constructing a second pre-training task based on context sentence prediction according to the first medical data comprises: Taking the initial sentence sample as the upper sentence, randomly matching the lower sentence for the initial sentence sample to form a sample sentence pair; Predicting the upper and lower sentences of the sample sentence pair to obtain a prediction result; Calculating a second error loss between the prediction result and a correct sample sentence pair, wherein the correct sample sentence pair includes an initial sentence sample and a corresponding correct next sentence; The second pre-training task is constructed with the goal of minimizing the second error loss.
5. An auxiliary diagnosis device based on a medical questioning session, characterized in that: include: An acquisition module, used to acquire a dialogue text generated during the consultation process, wherein the dialogue text includes the consultation dialogue between the doctor and the patient; A first extraction module is used to extract feature words from the medical consultation dialogue using a trained first feature extraction model to obtain target feature words in each sentence of the medical consultation dialogue; A second extraction module is used to extract feature sentences from the conversation text through a trained second feature extraction model to obtain target feature sentences in the medical consultation process; wherein the second feature extraction model is constructed based on a time series model; A display module, used to differentiate and mark the target characteristic words and the target characteristic sentences in the dialogue text, and display them as auxiliary diagnosis information of the consultation process; The auxiliary diagnosis device based on the medical consultation session further includes a construction module, a pre-training module and a joint training module, wherein: A construction module, used to construct a first feature extraction model and a second feature extraction model; A pre-training module, used to pre-train the first feature extraction model through the first medical data to obtain the pre-trained first feature extraction model; sort out sentences corresponding to various disease diagnoses from the second medical data as feature sentences, annotate the feature sentences in the sample text, input the unannotated sample text into the second feature extraction model for processing, calculate the error between the extracted feature sentences and the annotated feature sentences in the sample text, obtain the error between the extracted feature sentences and the annotated feature sentences in the sample text, and iteratively train the second feature extraction model with the goal of minimizing the error between the extracted feature sentences and the annotated feature sentences in the sample text until a predetermined number of times is reached or the error between the extracted feature sentences and the annotated feature sentences in the sample text is minimized, thereby obtaining the pre-trained second feature extraction model; A joint training module is used to connect the pre-trained first feature extraction model with the pre-trained second feature extraction model to obtain a connected model; train the connected model through the second medical data, and during the training process, adjust the parameters of the pre-trained first feature extraction model and the pre-trained second feature extraction model through the back propagation of the disease diagnosis cross entropy loss; after training the connected model until convergence or reaching a preset number of iterations, the trained first feature extraction model and the trained second feature extraction model are obtained; The display module includes: a first visualization submodule, configured to visualize the target feature word through a first visualization element, wherein the first visualization element is determined according to the confidence of the target feature word, wherein the confidence of the target feature word is obtained by outputting the first feature extraction model; A second visualization submodule, configured to visualize the target feature sentence through a second visualization element, wherein the second visualization element is determined according to a weight of the target feature sentence, wherein the weight of the target feature sentence is obtained through the output of the second feature extraction model; The third visualization submodule is used to visualize the medical consultation process through a third visualization element, and the third visualization element is determined according to the time sequence of the medical consultation dialogue generated during the medical consultation process.
6. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the auxiliary diagnosis method based on medical consultation session as described in any one of claims 1 to 4 when executing the computer-readable instructions.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the auxiliary diagnosis method based on the medical consultation session as described in any one of claims 1 to 4 are implemented.
