Dynamic priority dyeing task scheduling and conflict resolution method

By using a dynamic priority coloring task scheduling and conflict resolution method, the problems of resource conflict and low scheduling efficiency in traditional methods are solved. This enables parallel processing of multiple tasks, reduces task connection waiting time, improves system stability and execution efficiency, and has the ability to recover from abnormal interruptions.

CN121018526APending Publication Date: 2025-11-28JINAN BIOBASE BIOTECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511067088.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Traditional coloring task scheduling methods are ill-suited to complex and ever-changing coloring tasks and real-time changes in device status, leading to resource conflicts and low scheduling efficiency. Furthermore, existing conflict resolution methods lack foresight and intelligence, making it difficult to effectively address conflict situations under high concurrency and complex path planning.

Method used

A dynamic priority-based task scheduling and conflict resolution method is adopted. By selecting a task and performing a pre-check for task conflicts, a queue of tasks to be updated and sorted is generated. The task weights are calculated, and the robotic arm operation instructions are generated. A mechanical conflict resolution method is adopted. By selecting high-precision tasks and sorting by weight, a set of robotic arm operation instructions is generated to avoid conflicts and achieve parallel processing of multiple tasks.

Benefits of technology

It enables parallel processing of multiple tasks, reduces task connection waiting time, improves execution efficiency, avoids robotic arm conflicts, improves system stability and robustness, and has the ability to recover from abnormal interruptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121018526A_ABST
    Figure CN121018526A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic priority dyeing task scheduling and conflict resolution method, which comprises the following steps of: pre-checking task conflicts, extracting all step sequences of a newly-added task and reversing, and detecting whether irreversible opposite node conflicts exist between the step sequences of the newly-added task and all the step sequences of the executed task or not; a to-be-updated execution task queue is generated, the task dip dyeing state of each dyeing site is traversed, to-be-updated execution tasks are screened out, task weights are calculated, and the to-be-updated execution task queue is generated according to descending sort of the weights; a dynamic priority decision is made, and the task executed by the mechanical arm in the next step is determined according to the weight sorting result of the to-be-updated execution task and the step precision level; and a mechanical arm operation instruction set is generated, whether space-time conflicts exist or not is judged, if yes, a new to-be-updated execution task is selected to generate the mechanical arm operation instruction set, and if not, the mechanical arm operation instruction set is executed. Multi-task parallel processing is supported, and the rapid processing requirement of large-scale pathological samples is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pathological staining technology, and particularly to a method for dynamic priority staining task scheduling and conflict resolution. Background Technology

[0002] In the practical application of fully automated pathological tissue staining machines, efficient scheduling and conflict resolution of multiple staining tasks have always been key factors restricting staining efficiency and quality. With the continuous increase in medical diagnostic needs, the sample volume that staining machines need to process is becoming increasingly large, and the staining procedures are becoming increasingly complex, which places higher demands on the scheduling of staining tasks and conflict handling.

[0003] Traditional coloring task scheduling methods often employ static priority or simple round-robin scheduling strategies, which are ill-suited to complex and ever-changing coloring tasks and real-time equipment status. When faced with parallel processing of multiple complex coloring programs, these methods are prone to resource conflicts and low scheduling efficiency, leading to longer coloring cycles and decreased coloring quality.

[0004] Furthermore, most existing conflict resolution methods rely on simple collision detection and avoidance strategies, lacking foresight and intelligence, and are unable to effectively handle conflict situations under high concurrency and complex path planning. Especially during the dyeing process, the frequent movement of the robotic arm and the complex and ever-changing station occupancy status often prevent traditional conflict resolution methods from identifying and resolving potential conflicts in a timely and accurate manner, thus affecting the overall performance and stability of the dyeing machine.

[0005] To overcome the shortcomings of the traditional methods mentioned above, this invention proposes a dynamic priority coloring task scheduling and conflict resolution method. Summary of the Invention

