Emergency treatment-oriented medical material consumption prediction model construction method and medical material consumption prediction system
Through a prediction model that combines multi-output regression with a lightweight gradient boosting machine, the problem of accuracy in predicting medical supplies consumption in emergency treatment is solved, multi-objective parallel prediction and automated early warning are achieved, and the accuracy and efficiency of material scheduling are improved.
Patent Information
- Application Number
- CN202510809398.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-16
AI Technical Summary
Existing methods for predicting medical supplies consumption in emergency treatment rely on subjective experience or simple statistics, lack accuracy, and have difficulty capturing the correlation between changes in the number of patients and task types. This results in poor generalization ability of the prediction model and an inability to adapt to complex and changing actual application scenarios.
A prediction model combining multi-output regression and lightweight gradient boosting machine is adopted. Through data collection, preprocessing, feature engineering and error feedback mechanism, a medical supplies consumption prediction model is constructed to achieve multi-objective parallel prediction. The model is refined and comprehensively considered in combination with the task type and patient reception situation.
It significantly improves the accuracy and timeliness of medical supplies consumption forecasts, reduces manual statistical errors, provides more complete decision-making support, and can automatically generate early warning prompts to improve the accuracy and automation of material scheduling.
Smart Images

Figure CN120656669A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical supplies data processing, and in particular to a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system. Background Art
[0002] With the rapid advancement of science and technology, machine learning technology is becoming increasingly mature, and its application areas are becoming increasingly broad. In recent years, predictive technology based on machine learning has gained increasing attention. This technology can help predict the probability of events and provide more accurate basis for decision-making. In the field of medical supply management, machine learning-based predictive technology can use patient numbers and historical supply usage data to predict medical supply consumption. This helps to timely replenish shortages based on medical supply usage and ensure efficient treatment.
[0003] In emergency treatment units, accurate prediction and timely supply of medical supplies are crucial to improving treatment efficiency. Current medical supply consumption prediction methods mostly rely on the subjective experience of medical staff or simple statistical methods (such as mean, median, etc.). The prediction results have large errors and are difficult to accurately grasp the changes in the number of patients and the differences in medical supply demand caused by different task types, resulting in a lack of accuracy in the prediction results. In addition, existing prediction methods generally do not consider the time series characteristics of historical consumption data and cannot effectively capture the correlation between the changes in the number of patients and the task type, resulting in poor generalization ability of the prediction model and difficulty in adapting to complex and changeable actual application scenarios. Therefore, there is an urgent need to propose a more scientific and accurate medical supply consumption prediction model that can improve prediction accuracy and emergency response efficiency by automatically analyzing historical data and performing intelligent prediction and early warning. Summary of the Invention
[0004] The purpose of the present invention is to address the defects of the existing technology and provide a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system.
[0005] To achieve the above objectives, the present invention provides a method for constructing a medical supplies consumption prediction model for emergency treatment, comprising:
[0006] The method for constructing a medical supplies consumption prediction model includes:
[0007] A data collection step, obtaining historical data; wherein the historical data includes medical supplies data, patient reception data and task type data;
[0008] a data preprocessing step of performing missing value detection and outlier detection on the historical data, supplementing the detected missing values using an interpolation supplementation method, correcting the detected outliers using a preset outlier correction method to obtain supplemented and corrected first historical data, and standardizing the first historical data using a preset standardization method to obtain preprocessed historical data;
[0009] an encoding and feature selection step of encoding the task type data to obtain task type encoding data, analyzing the association between the patient receipt data and the medical supplies data using a preset analysis method, and selecting N1 first feature data based on the analysis and processing results to construct a valid feature set; wherein N1 is an integer greater than or equal to 1;
[0010] a data set construction step of splicing the task type coding data, the patient reception data, and the medical supplies data in the valid feature set in the form of feature splicing to construct a data set, and dividing the data set into a training set and a test set according to a preset ratio;
[0011] The prediction model training and prediction steps use the data set to train a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine, and output the model prediction results; wherein, during the training process, a preset error evaluation function is used as the loss function of the multi-output regression model, the model prediction results and the medical supplies data are calculated and processed to obtain a prediction error value, and based on an error feedback mechanism, the model parameters of the medical supplies consumption prediction model are adjusted and optimized according to the prediction error value to optimize the medical supplies consumption prediction model.
[0012] Preferably, the task type data includes N2 first task type data, and the medical supplies data includes:
[0013] The total consumption of N6 first-class medical supplies within N3 days corresponding to the first-class task type data;
[0014] The average daily consumption of N6 first-class medical supplies within N3 days corresponding to the first-class task type data;
[0015] Wherein, N2 and N6 are integers greater than or equal to 1, and N3 is an integer greater than or equal to 7.
[0016] Further preferably, the patient receiving data includes:
[0017] The first task type data corresponds to the average number of patients received in the past 7 days;
[0018] The first task type data corresponds to the average number of patients received in the past 14 days;
[0019] The first task type data corresponds to the average number of patients received in the past 30 days;
[0020] The first task type data corresponds to the fluctuation rate of patient admissions in the past 7 days.
[0021] Further preferably, the encoding process is performed on the task type data to obtain the task type encoding data specifically as follows:
[0022] The N2 first task type data of the task type data are respectively encoded using a preset encoding method to obtain task type encoded data; wherein the task type encoded data includes N2 encoded data corresponding to the first task type data.
[0023] Preferably, the patient reception data includes the number of patients received, and the medical supplies data includes the amount of medical supplies consumed. The use of a preset analysis method to analyze and process the correlation between the patient reception data and the medical supplies data, and screening N1 first feature data according to the analysis and processing results is specifically:
[0024] Calculate the correlation coefficient between the number of patients admitted and the amount of medical supplies consumed using a preset analysis method;
[0025] The medical material data having the correlation coefficient greater than a preset correlation coefficient threshold is determined as the first feature data.
[0026] Further preferably, the patient reception data includes the number of patients received, and the medical supplies data includes the amount of medical supplies consumed. The preset analysis method is used to analyze and process the correlation between the patient reception data and the medical supplies data, and the N1 first feature data are selected according to the analysis and processing results. Specifically,
[0027] Calculate the correlation coefficient between the number of patients admitted and the amount of medical supplies consumed using a preset analysis method;
[0028] Sort the correlation coefficients in descending order, take the medical supplies data corresponding to the top N1 correlation coefficients, and determine them as the first feature data.
[0029] Further preferably, the splicing processing of the task type coding data, the patient reception data and the medical supplies data in the valid feature set in the form of feature splicing specifically includes:
[0030] The medical supplies consumption in the medical supplies data is X_1=(x1, x2, ..., xn), which represents the medical supplies consumption in the past n days;
[0031] The number of patients admitted in the patient admission data is X_2=(y1, y2, ..., yn), which represents the number of patients admitted in the past n days;
[0032] The task type encoding data is X_3 = (z1, z2, ..., zn), which represents the task category data corresponding to each day;
[0033] The overall feature form after splicing processing is X=(X_1,X_2,X_3)=(x1,x2,...,xn,y1,y2,...,yn,z1,z2,...,zn).
[0034] Further preferably, the using the data set to train a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine specifically includes:
[0035] inputting the data set into the multi-output regression model;
[0036] The multi-output regression calls the underlying lightweight gradient boosting sub-model to perform regression inference on each target output respectively, and obtains the medical supply consumption of N6 first medical supply types in the next N4 days, where N4 is an integer greater than or equal to 1.
[0037] Further preferably, the method further comprises:
[0038] a material inventory assessment and early warning step, comparing the medical material consumption of the N6 first medical material categories in the next N4 days with the inventory corresponding to the first medical material category in the medical material data in the historical data;
[0039] When the inventory is less than or equal to the medical supplies consumption of the first medical supplies type in the next N4 days, an early warning prompt message is generated for output through the early warning prompt device.
[0040] A second aspect of the present invention provides a medical supplies consumption prediction system, comprising: a data acquisition unit, a data preprocessing unit, a feature engineering unit, a model prediction unit, and an error feedback unit, for implementing the medical supplies consumption prediction model construction method according to claims 1 to 9 of the present invention, specifically comprising:
[0041] The data acquisition unit is used to obtain historical data; wherein the historical data includes medical supplies data, patient reception data and task type data;
[0042] The data preprocessing unit is configured to perform missing value detection and outlier detection on the historical data, supplement the detected missing values using an interpolation supplementation method, correct the detected outliers using a preset outlier correction method to obtain supplemented and corrected first historical data, and standardize the first historical data using a preset standardization method to obtain preprocessed historical data;
[0043] The feature engineering unit is configured to encode the task type data to obtain task type coded data, analyze the correlation between the patient receipt data and the medical supplies data using a preset analysis method, and select N1 first feature data based on the analysis and processing results to construct a valid feature set; wherein N1 is an integer greater than or equal to 1;
[0044] The model prediction unit is used to splice the task type encoding data, the patient reception data, and the medical supplies data in the effective feature set in the form of feature splicing to construct a data set, and divide the data set into a training set and a test set according to a preset ratio, and
[0045] Using the data set to train a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine, outputting the model prediction results, and obtaining the medical supplies consumption prediction model;
[0046] The error feedback unit is used to use a preset error evaluation function as the loss function of the multi-output regression model during the training process, calculate and process the model prediction results and the medical supplies data to obtain a prediction error value, and adjust and optimize the model parameters of the medical supplies consumption prediction model according to the prediction error value based on the error feedback mechanism.
[0047] The embodiments of the present invention provide a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system. Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0048] 1. This paper combines the concept of Multi-Output Regressor (MultiOutputRegressor) with the Light Gradient Boosting Machine (LightGBM) algorithm to propose a method for constructing a medical supplies consumption prediction model for emergency treatment. During the model training and prediction stages, the MultiOutputRegressor mechanism is used to achieve parallel prediction of multiple medical supplies, significantly improving prediction efficiency and accuracy. Under emergency conditions with limited resources and complex environments, this medical supplies consumption prediction model can estimate material needs more quickly, provide decision-making support for medical staff, and reduce errors caused by manual statistics and empirical judgment.
[0049] The present invention proposes a multi-output regression model based on the combination of multi-output regression and lightweight gradient boosting machine to train a medical supplies consumption prediction model. During the training process, an error feedback mechanism is adopted, a preset error evaluation function is used as a loss function, and the prediction error value is calculated for the model prediction results and the medical supplies data. The model parameters of the medical supplies consumption prediction model are adjusted and optimized according to the prediction error value, thereby further improving the accuracy of the prediction of the medical supplies consumption prediction model.
[0050] 3. The medical supplies consumption prediction model constructed by the present invention can also be combined with multi-dimensional data such as task type and patient admission status. Through a series of steps such as missing value processing, outlier detection and correction, feature engineering and multi-output regression prediction, the traditional single-target prediction is expanded into a multi-target parallel prediction model. This model can not only make refined predictions for a certain type of supplies, but also comprehensively consider the demand relationship of multiple types of key supplies, providing a more complete basis for emergency decision-making of hospitals or emergency treatment units, thereby significantly improving the accuracy and timeliness of medical supplies scheduling and guarantee.
[0051] 4. The medical supplies consumption prediction model constructed by the present invention can also automatically generate early warning prompt information based on actual inventory and predicted values, and output it through the early warning prompt device to remind staff to replenish medical supplies in short supply, thereby improving the degree of automation of medical supplies preparation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a system block diagram of a medical supplies consumption prediction system provided by the first embodiment of the present invention;
[0053] Figure 2 A flowchart of a method for constructing a medical supplies consumption prediction model for emergency treatment provided by the first embodiment of the present invention;
[0054] Figure 3A system block diagram of a medical supplies consumption prediction system provided by a second embodiment of the present invention;
[0055] Figure 4 Flowchart of a method for constructing a medical supplies consumption prediction model for emergency treatment provided by the second embodiment of the present invention
[0056] Figure 5 A schematic block diagram of a medical supplies consumption prediction system provided in a second embodiment of the present invention for executing a method for constructing a medical supplies consumption prediction model for emergency treatment. DETAILED DESCRIPTION
[0057] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.
[0058] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments.
[0059] The embodiments of the present invention provide a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system, and a technology that combines the multi-output regression (MultiOutputRegressor) idea with the light gradient boosting machine (LightGradientBoostingMachine, LightGBM) algorithm to construct a medical supplies consumption prediction model. This method changes the existing way of preparing medical supplies in emergency treatment, achieves faster estimation of material needs, provides decision support for medical staff, and reduces errors caused by manual statistics and experience judgment.
[0060] The technical solution of the present invention is described below with reference to specific embodiments in conjunction with the accompanying drawings.
[0061] [First embodiment]
[0062] In order to more clearly describe a method for constructing a medical supplies consumption prediction model for emergency treatment provided by an embodiment of the present invention, the medical supplies consumption prediction system provided by an embodiment of the present invention is first introduced.
[0063] Figure 1This is a system block diagram of a medical supplies consumption prediction system provided by the first embodiment of the present invention. As shown in the figure, the medical supplies consumption prediction system 1000 provided by the first embodiment of the present invention includes a data acquisition unit 1001, a data preprocessing unit 1002, a feature engineering unit 1003, a model prediction unit 1004, and an error feedback unit 1005, wherein:
[0064] The data collection unit 1001 is used to collect historical data of the hospital, including medical supplies data, patient admission data and task type data.
[0065] The data preprocessing unit 1002 is used to detect and supplement missing values, detect and correct outliers, normalize data, and divide data sets into historical data.
[0066] The feature engineering unit 1003 is used to construct an effective feature set for medical supplies prediction based on the average daily consumption of medical supplies, the number of patients per day, and the task type.
[0067] The model prediction unit 1004 is used to construct a data set and use a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine for emergency treatment units to train a medical supplies consumption prediction model, and output the model prediction results, including the prediction of supplies demand in the next N4 period of time.
[0068] The error feedback unit 1005 calculates the prediction error by comparing the model prediction results with the actual medical material consumption, and optimizes the model parameters according to the error value.
[0069] Next, based on the above medical supplies consumption prediction system provided by the first embodiment of the present invention, a method for constructing a medical supplies consumption prediction model for emergency treatment provided by the first embodiment of the present invention is introduced in detail.
[0070] Figure 2 This is a flowchart of a method for constructing a medical supplies consumption prediction model for emergency treatment provided by the first embodiment of the present invention. As shown in the figure, the method for constructing a medical supplies consumption prediction model provided by the present invention includes the following steps:
[0071] In the data collection step 110, historical data is obtained.
[0072] Specifically, historical data related to medical supplies is collected from the hospital management system or hospital information system, including medical supply data, patient reception data, and task type data.
[0073] In an embodiment of the present invention, the task type data includes N2 first task type data, and the medical supplies data includes: the total consumption of N6 first medical supplies within N3 days corresponding to the first task type data; the average daily consumption of N6 first medical supplies within N3 days corresponding to the first task type data; wherein N2 and N6 are integers greater than or equal to 1, and N3 is an integer greater than or equal to 7.
[0074] The first category of medical supplies refers to the types of medical supplies, such as: medical bandages, painkillers, thermometers, blood pressure monitors, stethoscopes, blood glucose meters, endoscopes, ventilators, oxygen concentrators, defibrillators, infusion pumps, syringe pumps, nebulizers, syringes, infusion sets, blood collection needles, indwelling needles, medical gloves, latex gloves, nitrile gloves, masks, protective clothing, shoe covers, surgical gowns, drapes, gauze, bandages, bandages, heart stents, orthopedic steel plates, screws, catheters, urinary catheters, gastric tubes, central venous catheters, antibiotics, antiviral drugs, anticancer drugs, cardiovascular Medical supplies including controlled drugs, epinephrine, nitroglycerin, vaccines, albumin, coagulation factors, normal saline, glucose solution, anesthetics, iodine tincture, alcohol, hydrogen peroxide, N95 masks, KN95 masks, medical surgical masks, goggles, face masks, isolation gowns, protective boot covers, medical sheets, quilt covers, pillowcases, nursing pads, diapers, toilet paper, medical plaster, splints, hydrocolloid dressings, foam dressings, first aid kits, first aid kits, stretchers, sleeping bags, etc. The quantity of the first type of medical supplies is determined by the actual medical supplies data obtained.
[0075] The first task type data includes disaster relief tasks, emergency tasks, or daily diagnosis and treatment. The number N2 of the first task types can be adjusted according to actual conditions. In this example, N2=3.
[0076] In an embodiment of the present invention, the patient reception data includes the average number of patients received in the past 7 days corresponding to the first task type data; the average number of patients received in the past 14 days corresponding to the first task type data; the average number of patients received in the past 30 days corresponding to the first task type data; and the fluctuation rate of patient reception in the past 7 days corresponding to the first task type data.
[0077] In an example of an embodiment of the present invention, raw data is obtained by accessing a medical information system, from which historical data is obtained, including the total consumption of medical bandages, analgesics, and antibiotics within 7 days under disaster relief missions, first aid missions, and daily diagnosis and treatment, as well as two sequence data of patient admissions corresponding to 7 days, 14 days, and 30 days, namely: the total consumption of medical bandages within 7 days under disaster relief missions, the total consumption of analgesics within 7 days under disaster relief missions, the total consumption of antibiotics within 7 days under disaster relief missions, the average daily consumption of medical bandages within 7 days under disaster relief missions, the average daily consumption of analgesics within 7 days under disaster relief missions, the average daily consumption of antibiotics within 7 days under disaster relief missions, the total consumption of medical bandages within 7 days under first aid missions, the total consumption of analgesics within 7 days under first aid missions, the total consumption of antibiotics within 7 days under first aid missions, the average daily consumption of medical bandages within 7 days under first aid missions, the average daily consumption of analgesics within 7 days under first aid missions, the average daily consumption of antibiotics within 7 days under first aid missions, and the average daily consumption of medical bandages within 7 days under daily diagnosis and treatment. Total consumption of bandages, total consumption of analgesics within 7 days under daily diagnosis and treatment, total consumption of antibiotics within 7 days under daily diagnosis and treatment, average daily consumption of medical bandages within 7 days under daily diagnosis and treatment, average daily consumption of analgesics within 7 days under daily diagnosis and treatment, average daily consumption of antibiotics within 7 days under daily diagnosis and treatment, average number of patients admitted to disaster relief missions in the past 7 days, average number of patients admitted to disaster relief missions in the past 14 days, average number of patients admitted to disaster relief missions in the past 30 days, fluctuation rate of patient admission to disaster relief missions in the past 7 days, average number of patients admitted to emergency missions in the past 7 days, average number of patients admitted to emergency missions in the past 14 days, average number of patients admitted to emergency missions in the past 30 days, fluctuation rate of patient admission to emergency missions in the past 7 days, average number of patients admitted to daily diagnosis and treatment in the past 7 days, average number of patients admitted to daily diagnosis and treatment in the past 14 days, average number of patients admitted to daily diagnosis and treatment in the past 30 days, fluctuation rate of patient admission to daily diagnosis and treatment in the past 7 days.
[0078] In an embodiment of the present invention, the acquired historical data is integrated and finally a file in comma-separated values (csv) format is generated, in which a row represents the historical material consumption and patient admission corresponding to a certain date, and a column represents the specific numerical value of the feature. Finally, the csv files representing different task types are merged into one csv file by row, and a column of task type is set as an independent variable, which can be expressed in the form of X = (x1, x2, ... xn), where each data point xi corresponds to a feature vector.
[0079] The data preprocessing step 120 performs missing value detection and outlier detection on the historical data, uses an interpolation supplementation method to supplement the detected missing values, uses a preset outlier correction method to correct the detected outliers to obtain the supplemented and corrected first historical data, and uses a preset standardization method to standardize the first historical data to obtain the preprocessed historical data.
[0080] Specifically, statistical methods such as mean and standard deviation are used to detect missing values in medical supplies data, patient reception data, and task type data, and the missing values are supplemented through interpolation methods.
[0081] The preset outlier correction method of the embodiment of the present invention is the isolation forest algorithm, which performs outlier detection by constructing multiple isolation trees (IT) to identify outliers. For the above data set X = (x1, x2, ... xn), multiple subsets Xi are generated by randomly selecting features and data points. For each subset Xi, an isolation tree is constructed, and each tree performs data segmentation by recursively selecting features and cutting points. Assuming that the cutting point of the k-th tree is daily diagnosis and treatment Pk, the depth of the tree is daily diagnosis and treatment hk (x), and the abnormal score is calculated to evaluate whether a certain data is an outlier. The abnormal score calculation formula is:
[0082]
[0083] Where E(h(x)) is the average depth of data point x in all isolated trees, and c(n) is a normalization constant, which is expressed as:
[0084] c(n)=2×log2(n-1)-2×nn-1For the missing values detected, linear interpolation is used to fill the missing data according to the time series characteristics of the data. For the known data point coordinates (x1, y1) and (x2, y2) in the data set, linear interpolation is used to calculate the missing value y of a column x:
[0085] y=y1+x2-x1(x-x1)(y2-y1) (Formula 2)
[0086] After the above historical data are subjected to missing value detection and outlier detection, the data obtained after missing value supplementation and outlier correction are recorded as the first historical data after supplementation and correction.
[0087] Next, the supplemented and corrected first historical data is normalized. The preset normalization method in the embodiment of the present invention is Z-score or Min-Max. In the specific example of the present invention, the Z-score normalization method is used to normalize the first historical data. The normalization formula is as follows:
[0088]
[0089] Where, X is the original data, μ is the mean, and σ is the standard deviation.
[0090] Z-score normalization can remove the dimensional differences between different features, ensure that the data are compared at the same scale, and avoid certain features having a greater impact on the model due to different dimensions.
[0091] After performing the above processing on the historical data, the preprocessed historical data is obtained.
[0092] In the coding and feature selection step 130, the task type data is coded to obtain task type coded data, and the correlation between the patient reception data and the medical supplies data is analyzed and processed using a preset analysis method. N1 first feature data are screened based on the analysis and processing results to construct a valid feature set; wherein N1 is an integer greater than or equal to 1.
[0093] Specifically, a preset encoding method is used to encode N2 pieces of first task type data to obtain task type encoded data, wherein the task type encoded data includes N2 pieces of encoded data corresponding to the first task type data.
[0094] In a preferred embodiment of the present invention, the preset encoding method is one-hot encoding, and the task type data is encoded using one-hot encoding. One-hot encoding represents a categorical variable as a binary vector. It involves first mapping the first task type data to integer values. Then, each integer value is represented as a binary vector, with all values being zero except for the integer index, which is marked as 1. After encoding, all first task type data is encoded into the corresponding encoded data.
[0095] Next, a preset analysis method is used to analyze and process the correlation between the patient receipt data and the medical supply data, and N1 first feature data are screened based on the analysis and processing results. In an embodiment of the present invention, the patient receipt data includes the number of patients received, the medical supply data includes the amount of medical supplies consumed, and the preset analysis method is a Pearson correlation analysis method, a Spearman rank correlation analysis method, or a mutual information method. The preset analysis method is used to analyze and process the correlation between the patient receipt data and the medical supply data, and the N1 first feature data are screened based on the analysis and processing results. Specifically,
[0096] In the embodiment of the present invention, the Pearson correlation analysis method is used to calculate the correlation coefficient between the number of patients admitted and the consumption of medical supplies. The correlation coefficient formula is:
[0097]
[0098] Among them, Xi and Yi are the observed values of two variables, and is the mean of the two variables.
[0099] In the process of calculating the correlation coefficient, features that are highly correlated with the predicted results are selected. The determination method includes the following two methods:
[0100] In a first manner, medical material data having a correlation coefficient greater than a preset correlation coefficient threshold is determined as first feature data, wherein the preset correlation coefficient threshold can be adjusted according to actual conditions, such as 0.9 or 1.0.
[0101] The second method is to sort the calculated correlation coefficients in descending order, take the medical supplies data corresponding to the top N1 correlation coefficients, and determine them as the first feature data.
[0102] In an embodiment of the present invention, the Pearson correlation analysis method measures the strength of the linear relationship between two variables by calculating the ratio of the covariance to the standard deviation between them. The resulting value ranges from -1 to 1. The closer the value is to 1 or -1, the stronger the correlation between the variables. A value of 0 indicates no correlation. The use of the Pearson correlation analysis method can quickly measure the linear correlation between two continuous variables and is suitable for situations where there is a linear relationship between the data. It can effectively improve the prediction speed of the medical supply consumption prediction model provided by the present invention.
[0103] The effective feature set is constructed from the first feature data determined after the above processing.
[0104] In the data set construction step 140 , the task type coding data, patient reception data, and medical supplies data in the valid feature set are spliced in the form of feature splicing to construct a data set, and the data set is divided into a training set and a test set according to a preset ratio.
[0105] Specifically, the medical supplies data, patient receipt data, and task category data that have undergone the above processing are combined together in the form of feature splicing as independent variables, and the consumption of each material in the next N4 days is used as the dependent variable to construct a data set, where N4 is an integer greater than or equal to 1. The constructed data set is divided into a training set and a test set according to a preset ratio, such as 8:2, 9:1, or 7:3. In an embodiment of the present invention, the preset ratio is 8:2. This preset ratio provides sufficient data for training the model while also leaving enough test sets for evaluating the generalization ability of the model. This ratio can usually balance the size of the training and test data, ensuring that the model can learn effective patterns, while evaluating its performance on the test set to avoid overfitting.
[0106] In the embodiment of the present invention, the specific splicing scheme is to splice each feature of each data sample, such as medical supplies consumption, number of patients admitted, task type, etc., into a vector by column. For example, if the dataset contains the following three features:
[0107] The medical supplies consumption in the medical supplies data is X_1 = (x1, x2, ..., xn), which represents the medical supplies consumption in the past n days;
[0108] The number of patients admitted in the patient admission data is X_2 = (y1, y2, ..., yn), which represents the number of patients admitted in the past n days;
[0109] The task type encoding data is X_3 = (z1, z2, ..., zn), which represents the task category data corresponding to each day;
[0110] The overall characteristic form after splicing is:
[0111] X=(X_1,X_2,X_3)=(x1,x2,...,xn,y1,y2,...,yn,z1,z2,...,zn) (Formula 5)
[0112] In a specific example of an embodiment of the present invention, various processed data csv files are integrated to form a total csv data file. The final csv file is represented as follows:
[0113] Data = concat(Data 物资1 ,Data 物资2 ,Data 患者 ,Data 任务1 …, Y 预测1 ,…)(Formula 6)
[0114] The model input can be expressed as:
[0115] W=(x1,x2,x3…,xn,y1,y2,..,yn) (Formula 7)
[0116] Among them, xi represents the independent variable, and yi represents the material consumption to be predicted.
[0117] In the preferred embodiment of the present invention, N4 is 1, and the target value (dependent variable) of each sample is the material consumption in the next day. For example, Y = (y_future), which represents the medical material consumption in the next day. Finally, these spliced sample data will be divided into training set and test set in a ratio of 8:2.
[0118] The prediction model training and prediction step 150 uses a data set to train a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine, and outputs the model prediction results; wherein, during the training process, a preset error evaluation function is used as the loss function of the multi-output regression model, and the model prediction results and medical supplies data are calculated and processed to obtain a prediction error value, and based on the error feedback mechanism, the model parameters of the medical supplies consumption prediction model are adjusted and optimized according to the prediction error value to optimize the medical supplies consumption prediction model.
[0119] Specifically, the pre-training model adopted in the present invention is a multi-output regression model based on the combination of multi-output regression and lightweight gradient boosting machine for training. The constructed data set is input into the multi-output regression model and the multi-output regression model is trained. During training, the multi-output regression calls the underlying lightweight gradient boosting machine sub-model to perform regression inference on each target output respectively, and obtains the medical supply consumption of N6 first medical supply categories in the next N4 days.
[0120] During the training process, the model's predictions are compared with actual consumption data using a pre-defined error evaluation function, such as the mean squared error (MSE), as a loss function. Through an error feedback mechanism, the model's parameters are optimized to improve prediction accuracy and ensure the model's adaptability to different mission types and patient admissions. This multi-dimensional material data forecasting method effectively enhances the model's ability to predict medical material consumption, providing a more accurate forecasting model for the scheduling and management of emergency medical treatment units.
[0121] In the embodiment of the present invention, this step specifically includes the following sub-steps:
[0122] Step 1501: Train and predict using a multi-output regression model combining MultiOutputRegressor and LightGBM. The goal is to predict the consumption of multiple medical supplies (such as bandages, painkillers, antibiotics, etc.) in parallel. The input data is X = (x1, x2, ..., xn), which represents different task types, historical consumption, patient reception status, and other characteristics. The output of the model is Y = (y1, y2, ..., ym), which represents the corresponding material consumption.
[0123] Step 1502: During the training process, the mean square error (MSE) is used as the loss function to calculate the difference between the model's prediction results and the actual data. The calculation formula of MSE is:
[0124]
[0125] Among them, y i is the true value, is the model prediction value, and k is the number of output dimensions, for example, the predicted consumption quantity of medical bandages, painkillers, and antibiotics.
[0126] Step 1503: To improve the prediction accuracy of the model, an error feedback mechanism is used to optimize the model. During the training process, methods such as cross-validation and grid search are used to adjust hyperparameters such as learning rate and tree depth to improve the accuracy and stability of the model.
[0127] Through the above steps 110 to 150, a method for constructing a medical supplies consumption prediction model for emergency treatment provided by the first embodiment of the present invention is introduced in detail.
[0128] [Second embodiment]
[0129] The second embodiment of the present invention provides a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system, which are improved on the basis of the first embodiment. It also provides a method for providing automatic early warning when the medical supplies data inventory is insufficient. The second embodiment provided by the present invention is introduced in detail below in conjunction with the accompanying drawings.
[0130] Figure 3 The system block diagram of the medical supplies consumption prediction system provided in the second embodiment of the present invention is shown in the figure. In addition to the components 2001 to 2005 corresponding to the system provided in the first embodiment, the system 2000 also includes a material inventory assessment and early warning unit 2006, which is used to compare the model prediction results with the actual inventory of materials in the medical supplies management system. When the actual inventory is insufficient, it generates early warning information and triggers the early warning through the medical supplies management system interface.
[0131] Figure 4 A flowchart of a method for constructing a medical supplies consumption prediction model for emergency treatment provided by a second embodiment of the present invention is shown. In addition to steps 110 to 150 provided by the first embodiment of the present invention, the method for constructing a medical supplies consumption prediction model of the present invention further includes:
[0132] The material inventory assessment and early warning step 160 compares the medical material consumption of N6 first medical material types in the next N4 days with the inventory corresponding to the first medical material type in the medical material data in the historical data. When the inventory is less than or equal to the medical material consumption of the first medical material type in the next N4 days, an early warning prompt information is generated for output through the early warning prompt device.
[0133] Specifically, the N6 medical supply consumption quantities for the first medical supply type over the next N4 days obtained in step 150 are compared with the inventory quantities corresponding to the first medical supply type in the medical supply data obtained from the medical resource management system. When the inventory quantity is less than or equal to the medical supply consumption quantity for the first medical supply type over the next N4 days, a warning message is generated for output via the warning device.
[0134] The above embodiments provide a detailed description of a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system. Figure 5 A schematic block diagram of a medical supplies consumption prediction system provided in the second embodiment of the present invention for executing a method for constructing a medical supplies consumption prediction model for emergency treatment, wherein Figure 5 The specific functions of each unit in the medical material consumption prediction system provided by the present invention and the specific circumstances of its implementation of the construction method of the present invention can be more clearly understood.
[0135] The embodiments of the present invention provide a method for constructing a medical supplies consumption prediction model for emergency treatment and a medical supplies consumption prediction system, which have at least the following beneficial technical effects:
[0136] 1. This paper combines the concept of Multi-Output Regressor (MultiOutputRegressor) with the Light Gradient Boosting Machine (LightGBM) algorithm to propose a method for constructing a medical supplies consumption prediction model for emergency treatment. During the model training and prediction stages, the MultiOutputRegressor mechanism is used to achieve parallel prediction of multiple medical supplies, significantly improving prediction efficiency and accuracy. Under emergency conditions with limited resources and complex environments, this medical supplies consumption prediction model can estimate material needs more quickly, provide decision-making support for medical staff, and reduce errors caused by manual statistics and empirical judgment.
[0137] The present invention proposes a multi-output regression model based on the combination of multi-output regression and lightweight gradient boosting machine to train a medical supplies consumption prediction model. During the training process, an error feedback mechanism is adopted, a preset error evaluation function is used as a loss function, and the prediction error value is calculated for the model prediction results and the medical supplies data. The model parameters of the medical supplies consumption prediction model are adjusted and optimized according to the prediction error value, thereby further improving the accuracy of the prediction of the medical supplies consumption prediction model.
[0138] 3. The medical supplies consumption prediction model constructed by the present invention can also be combined with multi-dimensional data such as task type and patient admission status. Through a series of steps such as missing value processing, outlier detection and correction, feature engineering and multi-output regression prediction, the traditional single-target prediction is expanded into a multi-target parallel prediction model. This model can not only make refined predictions for a certain type of supplies, but also comprehensively consider the demand relationship of multiple types of key supplies, providing a more complete basis for emergency decision-making of hospitals or emergency treatment units, thereby significantly improving the accuracy and timeliness of medical supplies scheduling and guarantee.
[0139] 4. The medical supplies consumption prediction model constructed by the present invention can also automatically generate early warning prompt information based on actual inventory and predicted values, and output it through the early warning prompt device to remind staff to replenish medical supplies in short supply, thereby improving the degree of automation of medical supplies preparation.
[0140] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is described in detail above in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0141] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0142] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0143] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for constructing a medical supplies consumption prediction model for emergency treatment, characterized in that: The method for constructing a medical supplies consumption prediction model includes: A data collection step, obtaining historical data; wherein the historical data includes medical supplies data, patient reception data and task type data; a data preprocessing step of performing missing value detection and outlier detection on the historical data, supplementing the detected missing values using an interpolation supplementation method, correcting the detected outliers using a preset outlier correction method to obtain supplemented and corrected first historical data, and standardizing the first historical data using a preset standardization method to obtain preprocessed historical data; an encoding and feature selection step of encoding the task type data to obtain task type encoding data, analyzing the association between the patient receipt data and the medical supplies data using a preset analysis method, and selecting N1 first feature data based on the analysis and processing results to construct a valid feature set; wherein N1 is an integer greater than or equal to 1; a data set construction step of splicing the task type coding data, the patient reception data, and the medical supplies data in the valid feature set in the form of feature splicing to construct a data set, and dividing the data set into a training set and a test set according to a preset ratio; The prediction model training and prediction steps use the data set to train a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine, and output the model prediction results; wherein, during the training process, a preset error evaluation function is used as the loss function of the multi-output regression model, the model prediction results and the medical supplies data are calculated and processed to obtain a prediction error value, and based on an error feedback mechanism, the model parameters of the medical supplies consumption prediction model are adjusted and optimized according to the prediction error value to optimize the medical supplies consumption prediction model.
2. The method for constructing a medical supplies consumption prediction model according to claim 1, characterized in that: The task type data includes N2 first task type data, and the medical supplies data includes: The total consumption of N6 first-class medical supplies within N3 days corresponding to the first-class task type data; The average daily consumption of N6 first-class medical supplies within N3 days corresponding to the first-class task type data; Wherein, N2 and N6 are integers greater than or equal to 1, and N3 is an integer greater than or equal to 7.
3. The method for constructing a medical supplies consumption prediction model according to claim 2, characterized in that: The patient receiving data includes: The first task type data corresponds to the average number of patients received in the past 7 days; The first task type data corresponds to the average number of patients received in the past 14 days; The first task type data corresponds to the average number of patients received in the past 30 days; The first task type data corresponds to the fluctuation rate of patient admissions in the past 7 days.
4. The method for constructing a medical supplies consumption prediction model according to claim 2, wherein: The task type data is encoded to obtain the task type encoding data as follows: The N2 first task type data of the task type data are respectively encoded using a preset encoding method to obtain task type encoded data; wherein the task type encoded data includes N2 encoded data corresponding to the first task type data.
5. The method for constructing a medical supplies consumption prediction model according to claim 1, wherein: The patient reception data includes the number of patients received, and the medical supplies data includes the amount of medical supplies consumed. The association between the patient reception data and the medical supplies data is analyzed and processed using a preset analysis method, and N1 first feature data are selected based on the analysis and processing results. Specifically, Calculate the correlation coefficient between the number of patients admitted and the amount of medical supplies consumed using a preset analysis method; The medical material data having the correlation coefficient greater than a preset correlation coefficient threshold is determined as the first feature data.
6. The method for constructing a medical supplies consumption prediction model according to claim 5, characterized in that: The patient reception data includes the number of patients received, and the medical supplies data includes the amount of medical supplies consumed. The association between the patient reception data and the medical supplies data is analyzed and processed using a preset analysis method, and N1 first feature data are selected based on the analysis and processing results. Specifically, Calculate the correlation coefficient between the number of patients admitted and the amount of medical supplies consumed using a preset analysis method; Sort the correlation coefficients in descending order, take the medical supplies data corresponding to the top N1 correlation coefficients, and determine them as the first feature data.
7. The method for constructing a medical supplies consumption prediction model according to claim 3, characterized in that: The splicing processing of the task type coding data, the patient reception data and the medical supplies data in the valid feature set in the form of feature splicing specifically includes: The medical supplies consumption in the medical supplies data is X_1=(x1, x2, ..., xn), which represents the medical supplies consumption in the past n days; The number of patients admitted in the patient admission data is X_2=(y1, y2, ..., yn), which represents the number of patients admitted in the past n days; The task type encoding data is X_3 = (z1, z2, ..., zn), which represents the task category data corresponding to each day; The overall feature form after splicing processing is X=(X_1,X_2,X_3)=(x1,x2,...,xn,y1,y2,...,yn,z1,z2,...,zn).
8. The method for constructing a medical supplies consumption prediction model according to claim 2, wherein: The training of the multi-output regression model based on the combination of multi-output regression and lightweight gradient boosting machine using the data set specifically includes: inputting the data set into the multi-output regression model; The multi-output regression calls the underlying lightweight gradient boosting sub-model to perform regression inference on each target output respectively, and obtains the medical supply consumption of N6 first medical supply types in the next N4 days, where N4 is an integer greater than or equal to 1.
9. The method for constructing a medical supplies consumption prediction model according to claim 8, characterized in that: The method further comprises: a material inventory assessment and early warning step, comparing the medical material consumption of the N6 first medical material categories in the next N4 days with the inventory corresponding to the first medical material category in the medical material data in the historical data; When the inventory is less than or equal to the medical supplies consumption of the first medical supplies type in the next N4 days, an early warning prompt message is generated for output through the early warning prompt device.
10. A medical supplies consumption prediction system, characterized in that: The medical supplies consumption prediction system includes a data acquisition unit, a data preprocessing unit, a feature engineering unit, a model prediction unit, and an error feedback unit, and is used to implement the medical supplies consumption prediction model construction method according to claims 1 to 9 of the present invention, specifically including: The data acquisition unit is used to obtain historical data; wherein the historical data includes medical supplies data, patient reception data and task type data; The data preprocessing unit is configured to perform missing value detection and outlier detection on the historical data, supplement the detected missing values using an interpolation supplementation method, correct the detected outliers using a preset outlier correction method to obtain supplemented and corrected first historical data, and standardize the first historical data using a preset standardization method to obtain preprocessed historical data; The feature engineering unit is configured to encode the task type data to obtain task type coded data, analyze the correlation between the patient receipt data and the medical supplies data using a preset analysis method, and select N1 first feature data based on the analysis and processing results to construct a valid feature set; wherein N1 is an integer greater than or equal to 1; The model prediction unit is used to splice the task type encoding data, the patient reception data, and the medical supplies data in the effective feature set in the form of feature splicing to construct a data set, and divide the data set into a training set and a test set according to a preset ratio, and Using the data set to train a multi-output regression model based on a combination of multi-output regression and a lightweight gradient boosting machine, outputting the model prediction results, and obtaining the medical supplies consumption prediction model; The error feedback unit is used to use a preset error evaluation function as the loss function of the multi-output regression model during the training process, calculate and process the model prediction results and the medical supplies data to obtain a prediction error value, and adjust and optimize the model parameters of the medical supplies consumption prediction model according to the prediction error value based on the error feedback mechanism.