Emergency rescue room nursing resource dynamic scheduling method and system based on demand prediction

By using GRU and Transformer models based on demand forecasting, combined with multi-objective optimization algorithms, dynamic scheduling of nursing resources in the emergency resuscitation room was achieved, solving the problems of insufficient manpower and waste of resources in traditional scheduling methods, and improving operational efficiency and scientific decision-making.

CN120895199AActive Publication Date: 2025-11-04CHENGDU MILITARY GENERAL HOSPITAL OF PLA

Patent Information

Application Number
CN202511407415.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-11-04
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

Traditional emergency room nursing resource allocation methods suffer from static scheduling, reactive scheduling, strong reliance on experience, and neglect of multi-objective optimization, resulting in staff shortages during peak hours, resource waste during off-peak hours, and a lack of scientific and quantitative decision support.

Method used

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.

Benefits of technology

It has enabled the refined and optimized allocation 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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120895199A_ABST
    Figure CN120895199A_ABST
Patent Text Reader

Abstract

The invention discloses an emergency rescue room nursing resource dynamic scheduling method and system based on demand prediction, and relates to the technical field of resource dynamic scheduling. The method comprises the following steps: collecting and preprocessing historical emergency room data, and constructing a multi-dimensional feature data set; respectively training an improved GRU model and a Transform model for high-precision prediction of patient inflow and triage level distribution in a future time period, and quantifying a prediction result as standard nursing time; based on real-time nurse data, a multi-target optimization model with the purposes of minimizing patient waiting time, balancing nurse loads, controlling cost and meeting preferences is built, a Pareto optimal scheduling scheme set is solved and generated through a genetic algorithm, and a manager selects a final scheme according to the actual situation; according to the invention, the conversion from passive response to active accurate scheduling is realized, and the operation efficiency, the resource utilization rate and the nursing quality of the emergency rescue room are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of dynamic resource scheduling technology, and specifically relates to a method and system for dynamic scheduling of emergency room nursing resources based on demand forecasting. Background Technology

[0002] The emergency resuscitation room is the core location for treating critically ill patients in a hospital, and its operational efficiency is directly related to patient safety and the quality of medical care. Hospitals generally adopt fixed scheduling models based on historical experience (such as "three shifts"), which cannot flexibly cope with the fluctuating patient inflow and severity of illness every hour, resulting in severe staff shortages during peak hours and wasted human resources during off-peak hours. Scheduling decisions are often based on the current instantaneous state, which is a passive "post-event remedy" and lacks foresight. When the number of patients surges, nurses are temporarily drawn from other departments, resulting in long response delays and disrupting the normal work of other departments. Scheduling and scheduling rely heavily on the personal experience of head nurses and lack scientific and quantitative decision support, making it difficult to ensure the scientific nature and optimality of decisions when dealing with complex and ever-changing situations. Traditional scheduling methods cannot simultaneously take into account multiple often conflicting management objectives such as "minimizing patient waiting time," "balancing nurse workload," and "controlling human resource costs."

[0003] Existing technologies suffer from problems such as static scheduling, reactive scheduling, strong reliance on experience, and neglect of multi-objective optimization. Summary of the Invention

[0004] (a) Technical problems to be solved To address the problems in related technologies, this invention provides a method and system for dynamic scheduling of emergency room nursing resources based on demand forecasting, in order to overcome the aforementioned technical problems existing in the existing related technologies.

[0005] (II) Technical Solution To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: 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; use the historical emergency room feature data with patient inflow labels to train the improved GRU model to obtain the final GRU model. 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. 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 a set of scheduling schemes 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. This invention collects historical emergency room characteristic data to train an improved GRU model for predicting patient inflow and an improved Transformer model for predicting patient triage levels. It then uses real-time data to predict future demand and calculate predicted nursing hours. Based on real-time nurse data, a multi-objective optimization model is constructed to generate a set of scheduling schemes, which are then selected by management based on actual conditions. This achieves high-precision, multi-dimensional prediction of emergency room nursing needs while realizing intelligent management of the entire nursing human resource chain, from forward-looking planning to dynamic scheduling. This effectively improves resource utilization efficiency, ensures patient safety, and optimizes nurses' workload.

[0006] Preferably, step 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. This invention systematically collects, cleans, and labels multi-source historical data, and performs standardization and feature engineering processing to construct a high-quality, high-information historical emergency room feature dataset. Key predictive factors are extracted from the raw data, laying a solid and reliable data foundation for the subsequent high-precision prediction model.