[0006] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a dynamic priority coloring task scheduling and conflict resolution method, which solves the problem that most existing technologies rely on simple collision detection and avoidance strategies, lack foresight and intelligence, and are difficult to effectively cope with conflict situations under high concurrency and complex path planning.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A dynamic priority-coloring task scheduling and conflict resolution method includes the following steps: S1: Select a coloring task. Only one task can be selected at a time, but multiple task types can be selected. S2: Task conflict pre-check, extract all step sequences of the new task and reverse them, and check whether there is an irreversible conflict between it and all step sequences of the task being executed. S3: Add to task queue. Add the newly selected task to the task queue and proceed to C1 for judgment. If the judgment is empty, the execution ends; otherwise, proceed to the next step. S4: Generate and sort the queue of tasks to be updated, iterate through the task staining status of each staining site, filter out the tasks to be updated and calculate the task weights, sort the tasks in descending order of weights to generate the queue of tasks to be updated. If C2 determines that the queue of tasks to be updated is empty, return to S3; otherwise, proceed to the next step. S5: Generate an execution operation instruction set according to the rules. Based on the weight sorting results and step accuracy level of the tasks to be updated, select the next task to be updated and executed according to the priority and weight. Generate a robotic arm execution operation instruction set. Based on the robotic arm operation instructions, with the current time as the starting time, generate the execution operation instruction set and execution time window of the selected task. Then, proceed to C3 to check if there is a conflict between the site or the execution time window. If there is a conflict, return to C2. If not, proceed to the next step. S6: The robotic arm performs the operation, executing the operation instructions in the order of the instruction set. After executing a single instruction, it enters C4 to check if the instruction set is empty. If it is not empty, it continues to execute; otherwise, it proceeds to the next step. S7: Update the staining time of the current site, mainly to ensure the accuracy of the staining time of the site, and update the staining start time and end time of the current site.

[0008] Preferably, the detection of irreversible opposing node conflicts in S2 specifically means: if the step sequence after the new task is reversed has two or more nodes (sites) that overlap with the step sequence of the task being executed and move in opposite directions, then it is determined that there is an irreversible object conflict, and the task is not allowed to be added to the task execution queue.

[0009] Preferably, in step S4, when selecting tasks to be executed, the difference between the time from the current position of the robotic arm to the task station and the task immersion end time is calculated. If the difference If the value is greater than 0, it will be selected into the queue of tasks to be updated and executed.

[0010] Preferably, in step S4, the task weights are determined by the formula... The calculation is performed, where St is the immersion time of the current site for the task to be updated. , The weights assigned to time are determined. + =1 and its value range is (0, 1). After generating all the queues of tasks to be updated, according to... Sort by weight in descending order.

[0011] Preferably, the comprehensive judgment rule for selecting a task in step S5 is as follows: when there are multiple high-precision tasks in the queue of tasks to be updated, select the task with the highest weight among the high-precision tasks; when there are no high-precision tasks, select the task with the highest weight in the queue; after selecting the task, delete the task from the queue of tasks to be updated.

[0012] Preferably, in step S5, the robotic arm executes operation commands including horizontal movement, grasping the dyeing rack, vertical lifting, draining, shaking the cylinder, unloading the dyeing rack, etc. The execution time of each operation command is calculated based on the command set, and the execution time window of the command set is given.

[0013] Preferably, the conflict detection in step S5 includes: whether the station that the current task intends to enter is occupied, and whether the time window for the robotic arm to execute operation instructions overlaps with the operation time window of other high-precision tasks. If there is a conflict or overlap, then return to C2.

[0014] Preferably, the method is executed by a computer program stored on a computer-readable storage medium, which implements the above method steps when invoked by a processor.

[0015] Preferably, the computer-readable storage medium is used in a staining apparatus, the staining apparatus including a processor and the computer-readable storage medium, wherein the processor, when executing the computer program, implements the dynamic priority staining task scheduling and conflict resolution method according to any one of claims 1-7.

[0016] The technical effects and advantages of the dynamic priority coloring task scheduling and conflict resolution method of the present invention are as follows: 1. This invention supports multi-task parallel processing: This invention supports multi-task parallel processing, which meets the needs of rapid processing of large-scale pathological samples. Through dynamic priority scheduling and conflict resolution mechanisms, it achieves efficient collaborative operation of multiple staining tasks.

[0017] 2. This invention reduces task connection waiting time: By accurately calculating the time period occupied by tasks, it effectively shortens the task connection waiting time and improves execution efficiency.

[0018] 3. This invention avoids conflicts in robotic arms: Through precise spatiotemporal conflict detection and resolution algorithms, the stability and reliability of the system are improved.

