CN113707299A - Auxiliary diagnosis method and device based on inquiry session and computer equipment - Google Patents

Auxiliary diagnosis method and device based on inquiry session and computer equipment Download PDF

Info

Publication number
CN113707299A
CN113707299A CN202110997039.5A CN202110997039A CN113707299A CN 113707299 A CN113707299 A CN 113707299A CN 202110997039 A CN202110997039 A CN 202110997039A CN 113707299 A CN113707299 A CN 113707299A
Authority
CN
China
Prior art keywords
feature extraction
extraction model
feature
inquiry
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110997039.5A
Other languages
Chinese (zh)
Inventor
姚海申
孙行智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110997039.5A priority Critical patent/CN113707299A/en
Publication of CN113707299A publication Critical patent/CN113707299A/en
Priority to PCT/CN2022/071881 priority patent/WO2023024422A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Abstract

The embodiment of the application belongs to the field of artificial intelligence and digital medical treatment, is applied to the field of intelligent medical treatment, and relates to an auxiliary diagnosis method, a device, computer equipment and a storage medium based on an inquiry session, wherein the method comprises the steps of obtaining a dialog text generated in an inquiry process, wherein the dialog text comprises an inquiry session between a doctor and a patient; extracting feature words of the inquiry dialogue through the trained first feature extraction model to obtain target feature words in each inquiry dialogue; extracting feature sentences from the dialogue text through the trained second feature extraction model to obtain target feature sentences in the inquiry process; and carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialogue text, and displaying the target characteristic words and the target characteristic sentences as auxiliary diagnosis information in the inquiry process. In addition, the application also relates to a block chain technology, and the dialog text can be stored in the block chain. The doctor misdiagnosis rate can be reduced through the auxiliary diagnosis information.

Description

