Blood bag delivery method and device, computer equipment, storage medium and program product
By decomposing the blood bag out-of-stock task into a sub-task and performing it according to priority, the problem that the existing technology cannot cope with the urgent blood bag out-of-stock demand is solved, and efficient response and task processing is achieved in emergencies.
Patent Information
- Application Number
- CN202411817437.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The existing technology cannot effectively respond to the urgent need for blood bag out-of-stock, and cannot give priority to the task of blood bag out-of-stock in emergencies.
By obtaining the blood bag out-of-warehouse task, decompose the tasks into one or more subtasks, and update the tasks to be executed in the task set according to the subtasks. The task information of each task to be executed includes the blood bag information and priority, and execute the tasks to be executed according to the priority, so as to prioritize emergency blood bag out-of-warehouse tasks.
It has achieved priority handling of blood bag out-of-stock tasks in emergency situations, improved the flexibility and response speed of blood bag out-of-stock tasks, and can effectively respond to urgent blood bag out-of-stock needs.
Smart Images

Figure CN119724519A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blood bag management, and in particular to a blood bag outbound method, device, computer equipment, storage medium and program product. Background Art
[0002] With the development of automation technology, the application of automation technology is becoming more and more extensive. In the field of blood bag management, the use of automation technology to remove blood bags from the warehouse can reduce human workload and improve work efficiency. Blood bag removal can specifically be the removal of blood bags stored in the storage warehouse. By creating and executing a blood bag removal task, the mechanical module is controlled to automatically remove blood bags. In the prior art, tasks are executed in the order in which they are created, so that the blood bags indicated by the executed tasks are removed from the warehouse.
[0003] However, the method of executing tasks in the order in which they were created cannot cope with the urgent demand for blood bag shipment. Summary of the invention
[0004] Based on this, it is necessary to provide a blood bag delivery method, device, computer equipment, storage medium and program product that can meet the urgent demand for blood bag delivery in response to the above technical problems.
[0005] In a first aspect, the present application provides a blood bag storage method, comprising:
[0006] Get the blood bag outbound task;
[0007] Decomposing the blood bag delivery task into one or more subtasks;
[0008] Update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs;
[0009] The to-be-executed tasks in the task set are executed according to the priority.
[0010] In one embodiment, the task of obtaining blood bags for delivery includes:
[0011] Receive blood bag delivery instructions;
[0012] Parsing the blood bag outbound instruction to obtain the target priority and target blood bag information of the blood bag outbound task to be created;
[0013] A blood bag outbound task is created according to the target priority and the target blood bag information.
[0014] In one embodiment, the target blood bag information includes the blood bag delivery conditions and the total quantity of the blood bags to be delivered, and the blood bag delivery task is decomposed into one or more subtasks, including:
[0015] decomposing the total quantity into a plurality of sub-quantities;
[0016] A plurality of subtasks are generated, wherein the plurality of subtasks correspond one-to-one to the plurality of sub-quantities, and the task information of each subtask includes a priority determined according to the target priority, and blood bag information determined according to the blood bag delivery conditions and the corresponding sub-quantities.
[0017] In one embodiment, updating the to-be-performed tasks of the task set according to the one or more subtasks includes:
[0018] Adding the multiple subtasks to a task set as multiple tasks to be executed;
[0019] The execution order of the multiple tasks to be executed in the task set is updated according to the respective priorities of the multiple subtasks.
[0020] In one embodiment, executing the to-be-executed tasks in the task set according to the priority level includes:
[0021] According to the priority, determine the current task to be executed from the task set;
[0022] Execute the current task to be executed;
[0023] After the current task to be executed is completed, the current task to be executed is deleted from the task set;
[0024] Return to the step of determining the current task to be executed from the task set according to the priority and continue executing.
[0025] In one embodiment, executing the to-be-executed tasks in the task set according to the priority level includes:
[0026] When the priorities corresponding to the tasks to be executed in the task set are the same, obtaining the creation time of the blood bag outbound task to which the tasks to be executed belong;
[0027] The tasks to be executed in the task set are executed in the order of the creation time from earliest to latest.
[0028] In a second aspect, the present application also provides a blood bag outbound device, comprising:
[0029] A task management module is used to obtain a blood bag outbound task; decompose the blood bag outbound task into one or more subtasks; update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs;
[0030] An execution module is used to execute the to-be-executed tasks in the task set according to the priority.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] Get the blood bag outbound task;
[0033] Decomposing the blood bag delivery task into one or more subtasks;
[0034] Update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs;
[0035] The to-be-executed tasks in the task set are executed according to the priority.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0037] Get the blood bag outbound task;
[0038] Decomposing the blood bag delivery task into one or more subtasks;
[0039] Update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs;
[0040] The to-be-executed tasks in the task set are executed according to the priority.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] Get the blood bag outbound task;
[0043] Decomposing the blood bag delivery task into one or more subtasks;
[0044] Update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs;
[0045] The to-be-executed tasks in the task set are executed according to the priority.
[0046] The above-mentioned blood bag outbound delivery method, device, computer equipment, storage medium and program product, since the task information of the to-be-executed tasks in the task set includes the corresponding blood bag information, the blood bag outbound delivery can be realized by executing the to-be-executed tasks in the task set; the acquired blood bag outbound delivery task is decomposed into one or more subtasks, and the to-be-executed tasks in the task set are updated according to the one or more subtasks, and the task information of the to-be-executed tasks also includes the corresponding priority, and the task information is determined based on the blood bag outbound delivery task to which the corresponding to-be-executed task belongs. Then, the to-be-executed tasks in the task set are executed according to the priority, which can improve the flexibility of task execution. For example, when a part of the subtasks decomposed from the previously acquired blood bag outbound delivery task is completed, if an urgent blood bag outbound delivery task is acquired, the subtasks decomposed from the urgent blood bag outbound delivery task can be set with a higher priority. In this way, the subtasks decomposed from the urgent blood bag outbound delivery task can be executed preferentially without waiting for the complete execution of the previous blood bag outbound task, thereby meeting the urgent blood bag outbound delivery needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a process of a blood bag outbound method in one embodiment;
[0049] Figure 2 This is a schematic diagram of the process steps of processing a blood bag outbound task in one embodiment;
[0050] Figure 3 It is a structural block diagram of a blood bag outbound device in one embodiment;
[0051] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] In one embodiment, Figure 1 As shown, a blood bag outbound method is provided. This embodiment uses a computer device as an example to illustrate the method. The computer device can be a terminal or a server. The terminal can be a personal computer, a laptop, a smart phone, a tablet computer, an industrial computer or other. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:
[0054] Step 102, obtaining the blood bag outbound task.
[0055] Among them, the blood bag outbound task is used to instruct the transfer of multiple blood bags in the storage warehouse to the outside of the storage warehouse. The multiple blood bags indicated by the blood bag outbound task can be called blood bags to be outbound. The number of multiple blood bags can be 50, 100 or others. The storage warehouse can be a warehouse for long-term storage of blood bags or a warehouse for short-term storage of blood bags. The storage warehouse can include a blood product cold storage, a plasma storage, a red blood cell cold storage, a quick freezing storage or others. Blood bags are used to hold blood products, such as whole blood, plasma, red blood cells, etc.
[0056] Exemplarily, when receiving the blood bag outbound instruction, the computer device may create a blood bag outbound task based on the blood bag outbound instruction, wherein the blood bag outbound instruction is a computer instruction instructing to outbound the blood bag.
[0057] In one embodiment, the computer device can parse the blood bag outbound instruction, obtain the target priority of the blood bag outbound task to be created, and the identification information corresponding to the blood bag to be outbound, and create the blood bag outbound task according to the target priority and the identification information corresponding to the blood bag to be outbound. The identification information is used to uniquely identify a blood bag. The identification information is, for example, a barcode, a QR code, an ID, a code or other of the blood bag. It is understandable that the identification information of the blood bag in the blood bag outbound instruction can be input by the operator through the computer device.
[0058] Step 104, decompose the blood bag delivery task into one or more subtasks.
[0059] The subtask is used to instruct to carry out at least a portion of the blood bags to be shipped out of the blood bag shipping task.
[0060] Exemplarily, the computer device may decompose the blood bag outbound task into one or more subtasks according to the total number of blood bags to be outbound indicated by the blood bag outbound task.
[0061] In one embodiment, the computer device may decompose the total quantity into one or more sub-quantities based on the total quantity of blood bags to be shipped indicated by the blood bag shipping task and the preconfigured quantity of blood bags, and decompose the blood bag shipping task into one or more sub-tasks based on the one or more sub-quantities.
[0062] The pre-configured blood bag quantity is the pre-configured number of blood bags that are planned to be shipped out by the subtask. The sub-quantity is the number of blood bags to be shipped out of the subtask obtained by decomposition. The sub-quantity and the number of subtasks obtained by decomposition are determined based on the total number of blood bags to be shipped out and the pre-configured blood bag quantity.
[0063] For example, the pre-configured number of blood bags can be 20 bags, that is, the plan is to ship 20 bags of blood bags per subtask. If the total number of blood bags to be shipped is 100 bags, it is decomposed into 5 subtasks, and the sub-quantity of each subtask is 20 bags; if the total number of blood bags to be shipped is 30 bags, it is decomposed into 2 subtasks, where the sub-quantity of subtask 1 is 20 bags and the sub-quantity of subtask 2 is 10 bags; if the total number of blood bags to be shipped is 15 bags, it is decomposed into 1 subtask, and the sub-quantity of this subtask is 15 bags.
[0064] Step 106, updating the pending tasks of the task set according to one or more subtasks, the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs.
[0065] The task set is used to store tasks to be executed. The task set can only store tasks to be executed, and after each task to be executed is completed, the completed task can be removed from the task set. The task set can also include a subset to be executed and a subset to be executed. The subset to be executed is used to store tasks to be executed, and after each task to be executed is completed, the completed task can be transferred from the subset to be executed to the subset to be executed.
[0066] A subtask can be updated to a pending task in the task set, and the task information of each pending task can include the blood bag information corresponding to the pending task and the priority corresponding to the pending task. Since the pending task is updated by the subtask, and the subtask is decomposed from the blood bag outbound task, the blood bag outbound task to which the pending task belongs can be determined. The blood bag information of the pending task can be used to determine the blood bag to be outbound of the pending task. Different pending tasks belonging to the same blood bag outbound task can have the same priority.
[0067] Exemplarily, the computer device may obtain a task set, add each of the one or more subtasks to the task set, and use each of the one or more subtasks as one of the tasks to be performed in the task set. The task set may be created before step 102 and include tasks to be performed that were added historically, and the tasks to be performed that were added historically were added based on subtasks decomposed from the historical blood bag outbound tasks obtained before step 102. The task set may also be created after step 104 is executed.
[0068] Step 108: Execute the tasks to be executed in the task set according to the priority.
[0069] For example, the computer device may execute the pending tasks in the task set in order of priority, and during the execution of each pending task, instruct the mechanical module in the storage warehouse to remove the blood bags in the storage warehouse according to the blood bag information corresponding to the pending task. The mechanical module moves in the storage warehouse to obtain the blood bags to be removed and removes them.
[0070] In one embodiment, the storage warehouse may include multiple rows of shelves, and each row of shelves includes multiple storage locations for storing blood bags. In this embodiment, during the execution of each task to be executed, the computer device may determine the identification information of the blood bag to be shipped out of the task to be executed based on the blood bag information of the task to be executed, obtain the storage location of the blood bag to be shipped out in the storage warehouse based on the determined identification information, instruct the mechanical module in the storage warehouse to move to the storage location of the blood bag to be shipped out in the storage warehouse, obtain the blood bag to be shipped out, and ship out the obtained blood bag to be shipped out. The identification information of the blood bag may be pre-bound to the storage location of the blood bag in the storage warehouse, for example, it may be bound when the blood bag is stored in the storage location in the storage warehouse.
[0071] The above-mentioned blood bag outbound method can realize blood bag outbound by executing the tasks to be executed in the task set, since the task information of the tasks to be executed in the task set includes the corresponding blood bag information; the acquired blood bag outbound task is decomposed into one or more subtasks, and the tasks to be executed in the task set are updated according to the one or more subtasks, and the task information of the tasks to be executed also includes the corresponding priority, which is determined based on the blood bag outbound task to which the corresponding tasks to be executed belong. Then, the tasks to be executed in the task set are executed according to the priority, which can improve the flexibility of task execution. For example, when a part of the subtasks decomposed from the previously acquired blood bag outbound task is completed, if an urgent blood bag outbound task is acquired, the subtasks decomposed from the urgent blood bag outbound task can be set with a higher priority. In this way, the subtasks decomposed from the urgent blood bag outbound task can be executed first without waiting for the complete execution of the previous blood bag outbound task, thereby meeting the urgent blood bag outbound demand.
[0072] In one embodiment, step 102 includes: receiving a blood bag outbound instruction; parsing the blood bag outbound instruction to obtain the target priority and target blood bag information of the blood bag outbound task to be created; and creating the blood bag outbound task according to the target priority and target blood bag information.
[0073] Among them, the terminal can display a blood bag outbound configuration page, and the operator can set the target priority and target blood bag information of the blood bag outbound task to be created through the blood bag outbound configuration page, and trigger the generation of the blood bag outbound instruction through the blood bag outbound configuration page. The target blood bag information may include the blood bag outbound conditions and total quantity of the blood bags to be outbound. The blood bag outbound conditions are the conditions that the blood bags to be outbound must meet.
[0074] The target priority of the blood bag outbound task can represent the priority of the blood bag outbound task compared with other blood bag outbound tasks. The target priority can represent the urgency of the blood bag outbound task. For example, the target priority of an ordinary blood bag outbound task can be the first priority; while the target priority of a blood bag outbound task used to solve an emergency blood distribution demand can be the second priority, which is higher than the first priority. An emergency blood distribution demand can be, for example, a situation where a patient in an emergency department needs a large amount of blood transfusion.
[0075] Exemplarily, a computer device may receive a blood bag outbound instruction, parse the blood bag outbound instruction, obtain the target priority and target blood bag information of the blood bag outbound task to be created, and create a blood bag outbound task, wherein the task information of the blood bag outbound task includes the target priority and target blood bag information.
[0076] In one embodiment, the target blood bag information includes the blood bag release conditions and the total quantity of the blood bags to be released. In this embodiment, when the computer device determines that there are target blood bags that meet the blood bag release conditions among the blood bags stored in the storage warehouse, and the number of target blood bags is not less than the total number, the computer device can create a blood bag release task according to the target priority, blood bag release conditions and the total quantity.
[0077] In one embodiment, when the computer device determines that there are no target blood bags that meet the blood bag release conditions among the blood bags stored in the storage warehouse, or there are target blood bags that meet the blood bag release conditions and the number of target blood bags is less than the total number, the computer device may generate a prompt message indicating that the task creation failed.
[0078] In this embodiment, a blood bag outbound instruction is received, and the target priority and target blood bag information of the blood bag outbound task to be created are obtained by parsing the blood bag outbound instruction, and the blood bag outbound task is created according to the target priority and the target blood bag information. In this way, the target priority of the blood bag outbound task can be specified through the blood bag outbound instruction, which can create conditions for subsequent decomposition of subtasks and execution according to priority.
[0079] In one embodiment, the target blood bag information includes the blood bag delivery conditions and the total quantity of the blood bags to be delivered. Step 104 may include: decomposing the total quantity into multiple sub-quantities; generating multiple subtasks, and the multiple subtasks correspond one-to-one to the multiple sub-quantities. The task information of each subtask includes the priority determined according to the target priority, and the blood bag information determined according to the blood bag delivery conditions and the corresponding sub-quantities.
[0080] Each of the multiple sub-quantities may represent the number of blood bags to be shipped out of the corresponding sub-task. The priority of the sub-task may be the same as the target priority of the blood bag shipping task to which it belongs. For example, when the target priority of the blood bag shipping task is the first priority, the priority of the sub-task decomposed from the blood bag shipping task is also the first priority.
[0081] The blood bag release condition may be to release blood bags corresponding to multiple preset identification information, to release blood bags whose collection date is a preset date, or to release blood bags whose blood type is a preset type. Preset identification information is pre-set identification information. Collection date is the date on which the blood bag is collected. In some scenarios, the collection date can be understood as the blood donation date. Preset date is a pre-set date. Preset type is a pre-set blood type. The blood type may specifically be the type of blood products, such as red blood cells, plasma, etc.
[0082] The blood bag information of the subtask may include the identification information of the blood bag to be shipped out of the subtask. When the blood bag shipping condition indicates multiple preset identification information, the preset identification information of the same number as the sub-number corresponding to the subtask can be determined from the multiple preset identification information, and the determined preset identification information is used as the blood bag information of the subtask. For example, the sub-number of the subtask can be 20, and 20 preset identification information can be determined from the multiple preset identification information, and the determined 20 preset identification information is used as the blood bag information of the subtask.
[0083] When the blood bag delivery condition does not indicate the preset identification information, the identification information of the blood bags whose quantity is the sub-quantity corresponding to the sub-task and meets the blood bag delivery condition can be determined from the blood bags stored in the storage warehouse, and the determined blood bag identification information is used as the blood bag information of the sub-task. For example, the sub-quantity of the sub-task can be 20, and the identification information of 20 blood bags that meet the blood bag delivery condition can be determined from the blood bags stored in the storage warehouse, and the determined 20 blood bags identification information is used as the blood bag information of the sub-task.
[0084] Exemplarily, the computer device may obtain the preconfigured number of blood bags, and decompose the total number into multiple sub-quantities according to the total number and the preconfigured number of blood bags.
[0085] The total quantity may be greater than the preconfigured blood bag quantity. When the total quantity is n times the preconfigured blood bag quantity, where n is a positive integer greater than 1, the plurality of sub-quantities may be n sub-quantities, and each sub-quantity may be the same as the preconfigured blood bag quantity.
[0086] When the total quantity is m times the pre-configured number of blood bags, m is a decimal greater than 1, and the integer part of m is k, then the multiple sub-quantities can be (k+1) sub-quantities, and each of the k sub-quantities in the (k+1) sub-quantities can be the same as the pre-configured number of blood bags, and the (k+1)th sub-quantity is the number of blood bags in the total quantity that is not divided by the pre-configured number of blood bags. For example, if the total quantity is 50 bags and the pre-configured number of blood bags is 20 bags, then m is 2.5, k is 2, (k+1) is 3, 2 of the sub-quantities are 20 bags, and the third sub-quantity is 10 bags.
[0087] In one embodiment, the storage warehouse may be provided with a delivery port, and the computer device may determine the identification information of the blood bags to be delivered of the blood bag delivery task according to the delivery conditions and the total quantity of the blood bags, determine the storage location of the blood bags to be delivered in the storage warehouse according to the identification information of the blood bags to be delivered, and allocate storage locations that match the sub-quantities corresponding to each of the multiple subtasks in order of the distance between the storage location of the blood bags to be delivered and the delivery port from small to large to each of the multiple subtasks, and obtain the blood bag information of each of the multiple subtasks. In this embodiment, the storage locations of the blood bags to be delivered of each subtask are close, so that the delivery efficiency of the blood bags of the same subtask can be improved.
[0088] In this embodiment, the total quantity is decomposed into multiple sub-quantities to generate multiple sub-tasks. The multiple sub-tasks correspond to the multiple sub-quantities one by one, so that the number of blood bags that need to be shipped out of the warehouse for each sub-task can be determined. Moreover, the task information of each sub-task includes the priority of the sub-task determined according to the target priority, and the blood bag information determined according to the blood bag shipping conditions and the corresponding sub-quantities. In this way, the priorities of different sub-tasks can be distinguished, and the blood bags to be shipped out of the warehouse can be determined when executing the sub-tasks, creating conditions for subsequent execution of tasks.
[0089] In one embodiment, step 106 includes: adding multiple subtasks to the task set as multiple tasks to be executed; and updating the execution order of the multiple tasks to be executed in the task set according to the respective priorities of the multiple subtasks.
[0090] Exemplarily, the computer device may update the execution order of the multiple tasks to be executed in the task set according to the respective priorities of the multiple subtasks, so that the higher the priority of the subtask, the earlier the execution order of the corresponding task to be executed.
[0091] In one embodiment, there may be historically added tasks to be executed in the task set. When updating the execution order, the priority of each of the multiple subtasks may be compared with the priority of the historically added tasks to be executed; when the priority of each of the multiple subtasks is higher, the multiple subtasks are used as the execution order of the multiple tasks to be executed, and are set before the execution order of the historically added tasks to be executed; when the priority of each of the multiple subtasks is lower, the multiple subtasks are used as the execution order of the multiple tasks to be executed, and are set after the execution order of the historically added tasks to be executed.
[0092] In this embodiment, the execution order of multiple tasks to be executed in the task set is updated according to the respective priorities of multiple subtasks, so that the execution order of the subtasks can be controlled and the flexibility of task execution can be improved. In one embodiment, step 108 includes: determining the current task to be executed from the task set according to the priority; executing the current task to be executed; after the current task to be executed is completed, deleting the current task to be executed from the task set; returning to the step of determining the current task to be executed from the task set according to the priority order and continuing to execute.
[0093] Exemplarily, the computer device can determine the current task to be executed from the task set according to the priority, execute the current task to be executed, and after the current task to be executed is completed, delete the current task to be executed from the task set, and return to the step of determining the current task to be executed from the task set according to the priority to continue execution until there are no tasks to be executed in the task set and it is determined that the execution is completed.
[0094] In one embodiment, a computer device may determine the highest priority task to be executed among all the tasks to be executed in a task set as the current task to be executed; execute the current task to be executed; after the current task to be executed is executed, delete the current task to be executed from the task set, return to the step of determining the highest priority task to be executed among all the tasks to be executed in the task set as the current task to be executed, and continue to execute until there are no tasks to be executed in the task set.
[0095] Among them, there may be multiple tasks with the highest priority among the tasks to be executed in the task set. In this case, one task to be executed can be randomly selected from the tasks with the highest priority as the current task to be executed, or the task with the highest creation time of the blood bag outbound task to which it belongs can be selected from the tasks with the highest priority as the current task to be executed.
[0096] In this embodiment, the current task to be executed is determined from the task set according to the priority, and the current task to be executed is executed. After the current task to be executed is completed, the current task to be executed is deleted from the task set, and the process returns to the step of determining the current task to be executed from the task set according to the priority and continues to execute. In this way, when a new blood bag outbound task is acquired and the priority of the blood bag outbound task is higher, through the implementation mechanism of this embodiment, there is no need to wait for all the subtasks decomposed from the previously acquired blood bag outbound task to be completed, and the subtasks decomposed from the blood bag outbound task with a higher priority can be quickly started to execute, thereby facilitating the response to urgent blood bag outbound needs.
[0097] In one embodiment, step 108 includes: when the priorities corresponding to the tasks to be executed in the task set are the same, obtaining the creation time of the blood bag outbound task to which the tasks to be executed belong; and executing the tasks to be executed in the task set in order of creation time from early to late.
[0098] The creation time refers to the time when the blood bag outbound task is created.
[0099] In this embodiment, when the priority of the tasks to be executed in the task set is determined according to the creation time of the blood bag delivery task to which they belong, the tasks to be executed in the task set are executed in order from early to late according to the creation time, so that the tasks to be executed are executed in an orderly manner, thereby improving the stability of task execution.
[0100] In one embodiment, the step of determining the current task to be executed from the task set according to the priority includes: when the computer device determines that the priorities corresponding to the tasks to be executed in the task set are different, the computer device may determine the task to be executed with the highest priority among the tasks to be executed in the task set as the current task to be executed; when the computer device determines that the priorities corresponding to the tasks to be executed in the task set are the same, the computer device may determine the task to be executed with the earliest creation time of the blood bag outbound task among the tasks to be executed in the task set as the current task to be executed.
[0101] In one embodiment, based on Figure 2 The blood bag outbound task processing step flow diagram shown in FIG. 1 is a flow chart showing the blood bag outbound task processing steps. An optional embodiment of the blood bag outbound method may specifically include the following steps:
[0102] The computer device receives the blood bag outbound instruction, parses the blood bag outbound instruction, and obtains the target priority and target blood bag information of the blood bag outbound task to be created. The target blood bag information includes the blood bag outbound conditions and the total number of the blood bags to be outbound. The blood bag outbound conditions may be to outbound the blood bags corresponding to a plurality of preset identification information (outbound specified by blood bag number), to outbound the blood bags whose collection date is a preset date (outbound in batches according to the collection date of the blood bags), or to outbound the blood bags whose blood type is a preset type (outbound in batches according to the blood bag type).
[0103] When the computer device determines that there are target blood bags that meet the blood bag outbound conditions among the blood bags stored in the storage warehouse, and the number of target blood bags is not less than the total number, the computer device can create a blood bag outbound task according to the target priority, blood bag outbound conditions and total quantity.
[0104] When the computer device determines that there are no target blood bags that meet the blood bag release conditions among the blood bags stored in the storage warehouse, or there are target blood bags that meet the blood bag release conditions and the number of target blood bags is less than the total number, the computer device does not create a task and may generate a prompt message that the task creation failed.
[0105] The computer device can decompose the total quantity into multiple sub-quantities and generate multiple sub-tasks. The multiple sub-tasks correspond one-to-one to the multiple sub-quantities. The task information of each sub-task includes the priority determined according to the target priority and the blood bag information determined according to the blood bag release conditions and the corresponding sub-quantities.
[0106] The computer device can add multiple subtasks to the task set as multiple tasks to be executed; update the execution order of the multiple tasks to be executed in the task set according to the respective priorities of the multiple subtasks; the task information of each task to be executed includes the blood bag information and priority corresponding to the task to be executed, and the task information is determined based on the blood bag outbound task to which the corresponding task to be executed belongs.
[0107] The computer device can determine the current task to be executed from the task set according to the priority; specifically, when the computer device determines that the priorities corresponding to the tasks to be executed in the task set are different, the computer device can determine the task to be executed with the highest priority among the tasks to be executed in the task set as the current task to be executed; when the computer device determines that the priorities corresponding to the tasks to be executed in the task set are the same, the computer device can obtain the creation time of the blood bag outbound task to which the task to be executed belongs, and determine the task to be executed with the earliest creation time among the tasks to be executed in the task set as the current task to be executed.
[0108] The computer device can execute the current pending task. After the current pending task is completed, the current pending task will be deleted from the task set, and the step of determining the current pending task from the task set according to priority will be returned to continue execution until there are no pending tasks in the task set, and it can be determined that the warehouse delivery is completed.
[0109] In the above embodiment, by decomposing the blood bag outbound task into subtasks, blood bags that need to be urgently outbound can be prioritized among the multiple blood bags that have not been completely outbound in the previously created blood bag outbound task, thereby realizing the process of outbound blood bag tasks according to priority. For example, if the previously created blood bag outbound task needs to outbound 100 blood bags (needs to be outbound in 5 times, i.e., 5 first subtasks), the first subtask priority is 1, 20 blood bags have been outbound, and 20 blood bags are being outbound. At this time, there is a need to urgently distribute 40 blood bags. When creating a new blood bag outbound task (which can be called an emergency blood distribution task) to meet the outbound demand, check the emergency outbound box to mark the emergency blood distribution task as an emergency task, decompose the emergency blood distribution task into 2 second subtasks, and set the task priority to 2. Then, after the 40 blood bags of the previously created blood bag outbound task are outbound, the 2 second subtasks of the 40 blood bags of the emergency blood distribution task will be executed first, and the remaining 60 blood bags of the previously created blood bag outbound task will continue to be executed after waiting for the completion of the emergency blood distribution task. This control method greatly improves the efficiency of emergency blood distribution when multiple blood bag outbound tasks exist at the same time without affecting the original task execution process.
[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0111] Based on the same inventive concept, the embodiment of the present application also provides a blood bag out-of-warehouse device for implementing the blood bag out-of-warehouse method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more blood bag out-of-warehouse device embodiments provided below can refer to the limitations of the blood bag out-of-warehouse method above, and will not be repeated here.
[0112] In one embodiment, Figure 3 As shown, a blood bag outbound device 300 is provided, comprising: a task management module 310, and an execution module 320, wherein:
[0113] The task management module 310 is used to obtain the blood bag outbound task; decompose the blood bag outbound task into one or more subtasks; update the pending tasks of the task set according to one or more subtasks, and the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs.
[0114] The execution module 320 executes the tasks to be executed in the task set according to the priority.
[0115] In one embodiment, the task management module 310 is also used to receive blood bag outbound instructions; parse the blood bag outbound instructions to obtain the target priority and target blood bag information of the blood bag outbound task to be created; and create the blood bag outbound task according to the target priority and target blood bag information.
[0116] In one embodiment, the target blood bag information includes the blood bag delivery conditions and the total quantity of the blood bags to be delivered, and the task management module 310 is also used to decompose the total quantity into multiple sub-quantities; generate multiple subtasks, and the multiple subtasks correspond one-to-one to the multiple sub-quantities. The task information of each subtask includes the priority determined according to the target priority, and the blood bag information determined according to the blood bag delivery conditions and the corresponding sub-quantities.
[0117] In one embodiment, the task management module 310 is further configured to add multiple subtasks to the task set as multiple tasks to be executed; and update the execution order of the multiple tasks to be executed in the task set according to the respective priorities of the multiple subtasks.
[0118] In one embodiment, the execution module 320 is also used to determine the current task to be executed from the task set according to the priority; execute the current task to be executed; after the current task to be executed is completed, delete the current task to be executed from the task set; return to the step of determining the current task to be executed from the task set according to the priority and continue execution.
[0119] In one embodiment, the execution module 320 is also used to obtain the creation time of the blood bag outbound task to which the to-be-executed tasks in the task set belong when the priorities corresponding to the to-be-executed tasks in the task set are the same; and execute the to-be-executed tasks in the task set in order of creation time from early to late.
[0120] Each module in the blood bag outbound device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0121] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a blood bag out of the warehouse method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0122] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0123] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0124] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0125] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0126] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0128] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A blood bag storage method, characterized in that: The blood bag delivery method comprises: Get the blood bag outbound task; Decomposing the blood bag delivery task into one or more subtasks; Update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs; The to-be-executed tasks in the task set are executed according to the priority.
2. The blood bag storage method according to claim 1, characterized in that: The task of obtaining blood bags for delivery includes: Receive blood bag delivery instructions; Parsing the blood bag outbound instruction to obtain the target priority and target blood bag information of the blood bag outbound task to be created; A blood bag outbound task is created according to the target priority and the target blood bag information.
3. The blood bag storage method according to claim 2, characterized in that: The target blood bag information includes the blood bag delivery conditions and the total quantity of the blood bags to be delivered. The blood bag delivery task is decomposed into one or more subtasks, including: decomposing the total quantity into a plurality of sub-quantities; A plurality of subtasks are generated, wherein the plurality of subtasks correspond one-to-one to the plurality of sub-quantities, and the task information of each subtask includes a priority determined according to the target priority, and blood bag information determined according to the blood bag delivery conditions and the corresponding sub-quantities.
4. The blood bag storage method according to claim 3, characterized in that: The updating of the to-be-performed tasks of the task set according to the one or more subtasks includes: Adding the multiple subtasks to a task set as multiple tasks to be executed; The execution order of the multiple tasks to be executed in the task set is updated according to the respective priorities of the multiple subtasks.
5. The method according to claim 1, characterized in that The executing the to-be-executed tasks in the task set according to the priority level comprises: According to the priority, determine the current task to be executed from the task set; Execute the current task to be executed; After the current task to be executed is completed, the current task to be executed is deleted from the task set; Return to the step of determining the current task to be executed from the task set according to the priority and continue executing.
6. The blood bag storage method according to claim 1, characterized in that: The executing the to-be-executed tasks in the task set according to the priority level comprises: When the priorities of the tasks to be executed in the task set are the same, obtaining the creation time of the blood bag outbound task to which the tasks to be executed belong; The tasks to be executed in the task set are executed in the order of the creation time from earliest to latest.
7. A blood bag out-of-warehouse device, characterized in that: The blood bag out-of-warehouse device comprises: A task management module is used to obtain a blood bag outbound task; decompose the blood bag outbound task into one or more subtasks; update the pending tasks of the task set according to the one or more subtasks, wherein the task information of each pending task includes the blood bag information and priority corresponding to the pending task, and the task information is determined based on the blood bag outbound task to which the corresponding pending task belongs; An execution module is used to execute the to-be-executed tasks in the task set according to the priority.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the blood bag storage method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the blood bag storage method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the blood bag storage method according to any one of claims 1 to 6 are implemented.