Interaction guiding method, device and equipment of medical question and answer model and medium

By generating prior tokens through grouping learning of medical question-and-answer data according to grouping dimensions, updating the knowledge base and embedding the encoding, the high cost and insufficient generalization of existing medical question-and-answer systems are solved, and a more efficient and accurate medical question-and-answer service is achieved.

CN122114142APending Publication Date: 2026-05-29PING AN TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2026-01-14
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing medical question-answering systems suffer from high parameter update costs, insufficient generalization ability and susceptibility to overfitting, lack of efficient knowledge distillation and integration mechanisms, difficulty in quickly absorbing new medical knowledge, resulting in performance degradation and medical safety risks across diseases and treatment scenarios.

Method used

Medical question-and-answer data is collected and grouped according to preset grouping dimensions. A large language model with fixed parameters is used for knowledge learning to generate prior tokens, update the medical knowledge base, and match the corresponding prior token embedding code when receiving user questions to guide the question-and-answer model to generate answers.

Benefits of technology

It improves the interactive accuracy and efficiency of the medical question-answering model, enables rapid updates to the knowledge base to adapt to changes in medical knowledge, reduces computational resource requirements and data annotation costs, and lowers medical safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122114142A_ABST
    Figure CN122114142A_ABST
Patent Text Reader

Abstract

The application relates to the fields of artificial intelligence and intelligent medical treatment, in particular to a medical question and answer model interaction guiding method and device, equipment and medium. The method groups medical question and answer data based on a preset N grouping dimension, determines a target dimension to which a target question belongs based on a large language model with fixed parameters for any grouping dimension, and uses a target prior token to guide a preset medical question and answer model to generate a target answer. The application can be applied to business scenarios such as intelligent medical treatment, medical question and answer data is first collected, all prior tokens are used to update a preset medical knowledge base, a target question is coded, a target code is obtained by embedding a prior token, and a preset medical question and answer model is input to output an answer. Thus, the prior token is obtained by grouping and learning medical question and answer data to update the knowledge base, and when a user question is processed, the corresponding prior token is matched to embed the question code to guide the model, so that the accuracy of medical question and answer model interaction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence technology and smart healthcare, and in particular to an interactive guidance method, device, equipment and medium for a medical question-and-answer model. Background Technology

[0002] Current intelligent question-answering products and related technologies in the medical field face numerous significant problems in practical applications. Most existing medical question-answering systems rely on the basic capabilities of large language models, improving performance through fine-tuning combined with reinforcement learning, but these methods have obvious shortcomings.

[0003] First, parameter updates are extremely costly. Existing reinforcement learning methods, such as group-based policy optimization, require supervised fine-tuning before the reinforcement learning phase to change the model's output distribution. This not only requires substantial computational resources but also consumes massive amounts of labeled medical data. Medical data itself is scarce and sensitive, and obtaining large-scale, high-quality labeled data is difficult and costly, severely limiting the practical application of such methods in the medical field.

[0004] Secondly, the models suffer from insufficient generalization ability and are prone to overfitting. Existing technologies often struggle to effectively integrate specialized medical tools and specific prompting strategies when dealing with specialized medical scenarios, leading to significant performance degradation in cross-disease and cross-treatment scenarios. Furthermore, parameter-updating optimization methods are highly susceptible to overfitting when dealing with limited medical data, causing the model to provide inaccurate or even incorrect answers in actual clinical question answering, posing a medical safety risk.

[0005] Furthermore, existing systems lack efficient knowledge distillation and integration mechanisms. Medical knowledge is rapidly updated and highly specialized, making it difficult for existing models to quickly absorb new medical knowledge and apply it to question-and-answer scenarios. Traditional methods cannot extract high-quality medical experience knowledge in a lightweight manner, resulting in weak model processing capabilities for the latest treatment guidelines, rare disease cases, and other content, failing to meet the needs of clinicians and patients for precision medical question-and-answer. Currently, there is no technology that can optimize the output distribution of a medical question-and-answer model through knowledge distillation without updating model parameters; existing related technologies still rely on parameter fine-tuning, which suffers from the aforementioned problems of high cost and poor generalization ability.

[0006] Therefore, how to learn from medical question-and-answer data to obtain prior tokens to update the knowledge base, and how to match the corresponding prior tokens to embed into the question encoding guide model when processing user questions, so as to improve the accuracy of medical question-and-answer model interaction, has become an urgent problem to be solved. Summary of the Invention

[0007] In view of this, embodiments of this application provide an interactive guidance method, apparatus, device, and medium for a medical question-answering model, in order to solve the problem of how to learn by grouping medical question-answering data to obtain prior tokens to update the knowledge base, and how to match the corresponding prior tokens to embed the question encoding guidance model when processing user questions, so as to improve the accuracy of medical question-answering model interaction.

[0008] In a first aspect, embodiments of this application provide an interactive guidance method for a medical question-and-answer model, which involves collecting existing medical question-and-answer data, grouping the medical question-and-answer data according to preset N grouping dimensions, and obtaining datasets under the corresponding grouping dimensions, where N is an integer greater than zero; For any grouping dimension, based on a large language model with fixed parameters, knowledge learning is performed on each data in the dataset under the grouping dimension to obtain a priori token. All grouping dimensions are traversed to obtain the priori token under each grouping dimension. All priori tokens are used to update the preset medical knowledge base to obtain the updated medical knowledge base. Upon receiving a target question sent by a user, the target dimension to which the target question belongs is determined, and based on the target dimension, the prior token of the target corresponding to the group dimension is matched from the updated medical knowledge base; The target question is encoded to obtain an initial code. The prior token of the target is embedded into the initial code to obtain a target code. The target code is input into a preset medical question-answering model to output the target answer. The prior token of the target is used to guide the preset medical question-answering model to generate the target answer.