Auxiliary diagnosis method and device based on inquiry session and computer equipment
Technical Field
The present application relates to the field of artificial intelligence technology and the field of digital medical technology, and in particular, to a method and an apparatus for assisting diagnosis based on an inquiry session, a computer device, and a storage medium.
Background
With the great improvement of computing power and data volume, artificial intelligence technology is further developed, and the application of artificial intelligence to solve the problems in the medical field becomes a hotspot. In the medical field, doctors generally make an inquiry about patients and infer the patients' condition based on the inquiry.
The method is limited by the expression condition of the patient and a long-time inquiry dialogue, and the keywords can be captured for the description of the patient in the inquiry process only by the highly concentrated spirit of the doctor, so that even if the keywords are missed, the missing of the diagnosis information is caused, and the misdiagnosis rate is high.
Disclosure of Invention
The embodiment of the application aims to provide an auxiliary diagnosis method, an auxiliary diagnosis device, a computer device and a storage medium based on an inquiry session so as to solve the problem of high misdiagnosis rate.
In order to solve the above technical problems, an embodiment of the present application provides an auxiliary diagnosis method based on an inquiry session, which adopts the following technical solutions:
acquiring a dialog text generated in an inquiry process, wherein the dialog text comprises an inquiry dialog between a doctor and a patient;
extracting feature words of the inquiry dialogue through a trained first feature extraction model to obtain target feature words in each inquiry dialogue;
extracting feature sentences of the dialogue text through a trained second feature extraction model to obtain target feature sentences in the inquiry process;
and carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialogue text, and displaying the target characteristic words and the target characteristic sentences as auxiliary diagnosis information of the inquiry process.
Further, before the obtaining of the dialog text generated during the inquiry process, the method further comprises:
constructing a first feature extraction model and a second feature extraction model;
pre-training the first feature extraction model through first medical data to obtain a pre-trained first feature extraction model;
and performing joint training on the pre-trained first feature extraction model and the second feature extraction model through second medical data by taking the cross entropy loss of disease diagnosis as an optimization target.
Further, the pre-training the first feature extraction model through the first medical data to obtain a pre-trained first feature extraction model includes:
constructing a first pre-training task based on word mask prediction according to the first medical data; and
constructing a second pre-training task based on up-down statement prediction according to the first medical data;
and pre-training the first feature extraction model based on the first pre-training task and the second pre-training task.
Further, the step of constructing a first pre-training task based on word mask prediction according to the first medical data includes:
carrying out random word masking on an initial statement sample in the first medical data through a random masking block to obtain a masking sample statement;
performing word mask prediction on the masked words in the mask sample statement to obtain a prediction result statement;
calculating a first error loss between the prediction result statement and the initial statement sample;
constructing the first pre-training task with a goal of minimizing a first error loss.
Further, the step of constructing a second pre-training task based on context prediction according to the first medical data includes:
taking the initial statement sample or a mask sample statement corresponding to the initial statement sample as an upper statement, and randomly matching a lower statement for the initial statement sample to form a sample statement pair;
performing up-down statement prediction on the sample statement pair to obtain a prediction result;
calculating a second error loss between the prediction result and a correct sample statement pair, the correct sample statement pair comprising an initial statement sample and a corresponding correct next statement;
constructing the second pre-training task with a goal of minimizing a second error loss.
Further, the step of jointly training the pre-trained first feature extraction model and the second feature extraction model through second medical data with the cross entropy loss of disease diagnosis as an optimization target comprises:
connecting the pre-trained first feature extraction model with the second feature extraction model to obtain a connected model;
training the connected model through second medical data, and adjusting parameters in the pre-trained first feature extraction model and the second feature extraction model through back propagation of cross entropy loss of disease diagnosis in the training process;
and training the connected models to converge or reach a preset iteration number to obtain the trained first feature extraction model and the trained second feature extraction model.
Further, the step of identifying the target feature words and the target feature sentences in the dialog text in a differentiation manner includes:
performing visual expression on the target feature word through a first visual element, wherein the first visual element is determined according to the confidence coefficient of the target feature word, and the confidence coefficient 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 visual element, wherein the second visual element is determined according to the weight of the target feature sentence, and the weight of the target feature sentence is obtained through the output of the second feature extraction model;
and visually expressing the inquiry process through a third visual element, wherein the third visual element is determined according to the time sequence of the inquiry dialogue in the dialogue text.
In order to solve the above technical problem, an embodiment of the present application further provides an auxiliary diagnosis device based on an inquiry session, which adopts the following technical solutions:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a dialogue text generated in an inquiry process, and the dialogue text comprises an inquiry dialogue between a doctor and a patient;
the first extraction module is used for extracting the feature words of the inquiry dialogue through a trained first feature extraction model to obtain target feature words in each inquiry dialogue;
the second extraction module is used for extracting the feature sentences of the dialogue text through a trained second feature extraction model to obtain target feature sentences in the inquiry process;
and the display module is used for carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialogue text and displaying the target characteristic words and the target characteristic sentences as auxiliary diagnosis information of the inquiry process.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method for assisting diagnosis based on an inquiry session when executing the computer program.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the method for assisting diagnosis based on an inquiry session.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: after a dialogue text generated in an inquiry process is obtained, extracting feature words of the inquiry dialogue through a trained first feature extraction model to obtain the feature words of each sentence in each inquiry dialogue; extracting feature sentences from the dialogue text through the trained second feature extraction model to obtain feature sentences in the inquiry process; the characteristic words and the characteristic sentences in the inquiry process form auxiliary diagnosis information for a doctor to check, when the doctor diagnoses a patient, the doctor can focus on the characteristic words and the characteristic sentences in the auxiliary diagnosis information by checking the auxiliary diagnosis information, so that the doctor can visually observe the characteristic words and the characteristic sentences without missing, and the misdiagnosis rate of the doctor can be reduced by the auxiliary diagnosis information.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an assisted diagnosis method based on an interrogation session according to the present application;
FIG. 3 is a flow diagram of another embodiment of an assisted diagnosis method based on an interrogation session according to the application;
FIG. 4 is a flowchart of one embodiment of step S302 in FIG. 3;
FIG. 5 is a flow diagram for one embodiment of step S204 in FIG. 2;
FIG. 6 is a schematic diagram of an embodiment of an auxiliary diagnostic device based on an interrogation session according to the application;
FIG. 7 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen 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, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the method for assisting diagnosis based on an inquiry session provided in the embodiments of the present application is generally executed by a server, and accordingly, an apparatus for assisting diagnosis based on an inquiry session is generally disposed in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of an assisted diagnosis method based on an interrogation session in accordance with the present application is shown. The auxiliary diagnosis method based on the inquiry session comprises the following steps:
step S201, a dialog text generated in the inquiry process is obtained.
In this embodiment, an electronic device (e.g., a server shown in fig. 1) on which the auxiliary diagnosis method based on the inquiry session operates may communicate with the terminal through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
Specifically, the server obtains a dialog text generated during the inquiry process. The above-mentioned inquiry process can be an off-line inquiry process, and also can be an on-line inquiry process.
In the on-line inquiry process, a doctor and a patient can carry out inquiry communication on the spot, the dialogue between the doctor and the patient in the inquiry process can be collected through the voice pickup device, the collected dialogue is uploaded to the server, and the dialogue between the doctor and the patient is subjected to text conversion through the voice recognition technology deployed on the server to obtain the corresponding inquiry dialogue.
In the on-line inquiry process, a doctor and a patient can perform inquiry communication through a chat window or internet voice, the server can acquire the content of the chat window or the internet voice in real time or at regular time, or the doctor uploads the content of the chat window or the internet voice to the server after the inquiry communication is completed.
One dialog text may correspond to one inquiry process, and it is understood that one dialog text may include one or more than one inquiry dialog, and the inquiry dialog may be composed of a dialog between a doctor and a patient, or may be composed of a self-statement of the patient.
Specifically, during the on-line inquiry process, the doctor can communicate with the patient through the doctor terminal, the patient can communicate with the doctor through the patient terminal, and during the communication between the doctor and the patient, a corresponding dialog text can be generated. By way of example, the dialog text may be as follows:
the patients: the buttocks of the baby are a lot long
A doctor: your good, i.e. doctor A, who is the XX dermatological family, is happy to serve you for asking for itching
The patients: should have some tickle bar
The patients: how this is
A doctor: how long these symptoms appear
A doctor: seemingly severe
The patients: one week bar
The patients: it is suddenly grown up and faded away in a while, and is always repeated
A doctor: does it resolve within twenty-four hours
The patients: is
It is emphasized that to further ensure privacy and security of the inquiry sessions, the inquiry sessions may also be stored in nodes of a blockchain.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Step S202, extracting the feature words of the inquiry dialogue through the trained first feature extraction model to obtain the target feature words in each inquiry dialogue.
Specifically, a trained first feature extraction model is deployed in the server, and the server performs feature word extraction on the inquiry dialogue by calling the trained first feature extraction model. The target feature words may be important words in each sentence inquiry dialogue. For example, in the inquiry dialogue "the baby has a lot of red pimples, the fart and the red pimples are important words in the inquiry dialogue, and therefore the trained first feature extraction model outputs two words of the fart and the red pimples as target feature words.
And when the server acquires a dialogue text generated in the inquiry process, calling a first feature extraction model, inputting the inquiry dialogue in the dialogue text into the first feature extraction model in a sentence unit according to a time sequence for processing, and outputting important words in each inquiry dialogue as target feature words by the first feature extraction model.
More specifically, word vector coding is carried out on each inquiry dialogue in the dialogue text, the obtained word vector of each inquiry dialogue coding is input into the first feature extraction model for feature extraction, and important words in each inquiry dialogue are extracted.
And step S203, extracting the feature sentences of all inquiry dialogues in the inquiry process through the trained second feature extraction model to obtain target feature sentences in the inquiry process.
Specifically, a trained second feature extraction model is deployed in the server, and the server performs feature sentence extraction on the dialog text by calling the trained second feature extraction model. The target feature sentences may be important sentences in the inquiry process. For example, in the dialog text, the inquiry dialog "many rudds on the hip of a baby" is an important sentence, and the trained second feature extraction model outputs "many rudds on the hip of a baby" as a target feature sentence.
The second feature extraction model may be constructed based on a time series model so that the second feature extraction model can keep semantics well propagated along with the time series of the inquiry session.
And step S204, carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialogue text, and displaying the target characteristic words and the target characteristic sentences as auxiliary diagnosis information in the inquiry process.
Specifically, the target feature words and the target feature sentences may be differentially identified on the basis of the dialog text, so as to obtain auxiliary diagnosis information of the inquiry process. Because the target characteristic words and the target characteristic sentences are identified in a differentiation mode, the important words and the important sentences can be easily captured and attended by doctors.
In the embodiment, after a dialogue text generated in an inquiry process is obtained, feature words of an inquiry dialogue are extracted through a trained first feature extraction model, so that feature words of each sentence in each inquiry dialogue are obtained; extracting feature sentences from the dialogue text through the trained second feature extraction model to obtain feature sentences in the inquiry process; the characteristic words and the characteristic sentences in the inquiry process form auxiliary diagnosis information for a doctor to check, when the doctor diagnoses a patient, the doctor can focus on the characteristic words and the characteristic sentences in the auxiliary diagnosis information by checking the auxiliary diagnosis information, so that the doctor can visually observe the characteristic words and the characteristic sentences without missing, and the misdiagnosis rate of the doctor can be reduced by the auxiliary diagnosis information.
Further, with continued reference to fig. 3, fig. 3 shows a flow chart of another embodiment of an assisted diagnosis method based on an interrogation session according to the present application. Before obtaining the dialog text generated in the inquiry process, the auxiliary diagnosis method based on the inquiry session further comprises the following steps:
step S301, a first feature extraction model and a second feature extraction model are constructed.
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.
More specifically, the first feature extraction model may include a word segmentation module, a word vector module, and a first feature extraction module, where the first feature extraction model inputs a sentence inquiry session s, the inquiry session s may be segmented by the word segmentation module to obtain a segmentation sequence { w1, w2, …, wn }, and the word vector module may perform word vector encoding on the segmentation sequence { w1, w2, …, wn }, to obtain a word vector { E1, E2, …, En }, of the inquiry session s. The first feature extraction module is used for extracting feature words from the word vectors { E1, E2, …, En } to obtain target feature words.
In a possible embodiment, the first feature extraction model may further include a first output module and a second output module, after the first feature extraction module performs feature word extraction on the word vector { E1, E2, …, En }, a target feature word is obtained, the target feature word may be output through the first output module, and the word vector { E1, E2, …, En } is output into the second feature extraction model through the second output module.
The second feature extraction model may be a feature extraction model constructed based on a time series model.
More specifically, the input of the second feature extraction model is a dialog text, and the second feature extraction model may include a word segmentation module, a word vector module, and a second feature extraction module, where 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 for extracting feature sentences to obtain target feature sentences in the dialog text.
In a possible embodiment, the second feature extraction model and the first feature extraction model share a word segmentation module and a word vector module, and the first feature extraction model outputs the word vector vs to the second feature extraction model through the second output module. In this case, the second feature extraction model inputs a word vector sequence corresponding to the dialog text, for example, if there are m query sessions in the dialog text, there are m word vectors, and the word vector sequence corresponding to the dialog text is { s1, s2, …, sm }, where the word vector sequence may also be referred to as a text vector.
In a possible embodiment, the second feature extraction model may further include a prediction module, a third output module, and a fourth output module, where the prediction module is configured to predict a diagnosis result, and may predict a disease diagnosis result corresponding to the current dialog text. The third output module is used for outputting the target characteristic sentences, and the fourth output module is used for outputting the disease diagnosis result.
Step S302, pre-training the first feature extraction model through the first medical data to obtain a pre-trained first feature extraction model.
Specifically, after the server constructs the first feature extraction model, the server may pre-train the first feature extraction model through the first medical data. The first medical data may be medical corpus, and the first medical data may be obtained by sorting according to corpus channels such as Baidu encyclopedia, medical treatises, medical magazines, medical articles, and the like.
More specifically, symptom words corresponding to various disease diagnoses can be sorted out from the first medical data to be used as feature words, the feature words in each sentence of linguistic data are labeled, the linguistic data which are not labeled are input into the first feature extraction model to be processed, error calculation is carried out on the extracted feature words and the feature words labeled in the linguistic data to obtain errors between the extracted feature words and the feature words labeled in the linguistic data, the first feature extraction model is subjected to iterative training with the goal of minimizing the errors between the extracted feature words and the feature words labeled in the linguistic data, and the trained first feature extraction model is obtained until the preset times are reached or the errors between the extracted feature words and the feature words labeled in the linguistic data are minimized.
It should be noted that the first feature extraction model is a model that can be used alone after prediction training, and can be directly used for extracting feature words in an inquiry dialogue.
And step S303, performing combined training on the pre-trained first feature extraction model and the pre-trained second feature extraction model through second medical data by taking the cross entropy loss of disease diagnosis as an optimization target.
Specifically, after the second feature extraction model is constructed, the server connects the pre-trained first feature extraction model with the second feature extraction model, and then performs joint training on the pre-trained first feature extraction model and the second feature extraction model through the second medical data. The second medical data may be medical corpus, and the second medical data may be obtained by sorting according to corpus channels such as Baidu encyclopedia, medical treatises, medical magazines, medical articles, and the like.
In this embodiment, after the first pre-training task based on word mask prediction and the second pre-training task based on up-down statement prediction are constructed, the first feature extraction model may 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 may be better fitted in the joint training stage.
Further, the pre-trained first feature extraction model and the second feature extraction model can be connected to obtain a connected model. And training the connected models through second medical data, and adjusting parameters in the pre-trained first feature extraction model and the pre-trained second feature extraction model through back propagation of cross entropy loss of disease diagnosis in the training process. And training the connected models to be convergent or reach a preset times of overlapping to obtain a trained first feature extraction model and a trained second feature extraction model.
Specifically, the hidden layer output of the pre-trained first feature extraction model may be connected to the second feature extraction model input.
In one 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 may perform word vector encoding on the word segmentation sequence { w1, w2, …, wn } to obtain a word vector { E1, E2, …, En } of the inquiry session s, and input the word vector { E1, E2, …, En } into the first feature extraction module and the second output module, where the first feature extraction module is configured to perform feature word extraction on the word vector { E1, E2, …, En } to obtain a target feature word, and output the target feature word through the first output module. The first feature extraction model is connected with the second feature extraction model through the second output module.
More specifically, the second feature extraction model includes a prediction module, a third output module, and a fourth output module, and may sort out sample texts corresponding to various disease diagnoses from the second medical data, label-. Disease diagnosis cross-entropy loss can be shown by the following equation:
Figure BDA0003234468460000121
wherein, p (x)i) The signature for the diagnosis of a disease, i.e. the true value, q (x)i) The smaller the cross entropy loss H (p, q) of the disease diagnosis is, the more accurate the prediction result of the disease diagnosis is represented.
In a possible embodiment, the second feature extraction model may also be pre-trained with the second medical data, resulting in a pre-trained second feature extraction model. Specifically, sentences corresponding to diagnosis of various diseases can be sorted out from the second medical data to be used as feature sentences, the feature sentences in the sample texts are labeled, unlabeled sample texts are input into the second feature extraction model to be processed, error calculation is performed on the extracted feature sentences and the feature sentences labeled in the sample texts to obtain errors between the extracted feature sentences and the feature sentences labeled in the sample texts, iterative training is performed on the second feature extraction model with the goal of minimizing the errors between the extracted feature sentences and the feature sentences labeled in the sample texts, and the trained second feature extraction model is obtained until a preset number of times is reached or the errors between the extracted feature sentences and the feature sentences labeled in the sample texts are minimized.
And performing joint training on the pre-trained first feature extraction model and the pre-trained second feature extraction model to obtain a joint training model, and then training the joint training model by using a new sample text, wherein the training is performed by taking the cross entropy loss of disease diagnosis as an optimization target. The new sample text refers to sample text that is not used for the second feature extraction model.
Of course, the second feature extraction model does not need to be pre-trained, and when the cross entropy loss of disease diagnosis is taken as an optimization target to perform combined training, the error optimization between the extracted feature sentences output by the third output module and the feature sentences labeled in the sample text is added.
It should be noted that, the two error forms of the error between the extracted feature word and the feature word labeled in the corpus and the error between the extracted feature sentence and the feature sentence labeled in the sample text may be cross entropy loss, or mean square error loss, logarithm loss, and the like.
In this embodiment, the first feature extraction model and the second feature extraction model that are pre-trained are jointly trained, and parameters of the first feature extraction model only need to be finely adjusted, so that the second feature extraction model is easier to fit in the training process, and the training speed is increased.
Further, with continuing reference to FIG. 4, FIG. 4 illustrates a flow diagram of one embodiment of a method for pre-training a first feature extraction model according to the present application. The pre-training of the first feature extraction model by the first medical data to obtain a pre-trained first feature extraction model comprises:
step S3021, constructing a first pre-training task based on word mask prediction according to the first medical data.
Specifically, the symptom words corresponding to various disease diagnoses can be extracted from the first medical data and sorted out as feature words, and the feature words in each sentence corpus can be labeled.
The first pre-training task based on word mask prediction can be understood as that words and phrases in the corpus are subjected to mask so that some words and phrases in the corpus are covered, and then the corpus after mask is input into the first feature extraction model so that the first feature extraction model still outputs correct feature words, wherein the correct feature words are feature words marked in the corresponding corpus.
Further, the initial statement sample in the first medical data may be subjected to random word masking through the random masking block, so as to obtain a masked sample statement. And performing word mask prediction on the masked words in the mask sample statement to obtain a prediction result statement. A first error loss between the prediction result statement and the initial statement sample is calculated. A first pre-training task is constructed with the goal of minimizing the first error loss.
For example, the linguistic data is "many red pimples of the buttocks of the baby", and after being masked, the linguistic data is "many ■ pimples of the buttocks of the baby". The first pre-training task is to correctly predict the ' large red pimples of the buttocks of the baby ' under the condition of inputting ' large red pimples of the buttocks of the baby ' ■ pimples '.
Furthermore, the initial sentence sample in the first medical data may be subjected to random word masking by the random masking block, resulting in a masked sample sentence. And performing word mask prediction on the masked words in the mask sample statement to obtain a prediction result word. And calculating the error loss between the prediction result words and the feature words in the initial sentence samples. A first pre-training task is constructed with the goal of minimizing the error loss.
For example, the linguistic data is "many red pimples of the buttocks of the baby", and after being masked, the linguistic data is "many ■ pimples of the buttocks of the baby". The first pre-training task is to correctly extract the characteristic word "red pimple" when the input "many farts of babies ■ pimples".
In the embodiment, the random word mask is performed on the initial sentence sample in the first medical data through the random mask block, and the word mask prediction is performed on the masked words in the mask sample sentence, so that after the prediction result sentence is obtained, the first pre-training task can perform feature word extraction on the incomplete sentence, and the robustness of the first feature extraction network under the conditions of word errors and word omissions is improved.
And step S3022, constructing a second pre-training task based on up-down statement prediction according to the first medical data.
Specifically, upper and lower sentences corresponding to diagnosis of various diseases can be extracted and sorted from the first medical data, and the correct upper and lower sentences are labeled as positive sample sentence pairs, and the incorrect upper and lower sentences are labeled as negative sample sentence pairs. Such as: the ' mountain repeated water doubtful and unquestionable ' is used as a sample statement, the positive sample statement is ' mountain repeated water doubtful and unquestionable, and Liuhenming is yet village ', and the negative sample statement can be ' mountain repeated water doubtful and unquestionable, and forepart of the diseased tree ' Wanmuchun '.
The second pre-training task based on the upper and lower sentence prediction can be understood that, for a sample sentence, a correct lower sentence and an incorrect lower sentence exist, the sample sentence and the corresponding correct lower sentence can form a positive sample sentence pair, the sample sentence and the incorrect lower sentence can form a negative sample sentence pair, the positive sample sentence pair is input into the first feature extraction model, and then the output is correct, and the negative sample sentence pair is input into the first feature extraction model, and then the output is incorrect.
Further, the initial statement sample or the mask sample statement corresponding to the initial statement sample can be used as an upper statement, and a lower statement is randomly matched with the initial statement sample to form a sample statement pair; carrying out up-down statement prediction on the sample statement pair to obtain a prediction result; calculating a second error loss between the prediction result and a correct sample statement pair, wherein the correct sample statement pair comprises an initial statement sample and a corresponding correct next statement; and constructing a second pre-training task with the aim of minimizing the second error loss.
For example, the second pre-training task is to input "mountain torrent is doubtful and no way is found, and Liuhenming is in village" to output correct, and input "mountain torrent is doubtful and no way is found, and Wanmuchun is the head of the diseased tree" to output error.
In one possible embodiment, word masking may also be performed on sample statements in the sample statement pair. At this time, the second pre-training task is to output a correct output when "mountain weight ■ doubtful and unmistakable road, and output an incorrect output when" mountain weight ■ ■ doubtful and unmistakable road, and forepart of diseased tree, all-wood spring "are input.
In the embodiment, the initial statement sample or the mask sample statement corresponding to the initial statement sample is used as the upper statement, the lower statement is randomly matched with the initial statement sample to form a sample statement pair, and the sample statement pair is used for carrying out right-wrong prediction, so that the second pre-training task can carry out feature statement extraction on the context with incorrect semantics, and the robustness of the first feature extraction network under the condition of wrong statements is further improved.
Step S3023, pre-training the first feature extraction model based on the first pre-training task and the second pre-training task.
Specifically, the first pre-training task and the second pre-training task may be performed separately or alternately. When performing word masking on a sample statement in the sample statement pair, the first pre-training task and the second pre-training task may be performed simultaneously.
In this embodiment, after the first pre-training task based on word mask prediction and the second pre-training task based on up-down statement prediction are constructed, the first feature extraction model may 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 may be better fitted in the joint training stage.
Further, with continuing reference to fig. 5, fig. 5 illustrates a flow chart demonstrating one embodiment of an interrogation process method according to the present application. The step of carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialog text comprises the following steps:
step S2041, performing visual expression on the target characteristic words through the first visual elements.
Specifically, the first visualization element may be determined according to a confidence level of the target feature word, where the confidence level of the target feature word is obtained through the output of the first feature extraction model. The target feature words are visually expressed, namely the target feature words are rendered through the first visual element on the basis of the dialog text, so that the target feature words can be highlighted and can attract the attention of doctors better.
The first feature extraction model outputs triple information of the target feature words, the triple information comprises the target feature words, positions of the target feature words in the sentence and confidence degrees, for example, the first target feature word in the sentence, which is a lot of red pimples with long buttocks of a baby, is a "buttocks", the positions of the first target feature words in the sentence are 3 and 4, the confidence degrees indicate that the "buttocks" is the probability of the first target feature word, and the higher the confidence degree is, the higher the probability that the "buttocks" is the first target feature word is, the more important the word "buttocks" is. The second target feature word in the ' baby's farrow with many red pimples ' is ' red pimples ', the positions of the first target feature word in the sentence are 8, 9 and 10, the confidence coefficient indicates that the ' red pimples ' are the probability of the second target feature word, the higher the confidence coefficient is, the higher the probability that the ' red pimples ' are the second target feature word is, and the more important the word ' red pimples ' is.
For example, the font color of "buttocks" is more prominent when the confidence degree of the "buttocks" is higher, and the font color of the "buttocks" is more red when the first visualization element is red for example in the dialog text with white text under black background and the confidence degree of the "buttocks" is higher.
The first visualization element may also be a size, such as the larger the confidence that "buttocks" corresponds, the larger the font size of "buttocks".
Of course, the first visualization element may also be a combination of color and size.
Step S2042, visually expressing the target feature sentence through the second visual element.
In particular, the second visual element may be different from the first visual element, for example, when the first visual element is a color, the second visual element may be a size; when the first visual element is a size, the second visual element may be a color; when the first visual element is a combination of color and size, the second visual element may be an additional graphic or a combination of an additional graphic and color and size, the additional graphic is, for example, a bar chart, a pie chart or the like is added before the inquiry dialogue, the longer the bar chart, the more important the inquiry dialogue, and the larger the pie chart proportion, the more important the inquiry dialogue.
Specifically, the second visualization element may be determined according to a weight of the target feature sentence, where the weight of the target feature sentence is obtained through the output of the second feature extraction model. The determination may be performed according to a second feature extraction module in the second feature extraction model, where the second feature extraction module is configured to extract the feature sentences to obtain the target feature sentences in the dialog text. The second feature extraction module outputs a triple information through the third output module, wherein the triple information comprises a target feature sentence, the position of the target feature sentence in the dialog text and the weight of the target feature sentence. Wherein the weight of the target feature sentence may be a confidence of the target feature sentence.
In a possible embodiment, in the second feature extraction model, the second feature extraction module may be a feature extraction module of an attention mechanism, and weights each inquiry dialogue in the dialogue text through the attention mechanism to obtain a weight corresponding to each inquiry dialogue.
On the basis of the dialog text, the target characteristic sentence is visually expressed, namely, the target characteristic sentence is rendered or added with a graph through the second visual element, so that the target characteristic sentence can be highlighted and can attract the attention of a doctor better.
And step S2043, performing visual expression on the inquiry process through a third visual element.
Specifically, the third visual element may be determined according to the timing of the inquiry dialog in the dialog text. The third visualization element can be understood as a presentation of a dialog text in which each inquiry dialog is arranged in a corresponding time sequence. Of course, in some possible embodiments, the third visualization element may also be determined according to the importance of the inquiry dialog in the dialog text, for example, the inquiry dialog with the highest importance is ranked first. The importance degree of the inquiry dialogue can be obtained by adding the confidence degree of the target feature words and the weight of the inquiry dialogue.
In a possible embodiment, the prediction result of the disease diagnosis of the dialog text can be also visually expressed through a fourth visualization element, and the prediction result of the disease diagnosis can be output through a fourth output module in the second feature extraction model. Specifically, for the dialog text, a binary information may be output, and the binary information includes the prediction result of the disease diagnosis and the corresponding confidence level, such as: "dermatitis: 36.16% ", where dermatitis is the predicted outcome of the disease diagnosis, and 36.16% is the confidence of dermatitis. The predicted outcome of disease diagnosis may be multiple, such as "dermatitis: 36.16% "," rash: 28.12% "," eczema: 19.07% "," papular urticaria: 8.35% "," urticaria: 1.38% ", etc.
In this embodiment, when a patient visits a doctor in an internet hospital, the patient and the doctor perform dialogue communication, the system first collects inquiry information of the patient through dialogue between the doctor and the patient, then the system performs suspected disease diagnosis on the patient through an auxiliary diagnosis model on the collected inquiry information, and assists the doctor in determining a disease when the doctor visits the patient, where the auxiliary diagnosis model includes a first feature extraction model and a second feature extraction model. In addition, the aided diagnosis model can provide strong evidence for the current diagnosis made, which is given according to which sentences and keywords of the doctor dialogue with the patient for the doctor to judge. Through the auxiliary diagnosis system, the quality and the efficiency of medical service can be effectively improved. By visualizing the target feature words and the target feature sentences, the judgment of a doctor is better assisted, and the doctor does not know what the result is based on because the black box type diagnostic result is given.
The method and the device can be applied to the field of smart cities, and accordingly construction of the smart cities is promoted. For example, the present application can be applied to various application fields related to medical inquiry, such as digital medical treatment and internet hospitals in the field of smart medical treatment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 6, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an auxiliary diagnosis apparatus based on an inquiry session, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
As shown in fig. 6, the auxiliary diagnosis apparatus 600 based on the inquiry session according to the present embodiment includes: an obtaining module 601, a first extracting module 602, a second extracting module 603, and a displaying module 604, wherein:
the obtaining module 601 is configured to obtain a dialog text generated in an inquiry process, where the dialog text includes an inquiry dialog between a doctor and a patient.
The first extraction module 602 is configured to perform feature word extraction on the inquiry dialog through the trained first feature extraction model, so as to obtain a target feature word in each inquiry dialog.
And the second extraction module 603 is configured to perform feature sentence extraction on the dialog text through the trained second feature extraction model to obtain a target feature sentence in the inquiry process.
The display module 604 is configured to perform differentiation identification on the target feature words and the target feature sentences in the dialog text, and display the differentiation identification as auxiliary diagnosis information in the inquiry process.
In the embodiment, after a dialogue text generated in an inquiry process is obtained, feature words of an inquiry dialogue are extracted through a trained first feature extraction model, so that feature words of each sentence in each inquiry dialogue are obtained; extracting feature sentences from the dialogue text through the trained second feature extraction model to obtain feature sentences in the inquiry process; the characteristic words and the characteristic sentences in the inquiry process form auxiliary diagnosis information for a doctor to check, when the doctor diagnoses a patient, the doctor can focus on the characteristic words and the characteristic sentences in the auxiliary diagnosis information by checking the auxiliary diagnosis information, so that the doctor can visually observe the characteristic words and the characteristic sentences without missing, and the misdiagnosis rate of the doctor can be reduced by the auxiliary diagnosis information.
In some optional implementations of the present embodiment, the auxiliary diagnosis device 600 based on an inquiry session further includes a construction module, a pre-training module, and a joint training module, wherein:
and the building module is used for building the first feature extraction model and the second feature extraction model.
And the pre-training module is used for pre-training the first feature extraction model through first medical data to obtain a pre-trained first feature extraction model.
And the joint training module is used for performing joint training on the pre-trained first feature extraction model and the second feature extraction model through second medical data by taking the cross entropy loss of disease diagnosis as an optimization target.
In this embodiment, the first feature extraction model and the second feature extraction model can be better fitted in the joint training stage by pre-training the first feature extraction model.
In some optional implementations of this embodiment, the pre-training module includes: a first building submodule, a second building submodule, and a pre-training submodule, wherein:
and the first construction sub-module is used for constructing a first pre-training task based on word mask prediction according to the first medical data.
And the second construction submodule is used for constructing a second pre-training task based on up-down statement prediction according to the first medical data.
And the pre-training sub-module is used for pre-training the first feature extraction model based on the first pre-training task and the second pre-training task.
In this embodiment, after the first pre-training task based on word mask prediction and the second pre-training task based on up-down statement prediction are constructed, the first feature extraction model may 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 may be better fitted in the joint training stage.
In some optional implementations of this embodiment, the first building submodule includes: mask unit, first prediction unit, first computational unit and first unit of constructing, wherein:
and the mask unit is used for carrying out random word mask on the initial statement sample in the first medical data through the random mask block to obtain a mask sample statement.
And the first prediction unit is used for carrying out word mask prediction on the masked words in the mask sample statement to obtain a prediction result statement.
A first calculation unit for calculating a first error loss between the prediction result statement and the initial statement sample.
A first construction unit for constructing a first pre-training task with the goal of minimizing a first error loss.
In the embodiment, the random word mask is performed on the initial sentence sample in the first medical data through the random mask block, and the word mask prediction is performed on the masked words in the mask sample sentence, so that after the prediction result sentence is obtained, the first pre-training task can perform feature word extraction on the incomplete sentence, and the robustness of the first feature extraction network under the conditions of word errors and word omissions is improved.
In some optional implementations of this embodiment, the second building submodule includes: a pairing unit, a second prediction unit, a second calculation unit, and a second construction unit, wherein:
and the matching unit is used for taking the initial statement sample or the mask sample statement corresponding to the initial statement sample as an upper statement, matching a lower statement for the initial statement sample randomly and forming a sample statement pair.
And the second prediction unit is used for performing up-down statement prediction on the sample statement pair to obtain a prediction result.
A second calculation unit for calculating a second error loss between the prediction result and a correct sample sentence pair, the correct sample sentence pair comprising the initial sentence sample and a corresponding correct next sentence.
And the second construction unit is used for constructing a second pre-training task by taking the minimized second error loss as a target.
In the embodiment, the initial statement sample or the mask sample statement corresponding to the initial statement sample is used as the upper statement, the lower statement is randomly matched with the initial statement sample to form a sample statement pair, and the sample statement pair is used for carrying out right-wrong prediction, so that the second pre-training task can carry out feature statement extraction on the context with incorrect semantics, and the robustness of the first feature extraction network under the condition of wrong statements is further improved.
In some optional implementations of this embodiment, the joint training module includes: a connection sub-module, a joint training sub-module, and an iteration sub-module, wherein:
the connection submodule is used for connecting the pre-trained first feature extraction model with the second feature extraction model to obtain a connected model;
the joint training submodule is used for training the connected models through second medical data and adjusting parameters in the pre-trained first feature extraction model and the pre-trained second feature extraction model through back propagation of cross entropy loss of disease diagnosis in the training process;
and the iteration submodule is used for training the connected models to be convergent or reach the preset iteration times to obtain a trained first feature extraction model and a trained second feature extraction model.
In this embodiment, the first feature extraction model and the second feature extraction model that are pre-trained are jointly trained, and parameters of the first feature extraction model only need to be finely adjusted, so that the second feature extraction model is easier to fit in the training process, and the training speed is increased.
In some optional implementations of this embodiment, the presentation module 604 includes: entity identification unit, question screening unit and similarity calculation unit, wherein:
the first visualization submodule is used for performing visualization expression on the target feature word through a first visualization element, and the first visualization element is determined according to the confidence coefficient of the target feature word, wherein the confidence coefficient of the target feature word is obtained through the output of the first feature extraction model;
the second visualization submodule is used for performing visualization expression on the target feature sentence through a second visualization element, and the second visualization 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;
and the third visualization submodule is used for visually expressing the inquiry process through a third visualization element, and the third visualization element is determined according to the time sequence of the inquiry dialogue in the dialogue text.
In this embodiment, the target feature words and the target feature sentences are visualized, so that the doctor is better assisted in judging, and the doctor does not know what the result is given according to because the black box type diagnosis result is given.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 7, fig. 7 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 7 comprises a memory 71, a processor 72, a network interface 73, which are communicatively connected to each other via a system bus. It is noted that only a computer device 7 having components 71-73 is shown, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 71 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 71 may be an internal storage unit of the computer device 7, such as a hard disk or a memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 7. Of course, the memory 71 may also comprise both an internal storage unit of the computer device 7 and an external storage device thereof. In this embodiment, the memory 71 is generally used for storing an operating system installed on the computer device 7 and various types of application software, such as computer readable instructions of an auxiliary diagnosis method based on an inquiry session. Further, the memory 71 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 72 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 72 is typically used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is configured to execute computer readable instructions or process data stored in the memory 71, for example, execute computer readable instructions of the auxiliary diagnosis method based on the inquiry session.
The network interface 73 may comprise a wireless network interface or a wired network interface, and the network interface 73 is generally used for establishing a communication connection between the computer device 7 and other electronic devices.
The computer device provided in this embodiment may perform the steps of the above-described auxiliary diagnosis method based on an inquiry session. The steps of the auxiliary diagnosis method based on the inquiry session herein may be the steps in the auxiliary diagnosis method based on the inquiry session of each of the above embodiments.
In the embodiment, after a dialogue text generated in an inquiry process is obtained, feature words of an inquiry dialogue are extracted through a trained first feature extraction model, so that feature words of each sentence in each inquiry dialogue are obtained; extracting feature sentences from the dialogue text through the trained second feature extraction model to obtain feature sentences in the inquiry process; the characteristic words and the characteristic sentences in the inquiry process form auxiliary diagnosis information for a doctor to check, when the doctor diagnoses a patient, the doctor can focus on the characteristic words and the characteristic sentences in the auxiliary diagnosis information by checking the auxiliary diagnosis information, so that the doctor can visually observe the characteristic words and the characteristic sentences without missing, and the misdiagnosis rate of the doctor can be reduced by the auxiliary diagnosis information.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the method for assisted diagnosis based on an interrogation session as described above.
In the embodiment, after the matching statement pair and the candidate statement are obtained, the matching statement pair is used as a positive sample, the entity in the candidate statement is identified and deleted to obtain a no-entity statement, the candidate statement and the no-entity statement corresponding to the candidate statement are used as negative samples, when an initial statement matching model is trained, in the face of two sentences which have higher similarity and are negative samples, entity information can be captured based on an attention mechanism, the importance of the entity in the sentence during statement matching is strengthened, and the matching accuracy of the statement matching model obtained after training is improved; inputting the user question into the sentence matching model, the stock sentences matched with the user question can be accurately determined from the question-answer library, and the answer information corresponding to the stock sentences is displayed, so that the accuracy of information retrieval is improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may 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 instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. An auxiliary diagnosis method based on an inquiry session is characterized by comprising the following steps:
acquiring a dialog text generated in an inquiry process, wherein the dialog text comprises an inquiry dialog between a doctor and a patient;
extracting feature words of the inquiry dialogue through a trained first feature extraction model to obtain target feature words in each inquiry dialogue;
extracting feature sentences of the dialogue text through a trained second feature extraction model to obtain target feature sentences in the inquiry process;
and carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialogue text, and displaying the target characteristic words and the target characteristic sentences as auxiliary diagnosis information of the inquiry process.
2. The method for assisting diagnosis based on an inquiry session according to claim 1, wherein before the step of obtaining the dialog text generated in the inquiry process, the method further comprises:
constructing a first feature extraction model and a second feature extraction model;
pre-training the first feature extraction model through first medical data to obtain a pre-trained first feature extraction model;
and performing joint training on the pre-trained first feature extraction model and the second feature extraction model through second medical data by taking the cross entropy loss of disease diagnosis as an optimization target.
3. The method of claim 2, wherein the pre-training of the first feature extraction model with the first medical data to obtain a 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 up-down statement prediction according to the first medical data; and
and pre-training the first feature extraction model based on the first pre-training task and the second pre-training task.
4. The method of claim 3, wherein the step of constructing a first pre-training task based on word mask prediction from the first medical data comprises:
carrying out random word masking on an initial statement sample in the first medical data through a random masking block to obtain a masking sample statement;
performing word mask prediction on the masked words in the mask sample statement to obtain a prediction result statement;
calculating a first error loss between the prediction result statement and the initial statement sample;
constructing the first pre-training task with a goal of minimizing a first error loss.
5. The method of claim 4, wherein the step of constructing a second pre-training task based on context prediction from the first medical data comprises:
taking the initial statement sample or a mask sample statement corresponding to the initial statement sample as an upper statement, and randomly matching a lower statement for the initial statement sample to form a sample statement pair;
performing up-down statement prediction on the sample statement pair to obtain a prediction result;
calculating a second error loss between the prediction result and a correct sample statement pair, the correct sample statement pair comprising an initial statement sample and a corresponding correct next statement;
constructing the second pre-training task with a goal of minimizing a second error loss.
6. The method for aided diagnosis based on an interrogation session according to claim 2, wherein the step of jointly training the pre-trained first feature extraction model and the second feature extraction model by second medical data with the cross entropy loss of disease diagnosis as an optimization goal comprises:
connecting the pre-trained first feature extraction model with the second feature extraction model to obtain a connected model;
training the connected model through second medical data, and adjusting parameters in the pre-trained first feature extraction model and the second feature extraction model through back propagation of cross entropy loss of disease diagnosis in the training process;
and training the connected models to converge or reach a preset iteration number to obtain the trained first feature extraction model and the trained second feature extraction model.
7. The method for assisting diagnosis based on an inquiry session according to claim 6, wherein the step of identifying the target feature words and the target feature sentences in the dialog text in a differentiation manner comprises:
performing visual expression on the target feature word through a first visual element, wherein the first visual element is determined according to the confidence coefficient of the target feature word, and the confidence coefficient 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 visual element, wherein the second visual element is determined according to the weight of the target feature sentence, and the weight of the target feature sentence is obtained through the output of the second feature extraction model;
and visually expressing the inquiry process through a third visual element, wherein the third visual element is determined according to the time sequence of an inquiry dialogue generated in the inquiry process.
8. An auxiliary diagnostic apparatus based on an inquiry session, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a dialogue text generated in an inquiry process, and the dialogue text comprises an inquiry dialogue between a doctor and a patient;
the first extraction module is used for extracting the feature words of the inquiry dialogue through a trained first feature extraction model to obtain target feature words in each inquiry dialogue;
the second extraction module is used for extracting the feature sentences of the dialogue text through a trained second feature extraction model to obtain target feature sentences in the inquiry process;
and the display module is used for carrying out differentiation identification on the target characteristic words and the target characteristic sentences in the dialogue text and displaying the target characteristic words and the target characteristic sentences as auxiliary diagnosis information of the inquiry process.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor that when executed performs the steps of the method of assisted diagnosis based on an interrogation session of any one of claims 1 to 7.
10. A computer readable storage medium having computer readable instructions stored thereon, which when executed by a processor, implement the steps of the method for assisted diagnosis based on an interrogation session according to any one of claims 1 to 7.
CN202110997039.5A 2021-08-27 2021-08-27 Auxiliary diagnosis method and device based on inquiry session and computer equipment Pending CN113707299A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110997039.5A CN113707299A (en) 2021-08-27 2021-08-27 Auxiliary diagnosis method and device based on inquiry session and computer equipment
PCT/CN2022/071881 WO2023024422A1 (en) 2021-08-27 2022-01-13 Consultation session-based auxiliary diagnosis method and apparatus, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110997039.5A CN113707299A (en) 2021-08-27 2021-08-27 Auxiliary diagnosis method and device based on inquiry session and computer equipment

