Blood donation reaction prediction method and device, electronic equipment and storage medium

By combining a multi-feature grouping strategy and a base model with a meta-model prediction architecture, the problem of insufficient accuracy and fixed model weights in blood donation reaction prediction in existing technologies is solved, achieving efficient and accurate prediction of blood donation reaction that adapts to changes in data and time.

CN120748747BActive Publication Date: 2026-01-02ZHEJIANG PROVINCIAL BLOOD CENT

Patent Information

Application Number
CN202511262235.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2026-01-02
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

Existing technologies rely on a single analytical variable in predicting blood donation reactions, resulting in poor accuracy of predictions. They cannot effectively capture dynamic physiological changes and multi-factor interaction effects, and the fixed model weights cannot be dynamically adjusted, lacking time sensitivity and generalization ability.

Method used

A multi-feature grouping strategy is adopted, combining explicit feature groups, implicit feature groups, and original feature groups. Through the prediction architecture of base model and meta-model, LightGBM is used to capture high-order interaction relationships, dynamically adjust the weights of base model, and verify model performance through time sliding window to improve prediction accuracy.

Benefits of technology

It improves the accuracy of blood donation reaction prediction, can dynamically adjust model weights to adapt to data changes, enhances generalization ability in the time dimension, and ensures that the model performs well on historical data and accurately predicts new data in future time periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120748747B_ABST
    Figure CN120748747B_ABST
Patent Text Reader

Abstract

The application provides a blood donation reaction prediction method and device, electronic equipment and storage medium, and relates to the technical field of medical analysis. The method comprises the following steps: collecting current blood donation data of a blood donor, wherein the blood donation data comprises a plurality of characteristic variables and values of the characteristic variables; determining a characteristic set of the blood donor by using a pre-constructed characteristic grouping strategy according to the current blood donation data; performing first prediction by using a plurality of base models according to the characteristic set of the blood donor, to determine a plurality of initial prediction results of the blood donor; and performing second prediction by using a meta model according to the initial prediction results and weight information of the base models, to determine a target prediction result of the blood donor. The method can improve the accuracy of the prediction result by fully mining the blood donation data of the blood donor. When the model is predicted, the prediction architecture of the base model combined with the meta model can improve the accuracy of the model prediction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical analysis, in particular to a blood donation reaction prediction method and device, an electronic device and a storage medium. BACKGROUND

[0002] Blood donation reactions (such as syncope, hypotension, palpitations, nausea, sweating, etc.) are common adverse reactions during blood donation, which can have a short-term impact on the physical and mental health of blood donors, and can also reduce the willingness of blood donors to donate blood again. Therefore, predicting blood donation reactions of blood donors can help optimize the blood donation process and services, and can also take preventive measures in advance for blood donors with blood donation reactions to protect their physical and mental health.

[0003] Currently, whether a blood donor will have a blood donation reaction is usually evaluated by collecting the basic information of the blood donor in combination with an investigation of the blood donor's living habits, measurement of the blood donor's basic vital signs, and the blood donor's previous blood donation experience.

[0004] The above method relies on a single analysis variable, resulting in poor accuracy of blood donation reaction prediction results. SUMMARY

[0005] The present application aims to overcome the deficiencies in the 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-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:

[0007] In a first aspect, the embodiments of the present application provide a blood donation reaction prediction method, comprising:

[0008] Collecting current blood donation data of a blood donor, the blood donation data comprising a plurality of feature variables and values of the feature variables; the feature variables comprising basic information and physiological indicators of the blood donor;

[0009] According to the current blood donation data, a pre-constructed feature grouping strategy is used to determine a feature set of the blood donor, the feature set comprising 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 be interpreted by medicine, and the implicit feature group is used to represent high-dimensional feature variables that contain high-value information;

[0010] According to the feature set of the blood donor, a plurality of base models are used for first prediction to determine a plurality of initial prediction results of the blood donor;

[0011] According to the initial prediction results and the weight information of each base model, a meta model is used for second prediction to determine a target prediction result of the blood donor, the target prediction result being used to indicate a probability of the blood donor having a blood donation reaction in current blood donation.

[0012] Optionally, the construction process of the feature grouping strategy is as follows:

[0013] Based on the medical prior indicators, a combination relationship between the feature variables is determined, and part of the feature variables is combined according to the combination relationship to obtain an explicit feature grouping strategy;

[0014] A decision tree algorithm is used to split and process each feature variable in the blood donation record data to determine a high-order interaction relationship between the feature variables;

[0015] According to the high-order interaction relationship between the feature variables, the feature variables are cross combined to obtain an implicit feature grouping strategy.

[0016] Optionally, the feature set of the blood donor is determined according to the current blood donation data and the pre-constructed feature grouping strategy, including:

[0017] According to the explicit feature grouping strategy, the corresponding feature variables in the current blood donation data are combined to obtain the explicit feature group;

[0018] 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;

[0019] The specified feature variables in the current blood donation data are used to form the original feature group.

[0020] Optionally, the multiple initial prediction results of the blood donor are determined according to the feature set of the blood donor and the first prediction of the multiple base models, including:

[0021] The feature set of the blood donor is input as input data into each base model respectively, and the first prediction is performed through the base model to obtain the initial prediction result corresponding to each base model respectively.

[0022] Optionally, the target prediction result of the blood donor is determined according to the initial prediction results and the weight information of each base model and the second prediction of the meta model, including:

[0023] According to the weight information of each base model, the initial prediction results are weighted to obtain an intermediate prediction result;

[0024] input the intermediate prediction result as input data into the meta-model, perform second prediction through the meta-model, and obtain a target prediction result of the blood donor.

[0025] Optionally, the training process of the base model is as follows:

[0026] A sample data set is collected, the sample data set including sample blood donation record data of sample blood donors and blood donation reaction information corresponding to each piece of sample blood donation record data, the sample blood donation record data including a plurality of characteristic variables and values of each characteristic variable, and the characteristic variables including basic information and physiological indexes of blood donors.

[0027] The base model is trained using the sample data set.

[0028] Optionally, the sample data set includes:

[0029] An initial sample data set is collected, and each piece of sample blood donation record data in the initial sample data set is sorted according to blood donation time.

[0030] A preset time sliding window is used to slide and obtain first training data, first validation data, second training data and second validation data from the sorted blood donation record data, the blood donation time period corresponding to the second training data including the blood donation time period corresponding to the first training data and including blood donation record data later than the blood donation time period corresponding to the first training data.

[0031] Optionally, the base model is trained using the sample data set, including:

[0032] The first training data is used to perform first training of the base model, and the first validation data is used to verify the base model after the first training, to obtain a first verification result.

[0033] The second training data is used to perform second training of the base model, and the second validation data is used to verify the base model after the second training, to obtain a second verification result.

[0034] The difference information is determined according to the first verification result and the second verification result.

[0035] If the difference information exceeds a preset threshold, the initial sample data set is filtered according to blood donation time of each blood donation record data in the initial sample data set.

[0036] The base model is retrained based on the filtered initial sample data set.

[0037] Optionally, the determination process of the weight information of each base model is as follows:

[0038] According to the blood donation record data of the sample blood donor, a sample explicit feature group, a sample implicit feature group and a sample original feature group are determined;

[0039] Contribution values of the sample explicit feature group, the sample implicit feature group and the sample original feature group are respectively calculated, and the contribution values are used to represent the influence degree of the feature groups on the prediction result;

[0040] According to the contribution values of the sample explicit feature group, the sample implicit feature group and the sample original feature group, weight information of each base model is determined.

