Intelligent interaction device and method for medical question and answer scene

Through intelligent interactive devices and methods, the user's intention discrimination module and knowledge engineering work module are used to automatically construct and optimize prompt words, solving the problem of general big model outputting error results in medical Q&A scenarios, achieving more accurate and reliable interaction effects , avoiding high training costs.

CN119397000AInactive Publication Date: 2025-02-07JIANPEI
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411978060.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, general big models have hallucinations of outputting false results in medical Q&A scenarios, and it is difficult for ordinary users to construct reasonable prompt words, resulting in poor interaction effects.

Method used

By designing an intelligent interactive device and method, using user intention discrimination modules, knowledge engineering work modules and information processing modules, prompt words are automatically constructed and optimized, and combined with the results of vertical domain knowledge engineering, the general model is guided to generate more accurate interactive information.

Benefits of technology

It realizes more accurate and reliable interaction results in medical Q&A scenarios, avoids the high cost problem of special training or tuning of general large models, and improves interaction efficiency and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397000A_ABST
    Figure CN119397000A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent interaction device and method oriented to a medical question and answer scene, and aims at vertical field application of a medical scene, based on judgment of user intention, construction and optimization of cue words, an interaction result more conforming to customer expectation is obtained, and user experience is improved. And the problem of high training cost caused by special training or tuning of a general large model is avoided. The device comprises an instruction acquisition module used for acquiring and identifying a user instruction; the user intention judgment module is used for performing intention prediction and preliminary prompt word construction according to a user instruction; the knowledge engineering working module is used for predicting and analyzing according to the user instruction and the corresponding intention output by the user intention judgment module to obtain a corresponding knowledge engineering output result; the information processing module is used for obtaining a fusion cue word instruction according to the user instruction, the initial cue word output by the user intention judgment module and knowledge engineering output result input; and the general large model interaction module is used for inputting the fusion cue word instruction into a general large model and generating and feeding back final interaction information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of generative model technology, and in particular to a human-computer interaction method and device. Background Art

[0002] With the development of large language models (LLMs), generative AI applications have experienced explosive growth, and the way people interact with computers is also undergoing intelligent transformation. Prompt engineering, as a bridge between business, technology, and data, can help large models better understand and answer user requests and accelerate the implementation of large model scenarios. The so-called prompt is an instruction to the large model.

[0003] Prompts can be questions, descriptions, or descriptions with parameters. Prompt engineering is the art and science of designing, improving, and perfecting prompts. By designing and optimizing input prompts, models can answer questions, perform tasks, and provide more valuable information more accurately and reliably. The quality of the results produced by a computer program or system is based on the quality of its input data. When interacting with large language models, the way the question is asked (i.e., prompt) is also crucial to the quality of the output. Prompt words are used to clearly describe and accurately limit fuzzy questions in language, so as to control the results generated by large models. General large models are not specifically tuned for scenario problems in vertical fields during training, and it is difficult for ordinary users to fully master the skills of prompt word engineering. Therefore, how to automatically construct reasonable prompt words based on patient input text has become the focus and difficulty of human-computer interaction research based on large models. In addition, current large models generally have hallucinations and output incorrect results on specific problems. Therefore, combined with vertical domain knowledge engineering, background knowledge related to user intentions is referenced and input into large models, which can effectively suppress large model hallucinations. Usually, vertical domain knowledge engineering includes: knowledge graphs, search engines, proprietary databases, etc. In summary, combining prompt word engineering with knowledge engineering can create vertical domain-specific intelligent systems that are both efficient and intelligent. These systems can better meet user needs and maximize the effectiveness of large models. Summary of the invention

[0004] The present invention aims to overcome the deficiencies in the prior art and to provide an intelligent interactive device and method for medical question-and-answer scenarios. The present invention aims at vertical field applications in medical scenarios and constructs and optimizes prompt words based on the judgment of user intent to obtain interactive results that better meet customer expectations and avoids the high training cost problem faced by specialized training or tuning of general large models.

[0005] The present application provides an intelligent interactive device for medical question-and-answer scenarios, the device comprising: An instruction acquisition module, used to acquire and identify user instructions; User intention identification module, used to predict intention and construct preliminary prompt words based on user instructions; The knowledge engineering working module is used to analyze and obtain the corresponding knowledge engineering output results according to the corresponding intention prediction output by the user instructions and the user intention discrimination module; The information processing module is used to obtain the fusion prompt word instruction according to the user instruction, the preliminary prompt word output by the user intention discrimination module, and the output result of the knowledge engineering; The general large model interaction module is used to input the fusion prompt word instruction into the general large model, generate and feedback the final interaction information.