[0007] Preferably, step 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. This invention sets patient inflow labels for historical data and makes specific improvements to the GRU model based on the characteristics of emergency data, such as multivariate input and periodic feature injection. Through iterative training and parameter optimization until the preset accuracy standard is met, a high-precision final prediction model is obtained, which realizes accurate prediction of emergency patient inflow. It also realizes the prediction model's deep mining and adaptive learning of complex spatiotemporal patterns, providing reliable data support for subsequent resource scheduling.

[0008] Preferably, step 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; This invention upgrades the GRU model to an input structure that integrates multi-source heterogeneous data and explicitly injects periodic features to enhance pattern learning. At the same time, it adopts a sequence-to-sequence multi-step prediction architecture to avoid error accumulation and introduces a weighted loss function to focus on key periods. While significantly improving the accuracy of patient inflow prediction, it also enables the model to accurately capture and provide forward-looking early warning of emergency peak periods, providing a more reliable decision-making basis for dynamic resource scheduling.

[0009] Preferably, step 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 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 second model accuracy; adjust the network parameters of the improved GRU model according to the model accuracy. Training is stopped 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, and the final GRU model is obtained. This invention improves the Transformer model by making key improvements such as timestamp encoding, attention mechanism, and probability output for triage level prediction tasks. It also optimizes the model parameters through iterative training using labeled data. This achieves accurate prediction of the distribution of future patient disease levels while enabling refined forward-looking assessment of the types and intensity of nursing resource needs. This provides a key decision-making basis for the subsequent allocation of nurses with different skill levels as needed.

[0010] Preferably, step 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; This invention replaces the positional encoding of the Transformer with a learnable timestamp encoding to understand temporal semantics, employs a local-global hybrid attention mechanism to efficiently capture spatiotemporal patterns, and changes the output to a probability distribution to predict the likelihood of disease severity. It accurately quantifies the proportion of patients at each triage level in the future, achieving refined foresight of nursing workload and skill requirements, and providing key data support for differentiated allocation of nursing resources.

[0011] Preferably, step 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 triage level working hours; calculate the predicted nursing working hours based on the triage level working hours and the predicted number of patients at each triage level; This invention collects and processes emergency data in real time, inputs it into pre-trained GRU and Transformer models, obtains prediction results for patient inflow and triage level, respectively, and then calculates the total predicted nursing hours required for future periods by combining the preset standard working hours for triage level. While achieving the effect of transforming abstract prediction data into specific workload indicators, it realizes the quantitative and standardized measurement of nursing resource demand, providing an accurate quantitative basis for subsequent scientific scheduling.

[0012] Preferably, step 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. Step S5 of this invention integrates real-time nurse status and skill data to construct a multi-objective optimization model that takes into account patient waiting time, nurse workload balance, labor costs, and personal preferences. It then uses a genetic algorithm to solve for Pareto optimal scheduling schemes for managers to make decisions. This scientifically balances multiple management objectives and realizes the automatic conversion from predicting demand to optimal manpower allocation, significantly improving scheduling efficiency, fairness, and scientific decision-making.

[0013] Preferably, step 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; This invention encodes scheduling schemes as chromosomes, uses non-dominated sorting to select high-quality solutions, and optimizes them through crossover and mutation iterations to ultimately generate a set of Pareto optimal scheduling schemes. It efficiently explores complex solution spaces and realizes the automatic generation of multiple optimal scheduling schemes that balance various objectives under multiple constraints, providing managers with a scientific and flexible decision-making basis.

