Large language artificial intelligence model medical triage inquiry system
By designing a large language artificial intelligence model medical triage and consultation system, using structured data processing and fine-tuning of the BERT model, the complexity and deficiencies in Chinese medical data processing are solved, and efficient and accurate medical diagnosis and recommendations are achieved. Improved the efficiency and convenience of medical resource utilization.
Patent Information
- Application Number
- CN202410903244.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing large language models have problems with complex grammatical structures, high ambiguity, large vocabulary, and insufficient learning of Chinese medical knowledge in Chinese medical data processing, resulting in poor application results in the medical field.
A large language artificial intelligence model medical triage and consultation system is designed, including a structured data processing module, a structured data learning module and a question and answer generation module. Through Chinese language analysis, structured data extraction and information inference, the BERT model is used to conduct Fine-tune and train to generate personalized medical recommendations and diagnostic results.
It realizes rapid processing of large amounts of medical data, improves the accuracy of medical diagnosis and efficiency of medical treatment, shortens patient waiting time, improves the utilization efficiency of medical resources and convenience of services, and provides a highly accurate and smooth interactive experience.
Smart Images

Figure CN118737500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical-related technologies, and in particular to a large language artificial intelligence model medical triage and consultation system. Background Art
[0002] Large language models refer to natural language processing models with large-scale parameters and capabilities. These models use deep learning techniques, such as neural networks, to be trained with large amounts of text data to learn the grammatical structure, semantic meaning, and contextual relationships of a language. These models can typically perform a variety of language tasks, such as text generation, machine translation, and question-answering systems. Their scale and capabilities enable them to generate more accurate and fluent texts, as well as more complex language understanding and generation tasks.
[0003] Although the existing large language models have made great progress in processing medical data in Chinese, there are still some challenges, such as the complex grammatical structure, high ambiguity and large vocabulary of Chinese. However, with a deeper understanding of Chinese medical data and continuous improvement of technology, the ability of large language models in processing Chinese data will continue to improve;
[0004] At present, foreign artificial intelligence medical projects in the medical field are mainly focused on learning and training English medical knowledge, and there are still major deficiencies in model training and knowledge learning in Chinese medical scenarios. Summary of the invention
[0005] The purpose of the present invention is to provide a large language artificial intelligence model medical triage consultation system to solve the problems raised in the above background technology.
[0006] To achieve the above-mentioned object, the present invention provides the following technical solutions: a large language artificial intelligence model medical triage and consultation system, including a medical triage and consultation system for structured processing of Chinese text data;
[0007] The medical triage and consultation system includes a structured data processing module, a structured data learning module and a question and answer generation module;
[0008] The structured data processing module includes a Chinese language analysis submodule, a structured data extraction submodule, a structured data processing submodule and an information inference submodule;
[0009] The Chinese language analysis submodule recognizes and filters the input text and inputs it into the structured data extraction submodule;
[0010] The structured data extraction submodule is used to perform structured processing on a large amount of input text data, extract the patient's symptoms, age, gender, triage department and preliminary diagnosis result information from each text, store them one by one, perform preliminary screening on sensitive information such as the patient's name, ID number, and consultation time, form the correlation of the structured text, and input it into the structured data processing submodule and the information inference submodule;
[0011] The structured data processing submodule pre-processes the input text and transmits it to the information inference submodule;
[0012] The information inference submodule is used to analyze the transmitted text and construct the basic symptoms and corresponding descriptions, as well as the correlation between the department to be diagnosed and the preliminary diagnosis, to form a preliminary triage result and an auxiliary diagnosis result with an additional probability value.
[0013] Preferably, the structured data learning module tokenizes the input text, and the vector formed after character-level segmentation is based on the existing vocabulary vocab of the BERT large model. The segmented characters are converted into id representations according to their positions in the vocabulary, and the length of this vector is standardized, that is, more truncated and less padded, and then sent to the BERT model for training in batches. After the model returns the result, a fully connected layer is added and orthogonalization is performed. The index of the largest item in the obtained vector is the preliminary triage result, and the values of different items in the vector are the auxiliary diagnosis results with additional probability values.
[0014] Preferably, the structured data processing submodule can combine the patient's symptoms, medical history, diagnosis results and treatment amendments to cover various diseases and symptoms by using medical databases, medical image databases and publicly available medical data sets to divide the training set, validation set and test set in a ratio of 8:1:1.
[0015] Preferably, the structured data learning module includes an input submodule, a loading submodule, a fine-tuning training submodule and a text classification submodule;
[0016] The input submodule is used to convert the input text and transmit it to the loading submodule;
[0017] Load the submodule, use the BERTModel.from_pretrAIned function to import the pre-trained BERT-Base-Chinese model, load the model parameters locally, and initialize them;
[0018] Fine-tuning training submodule, used to fine-tune and update the BERT model;
[0019] The text classification submodule is used to test the test set divided by the structured data processing submodule and evaluate the model through accuracy and loss. It can also be used to input patient symptoms separately and call the BERT model for evaluation. The item with the largest median value in the vector returned by the BERT model is the corresponding predicted triage department.
[0020] Preferably, the maximum length of the input submodule text is pad_size=50, and the vocabulary uses vocab.txt provided by Google, based on which the input text is converted into a token sequence, that is, a 1*50 matrix, and the insufficient part is filled with 0. For the mask vector of each text, it is set to 1 within the text length and set to 0 outside the text length.
[0021] Preferably, when fine-tuning, the fine-tuning training submodule calls the fc function to add a fully connected layer after the original output of the bent model, so that it outputs a 1*X vector, where X is the number of departments to be triaged. The results are evaluated and output every 100 rounds. If the loss is smaller than the optimal case recorded previously, the model is updated. At the same time, if the loss on the validation set does not decrease for more than 1000 rounds, the training is terminated early.
[0022] Preferably, the question and answer generation module includes a question and answer input submodule, a preprocessing submodule, a reply submodule and a storage submodule;
[0023] The question-answer input submodule is used to obtain the symptom and medical history information data asked by the patient;
[0024] The preprocessing submodule performs feature extraction and feature selection on the received information data;
[0025] The reply submodule inputs the extracted feature text into the BERT model and generates corresponding diagnosis and treatment suggestions;
[0026] The storage submodule is used to store and manage the generated diagnosis and treatment recommendations to ensure data security.
[0027] Preferably, the question-and-answer input submodule obtains the symptom and medical history information data described by the patient through question interaction, voice interaction or image interaction, and saves it into the data record based on the information described by the patient.
[0028] Technical effects and advantages of the present invention:
[0029] The present invention utilizes a setting method in which a structured data processing module, a structured data learning module, and a question-answer generation module are coordinated to provide personalized medical advice and diagnosis based on the personal information and symptom data provided by the patient to meet the different health needs of the patient. The large language artificial intelligence model can quickly process a large amount of data and quickly make diagnoses and suggestions, shortening the patient's waiting time and improving the efficiency of medical treatment. The system based on the large language artificial intelligence model has high accuracy and can give more accurate diagnosis and treatment suggestions by analyzing patient information and symptom data, which helps to improve the accuracy of medical diagnosis. Through effective medical triage, the system can guide patients to appropriate medical resources, avoid waste of resources and reuse of medical services, and improve the utilization efficiency of medical resources. Patients can receive medical consultation and advice anytime and anywhere through mobile phones or computers without going to the hospital, which improves the convenience and accessibility of medical services, especially for some patients with limited mobility. The present invention achieves the goal of both smooth interactive experience and high accuracy in the medical AI triage and consultation system by comprehensively utilizing the advantages of structured Chinese text data and large language models. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a system block diagram of the present invention.
[0031] Figure 2 This is a block diagram of the structured data processing module of the present invention.
[0032] Figure 3 This is a block diagram of the structured data learning module of the present invention.
[0033] Figure 4 This is a block diagram of the question and answer generation module of the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] The present invention provides Figure 1-4 A large language artificial intelligence model medical triage and consultation system shown, including a medical triage and consultation system, is used for structured processing of Chinese text data, based on the BERT large model, and is intended to solve the problem of natural language recognition of Chinese text in the medical field, and to improve the efficiency, response speed and accuracy of intelligent triage and AI consultation, so as to cope with and solve the practical problems faced by domestic large language artificial intelligence models in the medical field;
[0036] The medical triage and consultation system includes a structured data processing module, a structured data learning module, and a question-answer generation module. The main task of the structured data processing module is to clean, convert, and integrate the original medical data to make it in a unified format and easy to query and analyze. This step is very critical because it is the cornerstone of subsequent data learning and question-answer generation. The structured data processing module usually includes functions such as data cleaning, data conversion, and data integration. After the data is processed into a structured format, the structured data learning module will start working. This module uses machine learning algorithms such as classification, clustering, and natural language processing to learn and analyze the structured medical data, extract the characteristics and laws of the disease, and establish a medical diagnosis model. These models can identify the pattern of the disease and assist doctors in making preliminary judgments and triage. The structured data learning module is the core of the intelligent medical triage system. The question-answer generation module is a medical diagnosis model established based on the structured data learning module. The patient's questions or input information are converted into structured data through natural language processing technology, and then the model obtained in the learning module is used to generate targeted answers or suggestions. The goal of the question-and-answer generation module is to achieve efficient and accurate human-computer dialogue. It directly faces patients and provides instant and personalized medical consultation.
[0037] The structured data processing module provides an effective data foundation for the structured data learning module, while the structured data learning module provides intelligent decision support for the question-answer generation module by establishing a medical diagnosis model. The question-answer generation module directly serves patients by providing medical consultation and triage suggestions through interactive questions and answers. These three modules complement each other and together form an efficient and intelligent medical triage consultation system.
[0038] The structured data processing module includes a Chinese language analysis submodule, a structured data extraction submodule, a structured data processing submodule, and an information inference submodule. The structured data processing module ensures the accuracy and consistency of the data and provides reliable data support for medical decision-making. The structured data processing module converts unstructured data, such as free text and voice, into structured data, such as tables and JSON, for easy storage, query, and analysis.
[0039] The Chinese language analysis submodule recognizes and filters the input text and inputs it into the structured data extraction submodule;
[0040] The structured data extraction submodule is used to perform structured processing on a large amount of input text data, extract the patient's symptoms, age, gender, triage department and preliminary diagnosis results from each text, and store them one by one. It performs preliminary screening on sensitive information such as the patient's name, ID number, and consultation time to form the correlation of structured texts and input them into the structured data processing submodule and the information inference submodule. For each text, the text in front is the patient's symptoms, age, and gender information, and the number behind represents the patient's triage department and preliminary diagnosis results. The text and the number are separated by '\t';
[0041] The structured data processing submodule pre-processes the input text and transmits it to the information inference submodule. Medical data may come from multiple sources. The structured data processing submodule integrates data from different sources to build a complete patient information view, converts data in different formats, codes or representations into a unified format for subsequent processing and analysis, stores the processed data in a suitable database or data warehouse for rapid retrieval and further analysis, creates data indexes, improves data retrieval efficiency, and enables medical personnel to quickly find the required information;
[0042] The information inference submodule is used to analyze the text transmitted, construct basic symptoms and corresponding descriptions, and the correlation between the department to be diagnosed and the preliminary diagnosis, to form a preliminary triage result and an auxiliary diagnosis result with an additional probability value.
[0043] The structured data learning module tokenizes the input text. The vector formed after character-level segmentation is based on the existing vocabulary vocab of the BERT large model. The segmented characters are converted into ID representations according to their positions in the vocabulary, and the length of this vector is standardized, that is, more truncated and less padded. It is then sent to the BERT model for training in batches. After the model returns the result, a fully connected layer is added and orthogonalization is performed. The index of the largest item in the obtained vector is the preliminary triage result, and the values of different items in the vector are the auxiliary diagnosis results with additional probability values.
[0044] The structured data processing submodule can cover various diseases and symptoms by dividing the training set, validation set and test set in a ratio of 8:1:1 using medical databases, medical image databases and publicly available medical data sets. The BERT model will learn how to triage and interview based on the data in the training set. During the training process, the model will continuously adjust its parameters to make more accurate predictions on future data. The validation set is used to evaluate the performance of the model and adjust the model. During the model training process, the validation set is constantly used to test the performance of the model, and the model is adjusted based on the results. This ensures that the model performs well on the training set and can adapt to new data. The test set is used to finally evaluate the performance of the model. After the model training is completed, the test set is used to test the performance of the model to determine whether the model can make accurate predictions in practical applications.
[0045] The structured data learning module includes an input submodule, a loading submodule, a fine-tuning training submodule, and a text classification submodule. It mainly uses machine learning and data mining techniques to analyze and learn structured medical data to improve the intelligence level of the system. This module uses algorithms to train structured data to establish a predictive model. These models can predict or classify patients' needs based on the input features, thereby achieving intelligent triage and consultation. At the same time, they can assist doctors in diagnosis and provide possible disease diagnosis suggestions by analyzing patients' symptoms and medical history. The data processed by the input submodule is read by the loading submodule and provided to the fine-tuning training submodule in batches. The fine-tuning training submodule learns and adjusts parameters based on the pre-trained model, while the text classification submodule is responsible for processing medical text data and classifying it. Finally, the entire learning module works together to generate a medical diagnosis model that can be used in the question-answer generation module. This design enables the system to efficiently process medical data and improve the accuracy and efficiency of triage.
[0046] The input submodule is used to convert the input text and transmit it to the loading submodule. The maximum length of the input submodule text is pad_size=50. The vocabulary table uses vocab.txt provided by Google. The input text is converted into a token sequence, that is, a 1*50 matrix. The insufficient part is filled with 0. For the mask vector of each text, it is set to 1 within the text length and 0 outside the text length.
[0047] Load the submodule, use the BERTModel.from_pretrAIned function to import the pre-trained BERT-Base-Chinese model, load the model parameters locally, and initialize it. The BERT model is a pre-trained deep language model launched by Google. It learns language representation through a bidirectional Transformer architecture and has achieved significant performance improvements in multiple NLF tasks. BERT-Base-Chinese is the version of the BERT model for Chinese text. It is pre-trained for Chinese text and can learn the semantic and grammatical information of Chinese text;
[0048] The fine-tuning training submodule is used to fine-tune and update the BERT model. When fine-tuning, the fine-tuning training submodule calls the fc function after the original output of the bent model to add a fully connected layer, so that it outputs a 1*X vector, where X is the number of departments to be triaged. The results are evaluated and output every 100 rounds. If the loss is smaller than the best case recorded before, the model is updated. At the same time, if the loss on the validation set does not decrease for more than 1000 rounds, the training is terminated early.
[0049] The text classification submodule is used to test the test set divided by the structured data processing submodule and evaluate the model through accuracy and loss. It can also be used to input patient symptoms separately and call the BERT model for evaluation. The item with the largest median value in the vector returned by the BERT model is the corresponding predicted triage department.
[0050] The question-answer generation module includes a question-answer input submodule, a preprocessing submodule, a reply submodule, and a storage submodule. It uses the important information provided by the patient as source data and provides it to the large language model, which ultimately gives the answer to the AI triage and consultation model. The question-answer input submodule is responsible for receiving and processing user questions, the preprocessing submodule performs in-depth processing on questions to improve the query quality, the reply submodule generates answers based on the processed query information, and the storage submodule is responsible for storing and managing historical question-answer data. Together, these submodules form an efficient and intelligent question-answer generation module that can provide users with instant, personalized medical consultation and triage recommendations;
[0051] The question-answer input submodule is used to obtain the symptom and medical history information data asked by the patient;
[0052] The preprocessing submodule performs feature extraction and feature selection on the received information data;
[0053] The reply submodule inputs the extracted feature text into the BERT model and generates corresponding diagnosis and treatment suggestions;
[0054] The storage submodule is used to store and manage the generated diagnosis and treatment recommendations to ensure data security.
[0055] The question-answer input submodule obtains the symptom and medical history information data described by the patient through questioning interaction, voice interaction or image interaction, and saves it into the data record based on the information described by the patient. It uses artificial intelligence technology, especially natural language processing and machine learning models, to understand and answer the patient's questions. After understanding the question, the question-answer generation module will query the medical knowledge base, which contains information related to medical diseases, symptoms, and treatment plans. The module will retrieve the most relevant information in the knowledge base based on the keywords in the question. Based on the retrieved information, the question-answer generation module will generate one or more answers. These answers can be simple information confirmations, suggestions for further examinations or treatment plans. The module will determine the level of detail of the answer based on the complexity of the question and the depth of the information retrieved. The generated answer may need further optimization to ensure the accuracy and comprehensibility of the answer. The question-answer generation module will optimize the answer through language models and medical rules to make it more in line with the patient's understanding habits and ensure the accuracy of the information. The question-answer generation module is also responsible for managing the entire question-answer interaction process, including the sorting of questions, the sorting of answers, and the coherence of the context. It ensures that users’ questions are answered effectively and coherently, and the question-answer generation module can continuously learn and improve by analyzing patient feedback and interaction results. It can optimize its own answer generation strategy through machine learning algorithms to improve long-term performance and accuracy.
[0056] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to replace some of the technical features therein. Any modification, replacement, and improvement made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A large language artificial intelligence model medical triage consultation system, comprising: Medical triage consultation system, used for structured processing of Chinese text data; The feature is that: the medical triage and consultation system comprises a structured data processing module, a structured data learning module and a question and answer generation module; The structured data processing module includes a Chinese language analysis submodule, a structured data extraction submodule, a structured data processing submodule and an information inference submodule; The Chinese language analysis submodule recognizes and filters the input text and inputs it into the structured data extraction submodule; The structured data extraction submodule is used to perform structured processing on a large amount of input text data, extract the patient's symptoms, age, gender, triage department and preliminary diagnosis result information from each text, store them one by one, perform preliminary screening on sensitive information such as the patient's name, ID number, and consultation time, form the correlation of the structured text, and input it into the structured data processing submodule and the information inference submodule; The structured data processing submodule pre-processes the input text and transmits it to the information inference submodule; The information inference submodule is used to analyze the transmitted text and construct the basic symptoms and corresponding descriptions, as well as the correlation between the department to be diagnosed and the preliminary diagnosis, to form a preliminary triage result and an auxiliary diagnosis result with an additional probability value.
2. According to the large language artificial intelligence model medical triage consultation system of claim 1, it is characterized by: The structured data learning module tokenizes the input text, and the vector formed after character-level segmentation is based on the existing vocabulary vocab of the BERT large model. The segmented characters are converted into ID representations according to their positions in the vocabulary, and the length of this vector is standardized, that is, more truncated and less padded, and then sent to the BERT model for training in batches. After the model returns the result, a fully connected layer is added and orthogonalization is performed. The index of the largest item in the obtained vector is the preliminary triage result, and the values of different items in the vector are the auxiliary diagnosis results with additional probability values.
3. According to the large language artificial intelligence model medical triage consultation system of claim 1, it is characterized by: The structured data processing submodule can integrate the patient's symptoms, medical history, diagnosis results and treatment amendments to cover various diseases and symptoms by using medical databases, medical image databases and publicly available medical data sets to divide the training set, validation set and test set in a ratio of 8:1:
1.
4. According to the large language artificial intelligence model medical triage consultation system of claim 1, it is characterized by: The structured data learning module includes an input submodule, a loading submodule, a fine-tuning training submodule and a text classification submodule; The input submodule is used to convert the input text and transmit it to the loading submodule; Load the submodule, use the BERTModel.from_pretrAIned function to import the pre-trained BERT-Base-Chinese model, load the model parameters locally, and initialize them; Fine-tuning training submodule, used to fine-tune and update the BERT model; The text classification submodule is used to test the test set divided by the structured data processing submodule and evaluate the model through accuracy and loss. It can also be used to input patient symptoms separately and call the BERT model for evaluation. The item with the largest median value in the vector returned by the BERT model is the corresponding predicted triage department.
5. A large language artificial intelligence model medical triage consultation system according to claim 4, characterized in that: The maximum length of the input submodule text is pad_size=50, and the vocabulary table uses vocab.txt provided by Google. The input text is converted into a token sequence, that is, a 1*50 matrix, and the insufficient part is filled with 0. For the mask vector of each text, it is set to 1 within the text length and set to 0 outside the text length.
6. A large language artificial intelligence model medical triage consultation system according to claim 4, characterized in that: When fine-tuning, the fine-tuning training submodule calls the fc function after the original output of the bent model to add a fully connected layer, so that it outputs a 1*X vector, where X is the number of departments to be triaged. The results are evaluated and output every 100 rounds. If the loss is smaller than the optimal case recorded previously, the model is updated. At the same time, if the loss on the validation set does not decrease for more than 1000 rounds, the training is terminated early.
7. According to the large language artificial intelligence model medical triage consultation system of claim 1, it is characterized by: The question and answer generation module includes a question and answer input submodule, a preprocessing submodule, a reply submodule and a storage submodule; The question-answer input submodule is used to obtain the symptom and medical history information data asked by the patient; The preprocessing submodule performs feature extraction and feature selection on the received information data; The reply submodule inputs the extracted feature text into the BERT model and generates corresponding diagnosis and treatment suggestions; The storage submodule is used to store and manage the generated diagnosis and treatment recommendations to ensure data security.
8. A large language artificial intelligence model medical triage consultation system according to claim 7, characterized in that: The question-and-answer input submodule obtains the symptom and medical history information data described by the patient through question interaction, voice interaction or image interaction, and saves it into the data record based on the information described by the patient.
Citation Information
Patent Citations
Diagnosis guide prompting method and system based on m-BERT pre-training model
CN115171870A
Auxiliary inquiry method and system based on medical entity extraction
CN117457237A
Question answering system and method based on vector and large language model
CN117493513A
Interrogation method and system based on knowledge graph and generative large model
CN117854748A
Eco-friendly Liquid Phase Snow Removal Agent with Suppressed Concrete Breakage
KR1020230106087A
Cited By
Inpatient medical risk analysis method and system and medium
CN119626557A
An artificial intelligence-based emergency patient triage system
CN119785996A
Privacy protection method and system for medical inquiry scene
CN120126820A
