Question answering shunt method, system, device and medium based on patient intent recognition
By preprocessing and intent recognition of user-inputted medical questions, and combining user profiles and historical records to retrieve information from the medical knowledge base, personalized question-and-answer results are generated. Content verification and traffic distribution are then performed, solving the problems of insufficient accuracy and security risks in existing medical question-and-answer systems, and achieving an efficient and secure optimization of the question-and-answer system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 北京啄木鸟云健康科技有限公司
- Filing Date
- 2026-02-26
- Publication Date
- 2026-06-05
AI Technical Summary
Existing medical question-answering systems cannot dynamically triage and manually intervene based on the patient's confidence level and the risk level of the question. They also fail to fully construct contextual information tailored to individual patient characteristics, resulting in insufficient accuracy of answers and potential security risks.
By acquiring and preprocessing medical questions input by users, analyzing them using a pre-trained intent recognition model, and combining user profiles and historical consultation records to retrieve information from a medical knowledge base, question-and-answer results are generated. Content verification and distribution are then performed, and user and medical staff feedback is incorporated to optimize model parameters.
It improves the accuracy and security of the question-and-answer system, enables personalized semantic completion and content focus, reduces the risk of answering irrelevant questions, and ensures the efficiency and security boundaries of the question-and-answer system.
Smart Images