[0041] Optionally, the calculation of the contribution value of the sample explicit feature group comprises:

[0042] The intra-group contribution values of each combined feature in the sample explicit feature group are respectively calculated;

[0043] According to the sorting result of the intra-group contribution values of each combined feature, the combined features in the sample explicit feature group are screened;

[0044] Based on the intra-group contribution values of each combined feature in the screened sample explicit feature group, the contribution value of the screened sample explicit feature group is determined.

[0045] Optionally, the determination of the weight information of each base model according to the contribution values of the sample explicit feature group, the sample implicit feature group and the sample original feature group comprises:

[0046] 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.

[0047] Optionally, the method further comprises:

[0048] According to the blood donation record data of the new sample blood donor obtained in real time, the contribution values of each sample feature group are updated in real time;

[0049] According to the updated contribution values of each sample feature group, the weight information of each base model is updated in real time.

[0050] Optionally, the training process of the meta-model is as follows:

[0051] Each piece of sample blood donation record data in the initial sample data set is input into each base model, blood donation reaction prediction is performed by each base model, and initial prediction results corresponding to each piece of sample blood donation record data of each base model are obtained;

[0052] According to initial prediction results of each base model corresponding to each sample blood donation record data and weight information of each base model, intermediate prediction results of each sample blood donation record data are determined;

[0053] The meta-model is trained by using the intermediate prediction results of each sample blood donation record data and blood donation reaction information corresponding to each sample blood donation record data.

[0054] In a second aspect, the embodiments of the present application further provide a blood donation reaction prediction device, comprising: a collection module, a determination module and a prediction module;

[0055] The collection module is configured to collect current blood donation data of a blood donor, wherein the blood donation data comprises a plurality of characteristic variables and values of the characteristic variables, and the characteristic variables comprise basic information and physiological indexes of the blood donor.

[0056] The determination module is configured to determine a characteristic set of the blood donor by using a pre-constructed characteristic grouping strategy according to the current blood donation data, wherein the characteristic set comprises an explicit characteristic group, an implicit characteristic group and an original characteristic group, the explicit characteristic group is used to represent characteristic variables that are easy to be interpreted by medicine, and the implicit characteristic group is used to represent high-dimensional characteristic variables that contain high-value information.

[0057] The prediction module is configured to perform first prediction by using a plurality of base models according to the characteristic set of the blood donor, and determine a plurality of initial prediction results of the blood donor.

[0058] The prediction module is configured to perform second prediction by using a meta-model according to the initial prediction results and weight information of each base model, and determine a target prediction result of the blood donor, wherein the target prediction result is used to indicate a probability of blood donation reaction of the blood donor in current blood donation.

[0059] Optionally, the device further comprises a construction module.

[0060] The construction module is configured to determine combination relationships between the characteristic variables based on medical prior indexes, and combine part of the characteristic variables according to the combination relationships to obtain an explicit characteristic grouping strategy.

[0061] The decision tree algorithm is used to perform splitting processing on each characteristic variable in the blood donation record data, and high-order interaction relationships between the characteristic variables are determined.

[0062] The characteristic variables are cross combined according to the high-order interaction relationships between the characteristic variables to obtain an implicit characteristic grouping strategy.

[0063] Optionally, the determination module is specifically configured to combine corresponding characteristic variables in the current blood donation data according to the explicit characteristic grouping strategy to obtain the explicit characteristic group.

[0064] According to the implicit feature grouping strategy, corresponding feature variables in the current blood donation data are combined to obtain the implicit feature group;

[0065] A specified feature variable in the current blood donation data is used to constitute the original feature group.

[0066] Optionally, the prediction module is specifically configured to input the feature set of the blood donor as input data into each base model respectively, perform first prediction through the base model, and obtain initial prediction results corresponding to each base model respectively.

[0067] 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.

[0068] The intermediate prediction result is input as input data into the meta model, second prediction is performed through the meta model, and a target prediction result of the blood donor is obtained.

[0069] Optionally, it further includes a training module.

[0070] The training module is configured to collect a sample data set, the sample data set includes sample blood donation record data of a sample blood donor and blood donation reaction information corresponding to each piece of sample blood donation record data, the sample blood donation record data includes multiple feature variables and values of each feature variable, and the feature variables include basic information and physiological indexes of the blood donor.

[0071] The base model is trained using the sample data set.

[0072] Optionally, the training module is specifically configured to collect an initial sample data set and sort each piece of sample blood donation record data in the initial sample data set according to blood donation time.

[0073] A preset time sliding window is used to obtain first training data, first validation data, second training data and second validation 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.

[0074] Optionally, the training module is specifically configured to use the first training data to perform first training of the base model, and use the first validation data to verify the base model after the first training to obtain a first verification result.

[0075] The second training of the base model is performed by using the second training data, and the second trained base model is verified by using the second verification data, and a second verification result is obtained;

[0076] According to the first verification result and the second verification result, difference information is determined;

[0077] If the difference information exceeds a preset threshold, the initial sample data set is filtered according to the blood donation time of each blood donation record data in the initial sample data set;

[0078] The base model is retrained based on the filtered initial sample data set.

[0079] Optionally, the determination module is further configured to determine a sample explicit feature group, a sample implicit feature group and a sample original feature group according to the blood donation record data of the sample blood donor;

[0080] 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 are calculated respectively, and the contribution value is used to represent the influence degree of the feature group on the prediction result;

[0081] 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, the weight information of each base model is determined.

[0082] Optionally, the determination module is specifically configured to calculate the intra-group contribution value of each combined feature in the sample explicit feature group respectively.

[0083] According to the sorting result of the intra-group contribution value of each combined feature, the combined features in the sample explicit feature group are filtered;

[0084] 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.

[0085] 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 respectively according to the corresponding relationship between each base model and each sample feature group.

[0086] Optionally, it further includes an updating module;

[0087] The updating module is configured to update the contribution value of each sample feature group in real time according to the blood donation record data of the new sample blood donor acquired in real time;

[0088] The weight information of each base model is updated in real time according to the updated contribution value of each sample feature group.

[0089] 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 reaction prediction by each base model, and obtain an initial prediction result corresponding to each sample blood donation record data of each base model;

[0090] According to the initial prediction result corresponding to each sample blood donation record data of each base model and the weight information of each base model, an intermediate prediction result of each sample blood donation record data is determined.

[0091] The meta-model is trained by using the intermediate prediction result of each sample blood donation record data and the blood donation reaction information corresponding to each sample blood donation record data.

[0092] In a third aspect, an electronic device is provided, including a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus. The processor executes the machine-readable instructions to implement the blood donation reaction prediction method provided in the first aspect.

[0093] In a fourth aspect, a computer-readable storage medium is provided. The storage medium stores a computer program. When the computer program is run by a processor, the blood donation reaction prediction method provided in the first aspect is executed.

[0094] The present application has the following beneficial effects:

[0095] The present application provides a blood donation reaction prediction method and device, an electronic device, and a storage medium. The method includes collecting current blood donation data of a blood donor, the blood donation data including multiple characteristic variables and values of the characteristic variables; determining a characteristic set of the blood donor according to the current blood donation data and a pre-constructed characteristic grouping strategy; performing first prediction on the blood donor according to the characteristic set of the blood donor and multiple base models to determine multiple initial prediction results of the blood donor; and performing second prediction on the blood donor according to the initial prediction results and weight information of the base models to determine a target prediction result of the blood donor. The method fully mines the blood donation data of the blood donor to obtain an explicit characteristic group, an implicit characteristic group, and an original characteristic group, thereby improving the accuracy of the prediction result by combining the explicit characteristic group, the implicit characteristic group, and the original characteristic group to predict the blood donation reaction. In model prediction, the prediction architecture of the base models combined with the meta-model can improve the accuracy of the model prediction. The multiple base models have different focuses in the prediction process, and the weight information of each base model is combined to obtain the initial prediction result of each base model under the influence of the characteristic focused on by each base model. The meta-model is combined for final prediction to obtain a more accurate prediction result.

