Intelligent question-answering processing method, device, equipment and medium

By building a professional knowledge information base and a large language model, determining the type of consultation question and selecting an appropriate database, the problem of low quality of output answers in medical big models is solved, and more accurate and reliable reply content is achieved.

CN119739820APending Publication Date: 2025-04-01PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411698506.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The quality of the answers output by the medical big model is not high, mainly because the general big model lacks professionalism for departmental diagnosis and treatment problems and the low timeliness of the data, resulting in the inaccurate answers output.

Method used

By obtaining the consultation information entered by the user, determining the type of consultation question, selecting the adapted target database, searching for relevant knowledge, and entering it into the preset large language model to generate reply information. This method builds the connection between the professional knowledge information base and the large language model, avoids the problem of "illusion" in the big model, and improves the accuracy and reliability of the reply content.

Benefits of technology

It effectively improves the quality of answers output by medical big model, ensures the professionalism and accuracy of the reply content, and reduces the inaccurate answer questions caused by data timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739820A_ABST
    Figure CN119739820A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and discloses an intelligent question-answering processing method, device, equipment and medium, the method comprising: obtaining consulting information input by a user, wherein the consulting information includes consulting questions and / or personal information; determining the question type corresponding to the consulting question based on the consulting information; determining a target database based on the consulting information and the question type, wherein the target database is composed of relevant information corresponding to the question type; generating reply information corresponding to the consulting information based on the target database and a preset large language model. By constructing a professional knowledge information database and connecting it with a large language model, it is possible to search for external exclusive knowledge to guide the large language model to generate reply content, avoid the "hallucination" problem of the large model, and effectively improve the accuracy and reliability of the reply content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence technology and digital medical technology, and in particular to an intelligent question and answer processing method, device, equipment and medium. Background Art

[0002] In the medical field, a question-and-answer assistant based on a generative big model can help answer users' diagnosis and treatment-related questions, provide personalized answers and suggestions, and interact with users in natural language, understand users' questions, and generate appropriate and detailed answers, providing personalized suggestions and recommendations to help users better manage and improve their health status.

[0003] However, there are some limitations in directly applying general big models to the medical field: first, medical application scenarios have more stringent requirements on the output results of big models, and general big models are trained using massive amounts of general data and lack the professionalism to target departmental diagnosis and treatment issues; second, when injecting new knowledge into the big model, the data set needs to be reconstructed and the model retrained, and the data is less timely, which may result in low-quality answers output by the medical big model. Summary of the invention

[0004] The present invention provides an intelligent question-answering processing method, device, computer equipment and medium to solve the technical problem that the quality of answers output by a large medical model is not high.

[0005] In a first aspect, an intelligent question-answering processing method is provided, comprising:

[0006] Acquire consultation information input by the user, wherein the consultation information includes consultation questions and / or personal information;

[0007] Based on the consultation information, determine the problem type corresponding to the consultation question;

[0008] Based on the consultation information and the question type, a target database is determined, wherein the target database is composed of relevant information corresponding to the question type;

[0009] Generate reply information corresponding to the consultation information based on the target database and the preset large language model.

[0010] In a second aspect, an intelligent question-answering processing device is provided, comprising:

[0011] An acquisition module, used to acquire consulting information input by a user, wherein the consulting information includes consulting questions and / or personal information;

[0012] A first determination module is used to determine the type of question corresponding to the consultation question based on the consultation information;

[0013] A second determination module is used to determine a target database based on the consultation information and the question type, wherein the target database is composed of relevant information corresponding to the question type;

[0014] The generation module is used to generate reply information corresponding to the consultation information based on the target database and the preset large language model.

[0015] In a third aspect, 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 implements the steps of the above-mentioned intelligent question and answer processing method when executing the computer program.

[0016] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned intelligent question and answer processing method are implemented.

[0017] In the scheme implemented by the above-mentioned intelligent question-answering processing method, device, computer equipment and storage medium, first, the question type of the consulting question is determined based on the consulting question and / or patient personal information input by the user. Then, based on the question type, a target database adapted to the consulting information is selected, and then the relevant knowledge corresponding to the consulting information is searched through the target database, and finally the relevant knowledge and the consulting information are input into the preset large language model, and the preset large language model is used to generate the final reply information. By constructing a professional knowledge information database and connecting it with the large language model, it is possible to search for external exclusive knowledge to guide the large language model to generate reply content, avoid the "hallucination" problem of the large model, and effectively improve the accuracy and reliability of the reply content. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0019] Figure 1 is a schematic diagram of an application environment of an intelligent question-answering processing method in one embodiment of the present invention;