[0009] Secondly, an embodiment of this application provides an interactive guidance device for a medical question-and-answer model, comprising: The data grouping module is used to collect existing medical Q&A data and group the medical Q&A data according to N preset grouping dimensions to obtain the dataset under the corresponding grouping dimension, where N is an integer greater than zero. The knowledge base update module is used to learn knowledge from each piece of data in the dataset under any group dimension based on a large language model with fixed parameters, to obtain prior tokens, traverse all group dimensions to obtain prior tokens under each group dimension, and use all prior tokens to update the preset medical knowledge base to obtain the updated medical knowledge base. The prior token matching module is used to determine the target dimension to which the target question belongs when a target question is received from a user, and to match the prior token of the target corresponding to the group dimension from the updated medical knowledge base based on the target dimension. The guided response module is used to encode the target question to obtain an initial code, embed the target's prior token into the initial code result to obtain a target code, input the target code into a preset medical question-and-answer model, and output the target answer. The target's prior token is used to guide the preset medical question-and-answer model to generate the target answer.

[0010] Thirdly, embodiments of this application provide a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the interactive guidance method of the medical question-and-answer model as described in the first aspect.

[0011] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the interactive guidance method for the medical question-and-answer model as described in the first aspect.

[0012] The beneficial effects of the embodiments in this application compared with the prior art are: This application collects existing medical question-and-answer data. Based on N preset grouping dimensions, the medical question-and-answer data is grouped to obtain datasets under the corresponding grouping dimensions, where N is a positive integer. For any grouping dimension, based on a large language model with fixed parameters, knowledge learning is performed on each data point in the dataset under the grouping dimension to obtain a priori token. All grouping dimensions are traversed to obtain the priori token under each grouping dimension. All priori tokens are used to update the preset medical knowledge base to obtain an updated medical knowledge base. When a target question is received from a user, the target dimension to which the target question belongs is determined. Based on the target dimension, the target's priori token for the corresponding grouping dimension is matched from the updated medical knowledge base. The target question is encoded to obtain an initial code. The target's priori token is embedded into the initial encoding result to obtain the target code. The target code is input into a preset medical question-and-answer model to output the target answer. The target's priori token is used to guide the preset medical question-and-answer model to generate the target answer. This application can be applied to business scenarios such as smart healthcare. It first collects medical question-and-answer data, groups it according to N preset grouping dimensions to obtain datasets, and uses a fixed-parameter large language model to learn knowledge from each group dimension dataset to obtain prior tokens. All prior tokens are used to update a preset medical knowledge base. When a user's target question is received, the target dimension is determined, the corresponding prior token is matched from the updated knowledge base, the target question is encoded, and the prior token is embedded to obtain the target code. This code is then input into a preset medical question-and-answer model to output the answer. Thus, by learning from grouped medical question-and-answer data to obtain prior tokens and update the knowledge base, and by matching the corresponding prior token and embedding the question code when processing user questions to guide the model, the accuracy of medical question-and-answer model interactions is improved. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of an application environment for an interactive guidance method for a medical question-and-answer model provided in Embodiment 1 of this application; Figure 2 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 2 of this application; Figure 3 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 3 of this application; Figure 4 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 4 of this application; Figure 5 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 5 of this application; Figure 6 This is a schematic diagram of the structure of an interactive guidance device for a medical question-and-answer model provided in Embodiment Six of this application; Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment 7 of this application. Detailed Implementation

[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0016] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0017] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0018] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0019] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0020] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0021] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0022] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0023] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0024] To illustrate the technical solution of this application, specific embodiments are described below.

[0025] The interactive guidance method for a medical question-answering model provided in Embodiment 1 of this application can be applied to, for example, Figure 1 In this application environment, the client and server connect and communicate. Users can provide conditions, requirements, and operation instructions for the interactive guidance of the medical question-and-answer model through the client. The server is used to control the interactive guidance method of the medical question-and-answer model sent by the client.

[0026] The interactive guidance method of the above-mentioned medical question-and-answer model can include, but is not limited to, medical systems, such as medical insurance systems and social security systems. The system is developed using a software development kit (SDK). Specifically, application authentication modules, intelligent routing modules, and high availability management modules can be developed. These modules can be integrated with user management systems within the enterprise system to achieve corresponding management functions.

[0027] The client side includes, but is not limited to, PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud terminal devices, and personal digital assistants (PDAs). The server side can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0028] See Figure 2 This is a flowchart illustrating an interactive guidance method for a medical question-answering model provided in Embodiment 2 of this application. The aforementioned interactive guidance method for the medical question-answering model can be applied to... Figure 1 The server-side component.

[0029] like Figure 2 As shown, the interactive guidance method of this medical question-answering model may include the following steps: Step S201: Collect existing medical question and answer data, and group the medical question and answer data according to the preset N grouping dimensions to obtain the dataset under the corresponding grouping dimensions, where N is an integer greater than zero.

[0030] Many professional online medical consultation platforms now exist where patients can ask doctors various medical questions and receive corresponding answers. These platforms have accumulated a large number of real medical Q&A records, covering a wide range of issues from common diseases to rare diseases.