Publications (1)

Publication Number Publication Date
CN113707299A true CN113707299A (en) 2021-11-26

Family

ID=78656144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110997039.5A Pending CN113707299A (en) 2021-08-27 2021-08-27 Auxiliary diagnosis method and device based on inquiry session and computer equipment

Country Status (2)

Country Link
CN (1) CN113707299A (en)
WO (1) WO2023024422A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115083602A (en) * 2022-08-16 2022-09-20 阿里巴巴(中国)有限公司 Mental disease auxiliary diagnosis method, device, equipment, storage medium and system
CN115482926A (en) * 2022-09-20 2022-12-16 浙江大学 Knowledge-driven rare disease visual question-answer type auxiliary differential diagnosis system and method
WO2023024422A1 (en) * 2021-08-27 2023-03-02 平安科技(深圳)有限公司 Consultation session-based auxiliary diagnosis method and apparatus, and computer device
CN116936078A (en) * 2023-07-18 2023-10-24 南京大经中医药信息技术有限公司 Traditional Chinese medicine pre-inquiry collection management system
CN116936078B (en) * 2023-07-18 2024-04-26 南京大经中医药信息技术有限公司 Traditional Chinese medicine pre-inquiry collection management system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116992861B (en) * 2023-09-25 2023-12-08 四川健康久远科技有限公司 Intelligent medical service processing method and system based on data processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818823A (en) * 2017-12-05 2018-03-20 成都法线网络科技有限公司 A kind of artificial intelligence way of inquisition
CN110517767A (en) * 2019-08-27 2019-11-29 北京百度网讯科技有限公司 Aided diagnosis method, device, electronic equipment and storage medium
CN112016319A (en) * 2020-09-08 2020-12-01 平安科技(深圳)有限公司 Pre-training model obtaining method, disease entity labeling method, device and storage medium
CN112395883A (en) * 2021-01-19 2021-02-23 阿里健康科技(杭州)有限公司 Inquiry processing method, inquiry data processing method and device
CN112883180A (en) * 2021-02-24 2021-06-01 挂号网(杭州)科技有限公司 Model training method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11074909B2 (en) * 2019-06-28 2021-07-27 Samsung Electronics Co., Ltd. Device for recognizing speech input from user and operating method thereof
CN111104799B (en) * 2019-10-16 2023-07-21 中国平安人寿保险股份有限公司 Text information characterization method, system, computer equipment and storage medium
CN112307168B (en) * 2020-10-30 2023-11-07 康键信息技术(深圳)有限公司 Artificial intelligence-based inquiry session processing method and device and computer equipment
CN112489790A (en) * 2020-11-30 2021-03-12 北京百度网讯科技有限公司 Key data determination method, device, equipment and storage medium
CN113707299A (en) * 2021-08-27 2021-11-26 平安科技(深圳)有限公司 Auxiliary diagnosis method and device based on inquiry session and computer equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818823A (en) * 2017-12-05 2018-03-20 成都法线网络科技有限公司 A kind of artificial intelligence way of inquisition
CN110517767A (en) * 2019-08-27 2019-11-29 北京百度网讯科技有限公司 Aided diagnosis method, device, electronic equipment and storage medium
CN112016319A (en) * 2020-09-08 2020-12-01 平安科技(深圳)有限公司 Pre-training model obtaining method, disease entity labeling method, device and storage medium
CN112395883A (en) * 2021-01-19 2021-02-23 阿里健康科技(杭州)有限公司 Inquiry processing method, inquiry data processing method and device
CN112883180A (en) * 2021-02-24 2021-06-01 挂号网(杭州)科技有限公司 Model training method and device, electronic equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023024422A1 (en) * 2021-08-27 2023-03-02 平安科技(深圳)有限公司 Consultation session-based auxiliary diagnosis method and apparatus, and computer device
CN115083602A (en) * 2022-08-16 2022-09-20 阿里巴巴(中国)有限公司 Mental disease auxiliary diagnosis method, device, equipment, storage medium and system
CN115482926A (en) * 2022-09-20 2022-12-16 浙江大学 Knowledge-driven rare disease visual question-answer type auxiliary differential diagnosis system and method
CN115482926B (en) * 2022-09-20 2024-04-09 浙江大学 Knowledge-driven rare disease visual question-answer type auxiliary differential diagnosis system and method
CN116936078A (en) * 2023-07-18 2023-10-24 南京大经中医药信息技术有限公司 Traditional Chinese medicine pre-inquiry collection management system
CN116936078B (en) * 2023-07-18 2024-04-26 南京大经中医药信息技术有限公司 Traditional Chinese medicine pre-inquiry collection management system