[0006] Preferably, the user intention identification module comprises: The vertical domain word segmenter is a pre-segmentation module for the medical vertical field, which contains a domain dictionary obtained from authoritative medical guide documents; A BERT model, which has been trained on multi-tasks of intent classification and prompt word output, and is used to obtain predicted intent classification and construct preliminary prompt words based on input text instructions; The user intent classification output unit is used to output the intent classification results of the BERT model to the knowledge engineering work module; The prompt word output unit is used to output the preliminary prompt words constructed by the BERT model to the information processing module.

[0007] Preferably, the training method of the BERT model comprises the following steps: Construct a multi-task training set for the medical vertical field, wherein the training set includes input sentences, corresponding preset intent classifications, and preset prompt words; The BERT model is trained using the multi-task training set so that its understanding of the input content is close to the preset intent classification and preset prompt words.

[0008] Preferably, the knowledge engineering work module obtains the knowledge engineering output result by at least one or more of the following combinations: Obtain user instructions in text form, obtain input entities through entity recognition, and input the input entities into the knowledge graph or database query reasoning; Querying a text vector corresponding to the instruction vector from a vector database, and obtaining a question prompt word of the user instruction according to the text vector corresponding to the instruction vector; Obtain knowledge engineering content from search engines.

[0009] Preferably, the categories of intention prediction at least include consultation, asking about medicine, asking about examination, asking about the hospital, report interpretation, and guiding the department.

[0010] The present application also provides an intelligent interaction method for medical question-and-answer scenarios, the method comprising the following steps: Get user instructions; Inputting the user instruction into the user intention identification module to obtain intention prediction and construct preliminary prompt words; Input the corresponding intention prediction output by the user instruction and user intention identification module into the knowledge engineering working module, and analyze and obtain the corresponding knowledge engineering output result; Inputting user instructions, preliminary prompt words, and knowledge engineering output results into the information processing module to obtain fused prompt word instructions; The fused prompt word instruction is input into the general large model to generate and feed back the user's final interaction information.

[0011] Preferably, the step of inputting the user instruction into the user intention identification module to obtain intention prediction and construct a preliminary prompt word further comprises: User command input is segmented by the vertical domain segmenter in the medical vertical field; Input the word units processed by the vertical domain word segmenter into the BERT model, which has been trained on the multi-task of intent classification and prompt word output, and is used to obtain the predicted intent classification and the constructed preliminary prompt words according to the input text instructions; The user intention classification output unit outputs the intention classification results of the BERT model to the knowledge engineering work module; The prompt word output unit outputs the preliminary prompt words constructed by the BERT model to the information processing module.

[0012] The technical solution of this application automatically plans the knowledge engineering execution process through user intention identification, and integrates the results of proprietary knowledge engineering to guide the general large model to correctly respond to user questions. The overall design realizes fully automated construction, which is intelligent and efficient. This interactive method avoids the high training cost problem faced by special training or tuning of general large models. It only needs to train a small user intention identification model for vertical fields or segmented scenarios to complete the adaptation of general large models in vertical fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a principle block diagram of an intelligent interactive device for medical question-and-answer scenarios according to the present invention.

[0014] Figure 2 This is another principle block diagram of an intelligent interactive device for medical question-and-answer scenarios according to the present invention.

[0015] Figure 3 This is a flow chart of an intelligent interaction method for medical question-and-answer scenarios according to the present invention. DETAILED DESCRIPTION

[0016] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0017] like Figure 1 As shown, the present application provides an intelligent interactive device for medical question-and-answer scenarios, the device comprising: Instruction acquisition module 1, used to acquire and identify user instructions; User intention identification module 2, used to predict intention and construct preliminary prompt words according to user instructions; the classification of intention prediction at least includes consultation, medicine inquiry, examination inquiry, hospital inquiry, report interpretation, and guidance department; The knowledge engineering working module 3 is used to analyze and obtain the corresponding knowledge engineering output results according to the user instructions and the corresponding intention prediction output by the user intention discrimination module; The information processing module 4 is used to obtain the fusion prompt word instruction according to the user instruction, the preliminary prompt word output by the user intention identification module, and the output result of the knowledge engineering; The general large model interaction module 5 is used to input the fusion prompt word instruction into the general large model, generate and feedback the final interaction information.

[0018] like Figure 2 As shown, the user intention identification module includes: a vertical field word segmenter 201, a BERT model 202, a user intention classification output unit 203, and a prompt word output unit 204.