[0031] Hospital electronic medical record systems also include Q&A information between patients and doctors during consultations. This data is relevant to specific patient cases and is highly accurate and professional. For example, information such as patients describing symptoms to doctors during consultations, doctors asking about medical history, making diagnoses, and providing treatment suggestions are all recorded. Medical professional forums and communities serve as platforms for doctors, medical researchers, and patients to exchange information. Here, people discuss treatment experiences, drug efficacy, medical research findings, and other related issues. Forums like DXY.cn (or similar online forums) gather a large number of medical professionals, and the Q&A content they share has considerable reference value.

[0032] Medical Q&A data involves medical expertise, including disease diagnosis, treatment methods, and medication use, requiring a certain medical background for accurate understanding. The types of questions are diverse, potentially including symptom consultation, disease prevention, treatment selection, and drug side effects; the types of diseases covered are also numerous, ranging from common colds and fevers to complex cancers and cardiovascular diseases.

[0033] Grouping dimensions are predefined criteria used to classify medical question-and-answer data. Different grouping dimensions can divide the data from different perspectives, allowing for better organization and management of the data, and providing more targeted datasets for subsequent knowledge learning. N is a positive integer representing the number of grouping dimensions, which can be set according to actual needs.

[0034] Grouping data by disease type, such as categorizing it into different disease categories like heart disease, diabetes, hypertension, and cancer, allows for separate analysis and learning for each disease's question-and-answer data. This helps understand the characteristics of questions related to that disease and common answers. For example, a heart disease-related question-and-answer dataset might contain questions about the symptoms, diagnosis, and treatment of different types of heart disease, such as coronary heart disease and cardiomyopathy. Grouping by question nature, such as symptom consultation (asking what disease might cause a certain symptom), diagnostic methods (understanding how to diagnose a disease), treatment plans (consulting on treatment methods for a disease), and medication use (asking about the usage and side effects of a medication), allows for focused processing of different question types, improving the model's ability to answer specific question types.

[0035] Patients can be grouped based on factors such as age, gender, and occupation. For example, patients of different ages may face different health problems; children may be more likely to have pediatric illnesses, while older adults may be more likely to have chronic diseases. By grouping patients by age, common problems and needs of patients in different age groups can be analyzed.

[0036] Based on preset grouping dimensions, the collected medical Q&A data are categorized into various groups. For example, under the disease type dimension, all Q&A data related to heart disease are grouped together to form a heart disease dataset; under the question type dimension, all Q&A data related to symptom consultation are grouped together to form a symptom consultation dataset.

[0037] By grouping the data, subsequent knowledge learning can be conducted on datasets within each group dimension. This allows the model to learn more effectively from specific data types, improving learning efficiency and results. Datasets under different group dimensions also facilitate the classification, management, and maintenance of medical knowledge. For example, datasets for different disease types can be updated and expanded separately, making the medical knowledge base more organized.

[0038] For example, in a smart healthcare scenario, a large-scale smart healthcare platform wanting to build a medical question-and-answer system first collects a large amount of medical question-and-answer data from electronic medical record systems of major hospitals, medical forums, online consultation platforms, etc. Three grouping dimensions are preset: disease type, treatment stage, and patient age group. The disease type dimension further divides the data into different datasets such as cardiovascular diseases, respiratory diseases, and digestive diseases.

[0039] Step S202: For any grouping dimension, based on a large language model with fixed parameters, perform knowledge learning on each data in the dataset under the grouping dimension to obtain a priori token. Iterate through all grouping dimensions to obtain a priori token under each grouping dimension. Use all the priori tokens to update the preset medical knowledge base to obtain the updated medical knowledge base.

[0040] Among them, the large language model is an artificial intelligence model based on deep learning, which has powerful language understanding and generation capabilities. The purpose of this is likely to ensure the stability and consistency of the learning process, avoid the uncertainty caused by parameter adjustments, and at the same time, utilize the general knowledge obtained by the model pre-training on large-scale corpora.

[0041] For each data point in the dataset (i.e., each medical question-answer pair) under any grouping dimension, the large language model performs in-depth analysis. It understands the semantics of the question, the key information in the answer, and the relationships between them. By learning from a large amount of such question-answer data, the large language model extracts key features and information. This process is similar to humans reading a large amount of medical question-answer materials and summarizing the key points, except that the model processes them in a digital way.

[0042] Prior tokens are a form of knowledge representation obtained by a large language model after learning knowledge from data within a group dimension. They can be seen as a condensation and abstraction of medical knowledge within that group dimension. Prior tokens contain key information and features from the data within that group dimension, such as disease symptoms, diagnostic methods, and treatments.

[0043] Taking disease type grouping as an example, the prior tokens for the heart disease group might include key information related to heart disease, such as "chest pain," "abnormal electrocardiogram," and "vasodilator treatment." These prior tokens are important bases for guiding the medical question-answering model to generate accurate answers.

[0044] In step S201, multiple grouping dimensions are defined. To comprehensively acquire medical knowledge under each dimension, it is necessary to traverse all grouping dimensions. That is, the above knowledge learning process is repeated for the dataset under each grouping dimension to obtain the prior token corresponding to each grouping dimension.

[0045] By traversing all grouping dimensions, prior tokens covering various disease types, question types, and other dimensions can be obtained, forming a complete medical knowledge system. All prior tokens are then used to update the pre-built medical knowledge base. This pre-built medical knowledge base is a pre-constructed database containing various medical knowledge, likely compiled, collected, and entered by medical experts, including basic disease information, treatment guidelines, and drug information. However, this knowledge base may suffer from issues such as outdated information and a lack of knowledge related to real-world question-and-answer scenarios.