[0020] Figure 2 is a flow chart of an intelligent question-answering processing method in one embodiment of the present invention;

[0021] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S20;

[0022] Figure 4 yes Figure 2A schematic flow chart of a specific implementation of step S40;

[0023] Figure 5 is a schematic flow chart of an intelligent question-answering processing method in one embodiment of the present invention;

[0024] Figure 6 is a structural diagram of an intelligent question-answering processing device in one embodiment of the present invention;

[0025] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0026] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] The intelligent question-answering processing method provided by the embodiment of the present invention can be applied in Figure 1 In the application environment, the client communicates with the server through the network. The user enters consulting information such as consulting questions on the client. The server analyzes the type of question based on the consulting information sent by the client, and selects the target database mounted on the big model for data retrieval based on the consulting information and the type of question to obtain the data with the highest relevance to the consulting information. The consulting information and the retrieved data are embedded in a fixed question-and-answer template, and the template is submitted to the open source big model to obtain the generated reply results and feed them back to the user. By combining the open source big model with multi-source data integration, more accurate and efficient reply information can be provided to avoid the "hallucination" problem of the model.

[0029] It should be noted that the client can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The client and the server can be connected via Bluetooth, USB (Universal Serial Bus) or other communication connection methods, which are not limited in the embodiments of the present invention. The present invention is described in detail below through specific embodiments.

[0030] See also Figure 2 As shown, Figure 2A flowchart of an intelligent question-answering processing method provided by an embodiment of the present invention includes the following steps:

[0031] S10: Obtain consultation information input by the user;

[0032] Among them, consulting information includes consulting questions and / or personal information.

[0033] The intelligent question and answer processing method provided by the present invention can be applied to intelligent question and answer engines such as online consultation platforms in the medical field. The intelligent question and answer engines are usually implemented through a server, which can receive user consultation information in real time. The consultation information includes consultation questions and / or personal information, wherein the personal information can be patient personal information.

[0034] Exemplarily, the user inputs consulting questions and provides patient personal information. For example, the user's consulting information can be: patient personal information: gender female, age 10 years old, no previous medical history, no history of allergies; the consulting question is as follows "Hello doctor, my child is 150cm tall and weighs 30kg, is this normal?"; if the user only inquires about relevant information about the local hospital, such as "What is the medical insurance policy in XX city?", there is no need to provide patient personal information.

[0035] S20: Determine the type of question corresponding to the consultation question based on the consultation information;

[0036] S30: determining a target database based on the consultation information and the question type;

[0037] The target database is composed of relevant information corresponding to the question type.

[0038] For steps S20-S30, the large consultation model used for online consultations will inevitably generate relevant but inappropriate responses during consultations, as high-quality training data is difficult to obtain. For departments with higher quality requirements (such as pediatrics), most users are guardians of patients. Because they are more concerned about their patients, the "hallucinations" or inappropriate responses generated by the large pediatric consultation model will cause users to question the professionalism of the consultation platform. Based on the above problems, this application proposes to build professional databases for different data types, and then in the consultation process, based on the consultation content input by the user, understand the user's consultation intention, match the most suitable question type, and then select the corresponding target database for the question type to provide more accurate professional data.

[0039] In one embodiment of the present application, Figure 3 As shown, a specific solution for determining the type of question is provided. In S20, the type of question corresponding to the consulting question is determined based on the consulting information, which specifically includes the following steps S21-S22:

[0040] S21: extracting features from the consulting information to obtain multiple keywords corresponding to the consulting information;

[0041] In this step, the consulting information is segmented to split the sentence into words or phrases. Then, a plurality of keywords are extracted from the split words or phrases using a pre-set extraction rule.

[0042] Optionally, the pre-set extraction rules can be to extract keywords based on specific part-of-speech combinations or semantic relationships. Specifically, after splitting the problem sentence into phrases, common stop words are removed, and part-of-speech tagging is performed to identify important parts of speech such as names, verbs, and adjectives. Thereafter, based on the part-of-speech tagging results, nouns, verbs, and adjectives are extracted as keywords. Exemplarily, the name phrases "dizziness" and "nausea" are extracted; the verb phrases "often feel" and "accompanied by" are extracted.

[0043] S22: Input multiple keywords into a preset classification model, and output the question type corresponding to the consulting question.

[0044] The question type includes at least one of the following: a consultation type and a non-consultation type.

[0045] In this step, in order to provide users with more comprehensive services, multiple question types are set based on application scenarios, including consultation type and non-consultation type. The consultation type refers to professional diagnosis and treatment questions raised by users (for example, what to do if you have a fever of 39.2℃); the non-consultation type refers to other consulting questions raised by the questioner (such as consulting on medical insurance policies, hospital service procedures, etc.).