[0096] 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 by the inflow of new data, avoiding the lag of model prediction.

[0097] In addition, the sample data set is processed by a time sliding window to check the time sensitivity of the model, so as to effectively screen the sample data and improve the reliability of the model for predicting the current result. BRIEF DESCRIPTION OF DRAWINGS

[0098] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0099] Figure 1 A flowchart of a blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0100] Figure 2 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0101] Figure 3 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0102] Figure 4 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0103] Figure 5 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0104] Figure 6 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0105] Figure 7 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0106] Figure 8 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0107] Figure 9 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0108] Figure 10 A flowchart of another blood donation reaction prediction method provided by an embodiment of the present application is shown in the figure.

[0109] Figure 11 A feature importance display schematic diagram provided by an embodiment of the present application;

[0110] Figure 12 A schematic diagram of a blood donation reaction prediction device provided by an embodiment of the present application;

[0111] Figure 13 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0112] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings of the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. It should be understood that the accompanying drawings in the present application only serve the purpose of description and illustration, and are not used to limit the protection scope of the present application. The flowchart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowchart or one or more operations can be removed from the flowchart under the guidance of the content of the present application.

[0113] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only 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 creative labor are within the scope of protection of the present application.

[0114] It should be noted that the term “comprising” will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0115] Blood donation reactions (such as syncope, hypotension, palpitations, nausea, sweating, etc.) are common adverse reactions during blood donation, which can have short-term effects on the health of blood donors and reduce their willingness to donate blood again. Existing blood donation reaction prediction technologies mainly revolve around the following three methods:

[0116] The first method is to establish a real-time physiological monitoring and threshold alarm system, and propose a sleeve type monitoring device to monitor blood pressure and blood oxygen in real time through arterial pulsation. Finally, after comparing the physiological indicators collected in real time by the sensor with the preset threshold, an alarm is triggered.

[0117] This method only relies on single-time-point static analysis, cannot capture dynamic physiological changes (such as blood pressure fluctuation trend), ignores multi-factor interaction effects (such as age-season, blood pressure difference), leading to false negatives or false positives.

[0118] Secondly, by constructing a machine learning prediction model, using random forest, gradient boosting, etc. Algorithm analyzes multi-dimensional data (questionnaire, weather, etc.) to identify key risk factors, and predicts syncope risk through systolic blood pressure, environmental temperature, etc.

[0119] The machine learning model established by this method does not fully mine the original feature information. At the same time, the weight of the model is fixed and cannot be dynamically adjusted with new data (such as seasonal fluctuations in the characteristics of blood donors).

[0120] Thirdly, integrate the state of blood donors, blood donation capacity, height and blood donation history, design artificial scoring rules to quantify risk levels, and predict blood donation reactions.

[0121] This method relies on artificial rule design and cannot adapt to complex nonlinear relationships (such as high-order feature cross). In addition, this model not only lacks dynamic updating ability and is difficult to adapt to seasonal changes or strategy adjustments, but also has not been time-sensitive verified, lacking generalization ability in time dimension.

[0122] Therefore, the present application provides a blood donation reaction prediction method, which can obtain explicit features and implicit features by mining blood donation data, breaking through the limitations of single feature mode, and enhancing the sufficiency of original information mining. Among them, the explicit features can be designed based on medical prior knowledge (such as "systolic pressure-diastolic pressure difference" reflecting vascular elasticity, "first blood donation x winter" capturing seasonal sensitive risk), to ensure the clinical interpretability of the features. The implicit features can use LightGBM (decision tree algorithm) to generate leaf node index to capture high-order nonlinear relationship (such as "age-systolic pressure-season" complex interaction), breaking through the limitations of artificial design. At the same time, the unprocessed original features (such as age, gender, blood pressure) are also retained as the benchmark for model analysis, to prevent information loss.

[0123] Calculate the contribution value of each feature group (explicit / implicit / original) to screen high-value features guided by interpretability.

[0124] Select appropriate base models for different feature modes, and determine the weights of different base models according to the contribution value of the feature group, so as to solve the problem that the weight of the previous model is fixed and cannot be dynamically adjusted with new data. With the inflow of new data, the contribution value of the feature group changes, so that the weight of the base model can be automatically adjusted.

[0125] The generalization ability of the model in the time dimension is evaluated to solve the problem of the generalization ability of the model in the time dimension in the previous research. Through this method, not only can the model perform well on historical data, but also can accurately predict new data in the future time period, avoiding the problems of time factor timeliness and data leakage of numerical characteristics. Among them, the blood donation data can be sorted according to the blood donation time, and the training set and the validation set are strictly divided, and then the performance fluctuation (such as AUC changes with year) of the model in the continuous time window is evaluated through Time Series Cross-Validation (TSCV). Thus, when new data flows in, the model reduces the interference of historical noise on the current prediction by decaying the time weight.

[0126] Figure 1 A flowchart of a blood donation reaction prediction method provided by an embodiment of the present application is shown. The execution subject of the method can be a computer device. As shown in Figure 1 The method can include:

[0127] S101, collecting current blood donation data of a blood donor, the blood donation data including a plurality of characteristic variables and values of the characteristic variables.

[0128] The characteristic variables include basic information and physiological indicators of the blood donor.

[0129] The blood donor can be predicted for blood donation reaction before each blood donation, so that appropriate nursing measures can be taken for blood donors who may have blood donation reaction, or the blood donor can be persuaded not to donate blood this time, so as to ensure the physical and mental health of the blood donor.

[0130] Before blood donation, the blood donor can be collected for relevant physiological indicators and some basic blood donation information, so as 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.

[0131] The obtained blood donation data can include a plurality of characteristic variables, each characteristic variable corresponding to a blood donation related information, and each characteristic variable also having a corresponding variable value.

[0132] For example, the height of the blood donor, the age of the blood donor, the blood pressure of the blood donor, whether it is the first blood donation, etc. are taken as a characteristic variable, and the specific height data, age data and blood pressure value are taken as the variable value corresponding to the characteristic variable.

[0133] S102, determining a characteristic set of the blood donor according to the current blood donation data, using a pre-constructed feature grouping strategy.

[0134] The characteristic set includes an explicit feature group, an implicit feature group and an original feature group.

[0135] In an implementable manner, 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; and corresponding feature variables in the current blood donation data can be combined according to the implicit feature grouping strategy to obtain an implicit feature group.

[0136] In the explicit feature grouping strategy, corresponding feature variables in the current blood donation data can be combined according to the combination relationship of the feature variables to obtain a plurality of explicit features, and the explicit feature group can be obtained from the plurality of explicit features.

[0137] Similarly, based on the combination relationship of the feature variables in the implicit feature grouping strategy, part of the features in the current blood donation data can be combined to obtain a plurality of implicit features, thereby forming the implicit feature group.

[0138] Some specified single feature variables in the current blood donation data are respectively taken as an original feature to form an original feature group.

