Method and device for realizing blood demand prediction based on AI large model
By dividing blood demand prediction into two stages—classification and regression—and using a large AI model and a lightweight gradient boosting machine algorithm, the problem of limited prediction accuracy in traditional systems is solved, achieving higher prediction accuracy and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING DRUM TOWER HOSPITAL
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-08
AI Technical Summary
Existing blood demand prediction systems based on medical expert knowledge cannot learn and optimize themselves, resulting in limited prediction accuracy and difficulty in adapting to complex and ever-changing clinical realities.
The AI large model decomposes blood demand prediction into two stages: classification and regression tasks. A lightweight gradient booster algorithm is used to build a classification model to determine whether blood transfusion is needed, and a regression model is used to predict the amount of blood transfusion. The trained model can learn from massive historical data and dynamically adapt to clinical practice.
It significantly improved the accuracy of blood usage prediction, reduced the mean absolute error, decreased misjudgment of patients who do not need blood transfusions and waste of resources, and enhanced the model's generalization ability and adaptability.
Smart Images

Figure CN121997172A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for predicting blood demand based on AI large models. Background Technology
[0002] Blood transfusion is an important treatment method in clinical medicine. Accurately predicting the amount of blood a patient needs to transfuse is of great significance for the rational allocation of blood resources, reducing medical costs, and improving treatment outcomes.
[0003] Currently, blood demand prediction is mainly achieved using expert systems or rule-driven systems (collectively referred to as predefined rule-based systems) built upon the knowledge of medical experts. These systems judge and predict patients' blood demand by pre-setting a series of rules and thresholds derived from clinical experience. For example, when a patient's hemoglobin level is below a certain fixed value, a blood transfusion is deemed necessary. However, the predefined rules upon which these systems rely are relatively rigid and cannot learn and optimize themselves from continuously accumulated clinical data. Consequently, their predictive accuracy is limited by the initially set expert knowledge, and they struggle to adapt to complex and ever-changing clinical realities.
[0004] Therefore, there is an urgent need for a solution that can accurately predict blood demand. Summary of the Invention
[0005] This application provides a method and apparatus for predicting blood demand based on a large AI model, which can overcome the problems of limited accuracy and poor adaptability caused by the rigid rules and inability to self-evolve in traditional expert systems, thereby accurately predicting blood demand.
[0006] Firstly, a method for predicting blood demand based on a large AI model is provided, including: Obtain characteristic data related to the blood use needs of the patients to be predicted; Determine whether the patient to be predicted needs a blood transfusion based on characteristic data; If it is determined that a patient needs a blood transfusion, the predicted blood usage for the patient is determined based on the trained prediction model. If it is determined that the patient to be predicted does not need a blood transfusion, the predicted blood usage for the patient is set to zero.
[0007] In one feasible design, the prediction model is a regression model employing a lightweight gradient boosting machine algorithm, and the method also includes: The first dataset is constructed based on the characteristic data of multiple patients with historical blood transfusion volumes greater than zero and their corresponding actual blood usage. The characteristic data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information. Among them, basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. Based on the first dataset, the initial prediction model was trained with the actual blood usage as the prediction target, resulting in a trained prediction model.
[0008] In one feasible design, determining whether a patient needs a blood transfusion based on characteristic data includes: Based on the trained classification model, predictions are made according to feature data to determine whether the patient to be predicted needs a blood transfusion.
[0009] In one feasible design, the classification model employs a lightweight gradient boosting machine algorithm, and the method also includes: A second dataset is constructed based on the feature data of multiple historical patients and the binary classification label of whether each patient needs a blood transfusion. The feature data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information. Among them, basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. Based on the second dataset, the initial classification model is trained using the corresponding binary classification labels as the training target to obtain a trained classification model.
[0010] In one feasible design, the method includes the following steps before acquiring the characteristic data related to the blood use needs of the patient to be predicted: Receive natural language query information input by the user; The system uses a large language model to parse natural language query information and obtain the user's intent. If the intention is to obtain the predicted blood usage of a patient to be predicted, the system determines whether the natural language query information contains the identity identifier of the patient to be predicted based on the large language model. If the natural language query information contains the identity identifier of the patient to be predicted, the feature data related to the blood use needs of the patient to be predicted are obtained based on the identity identifier parsed from the large language model.
[0011] In a feasible design, the method also includes: If the natural language query information does not contain the identity identifier of the patient to be predicted, the system determines whether the natural language query information contains the feature data of the patient to be predicted based on the large language model. If the natural language query information does not contain the feature data of the patient to be predicted, the system interacts with the user based on the large language model until the identity identifier or feature data of the patient to be predicted is obtained. If the natural language query information contains feature data of the patient to be predicted, based on the large language model, determine whether the feature data of the patient to be predicted meets the preset conditions for subsequent processing. If the characteristic data of the patient to be predicted meets the preset conditions, subsequent processing is carried out based on the characteristic data of the patient to be predicted. Otherwise, the system interacts with the user based on a large language model until feature data that meets the preset conditions is obtained.
[0012] In one feasible design, the blood use-related feature data of the patient to be predicted is obtained based on the identity identifier parsed from the large language model, including: Based on the model context protocol, the identity identifier of the patient to be predicted is obtained from the parsing of the large language model; By calling the data completion interface, the feature data corresponding to the identity identifier of the patient to be predicted can be obtained.
[0013] In one feasible design, before constructing a second dataset based on the feature data of multiple historical patients and the binary classification labels of whether each patient needs a blood transfusion, the method also includes: If multiple missing feature data with missing field content are identified in the feature data of multiple patients in history, a portion of the missing feature data is filled in, while the missing markers in another portion of the missing feature data are retained without filling.
[0014] In one feasible design, before constructing a second dataset based on the feature data of multiple historical patients and the binary classification labels of whether each patient needs a blood transfusion, the method also includes: The importance of each type of feature in the feature data is evaluated using the Shapley additive interpretation method, and a quantitative value of the importance of each type of feature is obtained. Delete the data corresponding to features whose quantization value is lower than a preset threshold from the feature data.
[0015] Secondly, a device for predicting blood demand based on an AI large model is provided, including a blood usage prediction module, which includes a feature data acquisition submodule, a classification submodule and a blood usage prediction submodule. The feature data acquisition submodule is used to acquire feature data related to the blood use needs of the patient to be predicted; The classification submodule is used to determine whether a patient to be predicted needs a blood transfusion based on feature data; The blood volume prediction submodule is used to determine the predicted blood volume of a patient based on a trained prediction model if it is determined that the patient needs a blood transfusion. The blood volume prediction submodule is also used to determine the predicted blood volume of a patient as zero if it is determined that the patient does not need a blood transfusion.
[0016] This application's embodiments determine blood usage based on a predictive model. The core decision-making logic does not rely on statically set expert rules, but rather on a well-trained predictive model capable of automatically learning and mining complex nonlinear relationships from massive amounts of historical clinical data. This solution can continuously optimize its internal parameters by absorbing new clinical data to retrain the predictive model, thereby dynamically adapting to complex situations and new treatment models in clinical practice. Ultimately, it overcomes the limitations in accuracy and adaptability caused by the rigidity of rules and the inability to self-evolve in traditional expert systems.
[0017] Furthermore, after acquiring the characteristic data of the patient to be predicted, the proposed solution first determines whether the patient needs a blood transfusion. If so, the trained prediction model is used to determine the amount of blood needed; otherwise, the amount of blood needed is directly determined to be zero. This decomposes blood demand prediction into two independent stages: classification and regression. This phased processing mechanism effectively solves the problem of large errors caused by a single model simultaneously handling the classification task (whether a blood transfusion is needed) and the regression task (how much blood is needed) in blood demand prediction. It also avoids data imbalance caused by interference from a large number of zero-transfusion samples during the model training stage. Therefore, it effectively improves the accuracy of the overall solution in predicting blood demand and avoids misjudgment of patients who do not need blood transfusions and waste of resources. Attached Figure Description
[0018] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the structure of an apparatus for predicting blood demand based on an AI large model, provided in an exemplary embodiment of this application. Figure 2 This is a schematic flowchart illustrating an exemplary embodiment of a method for predicting blood demand based on an AI large model provided in this application; Figure 3 This is a schematic flowchart illustrating yet another example of a method for predicting blood demand based on an AI large model, provided by an exemplary embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] Currently, besides using expert systems or rule-driven systems built upon medical expert knowledge for blood demand prediction, with the development of machine learning technology, more and more research is applying artificial intelligence to the field of medical prediction. However, the commonly used method for predicting blood transfusion volume is based on a single machine learning model. This method directly uses the patient's basic information and examination data to train the model to predict blood transfusion volume. This application, through in-depth research, has discovered the following shortcomings in this method: 1) The model did not take into account the fact that a large number of patients do not actually need blood transfusions, resulting in a large error in predicting zero blood transfusion volume; 2) Failure to recognize that a single model cannot simultaneously handle two different types of problems, namely classification (whether a blood transfusion is needed) and regression (how much blood transfusion is needed), resulting in limited prediction accuracy; 3) Improper handling of imbalanced data distribution can affect the model's generalization ability. For example, when the proportion of data that need transfusion (i.e., positive samples) to data that do not need transfusion (i.e., negative samples) in the dataset is severely imbalanced (e.g., negative samples account for more than 70%), a single model is prone to overfitting the large number of negative samples, resulting in a decrease in the ability to identify the small number of positive samples.
[0022] Based on the above research, this application proposes the following inventive concept: Blood usage prediction is divided into two stages: the first stage is a classification task to determine whether a patient needs a blood transfusion; the second stage is a regression task to use a regression model to predict the specific amount of blood needed for patients who need a blood transfusion.
[0023] This invention employs a two-stage design to optimize both the classification and regression tasks, effectively improving the accuracy of the regression model in predicting blood usage while avoiding interference from zero transfusion samples. Compared to single-model methods, this method significantly reduces the mean absolute error in blood usage prediction. During version iterations, the prediction error for red blood cell transfusions can be reduced by 10%-18%, cryoprecipitate transfusions by 10%-19%, and plasma transfusions by 10%-22%.
[0024] Furthermore, because the training of the regression model effectively screens out samples of patients who truly need blood transfusions in the first stage, it avoids interference from a large number of zero-transfusion samples, thus improving the generalization ability of the regression model.
[0025] Based on the above inventive concept, such as Figure 1 As shown, this application provides a device for predicting blood demand based on an AI large model, including a blood usage prediction module, which includes a feature data acquisition submodule, a classification submodule, and a blood usage prediction submodule.
[0026] The feature data acquisition submodule is used to acquire feature data related to the blood demand of the patient to be predicted; the classification submodule is used to determine whether the patient needs a blood transfusion; and the blood usage prediction submodule is used to use the prediction model to predict the blood usage based on the results output by the classification submodule.
[0027] The aforementioned device effectively addresses the shortcomings of existing technologies where a single model can generate large errors in blood demand prediction by decomposing the task into two stages: classification and regression. First, the feature data acquisition submodule collects patient feature data, and the classification submodule determines whether a patient needs a transfusion. For patients who do not need a transfusion, it directly provides a zero-transfusion prediction, avoiding the interference of a large number of zero-transfusion samples on the regression model in traditional methods and improving the accuracy of zero-transfusion prediction. For patients who need a transfusion, the blood volume prediction submodule uses a trained regression model to predict the transfusion volume. Since the classification submodule has already identified patients who need transfusions, the regression model only needs to focus on these patients, avoiding the trade-off between classification and regression tasks in a single model and significantly improving the accuracy of transfusion volume prediction.
[0028] For example, the device also includes a front-end interaction module for providing a user interface, including a chat window that supports user input in natural language. Users can describe the patient's condition in natural language, such as "Please predict the blood transfusion volume for the patient with medical record number 112233".
[0029] For example, the device also includes a large language model, which can transmit data with the front-end interaction module. It is mainly used to parse the natural language query information input by the user received by the front-end interaction module, extract key information for blood transfusion volume prediction, and convert the blood transfusion volume prediction result into natural language and feed it back to the user through the front-end interaction module.
[0030] Most existing medical prediction systems use traditional graphical user interfaces, requiring medical staff to fill in large amounts of data in multiple input boxes, making the process cumbersome and lacking intelligent interaction methods, thus failing to meet the needs of rapid and convenient clinical applications. This device, however, combines a front-end interaction module with a large language model to achieve natural language-driven intelligent interaction. Medical staff only need to describe patient information in everyday language, and the system can automatically parse and extract key information to predict transfusion volume. This not only significantly lowers the operational threshold but also significantly improves interaction efficiency and user experience.
[0031] For example, the device further includes a Model Context Protocol (MCP) processing module. The MCP processing module is primarily used to implement standardized communication between the large language model and the blood usage prediction module. This allows the MCP processing module to provide the blood usage prediction module with key information extracted by the large language model, and to feed back the blood usage prediction results and output requirement prompts sent by the blood usage prediction module to the large language model based on the Model Context Protocol. The output requirement prompts are pre-installed in the MCP processing module.
[0032] Because the MCP processing module uses the standardized MCP protocol, it also supports large models that can integrate other functions without customized development, which is beneficial for functional expansion.
[0033] Furthermore, since the MCP processing module has the function of calling the data completion interface based on key information (such as the identity of the patient to be predicted) to obtain characteristic data related to the blood use needs of the patient to be predicted, and since different medical systems provide different data completion interfaces, when it is necessary to connect to different medical systems, the corresponding data completion interfaces of each medical system can be integrated into the MCP processing module to achieve the connection with different medical systems.
[0034] It is evident that the MCP processing module not only enhances the device's functional expansion capabilities but also improves its adaptability and versatility.
[0035] Based on the above-mentioned device, such as Figure 2 As shown, this application provides a method for predicting blood demand based on a large AI model, including: S110, Obtain characteristic data related to the blood use needs of the patient to be predicted.
[0036] Specifically, the feature data acquisition submodule acquires feature data related to the blood use needs of the patient to be predicted.
[0037] For example, the feature data includes one or more of the following information: Basic information, routine blood test information, and coagulation function test information.
[0038] The basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. The physiological status parameters include, but are not limited to, the following fields: age and gender.
[0039] Surgical characteristic parameters include, but are not limited to, the following fields: surgery date and surgery type.
[0040] Complete blood count (CBC) information includes, but is not limited to, the following fields: red blood cell count, hemoglobin, hematocrit, platelet count, and neutrophil percentage.
[0041] Coagulation function test information includes, but is not limited to, the following fields: thrombin time, prothrombin time, fibrinogen, activated partial thromboplastin time, and international normalized ratio.
[0042] In the above example, the feature data includes multi-dimensional clinical data, which can comprehensively reflect the patient's physiological state and surgical risk characteristics, thereby improving the accuracy of transfusion volume prediction.
[0043] In one feasible design, the method includes the following steps before acquiring the characteristic data related to the blood use needs of the patient to be predicted: Receive natural language query information input by the user; The system uses a large language model to parse natural language query information and obtain the user's intent. If the intention is to obtain the predicted blood usage of a patient to be predicted, the system determines whether the natural language query information contains the identity identifier of the patient to be predicted based on the large language model. If the natural language query information contains the identity identifier of the patient to be predicted, the feature data related to the blood use needs of the patient to be predicted are obtained based on the identity identifier parsed from the large language model.
[0044] Specifically, the identity identifier parsed by the large language model can be output to the front-end interaction module so that the user can further confirm the identity identifier.
[0045] Specifically, the front-end interaction module receives natural language query information input by the user and sends it to the large language model. After receiving the query information, the large language model parses it to obtain the user's intent. If the intent indicates obtaining the predicted blood usage of a patient to be predicted, the large language model further determines whether the natural language query information contains the patient's identity identifier. If the query information contains the patient's identity identifier, the model retrieves the patient's blood usage-related feature data based on the identifier parsed by the large language model. If the intent indicates other needs, the large language model performs the corresponding operation based on the need.
[0046] The above example optimizes user interaction by introducing a natural language processing workflow based on a large language model. This involves first receiving the user's natural language query, then having the large language model parse the intent and determine if it contains patient identification information, and finally automatically retrieving feature data based on that identification. This enhances the intuitiveness and efficiency of the interaction. This design allows healthcare professionals to use natural language (such as directly describing patient information) instead of traditional, cumbersome form input, reducing operational steps. The large language model automatically parses the intent and verifies the identification, avoiding errors and delays in manual queries and ensuring the accuracy and real-time nature of data acquisition. Ultimately, this intelligent interaction mechanism simplifies the complex medical data retrieval process into a seamless conversational experience, directly optimizing the user experience.
[0047] In one feasible design, the blood use-related feature data of the patient to be predicted is obtained based on the identity identifier parsed from the large language model, including: Based on the model context protocol, the identity identifier of the patient to be predicted is obtained from the parsing of the large language model; By calling the data completion interface, the feature data corresponding to the identity identifier of the patient to be predicted can be obtained.
[0048] Specifically, after determining that the natural language query information contains the identity identifier of the patient to be predicted, the large language model determines the identifier of the blood usage prediction module (it should be noted that, for functional expansion, the MCP processing module can also connect to other functional modules, so it is necessary to determine the identifier of the blood usage prediction module here). The large language model encapsulates the identity identifier of the patient to be predicted and the identifier of the blood usage prediction module into a structured request according to the model context protocol. This request is used to obtain the blood usage prediction result and is sent to the MCP processing module. The MCP processing module parses this request based on the model context protocol to obtain the identity identifier of the patient to be predicted and the identifier of the blood usage prediction module. Based on this identity identifier, the MCP processing module calls the data completion interface to obtain the feature data related to the blood usage needs of the patient to be predicted. This call to the data completion interface enables the MCP processing module to automatically complete and integrate feature data by accessing multi-source data such as electronic medical records, test results, and surgical records in the hospital information system. It should be noted that when the MCP processing module connects to the data completion interfaces of multiple medical systems, the MCP processing module also determines the data completion interface to be called in the following way: According to the model context protocol, a request is sent to the large language model to obtain the identifier of the target medical system to which the feature data of the patient to be predicted belongs, so that the large language model can obtain the identifier of the target medical system by interacting with the user based on the request; Based on the model context protocol, receive the identifier of the target medical system from the large language model; By querying the relationship table, the data completion interface corresponding to the target medical system can be determined. The relationship table is used to record the association between each medical system and the corresponding data completion interface.
[0049] Subsequently, the MCP processing module uses the integrated feature data as a parameter and sends the parameter, which includes the feature data, to the blood volume prediction module according to the identifier of the blood volume prediction module, so that the blood volume prediction module can obtain the feature data of the patient to be predicted through the parameter.
[0050] In the example above, standardized communication between the blood usage prediction module and the large language model is achieved based on the model context protocol. This enables the large language model to use its semantic understanding capabilities to parse user intent and extract key information (such as identity identifiers). This supports the subsequent automatic acquisition and integration of multi-dimensional clinical data of patients based on key information, providing high-quality input for blood usage prediction.
[0051] In a feasible design, the method also includes: If the natural language query information does not contain the identity identifier of the patient to be predicted, the system determines whether the natural language query information contains the feature data of the patient to be predicted based on the large language model. If the natural language query information does not contain the feature data of the patient to be predicted, the system interacts with the user based on the large language model until the identity identifier or feature data of the patient to be predicted is obtained. If the natural language query information contains feature data of the patient to be predicted, based on the large language model, determine whether the feature data of the patient to be predicted meets the preset conditions for subsequent processing. If the characteristic data of the patient to be predicted meets the preset conditions, subsequent processing is carried out based on the characteristic data of the patient to be predicted. Otherwise, the system interacts with the user based on a large language model until feature data that meets the preset conditions is obtained.
[0052] For example, the preset conditions are that the feature data includes at least basic information, routine blood test information and coagulation function test information, and the missing rate of all fields of the feature data does not exceed the set threshold.
[0053] For example, assuming the threshold is set to 30%, and the feature data has four fields, X1-X4, where X2 is missing, then the missing rate is 25%, which does not exceed the set threshold of 30%.
[0054] Preset conditions are used to ensure the integrity and reliability of the data used for blood usage prediction, and can be set according to actual needs.
[0055] Specifically, if the large language model determines that the natural language query information does not contain the identity identifier of the patient to be predicted, it further analyzes whether the natural language query information contains the feature data of the patient to be predicted. If the large language model determines that the natural language query information contains the feature data of the patient to be predicted, it determines whether the feature data meets the preset conditions. If it does, the feature data is encapsulated based on the model context protocol and sent to the MCP processing module, triggering the subsequent blood usage prediction process. If it does not meet the conditions, the front-end interaction module guides the user through one or more rounds of dialogue to fill in the missing fields until the feature data meets the preset conditions.
[0056] If the large language model determines that the natural language query does not contain the feature data of the patient to be predicted, then the front-end interaction module will conduct one or more rounds of interaction with the user until the patient's identity identifier or feature data is obtained. Then, subsequent processing will be performed based on the patient's identity identifier or feature data.
[0057] When a natural language query lacks both patient identification and sufficient feature data, the above embodiments utilize the interactive capabilities of a large language model to proactively initiate one or more rounds of dialogue, guiding the user to gradually supplement the necessary information. Simultaneously, preset conditions are used for verification to ensure that the obtained feature data meets the quality requirements of the prediction model. This data completion and verification process enables the device to proactively guide and improve the data, significantly enhancing its robustness in handling incomplete or non-standard queries. Ultimately, while maintaining the convenience of natural language interaction, the smooth execution of the prediction process and the reliability of the prediction results are guaranteed.
[0058] S120 determines whether a patient to be predicted needs a blood transfusion based on characteristic data.
[0059] Specifically, the classification submodule determines whether the patient to be predicted needs a blood transfusion based on the feature data.
[0060] In one feasible design, the classification submodule determines whether a patient needs a blood transfusion based on feature data in the following way: Based on the trained classification model, predictions are made according to feature data to determine whether the patient to be predicted needs a blood transfusion.
[0061] Specifically, the feature data is input into the classification submodule, which triggers the classification model to make a prediction based on the feature data and output the result, which indicates whether the patient to be predicted needs a blood transfusion.
[0062] The above example uses a classification model to perform binary classification on the feature data, which can accurately identify the patient's blood transfusion needs by mining the inherent correlations among the information in the feature data.
[0063] In one feasible design, the classification model employs a lightweight gradient boosting machine algorithm, which can be trained using a model training module (which can also be integrated into the device) in the following way: A second dataset is constructed based on the feature data of multiple historical patients and the binary classification label of whether each patient needs a blood transfusion. The feature data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information. Among them, basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. Based on the second dataset, the initial classification model is trained using the corresponding binary classification labels as the training target to obtain a trained classification model.
[0064] Among them, the Light Gradient Boosting Machine (LightGBM) algorithm has efficient training and inference performance, with a single prediction response time of less than 100 milliseconds, meeting the needs of real-time clinical applications.
[0065] The following example uses the LightGBM algorithm to illustrate the process of training a classification model: (1) Data acquisition and preprocessing Collect characteristic data and corresponding binary labels (including those requiring blood transfusion and those not requiring blood transfusion) from multiple historical patients. Characteristic data includes basic information, complete blood count information, coagulation function test information, etc.
[0066] The basic information includes, but is not limited to, the patient's physiological parameters (such as age and gender) and / or surgical characteristic parameters (such as surgery date and surgery type); Complete blood count (CBC) information includes, but is not limited to, red blood cell count, hemoglobin, hematocrit, platelet count, and neutrophil percentage. Information on coagulation function tests includes, but is not limited to, thrombin time, prothrombin time, fibrinogen, activated partial thromboplastin time, and international normalized ratio. Data preprocessing: The collected data is preprocessed to ensure data quality, including but not limited to the following processing steps: Data cleaning: handling missing values (through methods such as filling, deleting, or interpolation), identifying and removing outliers, and deleting duplicate data.
[0067] In handling missing values, if multiple missing feature data points with missing field content are identified in the feature data of multiple patients in history, imputation is performed on a portion of the missing feature data, while the missing markers in the other portion of the missing feature data are retained without imputation. Imputation includes using the median to imput the content of numeric fields and using the mode to imput the content of categorical fields. Using the mode to imput the content of categorical fields means that for categorical fields with missing values in the patient feature data (such as gender, surgery type, surgical incision type, etc., which are non-numeric fields), the missing value is imputed using the content of the field that appears most frequently in the historical data (i.e., the mode).
[0068] For example, consider the feature data of multiple patients: Patient A, Patient B, Patient C, Patient D, and Patient E. The feature data of Patient A and Patient B contains missing fields; therefore, both Patient A's and Patient B's feature data are considered missing feature data. The feature data for Patient A is filled in, while the missing markers in Patient B's feature data are retained without filling.
[0069] Building upon LightGBM's ability to tolerate a certain missing data rate and automatically learn the optimal splitting direction for missing values, a method that imputes some missing data while leaving others unimpacted allows for effective model training even without fully imputing missing fields in the dataset, improving the model's generalization ability and robustness. Specifically, preserving missing data markers helps the model identify missing patterns and learn their underlying distribution rules, thus handling missing data in unknown samples more accurately during prediction. In other words, patients do not need to undergo all physical examinations corresponding to all fields included in the feature data to successfully invoke the model for corresponding predictions.
[0070] Data transformation: Encode the content of non-numerical fields (e.g., label encoding or one-hot encoding). For numerical fields, determine whether to standardize or normalize the content based on algorithm requirements (e.g., LightGBM is not sensitive to units, so standardization or normalization is not required).
[0071] Feature engineering: Reduce redundant features through feature selection, or construct new features (such as generating surgery year, surgery month, surgery day, season, whether it is a weekend, etc. based on the surgery date).
[0072] The feature selection employs a model importance assessment method, which includes: evaluating the importance of each type of feature in the feature data using the Shapley additive interpretation method to obtain a quantitative value for the importance of each type of feature; and deleting data corresponding to features whose quantitative values are lower than a preset threshold. The different types of features in the feature data refer to various fields. The preset threshold can be determined according to actual needs, and this application does not impose any limitations on it.
[0073] In the example above, quantifying the importance of each type of feature allows for the intuitive identification of key features that significantly impact the prediction results, while redundant features with less impact are removed. This reduces data dimensionality, minimizes noise interference, and improves model training efficiency. Simultaneously, retaining key features during model training helps capture core features in the data, enhancing the model's ability to learn from these key features.
[0074] Data reduction: Reduce the data size and computational complexity by using dimensionality reduction techniques (such as principal component analysis) or sampling methods (such as random sampling and stratified sampling).
[0075] (2) Construct the second dataset Based on the preprocessed data, a second dataset is constructed, which is trained with a binary classification label (whether a blood transfusion is needed).
[0076] The specific classification method is as follows (taking red blood cell data as an example; other blood components are classified similarly): The preprocessed data (denoted as dataset A1) is divided into training set A11 and test set A12 in an 8:2 ratio.
[0077] Separate samples with actual blood transfusion volume greater than 0 from the training and test sets of dataset A1 to form a new dataset B1 (at this time, the training set of dataset B1 is the part of the samples with actual blood transfusion volume greater than 0 in A11, and the test set of dataset B1 is the part of the samples with actual blood transfusion volume greater than 0 in A12, denoted as B11). Divide the training set in dataset B1 into a new training set B12 and a new validation set B13 in an 8:2 ratio. The new training set B12, the new validation set B13, and the test set B11 of dataset B1 constitute a new dataset B2 (used for subsequent regression model training).
[0078] The training set A11 in dataset A1 is further divided into a new training set A111 and a new validation set A112 in an 8:2 ratio. The new training set A111, the new validation set A112, and the test set A12 of dataset A1 constitute dataset A2 (i.e., the second dataset), which is used for training and evaluating the classification model.
[0079] (3) Classification model training Using dataset A2, with the goal of representing binary classification labels indicating whether a blood transfusion is needed, an initial classification model employing the LightGBM algorithm is trained. The training process includes: Set the model parameters: set the loss function to "binary cross-entropy loss", the boosting type to "Gradient Boosting Decision Tree (GBDT)", and the transfusion probability threshold to 0.5 (when the transfusion probability is greater than 0.5, the output prediction result is that a transfusion is needed, and when the transfusion probability is less than or equal to 0.5, the output prediction result is that a transfusion is not needed).
[0080] Training and Evaluation: The model was fitted using the training set A111 of dataset A2, and its performance was evaluated using the validation set A112 and the test set A12 to obtain the trained classification model. Evaluation metrics used to assess performance included the area under the curve (AUC) and the F1 score to ensure the model accurately distinguishes transfusion needs.
[0081] During the training of the classification model, the optimization objective is set as a binary classification task, enabling the model to learn to make an essential binary judgment on blood transfusion needs. A gradient boosting decision tree framework is adopted, and multiple weak classifiers are integrated to gradually correct the prediction error, so as to obtain a classification model with high prediction accuracy.
[0082] The above embodiments construct a second dataset that integrates multi-dimensional clinical features (including physiological state, surgical features, blood routine and coagulation function), and train a classification model based on this sample set with binary classification labels as the target. This enables the model to comprehensively learn the complex nonlinear feature relationships that affect blood transfusion decisions, thereby effectively distinguishing between patients who need blood transfusion and those who do not, significantly improving the accuracy and generalization ability of the classification task, and providing a reliable prerequisite for accurate blood usage prediction.
[0083] For example, the feature data of patients to be predicted is preprocessed to match the input format and data quality during the training phase. For instance, non-numerical fields in the feature data are encoded, fields with missing content are filled if the missing rate exceeds a preset threshold such as 30%, and fields of types not needed by the model are removed to ensure that the dimensionality of the input data remains consistent with that during training.
[0084] For example, determining whether a patient needs a blood transfusion based on feature data can also be achieved in the following ways: Feature data is input into a predefined rule engine, which is configured with at least one judgment rule based on prior clinical knowledge. If the feature data meets any of the judgment rules, then it is determined that the patient to be predicted needs a blood transfusion; If the feature data does not meet any judgment rules, the patient to be predicted is determined not to need a blood transfusion.
[0085] For example, at least one judgment rule includes one or more of the following rules: Based on the rule of hemoglobin level: if a patient's hemoglobin concentration is lower than a preset threshold (for example, 70 g / L for patients with non-acute blood loss, and 80 g / L for patients with acute blood loss or cardiovascular disease), then a blood transfusion is required.
[0086] Based on coagulation function rules: if a patient's prothrombin time or activated partial thromboplastin time is prolonged by more than 1.5 times the upper limit of normal, and is accompanied by clinical records or assessments of active bleeding, then plasma transfusion is deemed necessary.
[0087] Rule based on platelet count: If a patient's platelet count is below a preset threshold (e.g., <10 × 10⁻⁶ for non-surgical patients)... 9 / L, for patients scheduled for major surgery <50×10 9 If the platelet count is 6 / L, then a platelet transfusion is required.
[0088] Judgment rules based on prior clinical knowledge can be set according to the actual clinical situation, and this application does not limit them.
[0089] The above example allows the rule engine to serve as an independent and reliable backup judgment module when the classification model malfunctions or its prediction results are questionable. By comparing the results of the classification model with those of the rule engine, the predictions are cross-validated, enhancing the robustness of the overall system. Moreover, it does not require a large amount of historical data to train the model; mature clinical guidelines can be quickly deployed, making it suitable for medical units that lack high-quality training data or have limited computing resources.
[0090] S130, if it is determined that the patient to be predicted needs a blood transfusion, the predicted blood usage for the patient is determined based on the trained prediction model.
[0091] Specifically, if the blood volume prediction submodule determines that the patient to be predicted needs a blood transfusion, it determines the predicted blood volume of the patient by loading the trained prediction model.
[0092] In one feasible design, the prediction model is a regression model employing a lightweight gradient boosting machine algorithm, and the method also includes: The first dataset is constructed based on the characteristic data of multiple patients with historical blood transfusion volumes greater than zero and their corresponding actual blood usage. The characteristic data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information. Among them, basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. Based on the first dataset, the initial prediction model was trained with the actual blood usage as the prediction target, resulting in a trained prediction model.
[0093] The following example illustrates the process of training a prediction model using the LightGBM algorithm: In the process of constructing the second dataset for training the classification model, the generated dataset B2 is the first dataset for training the prediction model. Please refer to the relevant description in the foregoing embodiments, which will not be repeated here.
[0094] Based on the feature data and actual blood usage in dataset B2, an initial regression model using the LightGBM algorithm is trained. The training process includes: Set the model parameters as follows: set the loss function to "Mean Squared Error (MSE)", the evaluation metric to "Mean Absolute Error (MAE)", and the boosting type to "GBDT".
[0095] Training and Evaluation: The model is fitted using the training set B12 of dataset B2, and the tree structure is iteratively optimized using the gradient boosting algorithm to minimize the MSE loss function. The performance is then evaluated using the validation set B13 and the test set B11 to obtain the trained regression model. The performance metric used includes mean absolute error to ensure the model accurately predicts transfusion volume.
[0096] During the training of the regression model, the loss function is set to mean squared error loss, so that the model training is guided by reducing the square of the large deviation between the predicted value and the true value, thereby enhancing the model's stability and overall fitting ability for outliers. At the same time, mean absolute error is selected as the monitoring indicator during the training process, because it can intuitively reflect the average absolute level of the prediction error, which is convenient for directly evaluating the model's prediction accuracy during the iteration process. Gradient boosting decision tree is used as the basic learning framework. By utilizing its characteristic of integrating multiple decision trees for sequential optimization, the prediction error is gradually corrected, thereby jointly ensuring that the finally trained regression model has the best accuracy and robustness in predicting blood consumption.
[0097] In this embodiment, a first dataset is constructed by screening patient samples with a historical transfusion volume greater than zero, ensuring a high degree of consistency between the training data and the regression prediction target, thus eliminating the interference of zero-transfusion samples on model training from the source. Through multi-dimensional feature data including physiological state, surgical characteristics, blood routine, coagulation function, etc., the model can comprehensively learn the complex clinical factors affecting transfusion volume and their nonlinear relationships. Based on this high-quality dataset and using the actual blood usage as the target, the gradient boosting decision tree model is trained. The final regression model shows higher accuracy and robustness in predicting the blood usage of patients who need transfusions, effectively overcoming the prediction bias caused by training a traditional single model on a mixed dataset (including zero-transfusion samples and non-zero-transfusion samples).
[0098] S140, if it is determined that the patient to be predicted does not need a blood transfusion, the predicted blood usage for the patient is determined to be zero.
[0099] Specifically, if the blood usage prediction submodule determines that the classification submodule outputs a classification result indicating that blood transfusion is not required, it will directly set the predicted blood usage for that patient to 0, thus avoiding unnecessary blood usage estimates for patients who do not require blood transfusion.
[0100] In one feasible design, after the blood volume prediction module obtains the predicted blood volume, the result is displayed to the user in the following way: Based on the model context protocol, natural language responses in natural language form are generated through a large language model. The natural language responses include predictions of blood usage. Display natural language responses to users.
[0101] Specifically, the blood usage prediction module responds to the call from the MCP processing module by sending the predicted blood usage to the MCP processing module; the MCP processing module generates a prompt word containing the specific value of the predicted blood usage and the display requirements of the predicted blood usage, and encapsulates the prompt word based on the model context protocol; the MCP processing module sends the encapsulated prompt word to the large language model; the large language model generates a natural language response containing the predicted blood usage according to the display requirements in the prompt word, and displays the natural language response to the user through the chat window of the front-end interaction module.
[0102] The above example generates natural language responses in natural language form using a large language model, making the prediction results easier for medical staff to understand and accept, and improving the user-friendliness of human-computer interaction.
[0103] The following examples illustrate the process of predicting blood demand using the various modules of the device, to help understand the solution in this application. (See also...) Figure 3 : Step a: The front-end interaction module receives natural language query information input by the user; Step b: The front-end interaction module parses the natural language query information and identifies the intent by calling the large language model; Step c: If the user's intent is to predict blood usage and the natural language query information includes the identity of the patient to be predicted, the large language model encapsulates the identity of the patient to be predicted and the identifier of the blood usage prediction module into a structured request according to the model context protocol and sends it to the MCP processing module. Step d: The MCP processing module parses the structured request, calls the data completion interface based on the identity identifier, obtains the feature data related to the blood usage needs of the patient to be predicted, and then calls the interface of the blood usage prediction module as a parameter using the feature data. Step e: The blood volume prediction module executes the blood volume prediction process based on the feature data to obtain the predicted blood volume, and feeds back the predicted blood volume to the MCP processing module. Step f: After receiving the predicted blood usage, the MCP processing module generates a prompt word based on the predicted blood usage, and encapsulates the prompt word based on the model context protocol before sending it to the large language model. Step g: The large language model generates a natural language response containing the predicted blood usage based on the prompt words, and feeds it back to the front-end interaction module; In step h, the front-end interaction module presents the natural language response to the user through the chat window.
[0104] This application's embodiments determine blood usage based on a predictive model. The core decision-making logic does not rely on statically set expert rules, but rather on a well-trained predictive model capable of automatically learning and mining complex nonlinear relationships from massive amounts of historical clinical data. This solution can continuously optimize its internal parameters by absorbing new clinical data to retrain the predictive model, thereby dynamically adapting to complex situations and new treatment models in clinical practice. Ultimately, it overcomes the limitations in accuracy and adaptability caused by the rigidity of rules and the inability to self-evolve in traditional expert systems.
[0105] Furthermore, after acquiring the characteristic data of the patient to be predicted, the proposed solution first determines whether the patient needs a blood transfusion. If so, the trained prediction model is used to determine the amount of blood needed; otherwise, the amount of blood needed is directly determined to be zero. This decomposes blood demand prediction into two independent stages: classification and regression. This phased processing mechanism effectively solves the problem of large errors caused by a single model simultaneously handling the classification task (whether a blood transfusion is needed) and the regression task (how much blood is needed) in blood demand prediction. It also avoids data imbalance caused by interference from a large number of zero-transfusion samples during the model training stage. Therefore, it effectively improves the accuracy of the overall solution in predicting blood demand and avoids misjudgment of patients who do not need blood transfusions and waste of resources.
[0106] Based on the above embodiments of the method for predicting blood demand based on AI large model, this application also provides an apparatus for predicting blood demand based on AI large model, including a blood volume prediction module, which includes a feature data acquisition submodule, a classification submodule and a blood volume prediction submodule. The feature data acquisition submodule is used to acquire feature data related to the blood use needs of the patient to be predicted; The classification submodule is used to determine whether a patient to be predicted needs a blood transfusion based on feature data; The blood volume prediction submodule is used to determine the predicted blood volume of a patient based on a trained prediction model if it is determined that the patient needs a blood transfusion. The blood volume prediction submodule is also used to determine the predicted blood volume of a patient as zero if it is determined that the patient does not need a blood transfusion.
[0107] In one feasible design, the prediction model is a regression model employing a lightweight gradient boosting machine algorithm, and the device also includes a model training module to train the prediction model in the following manner: The first dataset is constructed based on the characteristic data of multiple patients with historical blood transfusion volumes greater than zero and their corresponding actual blood usage. The characteristic data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information. Among them, basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. Based on the first dataset, the initial prediction model was trained with the actual blood usage as the prediction target, resulting in a trained prediction model.
[0108] In a feasible design, the classification submodule is implemented to determine whether a patient to be predicted needs a blood transfusion based on feature data: Based on the trained classification model, predictions are made according to feature data to determine whether the patient to be predicted needs a blood transfusion.
[0109] In a feasible design, the classification model employs a lightweight gradient boosting machine algorithm, and the model training module trains the classification model in the following way: A second dataset is constructed based on the feature data of multiple historical patients and the binary classification label of whether each patient needs a blood transfusion. The feature data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information. Among them, basic information includes the patient's physiological status parameters and / or surgical characteristic parameters. Based on the second dataset, the initial classification model is trained using the corresponding binary classification labels as the training target to obtain a trained classification model.
[0110] In one feasible design, the device further includes a front-end interaction module, a large language model, and an MCP processing module. Before acquiring the feature data related to the blood usage needs of the patient to be predicted, the front-end interaction module receives natural language query information input by the user; the large language model parses the natural language query information to obtain the user's intent; if the intent indicates obtaining the predicted blood usage amount of the patient to be predicted, the large language model determines whether the natural language query information contains the identity identifier of the patient to be predicted; if the natural language query information contains the identity identifier of the patient to be predicted, the MCP processing module acquires the feature data related to the blood usage needs of the patient to be predicted based on the identity identifier parsed by the large language model.
[0111] In one feasible design, the large language model is also used to determine whether the natural language query information contains the characteristic data of the patient to be predicted if the natural language query information does not contain the patient's identity identifier; if the natural language query information does not contain the patient's characteristic data, it interacts with the user until the patient's identity identifier or characteristic data is obtained; if the natural language query information contains the patient's characteristic data, it determines whether the patient's characteristic data meets the preset conditions for subsequent processing; if the patient's characteristic data meets the preset conditions, it performs subsequent processing based on the patient's characteristic data; otherwise, it interacts with the user until the characteristic data that meets the preset conditions is obtained.
[0112] In one feasible design, the MCP processing module is used to obtain the blood use-related feature data of the patient to be predicted based on the identity identifier parsed from the large language model in the following way: Based on the model context protocol, the identity identifier of the patient to be predicted is obtained from the parsing of the large language model; By calling the data completion interface, the feature data corresponding to the identity identifier of the patient to be predicted can be obtained.
[0113] In a feasible design, before constructing a second dataset based on the feature data of multiple historical patients and the binary classification labels of whether or not each patient needs a blood transfusion, the model training module performs data preprocessing in the following way: If multiple missing feature data with missing field content are identified in the feature data of multiple patients in history, a portion of the missing feature data is filled in, while the missing markers in another portion of the missing feature data are retained without filling.
[0114] In a feasible design, before constructing a second dataset based on the feature data of multiple historical patients and the binary classification labels of whether or not each patient needs a blood transfusion, the model training module performs data preprocessing in the following way: The importance of each type of feature in the feature data is evaluated using the Shapley additive interpretation method, and a quantitative value of the importance of each type of feature is obtained. Delete the data corresponding to features whose quantization value is lower than a preset threshold from the feature data.
[0115] Other implementation methods and effects of the above-mentioned device can be found in the description of the method embodiment for predicting blood demand based on AI large model, and will not be repeated here.
[0116] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0117] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0118] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0119] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0120] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0121] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for predicting blood demand based on a large AI model, characterized in that, include: Obtain characteristic data related to the blood use needs of the patients to be predicted; Based on the characteristic data, determine whether the patient to be predicted needs a blood transfusion; If it is determined that the patient to be predicted needs a blood transfusion, the predicted blood usage for the patient is determined based on the trained prediction model. If it is determined that the patient to be predicted does not require a blood transfusion, the predicted blood usage for the patient is determined to be zero.
2. The method according to claim 1, characterized in that, The prediction model is a regression model using a lightweight gradient boosting machine algorithm, and the method further includes: A first dataset is constructed based on the characteristic data of multiple patients with historical blood transfusion volumes greater than zero and their corresponding actual blood usage. The characteristic data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information, wherein the basic information includes the patient's physiological state parameters and / or surgical characteristic parameters; Based on the first dataset, the initial prediction model is trained with the actual blood usage as the prediction target to obtain a trained prediction model.
3. The method according to claim 1 or 2, characterized in that, The step of determining whether the patient to be predicted needs a blood transfusion based on the feature data includes: Based on the trained classification model, predictions are made according to the feature data to determine whether the patient to be predicted needs a blood transfusion.
4. The method according to claim 3, characterized in that, The classification model employs a lightweight gradient boosting machine algorithm, and the method further includes: A second dataset is constructed based on the feature data of multiple historical patients and the binary classification label of whether each patient needs a blood transfusion. The feature data includes, but is not limited to, one or more of the following information: Basic information, routine blood test information, and coagulation function test information, wherein the basic information includes the patient's physiological state parameters and / or surgical characteristic parameters; Based on the second dataset, the initial classification model is trained using the corresponding binary classification labels as the training target to obtain a trained classification model.
5. The method according to claim 4, characterized in that, Before constructing the second dataset based on the feature data of multiple historical patients and the binary classification labels of whether each patient needs a blood transfusion, the method further includes: If multiple missing feature data with missing field content are identified in the feature data of multiple patients in history, a portion of the missing feature data is filled in, while the missing markers in another portion of the missing feature data are retained without filling.
6. The method according to claim 1 or 2, characterized in that, Prior to acquiring the blood transfusion-related characteristic data of the patient to be predicted, the method includes: Receive natural language query information input by the user; The user's intent is obtained by parsing the natural language query information based on a large language model. If the intent indicates obtaining the predicted blood usage of the patient to be predicted, determine whether the natural language query information contains the identity identifier of the patient to be predicted based on the large language model; If the natural language query information contains the identity identifier of the patient to be predicted, the feature data related to the blood use needs of the patient to be predicted are obtained based on the identity identifier parsed by the large language model.
7. The method according to claim 6, characterized in that, The method further includes: If the natural language query information does not contain the identity identifier of the patient to be predicted, based on the large language model, determine whether the natural language query information contains the feature data of the patient to be predicted; If the natural language query information does not contain the feature data of the patient to be predicted, the system interacts with the user based on the large language model until the identity identifier or feature data of the patient to be predicted is obtained. If the natural language query information contains the feature data of the patient to be predicted, based on the large language model, it is determined whether the feature data of the patient to be predicted meets the preset conditions for subsequent processing. If the feature data of the patient to be predicted meets the preset conditions, subsequent processing is performed based on the feature data of the patient to be predicted. Otherwise, the system interacts with the user based on the large language model until feature data that meets the preset conditions is obtained.
8. The method according to claim 6, characterized in that, The step of obtaining the blood transfusion-related feature data of the patient to be predicted based on the identity identifier parsed from the large language model includes: Based on the model context protocol, the identity identifier of the patient to be predicted is obtained from the parsing of the large language model; By calling the data completion interface, the feature data corresponding to the identity identifier of the patient to be predicted is obtained.
9. The method according to claim 2, characterized in that, Before constructing the second dataset based on the feature data of multiple historical patients and the binary classification labels of whether each patient needs a blood transfusion, the method further includes: The importance of each type of feature in the feature data is evaluated using the Shapley additive interpretation method, and a quantitative value of the importance of each type of feature is obtained. Delete the data corresponding to features whose quantization value is lower than a preset threshold from the feature data.
10. A device for predicting blood demand based on a large AI model, characterized in that, It includes a blood usage prediction module, which comprises a feature data acquisition submodule, a classification submodule, and a blood usage prediction submodule; The feature data acquisition submodule is used to acquire feature data related to the blood use needs of the patient to be predicted. The classification submodule is used to determine whether the patient to be predicted needs a blood transfusion based on the feature data; The blood usage prediction submodule is used to determine the predicted blood usage of the patient based on a trained prediction model if it is determined that the patient to be predicted needs a blood transfusion. The blood usage prediction submodule is also used to determine that the predicted blood usage of the patient is zero if it is determined that the patient to be predicted does not need a blood transfusion.