[0046] After extracting multiple keywords, select a preset classification model (such as the Transformer-based BERT model), convert the extracted keywords into text sequences that the classification model can accept, and then input them into the preset classification model for inference. Obtain the category label output by the classification model, and determine the type of question corresponding to the consultation question based on the category label output by the model.

[0047] Exemplarily, the patient's personal information entered by the user: gender female, age 10 years old, no previous medical history, no history of allergies;

[0048] The consultation dialogue is as follows:

[0049] Doctor: Hello, baby’s parents.

[0050] Patient: My child is 150cm tall and weighs 30kg. Is this normal?

[0051] Feature extraction is performed on the above information to obtain multiple keywords: #start Patient information Gender Female Age 10 years old No history of allergies No history of allergies #end; #start Is it normal for the patient's child to be 150cm tall and weigh 30kg #end. Multiple keywords are input into the preset classification model, and the category label 1 is output. Based on the correspondence between the category label and the question type (0 represents non-inquiry type, 1 represents inquiry type), the question type is determined to be an inquiry type.

[0052] Through the above method, the type of question is determined, and personalized services are provided according to the type of question, which can meet the different needs of users.

[0053] In one embodiment of the present application, a specific solution for screening an adapted target database is provided. In S30, the target database is determined based on the consulting information and the question type, which specifically includes the following steps S31-S36:

[0054] S31: Determine whether the question type is a non-question type, if yes, proceed to step S32, if no, proceed to step S33;

[0055] Multiple databases are pre-built based on various question types, including a preset consulting database, a preset medical knowledge base, and a preset consultation logic base. After determining the question type corresponding to the user's consultation content, an appropriate database is selected based on the question type as the basis for obtaining reply information to ensure that the reply information is more professional and accurate.

[0056] S32: taking a preset consultation database corresponding to the non-consultation type as a target database;

[0057] When the question type is non-medical consultation type, the preset consultation database will be used as the target database for this round of question and answer. The preset consultation database includes the latest collected medical insurance policies, major hospital services and other non-medical consultation related data.

[0058] For example, the pediatric doctors on duty at XX Hospital on Tuesday are: Zhang San and Li Si.

[0059] S33: When the question type is a medical inquiry type, a keyword list corresponding to a preset medical knowledge base is obtained;

[0060] S34: Match the multiple keywords with the keyword list to determine whether the keyword list contains the multiple keywords. If so, proceed to step S35; if not, proceed to step S36;

[0061] For steps S33-S34, when the question type is a consultation type, the consultation platform needs to respond to the user's questions based on the latest and most accurate medical knowledge. A preset medical knowledge base with timeliness is constructed in advance based on medical question-and-answer knowledge in the form of QA, and a keyword list is generated based on the information in the knowledge base. The extracted multiple keywords are matched with all the keywords included in the keyword list to determine whether the knowledge corresponding to the consultation question is included in the preset medical knowledge base.

[0062] S35: Using the preset medical knowledge base as the target database;

[0063] S36: If the keyword list does not include any keyword, the preset medical inquiry logic library is used as the target database.

[0064] For steps S35-S36, if the keyword list contains multiple keywords, it means that the relevant medical knowledge corresponding to the consultation question can be retrieved in the preset medical knowledge base, and the preset medical knowledge base is used as the target database. If any keyword is not included in the keyword list, it means that the information entered by the user is incomplete. In order to ensure the accuracy of the answer, the user needs to provide more specific personal health information and / or description of the condition, etc. It should be noted that in the process of the question-and-answer dialogue, it is particularly important to guide the user to reply correctly. If the inappropriate questions raised in the consultation cause the patient or guardian to be unable to answer effectively, the final output of the model may be inappropriate or irrelevant, which will cause the user to question the professionalism of the consultation platform. Based on the above problems, this application proposes to collect the wrong or inappropriate and illogical questioning methods monitored and identified by doctors in the past consultation process, and build a preset consultation logic library based on these inappropriate questioning methods. Then, when asking questions to the user, the preset consultation logic library is used as the target database to avoid inappropriate and illogical errors in the consultation process, quickly identify and eliminate irrelevant consultation questions, and concentrate on obtaining key information.

[0065] For example, the preset medical inquiry logic library may include: when seeing a three-month-old infant patient, the doctor cannot ask the patient about his or her feelings, such as whether the patient is in pain or itchy.

[0066] S40: Generate reply information corresponding to the consultation information based on the target database and the pre-trained medical language model.

