Sample pretreatment task scheduling method and device, computer equipment and medium
Through the sample preprocessing task scheduling method, the sample preprocessing task is automatically processed, which solves the inefficiency problem caused by manual operations and achieves a more efficient sample preprocessing process.
Patent Information
- Application Number
- CN202411521489.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
In the field of mining and smelting, the sample pretreatment process mainly relies on manual labor, resulting in frequent differences in operating habits and step switching, affecting the analysis results and overall efficiency.
A sample preprocessing task scheduling method is proposed. By obtaining sample processing parameters, the task flow program sequence and the task queue to be executed are determined, and the min function is prioritized to realize automatic task execution.
It realizes the automation of the sample pre-processing process, improves execution efficiency, and ensures that each task is processed in a streaming column, with the shortest total task execution time.
Smart Images

Figure CN119512742A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automation and computer technology, and in particular to a sample pre-processing task scheduling method, device, computer equipment and medium. Background Art
[0002] In the field of mining and metallurgy, the sample pretreatment process of digesting mineral powder into liquid and other forms is currently mainly completed manually. The differences in operating habits of different operators directly affect the analysis results of the same sample components; in addition, when the type of processed samples changes, the operating steps are also different, and the operators need to switch operating steps and operating habits, which affects the overall efficiency of sample pretreatment. Summary of the invention
[0003] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and to provide a sample preprocessing task scheduling method, device, computer equipment and medium for replacing manual batch processing operations of samples to realize automation of the sample preprocessing process and make the entire sample preprocessing process have higher execution efficiency.
[0004] The present invention provides the following technical solutions:
[0005] In a first aspect, the present application proposes a method for scheduling sample pre-processing tasks, comprising:
[0006] Obtain processing parameters of multiple samples in the pre-processing process;
[0007] Determine a plurality of task flow sequences according to the processing parameters, wherein the task flow sequences include a plurality of flow processing nodes;
[0008] Determine a plurality of task queues to be executed according to each of the process processing nodes;
[0009] Based on the min function, the priority corresponding to each of the to-be-executed task queues is obtained according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences;
[0010] Each of the to-be-executed task queues is executed according to the priority.
[0011] In one embodiment, the min function is based on the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences to obtain the priority corresponding to each of the to-be-executed task queues, including:
[0012] Obtaining the total execution time of the sequence and the total waiting time of the sequence, and determining the total task processing time according to the total execution time of the sequence and the total waiting time of the sequence;
[0013] The objective function is taken as the minimum of the total task processing time and the total sequence waiting time, and the objective function is solved to obtain the priority corresponding to each of the to-be-executed task queues.
[0014] In one embodiment, the objective function is to obtain the priority corresponding to each of the to-be-executed task queues by minimizing the total task processing time and the total sequence waiting time, including:
[0015] Based on specific constraints, the priority corresponding to each of the task queues to be executed is obtained using the total task processing time and the total sequence waiting time. The specific constraints are used to indicate that each of the process processing nodes and its corresponding task queues to be executed are executed according to the sample pre-processing order corresponding to each of the task process sequences, and each of the task process sequences is completed.
[0016] In one embodiment, obtaining the total sequence execution time and the total sequence waiting time includes:
[0017] For each of the to-be-executed task queues, obtaining the sample operation required time and sample operation waiting time corresponding to each sample processing task in the to-be-executed task queue;
[0018] Determine the queue execution time corresponding to the to-be-executed task queue according to the time required for each sample operation, and determine the queue waiting time corresponding to the to-be-executed task queue according to the waiting time for each sample operation;
[0019] The total sequence execution time is determined according to all the queue execution times, and the total sequence waiting time is determined according to all the queue waiting times.
[0020] In one embodiment, executing each of the to-be-executed task queues according to the priority level includes:
[0021] Acquire a current to-be-executed task queue from each of the to-be-executed task queues according to the priority, and sequentially acquire at least one to-be-processed task from a plurality of sample processing tasks corresponding to the current to-be-executed task queue according to the to-be-executed order and execution condition corresponding to the current to-be-executed task queue, wherein the execution condition is used to indicate that all preceding steps of the to-be-processed task in the task flow sequence have been executed;
[0022] Processing the pending tasks according to the execution resource status of the process processing nodes corresponding to the pending tasks, and updating the current pending task queue;
[0023] Based on the updated task queue to be executed, re-execute the min function-based step to obtain the priority level corresponding to each task queue to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences until all the task queues to be executed are completed.
[0024] In one embodiment, processing the pending task according to the execution resource state of the process processing node corresponding to the pending task and updating the current pending task queue includes:
[0025] If the execution resource state is an idle state, executing the tasks to be processed according to the order in which the tasks to be processed are acquired;
[0026] Delete the pending tasks in the current pending task queue.
[0027] In one embodiment, processing the pending task according to the execution resource state of the process processing node corresponding to the pending task and updating the current pending task queue includes:
[0028] If the execution resource state is an occupied state, the to-be-processed task is updated to the end of the current to-be-executed task queue.
[0029] In a second aspect, the present invention provides a sample pre-processing task scheduling device, comprising:
[0030] An acquisition module, used to acquire processing parameters of multiple samples in a pre-processing process;
[0031] A first determining module, used to determine a plurality of task flow sequences according to the processing parameters, wherein the task flow sequences include a plurality of flow processing nodes;
[0032] A second determination module is used to determine a plurality of to-be-executed task queues according to each of the process processing nodes;
[0033] A calculation module, for obtaining the priority corresponding to each of the to-be-executed task queues based on a min function and according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences;
[0034] The scheduling module is used to execute each of the to-be-executed task queues according to the priority.
[0035] In a third aspect, the present invention proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the sample pre-processing task scheduling method as described in the first aspect is implemented.
[0036] In a fourth aspect, the present invention proposes a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the sample pre-processing task scheduling method as described in the first aspect is implemented.
[0037] The sample pre-processing task scheduling method, device, computer equipment and medium disclosed in the present invention obtain the processing parameters of multiple samples in the pre-processing process; determine multiple task process sequences according to the processing parameters, and the task process sequences include multiple process processing nodes; determine multiple task queues to be executed according to each process processing node; based on the min function, obtain the priority corresponding to each task queue to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task process sequences; execute each task queue to be executed according to the priority. In this way, a distributed task queue to be executed is constructed according to the sample processing parameters to meet the mutual independence between process processing and effectively realize the concurrent processing of different types of samples; further use the min function to prioritize the task queue to be executed, and process the task queue to be executed according to the priority, so as to automatically execute the sample pre-processing steps when the total execution time and the total waiting time are minimized, so as to realize that each task to be executed is processed as soon as possible according to the task process sequence, and then the total execution time of all tasks is the shortest, thereby improving the sample pre-processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.
[0039] Figure 1 A schematic diagram of a flow chart of the sample pre-processing task scheduling method proposed in this embodiment is shown;
[0040] Figure 2 A schematic diagram of a process for pre-treatment of a copper ore powder sample proposed in this embodiment is shown;
[0041] Figure 3 Another schematic diagram of the sample pre-processing task scheduling method proposed in this embodiment is shown;
[0042] Figure 4 Another schematic diagram of the process of scheduling sample pre-processing tasks proposed in this embodiment is shown;
[0043] Figure 5 A schematic diagram of a process of task state conversion proposed in this embodiment is shown;
[0044] Figure 6A schematic diagram of the structure of the sample pre-processing task scheduling device proposed in this embodiment is shown.
[0045] Description of the accompanying drawings:
[0046] 600 - sample pre-processing task scheduling device; 601 - acquisition module; 602 - first determination module; 603 - second determination module; 604 - calculation module; 605 - scheduling module. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0048] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0049] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0050] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0051] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0052] Example 1
[0053] The disclosed embodiment provides a sample pre-processing task scheduling method for replacing manual batch processing operations of samples by utilizing distributed task queues and dynamic arrangement of priority queues, so as to realize automation of the processing flow and make the entire sample pre-processing flow have higher execution efficiency.
[0054] See also Figure 1 , a sample pre-processing task scheduling method includes steps S101 to S105, and each step is described in detail below.
[0055] Step S101, obtaining processing parameters of multiple samples in a pre-processing process.
[0056] In this embodiment, the pre-treatment process steps of non-ferrous metal beneficiation samples are investigated, and the processing parameters of relevant samples are collected as the data basis for automatic pre-treatment of samples. Taking the manual pre-treatment process of copper samples as an example, the steps and operations are shown in Table 1 below.
[0057] Table 1:
[0058]
[0059]
[0060] Step S102: determining a plurality of task flow sequences according to the processing parameters, wherein the task flow sequences include a plurality of flow processing nodes.
[0061] In this embodiment, the processing parameters include sample types and sample pre-processing operation steps. According to the processing parameters of each sample, multiple process processing nodes in each sample pre-processing process step can be known. Multiple process processing nodes of the same type of sample constitute a task process sequence of the sample type, and each process processing node in the task process sequence is sorted according to the actual processing order.
[0062] For example, taking batch processing of 4 samples as an example, there exists: sample quantity space A = (a 1 ,a 2 ,a 3 ,a 4 ), where a i (i=1,2,3…4) are samples to be processed. Taking the processing of 2 types of samples as an example, there exists: sample type space B=(b 1 ,b 2 ), where B i (i=1,2) is the type of sample to be processed. The sample space of the task flow sequence is C, and there exists: C=(C 1 ,C 2 ,C 3 …C m ), where C i(i=1,2,3…m) is the task flow sequence node. The task flow sequences of different types of samples are generally different. Taking the pre-treatment process of copper samples as an example, there is: C=(C 1 ,C 2 ,C 3 …C 8 ), where C i (i=1,2,3…8) is the process processing node. Taking copper sample as an example, the pre-processing process of a copper ore powder sample is as follows: Figure 2 As shown, according to Figure 2 The process processing nodes obtained by analyzing the process shown are shown in Table 2 below.
[0063] Table 2:
[0064] <![CDATA[C 1 ]]> Weighing and adding samples <![CDATA[C 2 ]]> Acid dissolution <![CDATA[C 3 ]]> Heating digestion <![CDATA[C 4 ]]> Cool down <![CDATA[C 5 ]]> Add water to make volume <![CDATA[C 6 ]]> Shake well <![CDATA[C 7 ]]> Solution transfer <![CDATA[C 8 ]]> Waste liquid dumping
[0065] Step S103, determining a plurality of to-be-executed task queues according to each of the process processing nodes.
[0066] In this embodiment, different samples may have different waiting times at each process processing node due to resource constraints. Different processing times inevitably lead to queue sorting problems, that is, there are multiple samples to be executed at a certain processing node. Therefore, a queue of tasks to be executed C is defined. ij =(c i1 ,c i2 ,c i3 ,…,c in ), j = 1, 2, 3 ... n, C ij Indicates process processing node C i The following queue of pending tasks. At the same time, the use of distributed queues of pending tasks can ensure that different sample digestion tasks are executed independently according to the task flow sequence and process processing nodes, meeting the needs of synchronous processing of multiple samples.
[0067] For example, if there is a task flow sequence C corresponding to the b1 type sample b1 =(C 1 ,C 2 ), the task flow sequence C corresponding to the b2 type sample b2 =(C 1 ,C 2 ,C 3 ), then the process processes node C 1 The corresponding task queue to be executed is (c 11 , c 12 ), process processing node C 2 The corresponding task queue to be executed is (c 21 , c 22 ), process processing node C 3The corresponding task queue to be executed is (c 31 ).
[0068] Step S104, based on the min function, according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences, obtain the priority corresponding to each of the to-be-executed task queues.
[0069] In the present embodiment, when batch processing different types of sample pre-processing task scheduling, different samples require different times at different process sequence nodes, and some process nodes may have a large number of samples waiting in line, etc., which requires each sample task to complete the process sequence in an orderly manner while ensuring the shortest total task execution time as much as possible. Therefore, it is necessary to use the min function, and solve according to the total sequence execution time and the total sequence waiting time to obtain the priority of each task queue to be executed. Among them, the total sequence execution time is the total operation execution time required to complete all task process sequences, that is, the sum of the operation execution time of all samples under the corresponding process processing node; the total sequence waiting time is the waiting time of the total operation waiting time required to complete all task process sequences, that is, the sum of the operation waiting time of all samples under the corresponding process processing node.
[0070] Step S105, executing each of the to-be-executed task queues according to the priority.
[0071] In this embodiment, each task queue to be executed is executed according to the priority, so that even if there may be a large number of samples waiting to be processed in some process processing nodes, the total task execution time can be minimized, thereby improving the efficiency of automated sample pre-processing. In addition, the automated processing method using sample pre-processing task scheduling can achieve consistency of operation with the cooperation of mechanical mechanisms, avoiding inconsistent operations and operational errors that may occur during manual operation.
[0072] See also Figure 3 In a specific embodiment, step S104 includes steps S1041 to S1042, and each step is described in detail below.
[0073] Step S1041 , obtaining the total sequence execution time and the total sequence waiting time, and determining the total task processing time according to the total sequence execution time and the total sequence waiting time.
[0074] In this embodiment, the total sequence execution time and the total sequence waiting time used to execute the sample processing tasks in all task flow sequences are calculated, and the sum of the total sequence execution time and the total sequence waiting time is used as the total task processing time required to process all task flow sequences.
[0075] Step S1042 , taking the minimum of the total task processing time and the total sequence waiting time as the objective function, solving the objective function to obtain the priority corresponding to each of the to-be-executed task queues.
[0076] In this embodiment, the objective function can be expressed as min(T, s), where T is the total task processing time and s is the total sequence waiting time. The objective function can be solved by an algorithm to obtain an optimal solution, thereby obtaining the priority of the task queue to be executed when the total task processing time and the total sequence waiting time are minimized. The solving algorithm can be a greedy algorithm, a heuristic algorithm, or the like, which is not limited here.
[0077] In a specific embodiment, step S1041 includes: for each of the task queues to be executed, obtaining the sample operation required time and sample operation waiting time corresponding to each sample processing task under the task queue to be executed; determining the queue execution time corresponding to the task queue to be executed according to the sample operation required time, and determining the queue waiting time corresponding to the task queue to be executed according to the sample operation waiting time; determining the total sequence execution time according to all the queue execution times, and determining the total sequence waiting time according to all the queue waiting times.
[0078] In this embodiment, the process processing node C is obtained. i The time required for sample operation corresponding to each sample processing task in the pending task queue and sample operation waiting time The time required for sample operation is C in the task queue to be executed ij The time required for sample operation, that is, the time required for a certain type of sample to be executed at a certain process processing node; sample operation waiting time C in the task queue to be executed ij The sample operation waiting time is the execution waiting time of a certain type of sample at a certain process processing node.
[0079] Furthermore, the sum of the time required for all sample operations in the task queue to be executed is used as the queue execution time corresponding to the task queue to be executed, and the queue waiting time corresponding to the task queue to be executed is determined by the waiting time of all sample operations in the task queue to be executed. i The queue execution time corresponding to the task queue to be executed can be expressed as The queue waiting time corresponding to a task queue to be executed can be expressed as
[0080] Furthermore, the sum of all queue execution times is taken as the total sequence execution time, and the sum of all queue waiting times is taken as the total sequence waiting time.
[0081] In a specific embodiment, step S1042 includes: based on specific constraints, the priority corresponding to each of the task queues to be executed is obtained with the total task processing time and the total waiting time of the sequence, and the specific constraints are used to indicate that each of the process processing nodes and its corresponding task queues to be executed are executed according to the sample pre-processing order corresponding to each of the task process sequences, and each of the task process sequences are executed to completion.
[0082] In this embodiment, the objective function is constrained by specific constraints to ensure the priority of the calculated task queue to be executed, so that when scheduling tasks, they must be executed in the order of sample pre-processing in the task flow sequence set by the sample, and it must be guaranteed that all task flow sequences can be completed. On this basis, each task is processed as quickly as possible according to the flow sequence based on the priority, so that the total execution time of all tasks is the shortest.
[0083] See also Figure 4 In a specific embodiment, step S105 includes steps S1051 to S1053, and each step is described in detail below.
[0084] Step S1051, obtaining the current task queue to be executed from each of the task queues to be executed according to the priority, and obtaining at least one task to be processed in sequence from the multiple sample processing tasks corresponding to the current task queue to be executed according to the execution order and execution conditions corresponding to the current task queue to be executed, wherein the execution condition is used to indicate that the preceding steps of the task to be processed in the task flow sequence have been executed.
[0085] In the present embodiment, after obtaining the priorities of each task queue to be executed, the task queue to be executed with the highest priority is selected as the current task queue to be executed. At this time, according to the order to be executed and the execution condition corresponding to the current task queue to be executed, at least one task to be processed in a ready state is sequentially obtained from the multiple sample processing tasks corresponding to the current task queue to be executed, so that the priority to be processed can be selected based on the priority obtained based on the shortest processing time, until all the task queues to be executed are completed, thereby improving the task processing efficiency. Among them, the corresponding order to be executed in the current task queue to be executed is the arrangement order of each sample processing task in the current task queue to be executed, and the execution condition is used to indicate that the previous steps of the task to be processed in its corresponding task flow sequence have been executed. The execution condition is used to avoid the erroneous influence caused by skipping the previous steps and executing the subsequent steps.
[0086] Step S1052: Process the task to be processed according to the execution resource status of the process processing node corresponding to the task to be processed, and update the current queue of tasks to be executed.
[0087] In this embodiment, the execution resource status of the process processing node corresponding to the pending task is obtained, and the pending task is processed according to the execution resource status, thereby improving resource utilization and task processing efficiency. In addition, each processing of a pending task requires updating the current pending task queue.
[0088] Among them, the execution resource state sample space corresponding to the process processing node is O, and there are: O i =(o 1 ,o 2 ,o 3 ,…o 8 ), where o i (i=1,2,3…8) is the execution resource status of the i-th process processing node,
[0089] In a specific embodiment, step S1052 includes: if the execution resource state is an idle state, executing the tasks to be processed according to the acquisition order of the tasks to be processed; and deleting the tasks to be processed in the current queue of tasks to be executed.
[0090] In this embodiment, if the execution resource status is idle, each pending task will be executed in sequence in the order in which the pending tasks are acquired. At this time, the pending task enters the execution state from the ready state, and after the pending task is executed, the pending task in the current pending task queue is deleted. At this time, there are no executed pending tasks in the pending task queue, thereby avoiding repeated execution in the subsequent task processing process.
[0091] It should be noted that if the task to be processed fails to execute, an alarm message will be fed back through the exception message queue.
[0092] In a specific embodiment, step S1052 includes: if the execution resource state is an occupied state, updating the to-be-processed task to the end of the current to-be-executed task queue.
[0093] In this embodiment, if the execution resource state is occupied, the pending task is inserted into the tail of the current pending task queue and waits for the next scheduling execution. At this time, the pending task in the ready state enters the waiting state. Figure 5 shown.
[0094] Step S1053, based on the updated task queue to be executed, re-execute the min function-based step, and obtain the priority corresponding to each task queue to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences, until all the task queues to be executed are executed.
[0095] In this embodiment, every time the queue of pending tasks is updated, it is necessary to go to step S104 to rearrange the priorities of the queue of pending tasks until all the queues of pending tasks are completed. Because the resource occupancy and the total waiting time of the sequence of process processing are constantly changing during the task scheduling process, the total sequence execution time and the total sequence waiting time need to be re-evaluated every time the pending task is completed or the pending task does not meet the execution conditions and is inserted at the end of the queue, so as to re-order the queue of pending tasks to minimize the objective function (T, s), realize "dynamic" priority sorting, and ensure the shortest total execution time of all tasks.
[0096] Exemplary, existing 1 Task flow sequence corresponding to type C b1 (C 1 , C 2 , C 3 ), b 2 Task flow sequence corresponding to type C b2 (C 1 , C 3 , C 4 ), b 3 Task flow sequence corresponding to type C b3 (C 3 , C 4 ).
[0097] Therefore, the process processes node C 1 The corresponding task queue to be executed (C 11 , C 12 ), process processing node C 2 The corresponding task queue to be executed (C 21 ), process processing node C 3 The corresponding task queue to be executed (C 31 , C 32 , C 33 ), process processing node C 4 The corresponding task queue to be executed (C 41 , C 42 ).
[0098] After the first priority sorting of the above pending task queues, the process processing node C 1 The corresponding task queue to be executed has the highest priority, and b 1 and b 2 Type has process processing node C 1 , so we need to process node C first 1 The corresponding tasks in the pending task queue are completed, and the process processing node C 1 is the starting node for the entire task processing, C 11and C 12 There is no preceding step. Therefore, we obtain C 11 and C 12 As a task to be processed. At this time, the process processes node C 1 If the execution resource status of is idle, execute C in sequence. 11 and C 12 , and delete C 11 and C 12 .
[0099] Further, the process processing node C 2 , C 3 , C 4 The corresponding task queue to be executed is prioritized for the second time. If the process processing node C 2 The corresponding pending task queue has the highest priority, and the process processing node C 2 The corresponding execution resource state is occupied, then C 21 Re-insert into process processing node C 2 The corresponding task queue to be executed is at the end of the queue, and the process processing node C 2 , C 3 , C 4 The corresponding task queue to be executed is prioritized for the third time.
[0100] If the process processing node C in the second priority sorting 3 The corresponding pending task queue has the highest priority, and the process processing node C 3 The corresponding execution resource state is idle. In addition, due to the task flow sequence C b1 Processing node C in the middle process 2 If it has not been executed yet, only C is obtained in sequence 31 and C 32 Execute and delete it as a pending task. And so on until task flow sequence C b1 , C b2 and C b3 All executed.
[0101] The sample pre-processing task scheduling method proposed in this embodiment obtains the processing parameters of multiple samples in the pre-processing process; determines multiple task process sequences according to the processing parameters, and the task process sequences include multiple process processing nodes; determines multiple task queues to be executed according to each process processing node; based on the min function, obtains the priority corresponding to each task queue to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task process sequences; and executes each task queue to be executed according to the priority. In this way, a distributed task queue to be executed is constructed according to the sample processing parameters to meet the mutual independence between process processing and effectively realize the concurrent processing of different types of samples; further, the min function is used to prioritize the task queue to be executed, and the task queue to be executed is processed according to the priority, so as to automatically execute the sample pre-processing steps when the total execution time and the total waiting time are minimized, so as to realize that each task to be executed is processed as soon as possible according to the task process sequence, and then the total execution time of all tasks is the shortest, thereby improving the sample pre-processing efficiency.
[0102] Example 2
[0103] In addition, the present disclosure provides a sample pre-processing task scheduling device 600, see Figure 6 , the device comprises:
[0104] An acquisition module 601 is used to acquire processing parameters of multiple samples in a pre-processing process;
[0105] A first determining module 602 is used to determine a plurality of task flow sequences according to the processing parameters, wherein the task flow sequences include a plurality of flow processing nodes;
[0106] A second determination module 603 is used to determine a plurality of to-be-executed task queues according to each of the process processing nodes;
[0107] The calculation module 604 is used to obtain the priority corresponding to each of the to-be-executed task queues based on the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences based on the min function;
[0108] The scheduling module 605 is used to execute each of the to-be-executed task queues according to the priority.
[0109] Optionally, the calculation module 604 is also used to obtain the total sequence execution time and the total sequence waiting time, and determine the total task processing time based on the total sequence execution time and the total sequence waiting time; taking the minimum total task processing time and the total sequence waiting time as the objective function, the objective function is solved to obtain the priority corresponding to each of the task queues to be executed.
[0110] Optionally, the calculation module 604 is also used to obtain the priority corresponding to each of the to-be-executed task queues based on specific constraints, the total task processing time and the total waiting time of the sequence, and the specific constraints are used to indicate that each of the process processing nodes and its corresponding to-be-executed task queues are executed according to the sample pre-processing order corresponding to each of the task process sequences, and each of the task process sequences is executed to completion.
[0111] Optionally, the calculation module 604 is also used to obtain, for each of the task queues to be executed, the sample operation required time and the sample operation waiting time corresponding to each sample processing task in the task queue to be executed; determine the queue execution time corresponding to the task queue to be executed according to the sample operation required time, and determine the queue waiting time corresponding to the task queue to be executed according to the sample operation waiting time; determine the total sequence execution time according to all the queue execution times, and determine the total sequence waiting time according to all the queue waiting times.
[0112] Optionally, the scheduling module 605 is also used to obtain the current task queue to be executed from each of the task queues to be executed according to the priority, and to obtain at least one task to be processed in sequence from the multiple sample processing tasks corresponding to the current task queue to be executed according to the order to be executed and the execution condition corresponding to the current task queue to be executed, wherein the execution condition is used to indicate that the preceding steps of the task to be processed in the task flow sequence have been executed; to process the task to be processed according to the execution resource status of the flow processing node corresponding to the task to be processed, and to update the current task queue to be executed; based on the updated task queue to be executed, re-execute the steps based on the min function, and obtain the priority corresponding to each of the task queues to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences, until all the task queues to be executed are completed.
[0113] Optionally, the scheduling module 605 is further used to execute the pending tasks in the order in which they are acquired if the execution resource state is an idle state; and delete the pending tasks in the current pending task queue.
[0114] Optionally, the scheduling module 605 is further configured to update the pending task to the end of the current pending task queue if the execution resource state is an occupied state.
[0115] The device provided in the embodiment of the present disclosure can execute the steps of the sample pre-processing task scheduling method provided in Example 1, which will not be described again to avoid repetition.
[0116] The sample pre-processing task scheduling device proposed in this embodiment obtains the processing parameters of multiple samples in the pre-processing process; determines multiple task process sequences according to the processing parameters, and the task process sequences include multiple process processing nodes; determines multiple task queues to be executed according to each process processing node; based on the min function, obtains the priority corresponding to each task queue to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task process sequences; and executes each task queue to be executed according to the priority. In this way, a distributed task queue to be executed is constructed according to the sample processing parameters to meet the mutual independence between process processing and effectively realize the concurrent processing of different types of samples; further, the min function is used to prioritize the task queue to be executed, and the task queue to be executed is processed according to the priority, so as to automatically execute the sample pre-processing steps when the total execution time and the total waiting time are minimized, so as to realize that each task to be executed is processed as soon as possible according to the task process sequence, and then the total execution time of all tasks is the shortest, thereby improving the sample pre-processing efficiency.
[0117] Example 3
[0118] In addition, an embodiment of the present disclosure provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the sample pre-processing task scheduling method described in Example 1 is implemented.
[0119] The device provided in the embodiment of the present disclosure can execute the steps of the sample pre-processing task scheduling method provided in Example 1, which will not be described again to avoid repetition.
[0120] Example 4
[0121] The embodiment of the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the sample pre-processing task scheduling method described in Embodiment 1 is implemented.
[0122] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0123] The computer-readable storage medium provided in this embodiment can implement the sample pre-processing task scheduling method provided in Example 1, and will not be described again here to avoid repetition.
[0124] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.
[0125] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0126] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for scheduling sample pre-processing tasks, characterized in that: include: Obtain processing parameters of multiple samples in the pre-processing process; Determine a plurality of task flow sequences according to the processing parameters, wherein the task flow sequences include a plurality of flow processing nodes; Determine a plurality of task queues to be executed according to each of the process processing nodes; Based on the min function, the priority corresponding to each of the to-be-executed task queues is obtained according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences; Each of the to-be-executed task queues is executed according to the priority.
2. The sample pre-processing task scheduling method according to claim 1, characterized in that: Based on the min function, the priority corresponding to each of the to-be-executed task queues is obtained according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences, including: Obtaining the total execution time of the sequence and the total waiting time of the sequence, and determining the total task processing time according to the total execution time of the sequence and the total waiting time of the sequence; The objective function is taken as the minimum of the total task processing time and the total sequence waiting time, and the objective function is solved to obtain the priority corresponding to each of the to-be-executed task queues.
3. The sample pre-processing task scheduling method according to claim 2, characterized in that: The objective function is to obtain the priority corresponding to each of the to-be-executed task queues by taking the minimum of the total task processing time and the total sequence waiting time as the objective function, including: Based on specific constraints, the priority corresponding to each of the task queues to be executed is obtained using the total task processing time and the total sequence waiting time. The specific constraints are used to indicate that each of the process processing nodes and its corresponding task queues to be executed are executed according to the sample pre-processing order corresponding to each of the task process sequences, and each of the task process sequences is completed.
4. The method for scheduling sample pre-processing tasks according to claim 2, characterized in that: The obtaining of the total sequence execution time and the total sequence waiting time comprises: For each of the to-be-executed task queues, obtaining the sample operation required time and sample operation waiting time corresponding to each sample processing task in the to-be-executed task queue; Determine the queue execution time corresponding to the to-be-executed task queue according to the time required for each sample operation, and determine the queue waiting time corresponding to the to-be-executed task queue according to the waiting time for each sample operation; The total sequence execution time is determined according to all the queue execution times, and the total sequence waiting time is determined according to all the queue waiting times.
5. The method for scheduling sample pre-processing tasks according to claim 1, characterized in that: The executing each of the to-be-executed task queues according to the priority level includes: Acquire a current to-be-executed task queue from each of the to-be-executed task queues according to the priority, and sequentially acquire at least one to-be-processed task from a plurality of sample processing tasks corresponding to the current to-be-executed task queue according to the to-be-executed order and execution condition corresponding to the current to-be-executed task queue, wherein the execution condition is used to indicate that all preceding steps of the to-be-processed task in the task flow sequence have been executed; Processing the pending tasks according to the execution resource status of the process processing nodes corresponding to the pending tasks, and updating the current pending task queue; Based on the updated task queue to be executed, re-execute the min function-based step to obtain the priority level corresponding to each task queue to be executed according to the total sequence execution time and the total sequence waiting time corresponding to all the task flow sequences until all the task queues to be executed are completed.
6. The method for scheduling sample pre-processing tasks according to claim 5, characterized in that: The processing of the pending task according to the execution resource state of the process processing node corresponding to the pending task and updating the current pending task queue includes: If the execution resource state is an idle state, executing the tasks to be processed according to the order in which the tasks to be processed are acquired; Delete the pending tasks in the current pending task queue.
7. The method for scheduling sample pre-processing tasks according to claim 5, characterized in that: The processing of the pending tasks according to the execution resource status of the process processing node corresponding to the pending tasks and updating the current pending task queue includes: If the execution resource state is an occupied state, the to-be-processed task is updated to the end of the current to-be-executed task queue.
8. A sample pre-processing task scheduling device, characterized in that: include: An acquisition module, used to acquire processing parameters of multiple samples in a pre-processing process; A first determining module, used to determine a plurality of task flow sequences according to the processing parameters, wherein the task flow sequences include a plurality of flow processing nodes; A second determination module is used to determine a plurality of to-be-executed task queues according to each of the process processing nodes; A sorting module is used to sort the priority of each task process sequence based on the min function according to the node processing required time and the node processing waiting time corresponding to each process processing node, so as to obtain a queue scheduling order; The scheduling module is used to execute each of the to-be-executed task queues according to the queue scheduling order.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method for scheduling sample pre-processing tasks according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, the sample pre-processing task scheduling method according to any one of claims 1 to 7 is implemented.