Figure CN122154866A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of medical intelligent question answering, and in particular to a question answering triage method, system, device and medium based on patient intent recognition. Background Technology
[0002] Currently, with the rapid development of intelligent medical question-and-answer platforms, more and more patients are submitting health consultation requests through online channels and relying on question-and-answer systems to obtain preliminary guidance such as disease identification, medication advice, and examination interpretation. To improve the efficiency and personalization of question-and-answer processes, some systems have introduced natural language processing models and knowledge base retrieval technology to analyze and answer the medical questions entered by users.
[0003] Existing medical question-answering solutions typically employ static intent classification models to determine a single intent in the user's input question, then directly execute the corresponding templated response or retrieve relevant knowledge content to return results. However, this type of solution still has significant technical shortcomings in practical applications: First, it ignores the complexity of patients' expressions in different contexts, resulting in low accuracy in intent recognition; second, it fails to effectively integrate patient profiles, historical records, and semantic background, leading to a lack of personalization and contextual understanding in the generated answers; third, it lacks a question-answering quality control mechanism based on risk level and model confidence, posing security risks for automatic responses in high-risk scenarios.
[0004] The existing technical solutions mentioned above have the following drawbacks: the existing medical question-and-answer systems cannot dynamically divert and manually intervene in the question-and-answer process based on the patient's confidence level and the risk level of the question, nor can they fully incorporate contextual information based on the individual characteristics of the patient into the generation process, resulting in insufficient accuracy of the answers, and therefore there is room for improvement. Summary of the Invention
[0005] To improve the response accuracy of medical question-and-answer systems, this application provides a question-and-answer triage method, system, device, and medium based on patient intent recognition.
[0006] The above-mentioned objective of this application is achieved through the following technical solution:
[0007] A question-and-answer routing method based on patient intent recognition, the method comprising:
[0008] Obtain the medical question input by the user, perform preprocessing operations on the medical question, and obtain the preprocessed medical question;
[0009] The preprocessed medical question is input into a pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values.
[0010] Based on the intent classification results, a search operation is performed in the preset medical knowledge base to obtain the corresponding search knowledge entries;
[0011] Contextual information is constructed by combining user profiles, user history consultation records, intent classification results, and retrieval knowledge entries;
[0012] The context information is input into the question-answering model for analysis, and question-answering results are generated.
[0013] Perform content validation on the question-and-answer results to obtain validation results, and perform question-and-answer result distribution and response processing based on the validation results;
[0014] The system receives feedback from users and medical staff, and optimizes the parameters of the preset medical knowledge base, the pre-trained intent recognition model, and the question-answering model based on the feedback.
[0015] By adopting the above technical solutions, and by acquiring and preprocessing user-inputted medical questions, the system can standardize user language input, extract effective information, and reduce the interference of ambiguous expressions on subsequent model judgments, thereby improving the accuracy of semantic recognition. By inputting the preprocessed questions into a pre-trained intent recognition model for analysis, intent information can be obtained, allowing for clear classification of user needs and quantifying the model's confidence in the recognition results, thus providing a basis for the reliability of subsequent response strategies. By performing a retrieval operation in the medical knowledge base based on the intent classification results, highly relevant professional knowledge items can be quickly matched, improving the accuracy and professionalism of the question-and-answer content, thereby reducing the risk of irrelevant answers or knowledge illusions. Furthermore, by combining user profiles, historical consultation records, intent classification results, and other relevant data, the system can effectively address user needs. By constructing contextual information from knowledge entries, personalized semantic completion and content focus can be achieved for individual users, thereby improving the contextual consistency of the answer and the user experience. By inputting contextual information into the question-answering model to generate answers, responses that better fit the patient's context and semantic boundaries can be output, thus improving the relevance and credibility of the question-answering system. By validating the content of the question-answering results and distributing them according to confidence level and risk level, a reasonable separation between automatic response and manual review can be achieved, thereby strengthening the security boundaries of medical question-answering while ensuring efficiency. By incorporating user and medical staff feedback to optimize the knowledge base and model parameters, the response accuracy and scenario adaptability of the question-answering system can be continuously improved, thereby achieving the evolvable optimization and closed-loop iteration of the medical question-answering system.
[0016] In one example, this application can be further configured as follows: obtaining the medical question input by the user, performing a preprocessing operation on the medical question to obtain a preprocessed medical question, specifically includes:
[0017] The medical question is segmented using a pre-defined thesaurus to obtain the segmentation results;
[0018] The word segmentation results are then subjected to part-of-speech tagging to obtain a tagged word sequence;
[0019] The annotated word sequence is filtered for stop words based on a preset stop word list to obtain a valid word sequence;
[0020] Entity extraction is performed on the effective word sequence to obtain the preprocessed medical question.
[0021] By employing the above technical solutions, and using a pre-defined lexicon to perform word segmentation on medical questions, word boundaries can be identified and semantic basic units extracted, thus providing structural support for semantic analysis. Part-of-speech tagging of the segmentation results enhances sentence component recognition capabilities, providing grammatical support for subsequent entity extraction and intent modeling. Filtering based on a pre-defined stop word list effectively eliminates irrelevant or redundant information, improving the signal-to-noise ratio of the input data and thus increasing model input efficiency. Entity extraction from effective word sequences identifies key entities related to the medical field (such as diseases, drugs, and body parts), significantly enhancing the accuracy of subsequent intent recognition and knowledge matching.
[0022] In one example, this application can be further configured such that the question-and-answer triage method based on patient intent recognition also includes:
[0023] A medical question training set is constructed, which includes medical questions labeled with five types of intent tags: disease consultation, medication consultation, interpretation of test results, consultation on medical advice, and judgment of the necessity of medical treatment.
[0024] Extract question semantic vectors, keyword weights, and medical entity annotation features from each training data in the medical question training set to construct a multimodal input feature vector;
[0025] The multimodal input feature vector is input into a pre-trained model based on the BERT structure, and fine-tuned using the cross-entropy loss function to obtain the pre-trained intent recognition model.
[0026] By adopting the above technical solutions and constructing a training set of medical questions containing five types of labels, we can cover common types of user consultations, enhance the model's adaptability to diverse medical scenarios, and thus improve the model's generalization effect. By extracting multimodal features such as semantic vectors, keyword weights, and entity annotations from the training data, we can express question information from multiple perspectives, including the semantic layer, keyword layer, and entity layer, thereby enhancing the model's ability to express user input. By inputting the above features into a BERT-structured model and fine-tuning the training, the model can learn the semantic distribution patterns unique to medical scenarios, thereby improving the accuracy and robustness of the intent recognition model in the medical field.
[0027] In one example, this application can be further configured such that: the preprocessed medical question is input into a pre-trained intent recognition model for analysis to obtain intent information, specifically including:
[0028] The preprocessed medical questions are converted into semantic representation vectors;
[0029] Extract keyword features and medical entity features from the semantic representation vector to construct joint input features;
[0030] The joint input features are input into the pre-trained intent recognition model for inference, and the intent information is output.
[0031] By adopting the above technical solution, the preprocessed medical questions can be transformed into semantic representation vectors, enabling semantic mapping of language content to vector space, thus providing a unified representation for multimodal feature fusion and subsequent modeling. By extracting keywords and medical entity features from the semantic representation and constructing joint input features, the model's understanding of the semantic core can be strengthened, thereby improving the discriminative ability of intent recognition. By inputting the joint input features into the intent recognition model for reasoning and outputting intent information, efficient and accurate intent classification and confidence assessment can be achieved, thus providing a quantifiable basis for subsequent response decisions.
[0032] In one example, this application can be further configured as follows: based on the intent classification result, a retrieval operation is performed in a preset medical knowledge base to obtain the corresponding retrieval knowledge entries, specifically including:
[0033] The preprocessed medical question is input into the semantic vector generation model to generate the corresponding semantic vector;
[0034] Based on the intent classification results, determine the target retrieval category and the corresponding retrieval similarity threshold;
[0035] In the preset medical knowledge base, in the vector sub-knowledge base corresponding to the target retrieval category, using the semantic vector as the retrieval query, vector similarity matching is performed to obtain a set of candidate knowledge entries;
[0036] The candidate knowledge entries are sorted to obtain the retrieved knowledge entries.
[0037] By adopting the above technical solutions, and inputting preprocessed medical questions into a semantic vector generation model to generate semantic vectors, unstructured text can be transformed into a computationally dense expression, thus supporting vectorized retrieval. By dynamically determining the target retrieval category and similarity threshold based on intent classification results, precise constraints and accuracy control of the retrieval scope can be achieved, thereby improving retrieval relevance. By performing similarity matching in the vector sub-knowledge base corresponding to the target category to obtain a set of candidate knowledge items, the contextual consistency and knowledge relevance of the matching can be improved, thereby reducing the risk of answering the wrong question. By ranking the candidate items, the highest quality results can be presented first, thereby improving the professionalism of the final question-and-answer output and user satisfaction.
[0038] In one example, this application can be further configured as follows: the construction of contextual information by combining user profiles, user historical consultation records, intent classification results, and retrieved knowledge entries specifically includes:
[0039] Extract user input information to generate user profile information, which includes age, gender, and underlying diseases;
[0040] Retrieve corresponding historical consultation records based on user identifier;
[0041] Based on the intent classification results, the semantic boundaries and content focus range of the current question-and-answer scenario are defined;
[0042] The context information is generated by fusing key information paragraphs from the retrieved knowledge entries with the user profile, the user's historical consultation records, and the intent information.
[0043] By employing the aforementioned technical solutions, user profiles containing age, gender, and underlying diseases can be generated by extracting user input information. This allows for the construction of individualized tags tailored to patient characteristics, thereby enhancing the personalized adaptability of question-and-answer scenarios. By accessing users' historical consultation records, contextual semantic traces in continuous consultations can be mined, improving semantic continuity and content coherence. By combining intent classification results to set semantic boundaries for question-and-answer scenarios, the semantic scope and depth of generated content can be controlled, thus avoiding issues of generalization or overreach in generated content. By integrating user profiles, historical records, and intent information into the key information segments of search entries to generate contextual information, dynamic, personalized, and highly context-consistent question-and-answer input can be achieved, thereby improving the generation accuracy and response performance of the question-and-answer model.
[0044] In one example, this application can be further configured as follows: performing content validation on the question-and-answer results to obtain validation results, and performing question-and-answer result distribution and response processing based on the validation results, specifically including:
[0045] Determine whether the classification confidence probability value in the intent information is lower than a preset confidence threshold;
[0046] Based on the intent classification result, the corresponding intent risk level is found, where the intent risk level is a high, medium, or low risk level label configured according to preset rules;
[0047] If the classification confidence probability value is lower than the confidence threshold, or the intention risk level is high risk, the question and answer result will be submitted to the manual review channel for medical staff to confirm or modify the content.
[0048] If the classification confidence probability value is higher than the confidence threshold and the intention risk level is low, then the question and answer result is returned to the user terminal to complete the question and answer distribution.
[0049] By adopting the above technical solutions, the uncertainty of the model output can be quantitatively assessed by judging whether the classification confidence in the intent information is lower than the threshold, thus serving as a key indicator for question-and-answer quality control. By finding the risk level corresponding to the intent classification result, hierarchical management of question-and-answer tasks in terms of risk dimension can be achieved, thereby identifying high-risk scenarios and adapting to compliance requirements. By submitting low-confidence or high-risk question-and-answer results for manual review, medical risks caused by misanswers can be effectively prevented, thus ensuring the professionalism and security of the responses. By automatically returning high-confidence, low-risk question-and-answer results to the terminal, question-and-answer efficiency can be improved and human resources can be saved, thus balancing automation and practicality while ensuring security.
[0050] The second objective of this invention is achieved through the following technical solution:
[0051] A question-and-answer triage system based on patient intent recognition, the system comprising:
[0052] The question preprocessing module is used to acquire medical questions input by the user, perform preprocessing operations on the medical questions, and obtain preprocessed medical questions;
[0053] The intent recognition module is used to input the preprocessed medical question into a pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values.
[0054] The knowledge retrieval module is used to perform a retrieval operation in a preset medical knowledge base based on the intent classification results, and obtain the corresponding retrieval knowledge entries;
[0055] The context building module is used to combine user profiles, user history consultation records, intent classification results, and retrieval knowledge entries to build context information;
[0056] The question-and-answer generation module is used to input the context information into the question-and-answer model for analysis and to generate question-and-answer results;
[0057] The content verification and distribution module is used to perform content verification operations on the question-and-answer results, obtain verification results, and perform question-and-answer result distribution and response processing based on the verification results;
[0058] The feedback optimization module is used to receive feedback information from users and medical staff, and optimize the parameters of the preset medical knowledge base, the pre-trained intent recognition model, and the question-answering model based on the feedback information.
[0059] By adopting the above technical solutions, and by acquiring and preprocessing user-inputted medical questions, the system can standardize user language input, extract effective information, and reduce the interference of ambiguous expressions on subsequent model judgments, thereby improving the accuracy of semantic recognition. By inputting the preprocessed questions into a pre-trained intent recognition model for analysis, intent information can be obtained, allowing for clear classification of user needs and quantifying the model's confidence in the recognition results, thus providing a basis for the reliability of subsequent response strategies. By performing a retrieval operation in the medical knowledge base based on the intent classification results, highly relevant professional knowledge items can be quickly matched, improving the accuracy and professionalism of the question-and-answer content, thereby reducing the risk of irrelevant answers or knowledge illusions. Furthermore, by combining user profiles, historical consultation records, intent classification results, and other relevant data, the system can effectively address user needs. By constructing contextual information from knowledge entries, personalized semantic completion and content focus can be achieved for individual users, thereby improving the contextual consistency of the answer and the user experience. By inputting contextual information into the question-answering model to generate answers, responses that better fit the patient's context and semantic boundaries can be output, thus improving the relevance and credibility of the question-answering system. By validating the content of the question-answering results and distributing them according to confidence level and risk level, a reasonable separation between automatic response and manual review can be achieved, thereby strengthening the security boundaries of medical question-answering while ensuring efficiency. By incorporating user and medical staff feedback to optimize the knowledge base and model parameters, the response accuracy and scenario adaptability of the question-answering system can be continuously improved, thereby achieving the evolvable optimization and closed-loop iteration of the medical question-answering system.
[0060] The above-mentioned objective three of this application is achieved through the following technical solution:
[0061] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described question-and-answer triage method based on patient intent recognition.
[0062] The fourth objective of this application is achieved through the following technical solution:
[0063] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described question-and-answer triage method based on patient intent recognition.
[0064] In summary, this application includes the following beneficial technical effects:
[0065] 1. By acquiring and preprocessing user-inputted medical questions, we can standardize user language input, extract effective information, and reduce the interference of ambiguous expressions on subsequent model judgments, thereby improving the accuracy of semantic recognition. By inputting the preprocessed questions into a pre-trained intent recognition model for analysis, we can obtain intent information, clearly classify user needs, and quantify the model's confidence in the recognition results, thus providing a basis for the reliability of subsequent response strategies. By performing retrieval operations in the medical knowledge base based on intent classification results, we can quickly match highly relevant professional knowledge items, improve the accuracy and professionalism of question-and-answer content, and reduce the risk of irrelevant answers or knowledge illusions. By combining user profiles, historical consultation records, intent classification results, and retrieved knowledge items to construct contextual information, we can achieve personalized semantic completion and content focus for individual users, thereby improving the contextual consistency of the answer results and user experience.
[0066] 2. By inputting contextual information into the question-answering model to generate answers, the system can output responses that better fit the patient's context and semantic boundaries, thereby improving the relevance and credibility of the question-answering system. By validating the content of the question-answering results and distributing them according to confidence level and risk level, the system can reasonably separate automatic responses from manual review, thus strengthening the security boundaries of medical question-answering while ensuring efficiency. By incorporating user and medical staff feedback to optimize the knowledge base and model parameters, the system can continuously improve the response accuracy and scenario adaptability of the question-answering system, thereby achieving the evolvable optimization and closed-loop iteration of the medical question-answering system. Attached Figure Description
[0067] Figure 1 This is a flowchart of a question-and-answer triage method based on patient intent recognition in one embodiment of this application;
[0068] Figure 2 This is a principle block diagram of a question-and-answer triage system based on patient intent recognition in one embodiment of this application;
[0069] Figure 3 This is a schematic diagram of a device according to one embodiment of this application. Detailed Implementation
[0070] The present application will be further described in detail below with reference to the accompanying drawings.
[0071] In one embodiment, such as Figure 1 As shown, this application discloses a question-and-answer triage method based on patient intent recognition, which specifically includes the following steps:
[0072] S10: Obtain the medical question input by the user, perform preprocessing operations on the medical question, and obtain the preprocessed medical question.
[0073] Specifically, after receiving the medical-related question text input by the user on the terminal, the question preprocessing flow is invoked to process the text content. First, the question is segmented using a medically customized word segmentation toolkit, dividing the entire sentence into multiple semantically meaningful word fragments. Then, based on part-of-speech tagging tools, the grammatical attributes of each word are identified, such as verbs, nouns, and drug names. Next, the stop word filtering module is invoked to filter out common invalid components in the question, such as words that do not contribute to semantic understanding, such as "please ask" or "just a moment". Finally, medical entities such as disease names, drug names, and symptom descriptions are extracted from the remaining words, and their location information and contextual tags are retained to form a structured question object for subsequent intent analysis.
[0074] S20: Input the pre-processed medical question into the pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values.
[0075] Specifically, the preprocessed medical question text is converted into a semantic representation vector. Then, a comprehensive representation vector is generated by combining the entity label information and keyword weight features contained therein. This comprehensive representation vector is then passed as the model input to the pre-tuned BERT structured intent recognition model. The model performs multi-class intent discrimination based on the input vector and the parameters learned during training. The output includes a classification label of one of the five core medical intents and its corresponding confidence probability value. For example, the question "What should I do if my child with ADHD still has difficulty concentrating after taking medication?" is classified as "medication consultation" with a classification probability of 0.94. The intent information structure includes the classification result, probability value, and intermediate layer feature information for use in subsequent processes.
[0076] Furthermore, this pre-trained intent recognition model is fine-tuned based on the BERT-base model. The input features are "semantic vector + entity features + keyword weights." The training dataset consists of 100,000 labeled medical questions (covering five intent categories, 20,000 questions per category). The batch size is 32, the learning rate is 2e-5, and the number of iterations is 50. The model achieves an accuracy ≥92%, a recall ≥90%, and an F1 score ≥91%. The classification logic is as follows: ① Disease consultation: including keywords such as disease name, symptoms, causes, and treatment plans (e.g., "What are the symptoms of ADHD?"); ② Medication consultation: including keywords such as drug name, usage, dosage, contraindications, and interactions (e.g., "How many times a day should I take Ritalin?"); ③ Interpretation of examination results: including keywords such as examination items, indicator values, and abnormal descriptions (e.g., "What does it mean if my white blood cell count is high in a blood routine test?"); ④ Medical advice consultation: including keywords such as department, consultation process, and appointment method (e.g., "Which department should I go to for ADHD?"); ⑤ Determination of the necessity of medical treatment: including keywords such as the urgency and duration of symptoms (e.g., "Do I need to go to the hospital if I have a fever of 39 degrees Celsius?").
[0077] S30: Based on the intent classification results, perform a search operation in the preset medical knowledge base to obtain the corresponding search knowledge entries.
[0078] Specifically, the knowledge requirement type of the current question is determined based on the output intent classification label. For example, if the intent is "interpretation of examination results", the document sub-library related to the examination will be used as the vector matching range when calling the knowledge base retrieval process. Then, the current question vector is input into the vector retrieval module in the knowledge base. Candidate matching results are obtained by calculating the cosine similarity between the vector and each knowledge entry. The matching results are sorted from high to low similarity and the top 3 or top 5 candidate entries are selected. The final ranking is then combined with the timeliness of the knowledge (e.g., the latest three-year clinical guidelines are given priority) and the authority (e.g., national guidelines are given priority) to output the best structured knowledge fragment for subsequent question answering.
[0079] S40: Combine user profiles, user history consultation records, intent classification results, and retrieval knowledge entries to construct contextual information.
[0080] Specifically, the system retrieves the user's basic information and past consultation records by calling the user identification information. It extracts the user's age, gender, basic medical history, etc., to form a user profile. This profile is then matched with the currently identified intent tags and keywords of candidate knowledge items. The semantic boundaries of the context are limited based on the patient's current focus, and irrelevant content is filtered out. At the same time, the system analyzes whether similar questions or consultation content have appeared in the history to avoid generating duplicate answers. It also compares the information conflicts between new and old knowledge and retains content that is more in line with the current context. Finally, a structured contextual text is formed as the input content of the question-answering model. The length of the content does not exceed 512 tokens to ensure the stability of reasoning and the coherence of the context.
[0081] S50: Input the context information into the question-answering model for analysis and generate question-answering results.
[0082] Specifically, the constructed contextual text is input into the question-answering generation model in a standard input format. The model adopts a large-scale generative language model fine-tuned with medical knowledge. The input includes multiple dimensions such as user background, historical context, current intent, and knowledge point extraction information. Based on the set instruction prompts, such as "Please explain and clearly answer whether you need to see a doctor in plain language", the model performs semantic understanding and language generation processes, and outputs question-answer text that conforms to the current intent boundary, has a friendly language style, and is accurate in content. For example, for "Do I need to go to the hospital if I have a fever of 39 degrees?", the generated result should clearly indicate that the fever intensity is high, it is recommended to see a doctor as soon as possible, and be especially vigilant if accompanied by other symptoms, ensuring that the generated answer is logically complete, medically safe, and expressed in plain language.
[0083] Furthermore, the question-answering model uses the Baichuan-M3-235B (235 billion parameters) model, finely tuned for the medical field. The input format is "contextual information + retrieval knowledge + intent instruction," for example, "The user is the parent of an 8-year-old ADHD patient, has previously consulted about Ritalin medication, and the current intent is medication consultation. Retrieval knowledge: Ritalin dosage is 1-2 times daily, 5-10mg each time, as directed by the doctor. Please generate a targeted answer in plain language, emphasizing the importance of following the doctor's instructions." Generation parameter settings: temperature 0.3 (low randomness, ensuring accuracy), maximum generation length 512 tokens, and a duplication penalty coefficient of 1.2 (to avoid duplicate content).
[0084] S60: Perform content validation on the question-and-answer results, obtain the validation results, and based on the validation results, perform question-and-answer result distribution and response processing.
[0085] Specifically, the generated Q&A results are automatically reviewed. First, the language compliance is checked to ensure it conforms to the language standards of medical institutions. Then, the logical rationality and the degree of matching with the input intent are assessed. Next, the classification confidence value from the intent recognition stage is combined with the risk level of the current intent to evaluate whether it meets the standard for direct distribution. If the confidence value is low or it is a high-risk intent category, the Q&A content is marked as requiring manual review and pushed to the medical staff's terminal. It will be distributed after manual confirmation. If the assessment is passed, the Q&A results are directly pushed to the user interface or message endpoint, prompting the user to complete the consultation process and generating subsequent suggested options, such as whether to continue asking questions, whether to connect with a human doctor, or whether to schedule an examination.
[0086] S70: Receives feedback from users and medical staff, and optimizes the parameters of the preset medical knowledge base, pre-trained intent recognition model, and question answering model based on the feedback.
[0087] Specifically, the system receives real-time user feedback, including ratings, text comments, and correction suggestions after completing question-and-answer sessions. It also collects correction records from medical staff regarding manually reviewed question-and-answer content, including additions, deletions, and modifications to the large model's answers, accuracy assessments of triage, and final processing suggestions. This multi-dimensional feedback is mapped to the knowledge base coverage, the intent model's discrimination boundaries, and the question-and-answer model's generation strategy. It records comparisons between incorrect answers and genuine intents, incorporating these into the dataset used for periodic model fine-tuning. New entries are added based on knowledge gaps and quantitatively stored in the database. Furthermore, optimization strategy parameters can be dynamically adjusted based on statistical indicators such as patient satisfaction trends and changes in question-and-answer accuracy, ensuring the system continuously becomes more stable and efficient during use.
[0088] In one embodiment, step S10, which involves acquiring the medical question input by the user and performing a preprocessing operation on the medical question to obtain a preprocessed medical question, specifically includes:
[0089] S11: Use a pre-defined dictionary to perform word segmentation on medical questions to obtain the segmentation results.
[0090] Specifically, a high-frequency word dictionary specifically for the medical field is loaded as the word segmentation lexicon. The original medical questions input by the user are processed by a word segmentation strategy that combines positive maximum matching and rule correction to segment effective semantic units including disease names, drug names, physiological parts, symptom descriptions, temporal words, and interrogative words. For example, for the question "Can my child take ibuprofen if he has had a fever for two days?", the word segmentation result should include core word groups such as "child", "fever", "two days", "ibuprofen", and "take". At the same time, the segmentation boundaries of continuous words are identified to ensure the accuracy of subsequent semantic understanding.
[0091] S12: Perform part-of-speech tagging on the word segmentation results to obtain the tagged word sequence.
[0092] Specifically, the obtained word sequence is labeled using a part-of-speech tagging module based on Conditional Random Field (CRF). The grammatical role of each word is determined according to the context, such as distinguishing "eat" as a verb, "Meilin" as a drug entity, and "fever" as a symptom noun. Each word and its corresponding part of speech are encoded into a structured tag sequence, which is further used to control the boundaries of information filtering and entity extraction, ensuring that, for example, in "Is taking medicine for three days effective for fever?", "three days" is identified as a time modifier rather than disease information.
[0093] S13: Based on the preset stop word list, the annotated word sequence is filtered for stop words to obtain a valid word sequence.
[0094] Specifically, the generated part-of-speech tagging results are traversed, and words and symbolic words marked as modal particles, auxiliary words, conjunctions, and general time adverbs are identified and processed. These are then matched with words in a preset stop word list. When a match is found, the match is removed. For example, stop phrases such as "please ask," "just a moment," "can you," and "is it" are all removed after being identified. Only semantic words are retained, such as main symptoms, medicines, action verbs, and time-limiting conditions. The final output effective word sequence better meets the recognition input requirements of the medical semantic model.
[0095] S14: Entity extraction is performed on the effective word sequence to obtain the preprocessed medical question.
[0096] Specifically, the retained valid word sequences are input into a named entity recognition model based on a BiLSTM-CRF structure. Entity recognition and labeling are performed on disease names, drug names, examination items, symptom descriptions, etc. The output is a structured information table containing entity categories, text fragments, and location indexes. At the same time, the standardized name and hierarchical classification relationship of the entity are searched in the medical knowledge ontology to assist in context modeling. For example, "Meilin" is identified as "ibuprofen-type antipyretics", and "fever for three days" is identified as the disease course entity "acute fever" and assigned corresponding semantic labels. Finally, a preprocessed medical question with structure and semantic annotations is generated for the intent recognition module to call.
[0097] In one embodiment, the question-and-answer triage method based on patient intent recognition further includes:
[0098] S201: Construct a medical question training set, which includes medical questions labeled with five intent tags: disease consultation, medication consultation, interpretation of test results, consultation on medical advice, and judgment of the necessity of medical treatment.
[0099] Specifically, based on a corpus of language collected from real medical consultation scenarios, representative question samples were selected as the original data source. The manual annotation team then performed intent classification and assignment operations on each question according to the standard intent definition system. The questions were labeled according to their semantic content into categories such as disease consultation, medication consultation, examination interpretation, medical advice, or necessity of medical treatment. For example, "Does a child with recurrent cough need an X-ray?" was labeled as "necessity of medical treatment judgment", and "What does a high neutrophil count in a blood routine test result indicate?" was labeled as "interpretation of examination results". Each data point in the training set should contain the question text, corresponding label, and source information. After undergoing a unified format conversion process, the data forms the standard input format required for model training, resulting in a labeled structured question training set.
[0100] S202: Extract the semantic vector of the question, keyword weights and medical entity annotation features from each training data in the medical question training set, and construct a multimodal input feature vector.
[0101] Specifically, the word vector generation module, keyword recognition module, and entity recognition module are called sequentially to perform feature extraction operations on each training question. First, the medical semantic pre-training model is used to encode the question text into a fixed-dimensional sentence vector representation. At the same time, keywords with high semantic contribution are identified and assigned corresponding weights by combining TF-IDF and attention mechanism. Then, the NER model is called to extract medical entities such as disease names, drug names, and symptom descriptions in the question and label their type and position index. The semantic vector, keyword weights, and entity labels are combined to form a joint feature representation. For example, for the question "Should I stop taking cephalosporin if I feel dizzy and nauseous after taking it?", "cephalosporin" is extracted as a drug entity, and "dizziness and nausea" is extracted as a side effect symptom word. These are then concatenated with the semantic encoding vector to form the final multimodal training sample input.
[0102] S203: Input the multimodal input feature vector into the pre-trained model based on the BERT structure, and fine-tune the training using the cross-entropy loss function to obtain the pre-trained intent recognition model.
[0103] Specifically, the constructed multimodal feature input vectors are input into the input layer of the BERT model structure according to the model definition format, and a softmax classifier is connected at the top of the model for multi-class intent output. The cross-entropy loss function is used to calculate the error between the label of each sample in the training set and the model's predicted label. The Adam optimizer is used for backpropagation and gradient update. During the training process, the weights of each feature channel are dynamically adjusted to adapt to the intent recognition task. For example, the keyword discrimination ability is strengthened for questions that are difficult to distinguish between "medication consultation" and "medical advice". After training, the accuracy and F1 score of the model on the validation set are evaluated until the model reaches convergence or the final training parameters are output as the deployment version of the intent recognition model after a set number of rounds.
[0104] In one embodiment, in step S20, the preprocessed medical question is input into a pre-trained intent recognition model for analysis to obtain intent information, specifically including:
[0105] S21: Convert the preprocessed medical questions into semantic representation vectors.
[0106] Specifically, the preprocessed medical questions are input into a medical semantic pre-training model. The Transformer structure is used to extract syntactic and semantic contextual dependencies, and a multi-head attention mechanism is used to capture the implicit semantic connections between keywords in the question. Word position information and semantic integrity within the sentence are preserved during the encoding process. Finally, the entire medical question is mapped into a fixed-length high-dimensional semantic vector representation. For example, the question "Should a child with a fever for three days go to the hospital?" will be transformed into a composite vector containing age, course of illness, symptoms, and behavioral intention. The semantic association between fever and hospital can be reflected through the vector space structure, thereby providing contextual semantic support for intention classification.
[0107] S22: Extract keyword features and medical entity features from the semantic representation vector to construct joint input features.
[0108] Specifically, after the semantic vector is generated, the keyword recognition module and the entity recognition module are further called to analyze the local weight regions in the vector, extract the keyword positions and their feature vectors with high attention concentration in the semantic representation, and simultaneously label the standard medical entity categories defined in the medical knowledge graph, such as drugs, symptoms, and disease names. By performing position mapping and feature concatenation on the extraction results of these keywords and entities, a joint input feature representation that integrates the global semantics of the sentence vector, the local weights of keywords, and the semantic labels of medical entities is constructed. For example, in the sentence vector, "Motrin" is identified as an antipyretic drug entity and "headache" is identified as a symptom keyword, and the labels "drug" and "symptom" are added and combined with the corresponding weight values as the final feature input items.
[0109] S23: Input the joint input features into the pre-trained intent recognition model for inference and output intent information.
[0110] Specifically, the constructed joint input feature vector is fed into the pre-trained intent recognition model to perform forward inference. The model, based on the BERT structure, sequentially performs contextual modeling and vector fusion on the multimodal features in the encoder layer, and uses the Softmax function in the output layer to estimate the probability of different intent categories, generating the final intent classification result and its corresponding classification confidence probability value. The current predicted label and prediction distribution are given in the model inference output. For example, for the input question "Can cephalosporins and vitamins be taken together?", the model can output the intent label "medication consultation" and give a result with a classification confidence of 0.93, thus forming structured intent information for subsequent module calls.
[0111] In one embodiment, in step S30, based on the intent classification result, a retrieval operation is performed in a preset medical knowledge base to obtain the corresponding retrieval knowledge entries, specifically including:
[0112] S31: Input the preprocessed medical question into the semantic vector generation model to generate the corresponding semantic vector.
[0113] Specifically, the preprocessed medical questions are input into a trained sentence vector generation model to perform feature mapping. The model's multi-layer coding network extracts the contextual dependency structure and semantic distribution of topic words in the questions, and integrates global contextual information and syntactic structure features to map the medical questions into high-dimensional dense semantic vectors of fixed dimensions. For example, for the question "Can I continue to take ibuprofen if I have a cough for more than three days?", a semantic representation vector containing symptom timeline, drug entity, and behavioral intention is generated as the query input basis for the subsequent knowledge base retrieval module.
[0114] S32: Determine the target retrieval category and the corresponding retrieval similarity threshold based on the intent classification results.
[0115] Specifically, after receiving the intent classification label, the configuration mapping table is invoked to map the intent category to the target knowledge category number in the medical knowledge base. At the same time, the corresponding vector matching similarity threshold is set according to the content complexity and fuzzy semantic tolerance under the category. For example, when the intent is identified as "disease consultation", the target category is set to diagnostic knowledge and the retrieval threshold is set to 0.78. When it is identified as "interpretation of examination results", it corresponds to examination interpretation knowledge, and the threshold is increased to 0.85 to improve accuracy. This step ensures that the subsequent vector matching achieves a balance between coverage and accuracy.
[0116] S33: In the preset medical knowledge base, in the vector sub-knowledge base corresponding to the target retrieval category, use semantic vectors as the retrieval query, perform vector similarity matching, and obtain a set of candidate knowledge items.
[0117] Specifically, based on the determined target category and similarity threshold, the corresponding sub-base in the medical knowledge base is located. The semantic vector generated by S31 is used as the retrieval query vector. Vector matching algorithms based on Euclidean distance, cosine similarity, or other similarity indicators are executed to perform parallel comparison of the semantic index vectors of all knowledge items in the sub-base. Several items with a similarity greater than the set threshold to the semantic vector of the input question are selected to form a candidate set. For example, when a patient inputs "What does it mean if the monocyte count is high after a blood test?", multiple semantically similar items such as "Common causes of elevated monocyte count" and "Interpretation of abnormal parameters in children's blood routine tests" can be matched as candidates in the "Explanation of Examination Indicators" sub-base.
[0118] S34: Sort the set of candidate knowledge items to obtain the retrieved knowledge items.
[0119] Specifically, the acquired set of candidate knowledge items is sorted using a sorting strategy. During the sorting process, multiple factors such as semantic similarity score, item authority level, item recent update time, and user profile preferences are considered and weighted. A gradient sorting algorithm is used to reorder the candidate items according to their relevance, and the most valuable items are output as the final retrieval knowledge items. For example, when two candidate items are semantically similar, content from the National Clinical Knowledge Base that has been updated within the last three months is given priority for recommendation to improve the accuracy of question answering and medical authority.
[0120] In one embodiment, step S40, which combines user profiles, user history consultation records, intent classification results, and retrieved knowledge entries to construct contextual information, specifically includes:
[0121] S41: Extract user input information and generate user profile information, including age, gender and underlying diseases.
[0122] Specifically, the system parses key fields related to medical questions and answers from the user's basic personal information entered or authorized by the user in the question-and-answer interface. It performs format recognition and numerical verification on the input age information, converting it into a unified numerical expression. Gender information is standardized and mapped to a preset gender identifier. Basic disease information filled in by the user or recorded in historical files undergoes text recognition and medical terminology standardization, converting the identified disease names into a standardized set of disease tags. Based on this, age characteristics, gender characteristics, and basic disease characteristics are structurally integrated to form the user profile information required for this question-and-answer session. For example, when a user enters an age of "45 years old," a gender of "male," and a basic disease of "hypertension," a comprehensive profile data including age numerical characteristics, gender category characteristics, and chronic disease tag characteristics is generated, providing a personalized information foundation for subsequent question-and-answer analysis.
[0123] S42: Retrieve the corresponding historical consultation records based on the user identifier.
[0124] Specifically, after identifying the user's login status or authentication identifier, the system retrieves the user's historical questions and system responses from the historical consultation record database. For each record, elements such as the original question time, main question category, and whether a satisfactory answer was received are extracted, and a historical conversation trajectory is constructed in chronological order. At the same time, information such as likes, evaluations, and supplementary questions contained in the user's past feedback are embedded into the current question-and-answer context as semantic reference enhancement dimensions. For example, if a user has continuously inquired about "medication time," "medication dosage," and "drug contraindications" in the last three questions, it is inferred that their core concern is medication safety, thereby providing highly relevant historical context support for the current question-and-answer logic modeling.
[0125] S43: Based on the intent classification results, set the semantic boundaries and content focus range of the current question-and-answer scenario.
[0126] Specifically, after receiving the classification labels output by the intent recognition model, the semantic focus rules are determined based on the mapping relationship between the labels and the scene template. When the intent label is "disease consultation", the content focus scope is limited to "symptom recognition, etiology analysis, and disease definition", excluding knowledge fragments that are not directly related to drug information or medical treatment process. When the intent is "medical treatment advice", the content boundary is expanded to elements such as "department matching, consultation order, and registration method". The scope of knowledge point association is filtered by the preset scene boundary rules, thereby improving the semantic purity and model reasoning efficiency of the question answering model in the input processing stage.
[0127] S44: Integrate key information paragraphs from the retrieved knowledge entries with user profiles, user history consultation records, and intent information to generate contextual information.
[0128] Specifically, the top-ranked knowledge items are selected, and syntactic decomposition and keyword extraction are performed on paragraphs with high information density. The extracted knowledge phrases are semantically aligned with disease tags in the user profile, repeated concerns in historical consultation content, and the current intent category. A fused contextual information vector is constructed through a nested splicing structure. In the construction process, time sequence tags, entity relationships, and personalized modification descriptions are introduced to ensure that the contextual structure can be embedded into the question-answering generation model as high-quality input. For example, when a user repeatedly mentions "dizziness" in their history, the current intent is "medical advice," and the profile includes "hypertension," the fused paragraph will prioritize displaying "medical advice for dizziness in the context of hypertension," achieving focused and targeted reinforcement of semantic context.
[0129] In one embodiment, step S60 involves performing content validation on the question-and-answer results to obtain validation results, and then performing question-and-answer result distribution and response processing based on the validation results. Specifically, this includes:
[0130] S61: Determine whether the classification confidence probability value in the intent information is lower than the preset confidence threshold.
[0131] Specifically, the confidence probability value of the output is read and compared with the confidence threshold set in the configuration parameter file. When the confidence probability value is less than the preset threshold, the confidence status of the current recognition result is marked as "low confidence". Otherwise, it is marked as "confidence". This judgment result will directly affect whether the question and answer result triggers the manual review branch. For example, when the model judges the user's intention of "I feel dizzy and nauseous and need to go to the hospital" as "medical advice consultation" but the confidence is only 0.42, the "low confidence" label will be triggered when the threshold is set to 0.6, thus entering the subsequent high-risk verification process.
[0132] S62: Find the corresponding intent risk level based on the intent classification result. The intent risk level is a high, medium, or low risk level label configured according to preset rules.
[0133] Specifically, based on the current intent classification label, the corresponding risk label is extracted from a preset risk level mapping table. The mapping table is manually configured to adjust the risk level of incorrect answers according to different intents in the medical scenario. For example, intents such as "disease consultation" and "determination of the necessity of medical treatment" are set as high risk, "medication consultation" is set as medium risk, and "interpretation of examination results" is set as low risk. When the user's intent is identified as "determination of the necessity of medical treatment", this step marks its risk level as high, thereby increasing the frequency of manual intervention in the subsequent question and answer review strategy to ensure the rigor of medical responses.
[0134] S63: If the classification confidence probability value is lower than the confidence threshold, or the intended risk level is high risk, the question and answer results will be submitted to the manual review channel for medical staff to confirm or modify the content.
[0135] Specifically, based on the obtained confidence level and risk level assessment results, it is determined whether the current question and answer result meets the conditions for triggering manual review. If it does, the question and answer content, contextual information, and intent analysis results are packaged and pushed to a preset manual review queue for qualified medical staff to manually review and adjust the content. For example, when a user asks "Can this medicine be taken with a high blood pressure medication?" and the model identifies the intent as "medication consultation" but the confidence level is only 0.35, the system automatically marks the question and answer as requiring review and waits for the on-duty physician to complete the content confirmation or provide suggestions for replacement.
[0136] S64: If the classification confidence probability value is higher than the confidence threshold and the intention risk level is low to medium, the question and answer results will be returned to the user terminal to complete the question and answer distribution.
[0137] Specifically, when the classification confidence level is within the credible range and the risk level is marked as medium or low, the response content generated by the question-answering model is directly packaged into a standard response format and sent to the user's terminal interface. This ensures that the instant question-answering function can be realized without human intervention, improving the system's automation efficiency and response speed. For example, when a user asks "What does ALT mean in a liver function test?", the model judges it as "interpretation of test results" with a confidence level of 0.92, and the system directly returns the standardized explanation paragraph from the preset knowledge base to the user's chat interface to complete the response.
[0138] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0139] In one embodiment, a question-and-answer triage system based on patient intent recognition is provided, which corresponds one-to-one with the question-and-answer triage method based on patient intent recognition in the above embodiments. For example... Figure 2 As shown, this question-and-answer triage system based on patient intent recognition includes a question preprocessing module, an intent recognition module, a knowledge retrieval module, a context construction module, a question-and-answer generation module, a content verification and distribution module, and a feedback optimization module. Detailed descriptions of each functional module are as follows:
[0140] The question preprocessing module is used to obtain the medical questions input by the user, perform preprocessing operations on the medical questions, and obtain the preprocessed medical questions;
[0141] The intent recognition module is used to input the pre-processed medical question into the pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values.
[0142] The knowledge retrieval module is used to perform retrieval operations in a preset medical knowledge base based on intent classification results, and obtain the corresponding retrieval knowledge entries;
[0143] The context building module is used to combine user profiles, user history consultation records, intent classification results, and retrieval knowledge entries to build contextual information;
[0144] The question-and-answer generation module is used to input contextual information into the question-and-answer model for analysis and to generate question-and-answer results.
[0145] The content validation and distribution module is used to perform content validation operations on the question and answer results, obtain the validation results, and perform question and answer result distribution and response processing based on the validation results;
[0146] The feedback optimization module is used to receive feedback information from users and medical staff, and optimize the parameters of the preset medical knowledge base, pre-trained intent recognition model and question answering model based on the feedback information.
[0147] Optionally, the question preprocessing module includes:
[0148] The word segmentation processing submodule is used to perform word segmentation processing on medical questions using a preset dictionary to obtain the word segmentation results;
[0149] The part-of-speech tagging submodule is used to perform part-of-speech tagging on the word segmentation results to obtain a tagged word sequence;
[0150] The stop word filtering submodule is used to filter the annotated word sequence based on a preset stop word list to obtain a valid word sequence;
[0151] The entity extraction submodule is used to extract entities from the effective word sequence to obtain the preprocessed medical question.
[0152] Optionally, the question-and-answer triage system based on patient intent recognition also includes:
[0153] The training data construction module is used to build a medical question training set, which includes medical questions labeled with five types of intent tags: disease consultation, medication consultation, interpretation of test results, consultation on medical advice, and judgment of the necessity of medical treatment.
[0154] The multimodal feature generation module is used to extract the semantic vector of the question, keyword weights and medical entity annotation features of each training data in the medical question training set, and construct a multimodal input feature vector;
[0155] The intent recognition model training module is used to input multimodal input feature vectors into a pre-trained model based on the BERT structure, and to fine-tune the training using the cross-entropy loss function to obtain a pre-trained intent recognition model.
[0156] Optionally, the intent recognition module includes:
[0157] The semantic representation submodule is used to transform preprocessed medical questions into semantic representation vectors;
[0158] The feature construction submodule is used to extract keyword features and medical entity features from the semantic representation vector to construct joint input features;
[0159] The model inference submodule is used to input the joint input features into a pre-trained intent recognition model for inference and output intent information.
[0160] Optionally, the knowledge retrieval module includes:
[0161] The semantic vector generation submodule is used to input the preprocessed medical questions into the semantic vector generation model to generate corresponding semantic vectors;
[0162] The retrieval strategy configuration submodule is used to determine the target retrieval category and the corresponding retrieval similarity threshold based on the intent classification results.
[0163] The vector matching retrieval submodule is used to perform vector similarity matching in the vector sub-knowledge base corresponding to the target retrieval category in the preset medical knowledge base, using semantic vectors as the retrieval query, to obtain a set of candidate knowledge items;
[0164] The retrieval and sorting submodule is used to sort the set of candidate knowledge entries to obtain the retrieved knowledge entries.
[0165] Optionally, the context building modules include:
[0166] The user profile building submodule is used to extract user input information and generate user profile information, which includes age, gender and underlying diseases.
[0167] The history retrieval submodule is used to retrieve the corresponding historical consultation records based on the user identifier;
[0168] The semantic boundary setting submodule is used to set the semantic boundaries and content focus range of the current question-and-answer scenario by combining the intent classification results;
[0169] The context fusion submodule is used to fuse key information paragraphs from retrieved knowledge entries with user profiles, user history consultation records, and intent information to generate context information.
[0170] Optionally, the content verification and distribution module includes:
[0171] The confidence level judgment submodule is used to determine whether the classification confidence probability value in the intent information is lower than a preset confidence threshold.
[0172] The risk level determination submodule is used to find the corresponding intent risk level based on the intent classification result. The intent risk level is a high, medium and low risk level label configured according to preset rules.
[0173] The manual review trigger submodule is used to submit the Q&A results to the manual review channel if the classification confidence probability value is lower than the confidence threshold or the intention risk level is high risk level, so that medical staff can confirm or modify the content.
[0174] The automatic distribution submodule is used to return the question and answer results to the user terminal if the classification confidence probability value is higher than the confidence threshold and the intention risk level is low to medium, thus completing the question and answer distribution.
[0175] Specific limitations regarding the question-and-answer triage system based on patient intent recognition can be found in the limitations of the question-and-answer triage method based on patient intent recognition mentioned above, and will not be repeated here. Each module in the aforementioned question-and-answer triage system based on patient intent recognition can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0176] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a patient intent recognition-based question-and-answer triage method.
[0177] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0178] Obtain the medical question input by the user, perform preprocessing operations on the medical question, and obtain the preprocessed medical question;
[0179] The pre-processed medical question is input into a pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values.
[0180] Based on the intent classification results, a search operation is performed in the preset medical knowledge base to obtain the corresponding search knowledge entries;
[0181] Contextual information is constructed by combining user profiles, user history consultation records, intent classification results, and search knowledge entries;
[0182] Contextual information is input into the question-answering model for analysis, generating question-answering results;
[0183] Perform content validation on the question-and-answer results, obtain the validation results, and based on the validation results, perform question-and-answer result distribution and response processing;
[0184] It receives feedback from users and medical staff, and optimizes the parameters of the preset medical knowledge base, pre-trained intent recognition model, and question answering model based on the feedback.
[0185] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0186] Obtain the medical question input by the user, perform preprocessing operations on the medical question, and obtain the preprocessed medical question;
[0187] The pre-processed medical question is input into a pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values.
[0188] Based on the intent classification results, a search operation is performed in the preset medical knowledge base to obtain the corresponding search knowledge entries;
[0189] Contextual information is constructed by combining user profiles, user history consultation records, intent classification results, and search knowledge entries;
[0190] Contextual information is input into the question-answering model for analysis, generating question-answering results;
[0191] Perform content validation on the question-and-answer results, obtain the validation results, and based on the validation results, perform question-and-answer result distribution and response processing;
[0192] It receives feedback from users and medical staff, and optimizes the parameters of the preset medical knowledge base, pre-trained intent recognition model, and question answering model based on the feedback.
[0193] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0194] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0195] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A question-and-answer triage method based on patient intent recognition, characterized in that, The question-and-answer triage method based on patient intent recognition includes: Obtain the medical question input by the user, perform preprocessing operations on the medical question, and obtain the preprocessed medical question; The preprocessed medical question is input into a pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values. Based on the intent classification results, a search operation is performed in the preset medical knowledge base to obtain the corresponding search knowledge entries; Contextual information is constructed by combining user profiles, user history consultation records, intent classification results, and retrieval knowledge entries; The context information is input into the question-answering model for analysis, and question-answering results are generated. Perform content validation on the question-and-answer results to obtain validation results, and perform question-and-answer result distribution and response processing based on the validation results; The system receives feedback from users and medical staff, and optimizes the parameters of the preset medical knowledge base, the pre-trained intent recognition model, and the question-answering model based on the feedback.
2. The question-and-answer triage method based on patient intent recognition according to claim 1, characterized in that, The process of obtaining the medical question input by the user and performing preprocessing on the medical question to obtain the preprocessed medical question specifically includes: The medical question is segmented using a pre-defined thesaurus to obtain the segmentation results; The word segmentation results are then subjected to part-of-speech tagging to obtain a tagged word sequence; The annotated word sequence is filtered for stop words based on a preset stop word list to obtain a valid word sequence; Entity extraction is performed on the effective word sequence to obtain the preprocessed medical question.
3. The question-and-answer triage method based on patient intent recognition according to claim 1, characterized in that, The question-and-answer triage method based on patient intent recognition also includes: A medical question training set is constructed, which includes medical questions labeled with five types of intent tags: disease consultation, medication consultation, interpretation of test results, consultation on medical advice, and judgment of the necessity of medical treatment. Extract question semantic vectors, keyword weights, and medical entity annotation features from each training data in the medical question training set to construct a multimodal input feature vector; The multimodal input feature vector is input into a pre-trained model based on the BERT structure, and fine-tuned using the cross-entropy loss function to obtain the pre-trained intent recognition model.
4. The question-and-answer triage method based on patient intent recognition according to claim 1, characterized in that, The step of inputting the preprocessed medical question into a pre-trained intent recognition model for analysis to obtain intent information specifically includes: The preprocessed medical questions are converted into semantic representation vectors; Extract keyword features and medical entity features from the semantic representation vector to construct joint input features; The joint input features are input into the pre-trained intent recognition model for inference, and the intent information is output.
5. The question-and-answer triage method based on patient intent recognition according to claim 1, characterized in that, Based on the intent classification results, a retrieval operation is performed in a preset medical knowledge base to obtain the corresponding retrieval knowledge entries, specifically including: The preprocessed medical question is input into the semantic vector generation model to generate the corresponding semantic vector; Based on the intent classification results, determine the target retrieval category and the corresponding retrieval similarity threshold; In the preset medical knowledge base, in the vector sub-knowledge base corresponding to the target retrieval category, using the semantic vector as the retrieval query, vector similarity matching is performed to obtain a set of candidate knowledge entries; The candidate knowledge entries are sorted to obtain the retrieved knowledge entries.
6. The question-and-answer triage method based on patient intent recognition according to claim 1, characterized in that, The construction of contextual information by combining user profiles, user historical consultation records, intent classification results, and retrieved knowledge entries specifically includes: Extract user input information to generate user profile information, which includes age, gender, and underlying diseases; Retrieve corresponding historical consultation records based on user identifier; Based on the intent classification results, the semantic boundaries and content focus range of the current question-and-answer scenario are defined; The context information is generated by fusing key information paragraphs from the retrieved knowledge entries with the user profile, the user's historical consultation records, and the intent information.
7. The question-and-answer triage method based on patient intent recognition according to claim 1, characterized in that, The step of performing content validation on the question-and-answer results to obtain validation results, and then performing question-and-answer result distribution and response processing based on the validation results, specifically includes: Determine whether the classification confidence probability value in the intent information is lower than a preset confidence threshold; Based on the intent classification result, the corresponding intent risk level is found, where the intent risk level is a high, medium, or low risk level label configured according to preset rules; If the classification confidence probability value is lower than the confidence threshold, or the intention risk level is high risk, the question and answer result will be submitted to the manual review channel for medical staff to confirm or modify the content. If the classification confidence probability value is higher than the confidence threshold and the intention risk level is low, then the question and answer result is returned to the user terminal to complete the question and answer distribution.
8. A question-and-answer triage system based on patient intent recognition, characterized in that, The question-and-answer triage system based on patient intent recognition includes: The question preprocessing module is used to acquire medical questions input by the user, perform preprocessing operations on the medical questions, and obtain preprocessed medical questions; The intent recognition module is used to input the preprocessed medical question into a pre-trained intent recognition model for analysis to obtain intent information, which includes intent classification results and corresponding classification confidence probability values. The knowledge retrieval module is used to perform a retrieval operation in a preset medical knowledge base based on the intent classification results, and obtain the corresponding retrieval knowledge entries; The context building module is used to combine user profiles, user history consultation records, intent classification results, and retrieval knowledge entries to build context information; The question-and-answer generation module is used to input the context information into the question-and-answer model for analysis and to generate question-and-answer results; The content verification and distribution module is used to perform content verification operations on the question-and-answer results, obtain verification results, and perform question-and-answer result distribution and response processing based on the verification results; The feedback optimization module is used to receive feedback information from users and medical staff, and optimize the parameters of the preset medical knowledge base, the pre-trained intent recognition model, and the question-answering model based on the feedback information.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the question-and-answer triage method based on patient intent recognition as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the question-and-answer triage method based on patient intent recognition as described in any one of claims 1 to 7.