[0019] The vertical domain word segmenter 201 is a pre-segmentation module for the medical vertical domain, and includes a domain dictionary obtained from authoritative medical guide documents. The vertical domain word segmenter is produced according to the technical route of Chinese word segmenters such as Thulac, and uses authoritative medical guide documents as domain dictionaries.

[0020] BERT model 202, the BERT model has been trained for multi-task intent classification and prompt word output, and is used to obtain the predicted intent classification and construct preliminary prompt words according to the input text instruction; Specifically, the training method of the BERT model includes the following steps: Construct a multi-task training set for the medical vertical field, wherein the training set includes input sentences, corresponding preset intent classifications, and preset prompt words; The BERT model is trained using the multi-task training set so that its understanding of the input content is close to the preset intent classification and preset prompt words.

[0021] A user intention classification output unit 203, used to output the intention classification result of the BERT model to the knowledge engineering working module; The prompt word output unit 204 is used to output the preliminary prompt words constructed by the BERT model to the information processing module.

[0022] The knowledge engineering work module, that is, the Agent intelligent body work unit, calls the corresponding knowledge graph or database according to the classification results of the intention prediction, and obtains all the corresponding medical information according to the key information query of the user's instruction. The knowledge engineering work module can obtain the knowledge engineering output results through at least one or more of the following combinations: Obtain user instructions in text form, obtain input entities through entity recognition, and input the input entities into the knowledge graph or database query reasoning; Querying a text vector corresponding to the instruction vector from a vector database, and obtaining a question prompt word of the user instruction according to the text vector corresponding to the instruction vector; Obtain knowledge engineering content from search engines.

[0023] A "vector database" refers to a special database that stores and manages data in the form of vectors. In the field of artificial intelligence and machine learning, vectors are often used to represent the location of data points in a high-dimensional space. These data points can be text, images, or other types of data. The main feature of vector databases is that they can efficiently process and compare these vector data to support various machine learning tasks such as similarity search, clustering, and classification. The key advantage of vector databases is that they can handle large-scale data sets and can quickly perform similarity searches. Vector databases such as Faiss, Annoy, and Elasticsearch can be used.

[0024] like Figure 3 As shown, the device based on the embodiment of the present application also provides an intelligent interaction method for medical question-and-answer scenarios, characterized in that the method includes the following steps: Step S1, obtaining user instructions; Step S2, inputting the user instruction into a user intention identification module to obtain intention prediction and construct a preliminary prompt word; Step S3, inputting the user instruction and the corresponding intention prediction output by the user intention identification module into the knowledge engineering working module, and analyzing and obtaining the corresponding knowledge engineering output result; Step S4, inputting the user instruction, the preliminary prompt word, and the output result of the knowledge engineering into the information processing module to obtain the fusion prompt word instruction; Step S5, inputting the fused prompt word instruction into the general large model, generating and feeding back the user's final interaction information.

[0025] The step of inputting the user instruction into the user intention identification module to obtain intention prediction and construct a preliminary prompt word further includes: User command input is segmented by the vertical domain segmenter in the medical vertical field; Input the word units processed by the vertical domain word segmenter into the BERT model, which has been trained on the multi-task of intent classification and prompt word output, and is used to obtain the predicted intent classification and the constructed preliminary prompt words according to the input text instructions; The user intention classification output unit outputs the intention classification results of the BERT model to the knowledge engineering work module; The prompt word output unit outputs the preliminary prompt words constructed by the BERT model to the information processing module.

[0026] The technical solution of the present application is described below with a specific example.

[0027] The user input instruction is "How should children take levofloxacin?".

[0028] The output of the user intention identification module is: “Scenario description: The user is seeking advice on medication for children and needs to know information about specific drugs, especially information related to children.

[0029] Specific requirements: Provide information such as the drug's name, ingredients, purpose, usage and dosage, side effects, and contraindications.

[0030] If possible, provide information on interactions with other drugs.

[0031] Provide personalized medication recommendations based on the health status of child users.” The output of the knowledge engineering work module is the known information: ‌Effects‌: This product is a fluoroquinolone antibacterial drug. The oral preparation and injection are suitable for the treatment of community-acquired pneumonia and hospital-acquired pneumonia caused by sensitive bacteria in adults, acute bacterial sinusitis, acute bacterial attacks of chronic bronchitis, complicated and uncomplicated skin and its appendages infections, chronic bacterial prostatitis, complicated and uncomplicated urinary tract infections, acute pyelonephritis, inhalation anthrax (after exposure), etc.

[0032] The main mechanism of action of levofloxacin is to inhibit the activity of bacterial DNA gyrase (topoisomerase II) and topoisomerase IV, hindering the replication of bacterial DNA and ultimately leading to bacterial death.

