Comprehensive disease prediction method and device, electronic equipment, storage medium and system
By introducing medical knowledge graphs into large language models and fine-tuning training with patient historical treatment data, the shortcomings of traditional disease prediction methods in data integration and complex disease prediction are solved, and higher accuracy disease prediction is achieved, supporting personalized medical care and early warning.
Patent Information
- Application Number
- CN202510153861.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional disease prediction methods are difficult to integrate multi-source heterogeneous data, and lack flexibility and generalization capabilities when dealing with complex disease associations and dynamically changing disease development.
A comprehensive disease prediction method based on large language models is adopted. By introducing medical knowledge graphs into large language models for pre-training, and fine-tuning training is carried out in combination with the patient's historical treatment data, a model that can predict diseases is generated, and real-time clinical data is used for prediction.
It improves the accuracy of disease prediction, especially in the prediction of complex diseases with multiple complications, breaks through the bottleneck of traditional prediction methods, provides more scientific and accurate support for medical decision-making, and helps achieve personalized medical care and early disease warning.
Smart Images

Figure CN119650088A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a comprehensive disease prediction method, device, electronic device, storage medium and system. Background Art
[0002] In the field of modern medicine, accurate prediction of diseases is of vital importance to improving medical quality, optimizing allocation of medical resources, and improving patient prognosis.
[0003] Traditional disease prediction methods often rely on limited clinical data indicators, such as patients' medical history, physiological examination results, etc., and are analyzed through statistical models or simple machine learning algorithms. However, these methods have many limitations. On the one hand, they are difficult to integrate multi-source heterogeneous data, including unstructured text data, such as patients' medical records, medical literature, clinicians' diagnosis and treatment notes, etc., which contain rich but under-explored information. On the other hand, traditional models lack flexibility and generalization ability when dealing with complex disease associations and dynamically changing disease development, and cannot fully consider the multiple influencing factors of the disease and their interactions. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a comprehensive disease prediction method, device, electronic device, storage medium and system based on a large language model to solve at least one problem existing in the background technology.
[0005] In a first aspect, an embodiment of the present application provides a comprehensive disease prediction method based on a large language model, the comprehensive disease prediction method comprising: Introduce the medical knowledge graph into the large language model, pre-train the large language model, and obtain the first target prediction model completed by pre-training; Obtain the patient's historical treatment data and its corresponding time information, filter and extract the data according to the information corresponding to the set disease to be predicted, and perform data preprocessing on the filtered data to obtain a training data set based on time series; Based on the training data set, fine-tuning the first target prediction model to obtain a second target prediction model; Obtain patients’ real-time clinical data; The real-time clinical data of the patient is input into the second target prediction model for reasoning to obtain a comprehensive disease prediction result.
[0006] In combination with the first aspect, in an optional implementation, The step of obtaining the patient's historical treatment data and its corresponding time information, and filtering and extracting the data according to the information corresponding to the set disease to be predicted, includes: The patient's historical treatment data and its corresponding time information are obtained from the medical database and / or electronic health record, and the patient's historical treatment data is screened and extracted according to the information corresponding to the set disease to be predicted; the screened and extracted content includes past medical history, vital signs indicators and medication data.
[0007] In combination with the first aspect, in an optional implementation, The data preprocessing includes at least one of the following: missing value processing; normalization processing; data format conversion.
[0008] In combination with the first aspect, in an optional implementation, The fine-tuning training uses at least one of a quantized low-rank adapter and parameter efficient fine-tuning.
[0009] In combination with the first aspect, in an optional implementation, the comprehensive disease prediction method further includes: According to the comprehensive disease prediction results, when the probability of occurrence of a set type of disease exceeds a threshold probability, a warning message is generated and output.
[0010] In a second aspect, an embodiment of the present application provides a disease comprehensive prediction device based on a large language model, the disease comprehensive prediction device comprising: A first processing module is used to introduce the medical knowledge graph into the large language model, pre-train the large language model, and obtain a first target prediction model that has been pre-trained; The second processing module is used to obtain the patient's historical treatment data and its corresponding time information, filter and extract the information corresponding to the set disease to be predicted, and perform data preprocessing on the filtered data to obtain a training data set based on the time series; A third processing module is used to fine-tune the first target prediction model based on the training data set to obtain a second target prediction model; The fourth processing module is used to obtain the patient's real-time clinical data; The fifth processing module is used to input the patient's real-time clinical data into the second target prediction model for reasoning, and predict the comprehensive disease prediction result.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: Collector, used to collect patients' real-time clinical data; A memory storing instructions and model parameters; and A processor is configured to execute the instructions to implement the comprehensive disease prediction method based on a large language model as described in the first aspect.
[0012] In a fourth aspect, an embodiment of the present application provides a storage medium, in which a computer program is stored. When the computer program is executed, the comprehensive disease prediction method based on the large language model as described in the first aspect can be implemented.
[0013] In a fifth aspect, an embodiment of the present application provides a disease comprehensive prediction system based on a large language model, the disease comprehensive prediction system comprising: A medical device comprising the electronic device as described in the third aspect; and The second terminal is used to obtain the warning information output by the medical device.
[0014] The beneficial effects brought about by the technical solution provided in the embodiments of the present application include: introducing the medical knowledge graph into the large language model, and integrating various knowledge such as clinical symptoms, diagnostic information, treatment process, disease epidemiological data, and the latest medical research results by pre-training a large amount of medical text data; and fine-tuning the model by historical treatment data of patients based on time series. The introduction of time series can improve the accuracy of disease prediction, and the large language model in the medical field is more suitable for the prediction of complex diseases with multiple complications, which provides a new opportunity to break through the bottleneck of traditional prediction methods, and provides more scientific and accurate support for medical decision-making, helping to achieve personalized medicine, early warning of diseases, and significant improvement in public health management levels, and promoting the medical industry to move towards intelligence and efficiency.
[0015] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below and in part will become apparent from the description below or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The drawings are not necessarily drawn to scale, and local features may be enlarged or reduced to more clearly show the details of the local features. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of an application environment of a comprehensive disease prediction method based on a large language model provided in an embodiment of the present application; Figure 2 A flowchart of a specific example of a comprehensive disease prediction method based on a large language model according to an embodiment of the present application; Figure 3 This is a confusion matrix diagram of the accuracy analysis results of Example 1 in the embodiment of the present application; Figure 4 This is a confusion matrix diagram of the accuracy analysis results of Example 2 in the embodiment of the present application; Figure 5 This is the AUC curve diagram of Example 2 in the embodiment of the present application; Figure 6 A schematic diagram of a principle block diagram of a specific example of a disease comprehensive prediction device based on a large language model according to an embodiment of the present application; Figure 7 A schematic diagram of a principle block diagram of a specific example of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the technical solutions and beneficial effects of the present application more obvious and easy to understand, the following is a detailed description by listing specific embodiments. The drawings are not necessarily drawn to scale, and local features may be enlarged or reduced to more clearly show the details of the local features; unless otherwise defined, the technical and scientific terms used herein have the same meanings as those in the technical field to which the present application belongs.
[0018] The embodiments of the present application are not exhaustive, but are only illustrative of some embodiments, and are not intended to be a specific limitation on the scope of protection of the present application. In the absence of contradiction, each step in a certain embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, in a certain embodiment, the solution after removing some steps can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment can be arbitrarily exchanged. In addition, the optional implementations in a certain embodiment can be arbitrarily combined; in addition, the embodiments can be arbitrarily combined, for example, some or all of the steps of different embodiments can be arbitrarily combined, and a certain embodiment can be arbitrarily combined with the optional implementations of other embodiments.
[0019] In each embodiment of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.
[0020] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0021] In the embodiments of the present application, unless otherwise specified, elements expressed in the singular form, such as "a", "an", "the", "above", "said", "aforementioned", "this", etc., may mean "one and only one", or "one or more", "at least one", etc. For example, when using articles such as "a", "an", "the" in English in translation, the noun after the article may be understood as a singular expression or a plural expression.
[0022] In the embodiments of the present application, "plurality" refers to two or more.
[0023] In some embodiments, the terms “at least one”, “one or more”, “a plurality of”, “multiple”, etc. can be used interchangeably.
[0024] The prefixes such as "first" and "second" in the embodiments of the present application are only used to distinguish different description objects, and do not constitute restrictions on the position, order, priority, value or content of the description objects. The statement of the description object refers to the description in the context of the claims or embodiments, and should not constitute unnecessary restrictions due to the use of prefixes. For example, the numerical value of the description object is not limited by the ordinal number, and can be one or more. Take "first device" as an example, where the numerical value of "device" can be one or more. In addition, the objects modified by different prefixes can be the same or different. For example, if the description object is "device", the "first device" and the "second device" can be the same device or different devices, and their types can be the same or different.
[0025] In some embodiments, the term "connection" may indicate that an electrical signal or data is transmitted between a connected end and a connected end, and may be understood as "electrical connection", "communication connection", etc. "Connection" may be a direct connection between two components, an indirect connection established through other components, internal communication between two components, or any other possible connection form.
[0026] This specification provides method operation steps such as embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device, system or server product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0027] Before introducing the technical solution of this application, the following first describes the relevant knowledge involved in the technical solution of this application: PyHealth: A Python library for simplifying healthcare data mining and machine learning tasks, including data loading, preprocessing, model training, and evaluation. Transformers: A deep learning architecture that is mainly based on the self-attention mechanism and can efficiently process sequence data (such as text, speech, etc.). It is widely used in the field of natural language processing (NLP) for tasks such as machine translation, text generation, and sentiment analysis. Large language models are mainly based on the Transformers architecture. LLaMA: A major large language model, trained with large amounts of text and other data, used for a variety of natural language processing tasks such as generating text, answering questions, and translating. QLoRA: A quantization technique for efficiently fine-tuning large language models on low-resource devices. By quantizing parameters, it can reduce memory usage while effectively maintaining model performance, and can train and optimize large language models under limited resources. PEFT: A parameter-efficient fine-tuning technique that can update only a small number of parameters when fine-tuning the model, optimizing the model on the set task with lower computational cost and storage requirements.
[0028] In the process of implementing this application, the inventor found that the related technology has the following problems: In the related technologies, the prediction of a certain disease mostly uses machine learning algorithms, such as random forest, decision tree, logistic regression, etc. However, this traditional disease prediction method using machine learning algorithms does not consider the sequence of medical events, so the prediction of disease development is disadvantageous in principle, resulting in low prediction accuracy.
[0029] In addition, in the field of natural language processing, large language models have powerful text understanding, generation and reasoning capabilities, can process massive amounts of text data, and mine deep semantic information and potential rules, so they are widely used in disease knowledge bases, disease question-answering systems, and other systems. In fact, large language models based on the Transformers architecture also have principle advantages in processing dynamic time-related data. Compared with single disease prediction in comprehensive prediction and comprehensive analysis, large language models have the advantage of being more suitable for complex general scenarios, but related technologies have ignored the construction of large language models in the medical field for comprehensive disease prediction.
[0030] To this end, the embodiment of the present application provides a comprehensive disease prediction method based on a large language model, which innovatively uses a large language model based on historical treatment data of a time series to achieve disease prediction. In principle, it is more suitable for the prediction of disease development and more suitable for the prediction of complex diseases with multiple complications, and can improve the accuracy of disease prediction.
[0031] Figure 1A schematic diagram of an application environment of a disease comprehensive prediction method based on a large language model provided in an embodiment of the present application is shown. As shown in the figure, the application environment at least includes a first terminal 100 and a second terminal 200.
[0032] The first terminal 100 can be used to obtain data collected by various types of objects (for example, applications, applications or mini-programs), and can process the collected data to predict the user's health risks and disease tendencies, identify disease types and stages, recommend and adjust personalized treatment plans, give rehabilitation advice and regular check-up reminders, etc.; and the first terminal 100 can also send this information to the second terminal 200 to present it to the user. The first terminal 100 can include wearable devices, such as at least one of mobile health monitoring devices such as smart bracelets, smart watches, smart glasses, smart clothes, and smart shoes; it can also include a medical device collection device integrated with a server, which can be a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0033] In an exemplary embodiment, the first terminal may include a collection device, which may be a medical device or a wearable device, for collecting patient data, including various vital signs; The first terminal may also include an electronic device (such as one including a processor, etc.) installed with an APP or software system, which is used to record patient data and embed an algorithm model.
[0034] In some examples, the acquisition device and the electronic device of the first terminal may be independently packaged devices, which may be connected via wired or wireless communication methods; or they may be integrated packaged devices, such as a medical device packaged with a matching AI software system, which may be configured according to actual needs.
[0035] The second terminal 200 may include, but is not limited to, electronic devices such as smart phones, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, smart wearable devices, vehicle-mounted terminals, smart TVs, and cameras; it may also be software running on the above electronic devices, such as applications, applications, applets, etc. The operating system running on the electronic device in the embodiment of the present application may include, but is not limited to, Android, IOS, Linux, Windows, etc.
[0036] In addition, it should be noted that Figure 1What is shown is only an application environment of the comprehensive disease prediction method based on a large language model. In actual applications, other application environments may also be included, for example, more terminals may be included.
[0037] In the embodiment of the present application, the first terminal 100 and the second terminal 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the present application.
[0038] Figure 2 A flowchart of a specific example of a comprehensive disease prediction method based on a large language model in an embodiment of the present application is shown. As shown in the figure, the comprehensive disease prediction method includes: S10: Introduce the medical knowledge graph into the large language model, pre-train the large language model, and obtain the first target prediction model completed by pre-training; The construction of the medical knowledge graph relies on a large amount of medical literature, such as medical journal articles, textbooks, clinical guidelines, etc. These documents provide scientifically verified and professionally recognized medical knowledge. Or clinical case data is also one of the important sources for the construction of the medical knowledge graph. Through the case analysis of a large number of real patients, practical experience knowledge such as the clinical manifestations, diagnostic methods, and treatment effects of the disease can be summarized. Or the construction of the medical knowledge graph will also rely on medical databases, such as drug databases, disease databases, medical imaging databases, etc., which integrate the medical information of the system, thereby facilitating the construction and updating of the medical knowledge graph. It should be understood that the specific method used to construct the medical knowledge graph can be set according to actual needs with reference to relevant technologies. These specific methods themselves are not the invention points of this application, and this application will not be introduced in detail.
[0039] In the original large language model, data corresponding to at least one of the above-mentioned medical literature, clinical medical record data, medical database, etc. is input and fine-tuned to obtain a large language model in the medical field. It should be understood that the specific method of the above-mentioned fine-tuning can be set according to actual needs with reference to relevant technologies, such as fine-tuning using methods such as QLoRA and PEFT, which is not the invention point of this application and will not be introduced in detail in this application.
[0040] S20: Obtain the patient's historical treatment data and its corresponding time information, filter and extract the data according to the information corresponding to the set disease to be predicted, and perform data preprocessing on the filtered data to obtain a training data set based on the time series; S30: Based on the training data set, fine-tune the first target prediction model to obtain a second target prediction model; S40: Obtain patients’ real-time clinical data; S50: Inputting the patient's real-time clinical data into the second target prediction model for reasoning, and predicting a comprehensive disease prediction result.
[0041] In this way, the embodiment of the present application introduces the medical knowledge graph into the large language model. By pre-training a large amount of medical text data, it can integrate various knowledge such as clinical symptoms, diagnostic information, treatment process, disease epidemiological data, and the latest medical research results; and by fine-tuning the model based on the patient's historical treatment data based on time series, the introduction of time series can improve the accuracy of disease prediction, and the large language model in the medical field is more suitable for the prediction of complex diseases with multiple complications, which provides a new opportunity to break through the bottleneck of traditional prediction methods, and provide more scientific and accurate support for medical decision-making, helping to achieve personalized medicine, early disease warning and significant improvement in public health management level, and promoting the medical industry to move towards intelligence and efficiency.
[0042] In the embodiments of the present application, historical treatment data may be referred to by different names, such as electronic health records, medical records, electronic medical records, medical monitoring data, etc., and the names are not limited here. Historical treatment data may include pharmacy, clinical and microbiology laboratories, admission and billing information from affiliated patient care locations.
[0043] The time information corresponding to the historical treatment data may include at least one of the admission time, discharge time, test time, diagnosis time, stay time, etc. Then, all admissions, medication orders and dispensing, laboratory orders, and samples are marked with dates and times, providing a time relationship between treatment patterns and clinical information.
[0044] The information corresponding to the set disease to be predicted may include content related to the disease to be predicted, etc.
[0045] In an optional implementation, the step of obtaining the patient's historical treatment data and its corresponding time information in step S20, and filtering and extracting the information corresponding to the set disease to be predicted, includes: S211: Obtain the patient's historical treatment data and its corresponding time information from the medical database and / or electronic health record, and screen and extract the patient's historical treatment data based on the information corresponding to the set disease to be predicted; the screened and extracted content includes past medical history, vital signs indicators and medication data.
[0046] Among them, the medical database can use publicly available databases at home and abroad, such as eICU-CRD (EICUCollaborative Research Database, a multi-center intensive care unit (ICU) database), MIMIC-IV (Medical Information Mart for Intensive Care IV, critical care medicine database), etc.
[0047] In an optional implementation manner, the step of obtaining the patient's historical treatment data and its corresponding time information in step S20 includes: S221: Integrate scattered target data to obtain an electronic health record (EHR); the target data comes from at least one of the following: a hospital information system (HIS); an electronic medical record (EMR); a laboratory information management system (LIMS); S222: Obtain historical treatment data and its corresponding time information from the electronic health record.
[0048] Among them, the scattered target data can be in the hospital's internal information system, integrating the hospital's internal information system data, including the hospital information system (HIS), electronic medical record (EMR) and laboratory information management system (LIMS), and organizing these scattered data into a unified electronic health record (EHR).
[0049] In this way, the embodiment of the present application realizes that the hospital information system, electronic medical records and laboratory information management system are integrated into an automatic data collection system. The collected data covers time information and is used for large language model training after data preprocessing. Note that our prediction is mainly based on time sequence, so the above data collection needs to cover time information.
[0050] In an optional implementation, the data preprocessing in step S20 includes at least one of the following: missing value processing; normalization processing; data format conversion.
[0051] Among them, the missing value processing includes: using statistical methods or filling strategies based on data distribution characteristics to process missing values in the data, ensure the integrity and continuity of the data, and avoid model training deviation or inaccuracy due to missing data.
[0052] In an exemplary embodiment, missing value processing may include the following two methods: a sample-based random filling method and a normal distribution filling method.
[0053] Among them, sample-based random filling methods can include: The random filling method of samples is used for categorical or discrete data, and the formula is: X i,new= samle{X1,X2…X i} Where X i,new For each missing value X i Filled data, {X1,X2…X i} is data without missing values. The sample function is used to select any number from the data set.
[0054] Sample-based normal distribution filling methods can include: The normal distribution filling method is used for numerical data, and the formula is: X i,new = μ + δ×N(0,1) Where X i,new For each missing value X i The filled data, μ is the mean of all data including missing values, δ is the standard deviation of all data including missing values, and N(0,1) represents the standard normal distribution random number.
[0055] In an exemplary embodiment, the normalization process includes: minimum-maximum normalization, the formula of which is:
[0056] Where X i is the original data, X min is the minimum value in the data set, X max is the maximum value in the data set, X i+1 It is the normalized data, and its value range is between [0,1].
[0057] The data format conversion includes: arranging the data after data preprocessing into a standardized code format to facilitate data storage, transmission and subsequent model training, and to facilitate computer processing and model recognition.
[0058] Among them, data preprocessing can be performed on descriptive information such as drugs and diagnoses in the original data. Tools such as PyHealth (a deep learning toolkit for building medical AI applications) can be used for data preprocessing to convert it into standardized codes, such as JSON, CSV and other formats.
[0059] In an optional implementation, the step S20 of screening and extracting information corresponding to the set disease to be predicted further includes: S231: using a linear regression algorithm to sort the correlation between the set diseases to be predicted and the patient data content, thereby screening out the influencing factors in the patient data content that are more correlated with the results, thereby eliminating weakly correlated data content; and / or S232: Filter the historical treatment data according to the time information corresponding to the patient's historical treatment data to obtain a training data set based on the time series.
[0060] In an exemplary embodiment, step S232 includes: S2321: Obtaining the amount of time information corresponding to historical treatment data for a patient; S2322: Eliminate all data of patients whose number is less than the threshold number from the historical treatment data to obtain a training data set based on time series.
[0061] The threshold number can be set according to actual needs, for example, it can be 1, 2, 3, etc. In an exemplary embodiment, if the number of time information corresponding to the historical treatment data for a patient is equal to 1, it may mean that the patient may have only visited the doctor once, so the historical treatment data without time series needs to be eliminated.
[0062] In this way, by screening the patient's historical treatment data and eliminating those patient data that cannot constitute a valid time series, because such data lack sufficient time series information and are difficult to use for time series-based disease prediction model training, the accuracy of disease prediction can be improved.
[0063] In an optional implementation, the time series-based training data set includes a training set, a validation set, and a test set.
[0064] In an embodiment of the present application, a time series-based training data set can be divided into a training set, a validation set, and a test set according to a set ratio. For example, the training set, validation set, and test set can be divided in a ratio of 7:1:2. The training set can be used for model parameter learning and optimization; the validation set can be used to evaluate the performance of the model and adjust the model hyperparameters during the training process. Model hyperparameters (Hyperparameter) refer to parameters set by the developer before machine learning or deep learning model training, and these parameters remain unchanged during the training process. Unlike model parameters, model parameters are learned through training data, while hyperparameters need to be manually set by the developer; the test set can be used to ultimately evaluate the generalization ability and accuracy of the model on unseen data.
[0065] In an optional implementation, an open source LLaMA3.1-8B large language model is selected, and an external independent medical knowledge graph is introduced into the selected large language model as supplementary medical data to perform model pre-training to obtain a pre-trained first target prediction model, namely, a large language model in the medical field.
[0066] For a patient , Indicates the patient's unique identification code; Indicates different test items for patients, Indicates the number of diagnosis or time information, is a natural number greater than or equal to 1, Indicates the number of target diseases; Indicates the historical treatment data or examination data of the patient's corresponding test item, Indicates patient No. The probability of occurrence of a target disease; then the patient of The historical treatment data or examination data is , and its corresponding historical diagnosis results can be .
[0067] in, To input the training data set, is the output training data set corresponding to the input training data set. , substitute it into the first target prediction model for fine-tuning, and obtain the second target prediction model, that is, the disease comprehensive prediction language model. The fine-tuned prediction model is used for patients No. Real-time collection of treatment data Or check the data and input it into the second target prediction model to predict the current (or next) The comprehensive probability of disease occurrence among the target diseases is .
[0068] In an optional implementation, the large language model includes a BERT, GPT or LLaMA model.
[0069] Traditional models such as logistic regression and random forests do not consider the order of medical events, while large language models based on modern event sequence prediction models such as RNNs or Transformers are more suitable for unsupervised learning scenarios such as family doctors, and can complete the prediction of disease development based on time sequence.
[0070] In the embodiment of the present application, an external independent medical knowledge graph is introduced into the selected large language model as supplementary medical data, and the medical knowledge graph in the model can call external independent data. The medical knowledge graph can be separated from the algorithm architecture and can be updated in real time according to the latest medical guidelines or other relevant industry information. The medical knowledge graph contains rich structured knowledge such as medical concepts, disease relationships, and treatment methods, which can enhance the model's understanding and application of medical field knowledge.
[0071] In an optional implementation, the fine-tuning training in step S30 uses at least one of Quantized Low Rank Adapter (QLoRA) and Parameter Efficient Fine-tuning (PEFT).
[0072] Among them, for specific clinical prediction tasks, methods such as QLoRA and PEFT are used to fine-tune the large language model. These methods can perform quantization operations while reducing the number of model parameter adjustments, effectively optimize the training efficiency of the model, avoid the consumption of computing resources and overfitting risks caused by large-scale parameter updates, enable the model to better adapt to specific disease prediction task requirements, and improve the accuracy and practicality of the model in the medical field.
[0073] In an optional implementation, after the prediction model is trained, it can be integrated into medical equipment or medical information systems to collect patient test data in real time, thereby realizing real-time collection and processing of patient test data. The algorithm model can also be used to infer the probability of a patient developing a disease during treatment or after treatment at the current stage, thereby providing early warning and medical intervention.
[0074] In an exemplary embodiment, the patient's real-time clinical data can be clinical diagnosis result data, thereby predicting a comprehensive disease prediction result; or, it can be real-time health data of the patient collected through wearable devices and / or mobile health applications during the treatment execution phase after a personalized treatment plan is recommended through a deep learning model based on the comprehensive disease prediction result; or, it can be real-time monitoring data that continues to track the patient's recovery status after the treatment is completed; and so on.
[0075] In an optional implementation, the step S50 of inputting the patient's real-time clinical data into the second target prediction model for inference to obtain a comprehensive disease prediction result includes: S511: Input the patient's real-time clinical data into the second target prediction model for inference to obtain comprehensive disease occurrence probabilities of multiple set diseases, so as to obtain comprehensive disease prediction results based on the comprehensive disease occurrence probabilities.
[0076] In this way, patients’ diseases can be predicted in real time. When the patient’s test data is input into the prediction model, the model’s real-time reasoning can calculate the probability of the patient developing various diseases during the treatment process or after the current stage of treatment is completed, thereby achieving the prediction of disease development and the prediction of complex diseases with multiple complications, which can improve the accuracy of disease prediction.
[0077] In an optional embodiment, the comprehensive disease prediction method further includes: S60: Based on the comprehensive disease prediction result, when the probability of occurrence of a set type of disease exceeds a threshold probability, generate and output warning information.
[0078] In this way, intervention can be carried out based on real-time prediction of the patient's disease and online monitoring can be achieved. For example, once the prediction results show that the probability of a certain disease exceeds the set threshold probability, an early warning message will be issued in time, which can remind medical personnel to take corresponding medical intervention measures, such as adjusting the treatment plan, conducting further examinations or carrying out preventive treatment, etc., so as to achieve early warning and active intervention of the disease, improve the quality and effect of medical services, and reduce disease risks and medical costs.
[0079] Several specific examples of comprehensive disease prediction based on the large language model according to the embodiment of the present application are given below.
[0080] Example 1 Assume that there are 2351 patients in the original disease prediction data, among which the data of the first 5 patients and the comprehensive disease prediction results are shown in Table 1 below: Table 1
[0081] In Table 1, each column is a patient data. The first row to the twenty-fourth row represent the patient indicators after desensitization, including 24 items such as glucose, cholesterol, hemoglobin, etc. The last row represents the comprehensive prediction result of the disease.
[0082] For this data set, the training set and validation set are divided into 8:2, and the validation set contains 471 patient data. There are 5 prediction results: healthy, anemia, diabetes, thalassemia, and thrombosis.
[0083] The accuracy of the above prediction results is analyzed. Figure 3 The confusion matrix diagram of the accuracy analysis result of Example 1 in the embodiment of the present application is shown. As shown in the figure, the accuracy analysis result is: accuracy: 100%; precision: 100%; recall: 100%; harmonic mean of precision and recall (used to comprehensively evaluate the performance of the model): 100%. Therefore, it is verified that the introduction of medical knowledge graph into the large language model has resulted in a large language model in the medical field that is suitable for the prediction of complex diseases with multiple complications, which improves the prediction accuracy.
[0084] Example 2 Assume that there are 2099 patients in the original disease prediction data, and the data of the first 5 patients are shown in Table 2 below: Table 2
[0085] In Table 2, each column is a patient data, and each patient data mainly includes 4 parts, namely patient information, long-term blood pressure monitoring, physiological indicators before hemodialysis, and physiological indicators after hemodialysis. The information items in these parts can be set according to actual needs. Among them, blood pressure can be monitored every day according to the time series, and the other indicators can be monitored at two time points before the operation (before hemodialysis) and after the operation (after hemodialysis). The embodiment of the present application constructs a data set based on more than 100 information items. The last 6 rows and columns represent the results of the occurrence of comprehensive diseases.
[0086] For this data set, the training set: validation set = 8:2 is divided, and the validation set contains 420 patient data. There are 6 prediction results: anemia, hypotension, hypertension, arrhythmia, heart failure, and cerebrovascular disease. Therefore, 6 diseases are predicted for each patient data, 420×6=2520.
[0087] The accuracy of the above prediction results is analyzed. Figure 4 The confusion matrix diagram of the accuracy analysis result of Example 2 in the embodiment of the present application is shown. As shown in the figure, the number of accurate prediction results is 2437+72=2509, and the accuracy analysis results are: accuracy: 99.56%; precision: 96%; recall: 90%; harmonic mean of precision and recall: 92.9%. A more detailed classification report is shown in Table 3 below, where the prediction of disease is positive and the prediction of no disease is negative.
[0088] Table 3
[0089] Figure 5 The AUC curve graph of Example 2 in the embodiment of the present application is shown. As shown in the figure, AUC (Area Under Curve) is defined as the area under the ROC curve and the coordinate axis. Obviously, the value of this area will not be greater than 1. Since the ROC curve is generally above the straight line y=x, the value range of AUC is between 0.5 and 1. The closer the AUC is to 1.0, the higher the authenticity of the detection method; when it is equal to 0.5, the authenticity is the lowest and has no application value. It can be seen that the various indicator data of the accuracy analysis results have verified the accuracy of disease prediction, so that according to the data set based on time series, the large language model based on the medical field is suitable for the prediction of complex diseases with multiple complications, which improves the prediction accuracy and can accurately predict the development of the disease.
[0090] The following describes the device, electronic device, storage medium, etc. used to execute the comprehensive disease prediction method based on a large language model provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0091] The present application also provides a disease comprehensive prediction device based on a large language model. Figure 6 A schematic diagram of a principle block diagram of a specific example of a disease comprehensive prediction device based on a large language model in an embodiment of the present application is shown. As shown in the figure, the disease comprehensive prediction device includes: The first processing module 10 is used to introduce the medical knowledge graph into the large language model, pre-train the large language model, and obtain a pre-trained first target prediction model; The second processing module 20 is used to obtain the patient's historical treatment data and its corresponding time information, filter and extract the information corresponding to the set disease to be predicted, and perform data preprocessing on the filtered data to obtain a training data set based on the time series; A third processing module 30 is used to fine-tune the first target prediction model based on the training data set to obtain a second target prediction model; The fourth processing module 40 is used to obtain the patient's real-time clinical data; The fifth processing module 50 is used to input the real-time clinical data of the patient into the second target prediction model for reasoning, and predict the comprehensive disease prediction result.
[0092] In an optional embodiment, the comprehensive disease prediction device further comprises: The sixth processing module is used to generate and output warning information according to the comprehensive disease prediction result when the probability of occurrence of a set type of disease exceeds a threshold probability.
[0093] Regarding the above-mentioned device embodiment, the specific manner in which each module performs operations can refer to the corresponding description in the above-mentioned method embodiment, and will not be elaborated here.
[0094] It should be understood that the division of the units or modules in the above devices is only a division of logical functions, and in actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. In addition, the units or modules in the device can be implemented in the form of a processor calling software: for example, the device includes a processor, the processor is connected to a memory, the memory stores instructions, and the processor calls the instructions stored in the memory to implement any of the above methods or implement the functions of the units or modules of the above devices.
[0095] The embodiment of the present application also provides an electronic device, Figure 7 A schematic diagram of a principle block diagram of a specific example of an electronic device according to an embodiment of the present application is shown. As shown in the figure, the electronic device includes: Collector, used to collect patients' real-time clinical data; A memory storing instructions and model parameters; and A processor is configured to execute the instructions to implement the comprehensive disease prediction method based on a large language model as described in the above embodiment.
[0096] In this exemplary embodiment, the model parameters may include the number of model layers, the number of hidden units, the number of attention heads, the learning rate, etc. of the second target prediction model after training.
[0097] like Figure 7 As shown, the electronic device may include a processor, a memory, a network interface, a display, and an input device connected via a system bus. The processor may be used to provide computing and control capabilities. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium may store an operating system and a computer program. The internal memory may provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface may be used to communicate with an external terminal via a network connection. The display may be a liquid crystal display or an electronic ink display. The input device may be a touch layer covered on the display, or a button, trackball, or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse, etc.
[0098] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0099] The present application also provides a computer-readable storage medium in which a computer program is stored. When the computer program is executed, the corresponding functions described in the above method embodiment can be implemented. The computer program can also be stored in a computer-readable storage medium such as Figure 7 The memory of the electronic device contains various program modules constituting the above-mentioned device for comprehensive disease prediction based on a large language model, and the computer program composed of the various program modules can realize the functions corresponding to the various steps in the method for comprehensive disease prediction based on a large language model described in the above-mentioned embodiment when executed.
[0100] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the comprehensive disease prediction method based on the large language model provided in the above various implementations.
[0101] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. Among them, any reference to memory, storage, database or other medium used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0102] The embodiment of the present application also provides a comprehensive disease prediction system based on a large language model, which can be an online monitoring and early warning system that integrates the prediction model into medical equipment. Figure 1 , the comprehensive disease prediction system comprises: A medical device, comprising the electronic device as described in the above embodiment; and The second terminal 200 is used to obtain the warning information output by the medical device.
[0103] Among them, medical equipment can collect and process patients' test data in real time, and may include collection equipment such as medical instruments, as well as wearable devices, medical information systems and other computer systems.
[0104] The second terminal 200 can be used to timely check warning information, such as disease information including disease probability exceeding a threshold probability, rehabilitation suggestions, and regular check-up reminders, so as to help patients understand their current health status in a timely manner or adjust treatment plans in a timely manner.
[0105] In this way, by analyzing the collected test data, the patient's health risks and disease tendencies can be predicted; for patients who have already shown certain symptoms, early diagnosis can be performed to identify the type and stage of the disease. According to the diagnosis results, combined with medical guidelines and historical treatment data, the large language model is used to predict the development of the disease, so that personalized treatment plans can be recommended. In the treatment execution stage, the patient's real-time health data can be collected, the treatment effect and patient status can be monitored, and the real-time health data can be analyzed in real time by the system to adjust the treatment plan. After the treatment is completed, the patient's recovery can be tracked, and rehabilitation suggestions and regular check-up reminders can be sent to the patient in a timely manner for further examination or preventive treatment, etc., so as to achieve early warning and active intervention of the disease, improve the quality and effect of medical services, and reduce disease risks and medical costs.
[0106] It should be understood that the above embodiments are exemplary and are not intended to include all possible implementations included in the claims. Various modifications and changes may be made on the basis of the above embodiments without departing from the scope of the present disclosure. Similarly, the various technical features of the above embodiments may be arbitrarily combined to form other embodiments of the present application that may not be explicitly described. Therefore, the above embodiments only express several implementations of the present application and do not limit the scope of protection of the patent of this application.
Claims
1. A comprehensive disease prediction method based on a large language model, characterized in that: The comprehensive disease prediction method comprises: Introduce the medical knowledge graph into the large language model, pre-train the large language model, and obtain the first target prediction model completed by pre-training; Obtain the patient's historical treatment data and its corresponding time information, filter and extract the data according to the information corresponding to the set disease to be predicted, and perform data preprocessing on the filtered data to obtain a training data set based on time series; Based on the training data set, fine-tuning the first target prediction model to obtain a second target prediction model; Obtain patients’ real-time clinical data; The real-time clinical data of the patient is input into the second target prediction model for reasoning to obtain a comprehensive disease prediction result.
2. The comprehensive disease prediction method according to claim 1, characterized in that: The step of obtaining the patient's historical treatment data and its corresponding time information, and filtering and extracting the data according to the information corresponding to the set disease to be predicted, includes: The patient's historical treatment data and its corresponding time information are obtained from the medical database and / or electronic health record, and the patient's historical treatment data is screened and extracted according to the information corresponding to the set disease to be predicted; the screened and extracted content includes past medical history, vital signs indicators and medication data.
3. The comprehensive disease prediction method according to claim 1, characterized in that: The data preprocessing includes at least one of the following: missing value processing; normalization processing; data format conversion.
4. The comprehensive disease prediction method according to claim 1, characterized in that: The fine-tuning training uses at least one of a quantized low-rank adapter and parameter efficient fine-tuning.
5. The comprehensive disease prediction method according to any one of claims 1 to 4, characterized in that: The comprehensive disease prediction method also includes: According to the comprehensive disease prediction results, when the probability of occurrence of a set type of disease exceeds a threshold probability, a warning message is generated and output.
6. A disease comprehensive prediction device based on a large language model, characterized in that: The disease comprehensive prediction device comprises: A first processing module is used to introduce the medical knowledge graph into the large language model, pre-train the large language model, and obtain a first target prediction model that has been pre-trained; The second processing module is used to obtain the patient's historical treatment data and its corresponding time information, filter and extract the information corresponding to the set disease to be predicted, and perform data preprocessing on the filtered data to obtain a training data set based on the time series; A third processing module is used to fine-tune the first target prediction model based on the training data set to obtain a second target prediction model; The fourth processing module is used to obtain the patient's real-time clinical data; The fifth processing module is used to input the patient's real-time clinical data into the second target prediction model for reasoning, and predict the comprehensive disease prediction result.
7. An electronic device, characterized in that: The electronic device comprises: Collector, used to collect patients' real-time clinical data; A memory storing instructions and model parameters; and A processor configured to execute the instructions to implement the comprehensive disease prediction method based on a large language model as described in any one of claims 1-5.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed, can implement the comprehensive disease prediction method based on a large language model as described in any one of claims 1 to 5.
9. A comprehensive disease prediction system based on a large language model, characterized in that: The comprehensive disease prediction system comprises: A medical device comprising the electronic device as claimed in claim 7; and The second terminal is used to obtain the warning information output by the medical device.
Citation Information
Patent Citations
Method and device for generating training sample of large language model
CN119202711A
Decision tree generation method based on large language model and related equipment
CN119227784A
Ophthalmic disease intelligent pre-diagnosis system and method based on big data recognition
CN119361133A
Cited By
Chronic heart failure prediction model construction method and device, equipment and storage medium
CN120809256A
Methods, devices, equipment and storage media for constructing predictive models for chronic heart failure
CN120809256B