[0046] The knowledge base update process involves integrating the prior tokens obtained from all grouping dimensions into a pre-defined medical knowledge base. This can be achieved by integrating, supplementing, and correcting the knowledge represented by the prior tokens with the existing knowledge in the knowledge base.

[0047] For example, in a smart healthcare scenario, a priori token may contain experience with a new treatment method or drug. This information can be added to the knowledge base. If a conflict is found between the knowledge in the priori token and the content in the knowledge base, further verification and correction can be performed.

[0048] Step S203: Upon receiving the target question sent by the user, determine the target dimension to which the target question belongs, and match the prior token of the target corresponding to the group dimension from the updated medical knowledge base according to the target dimension.

[0049] The system performs in-depth semantic analysis on the text content of the target question to understand its core meaning. Taking "I've been coughing a lot lately, could it be pneumonia?" as an example, analysis reveals that this question mainly revolves around disease diagnosis. From the perspective of question type, it belongs to the category of diagnostic methods; from the perspective of disease type, it involves pneumonia.

[0050] Extract keywords from the target question and match these keywords with preset grouping dimensions. In the example above, "cough" and "pneumonia" are keywords. Based on the disease type dimension grouping, "pneumonia" can clearly classify the question into the group corresponding to the disease category of pneumonia.

[0051] Different grouping dimensions play a role in determining the category to which a target question belongs. In addition to the disease type and question type dimensions mentioned earlier, there may also be patient characteristic dimensions (such as patient age, gender, etc.). If the user question is "What might be the cause of frequent dizziness in the elderly?", then the patient characteristic dimension can classify it into the question group related to the elderly.

[0052] Based on the target dimension, the system matches the corresponding target prior tokens for that group dimension from the updated medical knowledge base. The updated medical knowledge base is organized according to different group dimensions, and each group dimension has a corresponding set of prior tokens. These prior tokens are obtained in step S202 through knowledge learning from the data within that group dimension and contain the key medical knowledge for that group dimension. Once the target dimension to which the target question belongs is determined, the system will find the corresponding group for that target dimension in the updated medical knowledge base.

[0053] For example, in a healthcare scenario, if the target dimension is the type of pneumonia, the system will locate the pneumonia group. Then, it searches for prior tokens related to the target question within this group. For the question "I've been coughing a lot lately, could I have pneumonia?", the pneumonia group might match prior tokens such as "coughing is a common symptom of pneumonia" and "pneumonia diagnosis requires a chest X-ray."

[0054] Step S204: Encode the target question to obtain an initial code; embed the target's prior token into the initial code result to obtain a target code; input the target code into a preset medical question-answering model to output the target answer; the target's prior token is used to guide the preset medical question-answering model to generate the target answer.

[0055] Optionally, embedding the prior token of the target into the initial encoding result to obtain the target encoding may include the following steps: Based on the target dimension, determine the corresponding prompt word construction template; A template is constructed based on the prompt words, and the prior token of the target and the initial encoding result are embedded to obtain the target encoding.

[0056] Optionally, after inputting the target code into a preset medical question-answering model and outputting the target answer, the following steps may also be included: The quality of the target answer is evaluated, and the quality evaluation results are obtained. The system checks whether the quality assessment result meets preset conditions. If the quality assessment result meets the preset conditions, the target answer is fed back to the user.

[0057] In natural language processing, encoding transforms a textual target problem into a numerical representation that a computer can understand and process. Because computers cannot directly process natural language, textual information needs to be converted into numerical vectors; these numerical vectors are the initial encoding.

[0058] Initial encoding captures the semantic information and features of the target problem, facilitating subsequent model processing and analysis. For example, common word embedding techniques (such as Word2Vec, BERT, etc.) can be used to convert each word in the target problem into a corresponding vector, and then these vectors can be combined into a whole vector to represent the entire problem.

[0059] The prior tokens for the target question contain key medical knowledge and information relevant to the target question. Embedding these into the initial encoding provides more contextual information and guidance for subsequent medical question-answering models. This allows the model to refer to this prior knowledge when generating answers, resulting in more accurate and professional responses.

[0060] Based on the target dimension of the target question, a corresponding prompt word is selected to construct a template. Different target dimensions may have different templates, which specify how to combine prior tokens and initial encoding results. Following the determined prompt word template, the target's prior tokens and initial encoding results are combined to obtain the target encoding. This process is akin to integrating prior knowledge into the problem representation, enabling the model to consider both the problem itself and relevant prior knowledge when processing the problem.

[0061] The pre-set medical question-answering model is trained to generate corresponding medical answers based on the input target code. The model analyzes and processes the target code, combining its learned knowledge and patterns to generate an answer that conforms to logic and common medical sense. For example, for the target question "I've been coughing a lot lately, could it be pneumonia?", after receiving the target code containing a priori tokens, the medical question-answering model might output "Coughing is one of the common symptoms of pneumonia, but coughing alone cannot diagnose pneumonia. It is necessary to combine other symptoms (such as fever, difficulty breathing, etc.) and relevant examinations (such as chest X-ray, blood routine, etc.) for a comprehensive judgment." The target answer can be evaluated from multiple aspects, such as accuracy (whether it conforms to medical facts), completeness (whether it covers the key points of the question), and logic (whether the expression of the answer is reasonable and coherent). Evaluation can be conducted using pre-set rules or by comparing it with standard answers marked by medical experts. Pre-set conditions are pre-defined standards used to judge whether the quality of the target answer is acceptable.