[0139] In the explicit feature group, there are explicit feature variables that are easy to be interpreted by medicine, for example, the age and the systolic pressure are combined to obtain an explicit feature for representing the cardiovascular load index; the systolic pressure and the diastolic pressure are combined to obtain an explicit feature for representing the blood pressure difference.

[0140] In the implicit feature group, there are high-dimensional implicit feature variables that contain high information value, for example, the blood donation time period, the blood donation season and the blood donation place form an implicit feature.

[0141] In the original feature group, there are original features that are not combined, for example, the age, the gender and the blood pressure of the blood donor are taken as original features.

[0142] S103, according to the feature set of the blood donor, a plurality of base models are used for first prediction to determine a plurality of initial prediction results of the blood donor.

[0143] In an implementable manner, the feature set of the blood donor can be input as input data into each base model respectively, and the first prediction is performed by the base model to obtain the initial prediction result corresponding to each base model. That is, one base model can obtain one initial prediction result.

[0144] In some possible implementation manners, three base models can be used, and the three base models can be a LightGBM model, a logistic regression model and a random forest model.

[0145] The LightGBM model can capture the nonlinear relationship between each feature group, thereby reflecting more implicit feature groups on the final result prediction; the logistic regression model provides certain interpretability, and more explicit feature groups are outputted to the final result prediction; and the random forest model can be used as a robust baseline, and more original features are outputted to the final result prediction.

[0146] In S104, a second prediction is performed on the donor by using the meta-model according to the initial prediction results and the weight information of each base model, and a target prediction result of the donor is determined.

[0147] The target prediction result is used to indicate the probability of the donor having a blood donation reaction when donating blood.

[0148] According to the weight information of each base model, the initial prediction results of each base model can be weighted and processed, and the processing results are input into the meta-model for second prediction. The prediction result of the meta-model is the target prediction result of the donor.

[0149] The initial prediction result and the target prediction result can be probability values, i.e., the predicted probability of the donor having one or more blood donation reactions such as syncope, hypotension, palpitation, nausea, sweating, and the like as defined above. It should be noted that there are many symptoms of blood donation reactions in medicine, which are not limited to the above-mentioned several symptoms. When the donor has different blood donation data, the blood donation reaction that may occur is also different. The present scheme can predict the probability of the donor having any one or more blood donation reactions clearly defined in medicine based on the blood donation data of the donor.

[0150] By comparing the target prediction result with a preset threshold, when the threshold is exceeded, it can be considered that the probability of the donor having a blood donation reaction is relatively large, and when the threshold is not exceeded, the probability of the donor having a blood donation reaction is relatively small.

[0151] To sum up, the blood donation reaction prediction method provided in this embodiment comprises the following steps: collecting current blood donation data of a blood donor, wherein the blood donation data comprises a plurality of characteristic variables and values of the characteristic variables; determining a characteristic set of the blood donor according to the current blood donation data and using a pre-constructed characteristic grouping strategy; performing first prediction on the blood donor according to the characteristic set of the blood donor and using a plurality of base models to determine a plurality of initial prediction results of the blood donor; and performing second prediction on the blood donor according to the initial prediction results and weight information of the base models and using a meta model to determine a target prediction result of the blood donor. This method fully mines the blood donation data of the blood donor to obtain an explicit characteristic group, an implicit characteristic group and an original characteristic group, so that the blood donation reaction prediction is combined with the explicit characteristic group, the implicit characteristic group and the original characteristic group, and the accuracy of the prediction result can be improved. When the model is predicted, the prediction architecture of the base model combined with the meta model can improve the accuracy of the model prediction. The plurality of base models used in the prediction process have different emphases, and the weight information of the base models is combined to obtain the initial prediction results of the base models under the influence of the characteristics they emphasize, and the meta model is combined for final prediction to obtain a more accurate prediction result.

[0152] Figure 2 Another blood donation reaction prediction method provided in this embodiment is shown in the flowchart. Optionally, the construction process of the characteristic grouping strategy is as follows:

[0153] In S201, a combination relationship between the characteristic variables is determined based on medical prior indicators, and part of the characteristic variables are combined according to the combination relationship to obtain an explicit characteristic grouping strategy.

[0154] In some embodiments, the combination relationship between the characteristic variables in the blood donation data can be determined based on some medical prior indicators to obtain the explicit characteristic grouping strategy.

[0155] The explicit characteristic grouping strategy contains the combination relationship between different characteristic variables.

[0156] For example, the explicit characteristic grouping strategy can contain the combination of whether it is the first blood donation and age, the combination of blood donation period and blood pressure, the combination of age and systolic pressure, etc. According to each combination mode, the corresponding single characteristic variable in the blood donation data is combined to obtain a plurality of explicit characteristics, thereby obtaining an explicit characteristic group.

[0157] For example, based on the medical prior indicator that young first-time blood donors are more likely to have a higher risk of blood donation reaction due to nervousness, it can be determined that the two characteristic variables of “whether it is the first blood donation” and “age” are combined to obtain an explicit characteristic. And based on the medical prior indicator that the natural increase of blood pressure in the afternoon may exacerbate the risk of blood donation reaction, it can be determined that the two characteristic variables of “blood donation period” and “blood pressure” are combined to obtain an explicit characteristic.

[0158] S202, using a decision tree algorithm, splitting the feature variables in the blood donation record data to determine the high-order interaction between the feature variables.

[0159] For the implicit feature grouping strategy, since the high-dimensional information variable containing high information value is often difficult to obtain, the LightGBM model can be established to obtain the high-order interaction between the feature variables.

[0160] S203, according to the high-order interaction between the feature variables, cross-combining the feature variables to obtain the implicit feature grouping strategy.

[0161] In some embodiments, the blood donation data of the sample blood donor can be input into the LightGBM model as training set data for training, and each decision tree will allocate the sample to different leaf nodes according to the feature segmentation rule. 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 of 0-9. Then, the training results of the model are optimized with the validation set, and the model with better optimization results is used as a benchmark to obtain the newly generated feature cross-combination (leaf node) in the training process. These newly generated leaf nodes are the combination relationship of the feature variables obtained under the implicit feature grouping strategy.

[0162] Optionally, since the newly obtained leaf nodes are numerous and complex, if all of them are used as implicit features, the accuracy of the model prediction may be reduced due to the addition of a large number of low-contribution features. Therefore, the low-contribution features need to be preliminarily screened out through the output node feature importance. At the same time, the newly obtained leaf nodes cannot be directly compatible with subsequent models, so a binary feature (0 / 1) needs to be generated for each index in the form of one-hot encoding. In addition, to enhance the interpretability of the subsequent model, the high-contribution features introduced into the model can also be renamed to variable names that are easy to understand according to the index of the split node.

[0163] That is, each node of the LightGBM model corresponds to a feature variable, and according to the splitting mode of the feature variable, the feature variables on different nodes can be combined to obtain implicit features, but the generated implicit features are named by the index of the node in the model, and do not have actual physical meaning, so the feature variables represented by the nodes themselves are combined to obtain implicit features with physical meaning.

[0164] It is worth mentioning that in the embodiment, the current blood donation data of the collected blood donors can include, but is not limited to, basic information such as blood donor age, gender, weight, height, and whether it is the first blood donation, and of course, can also include physiological indicators such as blood pressure, blood lipid, blood sugar, and heart rate changes, in addition, can also include environmental indicators such as environmental temperature and humidity of the blood donation site. For example, the blood donation site with high temperature and high humidity is more prone to blood donation reactions.

[0165] In addition, the immediate reaction condition of the blood donor and the reaction change condition after 24-hour follow-up can be obtained as a reference basis for whether the blood donor has a blood donation reaction.

