WO2023024422A1 - 基于问诊会话的辅助诊断方法、装置及计算机设备 - Google Patents

基于问诊会话的辅助诊断方法、装置及计算机设备 Download PDF

Info

Publication number
WO2023024422A1
WO2023024422A1 PCT/CN2022/071881 CN2022071881W WO2023024422A1 WO 2023024422 A1 WO2023024422 A1 WO 2023024422A1 CN 2022071881 W CN2022071881 W CN 2022071881W WO 2023024422 A1 WO2023024422 A1 WO 2023024422A1
Authority
WO
WIPO (PCT)
Prior art keywords
sentence
feature extraction
extraction model
trained
feature
Prior art date
Application number
PCT/CN2022/071881
Other languages
English (en)
French (fr)
Inventor
姚海申
孙行智
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023024422A1 publication Critical patent/WO2023024422A1/zh

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

Definitions

  • the present application relates to the field of artificial intelligence technology and the field of digital medical care, and in particular to an auxiliary diagnosis method, device, computer equipment and storage medium based on an interrogation session.
  • the doctor needs to be highly concentrated in order to capture the keywords of the patient's description during the interrogation process. Even so, the applicant realizes that there will still be missing keywords , resulting in the omission of diagnostic information, resulting in a high rate of misdiagnosis.
  • the purpose of the embodiment of the present application is to propose an auxiliary diagnosis method, device, computer equipment and storage medium based on an interrogation session, so as to solve the problem of high misdiagnosis rate.
  • the embodiment of the present application provides an auxiliary diagnosis method based on an interrogation session, which adopts the following technical solutions:
  • the dialogue text includes the consultation dialogue between the doctor and the patient;
  • the target characteristic word and the target characteristic sentence are differentially identified in the dialogue text, and displayed as auxiliary diagnostic information in the consultation process.
  • the method also includes:
  • the pre-trained first feature extraction model and the second feature extraction model are jointly trained by using the second medical data.
  • the step of pre-training the first feature extraction model through the first medical data to obtain the pre-trained first feature extraction model includes:
  • the first medical data construct a first pre-training task based on word mask prediction
  • the first feature extraction model is pre-trained.
  • the step of constructing the first pre-training task based on word mask prediction according to the first medical data includes:
  • the first pre-training task is constructed with the goal of minimizing the first error loss.
  • the step of constructing a second pre-training task based on context sentence prediction includes:
  • the second pre-training task is constructed with the goal of minimizing the second error loss.
  • the step of jointly training the pre-trained first feature extraction model and the second feature extraction model by using the second medical data with the cross-entropy loss of disease diagnosis as the optimization goal includes:
  • the connected model is trained with the second medical data, and during the training process, the pre-trained first feature extraction model and the second feature are adjusted through the backpropagation of the disease diagnosis cross-entropy loss Extract the parameters in the model;
  • the trained first feature extraction model and the trained second feature extraction model are obtained.
  • the step of differentially identifying the target feature word and the target feature sentence in the dialogue text includes:
  • the target characteristic word is visually expressed through the first visualization element, and the first visualization element is determined according to the confidence degree of the target characteristic word, wherein the confidence degree of the target characteristic word is extracted through the first feature
  • the model output is obtained;
  • the target feature sentence is visually expressed through a second visualization element, and the second deified element is determined according to the weight of the target feature sentence, wherein the weight of the target feature sentence is passed through the second feature extraction model The output is obtained;
  • the consultation process is visually expressed through a third visualization element, and the third visualization element is determined according to the time sequence of the consultation dialogue in the dialogue text.
  • the embodiment of the present application also provides an auxiliary diagnostic device based on an interrogation session, which adopts the following technical solutions:
  • the obtaining module is used to obtain the dialogue text generated during the consultation process, and the dialogue text includes the consultation dialogue between the doctor and the patient;
  • the first extraction module is used to extract the feature words of the consultation dialogue through the trained first feature extraction model, and obtain the target feature words in each sentence of the consultation dialogue;
  • the second extraction module is used to extract the characteristic sentences of the dialogue text through the trained second feature extraction model, so as to obtain the target characteristic sentences in the consultation process;
  • a display module configured to differentiate the target feature word and the target feature sentence in the dialog text, and display it as auxiliary diagnostic information in the consultation process.
  • the embodiment of the present application also provides a computer device, including a memory and a processor, the memory stores a computer process, and when the processor executes the computer process, the following problem-based The steps of the auxiliary diagnosis method of the diagnosis session:
  • the dialogue text includes the consultation dialogue between the doctor and the patient;
  • the target characteristic word and the target characteristic sentence are differentially identified in the dialogue text, and displayed as auxiliary diagnostic information in the consultation process.
  • the embodiment of the present application also provides a computer-readable storage medium, on which a computer process is stored, and when the computer process is executed by a processor, the following problem-based The steps of the auxiliary diagnosis method of the diagnosis session:
  • the dialogue text includes the consultation dialogue between the doctor and the patient;
  • the target characteristic word and the target characteristic sentence are differentially identified in the dialogue text, and displayed as auxiliary diagnostic information in the consultation process.
  • the embodiment of the present application mainly has the following beneficial effects: after obtaining the dialogue text generated during the consultation process, the trained first feature extraction model is used to extract the feature words of the consultation dialogue, and each consultation dialogue is obtained.
  • the diagnosis information is for the doctor to check.
  • the doctor diagnoses the patient, the doctor can focus on the characteristic words and characteristic sentences in the auxiliary diagnosis information by viewing the auxiliary diagnosis information, which is intuitive and will not be missed. Through the auxiliary diagnosis information, it can reduce Doctor misdiagnosis rate.
  • FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;
  • Fig. 2 is a flow chart of an embodiment of an auxiliary diagnosis method based on an interrogation session according to the present application
  • Fig. 3 is a flow chart of another embodiment of the auxiliary diagnosis method based on the consultation session according to the present application.
  • Fig. 4 is a flowchart of an embodiment of step S302 in Fig. 3;
  • Fig. 5 is a flowchart of an embodiment of step S204 in Fig. 2;
  • Fig. 6 is a schematic structural diagram of an embodiment of an auxiliary diagnosis device based on an interrogation session according to the present application
  • Fig. 7 is a schematic structural diagram of an embodiment of a computer device according to the present application.
  • a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 .
  • the network 104 is used 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 wires, wireless communication links, or fiber optic cables, among others.
  • Terminal devices 101 , 102 , 103 Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like.
  • Various communication client applications can be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, and the like.
  • Terminal devices 101, 102, 103 can be various electronic devices with display screens and support web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic Video experts compress standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compress standard audio layer 4) players, laptops and desktop computers, etc.
  • MP3 players Moving Picture Experts Group Audio Layer III, dynamic Video experts compress standard audio layer 3
  • MP4 Moving Picture Experts Group Audio Layer IV, moving picture experts compress standard audio layer 4
  • laptops and desktop computers etc.
  • the server 105 may be a server that provides various services, such as a background server that provides support for pages displayed on the terminal devices 101 , 102 , 103 .
  • the auxiliary diagnosis method based on the consultation session provided in the embodiment of the present application is generally executed by a server, and correspondingly, the auxiliary diagnosis device based on the consultation session is generally set in the server.
  • terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
  • FIG. 2 shows a flow chart of an embodiment of an assisted diagnosis method based on an interrogation session according to the present application.
  • the described auxiliary diagnosis method based on the consultation session comprises the following steps:
  • Step S201 acquiring dialogue text generated during the consultation process.
  • the electronic device (such as the server shown in FIG. 1 ) on which the auxiliary diagnosis method based on the consultation session runs may communicate with the terminal through a wired connection or a wireless connection.
  • the above wireless connection methods may include but not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods known or developed in the future .
  • the server acquires dialogue text generated during the consultation process.
  • the above-mentioned consultation process may be an offline consultation process or an online consultation process.
  • the doctor and the patient can communicate with each other face to face, and the dialogue between the doctor and the patient can be collected through the voice pickup device, and the collected dialogue can be uploaded to the server, and deployed on the server
  • the advanced speech recognition technology converts the dialogue between the doctor and the patient into text, and obtains the corresponding consultation dialogue.
  • doctors and patients can communicate with each other through the chat window or Internet voice.
  • Window content or Internet voice content is uploaded to the server.
  • a dialogue text can correspond to a medical consultation process. It is understandable that a dialogue text can include one or more sentences of a medical consultation dialogue. Readme composition.
  • the doctor can communicate with the patient through the doctor terminal, and the patient can communicate with the doctor through the patient terminal.
  • a corresponding dialogue text can be generated.
  • the dialogue text could be as follows:
  • the baby has a lot of red bumps on the buttocks
  • the above-mentioned consultation dialogue can also be stored in a block chain node.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • step S202 the feature words are extracted from the consultation dialogue through the trained first feature extraction model, and the target feature words in each sentence of the consultation dialogue are obtained.
  • a trained first feature extraction model is deployed in the server, and the server extracts feature words from the consultation dialogue by invoking the trained first feature extraction model.
  • the above-mentioned target feature words may be important words in each interrogation dialogue. For example, in the interrogation dialogue "the baby has a lot of red bumps on the buttocks", buttocks and red bumps are important words in the interrogation dialogue. Therefore, the trained first feature extraction model will output the two words buttocks and red bumps as target features.
  • the server When the server obtains the dialogue text generated during the consultation process, it will call the first feature extraction model, and input the consultation dialogue in the dialogue text into the first feature extraction model in time sequence in units of sentences for processing.
  • the model will output the important words in each interrogation dialogue as the target feature words.
  • the word vector encoding is performed on each sentence of the dialogue in the dialogue text, and the encoded word vector of each sentence of the dialogue is input into the first feature extraction model for feature extraction, and the important words in each sentence of the dialogue are extracted. words.
  • Step S203 extracting feature sentences from all the consultation conversations during the consultation process through the trained second feature extraction model to obtain target feature sentences during the consultation process.
  • a trained second feature extraction model is deployed in the server, and the server extracts feature sentences from the dialogue text by invoking the trained second feature extraction model.
  • the above-mentioned target characteristic sentence may be an important sentence in the consultation process.
  • the interrogation dialogue "the baby has a lot of red bumps on the buttocks” is an important sentence, and the trained second feature extraction model will output "the baby has a lot of red bumps on the buttocks" as the target feature sentence.
  • the second feature extraction model may be constructed based on a timing model, so that the second feature extraction model can keep semantics well transmitted along with the timing of the consultation dialogue.
  • Step S204 differentially mark the target feature words and the target feature sentences in the dialogue text, and display them as auxiliary diagnostic information in the consultation process.
  • the target feature words and target feature sentences can be differentially identified on the basis of the dialogue text, so as to obtain auxiliary diagnosis information during the consultation process. Due to the differential identification of target feature words and target feature sentences, important words and sentences can be easily captured and focused by doctors.
  • the feature words are extracted from the consultation dialogue through the trained first feature extraction model, so as to obtain the feature words in each sentence in each consultation dialogue;
  • the trained second feature extraction model extracts the characteristic sentences from the dialogue text to obtain the characteristic sentences in the consultation process;
  • the characteristic words and characteristic sentences in the consultation process are formed into auxiliary diagnosis information for the doctor to view.
  • doctors can view the auxiliary diagnosis information, focusing on the characteristic words and characteristic sentences in the auxiliary diagnosis information, which is intuitive and will not be missed.
  • the doctor's misdiagnosis rate can be reduced.
  • FIG. 3 shows a flow chart of another embodiment of a method for assisted diagnosis based on an interrogation session according to the present application.
  • the described auxiliary diagnosis method based on the consultation session also includes:
  • Step S301 constructing a first feature extraction model and a second feature extraction model.
  • the server constructs a first feature extraction model and a second feature extraction model
  • the first feature extraction model may be a feature extraction model constructed based on a neural network.
  • the first feature extraction model may include a word segmentation module, a word vector module, and a first feature extraction module.
  • the input of the first feature extraction model is a sentence of a medical inquiry conversation s, and the word segmentation module can perform word segmentation on the medical inquiry conversation s , to get the word segmentation sequence ⁇ w1,w2,...,wn ⁇ , through the word vector module, the word segmentation sequence ⁇ w1,w2,...,wn ⁇ can be encoded as a word vector, and the word vector ⁇ E1,E2, ..., En ⁇ .
  • the first feature extraction module is used to extract feature words from word vectors ⁇ E1, E2,...,En ⁇ to obtain target feature words.
  • 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 word vectors ⁇ E1, E2,...,En ⁇ , to obtain the target feature words, the target feature words can be output through the first output module, and the word vectors ⁇ E1, E2,...,En ⁇ are output to 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.
  • the input of the second feature extraction model is dialogue text
  • 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 word vector module in the second feature extraction model It can be the same as the word segmentation module and 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.
  • the second feature extraction model shares the word segmentation module and the 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 .
  • the second feature extraction model inputs the word vector sequence corresponding to the dialogue text. For example, if there are m sentences in the dialogue text, there are m word vectors, and the word vector sequence corresponding to the dialogue text is ⁇ s1, s2 ,...,sm ⁇ , where the above sequence of word vectors can also be called text vectors.
  • the second feature extraction model may also 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 corresponding to the current dialogue text diagnostic result.
  • the third output module is used for outputting target feature sentences, and the fourth output module is used for outputting disease diagnosis results.
  • Step S302 pre-training the first feature extraction model by using the first medical data to obtain a pre-trained first feature extraction model.
  • the server may perform pre-training on the first feature extraction model by using the first medical data.
  • the first medical data may be medical corpus, and the first medical data may be obtained by sorting out corpus channels such as Baidu Encyclopedia, medical papers, medical journals, and medical articles.
  • symptom words corresponding to various disease diagnoses can be sorted out from the first medical data as feature words, and the feature words in each sentence corpus can be marked, and the unmarked corpus can be input into the first feature extraction model Perform processing, calculate the error between the extracted feature words and the feature words marked in the corpus, and obtain the error between the extracted feature words and the feature words marked in the corpus, so as to minimize the extracted feature words and the marked in the corpus
  • the error between the feature words is the target, and the first feature extraction model is iteratively trained until it reaches the predetermined number of times or when the error between the extracted feature words and the feature words marked in the corpus is the smallest, then the training is good.
  • the first feature extraction model is iteratively trained until it reaches the predetermined number of times or when the error between the extracted feature words and the feature words marked in the corpus is the smallest, then the training is good.
  • the first feature extraction model is already a model that can be used alone after predictive training, and can be directly used to extract feature words in the consultation dialogue.
  • Step S303 taking the disease diagnosis cross-entropy loss as the optimization target, and jointly training the pre-trained first feature extraction model and the second feature extraction model through the second medical data.
  • the server After the server builds the second feature extraction model, it connects the pre-trained first feature extraction model with the second feature extraction model, and then uses the second medical data to compare the pre-trained first feature extraction model and the second feature extraction model.
  • Feature extraction models are jointly trained.
  • the second medical data may be medical corpus, and the second medical data may be obtained by sorting out corpus channels such as Baidu Encyclopedia, medical papers, medical journals, and medical articles.
  • the first feature extraction can be performed according to the first pre-training task and the second pre-training task
  • the model is pre-trained, so that the first feature extraction model and the second feature extraction model can better fit in the joint training stage.
  • the pre-trained first feature extraction model can be connected with the second feature extraction model to obtain a connected model.
  • the connected model is trained with 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 through backpropagation of the disease diagnosis cross entropy loss. After the connected models are trained to converge or reach a preset number of iterations, a trained first feature extraction model and a trained second feature extraction model are obtained.
  • the output of the hidden layer of the pre-trained first feature extraction model may be connected with the input of the second feature extraction model.
  • 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 convert the word vector ⁇ E1,E2,... ,En ⁇ are input to the first feature extraction module and the second output module, the first feature extraction module is used to extract the feature words from the word vector ⁇ E1,E2,...,En ⁇ to obtain the target feature words, and pass the first The output module outputs.
  • the first feature extraction model is connected with the second feature extraction model through the second output module.
  • 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, and perform disease diagnosis on each sample text
  • the label annotation of the unlabeled sample text is input into the second feature extraction model for processing, the extracted feature sentence is output through the third output module, the sample text is predicted through the prediction module, and the disease diagnosis is output through the fourth module prediction results.
  • the disease diagnosis cross-entropy loss can be expressed as the following formula:
  • p( xi ) is the label of disease diagnosis, that is, the real value
  • q( xi ) is the prediction result of disease diagnosis, that is, the predicted value
  • H(p,q) is the cross entropy loss of disease diagnosis, disease diagnosis
  • H(p,q) is the cross entropy loss of disease diagnosis
  • the second feature extraction model may 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, and the feature sentences in each sample text can be marked, and the unlabeled sample text can be input into the second feature extraction model for further processing.
  • Processing calculate the error between the extracted feature sentence and the feature sentence marked in the sample text, and obtain the error between the extracted feature sentence and the feature sentence marked in the sample text, so as to minimize the difference between the extracted feature sentence and the sample text
  • the error between the feature sentences marked in the target is the target, and the second feature extraction model is iteratively trained until the predetermined number of times is reached or the error between the extracted feature sentences and the feature sentences marked in the sample text is the smallest, then Obtain the trained second feature extraction model.
  • the new sample text refers to the sample text that is not used in the second feature extraction model.
  • the extracted feature sentences output by the third output module and the feature sentences marked in the sample text are added. The error between them can be optimized.
  • error between the extracted feature words and the feature words marked in the corpus can be crossed Entropy loss, mean square error loss, logarithmic loss, etc. can also be used.
  • the second feature extraction model is easier to train during the training process. Fitting to improve training speed.
  • FIG. 4 shows a flowchart of an embodiment of a method for pre-training the first feature extraction model according to the present application.
  • the first feature extraction model is pre-trained by the first medical data, and the steps of obtaining the pre-trained first feature extraction model include:
  • Step S3021 according to the first medical data, construct the first pre-training task based on word mask prediction.
  • symptom words corresponding to various disease diagnoses sorted out from the first medical data may be extracted as feature words, and the feature words in each sentence corpus may be marked.
  • 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 covered, 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.
  • the initial sentence sample in the first medical data may be randomly masked by a random mask block to obtain a masked sample sentence.
  • Word mask prediction is performed on the masked words in the mask sample sentence to obtain a prediction result sentence. Compute the first error loss between the predicted result sentence and the initial sentence sample. Construct the first pre-training task with the goal of minimizing the first error loss.
  • the corpus is "the baby's butt has many red bumps", and after masking it is “the baby's butt has many ⁇ bumps”.
  • the first pre-training task is to correctly predict "the baby's butt has a lot of red bumps” when the input is "the baby has a lot of pimples on the butt”.
  • the initial sentence sample in the first medical data can be randomly masked by using the random mask block to obtain the masked sample sentence.
  • Word mask prediction is performed on the masked words in the masked sample sentence to obtain the predicted word. Calculate the error loss between the predicted result word and the feature word in the initial sentence sample.
  • a first pre-training task is constructed with the goal of minimizing this error loss.
  • the corpus is "the baby's butt has many red bumps", and after masking it is “the baby's butt has many ⁇ bumps”.
  • the first pre-training task is to correctly extract the feature word "red bumps” in the case of inputting "the baby has a lot of bumps on the buttocks”.
  • a random word mask is performed on the initial sentence sample in the first medical data through a random mask block, and word mask prediction is performed on the masked word in the masked sample sentence to obtain the predicted result sentence
  • the first pre-training task can extract feature words for incomplete sentences, which increases the robustness of the first feature extraction network in the case of wrong words and missing words.
  • Step S3022 according to the first medical data, construct the second pre-training task based on context sentence prediction.
  • contextual sentences corresponding to various disease diagnoses can be extracted from the first medical data, and correct contextual sentences are marked as positive sample sentence pairs, and incorrect contextual sentences are marked as negative sample sentence pairs.
  • correct contextual sentences are marked as positive sample sentence pairs
  • incorrect contextual sentences are marked as negative sample sentence pairs.
  • positive sample sentence pair is "Mountains and rivers are full of doubts and no way, and the willows are dark and flowers brighten another village. Wan Muchun ahead.”
  • the second pre-training task based on the prediction of the upper and lower sentences can be understood as, for a sample sentence, there are correct next sentence and wrong next sentence, the sample sentence and the corresponding correct next sentence can form a positive sample sentence pair, the sample sentence and the wrong The next sentence can form a negative sample sentence pair. If the positive sample sentence pair is input into the first feature extraction model, the output will be correct, and if the negative sample sentence pair is input into the first feature extraction model, the output will be wrong.
  • the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample can be used as the upper sentence, and the initial sentence sample is randomly matched with the next sentence to form a sample sentence pair; the upper and lower sentence predictions are performed on the sample sentence pair to obtain the prediction result; Calculate the second error loss between the prediction result and the correct sample sentence pair, the correct sample sentence pair includes the initial sentence sample and the corresponding correct next sentence; build the second pre-training task with the goal of minimizing the second error loss.
  • the second pre-training task is to input “the mountain is heavy and the river is full of doubts, and there is another village", and the output is correct.
  • the input is “the mountains are heavy and the river is full of doubts, there is a thousand trees in front of the sick tree”. , the output is wrong.
  • a word mask may also be performed on the sample sentences in the sample sentence pair.
  • the second pre-training task is to input the situation of "the mountain is repeated, doubtful, and there is another village", and the output is correct, and the input is "the mountain is heavy, suspicious, and there is no road, and there are ten thousand trees in front of the sick tree”. Next, an error is output.
  • the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample is used as the upper sentence, and the initial sentence sample is randomly matched with the next sentence to form a sample sentence pair.
  • the second pre-training task can extract feature sentences from the context of incorrect semantics, which further increases the robustness of the first feature extraction network in the case of wrong sentences.
  • Step S3023 based on the first pre-training task and the second preset training task, perform pre-training on the first feature extraction model.
  • the first pre-training task and the second preset training task can be performed separately or alternately.
  • the first pre-training task and the second preset training task can be performed simultaneously.
  • the first feature extraction can be performed according to the first pre-training task and the second pre-training task
  • the model is pre-trained, so that the first feature extraction model and the second feature extraction model can better fit in the joint training stage.
  • FIG. 5 shows a flowchart of an embodiment of a method for displaying a consultation process according to the present application.
  • the step of differentially identifying target feature words and target feature sentences in the dialogue text includes:
  • Step S2041 visually expressing the target characteristic word through the first visualization element.
  • the first visualization element may be determined according to the confidence degree of the target feature word, wherein the confidence degree of the target feature word is obtained through the output of the first feature extraction model.
  • the visual expression of the target feature words can be understood as rendering the target feature words through the first visualization element on the basis of the dialogue text, so that the target feature words can be prominently displayed and more attractive to doctors.
  • the first feature extraction model will output the triplet information of the target feature word.
  • the triplet information includes the target feature word, the position of the target feature word in the sentence, and the confidence level.
  • the first The target feature word is "butt"
  • the position of the first target feature word in the sentence is 3 and 4
  • the confidence indicates the probability that "butt” is the first target feature word, the higher the confidence is, the "butt” is the first target
  • the second target feature word in "Baby's butt has a lot of red bumps” is "red bumps"
  • the position of the first target feature word in the sentence is 8, 9, 10
  • the confidence indicates that "red bumps” is the second target feature Word probability, the higher the confidence, the greater the probability that "red bump” is the second target feature word, and the more important the word “red bump” is.
  • the first visual element can be a color. For example, the greater the confidence corresponding to "butt”, the more prominent the font color of "butt". For a dialogue text with white characters on a black background, the first visual element is red as an example, " The greater the confidence corresponding to "butt”, the redder the font color of "butt”.
  • the first visualization element may also be a size, for example, the greater the confidence corresponding to "butt", the larger the font size of "butt”.
  • the first visual element may also be a combination of color and size.
  • Step S2042 visually express the target feature sentence through the second visualization element.
  • the second visual element can be different from the first visual element, for example, when the first visual element is color, the second visual element can be size; when the first visual element is size, the second visual element can be color ;
  • the first visualization element is a combination of color and size
  • the second visualization element can be an additional graphic or a combination of additional graphics, color, and size, such as adding a column chart, pie chart, etc. before the consultation dialogue, The longer the bar graph, the more important the consultation dialogue is, and the larger the pie chart is, the more important the consultation dialogue is.
  • the second visualization element may be determined according to the 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. It may 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 target feature sentences in the dialog text.
  • the second feature extraction module outputs a triplet information through the third output module, and the triplet 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 may be the confidence degree of the target feature sentence.
  • the second feature extraction module may be a feature extraction module of the attention mechanism, which weights each sentence of the dialogue in the dialogue text through the attention mechanism, and obtains each The weight corresponding to the sentence inquiry dialogue.
  • the visual expression of the target feature sentence can be understood as rendering or adding graphics to the target feature sentence through the second visualization element, so that the target feature sentence can be prominently displayed and more attractive to doctors.
  • Step S2043 visually expressing the consultation process through the third visualization element.
  • the third visualization element may be determined according to the time sequence of the consultation dialogue in the dialogue text.
  • the third visual element can be understood as the display of the dialogue text, in which each sentence of the consultation dialogue is arranged according to the corresponding time sequence.
  • the third visualization element may also be determined according to the importance of the consultation dialogue in the dialogue text, for example, the consultation dialogue with the highest importance is ranked first.
  • the importance of the consultation dialogue can be obtained by adding the confidence of the target feature words and the weight of the consultation dialogue.
  • the prediction result of the disease diagnosis in the dialog text can also be visually expressed through the fourth visualization element, and the prediction result of the disease diagnosis can be output through the fourth output module in the second feature extraction model.
  • a two-tuple information can be output, and the two-tuple information includes the prediction result of the disease diagnosis and the corresponding confidence level, such as: "dermatitis: 36.16%", where dermatitis is the prediction result of the disease diagnosis, 36.16% confidence level for dermatitis.
  • the prediction results of disease diagnosis can be multiple, for example, “dermatitis: 36.16%”, “rash: 28.12%”, “eczema: 19.07%”, “papular urticaria: 8.35%”, “urticaria: 1.38%” wait.
  • the patient and the doctor communicate with each other.
  • the system first collects the patient’s consultation information through the dialogue between the doctor and the patient, and then the system uses the auxiliary diagnosis model to analyze the collected consultation information.
  • the patient diagnoses a suspected disease, and assists the doctor to make a disease judgment when interrogating the patient.
  • the auxiliary diagnosis model includes a first feature extraction model and a second feature extraction model.
  • the auxiliary diagnosis model can provide strong evidence for the current diagnosis made, and give the current diagnosis based on which sentences and keywords the doctor and the patient have spoken for the doctor to make a judgment on. 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 the doctor to make a judgment, instead of giving a black box diagnosis result so that the doctor does not know what the result is based on.
  • the application can be applied in the field of smart cities, thereby promoting the construction of smart cities.
  • this application can be applied to various application fields involving medical consultation, such as digital medical treatment and Internet hospitals in the field of smart medical care.
  • the computer process can be stored in a computer-readable storage medium, and the process is in During execution, it may include the processes of the embodiments of the above-mentioned methods.
  • the aforementioned storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).
  • the present application provides an embodiment of an auxiliary diagnosis device based on an interrogation session, which corresponds to the method embodiment shown in FIG. 2 , the device can be specifically applied to various electronic devices.
  • the auxiliary diagnosis device 600 based on an interrogation session in this embodiment includes: an acquisition module 601, a first extraction module 602, a second extraction module 603, and a presentation module 604, wherein:
  • the acquisition module 601 is configured to acquire dialogue texts generated during the consultation process, and the dialogue texts include consultation dialogues between doctors and patients.
  • the first extraction module 602 is configured to extract feature words from the medical inquiry dialogue through the trained first feature extraction model, and obtain target feature words in each sentence of the medical inquiry dialogue.
  • 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 during the consultation process.
  • the display module 604 is configured to differentiate the target feature words and target feature sentences in the dialogue text, and display them as auxiliary diagnostic information in the consultation process.
  • the feature words are extracted from the consultation dialogue through the trained first feature extraction model, so as to obtain the feature words in each sentence in each consultation dialogue;
  • the trained second feature extraction model extracts the characteristic sentences from the dialogue text to obtain the characteristic sentences in the consultation process;
  • the characteristic words and characteristic sentences in the consultation process are formed into auxiliary diagnosis information for the doctor to view.
  • doctors can view the auxiliary diagnosis information, focusing on the characteristic words and characteristic sentences in the auxiliary diagnosis information, which is intuitive and will not be missed.
  • the doctor's misdiagnosis rate can be reduced.
  • the auxiliary diagnosis device 600 based on the consultation session also includes a construction module, a pre-training module and a joint training module, wherein:
  • the construction module is used to construct the first feature extraction model and the second feature extraction model.
  • the pre-training module is configured to perform pre-training on the first feature extraction model by using the first medical data to obtain a pre-trained first feature extraction model.
  • the joint training module is used to perform joint training on the pre-trained first feature extraction model and the second feature extraction model by using the second medical data to optimize the cross-entropy loss of disease diagnosis.
  • the first feature extraction model and the second feature extraction model can be better fitted in the joint training phase.
  • the pre-training module includes: a first construction sub-module, a second construction sub-module, and a pre-training sub-module, wherein:
  • the first construction submodule is used to construct the first pre-training task based on word mask prediction according to the first medical data.
  • the second construction sub-module is used to construct a second pre-training task based on the context sentence prediction according to the first medical data.
  • 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.
  • the first feature extraction can be performed according to the first pre-training task and the second pre-training task
  • the model is pre-trained, so that the first feature extraction model and the second feature extraction model can better fit in the joint training stage.
  • the first construction submodule includes: a mask unit, a first prediction unit, a first calculation unit, and a first construction unit, wherein:
  • the masking unit is configured to perform a random word mask on the initial sentence sample in the first medical data through a random mask block to obtain a masked sample sentence.
  • the first prediction unit is configured to perform word mask prediction on the masked words in the masked sample sentence to obtain a prediction result sentence.
  • a first calculation unit configured to calculate a first error loss between the prediction result sentence and the initial sentence sample.
  • the first construction unit is configured to construct a first pre-training task with the goal of minimizing the first error loss.
  • a random word mask is performed on the initial sentence sample in the first medical data through a random mask block, and word mask prediction is performed on the masked word in the masked sample sentence to obtain the predicted result sentence
  • the first pre-training task can extract feature words for incomplete sentences, which increases the robustness of the first feature extraction network in the case of wrong words and missing words.
  • the second construction submodule includes: a pairing unit, a second prediction unit, a second calculation unit, and a second construction unit, wherein:
  • the pairing unit is configured to use 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 to the initial sentence sample to form a sample sentence pair.
  • the second prediction unit is configured to perform upper and lower sentence prediction on the sample sentence pair to obtain a prediction result.
  • the second calculation unit is used to calculate the second error loss between the prediction result and the correct sample sentence pair, and the correct sample sentence pair includes the initial sentence sample and the corresponding correct next sentence.
  • the second construction unit is configured to construct a second pre-training task with the goal of minimizing the second error loss.
  • the initial sentence sample or the masked sample sentence corresponding to the initial sentence sample is used as the upper sentence, and the initial sentence sample is randomly matched with the next sentence to form a sample sentence pair.
  • the second pre-training task can extract feature sentences from the context of incorrect semantics, which further increases the robustness of the first feature extraction network in the case of wrong sentences.
  • the joint training module includes: a connection submodule, a joint training submodule and an iteration submodule, wherein:
  • connection sub-module is used to connect the pre-trained first feature extraction model with the second feature extraction model to obtain a connected model
  • the joint training sub-module is used to train the connected model through the second medical data, and during the training process, adjust the pre-trained first feature extraction model and the second feature extraction model through the backpropagation of the disease diagnosis cross entropy loss parameters in the model;
  • the iteration sub-module is used to train the connected model until it converges or reaches a preset number of iterations to obtain a trained first feature extraction model and a trained second feature extraction model.
  • the second feature extraction model is easier to train during the training process. Fitting to improve training speed.
  • the presentation module 604 includes: an entity recognition unit, a question screening unit, and a similarity calculation unit, wherein:
  • the first visualization sub-module is used to visually express the target feature word through the first visualization element, and the first visualization element is determined according to the confidence of the target feature word, wherein the confidence of the target feature word is determined by the first
  • the output of the feature extraction model is obtained;
  • the second visualization sub-module is used to visually express the target feature sentence through the second visualization element, and the second deified 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 ;
  • the third visualization sub-module is used to visually express the consultation process through the third visualization element, and the third visualization element is determined according to the timing of the consultation dialogue in the dialogue text.
  • FIG. 7 is a block diagram of the basic structure of the computer device in this embodiment.
  • the computer device 7 includes a memory 71 , a processor 72 and a network interface 73 connected to each other through a system bus. It should be noted that only the computer device 7 with components 71-73 is shown in the figure, but it should be understood that it is not required to implement all the components shown, and more or fewer components may 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 calculation and/or information processing according to preset or stored instructions, and its hardware includes but is not limited to microprocessors, dedicated Integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded devices, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • the computer equipment may be computing equipment such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device can perform human-computer interaction with the user through keyboard, mouse, remote controller, touch panel or voice control device.
  • 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, Magnetic Disk, Optical Disk, etc.
  • the computer readable storage Media can be non-volatile or volatile.
  • the memory 71 may be an internal storage unit of the computer device 7 , such as a hard disk or memory of the computer device 7 .
  • the memory 71 can also be an external storage device of the computer device 7, such as a plug-in hard disk equipped on the computer device 7, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
  • the memory 71 may also include both the internal storage unit of the computer device 7 and its external storage device.
  • 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 for an auxiliary diagnosis method based on an interrogation session.
  • the memory 71 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 72 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. This processor 72 is generally used to control the general operation of said computer device 7 . In this embodiment, the processor 72 is configured to execute the computer-readable instructions stored in the memory 71 or process data, for example, execute the computer-readable instructions of the auxiliary diagnosis method based on the consultation session.
  • CPU Central Processing Unit
  • controller a controller
  • microcontroller a microcontroller
  • microprocessor microprocessor
  • This processor 72 is generally used to control the general operation of said computer device 7 .
  • the processor 72 is configured to execute the computer-readable instructions stored in the memory 71 or process data, for example, execute the computer-readable instructions of the auxiliary diagnosis method based on the consultation session.
  • the network interface 73 may include a wireless network interface or a wired network interface, and the network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.
  • the computer device provided in this embodiment can execute the steps of the above-mentioned method for assisted diagnosis based on an interrogation session.
  • the steps of the auxiliary diagnosis method based on the consultation session may be the steps in the auxiliary diagnosis method based on the consultation session in the following embodiments:
  • the dialogue text includes the consultation dialogue between the doctor and the patient;
  • the target characteristic word and the target characteristic sentence are differentially identified in the dialogue text, and displayed as auxiliary diagnostic information in the consultation process.
  • the feature words are extracted from the consultation dialogue through the trained first feature extraction model, so as to obtain the feature words in each sentence in each consultation dialogue;
  • the trained second feature extraction model extracts the characteristic sentences from the dialogue text to obtain the characteristic sentences in the consultation process;
  • the characteristic words and characteristic sentences in the consultation process are formed into auxiliary diagnosis information for the doctor to view.
  • doctors can view the auxiliary diagnosis information, focusing on the characteristic words and characteristic sentences in the auxiliary diagnosis information, which is intuitive and will not be missed.
  • the doctor's misdiagnosis rate can be reduced.
  • the present application also provides another implementation manner, which is to provide a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to The at least one processor is made to perform the following steps of an auxiliary diagnosis method based on a consultation session:
  • the dialogue text includes the consultation dialogue between the doctor and the patient;
  • the target characteristic word and the target characteristic sentence are differentially identified in the dialogue text, and displayed as auxiliary diagnostic information in the consultation process.
  • the matching sentence pair is used as a positive sample, and the entity in the candidate sentence is identified and deleted to obtain a non-entity sentence, and the candidate sentence and its corresponding non-entity sentence are used as negative samples.
  • Samples when training the initial sentence matching model, facing two sentences with high similarity but mutual negative samples, the entity information can be captured based on the attention mechanism, which strengthens the importance of the entities in the sentence when the sentence is matched, and improves the training Complete the matching accuracy of the sentence matching model obtained; input user questions into the sentence matching model, and then accurately determine the inventory sentences that match the user questions from the question and answer database, and display the answer information corresponding to the inventory sentences at the same time, thereby improving accuracy of information retrieval.
  • the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Public Health (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Evolutionary Computation (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Pathology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Epidemiology (AREA)
  • Primary Health Care (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

本申请实施例属于人工智能和数字医疗领域,应用于智慧医疗领域中,涉及一种基于问诊会话的辅助诊断方法、装置、计算机设备及存储介质,方法包括获取问诊过程中产生的对话文本,对话文本包括医生与患者之间的问诊对话;通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;通过训练好的第二特征提取模型对对话文本进行特征语句提取,得到问诊过程中的目标特征语句;将目标特征词与目标特征语句在对话文本进行差异化标识,作为问诊过程的辅助诊断信息进行展示。此外,本申请还涉及区块链技术,对话文本可存储于区块链中。本申请通过辅助诊断信息,可以降低医生误诊率。

Description

基于问诊会话的辅助诊断方法、装置及计算机设备
本申请以2021年8月27日提交的申请号为202110997039.5,名称为“基于问诊会话的辅助诊断方法、装置及计算机设备”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及人工智能技术领域和数字医疗领域,尤其涉及一种基于问诊会话的辅助诊断方法、装置、计算机设备及存储介质。
背景技术
随着计算力和数据量的大幅度提升,人工智能技术获得进一步的发展,应用人工智能解决医疗领域问题已成为了热点。在医疗领域中,医生一般是通过对患者进行问诊,再根据问诊情况推断患者的患病情况。
受限于患者的表达情况,以及长时间的问诊对话,需要医生精神高度集中,才能对问诊过程中患者的描述进行关键词进行捕捉,即便如此,申请人意识到还是会存在遗漏关键词,造成诊断信息遗漏,使得误诊率较高。
发明内容
本申请实施例的目的在于提出一种基于问诊会话的辅助诊断方法、装置、计算机设备及存储介质,以解决误诊率较高的问题。
为了解决上述技术问题,本申请实施例提供一种基于问诊会话的辅助诊断方法,采用了如下所述的技术方案:
获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
进一步的,在所述获取问诊过程中产生的对话文本之前,所述方法还包括:
构建第一特征提取模型以及第二特征提取模型;
通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型;
以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练。
进一步的,所述通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型的步骤包括:
根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务;以及
根据所述第一医学数据,构建基于上下语句预测的第二预训练任务;
基于所述第一预训练任务以及所述第二预设训练任务,对所述第一特征提取模型进行预训练。
进一步的,所述根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务的步骤包括:
通过随机掩码块对所述第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句;
对所述掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句;
计算所述预测结果语句与所述初始语句样本之间的第一误差损失;
以最小化第一误差损失为目标构建所述第一预训练任务。
进一步的,所述根据所述第一医学数据,构建基于上下语句预测的第二预训练任务的步骤包括:
将所述初始语句样本或与所述初始语句样本对应的掩码样本语句作为上句,为所述初始语句样本随机匹配下句,形成样本语句对;
对所述样本语句对进行上下语句预测,得到预测结果;
计算所述预测结果与正确的样本语句对之间的第二误差损失,所述正确的样本语句对包括初始语句样本以及对应的正确下句;
以最小化第二误差损失为目标构建所述第二预训练任务。
进一步的,所述以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练的步骤包括:
将所述预训练的第一特征提取模型与所述第二特征提取模型进行连接,得到连接后的模型;
通过第二医学数据对所述连接后的模型进行训练,并在训练过程中,通过所述疾病诊断交叉熵损失的反向传播调整所述预训练的第一特征提取模型与所述第二特征提取模型中的参数;
将所述连接后的模型训练到收敛或达到预设迭次数后,得到所述训练好的第一特征提取模型以及所述训练好的第二特征提取模型。
进一步的,所述将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识的步骤包括:
通过第一可视化要素对所述目标特征词进行可视化表达,所述第一可视化要素根据所述目标特征词的置信度进行确定,其中,所述目标特征词的置信度通过所述第一特征提取模型输出得到;
通过第二可视化要素对所述目标特征语句进行可视化表达,所述第二可神化要素根据所述目标特征语句的权重进行确定,其中,所述目标特征语句的权重通过所述第二特征提取模型输出得到;
通过第三可视化要素对所述问诊过程进行可视化表达,所述第三可视化要素根据所述对话文本中的问诊对话的时序进行确定。
为了解决上述技术问题,本申请实施例还提供一种基于问诊会话的辅助诊断装置,采用了如下所述的技术方案:
获取模块,用于获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
第一提取模块,用于通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
第二提取模块,用于通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
展示模块,用于将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
为了解决上述技术问题,本申请实施例还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机流程,所述处理器执行所述计算机流程时实现下述所述的基于问诊会话的辅助诊断方法的步骤:
获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机流程,所述计算机流程被处理器执行时实现下述所述的基于问诊会话的辅助诊断方法的步骤:
获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
与现有技术相比,本申请实施例主要有以下有益效果:获取问诊过程中产生的对话文本后,通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每问诊对话中,每句话中的特征词;通过训练好的第二特征提取模型对对话文本进行特征语句提取,得到问诊过程中的特征语句;将问诊过程中的特征词与特征语句形成辅助诊断信息以供医生查看,在医生对于患者的诊断时,医生可以通过查看辅助诊断信息,重点关注辅助诊断信息中的特征词和特征语句,直观且不会发生遗漏,通过辅助诊断信息,可以降低医生误诊率。
附图说明
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请可以应用于其中的示例性系统架构图;
图2是根据本申请的基于问诊会话的辅助诊断方法的一个实施例的流程图;
图3是根据本申请的基于问诊会话的辅助诊断方法的另一个实施例的流程图;
图4是图3中步骤S302的一个实施例的流程图;
图5是图2中步骤S204的一个实施例的流程图;
图6是根据本申请的基于问诊会话的辅助诊断装置的一个实施例的结构示意图;
图7是根据本申请的计算机设备的一个实施例的结构示意图。
具体实施方式
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的页面提供支持的后台服务器。
需要说明的是,本申请实施例所提供的基于问诊会话的辅助诊断方法一般由服务器执行,相应地,基于问诊会话的辅助诊断装置一般设置于服务器中。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
继续参考图2,示出了根据本申请的基于问诊会话的辅助诊断方法的一个实施例的流程图。所述的基于问诊会话的辅助诊断方法,包括以下步骤:
步骤S201,获取问诊过程中产生的对话文本。
在本实施例中,基于问诊会话的辅助诊断方法运行于其上的电子设备(例如图1所示的服务器)可以通过有线连接方式或者无线连接方式与终端进行通信。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。
具体地,服务器获取问诊过程中产生的对话文本。上述问诊过程可以线下的问诊过程,也可以是线上的问诊过程。
在线下的问诊过程中,医生与患者可以当面进行问诊交流,可以通过语音拾取器对问诊过程中医生与患者的对话进行采集,将采集到的对话上传到服务器上,通过服务器上部署的语音识别技术将医生与患者的对话进行文本转换,得到对应的问诊对话。
在线上的问诊过程中,医生和患者可以通过聊天窗口或者互联网语音进行问诊交流,服务器可以实时或者定时获取聊天窗口内容或者互联网语音内容,也可以是在问诊交流完成后,医生将聊天窗口内容或者互联网语音内容上传到服务器中。
一个对话文本可以对应一次问诊过程,可以理解的是,一个对话文本中可以包括一句或者一句以上的问诊对话,问诊对话可以由医生与患者之间的对话组成,也可以由患者单方的自述组成。
具体的,在线上的问诊过程中,医生可以通过医生终端与患者进行交流,患者可以通过患者终端与医生进行交流,在医生与患者的交流过程中,可以产生对应的对话文本。举例来说,对话文本可以如下:
患者:宝宝屁股长很多红疙瘩
医生:您好,我是XX皮肤科的A医生,很高兴为您服务,请问痒吗
患者:应该有点痒吧
患者:这是怎么回事
医生:这些症状出现多久了
医生:好像很严重
患者:一个星期吧
患者:就是突然长起来了,一会儿又消退了,总是反复
医生:症状二十四小时之内自行消退吗
患者:是的
需要强调的是,为进一步保证上述问诊对话的私密和安全性,上述问诊对话还可以存储于一区块链的节点中。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
步骤S202,通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每句问诊对话中的目标特征词。
具体地,服务器中部署有训练好的第一特征提取模型,服务器通过调用训练好的第一特征提取模型对问诊对话进行特征词提取。上述目标特征词可以是每句问诊对话中重要的字词。比如,在问诊对话“宝宝屁股长很多红疙瘩”中,屁股、红疙瘩是该问诊对话中重要的字词,因此,训练好的第一特征提取模型会输出屁股、红疙瘩两个词作为目标特征词。
在服务器获取到问诊过程中产生的对话文本,则会调用第一特征提取模型,将对话文本中问诊对话以句为单位按时序输入到第一特征提取模型中进行处理,第一特征提取模型会输出每句问诊对话中重要的字词作为目标特征词。
更具体的,将对话文本中每句问诊对话都进行词向量编码,得到每句问诊对话编码词向量输入到第一特征提取模型中进行特征提取,提取出每句问诊对话中重要的字词。
步骤S203,通过训练好的第二特征提取模型对问诊过程中的所有问诊对话进行特征语句提取,得到问诊过程中的目标特征语句。
具体地,服务器中部署有训练好的第二特征提取模型,服务器通过调用训练好的第二特征提取模型对对话文本进行特征语句提取。上述目标特征语句可以是问诊过程中重要的语句。比如,在对话文本中,问诊对话“宝宝屁股长很多红疙瘩”为重要的语句,训练好的第二特征提取模型会输出“宝宝屁股长很多红疙瘩”作为目标特征语句。
第二特征提取模型可以是基于时序模型进行构建的,以使第二特征提取模型能够保持语义随着问诊对话的时序得到很好的传递。
步骤S204,将目标特征词与所述目标特征语句在对话文本进行差异化标识,作为问诊过程的辅助诊断信息进行展示。
具体的,可以将目标特征词与目标特征语句在对话文本的基础上进行差异化标识,从而得到问诊过程的辅助诊断信息。由于目标特征词与目标特征语句进行差异化标识,使得重要的词和重要的语句可以被医生轻松捕捉和关注。
本实施例中,获取问诊过程中产生的对话文本后,通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每问诊对话中,每句话中的特征词;通过训练好的第二特征提取模型对对话文本进行特征语句提取,得到问诊过程中的特征语句;将问诊过程中的特征词与特征语句形成辅助诊断信息以供医生查看,在医生对于患者的诊断时,医生可以通过查看辅助诊断信息,重点关注辅助诊断信息中的特征词和特征语句,直观且不会发生遗漏,通过辅助诊断信息,可以降低医生误诊率。
进一步的,继续参考图3,图3示出了根据本申请的基于问诊会话的辅助诊断方法的另一个实施例的流程图。在获取问诊过程中产生的对话文本之前,所述的基于问诊会话的辅助诊断方法还包括:
步骤S301,构建第一特征提取模型以及第二特征提取模型。
具体的,服务器构建第一特征提取模型和第二特征提取模型,第一特征提取模型可以是基于神经网络进行构建的特征提取模型。
更具体的,第一特征提取模型可以包括分词模块、词向量模块、第一特征提取模块, 第一特征提取模型输入的是一句问诊会话s,通过分词模块可以将该问诊会话s进行分词,得到分词序列{w1,w2,…,wn},通过词向量模块可以将分词序列{w1,w2,…,wn}进行词向量编码,得到该问诊会话s的词向量{E1,E2,…,En}。第一特征提取模块用于对词向量{E1,E2,…,En}进行特征词提取,得到目标特征词。
在一种可能的实施例中,第一特征提取模型还可以包括第一输出模块以及第二输出模块,在第一特征提取模块对词向量{E1,E2,…,En}进行特征词提取后,得到目标特征词,目标特征词可以通过第一输出模块进行输出,而词向量{E1,E2,…,En}通过第二输出模块输出到第二特征提取模型中。
第二特征提取模型可以是基于时序模型进行构建的特征提取模型。
更具体的,第二特征提取模型的输入是对话文本,第二特征提取模型可以包括分词模块、词向量模块、第二特征提取模块,其中,第二特征提取模型中的分词模块、词向量模块可以与第一特征提取模型中的分词模块、词向量模块相同。第二特征提取模块用于提取特征语句,得到对话文本中的目标特征语句。
在一种可能的实施例中,第二特征提取模型与第一特征提取模型共用分词模块、词向量模块,第一特征提取模型通过第二输出模块将词向量vs输出到第二特征提取模型中。此时,第二特征提取模型输入的是对话文本对应的词向量序列,比如,对话文本中有m句问诊会话,则有m个词向量,对话文本对应的词向量序列为{s1,s2,…,sm},其中,上述词向量序列也可以称为文本向量。
在一种可能的实施例中,第二特征提取模型还可以包括预测模块、第三输出模块以及第四输出模块,其中,预测模块用于诊断结果的预测,可以预测出当前对话文本对应的疾病诊断结果。第三输出模块用于输出目标特征语句,第四输出模块用于输出疾病诊断结果。
步骤S302,通过第一医学数据对第一特征提取模型进行预训练,得到预训练的第一特征提取模型。
具体的,服务器在构建好第一特征提取模型后,可以通过第一医学数据对第一特征提取模型进行预训练。第一医学数据可以是医学语料,第一医学数据可以根据百度百科、医学论文、医学杂志以及医学文章等语料渠道进行整理得到。
更具体的,可以从第一医学数据中整理出对应于各种疾病诊断的症状词作为特征词,对每句语料中的特征词进行标注,将未标注的语料输入到第一特征提取模型中进行处理,将提取到的特征词与语料中标注的特征词进行误差计算,得到提取到的特征词与语料中标注的特征词之间的误差,以最小化提取到的特征词与语料中标注的特征词之间的误差为目标,对第一特征提取模型进行迭代训练,直到达到预定的次数时或者提取到的特征词与语料中标注的特征词之间的误差最小时,则得到训练好的第一特征提取模型。
需要说明的是,第一特征提取模型经过预测训练后,已经是可以单独使用的模型,可以直接用于提取问诊对话中的特征词。
步骤S303,以疾病诊断交叉熵损失为优化目标,通过第二医学数据对预训练的第一特征提取模型以及第二特征提取模型进行联合训练。
具体的,服务器在构建好第二特征提取模型后,将预训练的第一特征提取模型与第二特征提取模型进行连接,再通过第二医学数据对预训练的第一特征提取模型以及第二特征提取模型进行联合训练。第二医学数据可以是医学语料,第二医学数据可以根据百度百科、医学论文、医学杂志以及医学文章等语料渠道进行整理得到。
本实施例中,在构建基于字词掩码预测的第一预训练任务与基于上下语句预测的第二预训练任务后,可以根据第一预训练任务与第二预训练任务对第一特征提取模型进行预训练,使第一特征提取模型与第二特征提取模型在联合训练阶段可以更好的拟合。
进一步的,可以将预训练的第一特征提取模型与第二特征提取模型进行连接,得到连接后的模型。通过第二医学数据对连接后的模型进行训练,并在训练过程中,通过疾病诊断交叉熵损失的反向传播调整预训练的第一特征提取模型与第二特征提取模型中的参数。 将连接后的模型训练到收敛或达到预设迭次数后,得到训练好的第一特征提取模型以及训练好的第二特征提取模型。
具体的,可以将预训练的第一特征提取模型的隐含层输出与第二特征提取模型输入进行连接。
在一种可能的实施例中,第一特征提取模型包括分词模块、词向量模块、第一特征提取模块、第一输出模块、第二输出模块。词向量模块可以将分词序列{w1,w2,…,wn}进行词向量编码,得到该问诊会话s的词向量{E1,E2,…,En},并将词向量{E1,E2,…,En}输入到第一特征提取模块和第二输出模块中,第一特征提取模块用于对词向量{E1,E2,…,En}进行特征词提取,得到目标特征词,并通过第一输出模块进行输出。第一特征提取模型通过第二输出模块与第二特征提取模型进行连接。
更具体的,第二特征提取模型包括预测模块、第三输出模块以及第四输出模块,可以从第二医学数据中整理出对应于各种疾病诊断的样本文本,对每个样本文本进行疾病诊断的标签标注,将未标注的样本文本输入到第二特征提取模型中进行处理,通过第三输出模块输出提取到的特征语句,通过预测模块对样本文本进行预测,并通过第四模块输出疾病诊断的预测结果。疾病诊断交叉熵损失可以如下述式子所示:
Figure PCTCN2022071881-appb-000001
其中,p(x i)为疾病诊断的标签,即是真实值,q(x i)为疾病诊断的预测结果,即是预测值,H(p,q)为疾病诊断交叉熵损失,疾病诊断交叉熵损失H(p,q)越小,表示疾病诊断的预测结果越准确。
在一种可能的实施例中,也可以对通过第二医学数据对第二特征提取模型进行预训练,得到预训练的第二特征提取模型。具体的,可以从第二医学数据中整理出对应于各种疾病诊断的语句作为特征语句,对个样本文本中的特征语句进行标注,将未标注的样本文本输入到第二特征提取模型中进行处理,将提取到的特征语句与样本文本中标注的特征语句进行误差计算,得到提取到的特征语句与样本文本中标注的特征语句之间的误差,以最小化提取到的特征语句与样本文本中标注的特征语句之间的误差为目标,对第二特征提取模型进行迭代训练,直到达到预定的次数时或者提取到的特征语句与样本文本中标注的特征语句之间的误差最小时,则得到训练好的第二特征提取模型。
将预训练的第一特征提取模型与预训练的第二特征提取模型进行联合训练,得到联合训练模型后,再用新的样本文本对联合训练模型进行训练,此次训练则以疾病诊断交叉熵损失为优化目标进行。新的样本文本指的是没有用于第二特征提取模型的样本文本。
当然,也可以不用对第二特征提取模型进行预训练,在以疾病诊断交叉熵损失为优化目标进行联合训练时,增加第三输出模块输出的提取到的特征语句与样本文本中标注的特征语句之间的误差优化即可。
需要说明的是,上述提取到的特征词与语料中标注的特征词之间的误差,以及提取到的特征语句与样本文本中标注的特征语句之间的误差,这两种误差形式可以采用交叉熵损失,也可以采用均方差损失、对数损失等。
本实施例中,通过对预训练的第一特征提取模型与第二特征提取模型进行联合训练,由于第一特征提取模型的参数只需要进行微调,使得第二特征提取模型在训练过程中更容易拟合,提高训练速度。
进一步的,请继续参考图4,图4示出了根据本申请的第一特征提取模型的预训练方法的一个实施例的流程图。通过第一医学数据对第一特征提取模型进行预训练,得到预训练的第一特征提取模型的步骤包括:
步骤S3021,根据第一医学数据,构建基于字词掩码预测的第一预训练任务。
具体的,可以提取从第一医学数据中整理出对应于各种疾病诊断的症状词作为特征词,对每句语料中的特征词进行标注。
基于字词掩码预测的第一预训练任务可以理解为,对语料中的字词进行掩码,使得语料中的一些字词被遮掩,然后将掩码后的语料输入到第一特征提取模型中,使得第一特征提取模型依然输出正确的特征词,正确的特征词为对应语料中标注的特征词。
进一步的,可以通过随机掩码块对第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句。对掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句。计算预测结果语句与初始语句样本之间的第一误差损失。以最小化第一误差损失为目标构建第一预训练任务。
举例来说,语料为“宝宝屁股长很多红疙瘩”,经过掩码后为“宝宝屁股长很多■疙瘩”。第一预训练任务则是在输入“宝宝屁股长很多■疙瘩”情况下,正确预测出“宝宝屁股长很多红疙瘩”。
更进一步的,可以通过随机掩码块对第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句。对掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果词。计算预测结果词与初始语句样本中特征词之间的误差损失。以最小化该误差损失为目标构建第一预训练任务。
举例来说,语料为“宝宝屁股长很多红疙瘩”,经过掩码后为“宝宝屁股长很多■疙瘩”。第一预训练任务则是在输入“宝宝屁股长很多■疙瘩”情况下,正确提取出特征词“红疙瘩”。
本实施例中,通过随机掩码块对第一医学数据中的初始语句样本进行随机字词掩码,并对掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句后,使得第一预训练任务能够对不完整语句进行特征词提取,增加了第一特征提取网络在错词、漏词情况下的鲁棒性。
步骤S3022,根据第一医学数据,构建基于上下语句预测的第二预训练任务。
具体的,可以提取从第一医学数据中整理出对应于各种疾病诊断的上下语句,对于正确的上下语句标注为正样本语句对,对于错误的上下语句标注为负样本语句对。比如:“山重水复疑无路”作为样本语句,其正样本语句对为“山重水复疑无路,柳暗花明又一村”,其负样本语句可以是“山重水复疑无路,病树前头万木春”。
基于上下语句预测的第二预训练任务可以理解为,对于一个样本语句,存在正确的下句和错误的下句,样本语句与对应的正确下句可以组成正样本语句对,样本语句与错误的下句可以组成负样本语句对,将正样本语句对输入到第一特征提取模型中,则输出正确,将负样本语句对输入到第一特征提取模型中,则输出错误。
进一步的,可以将初始语句样本或与初始语句样本对应的掩码样本语句作为上句,为初始语句样本随机匹配下句,形成样本语句对;对样本语句对进行上下语句预测,得到预测结果;计算预测结果与正确的样本语句对之间的第二误差损失,正确的样本语句对包括初始语句样本以及对应的正确下句;以最小化第二误差损失为目标构建第二预训练任务。
举例来说,第二预训练任务则是输入“山重水复疑无路,柳暗花明又一村”情况下,输出正确,输入“山重水复疑无路,病树前头万木春”的情况下,输出错误。
在一种可能的实施例中,还可以对样本语句对中的样本语句进行字词掩码。则此时,第二预训练任务是输入“山重■复疑无路,柳暗花明又一村”情况下,输出正确,输入“山重■■疑无路,病树前头万木春”的情况下,输出错误。
本实施例中,将初始语句样本或与初始语句样本对应的掩码样本语句作为上句,为初始语句样本随机匹配下句,形成样本语句对,使用样本语句对进行对错预测,可以使得第二预训练任务能够对不正确语义的上下文进行特征语句提取,进一步增加了第一特征提取网络在错句情况下的鲁棒性。
步骤S3023,基于第一预训练任务以及第二预设训练任务,对第一特征提取模型进行预训练。
具体的,第一预训练任务以及第二预设训练任务可以分别进行,也可以交叉进行。在 对样本语句对中的样本语句进行字词掩码时,第一预训练任务以及第二预设训练任务可以同时进行。
本实施例中,在构建基于字词掩码预测的第一预训练任务与基于上下语句预测的第二预训练任务后,可以根据第一预训练任务与第二预训练任务对第一特征提取模型进行预训练,使第一特征提取模型与第二特征提取模型在联合训练阶段可以更好的拟合。
进一步的,请继续参考图5,图5示出了根据本申请的展示问诊过程方法的一个实施例的流程图。将目标特征词与目标特征语句在所述对话文本进行差异化标识的步骤包括:
步骤S2041,通过第一可视化要素对目标特征词进行可视化表达。
具体的,第一可视化要素可以根据目标特征词的置信度进行确定,其中,目标特征词的置信度通过第一特征提取模型输出得到。对目标特征词进行可视化表达可以理解为在对话文本的基础上,通过第一可视化要素对目标特征词进行渲染,使得目标特征词可以突出展示,更能吸引医生的注意。
第一特征提取模型会输出目标特征词的三元组信息,三元组信息包括目标特征词、目标特征词在语句中的位置以及置信度,比如“宝宝屁股长很多红疙瘩”中的第一目标特征词为“屁股”,第一目标特征词在语句中的位置为3和4,置信度表示“屁股”是第一目标特征词概率,置信度越高,则“屁股”是第一目标特征词概率越大,则说明“屁股”这个词越重要。“宝宝屁股长很多红疙瘩”中的第二目标特征词为“红疙瘩”,第一目标特征词在语句中的位置为8、9、10,置信度表示“红疙瘩”是第二目标特征词概率,置信度越高,则“红疙瘩”是第二目标特征词概率越大,则说明“红疙瘩”这个词越重要。
第一可视化要素可以是颜色,比如,“屁股”对应的置信度越大,则“屁股”的字体颜色越突出,以黑底白字的对话文本来说,第一可视化要素以红色为例,“屁股”对应的置信度越大,则“屁股”的字体颜色越红。
第一可视化要素还可以是尺寸,比如,“屁股”对应的置信度越大,则“屁股”的字体尺寸越大。
当然,第一可视化要素也可以是颜色和大小的结合。
步骤S2042,通过第二可视化要素对目标特征语句进行可视化表达。
具体的,第二可视化要素可以区别于第一可视化要素,比如,当第一可视化要素为颜色时,第二可视化要素可以是尺寸;当第一可视化要素为尺寸时,第二可视化要素可以是颜色;当第一可视化要素为颜色和大小的结合时,第二可视化要素可以是附加图形或者附加图形与颜色、尺寸的结合,附加图形比如在问诊对话前加柱形图、饼状图等,柱形图越长,则该问诊对话越重要,饼状图占比越大,则该问诊对话越重要。
具体的,第二可视化要素可以根据目标特征语句的权重进行确定,其中,目标特征语句的权重通过第二特征提取模型输出得到。可以是根据第二特征提取模型中的第二特征提取模块来进行确定,第二特征提取模块用于提取特征语句,得到对话文本中的目标特征语句。第二特征提取模块通过第三输出模块输出一个三元组信息,三元组信息中包括目标特征语句、目标特征语句在对话文本中的位置以及目标特征语句的权重。其中,目标特征语句的权重可以是目标特征语句的置信度。
在一种可能的实施例中,上述第二特征提取模型中,第二特征提取模块可以是注意力机制的特征提取模块,通过注意力机制对对话文本中每句问诊对话进行加权,得到每句问诊对话对应的权重。
在对话文本的基础上,对目标特征语句进行可视化表达可以理解为,通过第二可视化要素对目标特征语句进行渲染或附加图形,使得目标特征语句可以突出展示,更能吸引医生的注意。
步骤S2043,通过第三可视化要素对问诊过程进行可视化表达。
具体的,第三可视化要素可以根据对话文本中的问诊对话的时序进行确定。第三可视化要素可以理解为是对话文本的展示,在对话文本的展示中,每句问诊对话都是按对应的 时序进行排列的。当然,在一些可能的实施例中,第三可视化要素也可以是根据对话文本中的问诊对话的重要程度进行确定,比如,将重要程度最高的问诊对话排在最前。问诊对话的重要程度可以根据目标特征词的置信度和问诊对话的权重进行相加得到。
在一种可能的实施例中,还可以通过第四可视化要素对对话文本的疾病诊断的预测结果进行可视化表达,疾病诊断的预测结果可以通过第二特征提取模型中的第四输出模块进行输出。具体的,针对对话文本,可以输出一个二元组信息,二元组信息包括疾病诊断的预测结果和对应的置信度,比如:“皮炎:36.16%”,其中,皮炎为疾病诊断的预测结果,36.16%为皮炎的置信度。疾病诊断的预测结果可以为多个,比如,“皮炎:36.16%”,“皮疹:28.12%”,“湿疹:19.07%”,“丘疹性荨麻疹:8.35%”,“荨麻疹:1.38%”等。
本实施例中,当患者在互联网医院进行就诊时,患者和医生进行对话沟通,系统首先通过医生与患者的对话收集患者的问诊信息,然后系统对收集到的问诊信息通过辅助诊断模型对患者进行疑似疾病诊断,辅助医生在问诊患者时进行疾病的判断,其中,辅助诊断模型包括第一特征提取模型和第二特征提取模型。此外,辅助诊断模型可以对作出的当前诊断提供有力证据,给出是根据医生与患者对话的哪些语句、哪些关键词给出的当前诊断,以供医生进行判断。通过该辅助诊断系统,可以有效提升医疗服务的质量和效率。通过将目标特征词与目标特征语句进行可视化,将更好的辅助医生进行判断,而不是一种黑盒式的给出诊断结果使得医生不知该结果依据什么给出的。
本申请可应用于智慧城市领域中,从而推动智慧城市的建设。例如,本申请可应用于智慧医疗领域中的数字医疗、互联网医院等多种涉及医疗问诊的应用领域。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机流程来指令相关的硬件来完成,该计算机流程可存储于一计算机可读取存储介质中,该流程在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
进一步参考图6,作为对上述图2所示方法的实现,本申请提供了一种基于问诊会话的辅助诊断装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图6所示,本实施例所述的基于问诊会话的辅助诊断装置600包括:获取模块601、第一提取模块602、第二提取模块603以及展示模块604,其中:
获取模块601,用于获取问诊过程中产生的对话文本,对话文本包括医生与患者之间的问诊对话。
第一提取模块602,用于通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每句问诊对话中的目标特征词。
第二提取模块603,用于通过训练好的第二特征提取模型对对话文本进行特征语句提取,得到问诊过程中的目标特征语句。
展示模块604,用于将目标特征词与目标特征语句在对话文本进行差异化标识,作为问诊过程的辅助诊断信息进行展示。
本实施例中,获取问诊过程中产生的对话文本后,通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每问诊对话中,每句话中的特征词;通过训练好的第二特征提取模型对对话文本进行特征语句提取,得到问诊过程中的特征语句;将问诊过程中的 特征词与特征语句形成辅助诊断信息以供医生查看,在医生对于患者的诊断时,医生可以通过查看辅助诊断信息,重点关注辅助诊断信息中的特征词和特征语句,直观且不会发生遗漏,通过辅助诊断信息,可以降低医生误诊率。
在本实施例的一些可选的实现方式中,基于问诊会话的辅助诊断装置600还包括构建模块、预训练模块以及联合训练模块,其中:
构建模块,用于构建第一特征提取模型以及第二特征提取模型。
预训练模块,用于通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型。
联合训练模块,用于以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练。
本实施例中,通过对第一特征提取模型进行预训练,可以使第一特征提取模型与第二特征提取模型在联合训练阶段可以更好的拟合。
在本实施例的一些可选的实现方式中,预训练模块包括:第一构建子模块、第二构建子模块以及预训练子模块,其中:
第一构建子模块,用于根据第一医学数据,构建基于字词掩码预测的第一预训练任务。
第二构建子模块,用于根据第一医学数据,构建基于上下语句预测的第二预训练任务。
预训练子模块,用于基于第一预训练任务以及第二预设训练任务,对第一特征提取模型进行预训练。
本实施例中,在构建基于字词掩码预测的第一预训练任务与基于上下语句预测的第二预训练任务后,可以根据第一预训练任务与第二预训练任务对第一特征提取模型进行预训练,使第一特征提取模型与第二特征提取模型在联合训练阶段可以更好的拟合。
在本实施例的一些可选的实现方式中,第一构建子模块包括:掩码单元、第一预测单元、第一计算单元以及第一构建单元,其中:
掩码单元,用于通过随机掩码块对第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句。
第一预测单元,用于对掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句。
第一计算单元,用于计算预测结果语句与初始语句样本之间的第一误差损失。
第一构建单元,用于以最小化第一误差损失为目标构建第一预训练任务。
本实施例中,通过随机掩码块对第一医学数据中的初始语句样本进行随机字词掩码,并对掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句后,使得第一预训练任务能够对不完整语句进行特征词提取,增加了第一特征提取网络在错词、漏词情况下的鲁棒性。
在本实施例的一些可选的实现方式中,第二构建子模块包括:配对单元、第二预测单元、第二计算单元以及第二构建单元,其中:
配对单元,用于将初始语句样本或与初始语句样本对应的掩码样本语句作为上句,为初始语句样本随机匹配下句,形成样本语句对。
第二预测单元,用于对样本语句对进行上下语句预测,得到预测结果。
第二计算单元,用于计算预测结果与正确的样本语句对之间的第二误差损失,正确的样本语句对包括初始语句样本以及对应的正确下句。
第二构建单元,用于以最小化第二误差损失为目标构建第二预训练任务。
本实施例中,将初始语句样本或与初始语句样本对应的掩码样本语句作为上句,为初始语句样本随机匹配下句,形成样本语句对,使用样本语句对进行对错预测,可以使得第二预训练任务能够对不正确语义的上下文进行特征语句提取,进一步增加了第一特征提取网络在错句情况下的鲁棒性。
在本实施例的一些可选的实现方式中,联合训练模块包括:连接子模块、联合训练子 模块以及迭代子模块,其中:
连接子模块,用于将预训练的第一特征提取模型与第二特征提取模型进行连接,得到连接后的模型;
联合训练子模块,用于通过第二医学数据对连接后的模型进行训练,并在训练过程中,通过疾病诊断交叉熵损失的反向传播调整预训练的第一特征提取模型与第二特征提取模型中的参数;
迭代子模块,用于将连接后的模型训练到收敛或达到预设迭次数后,得到训练好的第一特征提取模型以及训练好的第二特征提取模型。
本实施例中,通过对预训练的第一特征提取模型与第二特征提取模型进行联合训练,由于第一特征提取模型的参数只需要进行微调,使得第二特征提取模型在训练过程中更容易拟合,提高训练速度。
在本实施例的一些可选的实现方式中,展示模块604包括:实体识别单元、问句筛选单元以及相似度计算单元,其中:
第一可视化子模块,用于通过第一可视化要素对所述目标特征词进行可视化表达,第一可视化要素根据目标特征词的置信度进行确定,其中,目标特征词的置信度通过所述第一特征提取模型输出得到;
第二可视化子模块,用于通过第二可视化要素对目标特征语句进行可视化表达,第二可神化要素根据目标特征语句的权重进行确定,其中,目标特征语句的权重通过第二特征提取模型输出得到;
第三可视化子模块,用于通过第三可视化要素对问诊过程进行可视化表达,第三可视化要素根据对话文本中的问诊对话的时序进行确定。
本实施例中,通过将目标特征词与目标特征语句进行可视化,将更好的辅助医生进行判断,而不是一种黑盒式的给出诊断结果使得医生不知该结果依据什么给出的。
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图7,图7为本实施例计算机设备基本结构框图。
所述计算机设备7包括通过系统总线相互通信连接存储器71、处理器72、网络接口73。需要指出的是,图中仅示出了具有组件71-73的计算机设备7,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器71至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等,所述计算机可读存储介质可以是非易失性,也可以是易失性。在一些实施例中,所述存储器71可以是所述计算机设备7的内部存储单元,例如该计算机设备7的硬盘或内存。在另一些实施例中,所述存储器71也可以是所述计算机设备7的外部存储设备,例如该计算机设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器71还可以既包括所述计算机设备7的内部存储单元也包括其外部存储设备。本实施例中,所述存储器71通常用于存储安装于所述计算机设备7的操作系统和各类应用软件,例如基于问诊会话的辅助诊断方法的计 算机可读指令等。此外,所述存储器71还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器72在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器72通常用于控制所述计算机设备7的总体操作。本实施例中,所述处理器72用于运行所述存储器71中存储的计算机可读指令或者处理数据,例如运行所述基于问诊会话的辅助诊断方法的计算机可读指令。
所述网络接口73可包括无线网络接口或有线网络接口,该网络接口73通常用于在所述计算机设备7与其他电子设备之间建立通信连接。
本实施例中提供的计算机设备可以执行上述基于问诊会话的辅助诊断方法的步骤。此处基于问诊会话的辅助诊断方法的步骤可以是下述各个实施例的基于问诊会话的辅助诊断方法中的步骤:
获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
本实施例中,获取问诊过程中产生的对话文本后,通过训练好的第一特征提取模型对问诊对话进行特征词提取,得到每问诊对话中,每句话中的特征词;通过训练好的第二特征提取模型对对话文本进行特征语句提取,得到问诊过程中的特征语句;将问诊过程中的特征词与特征语句形成辅助诊断信息以供医生查看,在医生对于患者的诊断时,医生可以通过查看辅助诊断信息,重点关注辅助诊断信息中的特征词和特征语句,直观且不会发生遗漏,通过辅助诊断信息,可以降低医生误诊率。
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行如下述的基于问诊会话的辅助诊断方法的步骤:
获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
本实施例中,获取到匹配语句对以及候选语句后,将匹配语句对作为正样本,识别候选语句中的实体并进行删除,得到无实体语句,将候选语句及其对应的无实体语句作为负样本,在训练初始语句匹配模型时,面对两个相似度较高但互为负样本的句子,可以基于注意力机制捕捉实体信息,强化了语句匹配时句子中实体的重要性,提高了训练完毕得到的语句匹配模型匹配的准确性;将用户问句输入语句匹配模型,即可准确地从问答库中确定与用户问句匹配的库存语句,同时展示与库存语句对应的答案信息,从而提高了信息检索的准确性。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如 ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。

Claims (20)

  1. 一种基于问诊会话的辅助诊断方法,其中,包括下述步骤:
    获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
    通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
    通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
    将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
  2. 根据权利要求1所述的基于问诊会话的辅助诊断方法,其中,在所述获取问诊过程中产生的对话文本之前,所述方法还包括:
    构建第一特征提取模型以及第二特征提取模型;
    通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型;
    以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练。
  3. 根据权利要求2所述的基于问诊会话的辅助诊断方法,其中,所述通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型的步骤包括:
    根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务;
    根据所述第一医学数据,构建基于上下语句预测的第二预训练任务;以及
    基于所述第一预训练任务以及所述第二预设训练任务,对所述第一特征提取模型进行预训练。
  4. 根据权利要求3所述的基于问诊会话的辅助诊断方法,其中,所述根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务的步骤包括:
    通过随机掩码块对所述第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句;
    对所述掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句;
    计算所述预测结果语句与所述初始语句样本之间的第一误差损失;
    以最小化第一误差损失为目标构建所述第一预训练任务。
  5. 根据权利要求4所述的基于问诊会话的辅助诊断方法,其中,所述根据所述第一医学数据,构建基于上下语句预测的第二预训练任务的步骤包括:
    将所述初始语句样本或与所述初始语句样本对应的掩码样本语句作为上句,为所述初始语句样本随机匹配下句,形成样本语句对;
    对所述样本语句对进行上下语句预测,得到预测结果;
    计算所述预测结果与正确的样本语句对之间的第二误差损失,所述正确的样本语句对包括初始语句样本以及对应的正确下句;
    以最小化第二误差损失为目标构建所述第二预训练任务。
  6. 根据权利要求2所述的基于问诊会话的辅助诊断方法,其中,所述以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练的步骤包括:
    将所述预训练的第一特征提取模型与所述第二特征提取模型进行连接,得到连接后的模型;
    通过第二医学数据对所述连接后的模型进行训练,并在训练过程中,通过所述疾病诊断交叉熵损失的反向传播调整所述预训练的第一特征提取模型与所述第二特征提取模型中的参数;
    将所述连接后的模型训练到收敛或达到预设迭次数后,得到所述训练好的第一特征提取模型以及所述训练好的第二特征提取模型。
  7. 根据权利要求6所述的基于问诊会话的辅助诊断方法,其中,所述将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识的步骤包括:
    通过第一可视化要素对所述目标特征词进行可视化表达,所述第一可视化要素根据所述目标特征词的置信度进行确定,其中,所述目标特征词的置信度通过所述第一特征提取模型输出得到;
    通过第二可视化要素对所述目标特征语句进行可视化表达,所述第二可神化要素根据所述目标特征语句的权重进行确定,其中,所述目标特征语句的权重通过所述第二特征提取模型输出得到;
    通过第三可视化要素对所述问诊过程进行可视化表达,所述第三可视化要素根据所述问诊过程中产生的问诊对话的时序进行确定。
  8. 一种基于问诊会话的辅助诊断装置,其中,包括:
    获取模块,用于获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
    第一提取模块,用于通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
    第二提取模块,用于通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
    展示模块,用于将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的基于问诊会话的辅助诊断方法的步骤:
    获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
    通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
    通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
    将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
  10. 根据权利要求9所述的计算机设备,其中,在所述获取问诊过程中产生的对话文本之前,所述方法还包括:
    构建第一特征提取模型以及第二特征提取模型;
    通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型;
    以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练。
  11. 根据权利要求10所述的计算机设备,其中,所述通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型的步骤包括:
    根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务;
    根据所述第一医学数据,构建基于上下语句预测的第二预训练任务;以及
    基于所述第一预训练任务以及所述第二预设训练任务,对所述第一特征提取模型进行预训练。
  12. 根据权利要求11所述的计算机设备,其中,所述根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务的步骤包括:
    通过随机掩码块对所述第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句;
    对所述掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句;
    计算所述预测结果语句与所述初始语句样本之间的第一误差损失;
    以最小化第一误差损失为目标构建所述第一预训练任务。
  13. 根据权利要求12所述的计算机设备,其中,所述根据所述第一医学数据,构建基于上下语句预测的第二预训练任务的步骤包括:
    将所述初始语句样本或与所述初始语句样本对应的掩码样本语句作为上句,为所述初始语句样本随机匹配下句,形成样本语句对;
    对所述样本语句对进行上下语句预测,得到预测结果;
    计算所述预测结果与正确的样本语句对之间的第二误差损失,所述正确的样本语句对包括初始语句样本以及对应的正确下句;
    以最小化第二误差损失为目标构建所述第二预训练任务。
  14. 根据权利要求10所述的计算机设备,其中,所述以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练的步骤包括:
    将所述预训练的第一特征提取模型与所述第二特征提取模型进行连接,得到连接后的模型;
    通过第二医学数据对所述连接后的模型进行训练,并在训练过程中,通过所述疾病诊断交叉熵损失的反向传播调整所述预训练的第一特征提取模型与所述第二特征提取模型中的参数;
    将所述连接后的模型训练到收敛或达到预设迭次数后,得到所述训练好的第一特征提取模型以及所述训练好的第二特征提取模型。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的基于问诊会话的辅助诊断方法的步骤:
    获取问诊过程中产生的对话文本,所述对话文本包括医生与患者之间的问诊对话;
    通过训练好的第一特征提取模型对所述问诊对话进行特征词提取,得到每句问诊对话中的目标特征词;
    通过训练好的第二特征提取模型对所述对话文本进行特征语句提取,得到所述问诊过程中的目标特征语句;
    将所述目标特征词与所述目标特征语句在所述对话文本进行差异化标识,作为所述问诊过程的辅助诊断信息进行展示。
  16. 根据权利要求15所述的计算机可读存储介质,其中,在所述获取问诊过程中产生的对话文本之前,所述方法还包括:
    构建第一特征提取模型以及第二特征提取模型;
    通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型;
    以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述通过第一医学数据对所述第一特征提取模型进行预训练,得到预训练的第一特征提取模型的步骤包括:
    根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务;
    根据所述第一医学数据,构建基于上下语句预测的第二预训练任务;以及
    基于所述第一预训练任务以及所述第二预设训练任务,对所述第一特征提取模型进行预训练。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述根据所述第一医学数据,构建基于字词掩码预测的第一预训练任务的步骤包括:
    通过随机掩码块对所述第一医学数据中的初始语句样本进行随机字词掩码,得到掩码样本语句;
    对所述掩码样本语句中被掩码字词进行字词掩码预测,得到预测结果语句;
    计算所述预测结果语句与所述初始语句样本之间的第一误差损失;
    以最小化第一误差损失为目标构建所述第一预训练任务。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述根据所述第一医学数据,构建基于上下语句预测的第二预训练任务的步骤包括:
    将所述初始语句样本或与所述初始语句样本对应的掩码样本语句作为上句,为所述初始语句样本随机匹配下句,形成样本语句对;
    对所述样本语句对进行上下语句预测,得到预测结果;
    计算所述预测结果与正确的样本语句对之间的第二误差损失,所述正确的样本语句对包括初始语句样本以及对应的正确下句;
    以最小化第二误差损失为目标构建所述第二预训练任务。
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述以疾病诊断交叉熵损失为优化目标,通过第二医学数据对所述预训练的第一特征提取模型以及所述第二特征提取模型进行联合训练的步骤包括:
    将所述预训练的第一特征提取模型与所述第二特征提取模型进行连接,得到连接后的模型;
    通过第二医学数据对所述连接后的模型进行训练,并在训练过程中,通过所述疾病诊断交叉熵损失的反向传播调整所述预训练的第一特征提取模型与所述第二特征提取模型中的参数;
    将所述连接后的模型训练到收敛或达到预设迭次数后,得到所述训练好的第一特征提取模型以及所述训练好的第二特征提取模型。
PCT/CN2022/071881 2021-08-27 2022-01-13 基于问诊会话的辅助诊断方法、装置及计算机设备 WO2023024422A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110997039.5A CN113707299B (zh) 2021-08-27 2021-08-27 基于问诊会话的辅助诊断方法、装置及计算机设备
CN202110997039.5 2021-08-27

Publications (1)

Publication Number Publication Date
WO2023024422A1 true WO2023024422A1 (zh) 2023-03-02

Family

ID=78656144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071881 WO2023024422A1 (zh) 2021-08-27 2022-01-13 基于问诊会话的辅助诊断方法、装置及计算机设备

Country Status (2)

Country Link
CN (1) CN113707299B (zh)
WO (1) WO2023024422A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116992861A (zh) * 2023-09-25 2023-11-03 四川健康久远科技有限公司 基于数据处理的医疗服务智慧处理方法及系统
CN118194097A (zh) * 2024-05-13 2024-06-14 福建依时利软件股份有限公司 一种智慧实验室的管理方法、装置、设备及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113707299B (zh) * 2021-08-27 2024-09-27 平安科技(深圳)有限公司 基于问诊会话的辅助诊断方法、装置及计算机设备
CN115083602A (zh) * 2022-08-16 2022-09-20 阿里巴巴(中国)有限公司 精神疾病辅助诊断方法、装置、设备、存储介质及系统
CN115482926B (zh) * 2022-09-20 2024-04-09 浙江大学 知识驱动的罕见病可视化问答式辅助鉴别诊断系统及方法
CN116936078B (zh) * 2023-07-18 2024-04-26 南京大经中医药信息技术有限公司 中医预问诊收集管理系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104799A (zh) * 2019-10-16 2020-05-05 中国平安人寿保险股份有限公司 文本信息表征方法、系统及计算机设备、存储介质
WO2020263034A1 (en) * 2019-06-28 2020-12-30 Samsung Electronics Co., Ltd. Device for recognizing speech input from user and operating method thereof
CN112307168A (zh) * 2020-10-30 2021-02-02 康键信息技术(深圳)有限公司 基于人工智能的问诊会话处理方法、装置和计算机设备
CN112489790A (zh) * 2020-11-30 2021-03-12 北京百度网讯科技有限公司 关键数据确定方法、装置、设备及存储介质
CN113707299A (zh) * 2021-08-27 2021-11-26 平安科技(深圳)有限公司 基于问诊会话的辅助诊断方法、装置及计算机设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818823A (zh) * 2017-12-05 2018-03-20 成都法线网络科技有限公司 一种人工智能问诊方法
CN110517767B (zh) * 2019-08-27 2022-12-13 北京百度网讯科技有限公司 辅助诊断方法、装置、电子设备及存储介质
CN112016319B (zh) * 2020-09-08 2023-12-15 平安科技(深圳)有限公司 预训练模型获取、疾病实体标注方法、装置及存储介质
CN112395883A (zh) * 2021-01-19 2021-02-23 阿里健康科技(杭州)有限公司 一种问诊处理方法、问诊数据处理方法和装置
CN112883180A (zh) * 2021-02-24 2021-06-01 挂号网(杭州)科技有限公司 模型训练方法、装置、电子设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020263034A1 (en) * 2019-06-28 2020-12-30 Samsung Electronics Co., Ltd. Device for recognizing speech input from user and operating method thereof
CN111104799A (zh) * 2019-10-16 2020-05-05 中国平安人寿保险股份有限公司 文本信息表征方法、系统及计算机设备、存储介质
CN112307168A (zh) * 2020-10-30 2021-02-02 康键信息技术(深圳)有限公司 基于人工智能的问诊会话处理方法、装置和计算机设备
CN112489790A (zh) * 2020-11-30 2021-03-12 北京百度网讯科技有限公司 关键数据确定方法、装置、设备及存储介质
CN113707299A (zh) * 2021-08-27 2021-11-26 平安科技(深圳)有限公司 基于问诊会话的辅助诊断方法、装置及计算机设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116992861A (zh) * 2023-09-25 2023-11-03 四川健康久远科技有限公司 基于数据处理的医疗服务智慧处理方法及系统
CN116992861B (zh) * 2023-09-25 2023-12-08 四川健康久远科技有限公司 基于数据处理的医疗服务智慧处理方法及系统
CN118194097A (zh) * 2024-05-13 2024-06-14 福建依时利软件股份有限公司 一种智慧实验室的管理方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN113707299B (zh) 2024-09-27
CN113707299A (zh) 2021-11-26

Similar Documents

Publication Publication Date Title
WO2023024422A1 (zh) 基于问诊会话的辅助诊断方法、装置及计算机设备
JP7100087B2 (ja) 情報を出力する方法および装置
CN111680159B (zh) 数据处理方法、装置及电子设备
WO2020232861A1 (zh) 命名实体识别方法、电子装置及存储介质
CN110705301B (zh) 实体关系抽取方法及装置、存储介质、电子设备
CN111597830A (zh) 基于多模态机器学习的翻译方法、装置、设备及存储介质
US20170161619A1 (en) Concept-Based Navigation
WO2022105118A1 (zh) 基于图像的健康状态识别方法、装置、设备及存储介质
EP3872652B1 (en) Method and apparatus for processing video, electronic device, medium and product
WO2021218028A1 (zh) 基于人工智能的面试内容精炼方法、装置、设备及介质
CN112287069B (zh) 基于语音语义的信息检索方法、装置及计算机设备
Zhang et al. Cross-modal image sentiment analysis via deep correlation of textual semantic
WO2022073341A1 (zh) 基于语音语义的疾病实体匹配方法、装置及计算机设备
CN112632244A (zh) 一种人机通话的优化方法、装置、计算机设备及存储介质
WO2023116572A1 (zh) 一种词句生成方法及相关设备
CN113657105A (zh) 基于词汇增强的医学实体抽取方法、装置、设备及介质
JP2023002690A (ja) セマンティックス認識方法、装置、電子機器及び記憶媒体
Zhu et al. A knowledge-guided graph attention network for emotion-cause pair extraction
WO2021139220A1 (zh) 疫情监控方法、装置、计算机设备和存储介质
Kummar et al. Edu-bot: an ai based smart chatbot for knowledge management system
US20230070966A1 (en) Method for processing question, electronic device and storage medium
CN115357710B (zh) 表格描述文本生成模型的训练方法、装置及电子设备
CN116680392A (zh) 一种关系三元组的抽取方法和装置
CN113327691B (zh) 基于语言模型的问询方法、装置、计算机设备及存储介质
CN114036267A (zh) 对话方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22859782

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22859782

Country of ref document: EP

Kind code of ref document: A1