Emergency rescue room nursing resource dynamic scheduling method and system based on demand prediction
By using prediction and multi-objective optimization based on GRU and Transformer models, the static scheduling and experience-dependent problems in the emergency resuscitation room were solved, enabling refined allocation and scientific scheduling of nursing resources, and improving operational efficiency and emergency response capabilities.
Patent Information
- Application Number
- CN202511407415.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-09-29
AI Technical Summary
In existing technologies, the scheduling model of emergency resuscitation rooms is static, reactive, and highly dependent on experience, resulting in insufficient manpower during peak hours and wasted resources during off-peak hours. It lacks scientific and quantitative decision support and makes it difficult to balance multiple management objectives such as patient waiting time, nurse workload, and human resource costs.
By collecting historical data to train improved GRU and Transformer models, patient inflow and triage levels are predicted. Combined with real-time data, a multi-objective optimization model is constructed to generate scheduling plans and achieve dynamic scheduling of nursing resources.
It has enabled the refined allocation and optimization of nursing resources, improved the operational efficiency and emergency response capabilities of the emergency resuscitation room, scientifically balanced multiple management objectives, and reduced manual scheduling time and errors.
Smart Images

Figure CN120895199B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of resource dynamic scheduling, and particularly relates to a nursing resource dynamic scheduling method and system for emergency rescue rooms based on demand prediction. BACKGROUND
[0002] An emergency rescue room is a core place for a hospital to treat patients with acute and critical conditions, and its operation efficiency is directly related to patient life safety and medical quality. Hospitals generally use a fixed scheduling mode based on historical experience (such as “three shifts”), which cannot flexibly respond to the fluctuating patient inflow and the severity of the disease every hour, resulting in a serious shortage of manpower during peak periods and waste of human resources during idle periods. Dispatching decisions are often based on the current instantaneous state, which is a passive “after-the-fact remedy” and lacks foresight. When the number of patients suddenly increases, nurses are temporarily transferred from other departments, response delays are long, and the normal work of other departments is disrupted. Scheduling and dispatching are highly dependent on the personal experience of the head nurse, and lack scientific and quantitative decision support, making it difficult to ensure the scientificity and optimality of decisions when dealing with complex and variable situations. Traditional scheduling methods cannot simultaneously consider multiple often conflicting management objectives such as “minimizing patient waiting time”, “balancing nurse workload”, and “controlling labor costs”.
[0003] The prior art has the problems of static scheduling, reactive dispatching, strong dependence on experience, and neglecting multi-objective optimization. SUMMARY
[0004] (I) Technical problems solved
[0005] To solve the problems in the related art, the application provides a nursing resource dynamic scheduling method and system for emergency rescue rooms based on demand prediction to overcome the above technical problems existing in the prior art.
[0006] (II) Technical solutions
[0007] To solve the above technical problems, the application is implemented by the following technical solutions:
[0008] S1, collect historical emergency rescue room feature data;
[0009] S2, set a patient inflow label for the historical emergency rescue room feature data to obtain historical emergency rescue room feature data with a patient inflow label; use the historical emergency rescue room feature data with the patient inflow label to train an improved GRU model to obtain a final GRU model;
[0010] S3, set a triage level label for historical emergency rescue room feature data to obtain historical emergency rescue room feature data with a triage level label; use the historical emergency rescue room feature data with a triage level label to train an improved Transformer model to obtain a final Transformer model;
[0011] S4, collect real-time emergency rescue room feature data, and input the real-time emergency rescue room feature data into the final GRU model and the final Transformer model respectively to obtain predicted patient inflow data and predicted patient triage level data;
[0012] Based on the predicted patient inflow data and the predicted patient triage level data, the predicted nursing work hours are calculated;
[0013] S5, based on real-time nurse data, a multi-objective optimization model is constructed, and the predicted nursing work hours are converted into a set of scheduling and dispatching schemes by solving the multi-objective optimization model;
[0014] Based on the current actual situation and management strategy, an optimal scheduling and dispatching scheme is selected from the set of scheduling and dispatching schemes;
[0015] The application collects historical emergency rescue room feature data, trains an improved GRU model for predicting patient inflow and an improved Transformer model for predicting patient triage level respectively; predicts future demand using real-time data and calculates predicted nursing work hours, constructs a multi-objective optimization model based on real-time nurse data, generates a scheduling scheme set, and selects an optimal scheme by management personnel according to the actual situation; while achieving high-precision and multi-dimensional prediction effect of emergency rescue room nursing demand, the application realizes intelligent management of the whole chain from forward planning to dynamic scheduling of nursing human resources, effectively improves resource utilization efficiency, ensures patient safety and optimizes nurse work load.
[0016] Preferably, the S1 comprises the following steps:
[0017] S11, collect historical patient flow data and historical environmental context data to obtain historical emergency rescue room data;
[0018] S12, identify and remove error data in the historical emergency rescue room data, fill in missing values in the historical emergency rescue room data, standardize the initial historical emergency rescue room data, encode the types in the historical emergency rescue room data, and obtain processed historical emergency rescue room data;
[0019] S13, extract time features, lag features, moving average features and workload quantitative index features from the processed historical emergency rescue room data to obtain historical emergency rescue room feature data;
[0020] The application collects, cleans, labels and processes multiple-source historical data systematically, constructs a high-quality and high-information historical emergency rescue room feature data set, and extracts key prediction factors from the original data, thereby laying a solid and reliable data foundation for realizing a high-precision prediction model.
[0021] Preferably, the S2 comprises the following steps:
[0022] S21, improving the GRU model based on the data characteristics of the emergency rescue room data to obtain an improved GRU model;
[0023] S22, setting a patient inflow label for the historical emergency rescue room feature data to obtain the historical emergency rescue room feature data with the patient inflow label;
[0024] S23, setting a first accuracy threshold and a first maximum training number; repeatedly training the improved GRU model using the historical emergency rescue room feature data with the patient inflow label; after each round of training, calculating the similarity between the prediction result output by the improved GRU model and the patient inflow label data in the historical emergency rescue room feature data with the patient inflow label to obtain a first model accuracy; and adjusting the network parameters of the improved GRU model according to the model accuracy;
[0025] When the first model accuracy is greater than or equal to the first accuracy threshold or the first maximum training number is reached, the training is stopped, and a final GRU model is obtained;
[0026] The application sets a patient inflow label for historical data, and performs special improvements such as multivariate input and periodic feature injection on the GRU model based on the data characteristics of the emergency data, and iteratively trains and optimizes the parameters until the preset accuracy standard is met, thereby obtaining a high-precision final prediction model, realizing accurate prediction of the emergency patient inflow, realizing deep mining and self-adaptive learning of the prediction model on complex spatio-temporal rules, and providing reliable data support for subsequent resource scheduling.
[0027] Preferably, the S21 comprises the following steps:
[0028] S211, improving the input features of the GRU model from single-variable historical values to multivariate and multi-source heterogeneous inputs;
[0029] S212, performing explicit periodic feature injection at the input layer of the GRU model;
[0030] S213, changing the single-step prediction of the GRU model to a sequence-to-sequence multi-step prediction;
[0031] S214, improving the mean square error of the GRU model to a weighted loss function;
[0032] The application upgrades the GRU model into an input structure fusing multi-source heterogeneous data, explicitly injects periodic characteristics to strengthen regular learning, adopts a sequence-to-sequence multi-step prediction architecture to avoid error accumulation, and introduces a weighted loss function to focus on key time periods, thereby achieving precise capture and prospective early warning of emergency peak periods, and providing a more reliable decision basis for resource dynamic scheduling while significantly improving the prediction accuracy of patient inflow.
[0033] Preferably, the S3 comprises the following steps:
[0034] S31, improving a Transformer model based on emergency rescue room data characteristics to obtain an improved Transformer model;
[0035] S32, setting a triage level label for historical emergency rescue room feature data to obtain historical emergency rescue room feature data with a triage level label;
[0036] S33, setting a second accuracy threshold and a second maximum training number; using the historical emergency rescue room feature data with the patient inflow label to repeatedly train the improved GRU model; after each round of training, calculating the similarity between the prediction result output by the improved GRU model and the patient inflow label data in the historical emergency rescue room feature data with the patient inflow label to obtain a second model accuracy; and adjusting the network parameters of the improved GRU model according to the model accuracy;
[0037] When the second model accuracy is greater than or equal to the second accuracy threshold or reaches the second maximum training number, the training is stopped, and a final GRU model is obtained;
[0038] The application improves the Transformer model by time stamp encoding, attention mechanism and probability output for triage level prediction tasks, and optimizes the model parameters through iterative training using labeled data, thereby achieving precise prediction of future patient condition grade distribution and realizing fine forward-looking of nursing resource demand types and intensity, which provides a key decision basis for subsequent on-demand configuration of nurses with different skill levels.
[0039] Preferably, the S31 comprises the following steps:
[0040] S311, replacing the sinusoidal position encoding designed for NLP in the Transformer model with learnable timestamp encoding;
[0041] S312, changing the standard multi-head self-attention mechanism of the Transformer model to a local-global attention hybrid mechanism;
[0042] S313, change the output layer of the Transformer model from outputting a single class label to predicting an output of a probability distribution;
[0043] The application understands the time semantics by replacing the position encoding of the Transformer with a learnable timestamp encoding, efficiently captures the spatio-temporal regularity by adopting a local-global hybrid attention mechanism, and changes the output to a probability distribution to predict the possibility of the disease grade, accurately quantifies the proportion of future patients at each triage level, realizes the fine forward-looking of nursing work intensity and skill demand, and provides key data support for differentiated nurse resource allocation.
[0044] Preferably, the S4 comprises the following steps:
[0045] S41, collecting real-time emergency rescue room data, and performing data processing and feature extraction to obtain real-time emergency rescue room feature data;
[0046] S42, inputting the real-time emergency rescue room feature data into the final GRU model and the final Transformer model respectively to obtain predicted patient inflow data and predicted patient triage level data;
[0047] S43, calculating the predicted triage level number according to the predicted patient inflow data and the predicted patient triage level data;
[0048] Setting triage level working hours; based on the triage level working hours and the predicted triage level number, the predicted nursing working hours are calculated;
[0049] The application collects and processes emergency data in real time, inputs them into the pre-trained GRU and Transformer models, respectively obtains the prediction results of patient inflow and triage level, and then combines the preset triage level standard working hours to calculate the total predicted nursing working hours required in the future period. While achieving the effect of converting abstract prediction data into specific workload indicators, the quantitative and standardized measurement of nursing resource demand is realized, providing accurate quantitative basis for subsequent scientific scheduling.
[0050] Preferably, the S5 comprises the following steps:
[0051] S51, obtaining nurse profile data and real-time nurse data; defining decision variables based on the nurse profile data and real-time nurse data; setting the objective function as minimizing patient waiting time, minimizing nurse work load variance, minimizing labor cost, and maximizing scheduling preference satisfaction;
[0052] Set constraints, the constraints include demand coverage constraints, skill matching constraints, continuous work constraints, rest time constraints and manpower upper and lower limit constraints;The decision variable, objective function and constraint condition jointly constitute a multi-objective optimization model;
[0053] S52, solve the multi-objective optimization model by a multi-objective genetic algorithm to obtain a set of optimal scheduling and dispatching schemes;
[0054] S53, select an optimal scheduling and dispatching scheme from the set of optimal scheduling and dispatching schemes based on the current actual situation and management strategy;
[0055] The step S5 of the present application integrates real-time nurse state and skill data, constructs a multi-objective optimization model considering patient waiting time, nurse load balancing, manpower cost and personal preference, and uses a genetic algorithm to solve to obtain a set of Pareto optimal scheduling schemes for managers to make decisions, which scientifically balances multiple management objectives, realizes automatic conversion from predicted demand to optimal manpower allocation, and significantly improves scheduling efficiency, fairness and decision-making scientificity.
[0056] Preferably, the S52 comprises the following steps:
[0057] S521, based on the predicted nursing work hours, a chromosome set is constructed, each chromosome in the chromosome set represents a scheduling and dispatching scheme for achieving the predicted nursing work hours, and a third maximum iteration number is set;
[0058] S522, based on the objective function and the constraint condition, the chromosomes in the chromosome set with non-dominant relationship are screened to obtain a screened chromosome set;The screened chromosome set is subjected to cross and mutation operations to obtain an operated chromosome set;
[0059] S523, repeat S522, when the third maximum iteration number is reached, a set of optimal scheduling and dispatching schemes is obtained;
[0060] The present application encodes the scheduling scheme as a chromosome, uses non-dominant sorting to screen high-quality solutions, and iteratively optimizes through cross and mutation to finally generate a set of Pareto optimal scheduling schemes, efficiently explores the complex solution space, and realizes automatic generation of optimal scheduling schemes balancing multiple targets under multiple constraints, providing a scientific and flexible decision-making basis for managers.
[0061] The emergency rescue room nursing resource dynamic scheduling system based on demand prediction is used to realize the emergency rescue room nursing resource dynamic scheduling method based on demand prediction, and comprises a data collection and preprocessing module, a model training module, a real-time prediction and nursing work hour calculation module and a scheduling optimization and dispatching decision module.
[0062] The data collection and preprocessing module collects historical emergency rescue room data, including patient flow data and environmental context data, cleans, fills in missing values and standardizes the data, and extracts key features such as time features, lag features, moving average features and workload quantification indicators, finally generating high-quality historical emergency rescue room feature data to provide a basis for model training;
[0063] The model training module trains the improved GRU model and the Transformer model based on the preprocessed historical data; the GRU model is improved to have multivariate input, explicit periodic feature injection, sequence-to-sequence prediction and weighted loss function, and is used to predict patient inflow; the Transformer model is improved through learnable timestamp encoding, local-global attention hybrid mechanism and probability distribution output, and is used to predict patient triage level; during the training process, the accuracy threshold and the maximum number of iterations are set, and the model performance is optimized by adjusting the parameters until the final GRU and Transformer models are obtained;
[0064] The real-time prediction and nursing time calculation module collects real-time emergency rescue room data, which is preprocessed and feature-extracted in the same way as the historical data, and then input into the trained GRU and Transformer models to obtain predicted patient inflow data and triage level data for future time periods; combined with the pre-set triage level nursing time standard, the predicted nursing time is calculated; the predicted patient number is converted into required nursing time according to the probability distribution of triage level, providing a quantitative basis for scheduling and dispatching;
[0065] The scheduling optimization and dispatching decision module constructs a multi-objective optimization model based on the predicted nursing time and real-time nurse data, with the objectives including minimizing patient waiting time, nurse load variance, human cost, and maximizing scheduling preference satisfaction; the model is solved by a multi-objective genetic algorithm to generate a set of Pareto optimal scheduling schemes, and finally the optimal scheme is selected by the dispatcher according to the actual management strategy, and instructions are issued through the information system to realize dynamic scheduling adjustment.
[0066] (Three) beneficial effects
[0067] The present application has the following beneficial effects:
[0068] The present application combines advanced data prediction technology with multi-objective optimization decision-making, realizes the forward-looking, precision and intelligentization of emergency rescue room nursing resource scheduling, and effectively overcomes the drawbacks of traditional static scheduling and reactive scheduling.
[0069] The application realizes the scientific decision-making change from "experience-driven" to "data-driven"; through integrating multi-source heterogeneous data such as historical patient flow, time, environment and events, and using improved GRU model and Transformer model for high-precision prediction, the system can accurately predict the patient inflow and disease severity distribution in a period of time in the future; so that resource scheduling is no longer a passive reaction based on instantaneous state, but active planning based on predicted demand, significantly improving the scientificity and predictability of decision-making.
[0070] The application realizes the fine and optimal allocation of nursing human resources; by quantifying the prediction results as specific "predicted nursing working hours", and constructing an optimization model that integrates multiple objectives and constraints such as minimizing patient waiting time, balancing nurse workload, controlling labor cost and meeting scheduling preferences, and then using multi-objective genetic algorithm for solution, a series of Pareto optimal scheduling schemes can be generated; so that management can scientifically weigh among multiple conflicting objectives, thereby ensuring patient safety and medical quality while improving nurse satisfaction and effectively controlling labor cost.
[0071] The application improves the overall operation efficiency and emergency response capability of the emergency rescue room; the system can dynamically generate and recommend the optimal scheduling scheme, and issue scheduling instructions in real time through the information system, greatly reducing the time and error of manual scheduling and speeding up the response. This not only helps to shorten the patient waiting time during peak hours and reduce medical risks, but also avoids idle of human resources during off-peak hours, thereby realizing the overall optimization and stable operation of the rescue room service capability.
[0072] Of course, any product implementing the present application does not necessarily need to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0073] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, the drawings obtained from these drawings can also be obtained without creative labor.
[0074] Figure 1 The flowchart of the emergency rescue room nursing resource dynamic scheduling method based on demand prediction of the application;
[0075] Figure 2 The module diagram of the emergency rescue room nursing resource dynamic scheduling system based on demand prediction of the application. DETAILED DESCRIPTION
[0076] With reference to the drawings of the embodiments of the application, the technical solutions in the embodiments of the application will be clearly and completely described, obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative work belong to the protection scope of the application.
[0077] In the description of the application, it should be understood that the terms "opening", "upper", "lower", "top", "middle", "inner" and the like indicate the orientation or positional relationship, only for the convenience of describing the application and simplifying the description, and do not indicate or imply that the components or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore, it cannot be understood as a limitation of the application.
[0078] Embodiment one
[0079] Please refer to Figure 1 The application discloses an emergency rescue room nursing resource dynamic scheduling method based on demand prediction, comprising the following steps:
[0080] S1, collecting historical emergency rescue room feature data;
[0081] The S1 comprises the following steps:
[0082] S11, collecting historical patient flow data through the API interface of the hospital information system (HIS) and the emergency information system (EDIS); the patient flow data comprises a patient unique identifier, an arrival time, a triage level (such as CTAS 1-5 level), a chief complaint, a preliminary diagnosis, and a medical order information;
[0083] Obtaining historical environmental context data from public data sources or internal systems, the environmental context data comprises date, day of the week, whether it is a holiday, local weather data (temperature, precipitation, air quality), seasonal influenza / epidemic warning information;
[0084] S12, identifying and removing error data in the historical emergency rescue room data, such as vital sign values far beyond the physiological range, filling missing values in the historical emergency rescue room data, using interpolation method or context-based filling method (such as using the average stay time of the same triage level to fill the missing stay time), standardizing the initial historical emergency rescue room data, the standardization processing is performed by Z-score standardization or Min-Max normalization on continuous numerical features (such as age, body temperature), encoding types in the historical emergency rescue room data to obtain processed historical emergency rescue room data; the type encoding is performed by One-hot Encoding or Embedding on category features (such as chief complaint, diagnosis code);
[0085] S13, extract time features, lag features, moving average features and workload quantitative index features in the processed historical emergency rescue room data, to obtain historical emergency rescue room feature data; the time features are extracted from the timestamp, including "hours", "whether it is night shift (such as 0-6)", "whether it is weekend" and the like; the lag features are obtained by creating lag indicators such as the number of patients arriving at each historical time point in the past 1 hour, 2 hours and 3 hours; the moving average features are obtained by calculating the moving average of the number of patients in the past 4 hours and 8 hours at each historical time point, to smooth short-term fluctuations and reflect trends; the workload quantitative index is obtained by defining a "standard nursing work hour" weight for each patient based on its triage level and required nursing operations (mapped by medical orders), so as to calculate the total nursing workload of the rescue room in real time;
[0086] S2, set a patient inflow label for the historical emergency rescue room feature data, to obtain historical emergency rescue room feature data with a patient inflow label; train the improved GRU model using the historical emergency rescue room feature data with a patient inflow label, to obtain a final GRU model;
[0087] The S2 comprises the following steps:
[0088] S21, improve the GRU model based on the data characteristics of the emergency rescue room data, to obtain an improved GRU model;
[0089] The S21 comprises the following steps:
[0090] S211, improve the input features of the GRU model from single-variable historical values (such as the number of patients in the past 168 hours) to multi-variable, multi-source and heterogeneous inputs; the multi-variable, multi-source and heterogeneous inputs include historical patient numbers, time context, environmental context and event context; the time context includes encoded hours, weeks, months and "whether it is a holiday" flag, the environmental context includes weather data (temperature, precipitation, air quality), and the event context includes "large-scale activities", "popular disease warning" and the like binary flags; the model can not only learn "time regularity", but also understand "why the traffic at this time point is abnormal"; for example, it can learn that the combination of "Saturday night + rain" will lead to an increase in traffic accident casualties, so as to make more accurate predictions;
[0091] S212, at the input layer of the GRU model, explicit periodic feature injection is performed; the traditional GRU model relies on the memory gate of the GRU itself to implicitly learn periodicity, and the ability to capture long-period (such as weekly period) patterns is limited, the embedding vector of the extracted periodic feature (such as "the hour of the day" and "the day of the week") is spliced or added to the hidden state of the GRU; the ability to capture regular patterns such as daily and weekly periods and the prediction stability are significantly improved, and the model "forgetting" the same day of the previous week is avoided;
[0092] S213, the single-step prediction of the GRU model is changed to sequence-to-sequence multi-step prediction; the improved model directly outputs a sequence of a complete time period (such as 4 hours) in the future, rather than predicting one by one; this is achieved through an encoder-decoder architecture, in which the decoder also receives exogenous variables (such as known weather forecasts) at each step; the traditional GRU model is a single-step prediction (only predicting the next time point), or a multi-step prediction using a "recursive rolling" method, and the error will accumulate; the error accumulation caused by recursive rolling is reduced, and the coordinated prediction of the entire time period in the future is obtained at one time, which is more in line with the needs of scheduling decisions;
[0093] S214, the mean square error of the GRU model is improved to a weighted loss function; the mean square error treats all prediction errors equally, while the GRU model in the present application pays more attention to the prediction accuracy of peak period flow, and gives higher weight to the prediction error of the time period with high historical flow in the loss function; the model is forced to pay more "attention" to learning the pattern of the peak period, so as to perform better at the moment when accurate prediction is most needed, and directly improve the effectiveness of the scheduling scheme;
[0094] S22, setting a patient inflow label for historical emergency room feature data to obtain historical emergency room feature data with a patient inflow label;
[0095] S23, setting a first accuracy threshold and a first maximum number of training times; using the historical emergency room feature data with the patient inflow label to repeatedly train the improved GRU model; after each round of training, the similarity between the prediction result output by the improved GRU model and the patient inflow label data in the historical emergency room feature data with the patient inflow label is calculated to obtain a first model accuracy; the network parameters of the improved GRU model are adjusted according to the model accuracy;
[0096] When the first model accuracy is greater than or equal to the first accuracy threshold or reaches the first maximum number of training times, the training is stopped, and a final GRU model is obtained;
[0097] S3, setting a triage level label for historical emergency rescue room feature data to obtain historical emergency rescue room feature data with a triage level label; using the historical emergency rescue room feature data with a triage level label to train an improved Transformer model to obtain a final Transformer model;
[0098] The S3 comprises the following steps:
[0099] S31, improving the Transformer model based on emergency rescue room data characteristics to obtain an improved Transformer model;
[0100] The S31 comprises the following steps:
[0101] S311, replacing the sinusoidal position encoding designed for NLP in the Transformer model with learnable timestamp encoding; the sinusoidal position encoding designed for NLP assumes that the position of elements in the sequence is fixed (1st word, 2nd word…), while the learnable timestamp encoding adds an embedding of a feature vector derived from the timestamp (such as hour, week, holiday) to each time step in addition to the standard position encoding, which is learnable and can better express the semantic meaning of time (such as the essential difference between "3am" and "3pm on Saturday"); the model not only knows the order of time points, but also understands the "time semantics" of each time point, greatly enhancing the representation ability of time regularity;
[0102] S312, changing the standard multi-head self-attention mechanism of the Transformer model to a local-global attention hybrid mechanism; the standard multi-head self-attention mechanism calculates attention between all time steps; the local-global attention hybrid mechanism forces 60% of the attention heads to only focus on the local window (such as the past 6 hours), and the other part of the attention heads to focus on the global periodic nodes (such as the same time last week, the same time last month), which is an improvement of sparsification and prior knowledge injection; it not only captures short-term continuous dependencies (such as the influence of current events), but also efficiently captures long-term periodic patterns, reducing computational complexity and overfitting risk;
[0103] S313, change the output layer of the Transformer model from outputting a single class label to predicting an output as a probability distribution; the output layer uses Softmax, but the target label is the true distribution of the illness level at each time step (such as [0.1, 0.3, 0.5, 0.1, 0.0]), and the loss function does not use standard cross-entropy, but uses KL divergence or Brier Score; instead of simply judging the main class, directly optimize the difference between the predicted distribution and the true distribution, which enables the model to more finely predict "may come 2 critically ill patients" instead of "may come critically ill patients", and the prediction result has more information and is more beneficial to dispatching decisions;
[0104] At the same time, both the GRU and the Transformer model use historical emergency rescue room data as input, so that the two models have consistent understanding of the data at the bottom, which plays a similar "multi-task learning" regularization effect, improves the generalization ability of each model, and reduces the total parameter amount;
[0105] S32, set the triage level label for the historical emergency rescue room feature data to obtain historical emergency rescue room feature data with triage level labels;
[0106] S33, set a second accuracy threshold and a second maximum number of training times; use the historical emergency rescue room feature data with patient inflow labels to repeatedly train the improved GRU model; after each round of training, calculate the similarity between the prediction result output by the improved GRU model and the patient inflow label data in the historical emergency rescue room feature data with patient inflow labels to obtain a second model accuracy; adjust the network parameters of the improved GRU model according to the model accuracy;
[0107] When the second model accuracy is greater than or equal to the second accuracy threshold or the second maximum number of training times is reached, stop training to obtain a final GRU model;
[0108] S4, collect real-time emergency rescue room feature data, and input the real-time emergency rescue room feature data into the final GRU model and the final Transformer model respectively to obtain predicted patient inflow data and predicted patient triage level data;
[0109] Based on the predicted patient inflow data and the predicted patient triage level data, the predicted nursing work hours are calculated;
[0110] The S4 comprises the following steps:
[0111] S41, collect real-time emergency rescue room data, and perform data processing and feature extraction to obtain real-time emergency rescue room feature data; the process of data processing and feature extraction refers to the processing process of historical emergency rescue room data in S1;
[0112] S42, input the real-time emergency rescue room feature data into the final GRU model and the final Transformer model respectively to obtain predicted patient inflow data (such as the total number of patients in the future Kth hour, such as 50) and predicted patient triage level data (such as the probability of first-level patients in the future Kth hour, such as 0.3, the probability of second-level patients is 0.4, the probability of third-level patients is 0.2, the probability of fourth-level patients is 0.1, and the probability of fifth-level patients is 0);
[0113] S43, according to the predicted patient inflow data and the predicted patient triage level data, the predicted triage level number is calculated (such as the predicted number of first-level patients is 50*0.3=15);
[0114] Set the triage level working hours (such as level 5, the first hour standard working hours is 120 minutes, and then every hour 80 minutes, so the total working hours of 4 hours = 120 + 80*3 = 360 minutes, level 4, the first hour 100 minutes, and then every hour 60 minutes, 4 hours total working hours = 100 + 60*3 = 280 minutes, level three total working hours 240 minutes, level two 200 minutes, level one total working hours 160 minutes); Based on the triage level working hours and the predicted triage level number, the predicted nursing working hours are calculated (taking the predicted first-level nursing working hours as an example, 15*160=2400 working hours);
[0115] S5, based on the real-time nurse data, a multi-objective optimization model is constructed, and the predicted nursing working hours are converted into a set of scheduling and dispatching schemes by solving the multi-objective optimization model;
[0116] Based on the current actual situation and management strategy, the optimal scheduling and dispatching scheme is selected from the scheduling and dispatching scheme set;
[0117] The S5 includes the following steps:
[0118] S51, obtain the nurse profile data from the human resource system and the real-time data of the nurses through the Internet of Things indoor positioning system and the smart badge or PDA worn by the nurses; The nurse profile data includes skill level, title, working years, and department affiliation (fixed vs. mobile shift); The real-time data of the nurses includes nurse ID, real-time location, current state (such as "performing intravenous puncture", "in rescue 1 bed", "idle", "rest");
[0119] Based on the nurse profile data and the real-time data of the nurses, define the decision variable; The decision variable is X{n,t}, which is the nurse n In the time period tWhether a nurse is scheduled to work for every hour within the next 4 hours (e.g., 0 / 1) is determined by the following objective functions: minimizing patient waiting time, minimizing nurse workload variance, minimizing labor costs, and maximizing scheduling preference satisfaction. Minimizing patient waiting time means minimizing (total predicted nursing hours - ∑(on-duty nurse capacity)) to ensure available manpower covers predicted demand. Minimizing nurse workload variance means minimizing the total hours allocated to each nurse to ensure fairness and avoid overwork. Minimizing labor costs means minimizing ∑(shift cost * number of shifts) to control overtime and additional manpower expenditure. Maximizing scheduling preference satisfaction means maximizing ∑(nurse preference coefficient * X{n,t}) to respect nurses' individual schedule preferences. To improve satisfaction, constraints are set, including demand coverage constraints, skill matching constraints, continuous work constraints, rest time constraints, and upper and lower limits of manpower constraints. The demand coverage constraint requires that the total capacity of nurses on duty for each time period must be ≥ (predicted required working hours * safety factor). The skill matching constraint requires that critically ill patients must be cared for by nurses with the corresponding qualifications (e.g., N3 level or above). The continuous work constraint requires that nurses' continuous working time must not exceed the legal limit (e.g., 4 hours). The rest time constraint requires that a minimum rest time must be guaranteed between shifts. The upper and lower limits of manpower constraints require that the number of nurses on duty for each time period cannot be lower than the safety lower limit or higher than the physical space upper limit. The decision variables, objective function, and constraints together constitute a multi-objective optimization model.
[0120] S52. Solve the multi-objective optimization model using a multi-objective genetic algorithm to obtain the optimal scheduling scheme set;
[0121] S52 includes the following steps:
[0122] S521. Based on predicted nursing hours, construct a chromosome set, and set the size of the chromosome set to be... p Then the set of chromosomes is represented as ,in, q i Represents the set of chromosomes. i There are 1 chromosome, where each chromosome in the chromosome set represents a scheduling scheme to predict nursing hours, and a third maximum number of iterations is set.
[0123] S522. Based on the objective function and constraints, the chromosomes with non-dominant relationships in the chromosome set are screened to obtain the screened chromosome set; crossover and mutation operations are performed on the screened chromosome set to obtain the operated chromosome set; the non-dominant relationship means that on all objective functions, the scheduling scheme A is no worse than the scheduling scheme B, and on at least one objective function, the scheduling scheme A is strictly better than the scheduling scheme B.
[0124] S523, repeating S522, obtaining the optimal scheduling scheme set when reaching the third maximum iteration number;
[0125] S53, selecting an optimal scheduling scheme from the optimal scheduling scheme set based on the current actual situation and management strategy; specifically, the system visualizes the optimal scheduling scheme set to the dispatcher (such as the head nurse) through a radar chart or a parallel coordinate chart;
[0126] Each scheme is represented as a polyline or a polygon in the chart, and its projection on different coordinate axes (representing different targets such as cost, waiting time, and load balancing) clearly reflects the advantages and disadvantages of the scheme;
[0127] The dispatcher manually selects a most suitable scheduling scheme from the Pareto optimal solution set according to the current actual situation and management strategy (for example, the current is the flu outbreak period, and patient safety should be prioritized; or the current budget is tight, and the cost needs to be strictly controlled); once the scheme is selected, the system sends scheduling instructions to the nurse mobile terminal APP and the electronic scheduling system through the message queue (such as RabbitMQ) or direct API call, notifies the relevant nurses of the new scheduling task (such as "please support you in the rescue room after 10 minutes"), and requests confirmation, automatically updates the scheduling table, makes the information globally synchronized, and automatically calls the on-call personnel when necessary;
[0128] The specific implementation of the present application takes an emergency rescue room of a certain first-class hospital as an example;
[0129] The system triggers a prediction-scheduling cycle every 2 hours; the system collects patient data, scheduling data, and date information every hour within the past 72 hours in real time; the intelligent prediction module uses the trained GRU model and Transformer model to predict that 15 new patients will be added within the next 4 hours, including 3 critical patients (triaged to level 5), and the total nursing working hours required are about 45 people*hours;
[0130] The optimization decision module takes the prediction results, the current 8 nurses on duty, and their skill information as input, runs the NSGA-II algorithm, and generates 3 Pareto optimal schemes within 10 seconds: scheme A (focusing on waiting time) requires 2 additional nurses, with the shortest expected waiting time; scheme B (focusing on balancing) requires 1 additional nurse, with the most balanced load; and scheme C (focusing on cost) does not require additional assistance but adjusts internal task allocation, with the lowest cost;
[0131] The head nurse sees the comparison chart of the three schemes on the tablet computer, and selects scheme A in view of the current high incidence of influenza, with patient safety as the top priority; the system immediately sends a support request to the on-call nurse's mobile APP and updates the scheduling table;
[0132] Feedback: 4 hours later, the system records 17 new patients and 50 man-hours in total, which are marked and stored in the database for the incremental training of the GRU model and the Transformer model this weekend to correct the prediction bias.
[0133] Embodiment Two
[0134] Please refer to Figure 2 , the demand prediction-based emergency rescue room nursing resource dynamic scheduling system, for implementing the above-mentioned demand prediction-based emergency rescue room nursing resource dynamic scheduling method, including a data collection and preprocessing module, a model training module, a real-time prediction and nursing time calculation module, and a scheduling optimization and scheduling decision module.
[0135] The data collection and preprocessing module collects historical emergency rescue room data, including patient flow data and environmental context data, cleans, fills in missing values, and standardizes the data, and extracts key features such as time features, lag features, moving average features, and workload quantification indicators, finally generating high-quality historical emergency rescue room feature data, providing a basis for model training.
[0136] The model training module trains the improved GRU model and the Transformer model based on the preprocessed historical data; the GRU model is improved to have multivariate input, explicit periodic feature injection, sequence-to-sequence prediction, and weighted loss function, for predicting patient inflow; the Transformer model is improved through learnable timestamp encoding, local-global attention hybrid mechanism, and probability distribution output, for predicting patient triage levels; during training, accuracy threshold and maximum iteration number are set, model performance is optimized by adjusting parameters until the final GRU and Transformer models are obtained.
[0137] The real-time prediction and nursing time calculation module collects real-time emergency rescue room data, which is preprocessed and feature-extracted in the same way as historical data, and then input into the trained GRU and Transformer models to obtain predicted patient inflow data and triage level data for future periods; combining the preset triage level man-hour standard, the predicted nursing man-hours are calculated; the predicted patient number is converted into required nursing man-hours according to the triage level probability distribution, providing quantitative basis for scheduling and dispatching.
[0138] The scheduling optimization and dispatching decision module constructs a multi-objective optimization model based on the predicted nursing work hours and real-time nurse data, the objectives including minimizing patient waiting time, nurse load variance, human cost, and maximizing scheduling preference satisfaction; the model is solved by a multi-objective genetic algorithm to generate a set of Pareto optimal scheduling scheme, and finally the optimal scheme is selected by the dispatcher according to the actual management strategy, and the information system is used to issue instructions to realize dynamic scheduling adjustment.
[0139] In the description of the present specification, the description referring to the terms "one embodiment", "an example", "a specific example" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the invention. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0140] The preferred embodiments of the above disclosed invention are only used to help explain the invention. The preferred embodiments do not describe all the details and limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of the present specification. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the invention, so that those skilled in the art can well understand and utilize the invention.
Claims
1. A method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting, characterized in that, Includes the following steps: S1. Collect historical data on the characteristics of emergency and resuscitation rooms; S2. Set patient inflow labels on historical emergency room feature data to obtain historical emergency room feature data with patient inflow labels; The improved GRU model was trained using historical emergency room feature data with patient inflow labels to obtain the final GRU model. S2 includes the following steps: S21. Based on the data characteristics of the emergency room data, the GRU model is improved to obtain the improved GRU model; S22. Set patient inflow labels on historical emergency room feature data to obtain historical emergency room feature data with patient inflow labels; S23. Set a first accuracy threshold and a first maximum number of training iterations; repeatedly train the improved GRU model using historical emergency room feature data with patient inflow labels; after each training round, calculate the similarity between the prediction results output by the improved GRU model and the patient inflow labeled data in the historical emergency room feature data with patient inflow labels to obtain the first model accuracy; adjust the network parameters of the improved GRU model according to the model accuracy. Training is stopped when the accuracy of the first model is greater than or equal to the first accuracy threshold or when the first maximum number of training iterations is reached, and the final GRU model is obtained. S21 includes the following steps: S211. Improve the input features of the GRU model from univariate historical values to multivariate, multi-source heterogeneous inputs; S212. Explicit periodic feature injection is performed in the input layer of the GRU model. S213. Change the single-step prediction of the GRU model to a multi-step prediction from sequence to sequence; S214. Improve the mean squared error of the GRU model to a weighted loss function; S3. Set triage level labels for historical emergency room feature data to obtain historical emergency room feature data with triage level labels; use the historical emergency room feature data with triage level labels to train the improved Transformer model to obtain the final Transformer model. S3 includes the following steps: S31. Based on the characteristics of emergency room data, the Transformer model is improved to obtain the improved Transformer model; S32. Set triage level labels for historical emergency room feature data to obtain historical emergency room feature data with triage level labels; S33. Set a second accuracy threshold and a second maximum number of training iterations; repeatedly train the improved Transformer model using historical emergency room feature data with triage level labels; after each training iteration, calculate the similarity between the prediction results output by the improved Transformer model and the triage level labeled data in the historical emergency room feature data to obtain the second model accuracy; adjust the network parameters of the improved Transformer model according to the model accuracy. When the accuracy of the second model is greater than or equal to the second accuracy threshold or when the second maximum number of training iterations is reached, training is stopped, and the final Transformer model is obtained. S31 includes the following steps: S311. Replace the sinusoidal positional encoding designed for NLP in the Transformer model with a learnable timestamp encoding. S312. Change the standard multi-head self-attention mechanism of the Transformer model to a local-global attention hybrid mechanism; S313. Change the output layer of the Transformer model from outputting a single class label to outputting a probability distribution prediction; S4. Collect real-time emergency resuscitation room characteristic data, and input the real-time emergency resuscitation room characteristic data into the final GRU model and the final Transformer model respectively to obtain predicted patient inflow data and predicted patient triage level data; Based on predicted patient inflow data and predicted patient triage level data, predicted nursing hours are calculated. S5. Based on real-time nurse data, construct a multi-objective optimization model, and transform the predicted nursing hours into an optimal scheduling scheme set by solving the multi-objective optimization model. Select the optimal scheduling scheme from the set of scheduling schemes based on the current situation and management strategy. S5 includes the following steps: S51. Obtain nurse record data and nurse real-time data; define decision variables based on nurse record data and nurse real-time data; set the objective function as minimizing patient waiting time, minimizing nurse workload variance, minimizing labor costs, and maximizing scheduling preference satisfaction; The constraints are defined, including demand coverage constraints, skill matching constraints, continuous work constraints, rest time constraints, and upper and lower limits of manpower constraints; the decision variables, objective function, and constraints together constitute a multi-objective optimization model. S52. Solve the multi-objective optimization model using a multi-objective genetic algorithm to obtain the optimal scheduling scheme set; S53. Select the optimal scheduling scheme from the set of optimal scheduling schemes based on the current actual situation and management strategy. S52 includes the following steps: S521. Based on predicted nursing hours, construct a chromosome set. Each chromosome in the chromosome set represents a scheduling scheme to realize the predicted nursing hours. Set a third maximum number of iterations. S522. Based on the objective function and constraints, the chromosomes with non-dominant relationships in the chromosome set are screened to obtain the screened chromosome set; crossover and mutation operations are performed on the screened chromosome set to obtain the operated chromosome set. S523, repeat S522, and when the third maximum number of iterations is reached, the optimal scheduling scheme set is obtained.
2. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 1, characterized in that, S1 includes the following steps: S11. Collect historical patient flow data and historical environmental context data to obtain historical emergency room data; S12. Identify and remove erroneous data in the historical emergency room data, fill in missing values in the historical emergency room data, standardize the initial historical emergency room data, encode the types in the historical emergency room data, and obtain the processed historical emergency room data. S13. Extract the time characteristics, lag characteristics, moving average characteristics, and workload quantification index characteristics from the processed historical emergency room data to obtain historical emergency room characteristic data.
3. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 1, characterized in that, S4 includes the following steps: S41. Collect real-time emergency room data, and perform data processing and feature extraction to obtain real-time emergency room feature data; S42. Input the real-time emergency room feature data into the final GRU model and the final Transformer model respectively to obtain the predicted patient inflow data and the predicted patient triage level data. S43. Calculate the number of patients at the predicted triage level based on the predicted patient inflow data and the predicted patient triage level data. Set the triage level work hours; calculate the predicted nursing work hours based on the triage level work hours and the predicted number of patients at each triage level.
4. A dynamic scheduling system for emergency resuscitation room nursing resources based on demand forecasting, characterized in that: The system for implementing the dynamic scheduling method of emergency resuscitation room nursing resources based on demand forecasting as described in any one of claims 1-3 includes a data collection and preprocessing module, a model training module, a real-time forecasting and nursing time calculation module, and a scheduling optimization and scheduling decision module.
Citation Information
Patent Citations
Multi-source data prediction method and device based on time-space gated graph convolutional network, computer and storage medium
CN116910608A
Ball game real-time AI driving joint data generation method and system
CN120496735A