Online inquiry system based on AI analysis and multiple rounds of dialogues
By introducing multiple rounds of dialogue mechanisms and triage statistical models into the online consultation system, the problem that existing systems cannot effectively interact and obtain sufficient information is solved, and more accurate disease analysis and diagnosis results are achieved.
Patent Information
- Application Number
- CN202510301702.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-05-06
AI Technical Summary
The existing online consultation system cannot interact with users based on the information provided by users like people, resulting in errors in the analysis results, especially when information is missing, it is impossible to ask users to provide further information.
An online consultation system based on AI analysis and multiple rounds of dialogue is adopted to obtain user description text, extract symptom entities, and use pre-constructed triage statistical model and AI analysis model to analyze the disease. If a higher probability of disease label cannot be derived, guide the user to provide more information through multiple rounds of conversations until the preliminary disease label analysis is performed after passing the verification.
It realizes interaction with users, ensures the sufficiency of input information, avoids conclusions with large errors, and improves the accuracy of analysis results.
Smart Images

Figure CN119943446A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online medical consultation, and in particular to an online medical consultation system based on AI analysis and multi-round dialogue. Background Art
[0002] Online consultation, as an important part of digital health services, has developed rapidly and become popular in recent years. It connects medical service providers with patients through Internet technology, providing a variety of conveniences and additional value.
[0003] Existing online medical consultation technologies are generally built based on AI models. AI models are similar to black box models. They can analyze the symptom information input by users to obtain preliminary conclusions (such as disease labels) and match appropriate medical resources based on the conclusions for further diagnosis and medical assistance.
[0004] However, the biggest drawback of existing online medical consultations is that they cannot interact with users based on the information provided by users like humans do. When some information is missing, they cannot ask users to provide further information, which makes the analysis results prone to errors. Summary of the invention
[0005] In view of this, an object of the present invention is to provide an online consultation system based on AI analysis and multi-round dialogue to solve the problems in the background technology.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] An online medical consultation system based on AI analysis and multi-round dialogue of the present invention comprises the following steps:
[0008] The acquisition module is used to obtain the user's description text;
[0009] An entity extraction module, used for extracting symptom entities from the description text;
[0010] A verification module is used to perform symptom analysis based on a pre-built triage statistical model and symptom entities to obtain multiple candidate symptom labels and the confidence levels of the multiple candidate symptom labels; when there is a target candidate symptom label with a confidence level greater than a preset confidence threshold, the verification is passed, otherwise the verification is not passed, wherein the triage statistical model includes symptom labels corresponding to multiple entity labels and the probabilities of symptom labels;
[0011] A dialogue module is used to perform a dialogue with the user based on the historical symptom entities of multiple candidate disease labels when the verification fails, obtain a new description text, and return to the entity extraction module until the verification passes;
[0012] The AI analysis module is used to analyze all symptom entities and pre-built AI analysis models to obtain preliminary symptom labels when passing verification.
[0013] In an embodiment of the present application, extracting symptom entities from the description text includes:
[0014] Segmenting the description text to obtain a plurality of words;
[0015] The multiple words are converted into word vectors to be verified, and the word vectors to be verified are matched with word vector templates in a pre-built symptom entity library; when any word vector to be verified matches the word vector template in the symptom entity library, the any word vector to be verified is used as a symptom entity.
[0016] In one embodiment of the present application, based on the pre-built triage statistical model and symptom entities, a symptom analysis is performed to obtain a plurality of candidate symptom labels and confidence levels of the plurality of candidate symptom labels, including:
[0017] Convert the symptom entity to a vector E i , and the vector E i Matching with all entity labels in the triage statistical model to obtain the target entity label, where i is the serial number of the symptom entity;
[0018] Determine multiple candidate symptom labels corresponding to the target entity label And a variety of candidate symptom labels Probability Among them, j is the serial number of the candidate symptom label;
[0019] Multiple candidate symptom labels for target entity labels corresponding to multiple symptom entities Probability Sum up and get each candidate symptom label The total probability P(L j );
[0020] The candidate symptom labels whose probabilities are greater than or equal to the preset probability threshold are taken as target symptom labels, and the total probabilities of multiple target symptom labels are normalized to obtain the confidence levels of multiple candidate disease labels.
[0021] In one embodiment of the present application, the method for constructing the triage statistical model includes:
[0022] Obtain multiple historical triage records;
[0023] A sample of symptom entities and disease types were extracted from each historical triage record;
[0024] Respectively converting the symptom entity sample and the disease type into vectors to obtain an entity sample vector and a symptom sample vector;
[0025] Combining the entity sample vector and the symptom sample vector belonging to the same historical triage record into a combined vector, wherein the combined vector includes an entity sample vector and a symptom sample vector;
[0026] Clustering all combined vectors to obtain multiple first-level clusters; removing the first-level clusters whose number of data samples is less than a preset number threshold, to obtain multiple filtered target first-level clusters;
[0027] For each target first-level cluster, all combination vectors are clustered based on the entity sample vectors to obtain multiple second-level clusters; and the categories of all entity sample vectors in each second-level cluster are marked to obtain entity labels;
[0028] For each secondary cluster, all combination vectors are clustered based on the symptom sample vectors to obtain multiple third-level clusters; and the categories of all symptom sample vectors in each third-level cluster are marked to obtain disease labels;
[0029] Calculate the probability of each disease label in each secondary cluster, and obtain the disease labels corresponding to multiple entity labels and the probabilities of disease labels;
[0030] A triage statistical model is constructed based on the symptom labels corresponding to multiple entity labels and the probabilities of symptom labels.
[0031] In one embodiment of the present application, a dialogue is performed with a user based on historical symptom entities of multiple candidate disease labels to obtain a new description text, including:
[0032] Determining entity labels corresponding to a plurality of candidate disease labels in the triage statistical model;
[0033] A guide text is constructed based on the entity tag, and the guide text is sent to the user to obtain a new description text.
[0034] In one embodiment of the present application, determining entity labels corresponding to a plurality of candidate disease labels in the triage statistical model includes:
[0035] For each target first-level cluster, all combination vectors are clustered based on the symptom sample vectors to obtain multiple fourth-level clusters; and the categories of all symptom sample vectors in each fourth-level cluster are marked to obtain disease labels;
[0036] For each four-level cluster, all combination vectors are clustered based on the entity sample vectors to obtain multiple five-level clusters; and the categories of all entity sample vectors in each five-level cluster are marked to obtain entity labels;
[0037] Calculate the probability of each entity label in each four-level cluster to obtain the probability of multiple entity labels for each disease label;
[0038] The N entity labels with the highest probability of corresponding to the multiple candidate disease labels and which do not match the symptom entity are screened out.
[0039] In one embodiment of the present application, preliminary symptom labels are obtained based on analysis of all symptom entities and pre-built AI analysis models, including:
[0040] Convert all symptom entities into vectors to obtain input vectors;
[0041] The input vector is input into a pre-built AI analysis model to obtain a preliminary disease label.
[0042] In one embodiment of the present application, the method for constructing the AI analysis model includes:
[0043] Obtain multiple historical triage records;
[0044] A sample of symptom entities and disease types were extracted from each historical triage record;
[0045] Respectively converting the symptom entity sample and the disease type into vectors to obtain an entity sample vector and a symptom sample vector;
[0046] Building training data based on all entity sample vectors and symptom sample vectors in the same historical triage record to obtain a training data set;
[0047] The artificial neural network is trained based on the training data set to obtain an AI analysis model.
[0048] In one embodiment of the present application, it also includes:
[0049] The resource matching module is used to match medical resources for the user based on the preliminary symptom label.
[0050] In one embodiment of the present application, the AI analysis module is also used to perform analysis based on all symptom entities and a pre-built AI analysis model to obtain a preliminary symptom label when the verification still cannot be passed after a preset number of rounds of dialogue.
[0051] The beneficial effects of the present invention are as follows: an online medical consultation system based on AI analysis and multiple rounds of dialogue of the present invention pre-builds a statistical model and an AI analysis model, and when a user inputs a description text, extracts the symptom entities in the description text, and then uses the statistical model to verify the symptom entities to determine whether the current symptom entities can be used to derive disease labels with higher probabilities. If a disease label with a higher probability cannot be derived, it means that the existing symptom entities may not be sufficient as input for the AI model, so the corresponding symptom entities of the candidate disease labels are used to guide the user and conduct multiple rounds of dialogue to extract more symptom entities, and after verification, the symptom entities are input into the AI analysis model to obtain more accurate preliminary analysis results. The present application can realize interaction with users, and can ensure the adequacy of the input information to avoid conclusions with large errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0053] Figure 1 This is a diagram of an application scenario of an online medical consultation system based on AI analysis and multi-round dialogues shown in an embodiment of the present application;
[0054] Figure 2 is a structural diagram of an online medical consultation system based on AI analysis and multi-round dialogues shown in an embodiment of the present application;
[0055] Figure 3 The figure is a schematic diagram of the statistical model construction process in one embodiment of the present application. DETAILED DESCRIPTION
[0056] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0057] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show the layers related to the present invention rather than being drawn according to the number, shape and size of the layers in actual implementation. In actual implementation, the type, quantity and proportion of each layer may be changed arbitrarily, and the layer layout may also be more complicated.
[0058] In the following description, numerous details are discussed to provide a more thorough explanation of embodiments of the present invention; however, it is apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details.
[0059] Figure 1 FIG. 1 is a diagram showing an application scenario of an online medical consultation system based on AI analysis and multi-round dialogues in one embodiment of the present application. Figure 1 As shown, the present application utilizes the user's smart terminal 110 to perform online consultation. The smart terminal 110 is connected to the server 120 via the Internet. The server 120 has built-in statistical models and AI analysis models, which can automatically perform analysis, guidance, diagnosis, and resource matching based on the descriptive text input by the user.
[0060] Figure 2 is a structural diagram of an online consultation system based on AI analysis and multi-round dialogue shown in an embodiment of the present application, such as Figure 2 As shown: An online medical consultation system based on AI analysis and multi-round dialogue in this embodiment includes:
[0061] The acquisition module 210 is used to acquire the user's description text;
[0062] In this application, the user's description text is obtained by using a smart terminal. Generally, the user will input his or her own symptoms into the online consultation system, so the description text is generally a symptom description. However, in some cases, it may also be other greetings.
[0063] An entity extraction module 220, for extracting symptom entities from the description text;
[0064] If the user inputs a symptom description text, the symptom entity can be directly extracted to facilitate subsequent intent matching and analysis. If the symptom entity cannot be extracted, the existing natural language model is called to correspond. In addition, after answering the user's non-important questions (not including symptom entities), the guide text is used for guidance.
[0065] For example: Q: "Hello, what's your name?" A: "I am robot xxx, please enter your symptoms in the input box"
[0066] In this application, the word segmentation and matching methods are used to extract symptom entities, including:
[0067] S210, segmenting the description text to obtain a plurality of words;
[0068] The word segmentation algorithm in this application can use the forward maximum matching method, the reverse maximum matching method, the bidirectional maximum matching method, the statistical word segmentation method, etc.
[0069] S220, converting the multiple words into word vectors to be verified, and matching the word vectors to be verified with word vector templates in a pre-built symptom entity library; when any word vector to be verified matches the word vector template in the symptom entity library, taking any word vector to be verified as a symptom entity.
[0070] This application uses the word2vec model to convert multiple words into word vectors to be verified. Then the word vector to be verified is matched with the word vector template by calculating the cosine similarity. If the similarity is greater than the preset similarity threshold, it means that the two match. Through the above method, this application can extract symptom entities similar to the word vector template.
[0071] Verification module 230, used to perform symptom analysis based on a pre-built triage statistical model and symptom entities, and obtain multiple candidate symptom labels and the confidence of multiple candidate symptom labels; when there is a target candidate symptom label with a confidence greater than a preset confidence threshold, it passes the verification, otherwise it fails the verification, wherein the triage statistical model includes symptom labels corresponding to multiple entity labels and the probability of symptom labels;
[0072] This application mainly uses an AI model to analyze the correspondence between symptom entities and disease labels. The AI model is essentially a black box model. Therefore, it is impossible to use the AI model to analyze whether the input symptom entities are sufficient to derive an accurate analysis conclusion. In the prior art, it is generally necessary to construct training data containing a small number of entities, and then annotate them with a lower confidence level to analyze whether the conclusion is accurate. However, for this kind of training data, experienced doctors are required to label it. Considering the wide variety of entities and disease labels, it is very difficult to use in practice. Therefore, this application constructs a statistical model to verify the adequacy of the input entities.
[0073] Figure 3 FIG. 1 is a schematic diagram of a statistical model construction process in an embodiment of the present application. Figure 3 As shown, the statistical model is constructed as follows:
[0074] (1) Obtain multiple historical triage records;
[0075] The triage record is an important part of the medical process and is mainly used in emergency or outpatient settings. It records in detail the initial assessment information of the patient when he arrives at the medical institution, helping medical staff to quickly understand the patient's condition and determine the priority and direction of treatment. The triage record usually contains:
[0076] Basic information: including the patient's name, gender, age, contact information and other basic information.
[0077] (1-1) Chief complaint: the main symptoms or discomfort described by the patient himself and the time when these symptoms began.
[0078] (1-2) History of current illness: Description of the onset and development of the current illness, including changes in symptoms, whether any treatment has been received and its effects, etc.
[0079] (1-3) Medical history: The patient’s past medical history, such as whether he has chronic diseases, surgical history, allergy history, etc.
[0080] (1-4) Vital signs: including the measurement results of basic physiological indicators such as body temperature, pulse, respiratory rate, blood pressure, etc.
[0081] (1-5) Initial physical examination findings: important signs or abnormalities found by medical staff during the initial examination.
[0082] (1-6) Triage score and level: A score given based on the severity of the patient's condition (such as using the ESI emergency severity index) and the corresponding treatment priority.
[0083] (1-7) Preliminary diagnosis: A preliminary judgment or suspicion based on the above information.
[0084] (1-8) Treatment suggestions: The next steps recommended, such as immediate treatment, further examination, or referral to a specialist.
[0085] (2) extracting symptom entity samples and disease types from each historical triage record;
[0086] Since this application adopts the online consultation method, it is impossible to collect the user's physical sign information. Therefore, only the chief complaint information and preliminary diagnosis are extracted from the historical triage records in this application to build a statistical model.
[0087] For the extraction of symptom entity samples and disease types, please refer to the previous text, namely word segmentation and template matching.
[0088] In addition, the AI model in this application is also based on the above information.
[0089] (3) converting the symptom entity sample and the disease type into vectors respectively to obtain an entity sample vector and a symptom sample vector;
[0090] (4) The same historical triage record R x The entity sample vector E in x and symptom sample vector L x Combined into a combination vector (E x ,L x ), wherein the combined vector comprises an entity sample vector and a symptom sample vector;
[0091] (5) For all combination vectors (E x ,L x ) to obtain multiple primary clusters; and remove the primary clusters whose number of data samples is less than a preset number threshold, to obtain multiple screened target primary clusters;
[0092] In this embodiment, the DBSCAN algorithm is used to analyze all the combination vectors (E x ,L x ) are clustered to group the combination vectors with similar values together, that is, to group the combination vectors with similar symptom entities and diagnostic conclusions together.
[0093] The purpose of the first clustering is to retain valid data. The minimum distance within the cluster of the first clustering is set to a larger value, so that the combination vectors of symptom entities and diagnostic conclusions that are roughly similar are clustered together. For some entities with wrong conclusions or relatively rare entities that have no reference significance, they will be clustered in a cluster with less data or even only one data. This application first removes these clusters and retains only clusters that can reflect the triage rules.
[0094] (6) For each target first-level cluster, all combination vectors are clustered based on the entity sample vectors to obtain multiple second-level clusters; and the categories of all entity sample vectors in each second-level cluster are marked to obtain entity labels;
[0095] The purpose of clustering to obtain secondary clusters is to determine the relationship between entity samples and disease labels, for example, the disease that a cough may correspond to and the probability of multiple diseases.
[0096] In addition, since the words used in the triage records may be slightly different, this application does not use symptom entities or disease conclusion entities as labels, but manually annotates a higher-level label. For example, if the entities contained in the cluster include cough, dry cough, cough and wheeze, then the label cough can be assigned. Using a higher-level label to express the meaning of the cluster has better applicability.
[0097] (7) For each secondary cluster, all combination vectors are clustered based on the symptom sample vectors to obtain multiple third-level clusters; and the categories of all symptom sample vectors in each third-level cluster are marked to obtain disease labels;
[0098] Each third-level cluster contains a disease conclusion in the second-level cluster. For example, the cluster corresponding to the entity label "cough" contains disease labels such as "cold", "upper respiratory tract disease", and "lung disease".
[0099] (8) Calculate the probability of each disease label in each secondary cluster, and obtain the disease labels corresponding to multiple entity labels and the probabilities of disease labels;
[0100] Among them, the probability represents the jth disease label of the i-th secondary cluster, is the amount of data in the third-level cluster corresponding to the j-th disease label of the i-th second-level cluster, N(L i ) represents the data size of the i-th secondary cluster.
[0101] (9) Construct a triage statistical model based on the symptom labels corresponding to multiple entity labels and the probabilities of symptom labels.
[0102] After building the statistical model, the application can generally understand the disease label corresponding to each symptom label and the probability of each disease label. Therefore, the confidence evaluation process includes:
[0103] S310, convert the symptom entity into a vector E i , and the vector E i Matching with all entity labels in the triage statistical model to obtain the target entity label, where i is the serial number of the symptom entity;
[0104] S320, determining multiple candidate symptom labels corresponding to the target entity label And a variety of candidate symptom labels Probability Among them, j is the serial number of the candidate symptom label;
[0105] Specifically, by bringing the target entity label into the statistical model, we can obtain the corresponding multiple candidate symptom labels and the probabilities of multiple candidate symptom labels.
[0106] S330, multiple candidate symptom labels for target entity labels corresponding to multiple symptom entities Probability Sum up and get each candidate symptom label The total probability P(L j );
[0107] Since there may be multiple symptom entities, the multiple candidate symptom labels L corresponding to the multiple symptom entities are j i Probability By summarizing, we can get a variety of candidate symptom labels The total probability P(L j ),
[0108] S340, taking the candidate symptom labels whose probabilities are greater than or equal to the preset probability threshold as target symptom labels, and normalizing the total probabilities of multiple target symptom labels to obtain the confidence levels of multiple candidate disease labels.
[0109] Finally, multiple candidate symptom labels The total probability P(L j ) is normalized to obtain the confidence C(L j ); confidence C(L j ) is:
[0110]
[0111] Where P min For multiple candidate symptom labels The minimum probability, P max For multiple candidate symptom labels maximum probability.
[0112] In this application, the confidence of multiple candidate disease labels is used to make sufficiency inferences. If there is a disease label with a higher confidence, it means that the current symptom entities all focus on a small number of reasoning conclusions and pass the verification. If after normalization, the confidence of all candidate disease labels is relatively average and cannot focus on a small number of reasoning conclusions, it is very likely to cause errors in subsequent AI reasoning, and multiple rounds of dialogue are required to obtain more clues.
[0113] A dialogue module 240 is used to perform a dialogue with the user based on the historical symptom entities of the multiple candidate disease labels when the verification fails, obtain a new description text, and return to the entity extraction module until the verification passes;
[0114] When the verification fails, the application constructs the dialogue text in the following ways to guide the user, including:
[0115] S410, determining entity labels corresponding to a plurality of candidate disease labels in the triage statistical model;
[0116] The triage statistical model records the correspondence between entity labels and candidate disease labels, so we first need to determine the entity labels corresponding to multiple candidate disease labels. Specifically, it includes:
[0117] S411, for each target first-level cluster, cluster all combination vectors based on the symptom sample vectors to obtain multiple fourth-level clusters; and label the belonging categories of all symptom sample vectors of each fourth-level cluster to obtain a disease label;
[0118] S412, for each four-level cluster, clustering all combination vectors based on the entity sample vectors to obtain multiple five-level clusters; and marking the belonging categories of all entity sample vectors of each five-level cluster to obtain entity labels;
[0119] S413, calculating the probability of each entity label in each four-level cluster, and obtaining the probability of multiple entity labels for each disease label;
[0120] S414, screening out N entity labels with the highest probability of corresponding to the plurality of candidate disease labels and which do not match the symptom entity.
[0121] The above process finds out the multiple entity labels corresponding to each symptom label and the probabilities of multiple entity labels by re-clustering. For example, the entity labels corresponding to the symptom label "cold" may include "cough", "fever", "abnormal secretions", "pain", etc. Therefore, this application selects the N entity labels with the highest probability, removes the entity labels that match the symptom entity input by the user, and performs guidance based on these labels.
[0122] S420: construct a guide text based on the entity tag, and send the guide text to the user to obtain a new description text.
[0123] The purpose of the guide text is to ask the user whether there are other symptoms to support the current multiple candidate disease labels. For example, the current disease label has "cold" but the confidence is not enough, so the "abnormal secretion" and "pain" labels are extracted to construct the guide text "Do you have symptoms such as runny nose and body pain?" and send it to the user. If a positive or negative answer is received from the user, the positive or negative intention is used to retain / remove the symptom entity in the guide text. If the reorganized description text from the user is accepted, it returns to the entity extraction module and re-executes the above process. Until the entities received from the user are concentrated on a small number of disease labels and pass the verification.
[0124] The AI analysis module 250 is used to analyze based on all symptom entities and a pre-built AI analysis model to obtain a preliminary symptom label when passing verification.
[0125] When the verification is passed, all the symptom entities extracted in the previous article can be input into the AI analysis model for analysis. When inputting into the AI analysis model, all the symptom entities are first converted into vectors to obtain input vectors; the input vectors are input into the pre-built AI analysis model to obtain preliminary symptom labels.
[0126] The AI analysis model relied on in the above process is based on the CNN convolutional neural network, and the construction process includes:
[0127] Acquire multiple historical triage records; extract symptom entity samples and disease types from each historical triage record; convert the symptom entity samples and the disease types into vectors respectively to obtain entity sample vectors and symptom sample vectors; construct training data based on all entity sample vectors and symptom sample vectors in the same historical triage record to obtain a training data set; train an artificial neural network based on the training data set to obtain an AI analysis model.
[0128] In addition, if the verification still cannot be passed after a preset number of rounds of conversations, an analysis is performed based on all symptom entities and a pre-built AI analysis model to obtain a preliminary symptom label.
[0129] The resource matching module 260 is used to match medical resources for the user based on the preliminary disease label.
[0130] After obtaining the preliminary analysis conclusion, the preliminary disease labels can be used to match dependent resources, including: (1) Select experts or specialists in the corresponding field based on the diagnosis results. For example, if it is a respiratory problem, a respiratory physician is recommended; if it involves cardiovascular problems, a cardiologist should be consulted. (2) Based on the preliminary diagnosis, necessary laboratory tests or imaging examinations (such as blood tests, X-rays, CT scans, etc.) are recommended to further confirm the diagnosis. (3) Provide convenient appointment registration services through online platforms, so that patients can quickly contact the required medical service providers. (4) For situations where medication is needed, reliable online pharmacies can be recommended and door-to-door delivery services can be provided, etc.
[0131] The present invention provides an online medical consultation system based on AI analysis and multiple rounds of dialogue, which pre-builds a statistical model and an AI analysis model. When a user inputs a description text, the symptom entity in the description text is extracted, and then the statistical model is used to verify the symptom entity to determine whether a higher probability disease label can be derived using the current symptom entity. If a higher probability disease label cannot be derived, it means that the existing symptom entity may not be sufficient as an input for the AI model. Therefore, the corresponding symptom entity of the candidate disease label is used to guide the user and conduct multiple rounds of dialogue to extract more symptom entities, and after verification, the symptom entity is input into the AI analysis model to obtain a more accurate preliminary analysis result. The present application can realize interaction with the user, and can ensure the adequacy of the input information to avoid conclusions with large errors.
[0132] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented, wherein the method is the execution logic of this system.
[0133] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0134] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.
[0135] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0136] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step of the above method.
[0137] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0138] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0139] In the above-mentioned embodiments, although the present invention has been described in conjunction with the specific embodiments of the present invention, many replacements, modifications and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. The embodiments of the present invention are intended to cover all such replacements, modifications and variations falling within the broad scope of the appended claims.
[0140] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. An online consultation system based on AI analysis and multi-round dialogue, characterized in that: include: The acquisition module is used to obtain the user's description text; An entity extraction module, used for extracting symptom entities from the description text; A verification module is used to perform symptom analysis based on a pre-built triage statistical model and symptom entities to obtain multiple candidate symptom labels and the confidence levels of the multiple candidate symptom labels; when there is a target candidate symptom label with a confidence level greater than a preset confidence threshold, the verification is passed, otherwise the verification is not passed, wherein the triage statistical model includes symptom labels corresponding to multiple entity labels and the probabilities of symptom labels; A dialogue module is used to perform a dialogue with the user based on the historical symptom entities of multiple candidate disease labels when the verification fails, obtain a new description text, and return to the entity extraction module until the verification passes; The AI analysis module is used to analyze all symptom entities and pre-built AI analysis models to obtain preliminary symptom labels when passing verification.
2. According to claim 1, an online medical consultation system based on AI analysis and multi-round dialogue is characterized in that: Extracting symptom entities from the description text includes: Segmenting the description text to obtain a plurality of words; The multiple words are converted into word vectors to be verified, and the word vectors to be verified are matched with word vector templates in a pre-built symptom entity library; when any word vector to be verified matches the word vector template in the symptom entity library, the any word vector to be verified is used as a symptom entity.
3. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 1, characterized in that: Based on the pre-built triage statistical model and symptom entities, the disease is analyzed to obtain multiple candidate disease labels and the confidence levels of multiple candidate disease labels, including: Convert the symptom entity to a vector E i , and the vector E i Matching with all entity labels in the triage statistical model to obtain the target entity label, where i is the serial number of the symptom entity; Determine multiple candidate symptom labels corresponding to the target entity label And a variety of candidate symptom labels Probability Among them, j is the serial number of the candidate symptom label; Multiple candidate symptom labels for target entity labels corresponding to multiple symptom entities Probability Sum up and get each candidate symptom label The total probability P(L j ); The candidate symptom labels whose probabilities are greater than or equal to the preset probability threshold are taken as target symptom labels, and the total probabilities of multiple target symptom labels are normalized to obtain the confidence levels of multiple candidate disease labels.
4. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 3, characterized in that: The method for constructing the triage statistical model includes: Obtain multiple historical triage records; A sample of symptom entities and disease types were extracted from each historical triage record; Respectively converting the symptom entity sample and the disease type into vectors to obtain an entity sample vector and a symptom sample vector; Combining the entity sample vector and the symptom sample vector belonging to the same historical triage record into a combined vector, wherein the combined vector includes an entity sample vector and a symptom sample vector; Clustering all combined vectors to obtain multiple first-level clusters; removing the first-level clusters whose number of data samples is less than a preset number threshold, to obtain multiple filtered target first-level clusters; For each target first-level cluster, all combination vectors are clustered based on the entity sample vectors to obtain multiple second-level clusters; and the categories of all entity sample vectors in each second-level cluster are marked to obtain entity labels; For each secondary cluster, all combination vectors are clustered based on the symptom sample vectors to obtain multiple third-level clusters; and the categories of all symptom sample vectors in each third-level cluster are marked to obtain disease labels; Calculate the probability of each disease label in each secondary cluster, and obtain the disease labels corresponding to multiple entity labels and the probabilities of disease labels; A triage statistical model is constructed based on the symptom labels corresponding to multiple entity labels and the probabilities of symptom labels.
5. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 4, characterized in that: Based on the historical symptom entities of multiple candidate disease labels, a dialogue is performed with the user to obtain a new description text, including: Determining entity labels corresponding to a plurality of candidate disease labels in the triage statistical model; A guide text is constructed based on the entity tag, and the guide text is sent to the user to obtain a new description text.
6. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 5, characterized in that: Determining entity labels corresponding to a plurality of candidate disease labels in the triage statistical model includes: For each target first-level cluster, all combination vectors are clustered based on the symptom sample vectors to obtain multiple fourth-level clusters; and the categories of all symptom sample vectors in each fourth-level cluster are marked to obtain disease labels; For each four-level cluster, all combination vectors are clustered based on the entity sample vectors to obtain multiple five-level clusters; and the categories of all entity sample vectors in each five-level cluster are marked to obtain entity labels; Calculate the probability of each entity label in each four-level cluster to obtain the probability of multiple entity labels for each disease label; The N entity labels with the highest probability of corresponding to the multiple candidate disease labels and which do not match the symptom entity are screened out.
7. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 1, characterized in that: Based on all symptom entities and pre-built AI analysis models, preliminary disease labels are obtained, including: Convert all symptom entities into vectors to obtain input vectors; The input vector is input into a pre-built AI analysis model to obtain a preliminary disease label.
8. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 7, characterized in that: The method for constructing the AI analysis model includes: Obtain multiple historical triage records; A sample of symptom entities and disease types were extracted from each historical triage record; Respectively converting the symptom entity sample and the disease type into vectors to obtain an entity sample vector and a symptom sample vector; Building training data based on all entity sample vectors and symptom sample vectors in the same historical triage record to obtain a training data set; The artificial neural network is trained based on the training data set to obtain an AI analysis model.
9. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 1, characterized in that: Also includes: The resource matching module is used to match medical resources for the user based on the preliminary symptom label.
10. The online medical consultation system based on AI analysis and multi-round dialogue according to claim 1, characterized in that: The AI analysis module is also used to analyze all symptom entities and a pre-built AI analysis model to obtain a preliminary symptom label when the verification still cannot be passed after a preset number of rounds of dialogue.