[0033] For specific usage and dosage for different populations and different diseases, please consult a doctor and refer to the drug instructions of different preparations.

[0034] Oral preparations Community-acquired pneumonia: 0.4 g per day, taken twice a day, morning and evening; or 0.5 g per day, taken once; course of treatment is 7 days.

[0035] Acute bacterial attack of chronic bronchitis: 0.4 g per day, taken twice a day, morning and evening; or 0.5 g per day, taken all at once; course of treatment 7-14 days.

[0036] Acute bacterial sinusitis: 0.4 g per day, taken twice a day, morning and evening; or 0.5 g per day, taken all at once; course of treatment: 10-14 days.

[0037] Skin and soft tissue infections: 0.4 g per day, taken twice a day, morning and evening; or 0.5 g per day, taken all at once; course of treatment: 7-14 days.

[0038] Acute simple lower urinary tract infection: 0.2 g per day, taken once; course of treatment is 5-7 days.

[0039] Complicated urinary tract infection, acute pyelonephritis: 0.4 g per day, taken twice a day, morning and evening; or 0.5 g per day, taken once; course of treatment: 10-14 days.

[0040] Chronic bacterial prostatitis: 0.4 g per day, taken twice a day, morning and evening; or 0.5 g per day, taken once; course of treatment: 6 weeks.

[0041] Eye drops 1-2 drops each time. On the first and second days, drip once every 2 hours during the day, a total of 8 times a day; thereafter, drip once every 4 hours during the day, a total of 4 times a day.

[0042] Recommended course of treatment: 7 days for bacterial conjunctivitis and 9-14 days for bacterial keratitis. Please follow your doctor's advice for details.

[0043] Instructions after use The use of fluoroquinolones may cause moderate to severe photosensitivity / phototoxic reactions after exposure to sunlight or ultraviolet rays, which may cause severe sunburn on exposed skin areas. Therefore, excessive sun or ultraviolet exposure should be avoided during medication, and sunscreen should be used during outdoor activities. If photosensitivity / phototoxic reactions occur, the drug should be discontinued. Keep this product and other drugs out of the reach of children. Do not share this product with people who have the same symptoms as you. This product is only used under the prescribed indications. Please consult your doctor for details.

[0044] The final information processing module processes the above three information into fused prompt words, inputs them into the big model, and obtains the following answer information that meets the user's intention: 1. Drug name and ingredients Drug name: Levofloxacin Ingredients: Levofloxacin is a fluoroquinolone antibacterial drug.

[0045] 2. Application Adult use: Suitable for the treatment of community-acquired pneumonia and hospital-acquired pneumonia caused by sensitive bacteria, acute bacterial sinusitis, acute bacterial attacks of chronic bronchitis, complicated and uncomplicated skin and appendage infections, chronic bacterial prostatitis, complicated and uncomplicated urinary tract infections, acute pyelonephritis, inhalation anthrax (post-exposure), etc.

[0046] Pediatric use: Levofloxacin is approved in my country for use in children aged 6 months to 18 years after exposure to inhalation anthrax.

[0047] 3. Usage and Dosage Adult dosage: Depending on the disease, the daily dose ranges from 0.2g to 0.5g, taken in divided doses or all at once. The specific course of treatment varies according to the disease.

[0048] Dosage for children: Oral administration, 2-4 mg per kg body weight, 2-5 times a day.

[0049] 4. Side effects Side effects in adults: may include tendon injury, cardiac toxicity, adverse central nervous system reactions, peripheral neuropathy, abnormal blood sugar, liver and kidney function damage, etc.

[0050] Pediatric Side Effects: The risk of cartilage damage in pediatric patients is uncommon, not clinically detected within 5 years, or reversible.

[0051] 5. Taboo Taboos for children: Children under 18 years old are prohibited from using this product unless necessary, and the pros and cons should be weighed.

[0052] 6. Interaction with other drugs Levofloxacin can interact with some drugs and affect each other. If you are taking other drugs, be sure to tell your doctor before using levofloxacin and consult your doctor whether you can use the drug and how to use it.

[0053] 7. Personalized medication recommendations Child users: When children choose quinolone drugs, the following prerequisites must be followed: no other safe and effective therapeutic drugs are available; drug sensitivity results indicate sensitivity; the pros and cons are weighed after consultation with infectious blood specialists and clinical pharmacists; an informed consent form is signed before use; the instructions are carefully read when using the drugs, and the entire medication process is monitored.