[0067] According to the question type, after selecting the appropriate target database, obtain the relevant knowledge corresponding to the consulting question retrieved from the target database, fill the question and answer template of the medical big language model with the consulting information and relevant knowledge, input the filled question and answer template into the model for reasoning and generating responses, and provide the response information generated by the model to the user.

[0068] In one embodiment of the present application, Figure 4 As shown, a specific solution for screening an adapted target database is provided. In S40, based on the target database and the preset large language model, reply information corresponding to the consultation information is generated, which specifically includes the following steps S41-S42:

[0069] S41: When the target database is a preset consulting database, searching the target database based on multiple keywords to obtain search results;

[0070] S42: Fill in a first preset question-and-answer dialogue template based on the consultation information and the search results, and input the filled first preset question-and-answer dialogue template into a preset large language model to obtain reply information corresponding to the consultation information.

[0071] For steps S41-S42, when the target database is a preset consulting database, it means that the information consulted by the current user is non-consulting information. At this time, the corresponding answer is searched in the preset consulting database based on the multiple keywords extracted from the consulting information to obtain the search result. Afterwards, the search result and the consulting information are filled into the first preset question-and-answer dialogue template, and the filled first preset question-and-answer dialogue template is input into the preset large language model to output the reply information corresponding to the consulting information.

[0072] Optionally, the preset large language model can be a trained local open source Chinese large language model, such as GPT-4 medical version or other large models specifically used for medical question and answer. The first preset question and answer dialogue template is a prompt template set for non-medical questions. The large language model infers and generates responses based on the input prompt template.

[0073] Exemplarily, the first preset question and answer template structure may be:

[0074] Consultation information entered by the user:

[0075] Question Type:

[0076] Search Results:

[0077] Please generate a response:

[0078] It is understandable that, in the process of searching for answers in a preset consulting database, if the answer corresponding to the consulting information exists in the database, the answer can be directly output; if the answer corresponding to the consulting information does not exist in the database, the output that no corresponding answer was retrieved is used as the search result.

[0079] In the above manner, when a user asks a question to the large language model, the most relevant answer is provided by the mounted preset consulting database, and then the question asked and the search answer are embedded in a fixed template, which is submitted to the large language model to finally generate a reply result, ensuring the accuracy of the reply result.

[0080] In one embodiment of the present application, a specific solution for screening an adapted target database is provided. In S40, based on the target database and the preset large language model, reply information corresponding to the consultation information is generated, which specifically includes the following steps S411-S412:

[0081] S411: When the target database is a preset medical knowledge base, multiple keywords are input into the preset medical knowledge base, and medical knowledge data corresponding to the consultation information is output;

[0082] S412: Fill in a second preset question-and-answer dialogue template based on the medical knowledge data and the consultation information, and input the filled second preset question-and-answer dialogue template into a preset large language model to obtain reply information corresponding to the consultation information.

[0083] For steps S411-S412, when the template database is a preset medical knowledge base, it means that the question input by the user is a consultation question, and the preset medical knowledge base constructed contains relevant knowledge corresponding to the consultation question. At this time, multiple keywords are searched in the preset medical knowledge base, and the medical knowledge data with the highest correlation is output. The searched medical knowledge data and consultation information are filled into the second preset question-and-answer dialogue template. Afterwards, the filled second preset question-and-answer template is input into the preset large language model for reasoning and generating replies, and finally a reply result is generated.

[0084] Optionally, the second preset question-and-answer template is a prompt template based on medical questions and can be constructed by obtaining medical knowledge data. Since there is a lot of knowledge in the preset medical knowledge base, if the searched related knowledge is directly fed back to the user, it may be difficult for the user to understand. Therefore, by setting the second preset question-and-answer template, the searched knowledge data is summarized and a brief conclusion is fed back to the user.

[0085] Exemplarily, the second preset question and answer template may be:

[0086] Consultation information entered by the user: The patient is female, 10 years old, has no medical history, no history of allergies, the child is 150cm tall and weighs 30kg, is this normal?

[0087] Question type: Question type

[0088] Search results: Average height and weight of 10-year-old girls. The average height is about 140.1 cm. If it is less than 133.8 cm, it is short, and if it is less than 127.6 cm, it is short. The average weight is about 31.76 kg. If the weight is less than 26.60 kg, you need to be alert to being thin, and if it is less than 22.54 kg, you need to be alert to being thin; if it is more than 38.41 kg, you need to be alert to being overweight, and if it is more than 47.15 kg, you need to be alert to obesity.

[0089] Task: Generate a short summary.

[0090] Please generate a reply: The child's height and weight are normal, don't worry.