[0062] For example, in a healthcare service scenario, the accuracy of the answer must reach a certain threshold (e.g., 90%), or the answer must contain certain key information. If the quality assessment result meets the preset conditions, it indicates that the target answer is reliable and can be fed back to the user. If the preset conditions are not met, the answer may need to be corrected or regenerated to ensure that the user receives a high-quality medical response.

[0063] In this embodiment, medical question-and-answer data is first collected and grouped into datasets according to N preset grouping dimensions. A fixed-parameter large language model learns prior tokens from the knowledge of each grouping dimension dataset. All prior tokens are used to update a preset medical knowledge base. When a user's target question is received, the target dimension is determined, and the corresponding prior token is matched from the updated knowledge base. The target question is encoded, and the prior token is embedded to obtain the target code. This code is then input into a preset medical question-and-answer model to output the answer. This process of learning from grouped medical question-and-answer data to obtain prior tokens and update the knowledge base, and matching the corresponding prior token to embed the question code to guide the model when processing user questions, improves the accuracy of the medical question-and-answer model's interaction.

[0064] See Figure 3 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 3 of this application. Figure 3 As shown, after detecting whether the quality assessment result meets the preset conditions in step S204 above, the following steps may also be included: Step S301: If the quality assessment result is detected to meet the preset conditions, then mark the prior token of the target in the updated medical knowledge base.

[0065] Step S302: Obtain new medical question-and-answer data constructed for the target dimension.

[0066] Step S303: Based on the large language model with fixed parameters, perform knowledge learning on the new medical question-and-answer data to obtain an updated prior token.

[0067] Step S304: Use the updated prior token to replace the prior token of the target marked in the updated medical knowledge base, and obtain the replaced medical knowledge base.

[0068] Step S305: Using the replaced medical knowledge base as the updated medical knowledge base, return to the step of determining the target dimension to which the target question belongs when the target question is received from the user, and matching the prior token of the target corresponding group dimension from the updated medical knowledge base according to the target dimension.

[0069] Specifically, when the quality assessment result of the target answer meets the preset conditions, it means that the answer generated based on the target's prior tokens is accurate and reliable. Tagging the target's prior tokens facilitates their subsequent identification and management. The tagging serves as an identifier, indicating that these prior tokens perform well in real-world question-answering scenarios and can effectively guide the medical question-answering model to generate high-quality answers.

[0070] The tagged prior tokens can be used as a reference in subsequent knowledge base updates and maintenance. For example, when replacing or optimizing prior tokens, these well-performing prior tokens can be given priority, or other prior tokens can be adjusted based on their characteristics.

[0071] Knowledge in the medical field is constantly evolving and being updated, with new research findings, treatment methods, and clinical experiences emerging continuously. To ensure that the medical question-and-answer system can provide the latest and most accurate information, it is necessary to regularly acquire new medical question-and-answer data. New medical question-and-answer data constructed for a specific target dimension can reflect the latest medical knowledge and practical applications within that dimension.

[0072] New medical Q&A data can be obtained from various sources, such as medical journals, professional medical forums, and hospital medical record systems. This data includes actual Q&A content between doctors and patients, as well as discussions and answers from medical experts on various medical issues.

[0073] The new medical question-and-answer data is processed using a large language model with fixed parameters, just as the original dataset was processed in step S202. The large language model performs in-depth analysis of the questions and answers in the new data, extracting key information and features, and transforming them into updated prior tokens.

[0074] The updated prior tokens reflect the latest medical knowledge and practical experience in the target dimension. Compared to previous prior tokens, they may contain new disease diagnostic methods, treatment plans, or drug information. These updated prior tokens can provide more accurate and comprehensive knowledge support for medical question-answering systems.

[0075] As medical knowledge is constantly updated, existing prior tokens may become outdated or inaccurate. By replacing the prior token of the marked target with an updated prior token, the knowledge in the medical knowledge base can be ensured to remain up-to-date and accurate. This allows the system to provide users with better answers based on the latest knowledge during subsequent question-and-answer sessions. The process involves finding the prior token of the marked target in the updated medical knowledge base and replacing it with the updated prior token. This process requires ensuring the accuracy and consistency of the replacement to avoid knowledge conflicts or errors.

[0076] The replaced medical knowledge base is used as the new, updated medical knowledge base. Then, the process returns to step S203, where, upon receiving a new user's target question, the target dimension and matching target prior token are determined according to the new knowledge base. This forms a closed-loop knowledge update and question-answering mechanism, enabling the medical question-answering system to continuously learn and adapt to new medical knowledge, providing users with more accurate and timely medical question-answering services.

[0077] In this embodiment of the application, by continuously updating the knowledge reserves of the medical question-and-answer system itself, the quality and accuracy of the answers are improved, so as to better meet the information needs of users in the medical field.

[0078] See Figure 4 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 4 of this application. Figure 4 As shown, the large language model based on fixed parameters in step S202, which performs knowledge learning on each data point in the dataset under the grouping dimension to obtain prior tokens, may include the following steps: Step S401: For any medical question and answer data in the dataset under the grouping dimension, input the medical question and answer data and the data in the initial medical knowledge base into a large language model with fixed parameters for reasoning, and obtain the output result.

[0079] Step S402: Based on the medical question-and-answer data and each output result, obtain a structured summary of the corresponding output result.

[0080] Step S403: Based on the initial medical knowledge base, the structured summary, and the medical question-and-answer data, generate a natural language experience description representing the reason for the success or failure of the corresponding output result.