[0166] In some embodiments, classification variables can also be derived based on characteristic variables such as blood donation sites and blood donor occupations. For example, according to the blood donation site, a classification variable such as a fixed blood donation site or a mobile blood donation site can be derived; according to the occupation of the blood donor, a classification variable such as an in-system or an out-system job can be derived.

[0167] New features can be derived for time sequence characteristics. For example, for blood donation time, feature variables such as blood donation period and blood donation season can be derived.

[0168] Figure 3 Another blood donation reaction prediction method provided by the embodiment of the application is shown in the flowchart. Optionally, in step S104, the meta-model is used for second prediction according to the weight information of each base model and each initial prediction result to determine the target prediction result of the blood donor, which can include:

[0169] S301, according to the weight information of each base model, the initial prediction results are weighted and processed to obtain intermediate prediction results.

[0170] In one way, the initial prediction results of each base model can be weighted and processed according to the weight information of each base model by a simple weighted average method to obtain intermediate prediction results.

[0171] In addition to the weighted method, the complex combination relationship of each base model can also be learned by using a tree model to fuse the initial prediction results of each base model to obtain intermediate prediction results.

[0172] S302, the intermediate prediction results are input into the meta-model as input data, and the meta-model is used for second prediction to obtain the target prediction result of the blood donor.

[0173] The obtained intermediate prediction results are input into the meta-model as input data, and the meta-model is used for second prediction to obtain the target prediction result of the blood donor.

[0174] Figure 4FIG. 2 is a flowchart of another method for predicting blood donation reactions according to an embodiment of the present application. Optionally, the training process of the base model is as follows.

[0175] S401: Collect a sample data set, which includes sample blood donation record data of sample blood donors and blood donation reaction information corresponding to each piece of sample blood donation record data. The sample blood donation record data includes multiple feature variables and values of the feature variables. The feature variables include basic information and physiological indicators of the blood donors.

[0176] Next, the training process of the base model and the meta-model is described.

[0177] The collected sample data set can include multiple samples. The sample blood donation record data of each sample blood donor and the actual blood donation reaction information of the sample blood donor can be used as a sample.

[0178] The multiple feature variables included in the sample blood donation record data are the same as the multiple feature variables in the current blood donation data when predicting the blood donors.

[0179] The actual blood donation reaction information of the sample blood donor is used as label information of the sample, which is used to guide the training of the model.

[0180] S402: Train the base model using the sample data set.

[0181] Each base model can be trained and obtained through the sample data in the sample data set.

[0182] Figure 5 FIG. 2 is a flowchart of another method for predicting blood donation reactions according to an embodiment of the present application. Optionally, in step S401, the sample data set can include the following steps.

[0183] S501: Collect an initial sample data set and sort each piece of sample blood donation record data in the initial sample data set according to the blood donation time.

[0184] In some embodiments, the initial sample data set can be collected. The initial sample data set includes sample blood donation record data of each sample blood donor and blood donation reaction information corresponding to each piece of sample blood donation record data. However, the sample blood donation record data of each sample blood donor is unordered.

[0185] It is worth noting that one sample blood donor can correspond to multiple pieces of sample blood donation record data, and each piece of sample blood donation record data can be used as a sample. Because the values of some feature variables of the same blood donor change in different blood donations, the blood donation reaction result is not fixed, and the blood donation reaction may or may not occur. Therefore, one piece of sample blood donation record data can be used as one piece of sample data independently.

[0186] According to the blood donation time in each sample blood donation record data, the sample blood donation record data in the initial sample data set can be sorted.

[0187] S502, the first training data, the first validation data, the second training data and the second validation data are obtained by sliding the preset time sliding window 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.

[0188] The preset time sliding window is defined, which can be defined as an annual sliding window, which is used to gradually divide the sample blood donation record data in the initial sample data set.

[0189] Suppose the initial sample data set contains sample blood donation record data in multiple consecutive years. The data of 2019-2022 can be obtained as the first training data by window 1 from the sorted blood donation record data, and the data of 2023 can be obtained as the first validation data by window 2; then the data of window 1 and window 2 are used as the second validation data, and window 2 is continuously slid to use the data of 2024 as the second validation data.

[0190] By dividing the first training data, the second training data, the first validation data and the second validation data, time series cross-validation can be expanded.

[0191] Figure 6 Another blood donation reaction prediction method provided by the embodiment of the application is provided. Optionally, in step S402, the sample data set is used to train the base model, which can include:

[0192] S601, the first training data is used to perform first training of the base model, and the first validation data is used to verify the first training base model to obtain a first validation result.

[0193] The first training data can be used to perform first round training of the base model, and the first validation data can be used to verify the first round training base model to obtain a first validation result.

[0194] S602, the second training data is used to perform second training of the base model, and the second validation data is used to verify the second training base model to obtain a second validation result.

[0195] Then the second training data is used to perform second round training of the base model, and the second validation data is used to verify the second round training base model to obtain a second validation result.

[0196] S603, determine difference information according to the first verification result and the second verification result.

[0197] The verification results of the two rounds can be compared, that is, the first verification result and the second verification result are compared to calculate the fluctuation difference of the AUC (Area Under the Curve) of the two.

[0198] The AUC is a commonly used evaluation index in machine learning, and the most common one is the area under the ROC (Receiver Operating Characteristic) curve (AUC-ROC), but it can also refer to the area under other curves (such as the PR (Precision-Recall Curve) curve). It is mainly used to evaluate the performance of a binary classification model.

[0199] S604, if the difference information exceeds the preset threshold, filtering the initial sample data set according to the blood donation time of each blood donation record data in the initial sample data set.

[0200] If the AUC fluctuation difference of the first verification result and the second verification result exceeds the preset threshold, it can be proved that there is a timeliness problem in the data, that is, the weight of early data on the model prediction result should be reduced to meet the reliability of the model for predicting the current result.

[0201] The preset threshold may be, for example, 1.5%.

[0202] S605, retrain the base model based on the filtered initial sample data set.

[0203] Therefore, when the above conditions are met, the sample blood donation record data in the initial sample data set that is far from the current time can be deleted, and as much recent data as possible can be retained.

[0204] Based on the filtered initial sample data set, the base model can be trained again to obtain a trained base model.

[0205] Figure 7 Another flowchart of a blood donation reaction prediction method provided by the embodiments of the present application; optionally, the determination process of the weight information of each base model is as follows:

[0206] S701, determine 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.

[0207] Similarly, the donation record data of the sample blood donor also needs to be grouped by features, and the grouping manner is the same as above, and the sample explicit feature group, the sample implicit feature group and the sample original feature group can be obtained respectively.

[0208] S702, respectively 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, and the contribution value is used to represent the influence degree of the feature group on the prediction result.

[0209] 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.

[0210] Among them, the contribution value of each feature variable in each feature group can be calculated first, and then the contribution value of the feature group is obtained. The greater the contribution value represents the greater the influence degree of the feature group on the prediction result.

[0211] S703, 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, the weight information of each base model is determined.

[0212] In some embodiments, the contribution value of different feature groups can be used to obtain the weight information of each base model according to the emphasis of each base model when making prediction.

[0213] Figure 8 Another flowchart of the blood donation reaction prediction method provided by the embodiment of the application is provided. Optionally, calculating the contribution value of the sample explicit feature group can include:

[0214] S801, respectively calculate the contribution value of each combined feature in the sample explicit feature group.

[0215] The embodiment takes the calculation of the contribution value of the sample explicit feature group as an example.