[0091] Through the above method, the preset medical knowledge base is associated with the open source big model, so that the model can retrieve the medical knowledge base in real time when generating responses, ensuring that more accurate and relevant answers are provided.

[0092] In one embodiment of the present application, a specific solution for screening an adapted target database is provided. In S40, based on the target database and the preset large language model, reply information corresponding to the consultation information is generated, which specifically includes the following steps S4111-S4112:

[0093] S4111: When the target database is a preset medical inquiry logic library, based on multiple keywords, determining error logic prompt information corresponding to the consultation information in the preset medical inquiry logic library;

[0094] S4112: Fill in a third preset question-and-answer dialogue template based on the error logic prompt information and the consultation information, and input the filled preset question-and-answer template into a preset large language model to obtain reply information corresponding to the consultation information.

[0095] For steps S4111-S4112, when the target database is a preset inquiry logic library, it means that the user's consulting question is an inquiry question, but the preset medical knowledge base does not search out relevant knowledge, indicating that the information provided by the user is incomplete or inaccurate. At this time, it is necessary to guide the user to provide more information to search for relevant knowledge. Since users are often less professional in the medical field, if inappropriate inquiry content is fed back during the inquiry process, the user is guided to give wrong or useless information, which may cause the final reply result to be irrelevant or inaccurate. Therefore, this application pre-constructs a preset inquiry logic library based on past inappropriate inquiry dialogues, and gives an erroneous logic prompt for the current inquiry dialogue to ensure the accuracy of the questions guided by the user. Specifically, based on multiple keywords, a search is performed in the preset inquiry logic library to determine whether there is an erroneous logic prompt information related to the consultation information. Thereafter, the consultation information and the erroneous logic prompt information are input into the third preset question-and-answer template set for the preset inquiry logic library, and the filled template is input into the preset large language model to obtain the reply question corresponding to the consultation information.

[0096] For example, multiple keywords are "gender male", "age 2 years old", "on the legs", "rash", and "what to do". The relevant error logic prompt information searched in the preset consultation logic library is "When seeing a three-month-old infant patient, the doctor cannot ask the patient about his feelings, such as whether he is in pain or itchy."

[0097] The third preset question and answer template can be:

[0098] Consultation information entered by the user: The patient is a male. What should I do if a rash suddenly appears on his thigh?

[0099] Question type: Question type

[0100] Incorrect logic prompt information: When seeing a three-month-old baby patient, the doctor cannot ask the patient about his feelings, such as whether he is in pain or itchy.

[0101] Task: Ask the patient for more key information.

[0102] Please generate a response: Can you describe the appearance of the rash, such as size, shape, color, etc.

[0103] Through the above method, a preset consultation logic library is constructed and associated with the open source large model, so that the model will not raise redundant or unwanted questions when obtaining more key information, which significantly improves the accuracy of the consultation. At the same time, it can quickly obtain the key information provided by the user, speed up the consultation process, and improve the efficiency of the consultation.

[0104] In actual application scenarios, such as Figure 5As shown, it is a schematic diagram of the intelligent question-answering process. Specifically, in the medical field, before performing a question-answering task, you can choose to mount a database based on the application scenario. For example, if it is a question-answering task in a medical consultation scenario, you can choose not to mount the preset consulting database. After determining that the type of question entered by the user is a medical consultation type, it is necessary to determine whether all keywords are included in the preset medical knowledge base. In order to improve the efficiency of the question-answering task, the database classifier is pre-trained based on the keyword list of the preset medical knowledge base, and then multiple keywords are input into the database classifier to determine which database to introduce, such as introducing a preset medical knowledge base, introducing a preset medical consultation logic library, or not related to the medical consultation content, and no database needs to be introduced. Then search in the corresponding database, get a reply, add it to the input of the preset large language model, and get the final output of the large model.

[0105] In one embodiment of the present application, a specific database construction scheme is provided. Before S10, that is, before obtaining the consulting information input by the user, the following steps S51-S56 are specifically included:

[0106] S51: Obtain medical knowledge dataset, historical error logic consultation dataset, medical insurance policy dataset and hospital service dataset;

[0107] S52: Generate a preset medical knowledge base based on the medical knowledge data set;

[0108] S53: Generate a preset diagnosis logic library based on the historical error logic diagnosis data set;

[0109] S54: Generate a preset consultation database based on the medical insurance policy data set and the hospital service data set;

[0110] For steps S51-S54, medical clinical guidelines, medical books, medical papers, etc. downloaded from the website are collected and summarized into a medical knowledge data set, and a preset medical knowledge base is constructed based on the summarized medical knowledge data set.