[0081] Step S404: Update the initial medical knowledge base using the natural language experience description, return to execute any medical question and answer data in the dataset under the grouping dimension, input the medical question and answer data and the data in the initial medical knowledge base into a large language model with fixed parameters for reasoning, obtain the output result, until the iteration condition is met, and obtain the final natural language experience description as a priori token.

[0082] The dataset under the group dimension contains a large amount of medical question-and-answer data, reflecting medical questions and corresponding answers in different scenarios and types. The initial medical knowledge base stores existing medical knowledge and experience. Combining both and inputting them into a large language model with fixed parameters allows the model to analyze and reason about new medical question-and-answer data based on existing knowledge.

[0083] The large language model with fixed parameters has undergone extensive pre-training and possesses powerful language understanding and generation capabilities. In this step, reasoning is performed based on the input medical question-and-answer data and knowledge base data to attempt to provide reasonable answers or analysis results. Because the model's parameters are fixed, this ensures the stability and repeatability of the reasoning process.

[0084] Structured summarization involves extracting and organizing key information from medical question-and-answer data and model outputs, presenting it in a structured manner. This facilitates subsequent processing and analysis. For example, for the question-and-answer data "possible causes of cough with fever" and the series of possible causes output by the model, structured summarization can categorize the causes into infectious causes, non-infectious causes, etc., and record relevant information for each cause, such as probability of occurrence and typical symptoms.

[0085] Natural language processing technology is used to perform semantic analysis on medical question-and-answer data and output results to identify key entities (such as disease names, symptoms, treatment methods, etc.) and key relationships (such as causal relationships, accompanying relationships, etc.), and organize this information into a structured format, such as tables, tree structures, etc.

[0086] Based on the initial medical knowledge base, the model's output is evaluated for reasonableness. If the output aligns with medical common sense and the knowledge in the knowledge base, the output is considered successful; otherwise, it is considered a failure. For example, if the model's output for "cough with fever" contains causes that clearly do not conform to medical logic, then the output is considered a failure.

[0087] Based on the analysis results, describe the reasons for the success or failure of the output in natural language. For successful outputs, the description can include which knowledge from the knowledge base supports the result and which key information in the structured summary played an important role. For failed outputs, the description can point out the conflicts with the knowledge base and the possible reasons for the errors, such as data limitations or model misunderstandings.

[0088] Adding natural language experience descriptions to the initial medical knowledge base aims to continuously enrich and improve its content. These descriptions contain the model's successes and failures in processing medical question-and-answer data, providing a more comprehensive reference for subsequent reasoning and analysis. For example, if a certain type of question frequently causes the model to fail to output, and the reasons are recorded in the natural language experience descriptions, the model can adjust based on these experiences when processing similar questions in the future.

[0089] The above steps are repeated continuously: new medical question-answering data and the updated knowledge base are continuously input into the model for reasoning, generating new structured summaries and natural language experience descriptions, and then updating the knowledge base. This iterative process continues until preset iteration conditions are met. Iteration conditions may include reaching a certain number of iterations, or the model's output accuracy, stability, or other metrics meeting expected requirements. When the iteration conditions are met, the final natural language experience description is determined as a priori token. These priori tokens contain rich medical knowledge and processing experience, which will be used to guide the medical question-answering model to generate more accurate answers.

[0090] See Figure 5 This is a flowchart illustrating an interactive guidance method for a medical question-and-answer model provided in Embodiment 5 of this application. Figure 5 As shown, step S203, upon receiving a target question sent by a user, determines the target dimension to which the target question belongs, and matches the prior token of the target corresponding to the group dimension from the updated medical knowledge base based on the target dimension. This may include the following steps: Step S501: Receive the target question sent by the user, parse the target question, determine the target dimension corresponding to the target question, and the target dimension belongs to one of all grouping dimensions.

[0091] Step S502: Based on the target dimension, filter the prior tokens in the updated medical knowledge base, and determine the prior tokens associated with the target dimension as the target's prior tokens, wherein the medical knowledge base stores the association relationship between prior tokens and grouping dimensions.

[0092] The target questions posed by users are usually presented in natural language, and their wording can be quite casual and diverse, containing complex information. To accurately determine the dimension to which the question belongs, it needs to be analyzed. For example, a user might ask, "I've been having headaches and nausea lately, what's wrong?" This question contains symptom descriptions and inquiries about the cause, requiring the extraction of key information to determine its dimension. Natural language processing techniques, such as part-of-speech tagging, named entity recognition, and semantic understanding, can be used to analyze the target question. By identifying key entities (such as disease names, symptoms, and treatment methods) and key semantics (such as inquiries about causes or treatment options), they are matched with predefined grouping dimensions. For example, predefined grouping dimensions might include disease diagnosis, treatment plans, and medication information. For the headache and nausea question mentioned above, analysis can determine that its target dimension is disease diagnosis.

[0093] The updated medical knowledge base stores a large number of prior tokens and records the association between each prior token and a grouping dimension. This is analogous to a library where each book has its own category label. Based on a defined target dimension, prior tokens can be filtered according to these associations. For example, if the target dimension is disease diagnosis, then prior tokens associated with the disease diagnosis dimension are retrieved from the knowledge base.

[0094] The selected prior tokens associated with the target dimension are called the target's prior tokens. These prior tokens contain key medical knowledge and experience related to that target dimension, providing targeted guidance for subsequent medical question-answering models. For example, for a target question in the disease diagnosis dimension, the target's prior tokens might contain information such as the symptom characteristics and diagnostic criteria of common diseases, helping the model to analyze the question more accurately and generate answers.