[0216] Among them, the sample explicit feature group and the sample original feature group can directly be based on the influence of the feature variables in the respective feature groups on the prediction result; the sample implicit feature group needs to combine the process of generating leaf nodes by LightGBM model splitting to recursively calculate the contribution value in the group.

[0217] Optionally, Tree SHAP (Tree SHapley Additive exPlanations) algorithm can be used to recursively traverse the nodes of the decision tree, count the marginal contribution of the features at each split point, and finally weighted aggregation to obtain the contribution value of each feature to the ith sample.

[0218] Through the above calculation, the contribution value of each feature variable in the explicit feature group can be obtained.

[0219] S802, according to the ranking result of the group contribution value of each combination feature, the combination features in the sample explicit feature group are screened.

[0220] Next, according to the ranking result of the group contribution value of each feature variable, the feature variable with a smaller contribution value can be removed to reduce the feature dimension.

[0221] S803, based on the group contribution value of each combination feature in the sample explicit feature group after screening, the contribution value of the sample explicit feature group after screening is determined.

[0222] Based on the sample explicit feature group from which part of the low contribution value is removed, the group contribution value of each feature variable in the sample explicit feature group can be recalculated again according to the above method, and the contribution value of the sample explicit feature group is obtained.

[0223] It is worth noting that since the feature variables in the sample implicit feature group can generate high-base classification variables due to high-dimensional feature cross, for such variables, the implicit features can be converted into numerical features through target encoding.

[0224] Wherein, the target encoding converts the high-dimensional classification variable into a numerical value by replacing each category of the high-dimensional classification variable with the statistical value (such as mean, median, etc.) of the target variable corresponding to the category, thereby retaining the association information between the category and the target variable and reducing the dimension.

[0225] Through this processing, the high-dimensional implicit features can be converted into one-dimensional variables to realize feature dimension reduction and reduce data calculation amount.

[0226] Optionally, in step S703, 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, the weight information of each base model can be determined, which can include: 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.

[0227] As described above, the three base models can respectively adopt LightGBM model, logistic regression model and random forest model.

[0228] Since the LightGBM model reflects more 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 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 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.

[0229] In an implementation manner, the contribution value of the implicit feature group can be directly taken as the weight of the LightGBM model, the contribution value of the explicit feature group can be taken as the weight of the logistic regression model, and the contribution value of the original feature group can be taken as the weight of the random forest model.

[0230] In another implementation manner, the proportion 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 in the total contribution value can be determined, and the proportion is taken as the weight of the corresponding base model.

[0231] Figure 9 Another flowchart of a blood donation reaction prediction method provided by an embodiment of the present application is provided. Optionally, the method of the present application can further include:

[0232] S901, updating the contribution value of each sample feature group in real time according to the real-time obtained blood donation record data of a new sample blood donor.

[0233] In some embodiments, the weight information of each base model in the present scheme can also dynamically change based on the inflow of new blood donation data.

[0234] When new blood donation data is added to the sample data set, the contribution values of the explicit feature group, the implicit feature group and the original feature group will change, thereby affecting the weight information of each base model.

[0235] 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.

[0236] S902, updating the weight information of each base model in real time according to the updated contribution value of each sample feature group.

[0237] Then, the weight information of each corresponding base model is updated according to the contribution values of the explicit feature group, the implicit feature group and the original feature group.

[0238] By updating the weight information of the base model in real time, the model lag caused by the static weight can be avoided.

[0239] For example, the feature contribution value of “whether it is the first blood donation-season” changes in winter, thereby the contribution value of the explicit feature group changes, and the weight of the corresponding base model changes to strengthen the risk capture in the low-temperature environment.

[0240] Figure 10 Another flowchart of a blood donation reaction prediction method provided by an embodiment of the present application is provided. The training process of the meta-model is as follows:

[0241] S1001, input each sample blood donation record data in the initial sample data set into each base model, and perform blood donation reaction prediction through each base model to obtain initial prediction results of each base model corresponding to each sample blood donation record data.

[0242] Optionally, the input of the meta-model is the fusion of the outputs of the base models. Therefore, after the base models are trained, the initial sample data set can be used as input data to perform prediction through the base models to obtain initial prediction results of each base model corresponding to each sample blood donation record.

[0243] S1002, determine intermediate prediction results of each sample blood donation record data according to the initial prediction results of each base model corresponding to each sample blood donation record data and the weight information of each base model.

[0244] The initial prediction results of each base model corresponding to each sample blood donation record data are weighted and calculated through the weight information of each base model to obtain the intermediate prediction results of each sample blood donation record data.

[0245] S1003, train the meta-model by using the intermediate prediction results of each sample blood donation record data and the blood donation reaction information corresponding to each sample blood donation record data.

[0246] Then, the intermediate prediction results of each sample blood donation record data and the actual blood donation reaction information corresponding to each sample blood donation record data are used as training sample data for training the meta-model.

[0247] The meta-model can use a logistic regression model.

[0248] By dynamically adjusting the weights of the base models according to the contribution values of different feature groups, the advantages of different feature groups can be complementary. When the contribution value of the explicit feature group is large, the meta-model is more inclined to be interpretable. When the contribution value of the implicit feature group is large, the meta-model is more inclined to capture complex features.

[0249] In addition, the present scheme can also generate an interpretability report. The model can output important features in the feature set that are easy to cause blood donation reactions from the importance of the prediction results.

[0250] Figure 11 A feature importance display schematic diagram provided by the embodiment of the present application is shown in FIG. 6. The horizontal axis represents feature variables, including explicit feature variables, implicit feature variables and original feature variables. The vertical axis represents the importance of the feature variables to the prediction results. As can be seen, the importance of the blood donation site, blood donation age, blood vessel load index and the like is relatively high.

[0251] In summary, the blood donation reaction prediction method provided in the embodiment includes: collecting current blood donation data of a blood donor, the blood donation data including a plurality of characteristic variables and values of the characteristic variables; determining a characteristic set of the blood donor according to the current blood donation data by using a pre-constructed characteristic grouping strategy; performing first prediction on the blood donor by using a plurality of base models according to the characteristic set of the blood donor to determine a plurality of initial prediction results of the blood donor; and performing second prediction by using a meta model according to the initial prediction results and weight information of the base models to determine a target prediction result of the blood donor. The method can improve the accuracy of the prediction result by fully mining the blood donation data of the blood donor to obtain an explicit characteristic group, an implicit characteristic group and an original characteristic group, and by combining the explicit characteristic group, the implicit characteristic group and the original characteristic group to predict the blood donation reaction. In the model prediction, the prediction architecture of the base model combined with the meta model can improve the accuracy of the model prediction. The plurality of base models have different focuses in the prediction process, and the weight information of the base models can be combined to obtain the initial prediction results of the base models under the influence of the characteristics focused by the base models. The final prediction by the meta model can obtain a more accurate prediction result.

[0252] Secondly, the weight of the base model is determined according to the contribution value of the characteristic group, so that the weight of the base model can be dynamically adjusted by the inflow of new data to avoid the lag of the model prediction.

[0253] In addition, the sample data set is processed by the time sliding window to verify the time sensitivity of the model, so as to effectively screen the sample data and improve the reliability of the prediction result of the model.

[0254] The following describes the device, equipment and storage medium for performing the blood donation reaction prediction method provided in the present application. The specific implementation process and technical effects are described above, and will not be described here.