[0019] 4. This invention and method have strong robustness, allowing for interruptions such as power outages and recovery to normal task execution. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of a dynamic priority coloring task scheduling and conflict resolution method according to the present invention; Figure 2 This is a schematic diagram illustrating the generation and execution of operation instruction sets according to rules in this invention; Figure 3 This is a schematic diagram of the set of operation instructions executed by the robotic arm in this invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Example 1 Reference Figure 1 A dynamic priority coloring task scheduling and conflict resolution method includes the following steps: S1: Select staining task, such as HE staining, Masson staining, etc. Multiple types of tasks can be selected, but only one task can be selected at a time. After the selected task has started execution, a new task can be selected again. S2: Task conflict pre-check, extract all the step sequences of the added task, reverse the sequence, and then check whether there is an irreversible conflict between it and all the step sequences of the executed task. S3: Add to task queue: Add the selected task to the task queue and update the status information of the added task at the loading site. C1: If the task queue is not empty, the program can proceed to S4 to generate a task queue to be updated; otherwise, the current program will terminate directly. S4: Generate and sort the queue of tasks to be executed. This step dynamically generates the queue of tasks to be executed based on the status of the currently executing tasks within the dyeing machine station, and calculates the time from the current position of the robotic arm to the station of the current task minus the end time of the current task's dyeing process. ,like If the value is greater than 0, it is selected for the execution queue. According to the formula... The calculation is performed, where St is the immersion time of the current site for the task to be updated. , The weights assigned to time are determined. + =1 and its value range is (0, 1). After generating all the queues of tasks to be updated, according to... Sort by weight in descending order; C2: If the queue of tasks to be updated is not empty, proceed to the next step to generate the execution operation instruction set according to the rules; otherwise, return directly to S3 to add the task queue. S5: Select a task according to the rules, generate an execution action instruction set, and delete the task from the queue of tasks to be updated. The instruction set is the robotic arm operation instruction for a single task to move from one station to another. At the same time, generate the estimated time period from start to completion of all action instructions based on the current time. C3: Determine whether the generated action instruction set conflicts with the occupied station and the time period occupied by the robotic arm to be executed. If there is no conflict, proceed to the next step; if there is a conflict, return to C2. S6: Execute the action instruction set. For each instruction action executed, remove an instruction from the queue and enter C4; C4: If the action instruction set queue is empty, proceed to S7; otherwise, return to S6 to execute the robotic arm instructions. S7: Update the immersion time at the current site of the robotic arm, and return to S3 after completion.

[0022] Specifically, the rule-based generation of action instruction sets in S5 refers to... Figure 2 It includes the following steps: S51: Get the queue of tasks to be updated that has been weighted and sorted; S5C1: Determine if there are high-precision steps to be executed in the queue of tasks to be executed. If they exist, proceed to S52; otherwise, proceed to S54. S52: Add all tasks with high-precision steps to a new queue and sort them according to their weights. Note that the situation of multiple tasks in the new queue will only occur if an abnormal interruption causes multiple tasks in the dyeing machine to have high precision steps and have completed the dyeing of the current step. Under normal circumstances, there is only one task with high precision steps in the new queue. S53: Select the task with higher weight from the new queue in S52 and proceed to S56; S54: Select the task with the higher sorted weight and proceed to S55; S55: Generate a queue of steps for the current task. The rule is to determine whether the remaining steps of the current task are non-high-precision steps. If they are high-precision steps, the steps are continuously added to the queue. If they are non-high-precision steps, the steps are added to the queue and the determination stops. S5C2: Determine if the size of the step queue in S55 is 1. If it is 1, execute S56. If it is not 1, proceed to the next condition S5C3. S5C3: Determine whether the station to be occupied in the step queue generated by the current task conflicts with the station already occupied or pre-occupied by other tasks. If there is a conflict, return to S5C1 and select a new task to be executed. If there is no conflict, execute S56. S56: Generate the set of execution action instructions for the current step of the current task.

[0023] Specifically, the rule-based generation of action instruction sets in S56 refers to... Figure 3 The decomposed actions of the instruction set mainly include: S561 horizontal movement, S562 grabbing the dyeing rack, S563 vertical ascent, S564 draining, S565 horizontal movement, S566 vertical descent, S567 shaking the cylinder, and S568 unloading the dyeing rack. The running time of the above actions can be calculated based on the moving speed of the equipment, so the running time of the action instruction set can be estimated. The dotted lines in the diagram indicate that the instruction can be omitted in special cases. For example, if the current step is high precision and the dyeing time is short, the robotic arm should not unload the dyeing rack into the station. Instead, it should carry the dyeing rack to the next station directly after the current dyeing step is completed. Therefore, in this case, S568 unloading the dyeing rack, S561 horizontal movement, and S562 grabbing the dyeing rack in the robotic arm operation instruction set can be omitted.