[0095] In this embodiment of the application, prior tokens related to the user's target question are accurately obtained from the updated medical knowledge base, laying the foundation for generating high-quality medical answers in the future.

[0096] Corresponding to the interactive guidance method of the medical question-answering model in the above embodiment, Figure 6 This diagram illustrates the structural block diagram of the interactive guidance device for the medical question-answering model provided in Embodiment Six of this application. The interactive guidance device for the medical question-answering model described above can be applied to… Figure 1 The server-side component.

[0097] See Figure 6 The interactive guidance device for this medical question-and-answer model includes: The data grouping module 61 is used to collect existing medical question and answer data, and group the medical question and answer data according to N preset grouping dimensions to obtain the dataset under the corresponding grouping dimension, where N is an integer greater than zero. The knowledge base update module 62 is used to learn knowledge from each piece of data in the dataset under any group dimension based on a large language model with fixed parameters, to obtain a prior token, to traverse all group dimensions to obtain a prior token under each group dimension, and to update the preset medical knowledge base using all the prior tokens to obtain the updated medical knowledge base. The prior token matching module 63 is used to determine the target dimension to which the target question belongs when receiving a target question sent by a user, and to match the prior token of the target corresponding to the group dimension from the updated medical knowledge base according to the target dimension. The guided response module 64 is used to encode the target question to obtain an initial code, embed the target's prior token into the initial code result to obtain a target code, input the target code into a preset medical question-and-answer model, and output the target answer. The target's prior token is used to guide the preset medical question-and-answer model to generate the target answer.

[0098] Optionally, the guided response module 64 includes: The template acquisition unit is used to determine the corresponding prompt words to construct a template based on the target dimension; An embedding encoding unit is used to construct a template based on the prompt words, embed the prior token of the target and the initial encoding result to obtain the target encoding.

[0099] Optionally, the interactive guidance device for the medical question-answering model includes: The quality assessment module is used to assess the quality of the target answer and obtain the quality assessment results. The preset condition judgment module is used to detect whether the quality assessment result meets the preset conditions. If the quality assessment result meets the preset conditions, the target answer is fed back to the user.

[0100] Optionally, the interactive guidance device for the medical question-answering model includes: A token marking module is used to mark the prior token of the target in the updated medical knowledge base if the quality assessment result is detected to meet the preset conditions. The question-and-answer data acquisition module is used to acquire new medical question-and-answer data constructed for the target dimension; The knowledge learning module is used to learn knowledge from the new medical question-and-answer data based on the large language model with fixed parameters, and obtain updated prior tokens. The replacement module is used to replace the prior token of the target marked in the updated medical knowledge base with the updated prior token to obtain the replaced medical knowledge base. The execution module is returned to use the replaced medical knowledge base as the updated medical knowledge base. When the target question sent by the user is received, the module determines the target dimension to which the target question belongs and matches the prior token of the target corresponding group dimension from the updated medical knowledge base according to the target dimension.

[0101] Optionally, the knowledge base update module 62 includes: The data reasoning unit is used to reason with any medical question and answer data in the dataset under the grouping dimension, by inputting the medical question and answer data and the data in the initial medical knowledge base into a large language model with fixed parameters, and to obtain the output result. The summary structuring unit is used to obtain a structured summary of the corresponding output result based on the medical question and answer data and each output result; The description generation unit is used to generate a natural language experience description representing the reasons for the success or failure of the corresponding output result based on the initial medical knowledge base, the structured summary, and the medical question and answer data. An iterative unit is used to update the initial medical knowledge base using the natural language experience description, return to execute any medical question and answer data in the dataset under the grouping dimension, input the medical question and answer data and the data in the initial medical knowledge base into a large language model with fixed parameters for reasoning, obtain the output result, until the iteration condition is met, and obtain the final natural language experience description as a priori token.

[0102] Optionally, the prior token matching module 63 includes: The target dimension determination unit is used to receive the target question sent by the user, parse the target question, and determine the target dimension corresponding to the target question, wherein the target dimension belongs to one of all grouping dimensions; The target token determination unit is used to filter the prior tokens in the updated medical knowledge base based on the target dimension, and determine the prior tokens associated with the target dimension as the prior tokens of the target, wherein the medical knowledge base stores the association relationship between prior tokens and grouping dimensions.

[0103] It should be noted that the information interaction and execution process between the above modules, units, and sub-units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0104] Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment Seven of this application. Figure 7 As shown, the computer device of this embodiment includes: at least one processor ( Figure 7 Only one is shown in the diagram), a memory, and a computer program stored in the memory and executable on at least one processor. When the processor executes the computer program, it implements the steps of the interactive guidance method of any of the above-described medical question-and-answer models or the interactive guidance method embodiment of the medical question-and-answer model.

[0105] This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 7The examples of computer devices are merely examples and do not constitute a limitation on computer devices. Computer devices may include more or fewer components than shown in the illustration, or combinations of certain components, or different components, such as network interfaces, displays, and input devices.

[0106] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0107] Memory includes readable storage media, internal memory, etc., wherein internal memory can be the RAM of a computer device, providing an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the hard drive of a computer device, or in other embodiments, it can be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, memory can include both internal storage units and external storage devices of the computer device. Memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. Memory can also be used to temporarily store data that has been output or will be output.

[0108] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0109] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on a computer device, it enables the computer device to execute the steps in the above method embodiments.