[0111] Furthermore, during the use of the online consultation platform, professional doctors will regularly evaluate the consultation dialogues, mark out errors, inappropriateness, and illogical content in the consultation dialogues, summarize them to obtain a historical erroneous logic consultation data set, and build a preset consultation logic library based on the historical erroneous consultation data set.

[0112] Furthermore, the latest medical insurance policy data set is collected from the medical insurance bureau or relevant government websites, and the hospital service data set is collected from the hospital management system or official website. Based on the medical insurance policy data set and the hospital service data set, a preset consulting database is constructed.

[0113] Optionally, the preset medical knowledge base, preset consultation logic base, and preset consultation database are updated at preset time to ensure the timeliness and accuracy of the data in the database. In addition, if there are many types of data, other types of databases are allowed to be added to achieve database scalability, help the model reduce hallucinations, generate high-quality responses that match the application scenario, and enhance the professionalism and reliability of the answers generated by the model.

[0114] Through the above method, a database of various question types is established, so that when performing question-answering tasks, the reasoning ability of the large model and the professional information knowledge base can be combined to perform retrieval and generate professional answers.

[0115] S55: Obtain the historical consultation dialogue dataset of the target department;

[0116] S56: Adjust the parameters of the preset large language model through the historical medical consultation dialogue dataset.

[0117] For steps S55-S56, a local open source Chinese large language model with good performance is selected as the basic model, and a dataset of consultation dialogues between doctors and patients in real target departments (such as pediatrics) is collected to fine-tune the model so that the intelligent question-answering assistant can generate more accurate, coherent and detailed answers to various medical questions in target departments raised by users.

[0118] In actual application scenarios, you can filter the public Chinese medical online consultation dataset ChatMed ConsultDataset to obtain an initial consultation dialogue dataset. The questions in the ChatMed Consult Dataset are all real medical consultation questions from the Internet, reflecting the medical consultation needs of different users / patients, and the replies come from the OpenAI GPT-3.5 engine answers. After uniformly adjusting the answer style of the collected real pediatric consultation dialogue dataset, only a small number or additional model parameters are fine-tuned to form a large pediatric consultation model. By fixing most of the pre-training parameters, the large model inherits the capabilities acquired in the pre-training stage, while being able to quickly transfer the knowledge in the pre-training stage to the pediatric consultation task, and efficiently adapt to various downstream application tasks.

[0119] Exemplarily, the consultation dialogue data may be:

[0120] Doctor: Hello, baby’s parents, what happened today?

[0121] Patient: He has a slight fever, with a temperature of about 38.5 degrees.

[0122] Doctor: Do you have any cough, runny nose or other discomfort?

[0123] Patient: I have a slight cough, but it's not serious and I don't have a runny nose.

[0124] Doctor: Have you been eating poorly or feeling down lately?

[0125] Patient: Poor appetite, a little irritable.

[0126] Doctor: I see. We can measure his temperature first to see if it has risen. Did you give him any water or fever-reducing medicine?

[0127] Patient: I gave him some water, but I haven't given him any antipyretic medicine yet.

[0128] Doctor: OK, if the temperature continues to rise, I suggest giving him an appropriate amount of antipyretic medicine. At the same time, it is important to keep him hydrated. We also need to observe whether he has other symptoms, such as rash or ear pain.

[0129] Patient: OK, I'll pay attention.

[0130] Doctor: If the condition does not improve or other symptoms appear, go to an offline hospital immediately.

[0131] Hope he gets better soon!

[0132] It can be seen that in the above scheme, first, the type of the consulting question is determined based on the consulting question and / or patient personal information input by the user. Then, based on the question type, the target database adapted to the consulting information is selected, and then the relevant knowledge corresponding to the consulting information is searched through the target database, and finally the relevant knowledge and consulting information are input into the preset large language model, and the preset large language model is used to generate the final reply information. By building a professional knowledge information database and connecting it with the large language model, it is possible to search for external exclusive knowledge to guide the large language model to generate reply content, avoid the "hallucination" problem of the large model, and effectively improve the accuracy and reliability of the reply content.

[0133] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean 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 embodiment of the present invention.

[0134] In one embodiment, an intelligent question and answer processing device is provided, and the intelligent question and answer processing device corresponds one-to-one to the intelligent question and answer processing method in the above embodiment. Figure 6 As shown, the intelligent question-answering processing device includes: an acquisition module 101, a first determination module 102, a second determination module 103 and a generation module 104. The functional modules are described in detail as follows:

[0135] The acquisition module 101 is used to acquire the consulting information input by the user, wherein the consulting information includes consulting questions and / or personal information;