[0255] Figure 12 FIG. 1 shows a schematic diagram of a blood donation reaction prediction device provided in an embodiment of the present application. The function implemented by the blood donation reaction prediction device corresponds to the steps of the method described above. The device can be understood as the server described above, or the processor of the server, or a component independent of the server or the processor and realizing the function of the present application under the control of the server. As shown in FIG. 1, the device can include an acquisition module 120, a determination module 121 and a prediction module 122. Figure 12

[0256] The acquisition module 120 is configured to acquire current blood donation data of a blood donor, the blood donation data including a plurality of characteristic variables and values of the characteristic variables; and the characteristic variables include basic information and physiological indexes of the blood donor.

[0257] ​The determining module 121 is configured to determine a feature set of the blood donor according to current blood donation data and by using a pre-constructed feature grouping strategy, the feature set including an explicit feature group, an implicit feature group, and an original feature group; the explicit feature group is used to represent a feature variable that is easy to be interpreted by medicine; the implicit feature group is used to represent a high-dimensional feature variable that contains high-value information.

[0258] The prediction module 122 is configured to perform first prediction on the blood donor according to the feature set of the blood donor and by using a plurality of base models, to determine a plurality of initial prediction results of the blood donor.

[0259] The prediction module 122 is configured to perform second prediction on the blood donor according to the initial prediction results and weight information of the base models and by using a meta model, to determine a target prediction result of the blood donor, the target prediction result being used to indicate a probability of the blood donor currently donating blood and causing a blood donation reaction.

[0260] Optionally, the method further includes a constructing module.

[0261] The constructing module is configured to determine a combination relationship between the feature variables based on a medical prior index, and combine part of the feature variables according to the combination relationship, to obtain the explicit feature grouping strategy.

[0262] The decision tree algorithm is used to perform splitting processing on the feature variables in the blood donation record data, to determine a high-order interaction relationship between the feature variables.

[0263] The feature variables are cross combined according to the high-order interaction relationship between the feature variables, to obtain the implicit feature grouping strategy.

[0264] Optionally, the determining 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 the explicit feature group.

[0265] The corresponding feature variables in the current blood donation data are combined according to the implicit feature grouping strategy, to obtain the implicit feature group.

[0266] The specified feature variables in the current blood donation data are used to form the original feature group.

[0267] Optionally, the prediction module 122 is specifically configured to input the feature set of the blood donor as input data into each base model respectively, to perform first prediction by using the base model, and to obtain the initial prediction result corresponding to each base model respectively.

[0268] Optionally, the prediction module 122 is specifically configured to perform weighting processing on the initial prediction results according to the weight information of the base models, to obtain an intermediate prediction result.

[0269] Input the intermediate prediction result as input data into the meta-model, perform a second prediction through the meta-model, and obtain a target prediction result of the blood donor.

[0270] Optionally, the method further includes:

[0271] The training module is configured to collect a sample data set, the sample data set including sample blood donation record data of sample blood donors and blood donation reaction information corresponding to each piece of sample blood donation record data, the sample blood donation record data including a plurality of characteristic variables and values of the characteristic variables, and the characteristic variables including basic information and physiological indexes of the blood donors.

[0272] The base model is trained using the sample data set.

[0273] Optionally, the training module is specifically configured to collect an initial sample data set and sort each piece of sample blood donation record data in the initial sample data set according to blood donation time.

[0274] The first training data, the first validation data, the second training data, and the second validation data are obtained by sliding a preset time sliding window 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.

[0275] Optionally, the training module is specifically configured to perform first training of the base model using the first training data, verify the base model after the first training using the first validation data, and obtain a first verification result.

[0276] The second training data is used to perform second training of the base model, and the second validation data is used to verify the base model after the second training, and a second verification result is obtained.

[0277] The difference information is determined according to the first verification result and the second verification result.

[0278] If the difference information exceeds a preset threshold, the initial sample data set is filtered according to the blood donation time of each blood donation record data in the initial sample data set.

[0279] The base model is retrained based on the filtered initial sample data set.

[0280] Optionally, the determining module 121 is further configured to determine a sample explicit feature group, a sample implicit feature group, and a sample original feature group according to the blood donation record data of the sample blood donor.

[0281] The contribution values of the sample explicit feature group, the sample implicit feature group, and the sample original feature group are calculated respectively, and the contribution values are used to represent the influence degree of the feature groups on the prediction result.

[0282] 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, weight information of each base model is determined.

[0283] Optionally, the determining module 121 is specifically configured to calculate an intra-group contribution value of each combined feature in the sample explicit feature group respectively.

[0284] According to the sorting result of the intra-group contribution value of each combined feature, the combined features in the sample explicit feature group are screened.

[0285] Based on the intra-group contribution value of each combined feature in the screened sample explicit feature group, a contribution value of the screened sample explicit feature group is determined.

[0286] Optionally, the determining 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 corresponding relationship between each base model and each sample feature group.

[0287] Optionally, the method further includes an updating module.

[0288] The updating module is configured to update the contribution value of each sample feature group in real time according to the blood donation record data of a new sample blood donor acquired in real time.

[0289] According to the updated contribution value of each sample feature group, the weight information of each base model is updated in real time.

[0290] Optionally, the training module is further configured to input each piece of sample blood donation record data in the initial sample data set into each base model, and perform blood donation reaction prediction by using each base model to obtain an initial prediction result corresponding to each piece of sample blood donation record data.

[0291] According to the initial prediction result corresponding to each piece of sample blood donation record data and the weight information of each base model, an intermediate prediction result of each piece of sample blood donation record data is determined.

[0292] The meta-model is trained by using the intermediate prediction result of each piece of sample blood donation record data and the blood donation reaction information corresponding to each piece of sample blood donation record data.

[0293] The device is used to execute the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which will not be described herein.

[0294] The above modules can be one or more integrated circuits configured to implement the above methods, for example, one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, the modules can be integrated together to implement a system-on-a-chip (SOC).

[0295] The above modules can be connected or communicated with each other via wired connections or wireless connections. The wired connections can include metal cables, optical cables, hybrid cables, etc., or any combination thereof. The wireless connections can include connections in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, etc., or any combination thereof. Two or more modules can be combined into a single module, and any one module can be divided into two or more units. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working processes of the system and device described above can refer to the corresponding processes in the method embodiments, which will not be described herein again.

[0296] Figure 13 A structural schematic diagram of an electronic device provided by an embodiment of the present application is provided. The device can be a computing device with data processing function.

[0297] The device can include a processor 801 and a storage medium 802.

[0298] The storage medium 802 is configured to store a program, and the processor 801 invokes the program stored in the storage medium 802 to execute the above method embodiments. The specific implementation and technical effects are similar, and will not be described here again.

[0299] The storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 executes various steps in the blood donation reaction prediction method according to various exemplary embodiments of the present application described in the above “Exemplary Method” section of the specification.

[0300] The processor 801 can be a general 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 device, a discrete gate or transistor logic, a discrete hardware component, and can implement or execute the methods, steps and logical block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly embodied as completed by a hardware processor, or completed by a combination of hardware and software modules in the processor.

[0301] The storage medium 802 is a non-volatile computer readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The storage medium can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type storage medium, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage medium, magnetic disk, optical disk, etc. The storage medium is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The storage medium 802 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used to store program instructions and / or data.

[0302] Optionally, the present application also provides a program product, such as a computer readable storage medium, comprising a program for executing the above-mentioned method embodiments when executed by a processor.

[0303] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0304] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0305] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.

[0306] The integrated unit realized in the form of software functional unit can be stored in a computer readable storage medium. The software functional unit stored in a storage medium includes a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) execute part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk, and various program code storage media.