[0110] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0111] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0112] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0113] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0114] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An interactive guidance method for a medical question-answering model, characterized in that, include: Collect existing medical question and answer data, and group the medical question and answer data according to N preset grouping dimensions to obtain the dataset under the corresponding grouping dimension, where N is an integer greater than zero; For any grouping dimension, based on a large language model with fixed parameters, knowledge learning is performed on each data in the dataset under the grouping dimension to obtain a priori token. All grouping dimensions are traversed to obtain the priori token under each grouping dimension. All priori tokens are used to update the preset medical knowledge base to obtain the updated medical knowledge base. Upon receiving a target question sent by a user, the target dimension to which the target question belongs is determined, and based on the target dimension, the prior token of the target corresponding to the group dimension is matched from the updated medical knowledge base; The target question is encoded to obtain an initial code. The prior token of the target is embedded into the initial code to obtain a target code. The target code is input into a preset medical question-answering model to output the target answer. The prior token of the target is used to guide the preset medical question-answering model to generate the target answer.

2. The interactive guidance method for the medical question-answering model according to claim 1, characterized in that, The step of embedding the prior token of the target into the initial encoding result to obtain the target encoding includes: Based on the target dimension, determine the corresponding prompt word construction template; A template is constructed based on the prompt words, and the prior token of the target and the initial encoding result are embedded to obtain the target encoding.

3. The interactive guidance method for the medical question-answering model according to claim 1, characterized in that, After inputting the target code into the preset medical question-answering model and outputting the target answer, the method further includes: The quality of the target answer is evaluated, and the quality evaluation results are obtained. The system checks whether the quality assessment result meets preset conditions. If the quality assessment result meets the preset conditions, the target answer is fed back to the user.

4. The interactive guidance method for the medical question-answering model according to claim 3, characterized in that, After determining whether the quality assessment result meets the preset conditions, the method further includes: If the quality assessment result is found to meet the preset conditions, then the prior token of the target is marked in the updated medical knowledge base; Obtain new medical question-and-answer data constructed for the aforementioned target dimensions; Based on the large language model with fixed parameters, knowledge learning is performed on the new medical question-and-answer data to obtain updated prior tokens; The updated prior token is used to replace the prior token of the target marked in the updated medical knowledge base, resulting in a replaced medical knowledge base. Using the replaced medical knowledge base as the updated medical knowledge base, the process returns to the step of determining the target dimension to which the target question belongs when a target question is received from the user, and matching the prior token of the target corresponding group dimension from the updated medical knowledge base based on the target dimension.

5. The interactive guidance method for the medical question-answering model according to claim 1, characterized in that, The large language model based on fixed parameters performs knowledge learning on each data point in the dataset under the grouping dimension to obtain prior tokens, including: For any medical question and answer data in the dataset under the grouping dimension, the medical question and answer data and the data in the initial medical knowledge base are input into a large language model with fixed parameters for inference to obtain the output result; Based on the medical question-and-answer data and each output result, a structured summary of the corresponding output result is obtained; Based on the initial medical knowledge base, the structured summary, and the medical question-and-answer data, a natural language experience description representing the reasons for the success or failure of the corresponding output result is generated; The initial medical knowledge base is updated using the natural language experience description. Then, the execution is performed on any medical question and answer data in the dataset under the grouping dimension. The medical question and answer data and the data in the initial medical knowledge base are input into a large language model with fixed parameters for inference to obtain the output result. This process continues until the iteration condition is met, and the final natural language experience description is obtained as a priori token.

6. The interactive guidance method for the medical question-answering model according to claim 1, characterized in that, Upon receiving a target question sent by a user, determining the target dimension to which the target question belongs, and matching the prior token of the target corresponding to the group dimension from the updated medical knowledge base based on the target dimension, includes: Upon receiving a target question sent by a user, the system parses the target question and determines the target dimension corresponding to the target question, wherein the target dimension belongs to one of all grouping dimensions. Based on the target dimension, the prior tokens in the updated medical knowledge base are filtered to determine the prior tokens associated with the target dimension as the target's prior tokens. The medical knowledge base stores the association relationship between prior tokens and grouping dimensions.

7. An interactive guidance device for a medical question-and-answer model, characterized in that, include: The data grouping module is used to collect existing medical Q&A data and group the medical Q&A data according to N preset grouping dimensions to obtain the dataset under the corresponding grouping dimension, where N is an integer greater than zero. The knowledge base update module is used to learn knowledge from each piece of data in the dataset under any group dimension based on a large language model with fixed parameters, to obtain prior tokens, traverse all group dimensions to obtain prior tokens under each group dimension, and use all prior tokens to update the preset medical knowledge base to obtain the updated medical knowledge base. The prior token matching module is used to determine the target dimension to which the target question belongs when a target question is received from a user, and to match the prior token of the target corresponding to the group dimension from the updated medical knowledge base based on the target dimension. The guided response module is used to encode the target question to obtain an initial code, embed the target's prior token into the initial code result to obtain a target code, input the target code into a preset medical question-and-answer model, and output the target answer. The target's prior token is used to guide the preset medical question-and-answer model to generate the target answer.

8. The interactive guidance device for the medical question-and-answer model according to claim 7, characterized in that, The guided response module includes: The template acquisition unit is used to determine the corresponding prompt words to construct a template based on the target dimension; An embedding encoding unit is used to construct a template based on the prompt words, embed the prior token of the target and the initial encoding result to obtain the target encoding.

9. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the interactive guidance method of the medical question-and-answer model as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the interactive guidance method of the medical question-answering model as described in any one of claims 1 to 6.