Also Published As

Publication number Publication date
WO2023024422A1 (en) 2023-03-02

Similar Documents

Publication Publication Date Title
JP7100087B2 (en) How and equipment to output information
US11501182B2 (en) Method and apparatus for generating model
CN111444340B (en) Text classification method, device, equipment and storage medium
EP4060565A1 (en) Method and apparatus for acquiring pre-trained model
WO2022007823A1 (en) Text data processing method and device
CN111680159B (en) Data processing method and device and electronic equipment
CN113707299A (en) Auxiliary diagnosis method and device based on inquiry session and computer equipment
EP3872652B1 (en) Method and apparatus for processing video, electronic device, medium and product
WO2022105118A1 (en) Image-based health status identification method and apparatus, device and storage medium
CN112287069B (en) Information retrieval method and device based on voice semantics and computer equipment
CN112215008A (en) Entity recognition method and device based on semantic understanding, computer equipment and medium
CN113657105A (en) Medical entity extraction method, device, equipment and medium based on vocabulary enhancement
WO2021082086A1 (en) Machine reading method, system, device, and storage medium
CN111695338A (en) Interview content refining method, device, equipment and medium based on artificial intelligence
CN113505601A (en) Positive and negative sample pair construction method and device, computer equipment and storage medium
CN112614559A (en) Medical record text processing method and device, computer equipment and storage medium
CN113420212A (en) Deep feature learning-based recommendation method, device, equipment and storage medium
CN115438149A (en) End-to-end model training method and device, computer equipment and storage medium
CN113627797A (en) Image generation method and device for employee enrollment, computer equipment and storage medium
CN115659987B (en) Multi-mode named entity recognition method, device and equipment based on double channels
US20230070966A1 (en) Method for processing question, electronic device and storage medium
CN112199954B (en) Disease entity matching method and device based on voice semantics and computer equipment
CN113327691B (en) Query method and device based on language model, computer equipment and storage medium
CN113688268B (en) Picture information extraction method, device, computer equipment and storage medium
CN116796709A (en) Text generation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination