Blood donation response prediction method and device, electronic equipment and storage medium
By performing feature grouping and multi-model prediction on blood donation data, combined with dynamic weight adjustment and time verification, the accuracy and adaptability problems of blood donation reaction prediction in the existing technology are solved, and more accurate blood donation reaction prediction is achieved.
Patent Information
- Application Number
- CN202511262235.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Existing technologies rely on a single analytical variable in predicting blood donation reactions, resulting in poor accuracy of prediction results. They are unable to effectively capture dynamic physiological changes and multi-factor interaction effects, and the model weights are fixed and cannot be dynamically adjusted with new data.
A feature grouping strategy is used to divide blood donation data into explicit feature groups, implicit feature groups and original feature groups. Initial predictions are made through multiple base models, and the final predictions are made in combination with the meta-model. The weights of the base models are dynamically adjusted, and the generalization ability of the model is verified using a time sliding window.
The accuracy of blood donation response prediction and the dynamic adaptability of the model are improved, ensuring the reliability and accuracy of the prediction results and avoiding the lag and data leakage problems caused by time factors.
Smart Images

Figure CN120748747A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical analysis technology, and in particular to a blood donation reaction prediction method, device, electronic device and storage medium. Background Art
[0002] Donation reactions (such as syncope, hypotension, palpitations, nausea, and sweating) are common adverse reactions during blood donation. They can have short-term impacts on the donor's physical and mental health and may also reduce their willingness to donate again. Therefore, predicting donor reactions can help optimize donation processes and services, while also enabling preventive measures to protect the physical and mental health of donors experiencing them.
[0003] Currently, the assessment of whether a blood donor will experience a blood donation reaction is often done by collecting basic information about the blood donor and combining it with a survey of the donor's living habits, measurement of basic vital signs, and previous blood donation experience.
[0004] The above methods rely on relatively single analysis variables, resulting in poor accuracy in the prediction results of blood donation reactions. Summary of the Invention
[0005] The purpose of this application is to address the deficiencies in the above-mentioned prior art and provide a blood donation reaction prediction method, device, electronic device and storage medium to improve the accuracy of blood donation reaction prediction.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows: In a first aspect, an embodiment of the present application provides a method for predicting a blood donation reaction, comprising: Collecting the current blood donation data of the blood donor, wherein the blood donation data includes multiple characteristic variables and the values of each characteristic variable; the characteristic variables include: basic information and physiological indicators of the blood donor; Based on the current blood donation data, a pre-established feature grouping strategy is used to determine a feature set of the blood donor, wherein the feature set includes an explicit feature group, an implicit feature group, and an original feature group; the explicit feature group is used to characterize feature variables that are easy to interpret medically, and the implicit feature group is used to characterize high-dimensional feature variables that contain high-value information; Performing a first prediction using a plurality of base models according to the feature set of the blood donor to determine a plurality of initial prediction results for the blood donor; According to each initial prediction result and the weight information of each base model, a meta-model is used to perform a second prediction to determine the target prediction result of the blood donor, and the target prediction result is used to indicate the probability of the blood donor having a blood donation reaction during the current blood donation.
[0007] Optionally, the process of constructing the feature grouping strategy is as follows: Based on medical prior indicators, the combination relationship between each feature variable is determined, and according to the combination relationship, some feature variables are combined to obtain an explicit feature grouping strategy; The decision tree algorithm is used to split the characteristic variables in the blood donation record data and determine the high-order interaction relationship between the characteristic variables; According to the high-order interaction relationship between each feature variable, each feature variable is cross-combined to obtain an implicit feature grouping strategy.
[0008] Optionally, the determining of the feature set of the blood donor using a pre-built feature grouping strategy based on the current blood donation data includes: Combining corresponding feature variables in the current blood donation data according to the explicit feature grouping strategy to obtain the explicit feature group; According to the implicit feature grouping strategy, corresponding feature variables in the current blood donation data are combined to obtain the implicit feature group; The original feature group is formed by using the designated feature variables in the current blood donation data.
[0009] Optionally, performing a first prediction using multiple base models based on the feature set of the blood donor to determine multiple initial prediction results for the blood donor includes: The feature set of the blood donor is input as input data to each base model respectively, and a first prediction is performed through the base model to obtain initial prediction results corresponding to each base model respectively.
[0010] Optionally, performing a second prediction using a meta-model based on each initial prediction result and weight information of each base model to determine a target prediction result for the blood donor includes: According to the weight information of each base model, each initial prediction result is weighted to obtain the intermediate prediction result; The intermediate prediction result is input into the meta-model as input data, and a second prediction is performed through the meta-model to obtain a target prediction result of the blood donor.
[0011] Optionally, the training process of the base model is as follows: Collecting a sample data set, the sample data set including: sample blood donation record data of a sample blood donor and blood donation response information corresponding to each sample blood donation record data; the sample blood donation record data including multiple feature variables and values of each feature variable; the feature variables including: basic information and physiological indicators of the blood donor; The base model is obtained by training using the sample data set.
[0012] Optionally, the collecting of sample data sets includes: Collecting an initial sample data set, and sorting each sample blood donation record data in the initial sample data set according to the blood donation time; A preset time sliding window is used to slide from the sorted blood donation record data to obtain first training data, first verification data, second training data, and second verification data; the blood donation time period corresponding to the second training data includes the blood donation time period corresponding to the first training data, and includes blood donation record data later than the blood donation time period corresponding to the first training data.
[0013] Optionally, the adopting the sample data set to train the base model includes: Performing first training of a base model using the first training data, and verifying the first trained base model using the first verification data to obtain a first verification result; Performing a second training of the base model using the second training data, and verifying the second trained base model using the second verification data to obtain a second verification result; determining difference information according to the first verification result and the second verification result; If the difference information exceeds a preset threshold, the initial sample data set is screened according to the blood donation time of each blood donation record data in the initial sample data set; The base model is obtained by retraining based on the screened initial sample data set.
[0014] Optionally, the process of determining the weight information of each base model is as follows: Determining the sample explicit feature group, the sample implicit feature group, and the sample original feature group according to the blood donation record data of the sample blood donor; Calculate the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group respectively. The contribution value is used to represent the degree of influence of the feature group on the prediction result; The weight information of each base model is determined according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group and the contribution value of the sample original feature group.
[0015] Optionally, calculating the contribution value of the sample explicit feature group includes: Calculating the intra-group contribution value of each combined feature in the sample explicit feature group respectively; Screening the combined features within the sample explicit feature group according to the ranking results of the contribution values of the combined features within the group; Based on the intra-group contribution value of each combined feature in the filtered sample explicit feature group, the contribution value of the filtered sample explicit feature group is determined.
[0016] Optionally, determining the weight information of each base model according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group includes: According to the corresponding relationship between each base model and each sample feature group, the contribution value of the sample feature group corresponding to each base model is used to determine the weight information of each base model.
[0017] Optionally, the method further includes: Based on the blood donation record data of new sample donors obtained in real time, the contribution value of each sample feature group is updated in real time; According to the contribution value of each sample feature group after update, the weight information of each base model is updated in real time.
[0018] Optionally, the training process of the meta-model is as follows: Inputting each sample blood donation record data in the initial sample data set into each base model, performing blood donation response prediction using each base model, and obtaining an initial prediction result of each base model corresponding to each sample blood donation record data; Determine an intermediate prediction result for each piece of sample blood donation record data based on the initial prediction result of each base model corresponding to each piece of sample blood donation record data and the weight information of each base model; The meta-model is obtained by training using the intermediate prediction results of each sample blood donation record data and the blood donation response information corresponding to each sample blood donation record data.
[0019] In a second aspect, an embodiment of the present application further provides a blood donation reaction prediction device, comprising: a collection module, a determination module, and a prediction module; The collection module is used to collect the current blood donation data of the blood donor, and the blood donation data includes multiple characteristic variables and the values of each characteristic variable; the characteristic variables include: basic information and physiological indicators of the blood donor; The determination module is configured to determine, based on the current blood donation data, a feature set of the blood donor using a pre-established feature grouping strategy, wherein the feature set includes an explicit feature group, an implicit feature group, and an original feature group; the explicit feature group is configured to characterize feature variables that are easily medically interpretable, and the implicit feature group is configured to characterize high-dimensional feature variables that contain high-value information; The prediction module is configured to perform a first prediction using a plurality of base models based on the feature set of the blood donor to determine a plurality of initial prediction results for the blood donor; The prediction module is used to perform a second prediction using a meta-model based on the initial prediction results and the weight information of each base model to determine the target prediction result of the blood donor. The target prediction result is used to indicate the probability of the blood donor having a blood donation reaction during the current blood donation.
[0020] Optionally, it further includes: a building module; The construction module is used to determine the combination relationship between each feature variable based on the medical prior indicators, and combine some feature variables according to the combination relationship to obtain an explicit feature grouping strategy; The decision tree algorithm is used to split the characteristic variables in the blood donation record data and determine the high-order interaction relationship between the characteristic variables; According to the high-order interaction relationship between each feature variable, each feature variable is cross-combined to obtain an implicit feature grouping strategy.
[0021] Optionally, the determination module is specifically configured to combine corresponding feature variables in the current blood donation data according to the explicit feature grouping strategy to obtain the explicit feature group; According to the implicit feature grouping strategy, corresponding feature variables in the current blood donation data are combined to obtain the implicit feature group; The original feature group is formed by using the designated feature variables in the current blood donation data.
[0022] Optionally, the prediction module is specifically configured to input the feature set of the blood donor as input data into each base model, perform a first prediction using the base model, and obtain initial prediction results corresponding to each base model.
[0023] Optionally, the prediction module is specifically configured to perform weighted processing on each initial prediction result according to weight information of each base model to obtain an intermediate prediction result; The intermediate prediction result is input into the meta-model as input data, and a second prediction is performed through the meta-model to obtain a target prediction result of the blood donor.
[0024] Optionally, it further includes: a training module; The training module is used to collect a sample data set, which includes: sample blood donation record data of sample blood donors and blood donation response information corresponding to each sample blood donation record data; the sample blood donation record data includes multiple feature variables and values of each feature variable; the feature variables include: basic information and physiological indicators of the blood donors; The base model is obtained by training using the sample data set.
[0025] Optionally, the training module is specifically used to collect an initial sample data set, and sort each sample blood donation record data in the initial sample data set according to the blood donation time; A preset time sliding window is used to slide from the sorted blood donation record data to obtain first training data, first verification data, second training data, and second verification data; the blood donation time period corresponding to the second training data includes the blood donation time period corresponding to the first training data, and includes blood donation record data later than the blood donation time period corresponding to the first training data.
[0026] Optionally, the training module is specifically configured to use the first training data to perform a first training of the base model, and use the first verification data to verify the first trained base model to obtain a first verification result; Performing a second training of the base model using the second training data, and verifying the second trained base model using the second verification data to obtain a second verification result; determining difference information according to the first verification result and the second verification result; If the difference information exceeds a preset threshold, the initial sample data set is screened according to the blood donation time of each blood donation record data in the initial sample data set; The base model is obtained by retraining based on the screened initial sample data set.
[0027] Optionally, the determination module is further configured to determine the sample explicit feature group, the sample implicit feature group, and the sample original feature group based on the blood donation record data of the sample blood donor; Calculate the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group respectively. The contribution value is used to represent the degree of influence of the feature group on the prediction result; The weight information of each base model is determined according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group and the contribution value of the sample original feature group.
[0028] Optionally, the determining module is specifically configured to respectively calculate the intra-group contribution value of each combined feature in the sample explicit feature group; Screening the combined features within the sample explicit feature group according to the ranking results of the contribution values of the combined features within the group; Based on the intra-group contribution value of each combined feature in the filtered sample explicit feature group, the contribution value of the filtered sample explicit feature group is determined.
[0029] Optionally, the determination module is specifically configured to determine the weight information of each base model by using the contribution value of the sample feature group corresponding to each base model according to the correspondence between each base model and each sample feature group.
[0030] Optionally, it further includes: an update module; The updating module is used to update the contribution value of each sample feature group in real time according to the blood donation record data of new sample donors obtained in real time; According to the contribution value of each sample feature group after update, the weight information of each base model is updated in real time.
[0031] Optionally, the training module is further configured to input each sample blood donation record data in the initial sample data set into each base model, perform blood donation response prediction using each base model, and obtain an initial prediction result of each base model corresponding to each sample blood donation record data; Determine an intermediate prediction result for each piece of sample blood donation record data based on the initial prediction result of each base model corresponding to each piece of sample blood donation record data and the weight information of each base model; The meta-model is obtained by training using the intermediate prediction results of each sample blood donation record data and the blood donation response information corresponding to each sample blood donation record data.
[0032] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to implement the blood donation reaction prediction method provided in the first aspect.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the blood donation reaction prediction method provided in the first aspect is executed.
[0034] The beneficial effects of this application are: The present application provides a blood donation reaction prediction method, device, electronic device and storage medium, including: collecting the current blood donation data of the blood donor, the blood donation data including multiple feature variables and the values of each feature variable; based on the current blood donation data, using a pre-built feature grouping strategy to determine the feature set of the blood donor; based on the feature set of the blood donor, using multiple base models to make a first prediction to determine multiple initial prediction results of the blood donor; based on each initial prediction result and the weight information of each base model, using a meta-model to make a second prediction to determine the target prediction result of the blood donor. This method fully mines the blood donation data of the blood donor to obtain an explicit feature group, an implicit feature group and an original feature group, and then combines the explicit feature group, the implicit feature group and the original feature group to predict the blood donation reaction, which can improve the accuracy of the prediction result. When predicting the model, the prediction architecture of the base model combined with the meta-model can improve the accuracy of the model prediction. Among them, the multiple base models used have different emphases in the prediction process. At the same time, combined with the weight information of each base model, the initial prediction results of each base model under the influence of the characteristics it focuses on can be obtained. Then, combined with the meta-model for final prediction, more accurate prediction results can be obtained.
[0035] Secondly, the weight of the base model is determined by the contribution value of the feature group, so that the weight of the base model can be dynamically adjusted with the influx of new data to avoid the lag of model prediction.
[0036] In addition, the sample data set is processed through a time sliding window to verify the time sensitivity of the model, thereby effectively screening the sample data to improve the reliability of the model for the current prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flow chart of a method for predicting blood donation reactions provided in an embodiment of the present application; Figure 2 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; Figure 3 A flow chart of another method for predicting blood donation reactions provided in an embodiment of the present application; Figure 4 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; Figure 5A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; Figure 6 A flow chart of another method for predicting blood donation reactions provided in an embodiment of the present application; Figure 7 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; Figure 8 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; Figure 9 A flow chart of another method for predicting blood donation reactions provided in an embodiment of the present application; Figure 10 A flow chart of another method for predicting blood donation reactions provided in an embodiment of the present application; Figure 11 A schematic diagram showing the importance of features provided in an embodiment of the present application; Figure 12 A schematic diagram of a blood donation reaction prediction device provided in an embodiment of the present application; Figure 13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the contents of this application, or remove one or more operations from the flowchart.
[0040] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0041] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0042] Blood donation reactions (such as syncope, hypotension, palpitations, nausea, and sweating) are common adverse reactions during blood donation, which may have short-term impacts on the donor's health and reduce their willingness to donate again. Existing blood donation reaction prediction technologies mainly focus on the following three methods: The first approach involves establishing a real-time physiological monitoring and threshold alarm system. This involves a cuff-type monitoring device that uses arterial pulses to monitor blood pressure and blood oxygen in real time. Finally, these physiological indicators, collected in real time by sensors, are compared with preset thresholds to trigger an alarm.
[0043] This method only relies on static analysis at a single time point and cannot capture dynamic physiological changes (such as blood pressure fluctuation trends). It also ignores the interaction effects of multiple factors (such as age-season and blood pressure differences), resulting in missed reports or false positives.
[0044] The second method: By building a machine learning prediction model, using algorithms such as random forest and gradient boosting to analyze multi-dimensional data (questionnaires, weather, etc.) to identify key risk factors, and predicting the risk of syncope through characteristics such as systolic blood pressure and ambient temperature.
[0045] The machine learning model built with this method doesn't fully exploit the original feature information. Furthermore, the model's weights are fixed and cannot be dynamically adjusted with new data (such as seasonal fluctuations in blood donor characteristics).
[0046] The third method is to integrate the status, blood donation volume, height and blood donation history of the blood donor, design manual scoring rules to quantify the risk level and predict the blood donation reaction.
[0047] This approach relies on artificial rule design and is unable to adapt to complex nonlinear relationships (such as high-order feature interactions). Furthermore, the model lacks dynamic updating capabilities, making it difficult to adapt to seasonal changes or policy adjustments. Furthermore, it has not undergone time-sensitive validation and lacks the ability to generalize across time.
[0048] Based on this, this solution provides a blood donation response prediction method. By mining blood donation data, it can extract explicit and implicit features, overcoming the limitations of single feature modalities and enhancing the adequacy of raw information mining. Explicit features can be designed based on prior medical knowledge to form feature combinations (e.g., "systolic-diastolic blood pressure difference" reflects vascular elasticity, "first blood donation x winter" captures seasonal sensitivity risk), ensuring clinical interpretability. Implicit features can be generated using the LightGBM (decision tree algorithm) to generate leaf node indexes, capturing high-order nonlinear relationships (e.g., the complex interaction between "age, systolic blood pressure, and season"), overcoming the limitations of manual design. Furthermore, unprocessed raw features (e.g., age, gender, and blood pressure) are retained as a baseline for model analysis to prevent information loss.
[0049] By calculating the contribution value of feature groups (explicit / implicit / original), high-value features guided by interpretability are screened.
[0050] By selecting appropriate base models for different eigenmodes and weighting different base models based on the contribution of feature groups, we address the problem of fixed weights in previous models that cannot be dynamically adjusted with new data. As new data flows in, the contribution of feature groups changes, allowing the weights of base models to be automatically adjusted.
[0051] By evaluating the model's generalization ability over time, this approach addresses the generalization issues of models in previous studies. This approach not only ensures the model performs well on historical data but also accurately predicts new data in future time periods, avoiding issues such as time-sensitive features and data leakage caused by time factors. Blood donation data can be sorted by donation time, with a strict separation between training and validation sets. Time Series Cross-Validation (TSCV) can then be used to evaluate the model's performance fluctuations (e.g., AUC changes over time) in continuous time windows. As new data flows in, the model reduces the impact of historical noise on current predictions by attenuating the time weight.
[0052] Figure 1 This is a flow chart of a blood donation reaction prediction method provided in an embodiment of the present application; the execution subject of this method can be a computer device. Figure 1 As shown, the method may include: S101. Collect the current blood donation data of the blood donor, where the blood donation data includes multiple characteristic variables and the values of each characteristic variable.
[0053] Characteristic variables include: basic information and physiological indicators of blood donors.
[0054] Blood donors can predict blood donation reactions before each blood donation, so that appropriate care measures can be taken in advance for blood donors who may have blood donation reactions, or blood donors can be persuaded not to donate blood this time to ensure their physical and mental health.
[0055] Before donating blood, relevant physiological indicators and some basic blood donation information of the blood donor can be collected to obtain the current blood donation data of the blood donor. Of course, the blood donation data also contains some historical reference data, which can be directly pulled from the database.
[0056] The acquired blood donation data may include a variety of characteristic variables, each characteristic variable corresponds to a type of blood donation related information, and each characteristic variable also has a corresponding variable value.
[0057] For example: the height, age, blood pressure, and whether the donor is donating blood for the first time of the blood donor are all used as characteristic variables, while the specific height data, age data, and blood pressure values are used as variable values corresponding to the characteristic variables.
[0058] S102: Based on the current blood donation data, a pre-built feature grouping strategy is used to determine the feature set of the blood donor.
[0059] The feature set includes: explicit feature group, implicit feature group and original feature group.
[0060] In one feasible method, the corresponding feature variables in the current blood donation data can be combined according to the explicit feature grouping strategy to obtain an explicit feature group; according to the implicit feature grouping strategy, the corresponding feature variables in the current blood donation data can be combined to obtain an implicit feature group.
[0061] Among them, according to the combination relationship of each feature variable in the explicit feature grouping strategy, the corresponding feature variables in the current blood donation data can be combined to obtain multiple explicit features, and an explicit feature group can be obtained from the multiple explicit features.
[0062] Similarly, based on the feature variable combination relationship in the implicit feature grouping strategy, some features in the current blood donation data can be combined to obtain multiple implicit features, thereby forming an implicit feature group.
[0063] Some designated single feature variables in the current blood donation data are respectively used as an original feature, thereby forming an original feature group.
[0064] Among them, the explicit feature group includes explicit feature variables that are easy to interpret medically. For example, the explicit feature obtained by combining age and systolic blood pressure is used to characterize the cardiovascular load index; the explicit feature obtained by combining systolic blood pressure and diastolic blood pressure is used to characterize the blood pressure difference, etc.
[0065] The implicit feature group contains high-dimensional implicit feature variables with high information value. For example, blood donation time period, blood donation season, and blood donation location constitute an implicit feature.
[0066] The original feature group contains original features that have not been combined in any way, such as the age, gender, blood pressure and other information of the blood donor, each of which is regarded as an original feature.
[0067] S103. Based on the feature set of the blood donor, a plurality of base models are used to perform a first prediction to determine a plurality of initial prediction results of the blood donor.
[0068] In one implementation, the feature set of the blood donor can be used as input data to each base model, and the base model can be used to perform a first prediction to obtain an initial prediction result corresponding to each base model. In other words, one base model can predict one initial prediction result.
[0069] In some possible implementations, three base models may be used, and the three base models may be respectively a LightGBM model, a logistic regression model, and a random forest model.
[0070] The LightGBM model can capture the nonlinear relationship between each feature group, thereby more accurately reflecting the implicit feature group's prediction of the final result; the logistic regression model provides a certain degree of interpretability and outputs more predictions of the explicit feature group on the final result; the random forest model can be used as a robustness baseline and outputs more predictions of the original feature group on the final result.
[0071] S104: Based on the initial prediction results and the weight information of each base model, a meta-model is used to perform a second prediction to determine a target prediction result for the blood donor.
[0072] The target prediction result is used to indicate the probability of a blood donor having a blood donation reaction during the current blood donation.
[0073] According to the weight information of each base model, the initial prediction results of each base model can be weighted, and the processing results are input as input information into the meta-model for the second prediction. The prediction results of the meta-model are the target prediction results for blood donors.
[0074] Both the initial prediction result and the target prediction result can be probability values, that is, the predicted probability of a donor experiencing one or more of the aforementioned blood donation reactions, such as syncope, hypotension, palpitations, nausea, and sweating. It is worth noting that there are many medical symptoms of blood donation reactions, not limited to those listed in this solution. Blood donors with different blood donation data may experience different blood donation reactions. This solution can predict the probability of a donor experiencing any one or more of these clearly defined medical blood donation reactions based on their blood donation data.
[0075] By comparing the target prediction result with the preset threshold, when the threshold is exceeded, it can be considered that the probability of the blood donor having a blood donation reaction is higher, while when the threshold is not exceeded, the probability of the blood donor having a blood donation reaction is lower.
[0076] In summary, the blood donation reaction prediction method provided by this embodiment includes: collecting the current blood donation data of the blood donor, the blood donation data including a plurality of feature variables and the values of each feature variable; based on the current blood donation data, using a pre-built feature grouping strategy to determine the feature set of the blood donor; based on the feature set of the blood donor, using multiple base models to make a first prediction to determine multiple initial prediction results of the blood donor; based on each initial prediction result and the weight information of each base model, using a meta-model to make a second prediction to determine the target prediction result of the blood donor. This method fully mines the blood donation data of the blood donor to obtain an explicit feature group, an implicit feature group and an original feature group, and thus combines the explicit feature group, the implicit feature group and the original feature group to predict the blood donation reaction, which can improve the accuracy of the prediction result. When predicting the model, the prediction architecture of the base model combined with the meta-model can improve the accuracy of the model prediction. Among them, the multiple base models used have different emphases in the prediction process. At the same time, combined with the weight information of each base model, the initial prediction results of each base model under the influence of the characteristics it focuses on can be obtained. Then, combined with the meta-model for final prediction, more accurate prediction results can be obtained.
[0077] Figure 2 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; optionally, the process of constructing the feature grouping strategy is as follows: S201. Based on medical prior indicators, determine the combination relationship between each feature variable, and combine some feature variables according to the combination relationship to obtain an explicit feature grouping strategy.
[0078] In some embodiments, the combination relationship between the feature variables in the blood donation data can be determined based on some medical prior indicators to obtain an explicit feature grouping strategy.
[0079] The explicit feature grouping strategy includes the combination relationship between different feature variables.
[0080] For example, the explicit feature grouping strategy may include: combinations of first-time blood donor and age, blood donation period and blood pressure, age and systolic blood pressure, etc. By combining the corresponding single feature variables in the blood donation data according to each combination, multiple explicit features can be obtained, thereby forming an explicit feature group.
[0081] For example, based on medical a priori indicators: young first-time blood donors may have a higher risk of blood donation reactions due to nervousness, it can be determined that the two characteristic variables of "whether it is the first time to donate blood - age" are combined to obtain an explicit feature; and based on medical a priori indicators: the natural increase in blood pressure in the afternoon may increase the risk of blood donation reactions, it can be determined that the two characteristic variables of "blood donation time - blood pressure" are combined to obtain an explicit feature.
[0082] S202: Using a decision tree algorithm, splitting the characteristic variables in the blood donation record data is performed to determine the high-order interaction relationship between the characteristic variables.
[0083] For the implicit feature grouping strategy, since high-dimensional information variables with high information value are often difficult to obtain, the high-order interaction relationship between each feature variable can be obtained by establishing a LightGBM model.
[0084] S203. According to the high-order interaction relationship between each feature variable, each feature variable is cross-combined to obtain an implicit feature grouping strategy.
[0085] In some embodiments, the blood donation data of the sample blood donors can be input into the LightGBM model as training set data for training, and each decision tree will assign the samples to different leaf nodes according to the feature segmentation rules. The position (index) of each leaf node represents the final grouping result of the sample in the tree. For example, if a tree has 10 leaf nodes, each sample will be assigned an index from 0 to 9. Subsequently, the training results of the model are tuned with the validation set, and the model with better tuning results is used as a benchmark to obtain the newly generated feature cross-combinations (leaf nodes) during the training process. These newly generated leaf nodes are the combination relationships of the feature variables obtained under the implicit feature grouping strategy.
[0086] Optionally, since the newly acquired leaf nodes are numerous and complex, treating all of them as implicit features may reduce the accuracy of model predictions due to the inclusion of a large number of low-contribution features. Therefore, it is necessary to initially screen out low-contribution features by outputting node feature importance. Furthermore, since the newly acquired leaf nodes are not directly compatible with subsequent models, a binary feature (0 / 1) is generated for each index using one-hot encoding. Furthermore, to enhance the subsequent interpretability of the model, each high-contribution feature introduced into the model can be renamed to an easily understandable variable name based on the index of the split node.
[0087] That is, each node of the LightGBM model corresponds to a feature variable. According to the splitting pattern of the feature variables, the feature variables on different nodes can be combined to obtain implicit features. However, the generated implicit features are named after the index of the node in the model and have no actual physical meaning. Therefore, the implicit features with physical meaning are obtained by combining the names of the feature variables represented by the nodes themselves.
[0088] It is worth noting that in this embodiment, the collected data on the current donation of a blood donor may include, but is not limited to, basic information such as the donor's age, gender, weight, height, and whether or not it is their first time donating blood. It may also include physiological indicators such as blood pressure, blood lipids, blood sugar, and heart rate fluctuations. Furthermore, it may also include environmental indicators such as the ambient temperature and humidity of the donation location. For example, donation reactions are more likely to occur at locations with high temperatures and humidity.
[0089] In addition, the immediate reaction status of the blood donor and the change in reaction status after 24-hour follow-up can be obtained as a reference for whether the blood donor has a blood donation reaction.
[0090] In some embodiments, categorical variables can also be derived based on characteristic variables such as the blood donation location and the blood donor's occupation. For example, based on the blood donation location, categorical variables such as fixed blood donation site or mobile blood donation site can be derived; based on the blood donor's occupation, categorical variables such as in-system or out-of-system position can be derived.
[0091] New features can be derived from time series features. For example, based on the time of blood donation, characteristic variables such as blood donation period and blood donation season can be derived.
[0092] Figure 3 A flow chart of another blood donation response prediction method provided in an embodiment of the present application; optionally, in step S104, a second prediction is performed using a meta-model based on each initial prediction result and weight information of each base model to determine a target prediction result for the blood donor, which may include: S301. Perform weighted processing on each initial prediction result according to the weight information of each base model to obtain an intermediate prediction result.
[0093] In one approach, the initial prediction results of each base model can be weighted according to the weight information of each base model using a simple weighted average method to obtain an intermediate prediction result.
[0094] In addition to the weighted method, a tree model can also be used to learn the complex combination relationship of each base model, so as to fuse the initial prediction results of each base model to obtain the intermediate prediction results.
[0095] S302: Input the intermediate prediction result as input data into the meta-model, perform a second prediction through the meta-model, and obtain the target prediction result of the blood donor.
[0096] The intermediate prediction results are input into the meta-model as input data, and the meta-model performs a second prediction to obtain the target prediction results of the blood donors.
[0097] Figure 4 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; optionally, the training process of the base model is as follows: S401. Collect a sample data set, where the sample data set includes: sample blood donation record data of the sample blood donor and blood donation response information corresponding to each sample blood donation record data; the sample blood donation record data includes multiple feature variables and the value of each feature variable; the feature variables include: basic information and physiological indicators of the blood donor.
[0098] Next, the training process of the base model and meta-model is explained.
[0099] The collected sample data set may include multiple samples, and the sample blood donation record data of each sample blood donor and the actual blood donation response information of the sample blood donor may be regarded as a sample.
[0100] The various characteristic variables included in the sample blood donation record data are the same as the various characteristic variables in the current blood donation data used in the above-mentioned prediction of blood donors.
[0101] The actual blood donation response information of the sample blood donors is used as the label information of the sample to guide the training of the model.
[0102] S402: Using the sample data set, train and obtain a base model.
[0103] Each base model can be trained and obtained through each sample data in the above sample data set.
[0104] Figure 5 A flowchart of another blood donation reaction prediction method provided in an embodiment of the present application; optionally, in step S401, collecting a sample data set may include: S501: Collect an initial sample data set, and sort each sample blood donation record data in the initial sample data set according to the blood donation time.
[0105] In some embodiments, an initial sample data set may be collected, which includes sample blood donation record data of each sample blood donor and blood donation response information corresponding to each sample blood donation record data, but the sample blood donation record data of each sample blood donor are disordered.
[0106] It's worth noting that a single blood donor can have multiple blood donation records collected for each individual, and each record can be used as a single sample. Because the values of some characteristic variables can change between donations from the same donor, and the results of blood donation reactions are not fixed—some reactions may or may not occur—a single blood donation record can be used independently as a single sample.
[0107] The blood donation record data of each sample in the initial sample data set can be sorted according to the blood donation time in the blood donation record data of each sample.
[0108] S502. Use a preset time sliding window to slide and obtain the first training data, the first verification data, the second training data, and the second verification data from the sorted blood donation record data; the blood donation time period corresponding to the second training data includes the blood donation time period corresponding to the first training data, and includes blood donation record data later than the blood donation time period corresponding to the first training data.
[0109] Define a preset time sliding window, where an annual sliding window can be defined, to progressively divide the blood donation record data of each sample in the initial sample data set.
[0110] Assume that the initial sample dataset contains sample blood donation records from multiple consecutive years. Window 1 can be used to obtain data from the sorted blood donation records from 2019 to 2022 as the first training data, and window 2 can be used to obtain data from 2023 as the first validation data. The data from window 1 plus window 2 can then be used as the second validation data. Window 2 can be further slid to obtain data from 2024 as the second validation data.
[0111] By dividing the data into first training data, second training data, first validation data and second validation data, time series cross validation can be performed.
[0112] Figure 6 A flowchart of another blood donation reaction prediction method provided in an embodiment of the present application is provided. Optionally, in step S402, using a sample data set to train a base model may include: S601: Use first training data to perform first training on a base model, and use first verification data to verify the first trained base model to obtain a first verification result.
[0113] The first training data may be used to perform a first round of training on the base model, and the first verification data may be used to verify the base model after the first round of training to obtain a first verification result.
[0114] S602: Use the second training data to perform a second training of the base model, and use the second verification data to verify the second trained base model to obtain a second verification result.
[0115] Then, the second training data is used to perform a second round of training on the base model, and the second verification data is used to verify the base model after the second round of training to obtain a second verification result.
[0116] S603: Determine difference information according to the first verification result and the second verification result.
[0117] The two rounds of validation results can be compared, that is, the first validation result and the second validation result can be compared to calculate the fluctuation difference of the AUC (Area Under the Curve) between the two.
[0118] AUC is a commonly used evaluation metric in machine learning. It most commonly refers to the area under the receiver operating characteristic (ROC) curve (AUC-ROC), but it can also refer to the area under other curves, such as the precision-recall (PR) curve. It is primarily used to evaluate the performance of binary classification models.
[0119] S604: If the difference information exceeds a preset threshold, the initial sample data set is screened according to the blood donation time of each blood donation record data in the initial sample data set.
[0120] If the AUC fluctuation difference between the first verification result and the second verification result exceeds the preset threshold, it can be proved that there is a timeliness problem with the data, that is, the weight of early data on the model prediction results should be reduced to ensure the reliability of the model for the current prediction results.
[0121] The preset threshold may be, for example, 1.5%.
[0122] S605: Retrain the base model based on the screened initial sample data set.
[0123] Therefore, when the above conditions are met, the sample blood donation record data that is far away from the current time in the initial sample data set can be deleted, and as much recent data as possible can be retained.
[0124] Based on the screened initial sample data set, the base model can be trained again to obtain a trained base model.
[0125] Figure 7 A flow chart of another blood donation reaction prediction method provided in an embodiment of the present application; optionally, the weight information of each base model is determined as follows: S701. Determine a sample explicit feature group, a sample implicit feature group, and a sample original feature group based on the blood donation record data of the sample blood donor.
[0126] Similarly, the blood donation record data of the sample blood donors also need to be feature grouped. The grouping method is the same as above, and the sample explicit feature group, sample implicit feature group and sample original feature group can be obtained respectively.
[0127] S702 , respectively calculating the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group. The contribution value is used to represent the degree of influence of the feature group on the prediction result.
[0128] Next, the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group can be calculated respectively.
[0129] The contribution value of each feature variable in each feature group can be calculated separately, and then the contribution value of the feature group can be obtained. The larger the contribution value, the greater the influence of the feature group on the prediction result.
[0130] S703 : Determine weight information of each base model according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group.
[0131] In some embodiments, the weight information of each base model can be obtained by using the contribution values of different feature groups according to the emphasis of each base model when making predictions.
[0132] Figure 8 A flowchart of another blood donation reaction prediction method provided in an embodiment of the present application; optionally, calculating the contribution value of the sample explicit feature group may include: S801: Calculate the intra-group contribution value of each combination feature in the sample explicit feature group.
[0133] This embodiment takes the calculation of the contribution value of the sample explicit feature group as an example.
[0134] Among them, both the sample explicit feature group and the sample original feature group can be directly based on the influence of the feature variables in their respective feature groups on the prediction results; the sample implicit feature group needs to combine the process of splitting the LightGBM model to generate leaf nodes and recursively calculate the contribution value within the group.
[0135] Alternatively, you can use the Tree SHAP (Tree SHapley Additive exPlanations) algorithm to recursively traverse the nodes of the decision tree, calculate the marginal contribution of the features at each split point, and finally perform weighted aggregation to obtain the contribution value of each feature to the i-th sample.
[0136] Through the above calculation, the intra-group contribution value of each feature variable in the explicit feature group can be obtained.
[0137] S802: Filter the combined features within the sample explicit feature group according to the ranking result of the contribution value within the group of each combined feature.
[0138] Next, according to the ranking results of the contribution values of each feature variable within the group, feature variables with smaller contribution values can be eliminated to reduce the feature dimension.
[0139] S803: Determine the contribution value of the sample explicit feature group after screening based on the intra-group contribution value of each combined feature in the sample explicit feature group after screening.
[0140] Based on the sample explicit feature group with some low contribution values eliminated, the intra-group contribution value of each feature variable in the sample explicit feature group can be recalculated according to the above method to obtain the contribution value of the sample explicit feature group.
[0141] It is worth noting that since the feature variables in the sample implicit feature group may generate high-cardinality categorical variables due to the intersection of high-dimensional features, for such variables, the implicit features can be converted into numerical features through target encoding.
[0142] Among them, target encoding converts high-dimensional categorical variables into numerical types by replacing each category of the high-dimensional categorical variable with the statistical value of the target variable corresponding to the category (such as mean, median, etc.), thereby retaining the association information between the category and the target variable and reducing the dimension.
[0143] Through this processing, high-dimensional implicit features can be converted into one-dimensional variables to achieve feature dimensionality reduction and reduce the amount of data calculation.
[0144] Optionally, in step S703, the weight information of each base model is determined according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group and the contribution value of the sample original feature group, which may include: according to the correspondence between each base model and each sample feature group, respectively using the contribution value of the sample feature group corresponding to each base model to determine the weight information of each base model.
[0145] As described above, the three base models can be LightGBM model, logistic regression model and random forest model respectively.
[0146] Since the LightGBM model reflects more of the prediction of the implicit feature group on the final result, the weight information of the LightGBM model can be determined according to the contribution value of the implicit feature group; the logistic regression model outputs more of the prediction of the explicit feature group on the final result, so the weight information of the logistic regression model can be determined according to the contribution value of the explicit feature group; the random forest model outputs more of the prediction of the original feature group on the final result, so the weight information of the random forest model can be determined according to the contribution value of the original feature group.
[0147] In one implementation, the contribution value of the implicit feature group can be directly used as the weight of the LightGBM model; the contribution value of the explicit feature group can be used as the weight of the logistic regression model; and the contribution value of the original feature group can be used as the weight of the random forest model.
[0148] In another implementation, the proportions of the contribution value of the implicit feature group, the contribution value of the explicit feature group, and the contribution value of the original feature group to the total contribution value may be determined, and the proportions may be used as weights of the corresponding base models.
[0149] Figure 9 A flow chart of another method for predicting blood donation reactions provided in an embodiment of the present application; optionally, the method of the present application may further include: S901. Update the contribution value of each sample feature group in real time based on the blood donation record data of new sample donors obtained in real time.
[0150] In some embodiments, the weight information of each base model in this solution may also change dynamically based on the influx of new blood donation data.
[0151] When new blood donation data is added to the sample data set, the contribution values of the explicit feature group, implicit feature group, and original feature group will change, thereby affecting the weight information of each base model.
[0152] Based on the newly-inflowed blood donation data, the contribution values of the explicit feature group, the implicit feature group, and the original feature group can be recalculated according to the above method.
[0153] S902: Update the weight information of each base model in real time according to the updated contribution value of each sample feature group.
[0154] Then, according to the contribution values of the explicit feature group, implicit feature group and original feature group, the weight information of each corresponding base model is updated.
[0155] By updating the weight information of the base model in real time, model lag caused by static weights can be avoided.
[0156] For example, in winter, the feature contribution value of "whether it is the first blood donation-season" changes, so the contribution value of the explicit feature group changes, and the weight of the corresponding base model changes to enhance the risk capture in low temperature environment.
[0157] Figure 10 A flow chart of another method for predicting blood donation reactions provided in an embodiment of the present application; the training process of the meta-model is as follows: S1001. Input each sample blood donation record data in the initial sample data set into each base model, perform blood donation response prediction through each base model, and obtain the initial prediction result of each base model corresponding to each sample blood donation record data.
[0158] Optionally, the input to the meta-model is a fusion of the outputs of the base models. Therefore, after the base models are trained, each sample blood donation record in the initial sample dataset can be used as input data to perform predictions using the base models, obtaining initial prediction results for each sample blood donation record from each base model.
[0159] S1002. Determine an intermediate prediction result for each piece of sample blood donation record data based on the initial prediction result of each base model corresponding to each piece of sample blood donation record data and the weight information of each base model.
[0160] Then, the initial prediction results of each base model corresponding to each sample blood donation record data are weighted by the weight information of each base model to obtain the intermediate prediction results of each sample blood donation record data.
[0161] S1003: Using the intermediate prediction results of each piece of sample blood donation record data and the blood donation response information corresponding to each piece of sample blood donation record data, a meta-model is trained.
[0162] Then, the intermediate prediction results of each sample blood donation record data and the actual blood donation response information corresponding to each sample blood donation record data are used as training sample data to train the meta-model.
[0163] Among them, the meta-model can adopt a logistic regression model.
[0164] By dynamically adjusting the weight of the base model according to the contribution values of different feature groups, the advantages of different feature groups can be complemented. When the contribution value of the explicit feature group is large, the meta-model is more inclined to interpretability, and when the contribution value of the implicit feature group is large, the meta-model is more inclined to capture complex features.
[0165] In addition, this solution can also generate an explainable report. The model can output the important features in the feature set that are likely to cause blood donation reactions based on the importance of the prediction results.
[0166] Figure 11 This diagram shows a feature importance diagram for an embodiment of the present application. The horizontal axis represents the feature variables, including explicit, implicit, and original feature variables, while the vertical axis represents the importance of the feature variables to the prediction results. It can be seen that features such as blood donation location, age at donation, and vascular load index are relatively important.
[0167] In summary, the blood donation reaction prediction method provided by this embodiment includes: collecting the current blood donation data of the blood donor, the blood donation data including a plurality of feature variables and the values of each feature variable; based on the current blood donation data, using a pre-built feature grouping strategy to determine the feature set of the blood donor; based on the feature set of the blood donor, using multiple base models to make a first prediction to determine multiple initial prediction results of the blood donor; based on each initial prediction result and the weight information of each base model, using a meta-model to make a second prediction to determine the target prediction result of the blood donor. This method fully mines the blood donation data of the blood donor to obtain an explicit feature group, an implicit feature group and an original feature group, and thus combines the explicit feature group, the implicit feature group and the original feature group to predict the blood donation reaction, which can improve the accuracy of the prediction result. When predicting the model, the prediction architecture of the base model combined with the meta-model can improve the accuracy of the model prediction. Among them, the multiple base models used have different emphases in the prediction process. At the same time, combined with the weight information of each base model, the initial prediction results of each base model under the influence of the characteristics it focuses on can be obtained. Then, combined with the meta-model for final prediction, more accurate prediction results can be obtained.
[0168] Secondly, the weight of the base model is determined by the contribution value of the feature group, so that the weight of the base model can be dynamically adjusted with the influx of new data to avoid the lag of model prediction.
[0169] In addition, the sample data set is processed through a time sliding window to verify the time sensitivity of the model, thereby effectively screening the sample data to improve the reliability of the model for the current prediction results.
[0170] The following describes the apparatus, equipment, storage medium, etc. used to execute the blood donation reaction prediction method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0171] Figure 12 This is a schematic diagram of a blood donation reaction prediction device provided in an embodiment of the present application. The functions implemented by the blood donation reaction prediction device correspond to the steps performed by the above method. The device can be understood as the above server, or the server's processor, or can be understood as a component independent of the above server or processor that implements the functions of the present application under the control of the server, such as Figure 12 As shown, the apparatus may include: a collection module 120, a determination module 121, and a prediction module 122; The collection module 120 is used to collect the current blood donation data of the blood donor, which includes multiple characteristic variables and the values of each characteristic variable; the characteristic variables include: basic information and physiological indicators of the blood donor; Determination module 121 is used to determine the feature set of the blood donor based on the current blood donation data using a pre-established feature grouping strategy, wherein the feature set includes an explicit feature group, an implicit feature group, and an original feature group; the explicit feature group is used to represent feature variables that are easy to interpret medically, and the implicit feature group is used to represent high-dimensional feature variables that contain high-value information; The prediction module 122 is configured to perform a first prediction based on a feature set of the blood donor using a plurality of base models to determine a plurality of initial prediction results for the blood donor; The prediction module 122 is used to perform a second prediction using a meta-model based on the initial prediction results and the weight information of each base model to determine the target prediction result of the blood donor. The target prediction result is used to indicate the probability of the blood donor having a blood donation reaction during the current blood donation.
[0172] Optionally, it further includes: a building module; A construction module is used to determine the combination relationship between each feature variable based on medical prior indicators, and to combine some feature variables according to the combination relationship to obtain an explicit feature grouping strategy; The decision tree algorithm is used to split the characteristic variables in the blood donation record data and determine the high-order interaction relationship between the characteristic variables; According to the high-order interaction relationship between each feature variable, each feature variable is cross-combined to obtain an implicit feature grouping strategy.
[0173] Optionally, the determination module 121 is specifically configured to combine corresponding feature variables in the current blood donation data according to the explicit feature grouping strategy to obtain an explicit feature group; According to the implicit feature grouping strategy, the corresponding feature variables in the current blood donation data are combined to obtain the implicit feature group; The specified feature variables in the current blood donation data are used to form the original feature group.
[0174] Optionally, the prediction module 122 is specifically configured to input the feature set of the blood donor as input data into each base model, perform a first prediction using the base model, and obtain initial prediction results corresponding to each base model.
[0175] Optionally, the prediction module 122 is specifically configured to perform weighted processing on each initial prediction result according to weight information of each base model to obtain an intermediate prediction result; The intermediate prediction results are input into the meta-model as input data, and the second prediction is performed through the meta-model to obtain the target prediction results of the blood donors.
[0176] Optionally, it further includes: a training module; The training module is used to collect a sample data set, which includes: sample blood donation record data of sample blood donors and blood donation response information corresponding to each sample blood donation record data; the sample blood donation record data includes multiple feature variables and the values of each feature variable; the feature variables include: basic information and physiological indicators of the blood donors; The sample data set is used to train the base model.
[0177] Optionally, the training module is specifically used to collect an initial sample data set and sort each sample blood donation record data in the initial sample data set according to the blood donation time; A preset time sliding window is used to slide from the sorted blood donation record data to obtain the first training data, the first verification data, the second training data, and the second verification data; the blood donation time period corresponding to the second training data includes the blood donation time period corresponding to the first training data, and includes blood donation record data later than the blood donation time period corresponding to the first training data.
[0178] Optionally, the training module is specifically configured to perform first training of the base model using first training data, and to verify the first trained base model using first verification data to obtain a first verification result; Performing a second training of the base model using the second training data, and verifying the second trained base model using the second verification data to obtain a second verification result; Determining difference information based on the first verification result and the second verification result; If the difference information exceeds the preset threshold, the initial sample data set is screened according to the blood donation time of each blood donation record data in the initial sample data set; The base model is retrained based on the filtered initial sample data set.
[0179] Optionally, the determination module 121 is further configured to determine the sample explicit feature group, the sample implicit feature group, and the sample original feature group based on the blood donation record data of the sample blood donor; Calculate the contribution value of the sample's explicit feature group, the sample's implicit feature group, and the sample's original feature group respectively. The contribution value is used to characterize the degree of influence of the feature group on the prediction result. The weight information of each base model is determined according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group and the contribution value of the sample original feature group.
[0180] Optionally, the determination module 121 is specifically configured to respectively calculate the intra-group contribution value of each combined feature in the sample explicit feature group; According to the ranking results of the contribution values of each combined feature within the group, the combined features within the sample explicit feature group are screened; Based on the intra-group contribution value of each combined feature in the filtered sample explicit feature group, the contribution value of the filtered sample explicit feature group is determined.
[0181] Optionally, the determination module 121 is specifically configured to determine the weight information of each base model by using the contribution value of the sample feature group corresponding to each base model according to the correspondence between each base model and each sample feature group.
[0182] Optionally, it further includes: an update module; An updating module is used to update the contribution value of each sample feature group in real time based on the blood donation record data of new sample donors obtained in real time; According to the contribution value of each sample feature group after update, the weight information of each base model is updated in real time.
[0183] Optionally, the training module is further configured to input each sample blood donation record data in the initial sample data set into each base model, perform blood donation response prediction using each base model, and obtain an initial prediction result of each base model corresponding to each sample blood donation record data; Determine an intermediate prediction result for each piece of sample blood donation record data based on the initial prediction result of each base model corresponding to each piece of sample blood donation record data and the weight information of each base model; The meta-model is trained using the intermediate prediction results of each sample blood donation record data and the blood donation response information corresponding to each sample blood donation record data.
[0184] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0185] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital singular processors (DSPs), or one or more field programmable gate arrays (FPGAs). For example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0186] The above modules can be connected or communicate with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.
[0187] Figure 13 This is a structural diagram of an electronic device provided in an embodiment of the present application. The device can be a computing device with data processing capabilities.
[0188] The device may include: a processor 801 and a storage medium 802 .
[0189] The storage medium 802 is used to store programs, and the processor 801 calls the programs stored in the storage medium 802 to execute the above method embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.
[0190] Among them, the storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 executes the various steps of the blood donation reaction prediction method according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0191] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0192] The storage medium 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The storage medium may include at least one type of storage medium, such as flash memory, a hard disk, a multimedia card, a card-type storage medium, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic storage medium, a magnetic disk, an optical disk, and the like. The storage medium is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these. The storage medium 802 in the embodiments of the present application may also be a circuit or any other device capable of performing a storage function, used to store program instructions and / or data.
[0193] Optionally, the present application also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to perform the above method embodiment when executed by a processor.
[0194] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0195] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0196] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0197] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard drives, read-only storage media (English: Read-Only Memory, abbreviated: ROM), random access storage media (English: Random Access Memory, abbreviated: RAM), magnetic disks or optical disks, and other media that can store program code.
Claims
1. A blood donation reaction prediction method, characterized in that: include: Collecting current blood donation data of a blood donor, wherein the blood donation data includes a plurality of characteristic variables and values of each characteristic variable; The characteristic variables include: basic information and physiological indicators of blood donors; Based on the current blood donation data, a pre-established feature grouping strategy is used to determine a feature set of the blood donor, wherein the feature set includes an explicit feature group, an implicit feature group, and an original feature group; the explicit feature group is used to characterize feature variables that are easy to interpret medically, and the implicit feature group is used to characterize high-dimensional feature variables that contain high-value information; Performing a first prediction using a plurality of base models according to the feature set of the blood donor to determine a plurality of initial prediction results for the blood donor; According to each initial prediction result and the weight information of each base model, a meta-model is used to perform a second prediction to determine the target prediction result of the blood donor, and the target prediction result is used to indicate the probability of the blood donor having a blood donation reaction during the current blood donation.
2. The method according to claim 1, characterized in that The construction process of the feature grouping strategy is as follows: Based on medical prior indicators, the combination relationship between each feature variable is determined, and according to the combination relationship, some feature variables are combined to obtain an explicit feature grouping strategy; The decision tree algorithm is used to split the characteristic variables in the blood donation record data and determine the high-order interaction relationship between the characteristic variables; According to the high-order interaction relationship between each feature variable, each feature variable is cross-combined to obtain an implicit feature grouping strategy.
3. The method according to claim 2, characterized in that The method of determining the feature set of the blood donor based on the current blood donation data using a pre-built feature grouping strategy includes: Combining corresponding feature variables in the current blood donation data according to the explicit feature grouping strategy to obtain the explicit feature group; According to the implicit feature grouping strategy, corresponding feature variables in the current blood donation data are combined to obtain the implicit feature group; The original feature group is formed by using the designated feature variables in the current blood donation data.
4. The method according to claim 1, wherein The step of performing a first prediction based on the feature set of the blood donor using multiple base models to determine multiple initial prediction results for the blood donor includes: The feature set of the blood donor is input as input data to each base model respectively, and a first prediction is performed through the base model to obtain initial prediction results corresponding to each base model respectively.
5. The method according to claim 1, wherein The method of performing a second prediction using a meta-model based on the initial prediction results and the weight information of each base model to determine the target prediction result of the blood donor includes: According to the weight information of each base model, each initial prediction result is weighted to obtain the intermediate prediction result; The intermediate prediction result is input into the meta-model as input data, and a second prediction is performed through the meta-model to obtain a target prediction result of the blood donor.
6. The method according to any one of claims 1 to 5, characterized in that The training process of the base model is as follows: Collecting a sample data set, the sample data set including: sample blood donation record data of a sample blood donor and blood donation response information corresponding to each sample blood donation record data; the sample blood donation record data including multiple feature variables and values of each feature variable; the feature variables including: basic information and physiological indicators of the blood donor; The base model is obtained by training using the sample data set.
7. The method according to claim 6, characterized in that The collected sample data set includes: Collecting an initial sample data set, and sorting each sample blood donation record data in the initial sample data set according to the blood donation time; A preset time sliding window is used to slide from the sorted blood donation record data to obtain first training data, first verification data, second training data, and second verification data; the blood donation time period corresponding to the second training data includes the blood donation time period corresponding to the first training data, and includes blood donation record data later than the blood donation time period corresponding to the first training data.
8. The method according to claim 7, characterized in that The adopting the sample data set to train and obtain the base model includes: Performing first training of a base model using the first training data, and verifying the first trained base model using the first verification data to obtain a first verification result; Performing a second training of the base model using the second training data, and verifying the second trained base model using the second verification data to obtain a second verification result; determining difference information according to the first verification result and the second verification result; If the difference information exceeds a preset threshold, the initial sample data set is screened according to the blood donation time of each blood donation record data in the initial sample data set; The base model is obtained by retraining based on the screened initial sample data set.
9. The method according to claim 6, characterized in that The process of determining the weight information of each base model is as follows: Determining the sample explicit feature group, the sample implicit feature group, and the sample original feature group according to the blood donation record data of the sample blood donor; Calculate the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group respectively. The contribution value is used to represent the degree of influence of the feature group on the prediction result; The weight information of each base model is determined according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group and the contribution value of the sample original feature group.
10. The method according to claim 9, characterized in that Calculating the contribution value of the sample explicit feature group includes: Calculating the intra-group contribution value of each combined feature in the sample explicit feature group respectively; Screening the combined features within the sample explicit feature group according to the ranking results of the contribution values of the combined features within the group; Based on the intra-group contribution value of each combined feature in the filtered sample explicit feature group, the contribution value of the filtered sample explicit feature group is determined.
11. The method according to claim 9, characterized in that The weight information of each base model is determined according to the contribution value of the sample explicit feature group, the contribution value of the sample implicit feature group, and the contribution value of the sample original feature group, including: According to the corresponding relationship between each base model and each sample feature group, the contribution value of the sample feature group corresponding to each base model is used to determine the weight information of each base model.
12. The method according to claim 9, characterized in that The method further comprises: Based on the blood donation record data of new sample donors obtained in real time, the contribution value of each sample feature group is updated in real time; According to the contribution value of each sample feature group after update, the weight information of each base model is updated in real time.
13. The method according to claim 7, characterized in that The training process of the meta-model is as follows: Inputting each sample blood donation record data in the initial sample data set into each base model, performing blood donation response prediction using each base model, and obtaining an initial prediction result of each base model corresponding to each sample blood donation record data; Determine an intermediate prediction result for each piece of sample blood donation record data based on the initial prediction result of each base model corresponding to each piece of sample blood donation record data and the weight information of each base model; The meta-model is obtained by training using the intermediate prediction results of each sample blood donation record data and the blood donation response information corresponding to each sample blood donation record data.
14. A blood donation reaction prediction device, characterized in that: include: Acquisition module, determination module and prediction module; The collection module is used to collect the current blood donation data of the blood donor, and the blood donation data includes multiple characteristic variables and the value of each characteristic variable; The characteristic variables include: basic information and physiological indicators of blood donors; The determination module is configured to determine, based on the current blood donation data, a feature set of the blood donor using a pre-established feature grouping strategy, wherein the feature set includes an explicit feature group, an implicit feature group, and an original feature group; the explicit feature group is configured to characterize feature variables that are easily medically interpretable, and the implicit feature group is configured to characterize high-dimensional feature variables that contain high-value information; The prediction module is configured to perform a first prediction using a plurality of base models based on the feature set of the blood donor to determine a plurality of initial prediction results for the blood donor; The prediction module is used to perform a second prediction using a meta-model based on the initial prediction results and the weight information of each base model to determine the target prediction result of the blood donor. The target prediction result is used to indicate the probability of the blood donor having a blood donation reaction during the current blood donation.
15. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to implement the blood donation reaction prediction method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which is used to implement the blood donation reaction prediction method according to any one of claims 1 to 13 when executed by the processor.
Citation Information
Patent Citations
Method for establishing blood transfusion adverse reaction database, storage system and active early warning system
CN111063448A
Intelligent decision-making method and system for blood donation
CN114496209A
Processing method, device and processing equipment for thrombolysis risk dynamic evaluation model
CN118262910A
Training method of after-sales auditing model and after-sales auditing method and device
CN119693011A
Blood transfusion treatment scheme recommendation system and method based on historical information
CN119920400A
Cited By
Whole blood donation adverse reaction risk prediction method and system
CN121054268A
Blood donation adverse reaction risk prediction method and system based on stratified blood volume estimation
CN122494263A