Intelligent guidance
By constructing a graph and training model for patient guidance, and using named entity recognition and large language models to determine departmental named entities, the problem of cumbersome patient guidance services is solved, the medical process is simplified, and efficiency and service quality are improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- ALIPAY (HANGZHOU) DIGITAL SERVICE TECHNOLOGY CO LTD
- Filing Date
- 2025-10-28
- Publication Date
- 2026-07-02
AI Technical Summary
The existing triage services in medical institutions are cumbersome and complicated, requiring patients to wait in long lines, and the lack of human resources in medical institutions leads to a poor medical experience.
By constructing a graph for patient guidance and training a predictive model, intelligent patient guidance is achieved using named entity recognition and large language models. This identifies the named entity of the patient's department and generates answer text, simplifying the medical process.
It has simplified the patient's medical treatment process, improved efficiency, alleviated the pressure on human resources of medical institutions, optimized service quality, and improved the overall medical service experience.
Smart Images

Figure CN2025130589_02072026_PF_FP_ABST
Abstract
Description
Intelligent triage Technical Field
[0001] One or more embodiments of this application relate to the field of artificial intelligence technology, and in particular to an intelligent triage method and apparatus. Background Technology
[0002] In the current medical setting, most medical institutions have information desks at their entrances to assist patients who are confused due to a lack of professional medical knowledge. These patients often have questions about which department to visit and therefore need to consult at the information desk to find the appropriate department based on their symptoms, illness, and required tests / examinations.
[0003] From the patient's perspective, because there are usually few staff members at the information desk, patients first need to queue and wait for consultation. Then, patients need to go through a series of procedures including registration, waiting, consultation, obtaining a prescription, and payment. The entire medical process is cumbersome and often involves queuing. This not only wastes a lot of the patient's time but also increases their anxiety and inconvenience. From the perspective of medical institutions, their human resources are limited, and staff shortages are common.
[0004] Given the above, there is a general expectation to replace some manual services with intelligent services, especially services like patient guidance that are not strongly correlated with actual disease diagnosis. This would simplify the patient's medical process, improve efficiency, alleviate human resource pressure on medical institutions, optimize service quality, and thus contribute to improving the overall healthcare experience. Therefore, in practical applications, how to provide users with intelligent patient guidance services has become an urgent problem to be solved. Summary of the Invention
[0005] The technical solutions provided in one or more embodiments of this application are as follows.
[0006] This application provides an intelligent triage method, the method comprising: acquiring query text for triage consultation, and performing named entity recognition on the query text to identify named entities from the query text, and determining the type of each identified named entity; if the identified named entities include disease feature named entities, then inputting the disease feature named entities into a trained prediction model, and having the prediction model predict the corresponding disease named entities based on the disease feature named entities, and determining the department named entities corresponding to the disease named entities based on a graph; wherein, the nodes in the graph include visit feature nodes and department nodes, each visit feature node representing a visit feature named entity, and each Department nodes represent named entities for various departments; edges in the graph connect the visit feature nodes and the department nodes, and the visit feature named entity represented by each connected visit feature node corresponds to the department named entity represented by the connected department node; the visit feature named entity includes at least one subtype of named entity, and the at least one subtype includes diseases; if the identified named entity includes the visit feature named entity, then based on the graph, the department named entity corresponding to the visit feature named entity is determined; the department named entity is input into the triage model, and the triage model performs reasoning based on the department named entity to generate the answer text corresponding to the query text.
[0007] This application also provides an intelligent triage device, the device comprising: an acquisition module, which acquires query text for triage consultation, and performs named entity recognition on the query text to identify named entities from the query text and determine the type of each identified named entity; a first determination module, which, if the identified named entities include disease feature named entities, inputs the disease feature named entities into a trained prediction model, and the prediction model predicts the corresponding disease named entities based on the disease feature named entities, and determines the department named entities corresponding to the disease named entities based on a graph; wherein, the nodes in the graph include visit feature nodes and department nodes, each visit feature node representing a visit feature named entity, and each Each department node represents a named entity for a specific department; the edges in the graph connect the visitor feature nodes and the department nodes, and the visitor feature named entity represented by each edge corresponds to the department named entity represented by the department node connected by the edge; the visitor feature named entity includes at least one subtype of named entity, and the at least one subtype includes diseases; the second determining module, if the identified named entity includes the visitor feature named entity, determines the department named entity corresponding to the visitor feature named entity based on the graph; the reasoning module inputs the department named entity into the large-scale triage model, and the large-scale triage model performs reasoning based on the department named entity to generate the answer text corresponding to the query text.
[0008] This application also provides an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor performs the steps of the method as described in any of the preceding claims by executing the executable instructions.
[0009] This application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method as described in any of the preceding claims.
[0010] In the above technical solution, a graph for patient guidance can be pre-constructed. The nodes in this graph include nodes representing named entities of patient visit features and nodes representing named entities of departments. The named entities of patient visit features represented by the nodes connected by the edges correspond to the named entities of departments represented by the nodes connected by those edges. Subsequently, when a query text for patient guidance consultation is obtained, named entity recognition can be performed on the query text to identify the named entities and their types. If the identified named entities include disease feature named entities, the disease feature named entities can be first input into a trained prediction model. The prediction model then predicts the corresponding disease named entities based on the disease feature named entities. Based on the graph, the department named entities corresponding to the disease named entities are then determined. If the identified named entities include patient visit feature named entities, the department named entities corresponding to the patient visit feature named entities can be directly determined based on the graph. These department named entities can then be input into a large-scale patient guidance model, which infers based on these department named entities to generate an answer text corresponding to the query text. This answer text can then be used for patient guidance.
[0011] By employing the above methods, intelligent triage services are realized. This simplifies the patient's medical process, improves efficiency, and helps medical institutions alleviate human resource pressure and optimize service quality, thereby contributing to an improved overall healthcare experience. Furthermore, in providing intelligent triage services, the trained prediction model and the constructed graph can be used to determine the corresponding departmental named entities based on various medical feature named entities in the query text used for triage consultation. These determined departmental named entities are then integrated into the actual input of the large-scale triage model. This allows the large-scale model to consider both its inherent generalization knowledge and the specific knowledge reflected by the departmental named entities when generating the answer text corresponding to the query text, thereby improving the adaptability and response accuracy of the large-scale triage model. Attached Figure Description
[0012] The accompanying drawings used in the description of the exemplary embodiments will now be explained.
[0013] Figure 1 is a schematic diagram of an intelligent dialogue system illustrated in an exemplary embodiment of this application.
[0014] Figure 2 is a schematic diagram of an intelligent triage process illustrated in an exemplary embodiment of this application.
[0015] Figure 3A is a schematic diagram illustrating an exemplary embodiment of this application.
[0016] Figure 3B is a schematic diagram illustrating another figure in an exemplary embodiment of this application.
[0017] Figure 4 is a flowchart illustrating an intelligent triage method according to an exemplary embodiment of this application.
[0018] Figure 5 is a schematic diagram of the structure of a device shown in an exemplary embodiment of this application.
[0019] Figure 6 is a block diagram of an exemplary embodiment of this application illustrating a smart triage device. Detailed Implementation
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this application. Rather, they are merely examples consistent with some aspects of one or more embodiments of this application.
[0021] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this application in other embodiments. In some other embodiments, the methods may include more or fewer steps than those described in this application. Furthermore, a single step described in this application may be broken down into multiple steps in other embodiments; and multiple steps described in this application may be combined into a single step in other embodiments.
[0022] In the field of medical consultation, intelligent dialogue systems have become a key tool for improving efficiency and service quality. These systems provide consultation services to patients by simulating human communication, including pre-visit guidance and during the consultation process, providing disease diagnosis, treatment suggestions, and medication instructions.
[0023] An intelligent dialogue system is an interactive system developed using artificial intelligence technology. It aims to understand and answer questions posed by users in natural language, generating concise and clear responses. Intelligent dialogue systems are typically based on large language models, which understand and respond to user questions, generating corresponding answers.
[0024] Large language models are deep learning models trained on large amounts of text data. They can be used to generate natural language text or understand the meaning of natural language text. Large language models can handle a variety of natural language tasks, such as text classification, named entity recognition (NER), and dialogue, and are an important pathway to artificial intelligence.
[0025] In the field of natural language processing, large-scale text datasets are often referred to as corpora. Corpora can contain various types of text data, such as literary works, academic papers, legal documents, news reports, everyday conversations, emails, and online forum posts. By learning from the text data in corpora, large language models can acquire and understand the rules and patterns of natural language, thereby achieving effective processing and generation of human language.
[0026] Large language models typically employ the Transformer architecture; that is, large language models are usually deep learning models based on the Transformer architecture. Deep learning models based on the Transformer architecture are a class of neural network models that utilize the Transformer architecture, and these models perform exceptionally well in fields such as natural language processing.
[0027] The Transformer is a neural network model used for sequence-to-sequence modeling. It does not rely on recursive structures, enabling parallel training and inference, thus accelerating model processing. Deep learning models based on the Transformer architecture typically use multi-layered Transformer encoders to extract features from the input sequence and a Transformer decoder to transform the extracted features into an output sequence. These models also often employ self-attention mechanisms to capture long-range dependencies in the input sequence, and residual connections and normalization methods to accelerate training and improve model performance.
[0028] Pre-trained models are large language models pre-trained on massive amounts of unlabeled text data. Pre-trained models are general-purpose models, not designed or optimized for specific tasks. To adapt pre-trained models to specific application scenarios and task requirements, fine-tuning is needed to improve the model's performance on specific tasks. The final large language model deployed is usually a model that has undergone further fine-tuning based on the pre-trained model, using supervised learning on labeled text data. Pre-training and fine-tuning are complementary processes; pre-training enables the model to possess broad language understanding capabilities, while fine-tuning makes the model more specialized and accurate for specific tasks.
[0029] In other words, the training process of a large language model can be divided into two stages: pre-training and fine-tuning. In the pre-training stage, unsupervised learning (e.g., self-supervised learning) can be used to pre-train on large-scale, unlabeled text datasets (e.g., online encyclopedias, online articles, books, etc.). Specifically, it can predict missing parts or the next word based on context, learn semantic, syntactic, and other statistical rules and language structures, and minimize the prediction loss through backpropagation and optimization algorithms (e.g., gradient descent), iteratively updating the model parameters and gradually improving the model's ability to understand language. During the fine-tuning phase, a suitable supervised learning task (e.g., text classification, named entity recognition, dialogue systems) can be selected based on the specific application scenario and task requirements. A task-specific text dataset is prepared, allowing the pre-trained model to serve as the starting point for fine-tuning. Supervised learning is then employed on this task-specific text dataset, where the task can be executed. Backpropagation and optimization algorithms (e.g., gradient descent) are used to minimize the loss used to measure the model's performance on the specific task, iteratively updating the model parameters to gradually improve its performance. In practical applications, fine-tuning can flexibly choose supervised, unsupervised, or semi-supervised learning methods based on the specific application scenario and the type of available data.
[0030] It should be noted that the pre-trained large language model is usually referred to as the base model of the large language model, while the fine-tuned large language model is referred to as the service model of the large language model. The language understanding ability learned by the large language model in the pre-training and fine-tuning stages enables it to perform logical inference, knowledge reasoning, or problem-solving by understanding, analyzing, and synthesizing textual information when faced with complex problems or tasks. This ability is usually referred to as the reasoning ability of the large language model.
[0031] Large language models typically perform specific tasks under the guidance of prompt text. Prompt text is an initial text or text fragment provided to the large language model to elicit a corresponding output. Through prompt text, the expected task can be explicitly told to the large language model, such as answering a question, simulating a dialogue, writing an article, or translating text. Simultaneously, prompt text can provide the large language model with necessary background information and context, enabling it to understand the logic, style, theme, or stance that should be followed when generating content. Furthermore, prompt text can also stimulate the large language model to demonstrate its inherent knowledge or specific language abilities, such as explaining complex concepts, citing rules, or mimicking the writing style of a particular author.
[0032] To improve the adaptability and response accuracy of intelligent dialogue systems, external knowledge bases can be utilized. This allows the system to move beyond relying solely on the limited knowledge acquired by its large language model during training from static corpora. Instead, it can first retrieve and reason about relevant information from the external knowledge base based on the question, then use this information to understand and answer the question, generating the corresponding response. In other words, external knowledge bases can be combined with large language models. During model generation, relevant information can be retrieved from the external knowledge base to assist the model in making more accurate and comprehensive answers or decisions. Because the model generation process considers the acquired relevant information and the context of the question, it ensures that the generated content is not only relevant to the actual needs but also accurate, reliable, coherent, and natural.
[0033] In this application, since the intelligent dialogue system aims to provide users with a referral service, the questions users ask typically include personal information such as gender and age, medical history, medication history, symptoms, diseases, laboratory / examination items, and surgical procedures. Users expect answers indicating which department they can go to. Therefore, the relevant information obtained from external knowledge bases should be department-specific to better assist the large language model in the intelligent dialogue system in generating answers that include the department's information.
[0034] This application provides one or more embodiments of a technical solution for implementing intelligent triage. In this technical solution, a graph for triage can be pre-constructed. The nodes in the graph include nodes representing named entities of medical visit features and nodes representing named entities of departments. The named entities of medical visit features represented by the nodes connected by the edges correspond to the named entities of departments represented by the nodes connected by the edges. Subsequently, when a query text for triage consultation is obtained, named entity recognition can be performed on the query text to identify the named entities and their types from the query text. If the identified named entities include disease feature named entities, the disease feature named entities can be first input into a trained prediction model. The prediction model predicts the corresponding disease named entities based on the disease feature named entities. Then, based on the graph, the department named entities corresponding to the disease named entities are determined. If the identified named entities include named entities of medical visit features, the department named entities corresponding to the medical visit feature named entities can be directly determined based on the graph. Thus, the department named entities can be input into a large triage model. The large triage model performs reasoning based on the department named entities to generate answer text corresponding to the query text. This answer text can then be used for triage.
[0035] By employing the above methods, intelligent triage services are realized. This simplifies the patient's medical process, improves efficiency, and helps medical institutions alleviate human resource pressure and optimize service quality, thereby contributing to an improved overall healthcare experience. Furthermore, in providing intelligent triage services, the trained prediction model and the constructed graph can be used to determine the corresponding departmental named entities based on various medical feature named entities in the query text used for triage consultation. These determined departmental named entities are then integrated into the actual input of the large-scale triage model. This allows the large-scale model to consider both its inherent generalization knowledge and the specific knowledge reflected by the departmental named entities when generating the answer text corresponding to the query text, thereby improving the adaptability and response accuracy of the large-scale triage model.
[0036] Please refer to Figure 1, which is a schematic diagram of an intelligent dialogue system illustrated in an exemplary embodiment of this application.
[0037] As shown in Figure 1, the above-mentioned intelligent dialogue system may include a server and at least one client that accesses the server through any type of wired or wireless network.
[0038] The aforementioned server can correspond to a server containing a single physical host, or a server cluster consisting of multiple independent physical hosts; alternatively, it can correspond to a virtual server, cloud server, etc., hosted by a host cluster.
[0039] The aforementioned client can correspond to terminal devices such as smartphones, tablets, laptops, desktop computers, PCs (Personal Computers), PDAs (Personal Digital Assistants), wearable devices (e.g., smart glasses, smartwatches), smart in-vehicle devices, or game consoles.
[0040] Users can access the intelligent dialogue service provided by the aforementioned intelligent dialogue system through the aforementioned client; the aforementioned client and the aforementioned server can achieve user-oriented intelligent dialogue service through data interaction with each other.
[0041] For example, the client can display a user interface, allowing users to input query text (referred to as a Query or Question), upload documents or images to assist in asking questions, and thus pose questions to the intelligent dialogue system and utilize its services. The client can also send the user's query text to the server, which generates a corresponding answer text (Referred to as an Answer) and returns it to the client. The client then displays the answer text to the user through the user interface, allowing the user to view the corresponding answer generated by the intelligent dialogue system, thereby realizing a user-facing intelligent dialogue service.
[0042] Specifically, the aforementioned server can be equipped with a large language model, and the aforementioned intelligent dialogue system can be based on this large language model, which can understand and answer the query text input by the user and generate the answer text corresponding to the query text.
[0043] At this point, the aforementioned large language model can refer to its service model. In practical applications, the constructed large language model can be pre-trained on a large-scale, unlabeled text dataset using unsupervised learning to obtain its base model. Furthermore, the dialogue task can be used as a supervised learning task for fine-tuning, and a dialogue task-specific text dataset can be prepared. Thus, the base model of the large language model can be used as the starting point for fine-tuning, and supervised learning can be used to fine-tune it on the dialogue task-specific text dataset to obtain the service model of the large language model.
[0044] To improve the adaptability and response accuracy of the aforementioned intelligent dialogue system, the server can also be equipped with a knowledge base and an information retrieval component. This knowledge base is an external knowledge base relative to the large language model on the server; that is, the data in this external knowledge base is not knowledge learned during the training process of the large language model, but rather serves as auxiliary data in the large language model's reasoning process, assisting it in generating the answer text corresponding to the user's input query text. During the large language model's reasoning process, the information retrieval component can perform information retrieval and reasoning based on the query text within the external knowledge base, using the acquired relevant information to assist the large language model in generating the answer text corresponding to the user's input query text. Furthermore, the server can also be equipped with a predictive model to simplify information retrieval and reasoning within this external knowledge base to a certain extent.
[0045] In practical applications, the aforementioned server can also be equipped with other functional components or subsystems, such as a prompt generation component. These components or subsystems can work in conjunction with the large language model on the server to generate answer text corresponding to the user's input query text.
[0046] Please refer to Figure 2, which is a schematic diagram of an intelligent triage process shown in an exemplary embodiment of this application.
[0047] As shown in Figure 2, in the above intelligent triage process, an external knowledge base can be pre-built to assist in model generation. Specifically, this external knowledge base can be a graph.
[0048] Graphs are data stored and managed using a graphical structure. In a graph, nodes, edges, and properties are used to store data. This storage method is well-suited for representing complex relationships between entities. In a graph, nodes represent entities such as people, places, and events, and each node can have multiple properties to describe specific information about the entity. Edges represent relationships between nodes, such as "knows," "belongs to," and "located in." Edges can also contain properties to describe the characteristics of the relationship, such as the strength of the relationship and when it was established. Attributes are data fields attached to nodes or edges to store specific information, such as a person's name, age, or the start date of the relationship.
[0049] For intelligent triage services, the diagram above can represent the correspondence between diseases, tests / examinations, surgical procedures, etc., and departments; that is, which department to visit when suffering from a certain disease, needing a certain test / examination, or needing a certain surgical procedure. In this application, this information that can be used to determine the department to visit is referred to as visitation characteristics. Specifically, in this diagram, nodes can be divided into visit feature nodes and department nodes. A visit feature node can represent a visit feature named entity (i.e., the identifying text of the visit feature, such as the disease name text), and a department node can represent a department named entity (i.e., the identifying text of the department, such as the department name text). An edge is used to connect a visit feature node and a department node, where the visit feature named entity represented by the visit feature node corresponds to the department named entity represented by the department node (i.e., when having this visit feature, one needs to go to this department for treatment). The visit feature named entity can include at least one subtype of named entity. Since disease is usually the decisive factor in choosing a department, this at least one subtype can include disease. In addition, depending on the actual situation and needs, it can also include test / examination items, surgical procedures, etc.
[0050] It should be noted that since a disease may have multiple disease characteristics, and the same disease characteristic may be caused by different diseases, machine learning can be used to train a predictive model to predict the corresponding disease based on disease characteristics. In this case, the predictive model can first predict the corresponding disease based on the disease characteristics, and then information retrieval and reasoning can be performed on the above graph based on the disease to determine the corresponding department. Disease characteristics can include not only symptoms closely related to the disease (e.g., urinary frequency, urgency, difficulty urinating, dysuria, lower back pain, etc.), but also information such as gender (e.g., male, female) and age, which can influence disease diagnosis to some extent. For example, men have a prostate, while women do not. Therefore, a male patient with urinary frequency and urgency may be diagnosed with benign prostatic hyperplasia (BPH), but a female patient with these symptoms cannot be diagnosed with BPH; that is, gender can affect the diagnosis of BPH. Furthermore, medical history, medication history, and other information can also be included as disease characteristics according to actual needs; this application does not impose any special restrictions on this.
[0051] To reduce the training load and complexity required to obtain a comprehensive triage model, knowledge distillation (KD) can be used. This involves extracting triage-related knowledge from the service model of a large language model that provides comprehensive services, and compressing this knowledge into the base model of another large language model. This base model then becomes the service model of the large language model capable of providing intelligent triage services, and the resulting service model can serve as the comprehensive triage model. Specifically, knowledge distillation can be performed on a pre-defined service model (i.e., a service model of a large language model that provides comprehensive services, such as ChatGPT) used as the teacher model to extract triage-related knowledge. This knowledge is then compressed into the large language model used as the student model to obtain the comprehensive triage model. When performing knowledge distillation on this service model, the training data can be a dataset of query texts used for triage consultation, and the labels can be the triage answer texts corresponding to the query texts.
[0052] In the process of intelligent triage, firstly, the query text used for triage consultation can be obtained, and named entity recognition can be performed on the query text to identify named entities from the query text and determine the type of each identified named entity. If the identified named entities include disease feature named entities, the disease feature named entities can be input into the trained prediction model mentioned above. The prediction model predicts the corresponding disease named entities based on the disease feature named entities, and then determines the department named entities corresponding to the disease named entities based on the above graph. If the identified named entities include visit feature named entities, the department named entities corresponding to the visit feature named entities can be directly determined based on the above graph. Finally, the department named entities can be input into the triage model mentioned above. The triage model performs reasoning based on the department named entities to generate the answer text corresponding to the query text, and the answer text can then be used for triage.
[0053] It should be noted that the above-mentioned graph, prediction model, and large-scale triage model can be constructed offline, while the intelligent triage system using the constructed graph, the trained prediction model, and the large-scale triage model obtained through knowledge distillation is constructed online.
[0054] The intelligent triage method provided in this application will be described in detail below from four aspects: graph construction, prediction model training, acquisition of large-scale triage model, and intelligent triage.
[0055] I. Graph Construction
[0056] First, it should be noted that in the constructed graph, nodes can be divided into visit feature nodes and department nodes. A visit feature node can represent a visit feature named entity (i.e., the identifying text of the visit feature, such as the disease name text), and a department node can represent a department named entity (i.e., the identifying text of the department, such as the department name text). An edge is used to connect a visit feature node and a department node, where the visit feature named entity represented by the visit feature node corresponds to the department named entity represented by the department node (i.e., when having this visit feature, one needs to go to this department for treatment). The visit feature named entity can include at least one subtype of named entity. Since disease is usually the decisive factor in choosing a department, this at least one subtype can include disease.
[0057] In some embodiments, the graph described above can be constructed using methods for constructing knowledge graphs. That is, the constructed graph can be a knowledge graph.
[0058] In some embodiments, depending on the actual situation and needs, at least one of the above subtypes may also include one or more of the following: medical testing items; medical examination items; medical surgical procedures. Medical testing generally refers to the process of analyzing collected samples (such as blood, urine, tissue, etc.) in a laboratory to determine their composition, properties, or state, while medical examination more broadly refers to non-laboratory procedures performed on patients by doctors or other medical professionals, such as physical examinations, imaging examinations (such as X-rays, CT scans, MRI scans, etc.), and endoscopy.
[0059] In constructing the aforementioned graph, medical samples can be acquired, and named entity recognition can be performed on each sample to identify corresponding medical visit-related named entities and department named entities. These medical samples typically record the patient's diagnosed disease, recommended tests / examinations, and surgical procedures, as well as the department the patient visited; for example, these medical samples can be open-source and anonymized medical records.
[0060] For a medical sample, since a medical sample usually records a patient's diagnosed disease, recommended test / examination items and surgical procedures, it will also record the department the patient visited. The name entity of the visit feature and the name entity of the department obtained by name entity recognition for this medical sample are the corresponding name entity of the visit feature and the name entity of the department.
[0061] In some embodiments, a large language model can be used for convenient named entity recognition. Specifically, each medical sample can be input into the large language model, which then performs named entity recognition on each medical sample to identify the corresponding medical visit feature named entities and department named entities from these medical samples.
[0062] At this point, the aforementioned large language model can refer to its service model. In practical applications, the constructed large language model can be pre-trained on a large-scale, unlabeled text dataset using unsupervised learning to obtain its base model. Furthermore, the named entity recognition task can be used as a supervised learning task for fine-tuning training, and a text dataset specific to the named entity recognition task can be prepared. Thus, the base model of the large language model can be used as the starting point for fine-tuning, and supervised learning can be employed to fine-tune the training on the named entity recognition task-specific text dataset to obtain the service model of the large language model.
[0063] In some embodiments, to ensure consistency across all named entity representations, named entities identified through named entity recognition can be standardized. For example, "cardiology", "cardiovascular medicine", and "cardiology department" can be standardized into a single standard form, namely "cardiovascular medicine".
[0064] Once the corresponding named entities for patient visits and departments have been identified, the aforementioned graph can be constructed based on these entities.
[0065] For example, suppose that for medical sample 1, name entities A, B, and M (named entities of departments) are identified as patient visit features, and for medical sample 2, name entities C and N (named entities of departments) are identified as patient visit features. Then, it can be seen that name entities A and B correspond to department names, respectively, and name entity C corresponds to department names. Therefore, the constructed graph can be shown in Figure 3A, where node A represents name entity A, node B represents name entity B, node C represents name entity C, node M represents name entity M, and node N represents name entity N. Nodes A and M are connected by an edge, nodes B and M are connected by an edge, and nodes C and N are connected by an edge.
[0066] In some embodiments, to make the relationships between different entities clearer and more explicit, and to facilitate the subsequent use of the above graph to determine the department corresponding to a specific medical visit feature, corresponding weights can be assigned to each edge in the graph. Specifically, for an edge connecting a medical visit feature node and a department node, the weight of this edge can be the degree of association between the medical visit feature named entity represented by the medical visit feature node and the department named entity represented by the department node.
[0067] In the above scenario, for the named entities of various subtypes (referred to as target subtypes) in the named entities of the patient visit features identified from the aforementioned medical samples, the named entities of the target subtypes can first be used as training samples, and the named entities of the departments corresponding to the named entities of the target subtypes can be used as labels for the training samples. Based on the training samples and their labels, supervised training is performed on a preset prediction model to obtain the trained prediction model. Then, each named entity of the target subtype is input into the trained prediction model, which predicts the correlation degree between each named entity of the target subtype and each named entity of the department (this correlation degree can specifically be the probability that the prediction model predicts each named entity of the department based on each named entity of the target subtype). Subsequently, the named entities of patient visit features and department named entities with a correlation degree greater than a preset threshold can be identified as the corresponding named entities of patient visit features and department named entities. Based on the identified named entities of patient visit features and department named entities, as well as these corresponding named entities of patient visit features and department named entities and their correlation degrees, the aforementioned graph is constructed.
[0068] It should be noted that the prediction models used to predict the relevance of different subtypes of named entities to the named entities of various departments are usually different prediction models.
[0069] For example, suppose that for medical sample 1, named entities A, B, and M (visit feature name entity) are identified, and for medical sample 2, named entities C and N (visit feature name entity) are identified. Using the trained prediction model, the model predicts that the correlation between named entity A and department name entity M is 0.9, B is 0.78, and C is 0.88. With a preset threshold of 0.8, it can be concluded that the correlation between named entities A and department name entity M is... Named entity A corresponds to department named entity M with a correlation degree of 0.9, and visit feature named entity C corresponds to department named entity N with a correlation degree of 0.88. Therefore, the constructed graph can be shown in Figure 3B, where node A represents visit feature named entity A, node B represents visit feature named entity B, node C represents visit feature named entity C, node M represents department named entity M, and node N represents department named entity N. Nodes A and M are connected by an edge with a weight of 0.9, and nodes C and N are connected by an edge with a weight of 0.88.
[0070] II. Training the Prediction Model
[0071] During the training of the aforementioned prediction model, medical samples can be acquired, and named entity recognition can be performed on each medical sample to identify the corresponding disease-specific named entities and disease-specific named entities. These medical samples typically record the patient's personal information, symptoms, and diagnosed diseases; for example, these medical samples can be open-source and anonymized medical records.
[0072] For a medical sample, since a medical sample usually records a patient's personal information, symptoms, and the disease diagnosed by the patient, the disease feature named entity and the disease named entity obtained by named entity recognition for this medical sample are the corresponding disease feature named entity and disease named entity.
[0073] In some embodiments, a large language model can be used for convenient named entity recognition. Specifically, each medical sample can be input into the large language model, which then performs named entity recognition on each medical sample to identify the corresponding disease feature named entities and disease named entities from these medical samples.
[0074] At this point, the aforementioned large language model can refer to the service model of that large language model. It should be noted that, in order to ensure the consistency of the identified named entities, this large language model can be the same large language model used for named entity recognition during the construction of the above graph.
[0075] In some embodiments, to ensure consistency across all named entity representations, named entities identified through named entity recognition can be standardized. For example, "cardiology", "cardiovascular medicine", and "cardiology department" can be standardized into a single standard form, namely "cardiovascular medicine".
[0076] Once the corresponding disease feature named entities and disease named entities are identified, the disease feature named entities can be used as training samples, and the disease named entities corresponding to the disease feature named entities can be used as labels for the training samples. Based on the training samples and their labels, supervised training is performed on the preset prediction model to obtain the trained prediction model.
[0077] It should be noted that the prediction model used to predict the corresponding department name entity based on the name entity of the patient visit feature is usually a different prediction model from the prediction model used to predict the corresponding disease name entity based on the name entity of the disease feature.
[0078] In some embodiments, the prediction model described above for predicting the corresponding disease named entity based on disease feature named entities can specifically be a decision tree model.
[0079] III. Obtaining the Large-Scale Patient Guidance Model
[0080] To reduce the amount of training required to obtain a large-scale triage model and to lower the difficulty and complexity of obtaining such a model, knowledge distillation (KD) can be used to extract triage-related knowledge from the service model of a large language model that can provide relatively comprehensive services. This knowledge is then compressed into the base model of another large language model, making the base model a service model of that large language model that can provide intelligent triage services. The service model of the large language model obtained at this point can then serve as the large-scale triage model.
[0081] Knowledge distillation is a machine learning technique primarily used to reduce the complexity and improve the efficiency of deep learning models. The basic idea of knowledge distillation is to extract knowledge from a complex, large model (called the teacher model) and "compress" it into a smaller, simpler model (called the student model). The essence of knowledge distillation lies in knowledge extraction, knowledge transfer, and knowledge compression. Knowledge extraction refers to extracting effective decision-making information from the teacher model; knowledge transfer refers to transferring this information to the student model in a learnable form; and knowledge compression refers to ensuring that the student model can reproduce the behavior of the teacher model on a smaller scale.
[0082] Knowledge distillation mainly involves the following steps: First, a high-performance but potentially complex teacher model is trained. This teacher model is then used to predict the training data, resulting in soft labels. These soft labels are typically temperature-scaled probability distributions that provide richer information than hard labels. Next, a smaller student model is trained to make predictions as close as possible to the teacher model's soft labels. This process may involve using both hard and soft labels as part of the loss function. Finally, the performance of the student model is evaluated, and necessary adjustments are made to optimize its performance.
[0083] In other words, a loss function can be defined first to measure the difference between the predictions of the student model and the teacher model. This is usually achieved using soft targets, where the output of the teacher model is used as the target of the student model, and cross-entropy loss or other similar loss functions are calculated. Subsequently, the predictions of the teacher model can be used as auxiliary targets, combined with the original target of the student model for training, and the model parameters of the student model are updated by iteratively minimizing the loss function.
[0084] Specifically, knowledge distillation can be performed on a pre-defined service model (i.e., a service model that provides comprehensive services, such as ChatGPT) serving as the teacher model. This extracts knowledge related to patient guidance and compresses it into the large language model serving as the student model, resulting in the patient guidance model. When performing knowledge distillation on this service model, the training data can be a dataset of query texts used for patient guidance consultations, and the labels can be the corresponding patient guidance answer texts.
[0085] IV. Intelligent Triage
[0086] Please refer to Figure 4, which is a flowchart illustrating an exemplary embodiment of the present application of an intelligent triage method.
[0087] As shown in Figure 4, the above-mentioned intelligent triage method may include the following steps.
[0088] Step 402: Obtain the query text for triage consultation, and perform named entity recognition on the query text to identify named entities from the query text and determine the type of each identified named entity.
[0089] In this embodiment, query text for triage consultation can be obtained. Once the query text is obtained, named entity recognition can be performed on it to identify named entities from the query text and determine the type of each identified named entity.
[0090] In some embodiments, a large language model can be used to perform named entity recognition on the query text. Specifically, the query text can be input into the large language model, which will then perform named entity recognition on the query text.
[0091] At this point, the aforementioned large language model can refer to the service model of that large language model. It should be noted that, in order to ensure the consistency of the identified named entities, this large language model can be the same large language model used for named entity recognition in the construction of the graph and the training process of the prediction model.
[0092] In some embodiments, to ensure consistency across all named entity representations, named entities identified through named entity recognition can be standardized. For example, "cardiology", "cardiovascular medicine", and "cardiology department" can be standardized into a single standard form, "cardiovascular medicine". That is, named entity recognition can be performed on the query text, and the identified named entities can be standardized to determine the standardized named entities as those identified from the query text, and to determine the type of each identified named entity.
[0093] Step 404: If the identified named entities include disease feature named entities, then the disease feature named entities are input into the trained prediction model, and the prediction model predicts the corresponding disease named entities based on the disease feature named entities, and determines the department named entities corresponding to the disease named entities based on the graph.
[0094] In this embodiment, if the identified named entities include disease feature named entities based on the types of named entities identified from the above query text, then the disease feature named entities can first be input into the trained prediction model above, and the prediction model can predict the corresponding disease named entities based on the disease feature named entities. Then, based on the constructed graph above, the department named entity corresponding to the disease named entity can be determined.
[0095] In some embodiments, the disease-named entities predicted by the above prediction model are usually unique. In this case, based on the above graph, the correlation degree of the disease-named entity with each department-named entity can be calculated, and the department-named entity with the highest correlation degree can be determined as the department-named entity corresponding to the disease-named entity. Specifically, if the edges in the graph have no weight, a department-named entity can be randomly selected from all the department-named entities represented by all the department nodes connected to the disease node representing the disease-named entity by the edge, as the department-named entity with the highest correlation degree to the disease-named entity; if the edges in the graph have weight, the edge with the highest weight can be selected from all the edges used to connect the disease nodes representing the disease-named entity, and the department-named entity represented by the department node connected by this edge can be taken as the department-named entity with the highest correlation degree to the disease-named entity.
[0096] Step 406: If the identified named entity includes the patient visit feature named entity, then based on the graph, determine the department named entity corresponding to the patient visit feature named entity.
[0097] In this embodiment, if the identified named entities include medical visit feature named entities based on the types of named entities identified from the above query text, then the department named entity corresponding to the medical visit feature named entity can be directly determined based on the constructed above graph.
[0098] In some embodiments, based on the above graph, the correlation degree between the above-mentioned patient visit feature named entity and each department named entity can be calculated, and the department named entity with the highest correlation degree can be determined as the department named entity corresponding to the patient visit feature named entity. Specifically, if the edges in the graph have no weights, the department named entity represented by the department node with the most connected edges can be selected from all department named entities connected to the patient visit feature node representing the patient visit feature named entity through edges, as the department named entity with the highest correlation degree with the patient visit feature named entity; if the edges in the graph have weights, the department named entity represented by the department node with the largest sum of weights of connected edges can be selected from all department named entities connected to the patient visit feature node representing the patient visit feature named entity through edges, as the department named entity with the highest correlation degree with the patient visit feature named entity.
[0099] For example, suppose that named entities A, B, and C representing medical visits are identified from the above query text. Node A, representing medical visit named entity A, and node M, representing department entity M, are connected by an edge. Node B, representing medical visit named entity B, and node M are connected by an edge. Node C, representing medical visit named entity C, and node M are connected by an edge. Node C and node N, representing department entity N, are connected by an edge, and the edges have no weight. Since node M is connected by 3 edges and node N is connected by 1 edge, the department entity M represented by node M can be determined as the department named entity with the highest correlation to the medical visit named entities.
[0100] For example, suppose that named entities A, B, and C representing medical visits are identified from the above query text. Node A, representing medical visit entity A, and node M, representing department entity M, are connected by an edge with a weight of 0.9. Node B, representing medical visit entity B, and node M are connected by an edge with a weight of 0.78. Node B and node N, representing department entity N, are connected by an edge with a weight of 0.82. Node C, representing medical visit entity C, and node N are connected by an edge with a weight of 0.88. Since the total weight of the edges connected to node M is 0.9 + 0.78 = 1.68, and the total weight of the edges connected to node N is 0.82 + 0.88 = 1.7, the department entity N represented by node N can be identified as the department named entity with the highest relevance to the medical visit entity.
[0101] Step 408: Input the department named entity into the patient guidance model, and the patient guidance model will perform reasoning based on the department named entity to generate the answer text corresponding to the query text.
[0102] In this embodiment, once the aforementioned department-named entity is determined, it can be input into the aforementioned patient guidance model. The patient guidance model then uses this department-named entity to infer and generate an answer text corresponding to the query text (typically meaning the answer text contains the department-named entity). This answer text can then be used for patient guidance. For example, based on the department-named entity, a prompt text can be constructed to prompt the patient guidance model to use the department-named entity to perform a patient guidance task (essentially a dialogue task). This prompt text is then input into the patient guidance model, which, guided by the prompt text, uses the department-named entity to infer and generate an answer text corresponding to the query text.
[0103] In the above technical solution, a graph for patient guidance can be pre-constructed. The nodes in this graph include nodes representing named entities of patient visit features and nodes representing named entities of departments. The named entities of patient visit features represented by the nodes connected by the edges correspond to the named entities of departments represented by the nodes connected by those edges. Subsequently, when a query text for patient guidance consultation is obtained, named entity recognition can be performed on the query text to identify the named entities and their types. If the identified named entities include disease feature named entities, the disease feature named entities can be first input into a trained prediction model. The prediction model then predicts the corresponding disease named entities based on the disease feature named entities. Based on the graph, the department named entities corresponding to the disease named entities are then determined. If the identified named entities include patient visit feature named entities, the department named entities corresponding to the patient visit feature named entities can be directly determined based on the graph. These department named entities can then be input into a large-scale patient guidance model, which infers based on these department named entities to generate an answer text corresponding to the query text. This answer text can then be used for patient guidance.
[0104] By employing the above methods, intelligent triage services are realized. This simplifies the patient's medical process, improves efficiency, and helps medical institutions alleviate human resource pressure and optimize service quality, thereby contributing to an improved overall healthcare experience. Furthermore, in providing intelligent triage services, the trained prediction model and the constructed graph can be used to determine the corresponding departmental named entities based on various medical feature named entities in the query text used for triage consultation. These determined departmental named entities are then integrated into the actual input of the large-scale triage model. This allows the large-scale model to consider both its inherent generalization knowledge and the specific knowledge reflected by the departmental named entities when generating the answer text corresponding to the query text, thereby improving the adaptability and response accuracy of the large-scale triage model.
[0105] Corresponding to the embodiments of the methods described above, this application also provides embodiments of the apparatus.
[0106] Please refer to Figure 5, which is a schematic diagram of the structure of a device illustrated in an exemplary embodiment of this application. At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, memory 508, and non-volatile memory 510, and may also include other necessary hardware. One or more embodiments of this application can be implemented in software, for example, the processor 502 reads the corresponding computer program from the non-volatile memory 510 into memory 508 and then runs it. Of course, besides software implementation, one or more embodiments of this application do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic modules, but can also be hardware or logic devices.
[0107] Please refer to Figure 6, which is a block diagram of an exemplary embodiment of this application illustrating a smart triage device.
[0108] The aforementioned intelligent triage device can be applied to the device shown in Figure 5 to achieve the technical solution of this application. The device includes: an acquisition module 602, which acquires query text for triage consultation and performs named entity recognition on the query text to identify named entities from the query text and determine the type of each identified named entity; a first determination module 604, which, if the identified named entities include disease feature named entities, inputs the disease feature named entities into a trained prediction model, and the prediction model predicts the corresponding disease named entities based on the disease feature named entities, and determines the department named entities corresponding to the disease named entities based on a graph; wherein, the nodes in the graph include visit feature nodes and department nodes, each visit feature node representing each visit feature named entity, and each department node representing each The graph contains several named entities for different departments; edges in the graph connect the patient visit feature nodes and the department nodes, and the patient visit feature node connected by each edge represents a named entity for a patient visit feature corresponding to a named entity for a department node connected by the edge; the named entity for a patient visit feature includes at least one subtype of named entity, and the at least one subtype includes diseases; a second determining module 606 determines the named entity for a department corresponding to the patient visit feature named entity based on the graph if the identified named entity includes the named entity for a patient visit feature; a reasoning module 608 inputs the named entity for a large-scale patient guidance model, and the large-scale patient guidance model performs reasoning based on the named entity for a large-scale patient guidance model to generate an answer text corresponding to the query text.
[0109] In some embodiments, the apparatus further includes a prediction model training module, configured to: acquire medical samples and perform named entity recognition on the medical samples to identify corresponding disease feature named entities and disease named entities from the medical samples; use the disease feature named entities as training samples and use the disease named entities corresponding to the disease feature named entities as labels of the training samples; and perform supervised training on the prediction model based on the training samples and their labels.
[0110] In some embodiments, the prediction model is a decision tree model.
[0111] In some embodiments, the apparatus further includes a graph construction module, configured to: acquire a medical sample and perform named entity recognition on the medical sample to identify corresponding patient visit feature named entities and department named entities from the medical sample; and construct the graph based on the identified corresponding patient visit feature named entities and department named entities.
[0112] In some embodiments, each edge in the graph is assigned a corresponding weight, the weight of which represents the correlation between the patient feature named entity represented by the patient feature node connected by the edge and the department named entity represented by the department node connected by the edge. The device further includes a correlation calculation module, used for: using named entities of various target subtypes in the identified patient feature named entities as training samples, and using department named entities corresponding to the named entities of the target subtypes as labels of the training samples; performing supervised training on a preset prediction model based on the training samples and their labels; inputting each named entity of the target subtype into the trained prediction model, and having the prediction model predict the correlation between each named entity of the target subtype and each department named entity; constructing the graph based on the identified corresponding patient feature named entities and department named entities includes: determining the patient feature named entities and department named entities with a correlation greater than a preset threshold as corresponding patient feature named entities and department named entities, and constructing the graph based on the identified patient feature named entities and department named entities, and the corresponding patient feature named entities and department named entities.
[0113] In some embodiments, determining the department named entity corresponding to the named entity based on the graph includes: calculating the correlation degree of the named entity with respect to each department named entity based on the graph, and determining the department named entity with the highest correlation degree as the department named entity corresponding to the named entity.
[0114] In some embodiments, the at least one subtype further includes one or more of the following: medical testing items; medical examination items; medical surgical procedures.
[0115] In some embodiments, the apparatus further includes a knowledge distillation module, configured to: perform knowledge distillation on a preset service big model serving as a teacher model, to extract knowledge related to patient guidance from the service big model, and compress the knowledge into a big language model serving as a student model, to obtain the patient guidance big model.
[0116] In some embodiments, the step of performing named entity recognition on the query text to identify named entities from the query text and determine the type of each identified named entity includes: performing named entity recognition on the query text and performing standardization processing on the identified named entities to determine the standardized named entities as named entities identified from the query text and determine the type of each identified named entity.
[0117] For the device embodiments, they basically correspond to the method embodiments; therefore, relevant details can be found in the descriptions of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the technical solution of this application according to actual needs.
[0118] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0119] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0120] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0121] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0122] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0123] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of this application. In some cases, the actions or steps described in this application may be performed in a different order than those shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0124] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. The term “and / or” refers to and includes any or all possible combinations of one or more associated listed items.
[0125] The terms "an embodiment," "some embodiments," "example," "specific example," or "one implementation," as used in one or more embodiments of this application, refer to specific features or characteristics described in connection with that embodiment, which are included in at least one embodiment of this application. Illustrative descriptions of these terms do not necessarily refer to the same embodiment. Furthermore, the described specific features or characteristics may be combined in a suitable manner in one or more embodiments of this application. In addition, different embodiments and specific features or characteristics from different embodiments may be combined without contradiction.
[0126] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of one or more embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0127] The above description is merely a preferred embodiment of one or more embodiments of this application and is not intended to limit the scope of one or more embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this application should be included within the protection scope of one or more embodiments of this application.
[0128] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
Claims
1. An intelligent triage method, the method comprising: Obtain the query text used for triage consultation, and perform named entity recognition on the query text to identify named entities from the query text and determine the type of each identified named entity; If the identified named entities include disease feature named entities, then the disease feature named entities are input into the trained prediction model. The prediction model predicts the corresponding disease named entities based on the disease feature named entities, and determines the department named entities corresponding to the disease named entities based on the graph. The nodes in the graph include visit feature nodes and department nodes. Each visit feature node represents a visit feature named entity, and each department node represents a department named entity. The edges in the graph connect the visit feature nodes and the department nodes. The visit feature named entity represented by each edge corresponds to the department named entity represented by the department node connected by the edge. The visit feature named entities include at least one subtype of named entities, and the at least one subtype includes diseases. If the identified named entity includes the patient visit feature named entity, then based on the graph, determine the department named entity corresponding to the patient visit feature named entity; The named entity of the department is input into the patient guidance model, which then performs reasoning based on the named entity of the department to generate the answer text corresponding to the query text.
2. The method according to claim 1, further comprising: Acquire medical samples and perform named entity recognition on the medical samples to identify corresponding disease feature named entities and disease named entities from the medical samples; The disease feature named entities are used as training samples, and the disease named entities corresponding to the disease feature named entities are used as labels for the training samples. Based on the training samples and their labels, the prediction model is trained in a supervised manner.
3. The method according to claim 2, wherein the prediction model is a decision tree model.
4. The method according to claim 1, further comprising: Acquire medical samples and perform named entity recognition on the medical samples to identify corresponding medical visit feature named entities and department named entities from the medical samples; The graph is constructed based on the identified corresponding named entities for patient visit features and department names.
5. According to the method of claim 4, each edge in the figure is assigned a corresponding weight, and the weight of each edge is the degree of correlation between the named entity of the patient visit feature node connected by each edge and the named entity of the department node connected by the edge. The method further includes: The named entities of various target subtypes in the identified medical visit feature named entities are used as training samples, and the department named entities corresponding to the named entities of the target subtypes are used as labels for the training samples. Based on the training samples and their labels, supervised training is performed on the preset prediction model. Each named entity of the target subtype is input into the trained prediction model, and the prediction model predicts the correlation degree of each named entity of the target subtype with respect to the named entities of each department. The process of constructing the graph based on the identified corresponding patient visit feature named entities and department named entities includes: The named entities of patient visit features and departments with a correlation greater than a preset threshold are identified as the corresponding named entities of patient visit features and departments. The graph is constructed based on the identified named entities of patient visit features and departments, as well as the corresponding named entities of patient visit features and departments.
6. The method according to claim 1, wherein determining the department naming entity corresponding to the naming entity based on the graph includes: Based on the graph, the correlation degree of the named entity with respect to each department named entity is calculated, and the department named entity with the highest correlation degree is determined as the department named entity corresponding to the named entity.
7. The method according to claim 1, wherein the at least one subtype further includes one or more of the following: medical testing items; medical examination items; medical surgical procedures.
8. The method according to claim 1, further comprising: Knowledge distillation is performed on the pre-defined service model, which serves as the teacher model, to extract knowledge related to patient guidance. This knowledge is then compressed into a large language model, which serves as the student model, to obtain the patient guidance model.
9. The method according to claim 1, wherein performing named entity recognition on the query text to identify named entities from the query text and determining the type of each identified named entity includes: Named entity recognition is performed on the query text, and the identified named entities are standardized to determine the standardized named entities as those identified from the query text, and the type of each identified named entity is determined.
10. An intelligent triage device, the device comprising: The acquisition module acquires the query text used for triage consultation, and performs named entity recognition on the query text to identify named entities from the query text and determine the type of each identified named entity. The first determining module, if the identified named entities include disease feature named entities, inputs the disease feature named entities into the trained prediction model. The prediction model predicts the corresponding disease named entities based on the disease feature named entities, and determines the department named entities corresponding to the disease named entities based on the graph. The nodes in the graph include visit feature nodes and department nodes; each visit feature node represents a visit feature named entity, and each department node represents a department named entity. The edges in the graph connect the visit feature nodes and the department nodes; the visit feature named entity represented by each edge corresponds to the department named entity represented by the department node connected by the edge. The visit feature named entities include at least one subtype of named entities, and the at least one subtype includes diseases. The second determining module, if the identified named entity includes the medical visit feature named entity, then determines the department named entity corresponding to the medical visit feature named entity based on the graph; The reasoning module inputs the named entity of the department into the patient guidance model, and the patient guidance model performs reasoning based on the named entity of the department to generate the answer text corresponding to the query text.
11. An electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1 to 9 by executing the executable instructions.
12. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 9.