Claims

1. A method of predicting a blood donation reaction, characterized by, The application relates to a method for predicting blood donation reaction of a blood donor. The method comprises the following steps: collecting current blood donation data of the blood donor, wherein the blood donation data comprises a plurality of characteristic variables and values of the characteristic variables; the characteristic variables comprise basic information and physiological indexes of the blood donor; determining a characteristic set of the blood donor according to the current blood donation data and a pre-constructed characteristic grouping strategy, wherein the characteristic set comprises an explicit characteristic group, an implicit characteristic group and an original characteristic group; the explicit characteristic group is used for representing characteristic variables which are easy to be interpreted by medicine; the implicit characteristic group is used for representing high-dimensional characteristic variables which contain high-value information; an explicit characteristic grouping strategy corresponding to the explicit characteristic group is determined based on a medical prior index; the explicit characteristic grouping strategy comprises whether to combine two characteristic variables of first-time blood donation and age, and whether to combine two characteristic variables of blood donation period and blood pressure; performing first prediction on the blood donor by using a plurality of base models according to the characteristic set of the blood donor, so as to determine a plurality of initial prediction results of the blood donor; performing second prediction by using a meta model according to the initial prediction results and weight information of the base models, so as to determine a target prediction result of the blood donor, wherein the target prediction result is used for indicating a probability of blood donation reaction of the blood donor in the current blood donation; the weight information of each base model is determined in the following manner: determining a sample explicit characteristic group, a sample implicit characteristic group and a sample original characteristic group according to blood donation record data of a sample blood donor; respectively calculating a contribution value of the sample explicit characteristic group, a contribution value of the sample implicit characteristic group and a contribution value of the sample original characteristic group, wherein the contribution value is used for representing an influence degree of the characteristic group on the prediction result; 2. The method of claim 1, wherein, determining the weight information of each base model according to the contribution value of the sample explicit characteristic group, the contribution value of the sample implicit characteristic group and the contribution value of the sample original characteristic group. The characteristic grouping strategy is constructed in the following manner: determining combination relationships between the characteristic variables based on a medical prior index, and combining part of the characteristic variables according to the combination relationships, so as to obtain an explicit characteristic grouping strategy; splitting each characteristic variable in the blood donation record data by using a decision tree algorithm, so as to determine high-order interaction relationships between the characteristic variables; 3. The method of claim 2, wherein, cross-combining each characteristic variable according to the high-order interaction relationships between the characteristic variables, so as to obtain an implicit characteristic grouping strategy. The method for determining the characteristic set of the blood donor according to the current blood donation data and the pre-constructed characteristic grouping strategy comprises the following steps: combining corresponding characteristic variables in the current blood donation data according to the explicit characteristic grouping strategy, so as to obtain the explicit characteristic group; combining corresponding characteristic variables in the current blood donation data according to the implicit characteristic grouping strategy, so as to obtain the implicit characteristic group; 4. The method of claim 1, wherein, using specified characteristic variables in the current blood donation data to form the original characteristic group. The method for performing first prediction on the blood donor by using the plurality of base models according to the characteristic set of the blood donor comprises the following steps: inputting the characteristic set of the blood donor as input data into each base model respectively, and performing first prediction by using the base model, so as to obtain an initial prediction result corresponding to each base model.

5. The method of claim 1, wherein, The method comprises the following steps: According to the weight information of each base model, the initial prediction results are weighted to obtain intermediate prediction results; The intermediate prediction results are input into the meta model as input data, and the meta model is used for second prediction to obtain the 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: A sample data set is collected, which includes sample blood donation record data of a sample blood donor and blood donation reaction information corresponding to each sample blood donation record data; the sample blood donation record data includes a plurality of characteristic variables and values of each characteristic variable; the characteristic variables include basic information and physiological indexes of the blood donor; The base model is trained by using the sample data set.

7. The method of claim 6, wherein, The sample data set is collected, which includes: An initial sample data set is collected, and each sample blood donation record data in the initial sample data set is sorted according to the blood donation time; A preset time sliding window is used to slide and obtain first training data, first verification data, second training data and 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.

8. The method of claim 7, wherein, The base model is trained by using the sample data set, which includes: The first training data is used for first training of the base model, and the first verification data is used for verification of the first trained base model to obtain a first verification result; The second training data is used for second training of the base model, and the second verification data is used for verification of the second trained base model to obtain a second verification result; The difference information is determined 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 filtered 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.

9. The method of claim 1, wherein, The contribution value of the sample explicit feature group is calculated, which includes: The intra-group contribution value of each combined feature in the sample explicit feature group is calculated respectively; According to the sorting result of the intra-group contribution value of each combined feature, the combined features in the sample explicit feature group are filtered; The contribution value of the filtered sample explicit feature group is determined based on the intra-group contribution value of each combined feature in the filtered sample explicit feature group.

10. The method of claim 1, wherein, 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 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.

11. The method of claim 1, wherein, The method further comprises: The contribution value of each sample feature group is updated in real time according to the blood donation record data of a new sample blood donor obtained in real time; According to the contribution value of each sample feature group after updating, the weight information of each base model is updated in real time.

12. The method of claim 7, wherein, The training process of the meta-model is as follows: Input each sample blood donation record data in the initial sample data set into each base model, and perform blood donation reaction prediction through each base model to obtain the initial prediction result of each base model corresponding to each sample blood donation record data. According to the initial prediction result of each base model corresponding to each sample blood donation record data and the weight information of each base model, determine the intermediate prediction result of each sample blood donation record data. According to the intermediate prediction result of each sample blood donation record data and the blood donation reaction information corresponding to each sample blood donation record data, the meta-model is trained.

13. A blood donation reaction prediction apparatus characterized by comprising: Comprise: The acquisition module, the determination module and the prediction module; The acquisition module is used to collect the current blood donation data of the blood donor, and the blood donation data comprises a plurality of characteristic variables and values of each characteristic variable; The characteristic variables comprise basic information and physiological indexes of the blood donor; The determination module is used to determine the characteristic set of the blood donor according to the current blood donation data and a pre-constructed feature grouping strategy, wherein the characteristic set comprises an explicit feature group, an implicit feature group and an original feature group; the explicit feature group is used to represent characteristic variables that are easy to be medically interpreted, and the implicit feature group is used to represent high-dimensional characteristic variables that contain high-value information; an explicit feature grouping strategy corresponding to the explicit feature group is determined based on a medical prior index, and the explicit feature grouping strategy comprises combination of two characteristic variables of whether it is the first blood donation and age, and combination of two characteristic variables of blood donation period and blood pressure; The prediction module is used to perform first prediction on the blood donor according to the characteristic set of the blood donor and a plurality of base models, and determine a plurality of initial prediction results of the blood donor. The prediction module is used to perform second prediction on the blood donor according to each initial prediction result and weight information of each base model, and determine a target prediction result of the blood donor, wherein the target prediction result is used to indicate a probability of blood donation reaction of the blood donor in the current blood donation; The determination module is further used to determine a sample explicit feature group, a sample implicit feature group and a sample original feature group according to blood donation record data of a sample blood donor. 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 are calculated respectively, and the contribution value is used to represent the influence degree 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.

14. An electronic device, comprising: Comprise: A processor, a storage medium and a bus, 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 realize the blood donation reaction prediction method in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to realize the blood donation reaction prediction method in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Training method of after-sales auditing model and after-sales auditing method and device

    CN119693011A

Cited By

  • Blood donation adverse reaction risk prediction method and system based on stratified blood volume estimation

    CN122494263A