Method, system and device for dynamically deploying and optimizing hospital beds
By building a global optimization model and a deep reinforcement learning model, the hospital bed allocation dynamically optimizes, solving the problem of inefficient bed allocation in the existing technology, and improving bed utilization and patient satisfaction are achieved.
Patent Information
- Application Number
- CN202510324909.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, the hospital bed allocation model is inefficient, unable to dynamically respond to changes in patient needs, and failing to comprehensively consider multi-dimensional factors, resulting in waste of resources and reduced patient satisfaction.
By collecting multi-source data, a global optimization model and a deep reinforcement learning model are built, combining constraints and objective functions, the bed allocation plan is dynamically optimized, and factors such as patient gender and condition priorities are taken into account, and the deep reinforcement learning model is used for real-time adjustments.
It realizes the rapid generation of global optimal bed allocation plans, improves bed utilization and patient satisfaction, reduces calculation complexity, can dynamically adapt to complex business scenarios, and reduces resource waste.
Smart Images

Figure CN120340786A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hospital bed data processing, and in particular, to a method, system and device for optimizing the dynamic allocation of hospital beds. Background Art
[0002] Hospital bed resources are one of the key medical resources, and their management and allocation directly affect aspects such as patients' medical experience, medical efficiency, and the economic benefits of hospitals.
[0003] Traditional bed allocation models usually rely mainly on manual allocation or are allocated according to simple fixed rules. This method is not only inefficient but also unable to dynamically respond to changes in patients' bed arrangement needs, resulting in resource waste and a decline in patients' experience. In addition, with the diversification of patients' bed arrangement needs, bed management also needs to consider more complex factors, such as the urgency of the condition, gender matching, medical insurance attributes, ward functions (general ward or ICU), nursing needs, etc., which further increases the complexity of bed allocation.
[0004] In recent years, intelligent technologies have gradually become popular in the medical field, such as artificial intelligence, operations research models, and big data analysis technologies. These technologies provide new solutions for optimizing the allocation of medical resources and show significant advantages especially in dynamic resource allocation. However, at present, in the field of hospital bed data processing, the application of intelligent technologies is still in its infancy. Many hospital bed data processing systems are limited to data recording and querying, rely on static rules, and lack true dynamic optimization functions. For example, beds are allocated according to the first-come, first-served principle or are allocated through simple priority sorting. These methods cannot respond to patients' dynamic needs in real time and cannot comprehensively consider the aforementioned multi-dimensional factors, resulting in low resource allocation efficiency and reduced patient satisfaction.
[0005] Some studies have attempted to use optimization algorithms (such as genetic algorithms and linear programming) to solve the bed allocation problem. This type of method usually generates an optimized bed allocation plan by constructing an objective function (such as minimizing patient waiting time or maximizing bed utilization) and combining certain constraints (such as department requirements and bed attributes). Its typical implementation steps include: first, defining the optimization goal based on the actual needs and resource status of the hospital; then setting constraints, such as the total number of beds, patient allocation priority, department requirements, etc.; finally, using the optimization algorithm to solve and obtain the optimal allocation result. This method can theoretically improve the efficiency of bed allocation, but it faces many challenges in practical applications: first, the computational complexity of the optimization algorithm is high, and it is difficult to quickly generate allocation plans in scenarios with high real-time requirements; second, many models are too idealistic and do not fully consider the diversity of patient bed allocation needs and the actual complexity of bed allocation, such as cross-department allocation and patient gender matching; in addition, these methods usually require a high level of data support and computing power, and are difficult to promote and apply in medical institutions with limited resources. Summary of the invention
[0006] The object of the present invention is to provide a method, system and device for dynamically optimizing the allocation of hospital beds to solve at least one of the above-mentioned technical problems existing in the prior art.
[0007] In a first aspect, in order to solve the above technical problems, the present invention provides a method for optimizing the dynamic allocation of hospital beds, comprising the following steps: Step 1: Collect historical multi-source data, including basic patient information, historical patient medical records, bed resource information, etc.; perform data cleaning and denoising on the multi-source data to improve the quality and credibility of the data; encode and convert the classified data in the multi-source data; define the constraints and objective functions of bed allocation to serve as input parameters for subsequent optimization calculations; and build a global optimization model to calculate the global optimal solution for the bed allocation plan.
[0008] In a feasible implementation, the multi-source data may come from a hospital information system (HIS), an Internet of Things device, an electronic medical record system (EMR), and the like.
[0009] In a feasible implementation, the basic patient information includes the patient's gender, severity of illness, medical insurance type, transfer requirements, etc.
[0010] In a feasible implementation manner, the bed resource information includes bed occupancy status, department to which the bed belongs, bed gender attributes, etc.
[0011] In a feasible implementation, the hospital information system collects occupancy information, cleaning information, maintenance information, etc. in the bed resource information through sensors.
[0012] In a feasible implementation, the data cleaning and denoising process includes: removing duplicate data to avoid the impact of duplicate records on the optimization result; filling in missing fields; excluding abnormal data based on a preset range; and normalizing numerical data and mapping it to the interval [0, 1].
[0013] In a feasible implementation, the encoding includes one-hot encoding or label encoding.
[0014] In a feasible implementation, the constraint conditions include: Total bed quantity constraint, and the specific expression is: ; Wherein, represents the number of beds in the th department; represents the total number of beds in the hospital; represents the total number of departments in the hospital; Bed allocation rule constraint, which is used to limit that each bed can be allocated to at most one patient at the same time, and the specific expression is: ; Wherein, represents the indicator variable that the rd patient is allocated to the th bed; represents the number of patients in the bed arrangement; Bed occupancy attribute constraint, which is used to limit whether the bed is occupied or idle, and the specific expression is: ; Bed gender attribute constraint, which is used to limit male beds, female beds or general beds. The specific numerical definitions are: 1 represents male beds, 2 represents female beds, and 0 represents general beds; the specific expression is: ; Wherein, represents the gender indicator variable of the th bed; Gender matching constraint, which is used to limit that the patient's gender must be consistent with the bed gender attribute to ensure the privacy protection during the patient's hospitalization. The specific expression is: ; Wherein, represents the gender indicator variable of the th patient. The specific numerical definitions are 1 represents male, 2 represents female, and 0 represents people with insensitive privacy; Specific patient population matching constraints are used to limit that patients in specific departments such as pediatrics, obstetrics and gynecology, and intensive care units (ICUs) must be assigned to the beds in the corresponding departments. The specific expression is: ; Among them, represents the number of beds in the th specific department; represents the number of patients in the th specific department who are arranged in beds; Emergency priority constraints are used to determine the priority according to the severity of the patient's condition, so that patients with high priority are assigned beds first. The specific expression is: ; Among them, represents the priority of the th patient; represents the priority of the th patient.
[0015] In a feasible implementation manner, the objective function includes a function for minimizing the patient waiting time, a function for maximizing the bed utilization rate, and a comprehensive optimization objective function: The specific expression of the function for minimizing the patient waiting time is: ; Among them, represents the total waiting time; represents the expected waiting time for the th patient to be assigned to the th bed; The specific expression of the function for maximizing the bed utilization rate is: ; Among them, represents the bed utilization rate; represents the indicator variable of the th bed, which takes the value of 1 when occupied and 0 when idle: The specific expression of the comprehensive optimization objective function is: ; Among them, represents the comprehensive optimization objective; represents 's weight parameter, represents 's weight parameter, which are respectively used to evaluate the and 's importance.
[0016] In a feasible implementation, the specific calculation method for the global optimal solution includes: Step a1: Select an unfixed variable from the current solution , and decompose it into two branch problems according to the values: When , that is, the branch problem generated when the th patient is assigned to the th bed; When , that is, the branch problem generated when the th patient is not assigned to the th bed; Step a2: For each branch problem, add a new round of constraint conditions to fix the value of the branch variable; Step a3: Continue to decompose each branch problem until all variables are fixed or the termination condition is met; Step a4: Through the linear relaxation method, convert the format of the variable from binary type to continuous type, and the value range satisfies the interval; Solve the relaxation problem to obtain the lower bound of the current branch problem, and the specific formula is: ; Among them, represents the relaxation variable that the th patient is assigned to the th bed; represents the continuous value of the indicator variable that the th patient is assigned to the th bed; Step a5: Through the heuristic method, find a feasible solution and calculate the objective value of this feasible solution as the upper bound of the current branch problem, and the specific formula is: ; Step a6: Set the pruning condition: If , then prune this branch problem; If the current solution does not meet the constraint conditions, also prune this branch problem; Step a7: Through the recursive search method, based on the depth-first strategy, recursively process the branch problems and recursively update the global optimal solution. The specific formula is: ; Among them, represents the global optimal solution; Step a8: When , it means that all branch problems have been processed and the current global optimal solution has been found. Output the current global optimal solution and the corresponding bed allocation plan.
[0017] Step 2: Based on the current bed allocation plan, construct the current bed status matrix; based on the needs of current patients, construct the patient bed arrangement demand vector; collect the historical data of the current hospital, including the patient flow, average length of stay, and bed switching time of each department, etc., for setting the parameter range of the global optimization model; initialize the priority of the global optimization model, and set a high priority for critically ill patients; then randomly allocate the current idle beds to generate an initial bed allocation plan, input it into the global optimization model, and obtain the global optimal solution, so as to provide a reference point for subsequent dynamic optimization.
[0018] In a feasible implementation, the specific expression of the bed status matrix is: ; where represents the bed status matrix; represents the status of the th bed for the th patient: 1 indicates idle, and 0 indicates occupied.
[0019] In a feasible implementation, the specific expression of the patient bed arrangement demand vector is: ; where represents the patient bed arrangement demand vector; represents the patient gender; represents the department demand; represents the priority; represents the current waiting time.
[0020] Step 3: Construct and train a Deep Reinforcement Learning (DRL) model for dynamically optimizing the bed allocation plan.
[0021] In a feasible implementation, the specific expression of the input feature vector of the deep reinforcement learning model is: ; where represents the input feature vector of the th bed for the th patient; represents the priority of the th patient; represents the attribute of the th bed; represents the idle time of the th bed; represents other constraint conditions.
[0022] In a feasible implementation, the environment definition of the deep reinforcement learning model includes: State space , specifically including the patient bed arrangement demand vector and the bed status matrix, and the specific expression is: ; Action space , specifically including all possible combinations of assigning the -th patient to the -th bed, and the specific expression is: ; Reward function , specifically including the bed utilization rate index , the patient satisfaction index and the transfer cost index and the corresponding reward weights, and the specific expression is: ; where , and all represent the corresponding reward weights.
[0023] In a feasible implementation, the model structure of the deep reinforcement learning model can be a deep Q-network (DQN) or a proximal policy optimization algorithm (PPO), and the corresponding model output is the Q value or probability distribution of the action space .
[0024] In a feasible implementation, the state transition function of the deep reinforcement learning model is: ; where represents the state space at the -th moment; represents the action space at the -th moment; represents the state space at the -th moment.
[0025] In a feasible implementation, the training process of the deep reinforcement learning model includes: Step b1: Use the bed allocation plan corresponding to the global optimal solution as the initial policy, randomly simulate various bed allocation scenarios such as patient admission and transfer between departments, and generate training data; Step b2: Define the maximum cumulative reward function, and the specific formula is: ; where represents the discount factor, which is used to balance short-term and long-term benefits; represents the optimization period, which is used to represent the time step, that is, within time instants, the dynamic allocation of beds is carried out; Step b3: Update the model parameters of the deep reinforcement learning model through the gradient descent method. The specific expression is: ; where represents the model parameters at the time instant; represents the learning rate; represents the policy loss function. In a feasible implementation, the prediction result of the deep reinforcement learning model includes the optimal action at the time instant , and the specific expression is: .
[0026] In a feasible implementation, the deep reinforcement learning model is optimized by a genetic algorithm. The main steps include: Step c1: Population initialization: Generate an initial population based on the bed allocation plan corresponding to the global optimal solution; Step c2: Fitness evaluation: Evaluate the quality of each solution according to the bed utilization rate, patient satisfaction, and transfer cost; Step c3: Genetic operations: Generate new solutions through conventional operations such as selection, crossover, and mutation, and gradually approach a better global optimal solution; Of course, it is also possible to perform optimization and solution search through multi-objective optimization algorithms (such as the Pareto front optimization algorithm, which is beneficial to finding the optimal compromise solution between different optimization objectives), adaptive algorithms (which are beneficial to giving priority to allocating beds to emergency patients during periods of high bed demand, and giving priority to the balance between patient comfort and department demand during periods of low bed demand), or meta-heuristic algorithms (such as the particle swarm optimization algorithm, ant colony optimization algorithm, etc., which are beneficial to providing better solutions under different complexities and obtaining relatively satisfactory results in a short time) in order to achieve different allocation effects.
[0027] In a feasible implementation, the deep reinforcement learning model feeds back the prediction effect through regularly evaluating indicators; the regularly evaluating indicators include the bed utilization rate, patient satisfaction, patient waiting time, department demand matching degree, etc., so as to continuously optimize the prediction effect of the deep reinforcement learning model and ultimately improve the bed utilization rate, patient satisfaction, and department demand matching degree.
[0028] Step 4: Collect current multi-source data in real time, input it into the deep reinforcement learning model, iteratively predict the bed allocation plan and send it out until the iteration termination condition is reached, so as to realize the dynamic iterative optimization of the bed allocation plan; in this way, it can adapt to the real-time changing bed status and patient bed arrangement requirements, and through simulating various bed allocation scenarios, the intelligent agent gradually learns the best decision-making strategy, and can also respond in real time when there are dynamic changes such as the insertion of emergency patients, patient transfer between departments, or bed status update.
[0029] In a feasible implementation manner, the method of sending out includes outputting the bed allocation plan to the hospital information system and displaying it in the form of a list, including patient name, patient number, patient basic information, bed number, department to which the bed belongs, and special allocation instructions, etc.
[0030] In a feasible implementation manner, the hospital information system displays the bed utilization situation of different departments or wards in the form of a heat map and displays the bed allocation process of patients from admission to discharge in the form of a flow chart, so as to be clearer and more intuitive.
[0031] In a feasible implementation manner, the hospital information system can also record the abnormal situations in the bed allocation process to provide data support for subsequent optimization.
[0032] In a second aspect, based on the same inventive concept, the present application also provides a hospital bed dynamic allocation optimization system adopting the above hospital bed dynamic allocation optimization method, including a data collection module, a data processing module, and a result generation module; The data collection module is used to collect current multi-source data in real time, including patient basic information, patient historical medical records, bed resource information, etc.; The data processing system includes a preprocessing unit, a global optimization unit, and a deep reinforcement learning unit; The preprocessing unit is used to perform data cleaning and denoising processing on the multi-source data; perform encoding conversion on the categorical data in the multi-source data; The global optimization unit stores a global optimization model, which is used to calculate the global optimal solution of the bed allocation plan; randomly allocate the current available beds to generate an initial bed allocation plan, input it into the global optimization model, and obtain the global optimal solution; The deep reinforcement learning unit stores a deep reinforcement learning model, which is used to dynamically optimize the bed allocation plan; input the multi-source data into the deep reinforcement learning model, and iteratively predict the bed allocation plan until the iteration termination condition is reached; The result generation module is used to send out the bed allocation plan.
[0033] In a feasible implementation, the data acquisition module is connected to the hospital information system, Internet of Things devices, and electronic medical record system of the current hospital, which facilitates obtaining the multi-source data simply and securely.
[0034] In a feasible implementation, the result generation module further includes a visualization unit for visualizing the bed allocation plan.
[0035] In a feasible implementation, the result generation module is connected to the hospital information system of the current hospital so as to directly input the bed allocation plan into the hospital information system for intuitive display.
[0036] In a third aspect, based on the same inventive concept, the present application further provides a hospital bed dynamic allocation optimization device, including a processor, a memory, and a bus. The memory stores instructions and data read by the processor, and the processor is used to call the instructions and data in the memory to execute the hospital bed dynamic allocation optimization method as described above. The bus is connected between each functional component for transmitting information.
[0037] In a feasible implementation, the hospital bed dynamic allocation optimization device further includes a scanner for collecting occupancy information, cleaning information, and maintenance information in the bed resource information by identifying identification codes. The scanner is set at each bed, and the identification codes are set on the patient bracelet, the bedsheet, and the bed body respectively for identifying the corresponding numbers of the patient, the bedsheet, and the bed body.
[0038] By adopting the above technical solutions, the present invention has the following beneficial effects: A hospital bed dynamic allocation optimization method, system, and device provided by the present invention can quickly generate a globally optimal preliminary allocation plan under clear objective functions and constraint conditions through a global optimization model (such as an operations research optimization model like linear programming and integer programming), thereby effectively improving the bed utilization rate and patient satisfaction. Through a deep reinforcement learning model and a genetic algorithm, this solution can dynamically adapt to complex actual business scenarios, such as dealing with the insertion of emergency patients and cross-department transfers, and further optimize the allocation plan to achieve flexibility and personalization of resource allocation. Through the learning ability of intelligent agents, this solution can significantly reduce the computational complexity, achieve fast response and real-time optimization, and meet the high real-time requirements. This solution can consider multi-dimensional factors such as patient gender, disease priority, and medical insurance attributes, ensuring the maximization of patient interests while reducing medical resource waste. Description of the Drawings To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0039] Figure 1 Flowchart of a hospital bed dynamic allocation optimization method provided by an embodiment of the present invention; Figure 2 Flowchart of the specific calculation method for the global optimal solution provided by an embodiment of the present invention; Figure 3 Flowchart of the training process of the deep reinforcement learning model provided by an embodiment of the present invention; Figure 4 Flowchart of the genetic algorithm provided by an embodiment of the present invention; Figure 5 Diagram of a hospital bed dynamic allocation optimization system provided by an embodiment of the present invention. Specific embodiments
[0040] The following will clearly and completely describe the technical solutions of the present invention with reference to the drawings. Obviously, the described embodiments are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0041] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0042] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "installed", "connected", "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0043] The present invention is further explained below in conjunction with specific implementation modes.
[0044] It should also be noted that the following specific embodiments or specific implementations are a series of optimized settings listed in the present invention to further explain the specific content of the invention, and these settings can be used in combination or in association with each other.
[0045] Embodiment 1: like Figure 1 As shown, this embodiment provides a hospital bed dynamic allocation optimization method, including the following steps: Step 1: Collect historical multi-source data, including basic patient information, historical patient medical records, bed resource information, etc.; perform data cleaning and denoising on multi-source data to improve data quality and credibility; encode and convert categorical data (such as gender, department type, etc.) in multi-source data; define the constraints and objective functions for bed allocation so as to serve as input parameters for subsequent optimization calculations; and construct a global optimization model to calculate the global optimal solution for the bed allocation plan.
[0046] Furthermore, the multi-source data may come from a hospital information system (HIS), an Internet of Things device, an electronic medical record system (EMR), and the like.
[0047] Furthermore, the basic patient information includes the patient's gender, severity of illness, medical insurance type, transfer needs, etc.
[0048] Furthermore, the bed resource information includes bed occupancy status, department to which the bed belongs, bed gender attributes, etc.
[0049] Furthermore, the hospital information system collects occupancy information, cleaning information and maintenance information from bed resource information through sensors.
[0050] Furthermore, the sensor is a scanner, which is used to collect occupancy information, cleaning information and maintenance information in the bed resource information by identifying the identification code; the scanner is set at each bed; the identification code is set on the patient's wristband, bed sheet and bed body, and is used to identify the corresponding numbers of the patient, bed sheet and bed body respectively.
[0051] Further, the process of collecting the occupancy information includes: when initializing the occupancy information, marking the bed as idle; when the identification code on the patient bracelet is scanned and recognized at the scanner of the bed, the hospital information system collects the actual occupied patient information of the bed and compares it with the allocated patient information in the system: if they are consistent, marking the bed as occupied; if they are inconsistent, sending a deployment error prompt message, and the bed remains marked as idle; in this way, the current actual occupancy status of each bed can be monitored.
[0052] Further, the process of collecting the cleaning information includes: when initializing the cleaning information, marking the bed as non-clean; when the identification code on the bedsheet is scanned and recognized at the scanner of the bed, the hospital information system collects the actual used bedsheet information of the bed and compares it with the cleaned bedsheet information in the system: if the actual used bedsheet belongs to the cleaned bedsheet, marking the bed as clean; if the actual used bedsheet does not belong to the cleaned bedsheet, sending a cleaning error prompt message, and the bed remains marked as non-clean; in this way, the current actual cleaning status of each bed can be monitored.
[0053] Further, the process of collecting the maintenance information includes: when initializing the maintenance information, marking the bed as normal; when the identification code on the bed body is scanned and recognized at the scanner of the bed, the hospital information system collects the actual used bed body information of the bed and compares it with the reported repair bed body information in the system: if the actual used bed body belongs to the reported repair bed body, sending a bed body failure prompt message and marking the bed as in maintenance; if the actual used bed body does not belong to the reported repair bed body, the bed remains marked as normal; in this way, the current actual maintenance status of each bed can be monitored.
[0054] Further, the identification code includes a barcode or a QR code.
[0055] As above, by setting a scanner at each bed, it is possible to identify and monitor the three states of occupancy, cleaning, and maintenance, which is economical and reliable.
[0056] Further, the data cleaning and denoising process includes: removing duplicate data to avoid the influence of duplicate records on the optimization result; filling in missing fields; excluding abnormal data based on a preset range (for example, the patient age is restricted between 0 and 120 years old); normalizing numerical data (such as bed utilization rate) and mapping it to the interval [0,1].
[0057] Further, the encoding includes one-hot encoding or label encoding.
[0058] Further, the constraint conditions include: Total bed constraint, with the specific expression being: ; where represents the number of beds in the th department; represents the total number of beds in the hospital; represents the total number of departments in the hospital; Bed allocation rule constraint, used to limit that each bed can be allocated to at most one patient at a time. The specific expression is: ; where represents the indicator variable that the th patient is allocated to the th bed; represents the number of patients to be bed-allocated; Bed occupancy attribute constraint, used to limit occupancy or vacancy (1 represents occupancy, 0 represents vacancy). The specific expression is: ; Bed gender attribute constraint, used to limit male beds, female beds, or general beds. The specific numerical definitions are: 1 represents male beds, 2 represents female beds, 0 represents general beds. The specific expression is: ; where represents the gender indicator variable of the th bed; Gender matching constraint, used to limit that the patient's gender must be consistent with the bed gender attribute to reduce the embarrassing feelings during the patient's hospitalization. The specific expression is: ; where represents the gender indicator variable of the th patient, and the specific numerical definitions are 1 represents male, 2 represents female, 0 represents people with insensitive privacy (such as preschool patients, patients with cognitive impairment, etc.); Specific patient population matching constraint, used to limit that patients in specific departments such as pediatrics, obstetrics and gynecology, and intensive care units must be allocated to the beds in the corresponding departments. The specific expression is: ; where represents the number of beds in the th specific department; represents the number of patients to be bed-allocated in the th specific department; Emergency priority constraint, used to determine the priority according to the severity of the patient's condition, so that patients with high priority are allocated beds first. The specific expression is: ; Among them, represents the priority of the th patient; represents the priority of the th patient.
[0059] Furthermore, the objective function includes a function for minimizing the waiting time of patients, a function for maximizing the utilization rate of beds, and a comprehensive optimization objective function: The specific expression of the function for minimizing the waiting time of patients is: ; Among them, represents the total waiting time; represents the expected waiting time for the th patient to be assigned to the th bed; The specific expression of the function for maximizing the utilization rate of beds is: ; Among them, represents the bed utilization rate; represents the indicator variable of the th bed, taking the value of 1 when occupied and 0 when free: The specific expression of the comprehensive optimization objective function is: ; Among them, represents the comprehensive optimization objective; represents weight parameter of, represents weight parameter of, respectively used to evaluate the importance of and .
[0060] Furthermore, as Figure 2 shown, the specific calculation method of the global optimal solution includes: Step a1, select an unfixed variable from the current solution, and decompose it into two sub-problems according to the value: When , that is, the sub-problem generated when the th patient is assigned to the th bed; When , that is, the sub-problem generated when the th patient is not assigned to the th bed; Step a2: For each sub - problem, add a new round of constraint conditions to fix the values of the branching variables; Step a3: Continue to decompose each sub - problem until all variables are fixed or the termination condition is met; Step a4: By the linear relaxation method, convert the format of the variable from binary type to continuous type, and the value range satisfies the interval; Solve the relaxation problem to obtain the lower bound of the current sub - problem, and the specific formula is: ; where, represents the relaxation variable for the th patient assigned to the th bed; represents the continuous value of the indicator variable for the th patient assigned to the th bed; Step a5: By the heuristic method, find a feasible solution and calculate the objective value of this feasible solution as the upper bound of the current sub - problem, and the specific formula is: ; Step a6: Set the pruning condition: If , then prune this sub - problem; If the current solution does not satisfy the constraint conditions, also prune this sub - problem; Step a7: By the recursive search method, based on the depth - first strategy (an existing strategy that searches according to depth, exploring nodes deeply to obtain more comprehensive information), recursively process the sub - problems and recursively update the global optimal solution. The specific formula is: ; where, represents the global optimal solution; Step a8: When , it means that all sub - problems have been processed and the current global optimal solution has been found. Output the current global optimal solution and the corresponding bed allocation plan.
[0061] Step 2: Based on the current bed allocation plan, construct the current bed status matrix; Based on the current patients' needs, construct the patient bed - arranging demand vector; Collect the current hospital historical data, including the patient flow, average length of stay, and bed switching time in each department, etc., for setting the parameter range of the global optimization model; Initialize the priority of the global optimization model, set a high priority for critically ill patients; Then randomly allocate the current available beds to generate an initial bed allocation plan, input it into the global optimization model, and obtain the global optimal solution, so as to provide a reference point for subsequent dynamic optimization.
[0062] Furthermore, the specific expression of the bed status matrix is as follows: ; wherein, represents the bed status matrix; represents the status of the -th bed for the -th patient: 1 indicates idle, and 0 indicates occupied.
[0063] Furthermore, the specific expression of the patient bed arrangement demand vector is as follows: ; wherein, represents the patient bed arrangement demand vector; represents the patient's gender; represents the department demand; represents the priority; represents the current waiting time.
[0064] Step 3: Construct and train a Deep Reinforcement Learning (DRL) model to dynamically optimize the bed allocation plan.
[0065] Furthermore, the specific expression of the input feature vector of the deep reinforcement learning model is as follows: ; wherein, represents the input feature vector of the -th bed for the -th patient; represents the priority (numerical value) of the -th patient; represents the attributes of the -th bed (including bed department type, bed gender attribute, etc.); represents the idle time (unit: hour) of the -th bed; represents other constraint conditions (such as the medical insurance type of the patient).
[0066] Furthermore, the environment definition of the deep reinforcement learning model includes: State space , specifically including the patient bed arrangement demand vector and the bed status matrix, and the specific expression is as follows: ; Action space , specifically including allocating the -th patient to the All possible combinations of beds, and the specific expression is: ; Reward function , specifically including the bed utilization rate index , patient satisfaction index and transfer cost index (such as the transfer cost of patients changing departments, undergoing surgery, etc. within the hospital) and the corresponding reward weights, and the specific expression is: ; Among them, , and all represent the corresponding reward weights.
[0067] Furthermore, the model structure of the deep reinforcement learning model is a deep Q-network (DQN), and the corresponding model output is the Q value of the action space .
[0068] Furthermore, the state transition function of the deep reinforcement learning model is: ; Among them, represents the state space at the th moment; represents the action space at the th moment; represents the state space at the th moment.
[0069] Furthermore, as Figure 3 shown, the training process of the deep reinforcement learning model includes: Step b1: Use the bed allocation plan corresponding to the global optimal solution as the initial strategy, randomly simulate various bed allocation scenarios such as patient admission and department transfer, and generate training data; Step b2: Define the maximum cumulative reward function, and the specific formula is: ; Among them, represents the discount factor, which is used to balance short-term and long-term benefits; represents the optimization period; Step b3: Update the model parameters of the deep reinforcement learning model through the gradient descent method, and the specific expression is: ; Among them, represents the model parameters at the th moment; represents the learning rate; represents the policy loss function. Further, the prediction result of the deep reinforcement learning model includes the optimal action at the moment, and the specific expression is: . .
[0070] Further, as Figure 4 shown, the deep reinforcement learning model is optimized by the genetic algorithm (GA), and the main steps include: Step c1, population initialization: Generate an initial population based on the bed allocation plan corresponding to the global optimal solution; Step c2, fitness evaluation: Evaluate the quality of each solution according to the bed utilization rate, patient satisfaction, and transfer cost; Step c3, genetic operation: Generate new solutions through conventional operations such as selection, crossover, and mutation, and gradually approach a better global optimal solution; Further, the deep reinforcement learning model feeds back the prediction effect through regularly evaluating indicators (including conventional feedback methods such as automatically adjusting the reward signal, optimizing the policy gradient, experience replay, and target network optimization), so as to dynamically adapt to the complex application environment and improve the efficiency and intelligence level of the allocation plan; The regularly evaluated indicators include the bed utilization rate, patient satisfaction, patient waiting time, department demand matching degree, etc., so as to continuously optimize the prediction effect of the deep reinforcement learning model and finally improve the bed utilization rate, patient satisfaction, and department demand matching degree.
[0071] Step 4, Real-time collect the current multi-source data, input it into the deep reinforcement learning model, iteratively predict the bed allocation plan and send it out until the iteration termination condition is reached, so as to realize the dynamic iterative optimization of the bed allocation plan; This can adapt to the real-time changing bed status and patient bed arrangement needs, and through simulating multiple bed allocation scenarios, the intelligent agent gradually learns the best decision-making strategy, and can also respond in real time when dynamic changes such as the insertion of emergency patients, patient transfer between departments, or bed status update occur.
[0072] Further, the method of sending out includes outputting the bed allocation plan to the hospital information system and displaying it in the form of a list, including patient name, patient number, patient basic information, (allocated) bed number, bed affiliated department, and special allocation instructions, etc.; The special allocation refers to introducing additional preset constraints or adjusting the optimization objective function during the dynamic optimization of bed allocation for critically ill patients, infectious disease patients, postoperative patients, pediatric / obstetric patients, VIP patients, and long-term inpatients, etc., to ensure that the special needs of these patients are met without affecting the reasonable allocation of the overall bed resources.
[0073] Further, the hospital information system displays the bed utilization of different departments or wards in the form of a heat map and shows the bed allocation process of patients from admission to discharge in the form of a flow chart, making it clearer and more intuitive.
[0074] Further, the hospital information system can also record abnormal situations during the bed allocation process (such as patients refusing allocation or bed maintenance delays, etc.) to provide data support for subsequent optimization.
[0075] Embodiment 2: As Figure 5 shown, this embodiment provides a hospital bed dynamic allocation optimization system adopting the above hospital bed dynamic allocation optimization method, including a data acquisition module, a data processing module, and a result generation module; The data acquisition module is used to collect current multi-source data in real time, including patient basic information, patient historical medical records, bed resource information, etc.; The data processing system includes a preprocessing unit, a global optimization unit, and a deep reinforcement learning unit; The preprocessing unit is used to perform data cleaning and denoising processing on the multi-source data; perform encoding conversion on the categorical data in the multi-source data; The global optimization unit stores a global optimization model and is used to calculate the global optimal solution of the bed allocation plan; randomly allocate the current idle beds to generate an initial bed allocation plan, input it into the global optimization model, and obtain the global optimal solution; The deep reinforcement learning unit stores a deep reinforcement learning model and is used to dynamically optimize the bed allocation plan; input the multi-source data into the deep reinforcement learning model and iteratively predict the bed allocation plan until the iteration termination condition is reached; The result generation module is used to send out the bed allocation plan.
[0076] Further, the data acquisition module is connected to the hospital information system, Internet of Things devices, and electronic medical record system of the current hospital, which is convenient for simply and safely obtaining the multi-source data.
[0077] Further, the result generation module further includes a visualization unit, which is used to perform visualization processing on the bed allocation plan through conventional methods.
[0078] Further, the result generation module is connected to the hospital information system of the current hospital so as to directly input the bed allocation plan into the hospital information system for intuitive display (such as a heat map, etc.).
[0079] Embodiment 3: This embodiment provides a hospital bed dynamic allocation optimization device, including a processor, a memory and a bus. The memory stores instructions and data read by the processor. The processor is used to call the instructions and data in the memory to execute the hospital bed dynamic allocation optimization method described above. The bus is connected between each functional component for transmitting information.
[0080] Further, the hospital bed dynamic allocation optimization device further includes a scanner, which is used to collect occupancy information, cleaning information and maintenance information in the bed resource information by identifying identification codes. The scanner is set at each bed. The identification codes are set on the patient bracelet, the bedsheet and the bed body respectively for identifying the corresponding numbers of the patient, the bedsheet and the bed body.
[0081] In another implementation manner of this solution, it can be implemented in the form of an integrated device, and the device can include corresponding modules that execute each or several steps in the above various implementation manners. The module can be one or more hardware modules specifically configured to execute the corresponding steps, or implemented by a processor configured to execute the corresponding steps, or stored in a computer-readable medium for implementation by the processor, or implemented through a certain combination.
[0082] The processor executes the various methods and processes described above. For example, the method implementation manner in this solution can be implemented as a software program, which is tangibly included in a machine-readable medium, such as a memory. In some implementation manners, part or all of the software program can be loaded and / or installed via the memory and / or the communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be executed. Alternatively, in other implementation manners, the processor can be configured to execute one of the above methods in any other appropriate manner (for example, by means of firmware).
[0083] This device can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus connects various circuits including one or more processors, memories and / or hardware modules together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0084] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing the dynamic allocation of hospital beds, characterized in that, include: Step 1: Collect historical multi-source data, including basic patient information, historical patient medical records, and bed resource information; Perform data cleaning and denoising on multi-source data; perform encoding conversion on categorical data in multi-source data; define constraints and objective functions for bed allocation; Construct a global optimization model to calculate the global optimal solution for bed allocation plan; Step 2: Based on the current bed allocation plan, construct the current bed status matrix; based on the current patient needs, construct the patient bed demand vector; collect the current hospital historical data, including the patient flow of each department, the average length of stay and the bed switching time, to set the parameter range of the global optimization model; Initialize the priority of the global optimization model and set a high priority for critically ill patients; then randomly allocate the current idle beds to generate an initialized bed allocation plan, input it into the global optimization model, and obtain the global optimal solution; Step 3: Build and train a deep reinforcement learning model to dynamically optimize the bed allocation plan; Step 4: Collect the current multi-source data in real time, input it into the deep reinforcement learning model, iteratively predict the bed allocation plan and send it out until the iteration termination condition is reached.
2. The method according to claim 1, wherein The patient's basic information includes the patient's gender, severity of illness, medical insurance type, and transfer needs; The bed resource information includes the bed occupancy status, the department to which the bed belongs, and the bed gender attribute.
3. The method according to claim 2, characterized in that, The constraints include: The total bed capacity constraint is expressed as follows: ; Among them, represents the number of beds in the th department; represents the total number of beds in the hospital; represents the total number of departments in the hospital; The bed allocation rule constraint is used to limit each bed to only one patient at a time. The specific expression is: ; Among them, represents the th patient assigned to the th bed; represents the number of patients assigned to beds. The bed occupancy attribute constraint is used to limit whether the bed is occupied or free. The specific expression is: ; The bed gender attribute constraint is used to limit male beds, female beds, or universal beds. The specific value is defined as: 1 for male beds, 2 for female beds, and 0 for universal beds. The specific expression is: ; Among them, represents the gender indication variable for the th bed; Gender matching constraint, which is used to limit the patient's gender to be consistent with the bed's gender attribute. The specific expression is: ; Among them, represents the gender indicator variable of the th patient. The specific numerical values are defined as 1 for male, 2 for female, and 0 for the privacy-insensitive population; Specific patient population matching constraints are used to limit patients in a specific department to be assigned to beds in the corresponding department. The specific expression is: ; Among them, represents the number of beds in the th specific department; represents the number of patients arranged in beds in the th specific department; The emergency priority constraint is used to determine the priority according to the severity of the patient's condition. The specific expression is: ; Among them, represents the priority of the th patient; represents the priority of the th patient.
4. The method according to claim 3, wherein The objective function includes minimizing the patient waiting time function, maximizing the bed utilization function and the comprehensive optimization objective function: The specific expression of the function for minimizing patient waiting time is: ; Among them, represents the total waiting time; represents the th patient assigned to the th bed's expected waiting time; The specific expression of the function for maximizing bed utilization is: ; Among them, represents the bed utilization rate; represents the indicator variable of the th bed, taking the value of 1 when occupied and 0 when idle: The specific expression of the comprehensive optimization objective function is: ; Among them, represents the comprehensive optimization objective; represents the weight parameter of represents the weight parameter of and respectively used to evaluate the importance of 5. The method according to claim 4, wherein The specific calculation method of the global optimal solution includes: Step a1: Select an unfixed variable from the current solution , and decompose it into two sub-problems according to the values When it is the th patient assigned to the th bed, a branching problem occurs; When , that is, the branching problem caused when the th patient is not assigned to the th bed; Step a2: For each branch problem, add a new round of constraints; Step a3: Continue to decompose each branch problem until all variables are fixed or the termination condition is met; Step a4: By means of the linear relaxation method, convert the format of the variable from binary type to continuous type, and the value range satisfies interval; Solve the relaxation problem to obtain the lower bound of the current branching problem. The specific formula is as follows: ; Among them, represents the slack variable for the -th patient assigned to the -th bed; represents the continuous value of the indicator variable for the -th patient assigned to the -th bed; Step a5: Find a feasible solution by a heuristic method and calculate the objective value of this feasible solution as the upper bound of the current branch problem , and the specific formula is: ; Step a6. Set pruning conditions: If , then prune this branch problem; if the current solution does not satisfy the constraint conditions, also prune this branch problem. Step a7: Recursively process the branch problem based on the depth-first strategy through a recursive search method, and recursively update the global optimal solution. The specific formula is: ; Among them, represents the global optimal solution; Step a8, when indicates that all branch problems have been processed and the current global optimal solution has been found, and output the current global optimal solution and the corresponding bed allocation plan.
6. The method according to claim 1, wherein The specific expression of the bed status matrix is: ; Among them, represents the bed status matrix; represents the th bed's status for the th patient: 1 indicates idle, 0 indicates occupied; The specific expression of the patient bed allocation demand vector is: ; Among them, represents the patient's bed arrangement requirement vector; represents the patient's gender; represents the department requirement; represents the priority; represents the current waiting time.
7. The method according to claim 6, wherein The specific expression of the input feature vector of the deep reinforcement learning model is: ; Among them, represents the input feature vector of the th bed for the th patient; represents the priority of the th patient; represents the attribute of the th bed; represents the idle time of the th bed; represents the medical insurance type of the th patient; The environment definition of the deep reinforcement learning model includes: State space , specifically including the patient bed arrangement demand vector and the bed status matrix, and the specific expression is: ; Action space , specifically including all combinations of allocating the -th patient to the -th bed, and the specific expression is: ; Reward function , specifically including the bed utilization rate index , patient satisfaction index and transfer cost index and corresponding reward weights. The specific expression is as follows: ; Among them, , and all represent the corresponding reward weights; The state transition function of the deep reinforcement learning model is: ; Among them, represents the state space at time; represents the action space at time; represents the state space at time.
8. A hospital bed dynamic allocation optimization system adopting the method described in any one of claims 1-7, characterized in that, It includes a data collection module, a data processing module, and a result generation module; The data collection module is used to collect current multi-source data in real time, including patient basic information, patient historical medical records, and bed resource information; The data processing system includes a preprocessing unit, a global optimization unit, and a deep reinforcement learning unit; The preprocessing unit is used to perform data cleaning and denoising on multi-source data; perform encoding conversion on categorical data in multi-source data; The global optimization unit stores a global optimization model, which is used to calculate the global optimal solution of the bed allocation plan; randomly allocate the current available beds to generate an initial bed allocation plan, input it into the global optimization model, and obtain the global optimal solution; The deep reinforcement learning unit stores a deep reinforcement learning model, which is used to dynamically optimize the bed allocation plan; input multi-source data into the deep reinforcement learning model, and iteratively predict the bed allocation plan until the iteration termination condition is reached; The result generation module is used to send out the bed allocation plan.
9. The system according to claim 8, wherein The data collection module is connected to the hospital information system, Internet of Things devices, and electronic medical record system of the current hospital; the result generation module is connected to the hospital information system of the current hospital.
10. A hospital bed dynamic allocation optimization device, characterized in that, It includes a processor, a memory, and a bus. The memory stores instructions and data read by the processor. The processor is used to call the instructions and data in the memory to execute the method described in any one of claims 1-7. The bus is connected between each functional component for transmitting information.
Citation Information
Cited By
Medical resource configuration method and system, computer equipment and storage medium
CN121617584A
Hospital intelligent bed scheduling and optimizing method based on AI reinforcement learning
CN122314310A