Question and answer method and device for medical consultation, electronic equipment and storage medium
By adopting the context-embedded attention-enhanced two-way coding method in the medical information system, the problems of low information retrieval accuracy, insufficient knowledge representation and inaccurate question-and-answer matching are solved, and efficient medical information acquisition and optimized telemedicine service experience are achieved.
Patent Information
- Application Number
- CN202510142484.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-13
AI Technical Summary
The existing medical information system has shortcomings in the matching of information retrieval and Q&A, which is difficult to meet the needs of medical staff and patients for efficient access to medical information. Especially in telemedicine environments, the information retrieval accuracy is low, the knowledge representation is insufficient, and the question&A matching is inaccurate.
The medical consultation question and answer method based on context embedding is adopted. By receiving the medical consultation information input by the user, it converts it into computer-identifiable information, and inputs a preset target model to generate diagnostic results and reply information for the medical consultation information.
Improve the accuracy of text comprehension, reduce the impact of irrelevant information on matching results, optimize the telemedicine service experience, and reduce medical costs.
Smart Images

Figure CN120148910A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of detection, and particularly to a question-and-answer method for medical consultation, a question-and-answer device for medical consultation, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the development of medical informatization, electronic medical record systems have been widely used in medical institutions. However, existing systems have deficiencies in information retrieval and question-and-answer matching, and it is difficult to meet the needs of medical staff and patients for efficient access to medical information. At the same time, the popularization of telemedicine has put forward higher requirements for the immediacy and accuracy of medical information. Its main business pain points are:
[0003] 1. Low information retrieval accuracy. In a telemedicine environment, doctors often need to quickly and accurately retrieve relevant information from a large number of electronic medical records to support diagnostic decisions. However, traditional information retrieval methods often cannot accurately understand the complex medical terms and context relationships in medical records, resulting in low accuracy of retrieval results.
[0004] 2. Insufficient knowledge representation. Most of the information in electronic medical records exists in the form of unstructured or semi-structured text, which makes it difficult for machines to directly understand and utilize the knowledge therein. Traditional text processing methods often cannot effectively represent and utilize the medical knowledge in medical records, thus limiting the application effect of medical AI systems.
[0005] Inaccurate question-and-answer matching. In telemedicine consultations, patients' questions are often diverse and complex, and the answers given by doctors need to accurately correspond to the specific conditions and needs of patients. However, traditional question-and-answer matching methods often cannot accurately understand the intentions and contexts of patients' questions, resulting in inaccurate or unsatisfactory answers that cannot meet the actual needs of patients. Summary of the Invention
[0006] In view of the above problems, a question-and-answer method, device, electronic device, and storage medium for medical consultation are provided to overcome the above problems or at least partially solve the above problems, including:
[0007] A question-and-answer method for medical consultation, the method includes:
[0008] Receiving medical consultation information input by a user, and converting the medical consultation information into computer-recognizable information;
[0009] Inputting the computer-recognizable information into a preset target model to obtain first diagnostic result information output by the target model for the medical consultation information; the first diagnostic result information determined by the target model from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method.
[0010] Generate a first target response message for the medical consultation information according to the first diagnostic result information, and feedback the first target response message to the user.
[0011] Optionally, receiving the medical consultation information input by the user and converting the medical consultation information into computer-recognizable information includes:
[0012] Preprocess the medical consultation information to obtain first text information;
[0013] Convert the first text information into the computer-recognizable information.
[0014] Optionally, the method further includes:
[0015] Generate an inquiry message for the medical consultation information, and feedback the inquiry message to the user;
[0016] Receive the response message input by the user for the inquiry message, and input the response message and the computer-recognizable information into a preset target model to obtain second diagnostic result information output by the target model;
[0017] Generate a second target response message according to the second diagnostic result information, and feedback the second target response message to the user.
[0018] Optionally, the method further includes:
[0019] Collect electronic medical record data, and preprocess the electronic medical record data to obtain a target feature vector;
[0020] Construct a knowledge graph according to the relationship between the target feature vector and each entity in the electronic medical record data;
[0021] Generate the medical knowledge base according to the knowledge graph.
[0022] Optionally, the method further includes:
[0023] Generate a training sample set according to historical medical consultation information and historical response information;
[0024] Train a preset model according to the training sample set to obtain the target model.
[0025] Optionally, the training of the preset model according to the training sample set includes:
[0026] Set a bias vector for the keywords in the training sample set;
[0027] Train the preset model according to the training sample set for setting the bias vector.
[0028] Optionally, the target model is provided with a self-attention mechanism and a cross-attention mechanism.
[0029] An embodiment of the present invention also provides a question-and-answer device for medical consultation, and the device includes:
[0030] A receiving module, configured to receive medical consultation information input by a user and convert the medical consultation information into computer-recognizable information;
[0031] A prediction module, configured to input the computer-recognizable information into a preset target model to obtain first diagnosis result information output by the target model for the medical consultation information; the first diagnosis result information determined by the target model from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method;
[0032] A feedback module, configured to generate first target reply information for the medical consultation information according to the first diagnosis result information and feedback the first target reply information to the user.
[0033] An embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the above-mentioned question-and-answer method for medical consultation is implemented.
[0034] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned question-and-answer method for medical consultation is implemented.
[0035] The embodiments of the present invention have the following advantages:
[0036] In the embodiments of the present invention, medical consultation information input by a user is received, and the medical consultation information is converted into computer-recognizable information; the computer-recognizable information is input into a preset target model to obtain first diagnosis result information output by the target model for the medical consultation information; the first diagnosis result information determined by the target model from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method; first target reply information for the medical consultation information is generated according to the first diagnosis result information, and the first target reply information is fed back to the user. Through the embodiments of the present invention, the influence of irrelevant information on the matching result can be reduced, the accuracy of text understanding can be improved, the remote medical service experience can be optimized, and the medical cost can be reduced. Description of the Drawings
[0037] To more clearly illustrate the technical solution of the present invention, the accompanying drawings required for the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0038] Figure 1 is a flowchart of the steps of a question-and-answer method for medical consultation according to an embodiment of the present invention;
[0039] Figure 2 is a flowchart of the steps of another question-and-answer method for medical consultation according to an embodiment of the present invention;
[0040] Figure 3 is a flowchart of the steps of yet another question-and-answer for medical consultation according to an embodiment of the present invention;
[0041] Figure 4 is a flowchart of the steps of still another question-and-answer for medical consultation according to an embodiment of the present invention;
[0042] Figure 5 is a schematic diagram of an interaction interface of a question-and-answer for medical consultation according to an embodiment of the present invention;
[0043] Figure 6 is a schematic diagram of an interaction interface of another question-and-answer for medical consultation according to an embodiment of the present invention;
[0044] Figure 7 is a schematic diagram of an interaction interface of yet another question-and-answer for medical consultation according to an embodiment of the present invention;
[0045] Figure 8 is a schematic diagram of the structure of a question-and-answer device for medical consultation according to an embodiment of the present invention. Detailed implementation manners
[0046] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0047] To reduce the influence of irrelevant information on the matching result, improve the accuracy of text understanding, optimize the remote medical service experience, and reduce medical costs, the embodiments of the present invention provide a question-and-answer method for medical consultation with an attention-enhanced bidirectional encoding-decoding text question-and-answer method with context embedding, which can improve the accuracy and efficiency of medical information retrieval and question-and-answer matching through deep learning technology. Specifically, reference can be made to Figure 1, shows a flowchart of a medical consultation question-and-answer method according to an embodiment of the present invention, which may include the following steps:
[0048] Step 101: Receive medical consultation information input by a user, and convert the medical consultation information into computer-recognizable information.
[0049] In actual applications, patients (i.e., users) can consult doctors about their conditions through a telemedicine platform. Doctors need to quickly check the patient's electronic medical records to understand the medical history and give accurate answers based on the patient's specific questions and condition. In order to improve the efficiency of responses, the method described in the embodiment of the present invention can be applied to a system. After receiving the medical consultation information input by the user, the system can first convert the medical consultation information into computer-recognizable information.
[0050] The medical consultation information may refer to text information input by the user, for example: "Hello, I have a sore throat and a little fever recently. Do I have a cold?" This is not limited in the embodiment of the present invention.
[0051] Computer-readable information may refer to medical consultation information in a format that can be understood by a computer, which can facilitate intelligent processing and analysis by a machine.
[0052] Step 102: input the computer-recognizable information into a preset target model to obtain first diagnosis result information for the medical consultation information output by the target model; the target model determines the first diagnosis result information from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method.
[0053] After obtaining computer-recognizable information, the computer-recognizable information can be input into a preset target model; the target model can recognize the computer-recognizable information and output first diagnosis result information for the medical consultation information; illustratively, if the medical consultation information is "Hello, I always feel sore throat and a little fever recently, do I have a cold?", then the first diagnosis result information can be "cold".
[0054] In some feasible embodiments, the target model can determine the first diagnosis result information from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method.
[0055] The attention-enhanced bidirectional encoding-decoding text question-answering method with contextual embedding is a bidirectional encoding question-answer matching method that integrates telemedicine symptom word bias and knowledge representation. It aims to improve the accuracy and efficiency of medical information retrieval and question-answer matching through deep learning technology.
[0056] Step 103: Generate a first target response message for the medical consultation information based on the first diagnosis result information, and feedback the first target response message to the user.
[0057] After obtaining the first diagnosis result information, the system can automatically generate a first target response message for the medical consultation information; then, the first target response message can be fed back to the user (i.e., the patient).
[0058] For example: If the first diagnosis result information is "cold", based on the first diagnosis result information, a first target response message in natural language form "You may have a cold. It is recommended to take some cold medicine" is generated. The embodiments of the present invention are not limited thereto.
[0059] In the embodiments of the present invention, the medical consultation information input by the user is received and converted into computer-recognizable information; the computer-recognizable information is input into a preset target model to obtain the first diagnosis result information output by the target model for the medical consultation information; the target model determines the first diagnosis result information from a preset medical knowledge base based on the context-embedded attention-enhanced bidirectional encoding method; a first target response message for the medical consultation information is generated based on the first diagnosis result information, and the first target response message is fed back to the user. Through the embodiments of the present invention, the influence of irrelevant information on the matching result can be reduced, the accuracy of text understanding can be improved, the remote medical service experience can be optimized, and the medical cost can be reduced.
[0060] Refer to Figure 2 , which shows a step flowchart of another medical consultation Q&A method according to the embodiments of the present invention, and may include the following steps:
[0061] Step 201: Receive the medical consultation information input by the user.
[0062] In practical applications, a patient (i.e., the user) can consult a doctor about their condition through a remote medical platform. The doctor needs to quickly check the patient's electronic medical record to understand the medical history and give an accurate answer based on the patient's specific questions and condition.
[0063] To improve the response efficiency, the method mentioned in the embodiments of the present invention can be applied in a system. After the system receives the medical consultation information input by the user, it can continue to execute step 202.
[0064] Step 202: Preprocess the medical consultation information to obtain the first text information.
[0065] After obtaining the medical consultation information, it can be preprocessed to obtain the first text information; exemplarily, the preprocessing may include word segmentation, stop word removal and other preprocessing operations. The embodiments of the present invention are not limited thereto.
[0066] Step 203: Convert the first text information into computer-recognizable information.
[0067] After obtaining the first text information, the system may first convert the first text information into computer-recognizable information.
[0068] Step 204: Input the computer-recognizable information into a preset target model to obtain a first diagnostic result information for the medical consultation information output by the target model.
[0069] After obtaining the computer-recognizable information, the computer-recognizable information can be input into a preset target model; the target model can recognize the computer-recognizable information and output a first diagnostic result information for the medical consultation information; for example, if the medical consultation information is "Hello, I have always felt a sore throat recently and have a little fever. Am I having a cold?", the first diagnostic result information can be "Having a cold".
[0070] In some feasible embodiments, the target model may determine the first diagnostic result information from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method.
[0071] The context-embedded attention-enhanced bidirectional encoding and decoding text question-and-answer method is a bidirectional encoding question-and-answer matching method that integrates telemedicine symptom word bias and knowledge representation, aiming to improve the accuracy and efficiency of medical information retrieval and question-and-answer matching through deep learning technology.
[0072] Step 205: Generate a first target reply information for the medical consultation information according to the first diagnostic result information, and feedback the first target reply information to the user.
[0073] After obtaining the first diagnostic result information, the system can automatically generate a first target reply information for the medical consultation information; then, the first target reply information can be fed back to the user (i.e., the patient).
[0074] In an embodiment of the present invention, the above method may further include the following steps:
[0075] Generate an inquiry information for the medical consultation information, and feedback the inquiry information to the user; receive the reply information input by the user for the inquiry information, and input the reply information and the computer-recognizable information into a preset target model to obtain a second diagnostic result information output by the target model; generate a second target reply information according to the second diagnostic result information, and feedback the second target reply information to the user.
[0076] In some feasible embodiments, the above method may further generate an inquiry information for the medical consultation information and feedback the inquiry information to the user to continue to ask the user other relevant information.
[0077] Next, the response information input by the user for the query information can be received, and the response information and computer-recognizable information are input into a preset target model to obtain the second diagnostic result information output by the target model.
[0078] Then, according to the second diagnostic result information, a second target response information can be generated and fed back to the user. Exemplarily, the third target response information can also be continuously generated according to the response information input by the user for the second target response information and presented to the user, which is not elaborated in this embodiment of the present invention.
[0079] It should be noted that when asking questions and generating response information multiple times, it is necessary to combine the information input by the user previously to ensure that the user's intention and condition can be accurately estimated.
[0080] In an embodiment of the present invention, the above method may further include the following steps:
[0081] Collect electronic medical record data, preprocess the electronic medical record data to obtain target feature vectors; construct a knowledge graph according to the relationship between the target feature vectors and each entity in the electronic medical record data; generate a medical knowledge base according to the knowledge graph.
[0082] In some feasible embodiments, electronic medical record data can be collected in advance; specifically, the electronic medical record data can be obtained automatically or manually through the data interface of the telemedicine system and external public data sets. These data cover key medical information such as the patient's basic information (such as age, gender, medical history, etc.), diagnosis records, treatment plans, medication conditions, examination results, symptoms, diseases, etc.
[0083] After obtaining the electronic medical record data, the electronic medical record data can be preprocessed first to obtain corresponding target feature vectors.
[0084] Among them, preprocessing the electronic medical record data may include cleaning the obtained original electronic medical record data to remove duplicate, invalid or incorrect information.
[0085] At the same time, standardization processing is performed, such as unifying the data format and standardizing medical terms.
[0086] Among them, text preprocessing includes: word segmentation, splitting the medical text into individual words or phrases, which is the basis for subsequent processing. The medical text often contains a large number of professional terms, and special medical word segmentation tools or dictionaries need to be used for word segmentation. Stop word removal, removing meaningless words in the text, such as "of", "is", "in", etc., to reduce noise.
[0087] Part-of-speech tagging, which tags each word in the text as a noun, verb, adjective, etc., helps with subsequent word meaning understanding and feature extraction.
[0088] Named Entity Recognition (NER), which identifies medical entities in the text, such as disease names, drug names, anatomical locations, etc.
[0089] Using the Telchat-Attention-Augmented Bidirectional Encoder-Decoder with Contextual Embeddings (TAA-BDEC) method for bidirectional encoding of the content of electronic medical record text and knowledge representation, for subsequent question-and-answer matching.
[0090] Using techniques such as word vectors and sentence vectors to convert the text content into a numerical form that can be understood by a computer, i.e., a semantic model. This model can capture the deep semantic information in the text and helps with subsequent question-and-answer matching tasks.
[0091] After obtaining the target feature vector, a knowledge graph can be constructed based on the relationship between the target feature vector and each entity in the electronic medical record data; and a medical knowledge base can be generated according to the knowledge graph.
[0092] Specifically, techniques such as knowledge graphs and semantic webs can be used to map the entities and relationships in the text to a pre-constructed medical knowledge base, thereby extracting features at the semantic level. Based on the identified entities and relationships, a knowledge graph in the medical field is constructed. This graph represents entities as nodes and relationships as edges, forming a rich medical knowledge network.
[0093] In an embodiment of the present invention, the above method may further include the following steps:
[0094] Generate a training sample set according to historical medical consultation information and historical reply information; train a preset model according to the training sample set to obtain a target model.
[0095] In some feasible embodiments, a training sample set can also be generated according to historical medical consultation information and historical reply information. Then, a preset model can be trained according to the training sample set to obtain a target model.
[0096] Exemplarily, user questions and corresponding answers can be collected from the historical records of the telemedicine system.
[0097] Training of the Two-way Encoding Question-Answering Matching Method for Matching Pair Screening and Remote Medical Symptom Word Biased Content and Knowledge Representation (TAA-BDEC): According to context embedding, attention weights, semantic similarity, and symptom bias vector parameters, correct and incorrect matching question-and-answer pairs are screened out to form positive and negative sample sets for model training.
[0098] Model training: Use the established question-and-answer pair training set to train the preset model. By continuously iteratively optimizing the model parameters, the performance of the preset model on the training set is optimized to obtain the target model.
[0099] During the training process, optimization strategies such as gradient descent, regularization, and batch normalization are adopted to improve the generalization ability and convergence speed of the model.
[0100] In an embodiment of the present invention, when training the preset model according to the training sample set, it can be implemented through the following steps:
[0101] Set bias vectors for the keywords in the training sample set; train the preset model according to the training sample set with the set bias vectors.
[0102] In some feasible embodiments, bias vectors can also be set for the keywords in the training sample set. Exemplarily, in medical text processing, symptom words often carry key diagnostic information. To more effectively capture the importance of these symptom words, a learnable symptom word bias vector can be introduced in the TAA-BDEC+ method. This bias vector will be one of the model parameters and will be automatically adjusted during the training process to better identify and utilize symptom words.
[0103] Specifically, assume we have a symptom word library that contains a series of common symptom words, such as "fever", "cough", "pain", etc. For each word in the input text, we can check whether it belongs to the words in the symptom word library. If so, we will assign an additional bias vector to it to increase its importance in the model.
[0104] Then, the preset model can be trained according to the training sample set with the set bias vectors. Among them, the bias vectors can include symptom word bias vectors, disease word bias vectors, treatment suggestion bias vectors, complication bias vectors, etc., and the embodiments of the present invention do not limit this.
[0105] In an embodiment of the present invention, the target model is provided with a self-attention mechanism and a cross-attention mechanism.
[0106] In some feasible embodiments, the target model is provided with a self-attention mechanism and a cross-attention mechanism, and the attention mechanism is applied to identify the key parts in the question so as to give higher weights in the matching process.
[0107] Hereinafter, some or all of the above embodiments will be described in combination with specific examples:
[0108] First, some nouns are explained:
[0109] 1. TAA-BDE: Telchat-Attention-Augmented Bidirectional Encoder-Decoder with Contextual Embeddings, an attention-enhanced bidirectional encoding and decoding text question and answer method with contextual embeddings, is a bidirectional encoding question and answer matching method that integrates remote medical symptom word bias and knowledge representation, aiming to improve the accuracy and efficiency of medical information retrieval and question and answer matching through deep learning technology.
[0110] 2. Knowledge representation: Representing knowledge in a format that can be understood by a computer, facilitating intelligent processing and analysis by machines.
[0111] 3. Question and answer matching: Matching the most relevant answers from the knowledge base according to the user's question.
[0112] 4. Electronic medical record system: An information system applied in medical institutions, used to widely collect, store, manage, and utilize patients' medical information, including basic information, diagnosis records, treatment plans, medication conditions, examination results, etc., replacing traditional paper medical records in an electronic form.
[0113] 5. Information retrieval: In a medical information system, it refers to the process of quickly and accurately finding relevant information from a large amount of electronic medical record data according to specific query requirements.
[0114] 6. Knowledge representation: It refers to converting unstructured or semi-structured information in electronic medical records into a format that can be understood and operated by a computer, thereby facilitating knowledge reasoning and application by machines.
[0115] 7. Question and answer matching: In remote medical consultations, it refers to effectively corresponding the patient's questions with the answers provided by doctors or the information in electronic medical records to ensure the accuracy of the answers and meet the patient's needs.
[0116] 8. Remote medical consultation: A service model in which patients consult doctors about their conditions and obtain professional medical advice through remote communication technologies such as the Internet.
[0117] 9. Bidirectional Encoder: In the TAA-BDEC method, it refers to an encoder that can simultaneously consider the text context information, capture the deep semantic information in the text, and improve the accuracy of text understanding.
[0118] 10. Semantic Model: It converts the text content into a numerical form that can be understood by a computer, namely a semantic vector, which can capture the deep semantic information in the text and is used to support tasks such as question-answer matching.
[0119] 11. Symptom Recognition and Disease Recognition: By extracting the symptom keywords described by the patient and matching them with the symptoms in the electronic medical record, the possible disease types that the patient may have can be identified.
[0120] 12. Context Embedding: Use a pre-trained model to convert the text into a vector representation containing context information, and these vectors can capture the semantic, syntactic, and context relationships of the text.
[0121] 13. Attention Mechanism: In a deep learning model, it is used to identify the key parts in the input data and give these parts higher processing weights, thereby improving the model performance.
[0122] 14. Symptom Word Bias Vector b_bias: In medical text processing, it is the additional weight assigned to specific symptom words, aiming to enhance the importance of these symptom words in the model so as to more effectively capture key diagnostic information.
[0123] The embodiments of the present invention can be applied to the following scenarios:
[0124] 1. Remote Medical Consultation: The patient consults the doctor about the condition through a remote medical platform. The doctor needs to quickly review the patient's electronic medical record to understand the medical history and give an accurate answer based on the patient's specific questions and condition. The TAA-BDEC method can achieve a precise understanding of the patient's questions by integrating the text content and knowledge representation of the electronic medical record, and retrieve the key information related to the questions from the medical record. At the same time, based on the bidirectional encoding method, the method can effectively match the patient's questions with the information in the medical record to generate an accurate answer.
[0125] 2. Intelligent Retrieval of Electronic Medical Records: When writing a new electronic medical record or conducting scientific research analysis, doctors need to quickly retrieve and cite existing medical record data. However, due to the huge volume and complexity of medical record data, traditional retrieval methods are often inefficient. The TAA-BDEC method can achieve rapid retrieval and intelligent recommendation of medical record data by constructing a medical record index based on knowledge representation. Doctors only need to input keywords or phrases, and the system can automatically match and recommend relevant medical record data, improving the retrieval efficiency and accuracy.
[0126] 3. Auxiliary diagnosis decision-making. When doctors conduct telemedicine diagnosis, they need to comprehensively consider various information such as the patient's symptoms, medical history, and examination results. However, this information is often scattered in different medical record files and is difficult to quickly integrate and analyze. The TAA-BDEC method can achieve a comprehensive understanding and analysis of the patient's condition by fusing the text content and knowledge representation of electronic medical records. The system can automatically extract key information from medical records and perform reasoning and judgment based on a medical knowledge graph to provide support for doctors in making auxiliary diagnosis decisions.
[0127] Specifically, the embodiments of the present invention may include the following steps:
[0128] 1. Data acquisition and preprocessing:
[0129] Data acquisition: Automatically or manually acquire electronic medical record data through the data interface of the telemedicine system and external public data sets. These data cover key medical information such as the patient's basic information (such as age, gender, medical history, etc.), diagnosis records, treatment plans, medication conditions, examination results, symptoms, diseases, etc., and perform entity recognition and annotation.
[0130] Text preprocessing: Clean the acquired electronic medical record data to remove duplicate, invalid, or incorrect information. At the same time, perform standardization processing, such as unifying the data format and standardizing medical terms. The text preprocessing includes: Word segmentation, which divides the medical text into individual words or phrases, and this is the basis for subsequent processing. Medical texts often contain a large number of professional terms, and specialized medical word segmentation tools or dictionaries need to be used for word segmentation. Stop word removal, which removes meaningless words in the text, such as "of", "is", "in", etc., to reduce noise. Part-of-speech tagging, which tags the part of speech of each word in the text, such as noun, verb, adjective, etc., to facilitate subsequent word meaning understanding and feature extraction. Named entity recognition (NER), which identifies medical entities in the text, such as disease names, drug names, anatomical parts, etc., and uses the two-way encoding question-answering matching method (TAA-BDEC) of the telemedicine symptom word bias content and knowledge representation to perform two-way encoding on the text content and knowledge representation of the electronic medical record for subsequent question-answering matching.
[0131] 2. Knowledge representation construction:
[0132] Entity Recognition and Relationship Extraction: Using natural language processing (NLP) techniques and the BERT model, medical entities such as disease names, drug names, examination items, etc. are recognized from the preprocessed electronic medical record text. Further, through relationship extraction techniques, the association relationships between these entities are extracted, such as "disease - treatment drug" relationships, "examination - diagnosis" relationships, etc.; For example: Features based on the bag-of-words model: such as TF-IDF (term frequency - inverse document frequency), this method constructs feature vectors by statistically calculating the frequency of each word in the document and its inverse document frequency in the entire document set. Features based on word embeddings: Using models such as Word2Vec and GloVe to convert words into vector forms, these vectors can capture the semantic relationships between words. In the medical field, pre-trained medical word embedding models can be used. Syntactic features: Extract the syntactic structure information of the text, such as dependency syntactic analysis, which helps to understand the component relationships in the sentence and thus extract richer features.
[0133] Semantic features: Using technologies such as knowledge graphs and semantic webs, map the entities and relationships in the text to a pre-constructed medical knowledge base, thereby extracting semantic-level features.
[0134] Knowledge Graph Construction: Based on the recognized entities and relationships, construct a knowledge graph in the medical field. This graph represents entities as nodes and relationships as edges, forming a rich medical knowledge network.
[0135] Semantic Model: In addition to knowledge graphs, techniques such as word vectors and sentence vectors are also used to convert the text content into a numerical form that can be understood by computers, namely the semantic model. This model can capture the deep semantic information in the text and is helpful for subsequent question-and-answer matching tasks.
[0136] Symptom Recognition and Disease Recognition: When a patient describes symptoms, the medical Q&A assistant (i.e., the system mentioned above) extracts symptom keywords through a large model and matches them with the symptom descriptions in the electronic medical records. Based on the matched symptoms, use the telemedicine symptom word bias content and the two-way encoding question-and-answer matching method for knowledge representation (TAA-BDEC) to identify diseases and find the most likely disease type.
[0137] 3. Establishment of the Question-and-Answer Pair Training Set:
[0138] Collection of Historical Q&A Records: Collect user questions and corresponding answers from the historical records of the telemedicine system.
[0139] Training of the Two-way Encoding Question Answering Matching Method for Matching Pair Screening and Remote Medical Symptom Word Bias Content and Knowledge Representation (TAA-BDEC): According to context embedding, attention weights, semantic similarity, and symptom bias vector parameters, screen out the correctly matched question-and-answer pairs and the incorrectly matched question-and-answer pairs to form a positive and negative sample set for model training (i.e., the training sample set mentioned above).
[0140] 4. Training and Optimization of the Two-way Encoding Question Answering Matching Method for Remote Medical Symptom Word Bias Content and Knowledge Representation (TAA-BDEC):
[0141] Model Training: Use the established question-and-answer pair training set (i.e., the training sample set mentioned above) to train the model. Continuously iterate and optimize the model parameters to make the model perform optimally on the training set.
[0142] Optimization Strategies: During the training process, adopt optimization strategies such as gradient descent, regularization, and batch normalization to improve the generalization ability and convergence speed of the model.
[0143] 5. Implementation of the Two-way Encoding Question Answering Matching for Remote Medical Symptom Word Bias Content and Knowledge Representation (TAA-BDEC):
[0144] Encoding Stage:
[0145] Receiving User Questions: Receive the questions input by the user (i.e., medical consultation information) through the user interface of the remote medical system.
[0146] Input Processing: Given the input text X, first perform preprocessing operations such as word segmentation and stop word removal.
[0147] Word Embedding: Use BERT or a similar model to obtain the context word embedding representation of each word.
[0148] Feature Extraction: Combine exact matching and similarity calculation to extract key features from the input text.
[0149] Encoding: Encode the extracted features through a neural network layer, introduce a learnable bias vector, and obtain the encoded representation E(X).
[0150] Decoding Stage:
[0151] Question Parsing and Representation: Parse the received questions, extract key information, and convert it into a format compatible with the knowledge representation.
[0152] Candidate Generation: Based on the encoded representation E(X), generate a set of possible output candidates Y1, Y2,..., Yn.
[0153] Confidence calculation: For each candidate output \(Y_i\), calculate its confidence score \(C(Y_i)\). This score comprehensively considers factors such as semantic similarity and syntactic correctness.
[0154] Sorting and selection: Sort the candidate outputs according to the confidence scores and select the output with the highest confidence as the final result.
[0155] Similarity calculation and answer sorting: Use the trained deep learning model to calculate the similarity between the user's question and the information in the electronic medical record. Sort the possible answers according to the similarity scores.
[0156] Answer return: Return the sorted answer list (i.e., the first target reply information) to the user for their reference and selection.
[0157] 6.2 TAA - BDEC Bidirectional Encoding Q&A Matching Method:
[0158] Given the input text \(X = \{x_1, x_2, \ldots, x_m\}\), where \(x_i\) represents the \(i\)-th word in the text. First, use BERT or a similar model to obtain the context word embedding representation for each word:
[0159] Encoding stage:
[0160] \(e_i = BERT(x_i)\) where \(e_i\) is the embedding vector of the word \(x_i\). 2. Feature extraction and encoding Combine exact matching and similarity calculation to extract key features from the input text. Then, encode the extracted features through neural network layers. Assume the encoding layer is \(L\) layers, with weight \(W_l\), bias \(b_l\), and activation function \(f\) for each layer. Then we have: \([h_0 = e]\) \([h_l = f(W_l \cdot h_{l - 1}+b_l)]\) where \(h_l\) is the output of the \(l\)-th layer and \(e\) is the embedding vector matrix of the input text. The final encoded representation is: \([E(X)=h_L]\).
[0161] Decoding stage:
[0162] Candidate generation: Based on the encoded representation \(EX\), use the decoder to generate a set of possible output candidates \(Y=\{Y_1, Y_2, \ldots, Y_n\}\). The decoder adopts structures such as self - attention mechanism, LSTM, GRU, etc.
[0163] Confidence calculation: For each candidate output \(Y_i\), calculate its confidence score \(CY_i\). The confidence score comprehensively considers factors such as semantic similarity and syntactic correctness.
[0164] [C(Y_i)=\alpha\cdot Sim(EX,EY_i)+\beta\cdot Gram(Y_i)\] where \(Sim\) represents the semantic similarity function, \(Gram\) represents the syntactic correctness function, and \(\alpha\) and \(\beta\) are weight coefficients.
[0165] Sorting and Selection: Sort the candidate outputs according to the confidence scores and select the output with the highest confidence as the final result.
[0166] [Y^*=\arg\max_{Y_i}C(Y_i)\].
[0167] Contextual Embeddings
[0168] Use a pre-trained BERT model or other similar models to convert the question text and candidate answer text into vector representations containing context information. These vectors capture semantic, syntactic, and context dependencies in the text.
[0169] \mathbf{h} q =BERT(Q), \mathbf{h} a =BERT(A);
[0170] where Q is the question text, A is the candidate answer text, \mathbf{h} q and \mathbf{h} a are their respective contextual embedding representations.
[0171] Attention Mechanism:
[0172] Apply the attention mechanism to identify the key parts in the question so as to give higher weights during the matching process. Use self-attention and cross-attention mechanisms.
[0173]
[0174] textscore(a, b)=a T Wb;
[0175] where \alpha ij is the attention weight from the \(i\)-th word in the question to the \(j\)-th word in the answer, the score function is used to calculate the similarity between two vectors, and W is a learnable weight matrix.
[0176] Attention-Augmented Representations:
[0177] Perform a weighted sum on the embedded representation of the answer using attention weights to obtain an attention-enhanced representation that focuses more on the semantic recognition part related to the question.
[0178]
[0179] Introduction of symptom word bias vector:
[0180] In medical text processing, symptom words often carry key diagnostic information. To more effectively capture the importance of these symptom words, we can introduce a learnable symptom word bias vector in the TAA - BDEC+ method. This bias vector will be one of the model parameters and will be automatically adjusted during the training process to better identify and utilize symptom words.
[0181] Specifically, assume we have a symptom word library that contains a series of common symptom words such as "fever", "cough", "pain", etc. For each word in the input text, we can check whether it belongs to the words in the symptom word library. If so, we will assign an additional bias vector to it to increase its importance in the model.
[0182] Introduce a learnable symptom word bias term to capture the key information of the symptom words with the highest weights in medical texts:
[0183] Textscore(a, b) = a T Wb + b bias ;
[0184] where b bias is a learnable symptom word bias vector whose dimension is the same as that of the word embedding vector. For each word xi, we can add its word embedding vector ei to the corresponding bias vector to obtain a new representation:
[0185] `
[0186] e i = e i + b bias ;
[0187] The importance of different symptom words may vary in a specific context. To address this issue, we assign a learnable weight to each symptom word so that the model can automatically adjust the importance of each symptom word according to the data. Assuming the size of the symptom word library is \(S\), we can define a learnable weight matrix \(W_{\text{symptom}}\in\mathbb{R}^{S\times d}\), where \(d\) is the dimension of the word embedding vector. For each symptom word \(s_j\) (assuming its position in the input text is \(i\)), we can add its corresponding weight vector \(w_j\) to the word embedding vector: \([e'_i = e_i + w_j]\) However, this method requires us to know whether each word is a symptom word and its index in the symptom word library. In practical applications, this may increase the complexity of preprocessing. A simpler method is to use a binary mask vector to represent whether each word is a symptom word and then multiply it by a bias vector. Suppose we have a mask vector \(m\in\{0,1\}^m\) with the same length as the input text, where \(m_i = 1\) if \(x_i\) is a symptom word and \(m_i = 0\) otherwise. Then, we can multiply the mask vector by the bias vector to obtain an additional bias for each word: \([b_{\text{extra}} = m\odot b_{\text{bias}}]\) where \(\odot\) represents element-wise multiplication. Finally, we add this additional bias to the original word embedding vector: \([e'_i = e_i + b_{\text{extra},i}]\).
[0188] Matching Calculation&Decoding:
[0189] Use the enhanced representation to calculate the matching degree between the question and the candidate answers. To evaluate the model's ability to understand the bias of medical symptom words, we can introduce a scoring mechanism. This mechanism can score the answers or matching results generated by the model based on cosine similarity, BLEU score, or other relevant metrics.
[0190]
[0191] Among them, \(V_{answer}\) is the vector representation of the answer generated by the model, and \(V_{reference}\) is the vector representation of the reference answer.
[0192]
[0193] Finally, use the classifier linear layer softmax to select the best option based on the matching degree score and generate an answer through the decoder.
[0194] 6.3 Dataset Acquisition:
[0195] The publicly available datasets for understanding medical symptom word biases mainly include:
[0196] DiaKG (Diabetes Knowledge Graph Dataset), which contains 22,050 medical entities and 6,890 entity relationships, covering all aspects of diabetes. Through this dataset, researchers can gain in-depth knowledge of diabetes-related information and provide support for developing more effective diabetes management and treatment programs.
[0197] Spinal Disease Dataset (Magnetic Resonance Imaging Dataset for Spinal Diseases): This is a magnetic resonance imaging dataset focused on spinal diseases. It contains a large number of spinal MRI images and related diagnostic information, which helps researchers develop more accurate diagnostic and treatment methods for spinal diseases.
[0198] CBLUE (Chinese Medical Information Processing Evaluation Benchmark): This dataset includes task datasets from real medical scenarios, such as medical text information extraction, medical term normalization, medical text classification, etc. CBLUE aims to promote the development of Chinese medical NLP technology and community and improve the quality of standardized datasets in the medical industry.
[0199] MIMIC (Health Dataset for Intensive Care Patients), which is an unidentifiable health dataset related to approximately 40,000 intensive care patients. It includes information such as vital signs, laboratory tests, and drug treatments, providing researchers with rich medical resources to study the health conditions and treatment programs of intensive care patients.
[0200] The medical record datasets obtained through the telemedicine system interface mainly include:
[0201] Patient basic information:
[0202] Patient ID: The number that uniquely identifies the patient.
[0203] Name: The real name of the patient or the anonymized name.
[0204] Gender: The gender of the patient, usually "male" or "female".
[0205] Age: The age of the patient, which can be specific to years or months.
[0206] Contact Information: The contact phone number or email address of the patient for subsequent communication.
[0207] Diagnostic information:
[0208] Diagnosis ID: The number that uniquely identifies the diagnostic record.
[0209] Patient ID: The patient number associated with the diagnosis record.
[0210] Diagnosis Date: The specific date on which the diagnosis occurred.
[0211] Diagnosis Name: The name or description of the disease, such as "hypertension", "diabetes", etc.
[0212] Diagnosis Description: A detailed description of the disease condition, including symptoms, signs, etc.
[0213] Treatment Information:
[0214] Treatment ID: The number that uniquely identifies the treatment record.
[0215] Patient ID: The patient number associated with the treatment record.
[0216] Treatment Date: The date on which the treatment began.
[0217] Treatment Method: The treatment means or drug name adopted.
[0218] Treatment Description: A detailed description of the treatment process, including medication dosage, surgical steps, etc.
[0219] Examination and Test Results:
[0220] Examination / Test ID: The number that uniquely identifies the examination or test record.
[0221] Patient ID: The patient number associated with the examination or test record.
[0222] Examination / Test Date: The date on which the examination or test was conducted.
[0223] Examination / Test Item: The name of the examination or test item conducted.
[0224] Result Description: The description of the result of the examination or test, which may include numerical values, images, etc.
[0225] Medical Record:
[0226] Medical Record ID: The number that uniquely identifies the medical record.
[0227] Patient ID: The patient number associated with the medical record.
[0228] Date of Visit: The date on which the patient visited.
[0229] Chief Complaint and Current Medical History: The description of the patient's chief complaint and current disease condition.
[0230] Past Medical History and Family History: The description of the patient's past medical history and family disease history.
[0231] Physical examination: Records of the physical examination performed on the patient.
[0232] Diagnosis and treatment advice: The doctor's diagnosis conclusion and treatment suggestions.
[0233] 6.4 Example:
[0234] Knowledge inquiry scenario:
[0235] Patient: Hello, I've been feeling a sore throat and a bit feverish lately. Could I have a cold?
[0236] Medical knowledge Q&A assistant (AI robot): Hello, based on your description, a sore throat and fever are indeed common symptoms of a cold. But to make a more accurate judgment, I need to confirm some information with you. Do you have any other symptoms, such as coughing, runny nose, or body weakness?
[0237] Patient: Yes, I also have some coughing and feel weak.
[0238] Medical knowledge Q&A assistant (AI robot): Based on your symptom description, you are very likely to have caught a cold. A cold is usually caused by a virus and, in addition to a sore throat and fever, may also be accompanied by coughing and body weakness. To relieve the symptoms, I suggest you drink plenty of water and get enough rest. Additionally, you can consider taking some over-the-counter cold medicines to relieve the symptoms.
[0239] Patient: Do I need to go to the hospital to see a doctor?
[0240] Medical knowledge Q&A assistant (AI robot): If your symptoms are not severe, they usually can resolve on their own. But if the symptoms continue to worsen or there are serious conditions such as persistent high fever or difficulty breathing, it is recommended that you seek medical attention promptly.
[0241] Patient: Okay, I understand. Then what over-the-counter cold medicines are available?
[0242] Medical knowledge Q&A assistant (AI robot): There are many over-the-counter cold medicines available on the market. For example, cold medicines containing antipyretic and analgesic ingredients can relieve the symptoms of fever and sore throat. But please note that if the symptoms do not improve or worsen, seek medical attention promptly and follow the doctor's advice when using medications.
[0243] Patient: I also want to ask, can a cold cause other complications?
[0244] Medical knowledge Q&A assistant (AI robot): A cold itself usually does not cause serious complications. However, if the treatment is improper or the treatment is delayed, it may sometimes lead to some complications, such as bronchitis, pneumonia, etc. Therefore, timely treatment and sufficient rest are very important.
[0245] Patient: Okay, thank you for your advice.
[0246] Medical Knowledge Q&A Assistant (AI Robot): You're welcome. Wish you a speedy recovery!
[0247] As Figure 3 shown:
[0248] Step 1 Symptom Recognition and Confirmation.
[0249] Rule: When the patient describes symptoms, the medical Q&A assistant first recognizes and confirms these symptoms.
[0250] Logic: Use natural language processing technology to extract keywords and match them with a predefined symptom library to ensure accurate recognition. Identify "sore throat" and "fever" as key symptoms.
[0251] Step 2 Preliminary Disease Judgment.
[0252] Rule: Based on the recognized symptoms, the medical Q&A assistant makes a preliminary judgment on the disease.
[0253] Logic: Use the TAA - BDEC method, combined with electronic medical record data and medical knowledge base, to find the disease type most relevant to the symptoms. Based on these symptoms, preliminarily judge that the patient may have a cold.
[0254] Step 3 Information Supplement and Confirmation.
[0255] Rule: After the preliminary judgment, the medical Q&A assistant asks the patient if there are any other related symptoms or information to improve the diagnosis.
[0256] Logic: Through the dialogue management strategy, guide the patient to provide more key information to improve the diagnosis accuracy. Ask if there are other symptoms (such as cough, body weakness) to confirm the diagnosis. If not supplemented completely, continue the preliminary judgment. If supplemented completely, proceed to Step 4.
[0257] Step 4 Treatment Plan and Drug Recommendation.
[0258] Rule: According to the diagnosis result, the medical Q&A assistant provides the corresponding treatment plan and drug recommendation.
[0259] Logic: Combine the patient's specific situation (such as age, gender, allergy history, etc.) and the medical knowledge base to generate personalized treatment suggestions. According to the cold symptoms, use the TAA - BDEC method to match and find over - the - counter cold medicine and sufficient rest as the treatment plan. If not matched, re - conduct the preliminary disease judgment; if matched, determine the treatment plan and drug recommendation.
[0260] Step 5 Health Consultation and Prevention Suggestions.
[0261] Rule: For patients' health consultation questions, the medical Q&A assistant will provide relevant health knowledge and preventive suggestions.
[0262] Logic: Retrieve authoritative medical resources to ensure the accuracy and reliability of the information provided, answer patients' consultations about possible complications caused by colds, and provide preventive suggestions. Based on the consultations and suggestions, the weights of the knowledge base can be updated.
[0263] Step 6 Medical knowledge answering.
[0264] Rule: For questions involving medical terms or concepts, the medical Q&A assistant will provide explanations and answers.
[0265] Logic: Utilize the medical knowledge base to transform complex medical information into language that is easy for patients to understand.
[0266] Step 7 Emergency situation handling.
[0267] Rule: If the symptoms or situations described by the patient indicate a possible emergency, the medical Q&A assistant will immediately remind the patient to seek professional medical help.
[0268] Logic: Set up a list of emergency symptom keywords, and once triggered, immediately initiate the emergency response process.
[0269] Step 8 Answer optimization and feedback collection.
[0270] Rule: According to the feedback and satisfaction evaluation of users, continuously optimize the answer generation logic and adjust the weight values to optimize the matching accuracy of the TAA - BDEC method.
[0271] Logic: Collect feedback data such as users' satisfaction evaluations of the answers, supplementary information, and correction opinions. Use this data to iteratively optimize the deep learning model and matching algorithm to improve the accuracy of the answers and user satisfaction.
[0272] Overview, the two - way encoding Q&A matching (TAA - BDEC) rules and applications of remote medical symptom word bias content and knowledge representation, as Figure 4 shown:
[0273] First, obtain the questions input by the client user. Then:
[0274] Symptom feature matching:
[0275] Identify and match the symptoms described by the patient with the common symptoms of a cold.
[0276] Sore throat, fever, cough, and body fatigue are typical symptom combinations of a cold.
[0277] Symptom feature solving and adding word bias:
[0278] Let \(X_{ij}\in a_{qk}\), \(f(x)\in(0 - 1)\), \(f(x)=a_{qk}(X_{ij})+b_{bias}\).
[0279] Disease feature matching:
[0280] Match the patient's condition with the disease features of a cold according to the symptom combination.
[0281] A cold is usually caused by a virus and is accompanied by various symptoms mentioned above.
[0282] Disease feature solving and adding word bias:
[0283] Let \(Y_{ij}\in a_{qk}\), \(f(y)\in(0 - 1)\), \(f(y)=a_{qk}(Y_{ij})+b_{bias}\).
[0284] Treatment advice feature matching:
[0285] Match the patient's symptoms with the conventional treatment and care advice for a cold.
[0286] Provide standard treatment advice for a cold, such as rest, fluid replacement, and medication relief.
[0287] Treatment advice feature solving and adding word bias:
[0288] Let \(Z_{ij}\in a_{qk}\), \(f(z)\in f(x)f(y)\), \(f(z)=a_{qk}(z_{ij})+2b_{bias}\).
[0289] Complication feature matching:
[0290] For the patient's inquiries about complications, match the information on possible complications caused by a cold.
[0291] Provide knowledge on potential complications related to a cold and emphasize the importance of prevention and treatment.
[0292] Complication feature solving and adding word bias:
[0293] Let \(H_{ij}\in\sqrt{a_{qk}} / 2\), \(f(h)\in2f(x)\), \(f(h)=a_{qk}(h_{ij})+a_{qk}(X_{ij})\).
[0294] For symptom feature matching, disease feature matching, treatment advice feature matching, and complication feature matching, a learnable hyperparameter bias vector can be set to bias the key words.
[0295] Exact matching:
[0296] Rule: The Q&A assistant uses the (TAA-BDEC) method to calculate the total similarity of symptom feature matching, disease feature matching, treatment advice feature matching, and complication feature matching by obtaining weight similarity, and finds keywords or phrases that exactly match the patient's input, such as "sore throat", "fever", "cold", etc.
[0297] Application: In the conversation, when the patient clearly mentions "sore throat" and "fever", the Q&A assistant directly uses the (TAA-BDEC) method to precisely match these symptoms with the common symptoms of a cold, thus initially judging that the patient may have a cold.
[0298] Fuzzy matching and similarity calculation:
[0299] Rule: When the patient's input does not exactly match the preset keywords, the Q&A assistant will use fuzzy matching technology combined with the (TAA-BDEC) method to find semantically similar or identical words and expressions.
[0300] Application: Although "feeling weak in the body" mentioned by the patient is not a standard medical term, the Q&A assistant can fuzzily match the symptom of "physical fatigue", indicating that it understands the patient's intention.
[0301] Context integration:
[0302] Rule: The Q&A assistant will combine the context information of the conversation to comprehensively understand the patient's current state and needs, rather than just based on a single input statement.
[0303] Application: During the conversation, based on the initial symptoms (sore throat, fever) provided by the patient and the subsequent supplementary symptoms (cough, physical fatigue), the Q&A assistant uses the (TAA-BDEC) method to comprehensively judge that the patient may have a cold and gives corresponding treatment advice. This reflects the role of context information integration in enhancing the coherence and accuracy of the conversation.
[0304] Confidence ranking:
[0305] Rule: The Q&A assistant will assign a confidence score to each possible answer according to different information sources and matching degrees. These scores reflect the relevance and accuracy between the answer and the patient's input.
[0306] Application: When giving treatment advice, the Q&A assistant first recommends some common over-the-counter cold medicines because these suggestions are based on widely recognized medical knowledge and have a high confidence level. When the patient asks whether medical treatment is needed, the Q&A assistant gives a more cautious advice according to the severity of the symptoms and potential risks, which also reflects the consideration of the confidence of different information.
[0307] As Figure 5 、 Figure 6 and Figure 7 show some interaction interfaces of the system mentioned in the embodiments of the present invention:
[0308] As Figure 5 shown, an "input text box" can be displayed in the interaction interface, and various function buttons can also be displayed, such as: symptom self-check, drug query, traditional Chinese medicine syndrome differentiation, report interpretation, hospital recommendation, department recommendation, diet advice, etc.
[0309] As Figure 6 shown, the background can display management buttons such as a session list, recommendation management, session settings, session logs, etc.
[0310] As Figure 7 shown, the user can input information in the interaction interface and display the information generated by the system to the user in the interaction interface.
[0311] In the embodiments of the present invention, medical consultation information input by the user is received; the medical consultation information is preprocessed to obtain first text information; the first text information is converted into computer-recognizable information; the computer-recognizable information is input into a preset target model to obtain a first diagnosis result information for the medical consultation information output by the target model; according to the first diagnosis result information, a first target reply information for the medical consultation information is generated and fed back to the user. Through the embodiments of the present invention, the influence of irrelevant information on the matching result can be reduced, the accuracy of text understanding can be improved, the remote medical service experience can be optimized, and the medical cost can be reduced.
[0312] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.
[0313] Referring to Figure 8 shows a schematic structural diagram of a question-and-answer device for medical consultation according to an embodiment of the present invention, which may include the following modules:
[0314] A receiving module 801, configured to receive medical consultation information input by the user and convert the medical consultation information into computer-recognizable information;
[0315] A prediction module 802, configured to input computer-recognizable information into a preset target model, and obtain first diagnostic result information for medical consultation information output by the target model; the first diagnostic result information determined from a preset medical knowledge base by the target model based on a context-embedded attention-enhanced bidirectional encoding method.
[0316] A feedback module 803, configured to generate a first target reply message for the medical consultation information according to the first diagnostic result information, and feedback the first target reply message to the user.
[0317] In an optional embodiment of the present invention, a receiving module 901 is configured to preprocess the medical consultation information to obtain first text information; and convert the first text information into computer-recognizable information.
[0318] In an optional embodiment of the present invention, the device further includes:
[0319] An inquiry module, configured to generate an inquiry message for the medical consultation information, and feedback the inquiry message to the user; receive a reply message input by the user for the inquiry message, and input the reply message and the computer-recognizable information into a preset target model to obtain second diagnostic result information output by the target model; generate a second target reply message according to the second diagnostic result information, and feedback the second target reply message to the user.
[0320] In an optional embodiment of the present invention, the device further includes:
[0321] A modeling module, configured to collect electronic medical record data, preprocess the electronic medical record data to obtain target feature vectors; construct a knowledge graph according to the target feature vectors and the relationships between entities in the electronic medical record data; and generate a medical knowledge base according to the knowledge graph.
[0322] In an optional embodiment of the present invention, the device further includes:
[0323] A training module, configured to generate a training sample set according to historical medical consultation information and historical reply information; and train a preset model according to the training sample set to obtain a target model.
[0324] In an optional embodiment of the present invention, the training module is configured to set a bias vector for keywords in the training sample set; and train the preset model according to the training sample set with the set bias vector.
[0325] In an optional embodiment of the present invention, the target model is provided with a self-attention mechanism and a cross-attention mechanism.
[0326] In an embodiment of the present invention, medical consultation information input by a user is received, and the medical consultation information is converted into computer-recognizable information; the computer-recognizable information is input into a preset target model to obtain first diagnosis result information output by the target model for the medical consultation information; the target model determines the first diagnosis result information from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method; according to the first diagnosis result information, a first target reply information for the medical consultation information is generated, and the first target reply information is fed back to the user. Through the embodiment of the present invention, the influence of irrelevant information on the matching result can be reduced, the accuracy of text understanding can be improved, the remote medical service experience can be optimized, and the medical cost can be reduced.
[0327] An embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the above-mentioned question-and-answer method for medical consultation is implemented.
[0328] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned question-and-answer method for medical consultation is implemented.
[0329] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment.
[0330] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, refer to each other.
[0331] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0332] Embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0333] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0334] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0335] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0336] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
[0337] The above has introduced in detail a method, device, electronic device and storage medium for answering questions in medical consultation. In this text, specific examples are used to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A question-and-answer method for medical consultation, characterized in that: The method comprises: Receiving medical consultation information input by a user, and converting the medical consultation information into computer-recognizable information; Inputting the computer-recognizable information into a preset target model to obtain first diagnosis result information output by the target model for the medical consultation information; the target model determines the first diagnosis result information from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method; According to the first diagnosis result information, first target reply information for the medical consultation information is generated, and the first target reply information is fed back to the user.
2. The method according to claim 1, characterized in that The receiving of medical consultation information input by a user and converting the medical consultation information into computer-recognizable information includes: Preprocessing the medical consultation information to obtain first text information; The first text information is converted into the computer recognizable information.
3. The method according to claim 1, characterized in that The method further comprises: generating inquiry information for the medical consultation information, and feeding back the inquiry information to the user; Receiving reply information input by the user in response to the inquiry information, and inputting the reply information and the computer-recognizable information into a preset target model to obtain second diagnosis result information output by the target model; Second target reply information is generated according to the second diagnosis result information, and the second target reply information is fed back to the user.
4. The method according to claim 1, characterized in that: The method further comprises: Collecting electronic medical record data, and preprocessing the electronic medical record data to obtain a target feature vector; Constructing a knowledge graph based on the target feature vector and the relationship between entities in the electronic medical record data; The medical knowledge base is generated according to the knowledge graph.
5. The method according to claim 1, characterized in that The method further comprises: Generate a training sample set based on historical medical consultation information and historical response information; The preset model is trained according to the training sample set to obtain the target model.
6. The method according to claim 5, characterized in that The step of training the preset model according to the training sample set includes: Setting a bias vector for the keywords in the training sample set; The preset model is trained according to the training sample set for setting the bias vector.
7. The method according to claim 5, characterized in that The target model is provided with a self-attention mechanism and a cross-attention mechanism.
8. A question-and-answer device for medical consultation, characterized in that: The device comprises: A receiving module, used for receiving medical consultation information input by a user and converting the medical consultation information into computer-recognizable information; A prediction module, configured to input the computer-recognizable information into a preset target model to obtain first diagnosis result information output by the target model for the medical consultation information; the target model determines the first diagnosis result information from a preset medical knowledge base based on a context-embedded attention-enhanced bidirectional encoding method; A feedback module is used to generate first target reply information for the medical consultation information according to the first diagnosis result information, and to feed back the first target reply information to the user.
9. An electronic device, characterized in that: It comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the question-and-answer method for medical consultation as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the medical consultation question-and-answer method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Medical auxiliary question answering method and device, electronic equipment and storage medium
CN121233734A
Assessment method and system of medical question-answering system and electronic equipment
CN122086734A