[0136] A first determination module 102 is used to determine the type of question corresponding to the consultation question based on the consultation information;

[0137] A second determination module 103 is used to determine a target database based on the consultation information and the question type, wherein the target database is composed of relevant information corresponding to the question type;

[0138] The generation module 104 is used to generate reply information corresponding to the consultation information based on the target database and the preset large language model.

[0139] In one embodiment, the first determining module 102 is specifically configured to:

[0140] Extract features of the consulting information to obtain multiple keywords corresponding to the consulting information;

[0141] Input multiple keywords into the preset classification model and output the question type corresponding to the consulting question;

[0142] The question type includes at least one of the following: a consultation type and a non-consultation type.

[0143] In one embodiment, the target database includes a preset consultation database, a preset medical knowledge database, and a preset consultation logic database. The second determination module 103 is specifically used to:

[0144] When the question type is a non-inquiry type, the preset consultation database corresponding to the non-inquiry type is used as the target database;

[0145] When the question type is a medical consultation type, a keyword list corresponding to a preset medical knowledge base is obtained;

[0146] Matching multiple keywords with the keyword list to determine whether the keyword list contains multiple keywords;

[0147] If the keyword list contains multiple keywords, the preset medical knowledge base is used as the target database;

[0148] If the keyword list does not contain any keyword, the preset medical consultation logic library is used as the target database.

[0149] In one embodiment, the generating module 104 is specifically configured to:

[0150] In the case where the target database is a preset consulting database, searching the target database based on multiple keywords to obtain search results;

[0151] A first preset question-answer dialogue template is filled based on the consultation information and the search results, and the filled first preset question-answer dialogue template is input into a preset large language model to obtain reply information corresponding to the consultation information.

[0152] In one embodiment, the generating module 104 is further configured to:

[0153] In the case where the target database is a preset medical knowledge base, multiple keywords are input into the preset medical knowledge base, and medical knowledge data corresponding to the consultation information is output;

[0154] A second preset question-and-answer dialogue template is filled based on the medical knowledge data and the consultation information, and the filled second preset question-and-answer dialogue template is input into a preset large language model to obtain reply information corresponding to the consultation information.

[0155] In one embodiment, the generating module 104 is further configured to:

[0156] In the case where the target database is a preset medical inquiry logic library, based on multiple keywords, determining error logic prompt information corresponding to the consultation information in the preset medical inquiry logic library;

[0157] Based on the error logic prompt information and the consultation information, a third preset question-and-answer dialogue template is filled, and the filled third preset question-and-answer template is input into the preset large language model to obtain reply information corresponding to the consultation information.

[0158] In one embodiment, the acquisition module 101 is further used to acquire a medical knowledge data set, a historical error logic consultation data set, a medical insurance policy data set, and a hospital service data set;

[0159] The generation module 104 is also used to: generate a preset medical knowledge base based on the medical knowledge data set; generate a preset consultation logic base based on the historical error logic consultation data set; generate a preset consultation database based on the medical insurance policy data set and the hospital service data set;

[0160] The acquisition module 101 is also used to acquire a historical consultation dialogue dataset of the target department.

[0161] In one embodiment, the device further includes a training module for adjusting parameters of a preset large language model using a historical medical consultation dialogue data set.

[0162] The present invention provides an intelligent question-answering processing device. First, based on the consulting questions and / or patient personal information input by the user, the question type of the consulting question is determined. Then, based on the question type, a target database adapted to the consulting information is selected, and then the relevant knowledge corresponding to the consulting information is searched through the target database. Finally, the relevant knowledge and the consulting information are input into a preset large language model, and the preset large language model is used to generate the final reply information. By constructing a professional knowledge information database and connecting it with the large language model, it is possible to search for external exclusive knowledge to guide the large language model to generate reply content, avoid the "hallucination" problem of the large model, and effectively improve the accuracy and reliability of the reply content.

[0163] For the specific definition of the intelligent question and answer processing device, please refer to the definition of the intelligent question and answer processing method above, which will not be repeated here. Each module in the above-mentioned intelligent question and answer processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0164] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the server side of an intelligent question and answer processing method.

[0165] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of an intelligent question and answer processing method.

[0166] 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 implements the following steps when executing the computer program:

[0167] Acquire consultation information input by the user, wherein the consultation information includes consultation questions and / or personal information;

[0168] Based on the consultation information, determine the problem type corresponding to the consultation question;

[0169] Based on the consultation information and the question type, a target database is determined, wherein the target database is composed of relevant information corresponding to the question type;

[0170] Generate reply information corresponding to the consultation information based on the target database and the preset large language model.