[0014] The demand-prediction-based dynamic scheduling system for emergency resuscitation room nursing resources is used to implement the aforementioned demand-prediction-based dynamic scheduling method for emergency resuscitation room nursing resources. It includes 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. The data collection and preprocessing module collects historical emergency room data, including patient flow data and environmental context data, cleans the data, fills in missing values, and standardizes the data. It also extracts key features, such as time features, lag features, moving average features, and workload quantification indicators, and finally generates high-quality historical emergency room feature data to provide a foundation for model training. The model training module trains improved GRU and Transformer models based on preprocessed historical data. The GRU model is improved with multivariate input, explicit periodic feature injection, sequence-to-sequence prediction, and a weighted loss function to predict patient inflow. The Transformer model is improved with learnable timestamp encoding, a local-global attention hybrid mechanism, and probability distribution output to predict patient triage level. During training, an accuracy threshold and a maximum number of iterations are set, and the model performance is optimized by adjusting parameters until the final GRU and Transformer models are obtained. The real-time prediction and nursing work hour calculation module collects real-time emergency room data, performs the same preprocessing and feature extraction as historical data, and inputs it into a trained GRU and Transformer model to obtain predicted patient inflow data and triage level data for future periods. Combined with preset triage level work hour standards, it calculates predicted nursing work hours. The predicted number of patients is converted into the required nursing work hours according to the probability distribution of triage level, providing a quantitative basis for scheduling. The scheduling optimization and dispatch decision module constructs a multi-objective optimization model based on predicted nursing hours and real-time nurse data. The objectives include minimizing patient waiting time, nurse workload variance, and labor costs, while maximizing scheduling preference satisfaction. The model is solved using a multi-objective genetic algorithm to generate a set of Pareto optimal scheduling schemes. Finally, the dispatcher selects the optimal scheme according to the actual management strategy and issues instructions through the information system to achieve dynamic scheduling adjustments.

[0015] (III) Beneficial Effects The present invention has the following beneficial effects: This invention combines advanced data prediction technology with multi-objective optimization decision-making to achieve forward-looking, accurate, and intelligent scheduling of nursing resources in emergency resuscitation rooms; effectively overcoming the drawbacks of traditional static scheduling and reactive scheduling.

[0016] This invention realizes a shift in scientific decision-making from "experience-driven" to "data-driven." By integrating multi-source heterogeneous data such as historical patient flow, time, environment, and events, and using improved GRU and Transformer models for high-precision prediction, the system can accurately predict the distribution of patient inflow and disease severity over a future period. This makes resource scheduling no longer a passive response based on instantaneous conditions, but an active planning based on predicted demand, significantly improving the scientific nature and predictability of decision-making.

[0017] This invention achieves refined and optimized allocation of nursing human resources. By quantifying the prediction results into specific "predicted nursing hours" and constructing an optimization model that integrates multiple objectives and constraints such as minimizing patient waiting time, balancing nurse workload, controlling labor costs, and satisfying scheduling preferences, a series of Pareto optimal scheduling schemes can be generated by using a multi-objective genetic algorithm. This enables management to scientifically balance multiple conflicting objectives, thereby improving nurse satisfaction and effectively controlling labor costs while ensuring patient safety and medical quality.

[0018] This invention improves the overall operational efficiency and emergency response capabilities of the emergency resuscitation room. The system can dynamically generate and recommend optimal scheduling plans and issue dispatch instructions in real time through the information system, greatly reducing the time and error of manual dispatching and speeding up the response. This not only helps to shorten patient waiting times during peak periods and reduce medical risks, but also avoids idle human resources during off-peak periods, thereby achieving overall optimization and stable operation of the resuscitation room's service capacity.

[0019] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, the drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the dynamic scheduling method for emergency resuscitation room nursing resources based on demand forecasting according to the present invention. Figure 2This is a schematic diagram of the modules of the dynamic scheduling system for emergency room nursing resources based on demand prediction according to the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the invention, and not all embodiments. Based on the embodiments of the invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the invention.

[0023] In the description of this invention, it should be understood that the terms "opening", "upper", "lower", "top", "middle", "inner", etc., which indicate orientation or positional relationship, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the components or elements referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the invention.