[0024] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0025] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0026] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

[0027] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for dynamic priority coloring task scheduling and conflict resolution, characterized in that, Includes the following steps: S1: Select a coloring task. Only one task can be selected at a time, but multiple task types can be selected. S2: Task conflict pre-check, extract all step sequences of the new task and reverse them, and check whether there is an irreversible conflict between it and all step sequences of the task being executed. S3: Add to task queue. Add the newly selected task to the task queue and proceed to C1 for judgment. If the judgment is empty, the execution ends; otherwise, proceed to the next step. S4: Generate and sort the queue of tasks to be updated, traverse the task staining status of each staining site, filter out the tasks to be updated and calculate the task weights, sort the tasks in descending order of weights to generate the queue of tasks to be updated, enter C2 to determine whether the queue of tasks to be updated is empty, if it is empty, return to S3, otherwise proceed to the next step. S5: Generate an execution operation instruction set according to the rules. Based on the weight sorting results and step accuracy level of the tasks to be updated, select the next task to be updated and executed according to the priority and weight. Generate a robotic arm execution operation instruction set. Based on the robotic arm operation instructions, with the current time as the starting time, generate the execution operation instruction set and execution time window of the selected task. Then, proceed to C3 to check if there is a conflict between the site or the execution time window. If there is a conflict, return to C2. If not, proceed to the next step. S6: The robotic arm performs the operation, executing the operation instructions in the order of the instruction set. After executing a single instruction, it enters C4 to check if the instruction set is empty. If it is not empty, it continues to execute. If it is empty, it means that all instructions have been executed and proceeds to the next step. S7: Update the staining time of the current site, mainly to ensure the accuracy of the staining time of the site, and update the staining start time and end time of the current site.

2. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 1, characterized in that, The detection of irreversible opposing node conflicts in S2 is as follows: if the step sequence after the reversal of the newly added task has two or more nodes (sites) that overlap with the step sequence of the task being executed and move in opposite directions, then it is determined that there is an irreversible object conflict, and the task is not allowed to be added to the task execution queue.

3. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 1, characterized in that, In step S4, when filtering tasks to be updated, the difference between the time it takes for the robotic arm to reach the task station from its current position and the time it takes for the task to finish is calculated. If the difference If the value is greater than 0, it will be selected into the queue of tasks to be updated and executed.

4. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 1, characterized in that, In step S4, the task weight is determined by the formula. The calculation is performed, where St represents the immersion time of the current site for the task to be updated. , The weights assigned to time are determined. + =1 and its value range is (0, 1). After generating all the queues of tasks to be updated, according to... Sort by weight in descending order.

5. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 1, characterized in that, The comprehensive judgment rule for selecting a task in step S5 is as follows: when there are multiple high-precision tasks in the queue of tasks to be updated, select the task with the highest weight among the high-precision tasks; when there are no high-precision tasks, select the task with the highest weight in the queue. After selecting the task, delete the task from the queue of tasks to be updated.

6. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 1, characterized in that, In step S5, the robotic arm executes operation commands including horizontal movement, grasping the dyeing rack, vertical lifting, draining, shaking the cylinder, and unloading the dyeing rack. The execution time of each operation command is calculated based on the command set, and the execution time window of the command set is given.

7. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 1, characterized in that, The conflict detection in step S5 includes: whether the station that the current task intends to enter is occupied, and whether the time window for the robotic arm to execute operation instructions overlaps with the operation time window of other high-precision tasks. If there is a conflict or overlap, then return to C2.

8. A dynamic priority coloring task scheduling and conflict resolution method according to any one of claims 1-7, characterized in that, The method is executed by a computer program stored on a computer-readable storage medium, which implements the above method steps when invoked by a processor.

9. The dynamic priority coloring task scheduling and conflict resolution method as described in claim 8, characterized in that, The computer-readable storage medium is used in a staining apparatus, the staining apparatus including a processor and the computer-readable storage medium, wherein the processor, when executing the computer program, implements the dynamic priority staining task scheduling and conflict resolution method according to any one of claims 1-7.

Citation Information

Cited By

  • Automatic batch calibration method and device for elemental analysis instrument

    CN121656502A