[0171] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0172] Acquire consultation information input by the user, wherein the consultation information includes consultation questions and / or personal information;

[0173] Based on the consultation information, determine the problem type corresponding to the consultation question;

[0174] Based on the consultation information and the question type, a target database is determined, wherein the target database is composed of relevant information corresponding to the question type;

[0175] Generate reply information corresponding to the consultation information based on the target database and the preset large language model.

[0176] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0178] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0179] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. An intelligent question-answering processing method, characterized in that: include: Acquire consultation information input by a user, wherein the consultation information includes consultation questions and / or personal information; Based on the consultation information, determining the question type corresponding to the consultation question; Based on the consultation information and the question type, determining a target database, wherein the target database is composed of relevant information corresponding to the question type; Based on the target database and the preset large language model, reply information corresponding to the consultation information is generated.

2. The method according to claim 1, characterized in that The step of determining the type of question corresponding to the consulting question based on the consulting information specifically includes: Extracting features of the consulting information to obtain multiple keywords corresponding to the consulting information; Input the multiple keywords into a preset classification model, and output the question type corresponding to the consulting question; The question type includes at least one of the following: a medical consultation type and a non-medical consultation type.

3. The method according to claim 2, characterized in that The target database includes a preset consultation database, a preset medical knowledge base, and a preset consultation logic base. The step of determining the target database based on the consultation information and the question type specifically includes: In the case where the question type is the non-questioning type, the preset consultation database corresponding to the non-questioning type is used as the target database; When the question type is the medical inquiry type, obtaining a keyword list corresponding to the preset medical knowledge base; Matching the multiple keywords with the keyword list to determine whether the keyword list contains the multiple keywords; If the keyword list includes the multiple keywords, using the preset medical knowledge base as the target database; If the keyword list does not contain any keyword, the preset medical inquiry logic library is used as the target database.

4. The method according to any one of claims 1 to 3, characterized in that: The step of generating reply information corresponding to the consultation information based on the target database and the preset large language model specifically includes: In the case where the target database is a preset consulting database, searching the target database based on multiple keywords to obtain search results; A first preset question-and-answer dialogue template is filled based on the consultation information and the search results, and the filled first preset question-and-answer dialogue template is input into a preset large language model to obtain reply information corresponding to the consultation information.

5. The method according to any one of claims 1 to 3, characterized in that The step of generating reply information corresponding to the consultation information based on the target database and the preset large language model specifically includes: In the case where the target database is a preset medical knowledge base, multiple keywords are input into the preset medical knowledge base, and medical knowledge data corresponding to the consultation information is output; A second preset question-and-answer dialogue template is filled based on the medical knowledge data and the consultation information, and the filled second preset question-and-answer dialogue template is input into a preset large language model to obtain reply information corresponding to the consultation information.

6. The method according to any one of claims 1 to 3, characterized in that The step of generating reply information corresponding to the consultation information based on the target database and the preset large language model specifically includes: In the case where the target database is a preset medical inquiry logic library, based on a plurality of keywords, determining error logic prompt information corresponding to the consultation information in the preset medical inquiry logic library; A third preset question-and-answer dialogue template is filled based on the error logic prompt information and the consultation information, and the filled third preset question-and-answer dialogue template is input into a preset large language model to obtain reply information corresponding to the consultation information.

7. The method according to any one of claims 1 to 3, characterized in that Before obtaining the consultation information input by the user, the method further includes: Obtain medical knowledge datasets, historical incorrect logical consultation datasets, medical insurance policy datasets, and hospital service datasets; Based on the medical knowledge data set, generating a preset medical knowledge base; Based on the historical error logic inquiry data set, generating a preset inquiry logic library; Based on the medical insurance policy data set and the hospital service data set, generating a preset consultation database; Obtain the historical consultation dialogue dataset of the target department; The parameters of the preset large language model are adjusted using the historical medical consultation dialogue dataset.

8. An intelligent question-answering processing device, characterized in that: include: An acquisition module, used to acquire consulting information input by a user, wherein the consulting information includes consulting questions and / or personal information; A first determination module, configured to determine, based on the consultation information, a question type corresponding to the consultation question; A second determination module is used to determine a target database based on the consultation information and the question type, wherein the target database is composed of relevant information corresponding to the question type; A generation module is used to generate reply information corresponding to the consultation information based on the target database and a preset large language model.

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, the steps of the intelligent question and answer processing method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the intelligent question-answering processing method as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Question answering method for compliance consultation and knowledge base generation method and device

    CN120653815A

  • Data generation method and device, storage medium and electronic equipment

    CN121458311A