[0024] Example 1 Please see Figure 1 This invention discloses a method for dynamic scheduling of emergency room nursing resources based on demand forecasting, comprising the following steps: S1. Collect historical data on the characteristics of emergency and resuscitation rooms; S1 includes the following steps: S11. Collect historical patient flow data through the API interfaces of the Hospital Information System (HIS) and Emergency Information System (EDIS); the patient flow data includes the patient's unique identifier, arrival time, triage level (e.g., CTAS 1-5), chief complaint, preliminary diagnosis, and medical order information. Historical environmental context data is obtained from public data sources or internal systems. This environmental context data includes date, day of the week, whether it is a holiday, local weather data (temperature, precipitation, air quality), and seasonal influenza / infectious disease warning information. S12. Identify and remove erroneous data from historical emergency room data, such as vital sign values ​​far exceeding the physiological range. Impute missing values ​​in historical emergency room data using interpolation or context-based imputation methods (e.g., using the average stay time at the same triage level to fill missing stay times). Standardize the initial historical emergency room data by performing Z-score standardization or Min-Max normalization on continuous numerical features (e.g., age, body temperature) to encode the types in the historical emergency room data, resulting in processed historical emergency room data. The type encoding is performed by using one-hot encoding or embedding on category features (e.g., chief complaint, diagnostic code). S13. Extract time features, lag features, moving average features, and workload quantification index features from the processed historical emergency room data to obtain historical emergency room feature data. The time features are obtained by extracting features such as "hour", "whether it is a night shift (e.g., 0-6 am)", and "whether it is a weekend" from the timestamps. The lag features are obtained by creating lag indicators such as the number of patients arriving in the past 1 hour, 2 hours, and 3 hours for each historical time point. The moving average features are obtained by calculating the moving average of the number of patients in the past 4 hours and 8 hours for each historical time point to smooth short-term fluctuations and reflect trends. The workload quantification index is obtained by defining a "standard nursing hours" weight for each patient based on their triage level and required nursing operations (mapped by medical orders) to calculate the total nursing workload of the emergency room in real time. S2. Set patient inflow labels on historical emergency room feature data to obtain historical emergency room feature data with patient inflow labels; use the historical emergency room feature data with patient inflow labels to train the improved GRU model 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; S21 includes the following steps: S211. Improve the input features of the GRU model from univariate historical values ​​(such as the number of patients in the past 168 hours) to multivariate, multi-source heterogeneous inputs; the multivariate, multi-source heterogeneous inputs include historical patient numbers, time context, environmental context, and event context; the time context includes encoded hours, days of the week, months, and a "whether it is a holiday" flag; the environmental context includes weather data (temperature, precipitation, air quality); the event context includes binary flags such as "large-scale events" and "epidemic warnings"; the model can not only learn "time patterns" but also understand "why traffic is abnormal at this time"; for example, it can learn that the combination of "Saturday night + rain" will lead to an increase in traffic accident injuries, thus making more accurate predictions; S212. In the input layer of the GRU model, explicit periodic feature injection is performed. Traditional GRU models rely on the GRU's own memory gate to implicitly learn periodicity, which has limited ability to capture long-period (such as weekly) patterns. The embedded vectors of the extracted periodic features (such as "the hour of the day" or "the day of the week") are concatenated or added to the hidden state of the GRU. This significantly improves the ability to capture regular patterns such as daily and weekly cycles and the stability of prediction, avoiding the situation where the model "forgets" the same day of the previous week. S213. The single-step prediction of the GRU model is changed to a multi-step prediction from sequence to sequence. The improved model directly outputs a sequence of a complete future time period (e.g., 4 hours) instead of predicting one by one. This is achieved through an encoder-decoder architecture, where the decoder also receives exogenous variables (e.g., known weather forecasts) at each step. Traditional GRU models are single-step predictions (predicting only the next time point) or multi-step predictions use a "recursive rolling" method, which accumulates errors. This reduces the error accumulation caused by recursive rolling and obtains a coordinated prediction of the entire future time period at once, which is more in line with the needs of scheduling decisions. S214. The mean squared error of the GRU model is improved into a weighted loss function. The mean squared error treats all prediction errors equally, while the GRU model in this application pays more attention to the prediction accuracy of peak traffic. The prediction error of historically high traffic periods is given higher weight in the loss function. This forces the model to focus more on learning the peak pattern, thereby performing better at the time when accurate prediction is most needed, and directly improving the effectiveness of the scheduling scheme. 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. 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; S31 includes the following steps: S311. Replace the sinusoidal positional encoding designed for NLP in the Transformer model with a learnable timestamp encoding. The sinusoidal positional encoding designed for NLP assumes that the position of elements in the sequence is fixed (the first word, the second word, etc.), while the learnable timestamp encoding, in addition to the standard positional encoding, adds an embedding of a feature vector derived from the timestamp (such as hour, day of the week, holiday) for each time step. This embedding is learnable and can better express the semantics of time (such as the essential difference between "3 a.m." and "3 p.m. on Saturday"). This enables the model not only to know the order of time points, but also to understand the "temporal semantics" of each time point, greatly enhancing its ability to represent time patterns. S312. The standard multi-head self-attention mechanism of the Transformer model is changed to a local-global attention hybrid mechanism. In the standard multi-head self-attention mechanism, attention is calculated between all time steps. The local-global attention hybrid mechanism forces 60% of the attention heads to focus only on local windows (such as the past 6 hours), while the other part of the attention heads focuses on global periodic nodes (such as the same time last week, the same time last month). This is an improvement in sparsity and prior knowledge injection. It captures both short-term continuous dependencies (such as the impact of the current event) and long-term periodic patterns, reducing computational complexity and the risk of overfitting. S313. Change the output layer of the Transformer model from outputting a single class label to predicting the output using a probability distribution; the output layer uses Softmax, but the target label is the true distribution of the disease severity at each time step (e.g., [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; directly optimize the difference between the predicted distribution and the true distribution, rather than simply determining the main class, which allows the model to predict more precisely "there may be 2 critically ill patients" rather than "there may be critically ill patients", and the prediction results are more informative and more beneficial to scheduling decisions; Meanwhile, both the GRU and Transformer models use historical emergency room data as input, which makes the two models understand the data in a consistent way at the underlying level. This achieves a regularization effect similar to "multi-task learning", improves the generalization ability of each model, and reduces the total number of parameters. 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 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 second model accuracy; adjust the network parameters of the improved GRU model according to the model accuracy. Training is stopped 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, and the final GRU model is obtained. 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. 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; the data processing and feature extraction process refers to the processing process of historical emergency room data in S1. 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 (e.g., the total number of patients in the Kth hour in the future, such as 50) and the predicted patient triage level data (e.g., the probability of a level 1 patient in the Kth hour in the future is 0.3, the probability of a level 2 patient is 0.4, the probability of a level 3 patient is 0.2, the probability of a level 4 patient is 0.1, and the probability of a level 5 patient is 0). S43. Based on the predicted patient inflow data and the predicted patient triage level data, calculate the predicted number of patients at each triage level (e.g., the predicted number of level 1 patients is 50 * 0.3 = 15). Set the triage level work hours (e.g., Level 5, the standard work hour for the first hour is 120 minutes, and then 80 minutes per hour, so the total work hours for 4 hours = 120 + 80 * 3 = 360 minutes; Level 4, the standard work hour for the first hour is 100 minutes, and then 60 minutes per hour, so the total work hours for 4 hours = 100 + 60 * 3 = 280 minutes; Level 3, the total work hours are 240 minutes; Level 2, 200 minutes; and Level 1, 160 minutes). Based on the triage level work hours and the predicted number of patients at each triage level, calculate the predicted nursing work hours (taking the predicted Level 1 nursing work hours as an example, 15 * 160 = 2400 work hours). S5. Based on real-time nurse data, construct a multi-objective optimization model, and transform the predicted nursing hours into a set of scheduling schemes 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 file data from the human resources system and nurse real-time data through the Internet of Things indoor positioning system and the smart badge or PDA worn by the nurse; the nurse file data includes skill level, professional title, years of service, and department (fixed vs. mobile shift); the nurse real-time data includes nurse ID, real-time location, and current status (e.g., "performing intravenous puncture", "in resuscitation bed 1", "idle", "resting"). Based on nurse record data and real-time nurse data, decision variables are defined; the decision variables are X{n,t}, i.e., nurses'... n In time period t Whether 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. S52. Solve the multi-objective optimization model using a multi-objective genetic algorithm to obtain the optimal scheduling scheme set; S52 includes the following steps: S521. Based on predicted nursing hours, construct a chromosome set, and set the size of the chromosome set to be... p The set of chromosomes is then represented as ,in, qi 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. 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. S523, repeat S522, and when the third maximum number of iterations is reached, the optimal scheduling scheme set is obtained; S53. Based on the current situation and management strategy, select the optimal shift scheduling scheme from the optimal shift scheduling scheme set; specifically, the system will visualize the optimal shift scheduling scheme set to the dispatcher (such as the head nurse) through a radar chart or parallel coordinate chart. Each option is represented in the diagram as a broken line or a polygon, and its projection on different coordinate axes (representing different objectives, such as cost, waiting time, and load balancing) clearly reflects the advantages and disadvantages of the option. Based on the current situation and management strategy (e.g., during a flu outbreak, patient safety should be prioritized; or budget is tight, and cost control is necessary), the dispatcher manually selects the most suitable scheduling scheme from the Pareto optimal solution set. Once the scheme is selected, the system sends the scheduling instructions to the nurses' mobile terminal APP and electronic scheduling system in real time through message queues (such as RabbitMQ) or direct API calls, notifying the relevant nurses of the new scheduling tasks (e.g., "Please come to the emergency room to provide support in 10 minutes"), requesting confirmation, automatically updating the schedule, synchronizing information globally, and automatically calling standby personnel when necessary. The specific implementation method of this application is taken as an example of the emergency room of a tertiary hospital. The system triggers a prediction-scheduling loop every 2 hours; the system collects patient data, shift data and date information every hour over the past 72 hours in real time; the intelligent prediction module uses a trained GRU model and Transformer model to predict that 15 new patients will be added in the next 4 hours, including 3 critically ill patients (triage level 5), and the total nursing hours required are about 45 person-hours. The optimization decision-making module takes the prediction result, the current 8 nurses on duty and their skill information as input, runs the NSGA-II algorithm, and generates 3 Pareto optimal solutions within 10 seconds: Solution A (focusing on waiting time) requires 2 additional nurses and has the shortest expected waiting time; Solution B (focusing on balance) requires 1 additional nurse and has the most balanced load; Solution C (focusing on cost) does not require additional nurses but adjusts the internal task allocation and has the lowest cost. The head nurse saw a comparison chart of the three options on the tablet. Given that it was the peak season for influenza and patient safety was the top priority, she selected option A. The system immediately sent a support request to the standby nurse's mobile app and updated the shift schedule. Feedback: Four hours later, the system recorded 17 new patients and a total of 50 person-hours. This data was tagged and stored in the database for incremental training of the GRU and Transformer models this weekend to correct prediction bias.

[0025] Example 2 Please see Figure 2 The demand-prediction-based dynamic scheduling system for emergency resuscitation room nursing resources is used to implement the above-mentioned demand-prediction-based dynamic scheduling method for emergency resuscitation room nursing resources. It includes 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. The data collection and preprocessing module collects historical emergency room data, including patient flow data and environmental context data, cleans the data, fills in missing values, and standardizes the data. It also extracts key features, such as time features, lag features, moving average features, and workload quantification indicators, and finally generates high-quality historical emergency room feature data to provide a foundation for model training. The model training module trains improved GRU and Transformer models based on preprocessed historical data. The GRU model is improved with multivariate input, explicit periodic feature injection, sequence-to-sequence prediction, and a weighted loss function to predict patient inflow. The Transformer model is improved with learnable timestamp encoding, a local-global attention hybrid mechanism, and probability distribution output to predict patient triage level. During training, an accuracy threshold and a maximum number of iterations are set, and the model performance is optimized by adjusting parameters until the final GRU and Transformer models are obtained. The real-time prediction and nursing work hour calculation module collects real-time emergency room data, performs the same preprocessing and feature extraction as historical data, and inputs it into a trained GRU and Transformer model to obtain predicted patient inflow data and triage level data for future periods. Combined with preset triage level work hour standards, it calculates predicted nursing work hours. The predicted number of patients is converted into the required nursing work hours according to the probability distribution of triage level, providing a quantitative basis for scheduling. The scheduling optimization and dispatch decision module constructs a multi-objective optimization model based on predicted nursing hours and real-time nurse data. The objectives include minimizing patient waiting time, nurse workload variance, and labor costs, while maximizing scheduling preference satisfaction. The model is solved using a multi-objective genetic algorithm to generate a set of Pareto optimal scheduling schemes. Finally, the dispatcher selects the optimal scheme according to the actual management strategy and issues instructions through the information system to achieve dynamic scheduling adjustments.

[0026] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0027] The preferred embodiments of the invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better 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; use the historical emergency room feature data with patient inflow labels to train the improved GRU model to obtain the final GRU model. 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. 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 a set of scheduling schemes by solving the multi-objective optimization model; Based on the current situation and management strategy, the optimal scheduling scheme is selected from the set of scheduling schemes.

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, 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 stops 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.

4. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 3, characterized in that, 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.

5. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 1, characterized in that, 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 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 second model accuracy; adjust the network parameters of the improved GRU model according to the model accuracy. Training stops 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, and the final GRU model is obtained.

6. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 5, characterized in that, 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.

7. 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.

8. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 1, characterized in that, 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.

9. The method for dynamic scheduling of emergency resuscitation room nursing resources based on demand forecasting according to claim 8, characterized in that, 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.

10. 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-9 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

  • Beidou intelligent emergency rescue command and dispatch system

    CN118278577A

  • Digitalized diagnosis and evaluation method for infection risk integrated in medical information system

    CN119517417A

  • Multi-modal data fused medical and educational informatization comprehensive supervision and diagnosis platform system

    CN119671371A

  • Clinical intelligent scheduling method and system based on big data analysis

    CN119941215A

Cited By

  • Nurse dynamic man-hour optimization system based on real-time load perception

    CN121393798A