[0054] The technical solution of the present application automatically plans the knowledge engineering execution process through user intention identification, and integrates the proprietary knowledge engineering results to guide the general large model to correctly respond to user questions. The overall design realizes fully automated construction, which is intelligent and efficient. This interactive method avoids the high training cost problem faced by special training or tuning of general large models. It is only necessary to train a small user intention identification model for vertical fields or segmented scenarios to complete the adaptation of the general large model in the vertical field. At the same time, unlike the prior art solution that uses the same general large model to optimize prompt words, this solution uses a customized BERT model, which will be more professional in answering questions and capabilities, and the model will be lightweight and fast.

Claims

1. An intelligent interactive device for medical question-and-answer scenarios, characterized in that: The device comprises: An instruction acquisition module, used to acquire and identify user instructions; User intention identification module, used to predict intention and construct preliminary prompt words based on user instructions; The knowledge engineering working module is used to analyze and obtain the corresponding knowledge engineering output results according to the corresponding intention prediction output by the user instructions and the user intention discrimination module; The information processing module is used to obtain the fusion prompt word instruction according to the user instruction, the preliminary prompt word output by the user intention discrimination module, and the output result of the knowledge engineering; The general large model interaction module is used to input the fusion prompt word instruction into the general large model, generate and feedback the final interaction information.

2. An intelligent interactive device for medical question-and-answer scenarios according to claim 1, characterized in that: The user intention identification module includes: The vertical domain word segmenter is a pre-segmentation module for the medical vertical field, which contains a domain dictionary obtained from authoritative medical guide documents; A BERT model, which has been trained on multi-tasks of intent classification and prompt word output, and is used to obtain predicted intent classification and construct preliminary prompt words based on input text instructions; The user intent classification output unit is used to output the intent classification results of the BERT model to the knowledge engineering work module; The prompt word output unit is used to output the preliminary prompt words constructed by the BERT model to the information processing module.

3. An intelligent interactive device for medical question-and-answer scenarios according to claim 2, characterized in that: The training method of the BERT model includes the following steps: Construct a multi-task training set for the medical vertical field, wherein the training set includes input sentences, corresponding preset intent classifications, and preset prompt words; The BERT model is trained using the multi-task training set so that its understanding of the input content is close to the preset intent classification and preset prompt words.

4. An intelligent interactive device for medical question-answering scenarios according to claim 1, characterized in that: The knowledge engineering work module obtains the knowledge engineering output results through at least one or more of the following combinations: Obtain user instructions in text form, obtain input entities through entity recognition, and input the input entities into the knowledge graph or database query reasoning; Querying a text vector corresponding to the instruction vector from a vector database, and obtaining a question prompt word of the user instruction according to the text vector corresponding to the instruction vector; Obtain knowledge engineering content from search engines.

5. An intelligent interactive device for medical question-and-answer scenarios according to claim 1, characterized in that: The categories of intention prediction include at least consultation, asking about medicine, asking about examination, asking about the hospital, report interpretation, and guiding the department.

6. An intelligent interaction method for medical question-answering scenarios, characterized in that: The method comprises the following steps: Get user instructions; Inputting the user instruction into the user intention identification module to obtain intention prediction and construct preliminary prompt words; Input the corresponding intention prediction output by the user instruction and user intention identification module into the knowledge engineering work module, and analyze and obtain the corresponding knowledge engineering output result; Inputting user instructions, preliminary prompt words, and knowledge engineering output results into the information processing module to obtain fused prompt word instructions; The fused prompt word instruction is input into the general large model to generate and feed back the user's final interaction information.

7. A method for segmenting a liver tumor according to claim 6, characterized in that: The step of inputting the user instruction into the user intention identification module to obtain intention prediction and construct a preliminary prompt word further includes: User command input is segmented by the vertical domain segmenter in the medical vertical field; Input the word units processed by the vertical domain word segmenter into the BERT model, which has been trained on the multi-task of intent classification and prompt word output, and is used to obtain the predicted intent classification and the constructed preliminary prompt words according to the input text instructions; The user intent classification output unit outputs the intent classification results of the BERT model to the knowledge engineering work module; The prompt word output unit outputs the preliminary prompt words constructed by the BERT model to the information processing module.

Citation Information

Patent Citations

  • Method for predicting intention of traffic participant

    CN116665147A

  • Instruction analysis method, device and equipment based on large language model

    CN117910454A

  • Modular development method and system based on large language model

    CN118626057A

  • Automatic question answering method and device, electronic equipment and storage medium

    CN119088931A

  • Knowledge graph enhanced expert information retrieval prompt project self-generation method and device

    CN119179787A