Robot scheduling method, device, electronic device, and storage medium
The proposed robot scheduling method improves efficiency and utilization by prioritizing tasks based on generation order and robot availability, using separate queues for random and designated tasks, addressing inefficiencies in existing sequential assignment methods.
Patent Information
- Application Number
- JP2024525116
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-10-25
- Filing Date
- 2022-10-11
- Publication Date
- 2024-11-06
- Estimated Expiration
- 2042-10-11
AI Technical Summary
Existing robot scheduling methods result in low scheduling efficiency and inability to ensure robot utilization due to the sequential assignment of tasks, leading to waiting times and inefficiencies when multiple robots are involved.
A robot scheduling method that prioritizes tasks based on their generation order, type, and robot availability, using separate queues for random and designated tasks, ensuring each task is assigned to the most suitable robot, thereby reducing waiting times and improving utilization.
The method enhances scheduling efficiency and robot utilization by minimizing waiting times and conflicts, ensuring that each task is promptly assigned to the appropriate robot, thus optimizing task execution.
Smart Images

Figure 2024541019000001_ABST
Abstract
Description
[Technical field]
[0001] The present application relates to robotics technology, and in particular to a robot scheduling method, device, electronic device, and storage medium. [Background technology]
[0002] With the rapid development of artificial intelligence, robots gradually enter people's lives and provide convenience to people. For example, in the same store (such as a restaurant or hotel), a user can specify a random robot or a specific robot in the store through a specific calling device (such as a mobile phone or a watch) to make the robot perform a specific task. Then, the problem of how to schedule the robot arises.
[0003] In the prior art, the principle of time fairness is usually adopted for scheduling, that is, each task is sent to a random or designated robot in sequence according to the time when the task is generated. Although this method can guarantee absolute fairness, when there are multiple robots participating in the scheduling, the preceding task is a random task, and robot A is randomly assigned to it, and the subsequent task is a task designated for robot A, the subsequent task needs to wait for the completion of the preceding task before it can be performed, so the overall scheduling efficiency is low and the utilization rate of the robots cannot be ensured. Summary of the Invention [Problem to be solved by the invention]
[0004] Some embodiments of the present application aim to provide a robot scheduling method, device, electronic device, and storage medium to solve the problem of low scheduling efficiency and inability to ensure robot utilization in the conventional technology. [Means for solving the problem]
[0005] In a first aspect, an embodiment of the present application provides a robot scheduling method, comprising: obtaining a plurality of tasks to be delivered, wherein the plurality of tasks to be delivered include a plurality of tasks located at the head of a queue in a plurality of original task queues, the plurality of original task queues including a random robot task queue sorted from the head of the queue to the tail of the queue according to a generated order, and at least two designated robot task queues corresponding to at least two robots among the plurality of robots, wherein types of the plurality of tasks to be delivered include random robot tasks and designated robot tasks; determining a scheduled robot for each of the tasks to be delivered according to the generated order based on a type of each task to be delivered, a number of tasks and a state of each robot, and delivering the tasks to be delivered to the scheduled robot; and repeatedly performing the above operation for remaining tasks in each original task queue.
[0006] In a second aspect, an embodiment of the present application further provides a robot scheduling device configured to obtain a plurality of delivery target tasks, where the plurality of delivery target tasks include a plurality of tasks located at the head of a plurality of original task queues, respectively, the plurality of original task queues including a random robot task queue sorted from the head of the queue to the tail of the queue according to a generated order, and at least two designated robot task queues corresponding to at least two robots among the plurality of robots, and types of the plurality of delivery target tasks include a random robot task and a designated robot task; a robot scheduling module for determining a scheduled robot for each delivery target task according to a generated order based on a type of each delivery target task, a task count and a status of each robot, and distributing the delivery target tasks to the scheduled robot; and a cyclic execution module for repeatedly performing the above operation on remaining tasks in each original task queue.
[0007] In a third aspect, an embodiment of the present application further provides an electronic device including one or more processors and a memory for storing one or more programs, the one or more programs, when executed by the one or more processors, causing the one or more processors to realize the robot scheduling method described above.
[0008] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to realize the above robot scheduling method. Effect of the Invention
[0009] In the technical proposal of the embodiment of the present application, a designated robot task queue corresponding to each robot is set, and a random robot task queue is set, and the designated robot task and the random robot task corresponding to the designated robot task queue and the random robot task queue are respectively arranged. When executing the scheduling policy, the task located at the top of the queue is obtained from each task queue as a target task to be distributed, and then these target tasks are scheduled according to the order in which they were generated, and the scheduled robot corresponding to each target task is determined based on the task type, the number of tasks of each robot, and the status. In this way, since the random task or the designated task of each robot is scheduled every time the scheduling policy is executed, the problem of congestion waiting for all subsequent tasks due to the collision of the robots designated in the preceding task and the subsequent task in the process of scheduling all tasks together according to the time fairness principle in the prior art is avoided, and the scheduling efficiency and utilization rate of the robots are improved. [Brief description of the drawings]
[0010] One or more embodiments are illustratively illustrated by images in corresponding drawings, and these illustrative illustrations are not intended to be limiting of the embodiments.
[0011] [Figure 1] 1 is a flowchart of a robot scheduling method according to a first embodiment of the present application. [Diagram 2] 11 is a flowchart of a method for determining a robot to be scheduled in a robot scheduling method according to a second embodiment of the present application. [Diagram 3] 13 is a flowchart of a robot scheduling method when a task to be delivered is a random robot task in a third embodiment of the present application. [Figure 4] 13 is a flowchart of a robot scheduling method when a task to be delivered is a designated robot task in a fourth embodiment of the present application. [Diagram 5] 11 is a flowchart of a robot scheduling method according to a fifth embodiment of the present application. [Figure 6] FIG. 13 is a structural schematic diagram of a robot scheduling device according to a sixth embodiment of the present application. [Figure 7] FIG. 13 is a structural schematic diagram of an electronic device according to Example 7 of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] The present application will be described in more detail below with reference to the drawings and examples. It should be understood that the specific examples described herein are merely for the purpose of illustrating the present application, and do not limit the present application. In addition, it should be further noted that, for ease of explanation, the accompanying drawings only show parts related to the embodiments of the present application, and not all of the structures. Example 1
[0013] 1 is a flowchart of a robot scheduling method according to a first embodiment of the present application, which is applicable, for example, to a case where a robot is assigned to process a task triggered by a user in the same store, and the method can be executed by a robot scheduling device, which can be realized in the form of software and / or hardware, and is preferably disposed in an electronic device such as a computer device or a server. As shown in FIG. 1, the method specifically includes the following steps:
[0014] S101: obtaining a plurality of tasks to be delivered, where the plurality of tasks to be delivered include a plurality of tasks located at the head of a queue in a plurality of original task queues, the plurality of original task queues including a random robot task queue sorted from the head of the queue to the tail of the queue according to a generated order, and at least two designated robot task queues corresponding to at least two robots among the plurality of robots, and types of the plurality of tasks to be delivered include a random robot task and a designated robot task.
[0015] In one example, if there are N robots in a store, set up N designated robot task queues and one random robot task queue, and arrange the tasks from the front to the back of the corresponding queue according to the type of task triggered by the user, that is, the task at the front of the queue is generated earlier. For example, random task A that does not specify a robot is placed in the random robot task queue, designated task B and designated task C that specify robot A and robot B respectively are placed in the designated robot task queues corresponding to robot A and robot B respectively, and another random task D is generated and placed in the random robot task queue and is positioned after random task A.
[0016] After the tasks are generated, they are placed in the corresponding task queues and wait for transmission. The scheduling policy can be executed at regular time intervals, and each time the scheduling policy is executed, the task at the top of each original task queue is first obtained and set as the task to be distributed.
[0017] S102: determining a robot to be scheduled for each task to be delivered according to the generated order based on the type of each task to be delivered, the number of tasks of each robot, and a state of each robot, and transmitting the task to be delivered to the robot to be scheduled.
[0018] In the process of executing the scheduling policy, the robot to be scheduled is determined for each task to be delivered in sequence according to the order of generation of each task to be delivered. For example, the generation times of all tasks to be delivered are compared, the task with the earliest generation time is set as the current task to be delivered, a robot to be scheduled for it is determined, and the current task to be delivered is sent to the determined robot to be scheduled. Next, the task with the earliest generation time among the remaining unprocessed tasks to be delivered is scheduled as the new current task to be delivered, and this is continued by analogy until the processing of all tasks to be delivered is completed.
[0019] The robot to be scheduled can be determined based on the type of task, the number of tasks for each robot, and the status. For example, if the current task to be delivered is a random robot task, the robot with the smallest number of tasks among all the robots is selected as the scheduled robot in charge of executing the current task to be delivered, thereby improving the efficiency of task processing and the utilization rate of each robot. If the current task to be delivered is a designated robot task, the robot designated by the task is set as the scheduled robot in charge of processing the current task to be delivered.
[0020] In another example, the scheduling can be performed in combination with the state of the robot. For example, a robot that is currently available for calling is selected from each robot, and then a robot to be scheduled for each task is determined from the currently available robots, thereby improving the success rate of task distribution. Here, the state of the robot can be determined based on the state information reported by the robot. For example, if the current network state of the robot is online, but the robot cannot perform the task due to charging, the state of the robot at this time is not available for calling. Note that the state of the robot may be determined according to the actual work scene, and the embodiment of the present application is not limited thereto.
[0021] S103, repeatedly perform the above operation for the remaining tasks in each original task queue.
[0022] Specifically, after the tasks to be distributed are transmitted to the robots to be scheduled, the remaining tasks in each original task queue can be repeatedly executed according to the above operations.
[0023] In another example, the scheduled robot can feedback a message to receive the task, indicating that the delivery of the task has been successful, but due to factors such as network delay, even if the scheduled robot can receive the task, there may be a delay in the feedback message. In addition, the scheduled robot may not be able to accept the task due to other reasons, and will not feedback a message to accept the task. Therefore, in the embodiment of the present application, in order to ensure the success rate of the task delivery, only when the scheduled robot receives a feedback message to receive the task, it is confirmed that the delivery of the task to be delivered is successful, and the task to be delivered is deleted from the original task queue to which it belongs, and if not, it is reserved in the original task queue to which it belongs, and its position in the original queue is reserved, so that it can be delivered in a timely manner when the scheduling policy is executed next time. Of course, other than the manner of deleting from the queue, the task that has already been assigned may be marked as already assigned in other manners to achieve the purpose of avoiding repeated assignment.
[0024] The scheduling policy is executed cyclically according to the above steps S101-S103, and if there are no tasks to be delivered in all the original task queues or there are no robots that can be scheduled, the execution can be stopped and a new task can be generated and then executed. For example, the scheduling policy can be executed at a certain time interval until the above stopping condition is met.
[0025] In another example, if there are three robots, A, B, and C, in one store, four tasks, A, B, C, and D, are started in order by different users. Here, A does not specify a robot and is a random robot task, B and C both specify robot B, D specifies robot C, and B, C, and D are all designated robot tasks. Then, A is in the random robot queue, B and C are in the designated robot queue of robot B, B is at the top, and D is in the designated robot queue of robot C. At this time, the number of tasks of robot A is 0, the number of tasks of robot B is 2, and the number of tasks of robot C is 1. When executing the scheduling policy, first, the task located at the top of each original task queue is obtained as the task to be distributed, that is, the tasks to be distributed include A, B, and D. Here, according to the generation order, first, an allocation is made for A, and since A is a random robot task and the current number of tasks of robot A is the smallest, robot A is the scheduled robot of A, and task A is sent to robot A. Next, an allocation is made for Task B, and since Task B specifies Robot B, if Robot B is currently in a state where it can be called, Task B is sent to Robot B. Finally, an allocation is made for Task D, and since Robot C is currently in a state where it can be called, Task D is sent to Robot C. At this time, all tasks currently targeted for distribution have already been distributed, and when Robots A, B, and C all feedback messages to receive tasks, Tasks A, B, and D are all deleted from the original queues to which they belong. Next, when the scheduling policy is executed, after the allocated tasks have been deleted, there is only one Task C in the task queue specified by Robot B in the original queue, so an allocation is made for Task C.Since Task C designates Robot B, if Robot B has already completed the previous Task B and reports that the status is available for invocation, then send Task C to Robot B, and after Robot B feeds back the received message, delete Task C from Robot B's designated robot queue; otherwise, since Task C indicates that it is not currently deliverable, it will not be deleted from Robot B's designated robot queue, and will continue to be delivered the next time the scheduling policy is executed. Naturally, in the above scheduling process, if any robot does not feed back a message that it has accepted the task after sending it, none of the corresponding tasks will be deleted from the original task queue to which it belongs, but will be reserved at its original position in the queue, and will be delivered the next time the scheduling policy is executed.
[0026] In the above example, if scheduling is performed according to the time fairness principle of the prior art, when a robot to be scheduled for task A is determined, it may be selected randomly, so robot B or robot C may be selected. If robot B is selected to execute task A, when task B is delivered, task B specifies robot B, and robot B is executing task A at this time, which takes time, so task B can only wait, and similarly task C, which specifies robot B, naturally needs to wait. At the same time, task D specifies robot C, but since tasks B and C have not yet been delivered, task D also has to wait in a jam. After robot C is selected to execute task A and task B is delivered to robot B, tasks C and D still need to wait. This greatly reduces the efficiency of task execution. According to the technical solution of the embodiment of the present application, not only is the current task number of each robot taken into consideration when allocating random tasks, but at the same time, all tasks specifying the same robot are placed in the same queue, and each time a scheduling policy is executed, one task located at the top of each queue is selected and scheduled as a task to be delivered, so the problem of robot scheduling conflicts and tasks waiting in a jam in vain in the prior art does not occur. In the above example, after sending task B to robot B, task D is sent to robot C without processing task C, so there is no congestion of task D and the efficiency of task execution is improved.
[0027] In the technical solution of the embodiment of the present application, a designated robot task queue corresponding to each robot is set, and a random robot task queue is set. When executing the scheduling policy, the task to be distributed located at the top of each task queue is obtained, and then these tasks to be distributed are scheduled according to the order in which they were generated, and a scheduled robot corresponding to each task to be distributed is determined based on the task type, the number of tasks of each robot, and the status. Next, the task to be distributed accepted by the scheduled robot can be deleted from the original task queue to which it belongs, and then the above scheduling policy is repeatedly executed for the remaining tasks in each original task queue until there are no remaining tasks or no schedulable robots. In this way, since the scheduling policy is scheduled for the random tasks or the designated tasks of each robot every time it is executed, the problem of all the subsequent tasks being congested and waiting due to the collision between the preceding task and the subsequent task in the problem of assigning a robot in the process of scheduling according to the time fairness principle in the prior art is avoided, and the scheduling efficiency and utilization rate of the robots are improved.
[0028] Preferably, in another example, before determining the robot to be scheduled, the status of the current task to be delivered is checked to determine whether the status of the current task to be delivered is canceled. If it is canceled, there is no need to continue to determine the robot to be executed, and it can be directly deleted from the original task queue and the task to be delivered queue. Also, only when a task acceptance message is received from the robot after each task is sent, it indicates that the task allocation is successful, and the status of the task is accepted and can be deleted from the original task queue and the task to be delivered queue; otherwise, the task is reserved in the original task queue. By verifying the status of the current task to be delivered queue, it is possible to avoid repeatedly delivering a task that has been successfully delivered, and also to avoid the waste of robot resources caused by delivering a task that has been canceled by the user, which further improves the accuracy of task delivery and improves the efficiency of robot scheduling.
[0029] In another example, the method may further include measuring time in the process of determining a scheduled robot for each task to be delivered, and obtaining a scheduling time. The scheduling time is used to delete the current task to be delivered from the original task queue and the task to be delivered queue to which it belongs, if the scheduling time of the current task to be delivered exceeds a preset threshold before determining the robot to be scheduled. That is, the method may measure time in the process of executing the scheduling policy for each task to be delivered. For example, the method may start measuring time at the time when one task to be delivered is determined as the current task to be delivered, and stop measuring time at the time when the task to be delivered is determined to be accepted by the robot to be scheduled, to obtain the scheduling time. If one task to be delivered has not yet been deleted from the original task queue due to reasons such as not receiving a feedback message of acceptance from the robot, when the task becomes the current task to be delivered again, the scheduling time of the task is determined. If the scheduling time has timed out, the task is considered to have failed, and can be deleted from the original task queue to which it belongs, and if the scheduling time has not timed out, the delivery of the task can be continued. At the same time, if the task is not deleted from the original task queue after the timing starts, the timing continues until the scheduling time exceeds a preset threshold or the task is completed and deleted from the original task queue. It can be seen that the unlimited existence of an uncompleted task in the scheduling policy loop not only affects the smooth completion of the task, but also reduces the utilization rate of the robot, and the embodiment of the present application can effectively prevent this problem by monitoring whether the scheduling time has timed out. Example 2
[0030] 2 is a flowchart of a method for determining a robot to be scheduled in a robot scheduling method according to a second embodiment of the present application, which further optimizes the flow of the method for determining a robot to be scheduled based on the above embodiment, i.e., S102 in the above embodiment. As shown in FIG. 2, the method includes the following steps:
[0031] S201: sorting a plurality of tasks to be delivered according to the generated order, and forming a delivery target task queue.
[0032] That is, after determining a plurality of tasks to be delivered, these tasks to be delivered can be sorted again according to the order in which they were generated, and a delivery target task queue can be formed according to the sorted tasks to be delivered.
[0033] S202: The delivery target task located at the top of the delivery target task queue is acquired as the current delivery target task.
[0034] S203: determining a robot to be scheduled for the current task to be distributed based on the type of the current task to be distributed and the number and state of each robot, and distributing the current task to be distributed to the robot to be scheduled.
[0035] S204: Determine whether the current delivery target task queue is empty. If not empty, repeat S202 for the remaining delivery target tasks in the delivery target task queue until the delivery target task queue is empty.
[0036] It can be seen that it is determined whether the current to-be-delivered task queue is empty, and if so, this indicates that all tasks in the current to-be-delivered task queue have been processed.
[0037] Executing the scheduling policy once means distributing each target task in the current target task queue and determining a scheduled robot corresponding to each target task. This process is also a cyclic process, that is, each task in the target task queue is distributed in the order in which it was generated until the target task queue is empty.
[0038] In addition, after the current task to be distributed is distributed to the scheduled robot, the current task to be distributed may be deleted from the task queue to be distributed, but the current task to be distributed is still in the original task queue to which it belongs, and the task to be distributed is deleted from the original task queue until the robot that executes the task to be distributed returns a message that the task has been accepted.
[0039] The technical solution of the embodiment of the present application organizes the tasks to be distributed into a task queue to be distributed, and determines and distributes the robots to be scheduled for the tasks in the task queue to be distributed according to the generated order, thereby ensuring the time fairness of each task in the task queue to be distributed. At the same time, for a task that has not been confirmed as being accepted by a robot, it is only deleted from the current task queue to be distributed, and not deleted from the original queue to which it belongs, so that the task will appear again in a new task queue to be distributed before being accepted by the robot, thereby ensuring that each task is distributed to and executed by the robot, and improving the success rate of task execution. Example 3
[0040] 3 is a flowchart of a robot scheduling method according to a third embodiment of the present application when the task to be delivered is a random robot task. This embodiment is further optimized based on the above embodiment. As shown in FIG. 3, the method includes the following steps:
[0041] S301: sorting a plurality of tasks to be delivered according to the order in which they were generated, and forming a queue of tasks to be delivered.
[0042] S302: The delivery target task located at the top of the delivery target task queue is acquired as the current delivery target task.
[0043] S303: determine the type of the currently targeted task to be distributed, and if the currently targeted task to be distributed is a random robot task, execute S304.
[0044] S304, determining a plurality of currently schedulable robots based on the state of each robot, and obtaining the number of tasks in the designated robot task queue corresponding to each currently schedulable robot.
[0045] Specifically, the currently schedulable robots can be obtained based on the current states of all robots, and the corresponding number of tasks in the designated robot task queue can be obtained.
[0046] For example, first, robots in a call-prohibited state can be removed from the robots whose current network is online, and then robots that have been called and refuse to accept a task can be removed. At this time, if there are no robots remaining after the removal, it is possible to determine that the task has failed, notify the caller that the task delivery has failed, and delete the currently targeted task from the original queue to which it belongs. If there are still remaining robots after the removal, it is possible to remove robots that cannot be called temporarily from among them, and if there are no remaining robots after the removal, it is possible to indicate that the currently targeted task cannot be delivered temporarily, wait for the next scheduling, and delete the currently targeted task from the currently targeted task queue to which it belongs, but still hold it in the original task queue to which it belongs. If there are still remaining robots after the above removal operation, it is possible to determine the remaining robot as a currently schedulable robot. By performing the above removal operation to deliver a task to a currently schedulable robot, it is possible to further improve the success rate of task delivery and improve the scheduling efficiency of the robot.
[0047] S305: It is determined whether the current task to be distributed has been distributed to any target robot among a plurality of robots that can currently be scheduled. If it is determined as YES, S306 is executed and then S308 is executed. If it is determined as NO, S307 is executed and then S308 is executed.
[0048] S306: The target robot is set as a robot to be scheduled for the current task to be distributed.
[0049] S307: A currently schedulable robot having the smallest number of tasks is selected as a robot to be scheduled for the currently distributed task.
[0050] S308: The current task to be distributed is transmitted to the robot to be scheduled.
[0051] Specifically, after a task is sent, it is deleted from the original task queue to which it belongs only if the robot receives a message indicating acceptance, which is not necessarily received immediately. Therefore, every time the scheduling policy is executed, the currently targeted task has already been sent. Therefore, when it is confirmed that the currently targeted task has been sent to any target robot among the currently schedulable robots, it is possible that the task has not been successfully delivered or that the target robot has not accepted it. Therefore, it is necessary to deliver the currently targeted task to the target robot again. In this way, it is possible to avoid duplicate processing of tasks by sending the same task to different robots, which is advantageous to improving the scheduling efficiency of the robots.
[0052] However, it is necessary to further explain that if the current target task has been sent once, but the sent robot is not within the range of the currently schedulable robot, it indicates that the sent robot has not received the task for some reason and the robot is currently not schedulable. In this case, there is no need to send it to the robot again, and S307 is executed to determine the robot to be scheduled for it, just as in the case where the current target task has not been sent. Specifically, the currently schedulable robot with the smallest number of tasks can be selected as the robot to be scheduled for the current target task. For a random robot task, by selecting and executing the robot with the smallest number of tasks currently to be processed, the possibility of congestion waiting for subsequent tasks can be reduced to the maximum extent, and the efficiency of task processing and the utilization rate of the robot can be improved.
[0053] In addition, in another example, the above S306 is determining whether a robot lock can be successfully acquired on the target robot; If the answer is YES, lock the target robot and set the target robot as a scheduled robot for the current task to be distributed again. If the result is NO, an indication that the current task to be delivered has been sent may be included.
[0054] In one example, in order to avoid sending multiple different tasks to the same robot at the same time and to avoid the robot being affected by other remote requests when scheduling the robot, the robot can be locked before sending a task to the robot and a lock time length, for example, 6S, can be set. During the time after locking, the robot will not receive other tasks or commands. If a robot is not locked, the robot lock can be successfully acquired. Therefore, in the above operation, if the robot lock of the target robot is successfully acquired, it indicates that the target robot is not scheduled, the target robot can be locked, and the target robot can again be the scheduled robot of the currently targeted task to be delivered, and the currently targeted task to be delivered can be sent to the target robot. Conversely, if the robot lock cannot be successfully acquired, it indicates that a task has been sent to the target robot and the target robot is still in a locked state. In this case, the currently targeted task to be delivered can then be removed from the currently targeted task to be delivered queue to wait for the next scheduling.
[0055] Correspondingly, S307 above states: Sorting the multiple currently schedulable robots in ascending order of task count; acquiring a robot lock for each currently schedulable robot in sequence according to the sorted order; The method may include adding a robot lock to a currently schedulable robot that first successfully acquires the robot lock, and making the robot a scheduled robot for the currently distributed task.
[0056] Here, since the robot with the fewest number of tasks will not necessarily be successful in acquiring the lock, attempts are made to acquire the robot lock for the sorted multiple currently schedulable robots in sequence, and whichever robot is able to acquire the lock first can be selected as the robot to be scheduled.
[0057] S309: A scheduling success mark is set for the current task to be distributed.
[0058] S310, obtain the next task of the current delivery target task from the random robot task queue, and put it into the delivery target task queue to obtain the current delivery target task queue.
[0059] S311: The current task queue to be distributed is sorted again.
[0060] In step S312, the process returns to step S302 for the remaining tasks to be delivered in the re-sorted task queue to be delivered.
[0061] Preferably, before returning to execute S302, it may be determined whether the newly sorted delivery target task queue is empty, and if so, there is no need to return to execute S302. Alternatively, before executing S310, it may be determined whether the random robot task queue is empty, and if it is determined that the random robot task queue is empty, there is no need to execute S310-S312.
[0062] Specifically, in the process of executing the scheduling policy for the random robot task, after sending the current target task to the scheduled robot, execute S309-S311. If any target task queue is marked as successful in scheduling, the task is deleted from the target task queue, and then the next task is obtained from the random robot task queue, and a new target task queue is formed together with other target tasks, and each task in the new target task queue is re-sorted, and the new target task queue is returned to execute S302, and robot scheduling is performed again until the tasks in the queue are empty, and the scheduling policy of the current period is completed. The purpose of doing so is that for the random robot task, after the current task is distributed, there may be a robot that can be randomly assigned to the next random robot task in the random robot task queue, and if the next random robot task is not placed in the target task queue, it will affect the execution of the task. Therefore, in order to improve the efficiency of task execution, the next task in the random robot task queue can also be placed in the current target task queue, and re-sorted and scheduled.
[0063] In the technical proposal of the embodiments of the present application, for a random robot task, a robot that can currently be called and has the fewest number of tasks is selected and scheduled to ensure the success rate of task distribution, reduce the possibility of congestion for subsequent tasks, and improve the utilization rate of the robot. Example 4
[0064] 4 is a flowchart of a robot scheduling method in the fourth embodiment of the present application when the task to be delivered is a designated robot task. This embodiment is further optimized based on the above embodiment. As shown in FIG. 4, the method includes the following steps:
[0065] S401: A plurality of tasks to be delivered are sorted according to the order in which they were generated, and a delivery target task queue is constructed.
[0066] In step S402, the delivery target task located at the top of the delivery target task queue is acquired as the current delivery target task.
[0067] In step S403, the type of the current task to be distributed is determined, and if it is a designated robot task, step S404 is executed.
[0068] In S404, it is determined whether or not the designated robot corresponding to the current distribution target task is currently schedulable. If it is determined as YES, S405 is executed, and if it is determined as NO, S406 is executed.
[0069] For example, if the reporting state of a robot specified in the current to-be-delivered task is invokable, it is considered currently schedulable.
[0070] In S405, it is determined whether or not the robot lock of the designated robot can be successfully acquired. If the determination is YES, S407 is executed, and if the determination is NO, S410 is executed.
[0071] S407: The designated robot is locked, and the designated robot is set as the robot to be scheduled for the current task to be distributed.
[0072] S408: The current task to be distributed is transmitted to the robot to be scheduled.
[0073] S410, the current task to be distributed is deleted from the task to be distributed queue.
[0074] The purpose of locking the robot is the same as in the above embodiment, and so a detailed explanation is omitted here.
[0075] S411: Determine whether the current task queue to be delivered is empty. If NO, this indicates that there are tasks that have not yet been delivered, and then return to the execution of S402 to continue executing the current scheduling policy; if not, end the current scheduling policy.
[0076] In the above S404, it is determined whether or not the designated robot is currently schedulable, and if it is determined that the designated robot is not schedulable, the process continues to execute S406.
[0077] In S406, it is determined whether or not the designated robot is temporarily unschedulable. If the determination is YES, S410 is executed. If the determination is NO, S409 is executed, and then S410 is executed.
[0078] S409: The current task to be distributed is deleted from the original task queue to which it belongs.
[0079] Some unschedulable robots may be temporarily unschedulable due to temporary problems, and may then recover to a schedulable state, and may succeed the next time they try to deliver the task again. Therefore, if a designated robot is temporarily unschedulable, the currently delivered task can be removed from the currently delivered task queue and wait to assign the designated robot again. If the designated robot is not temporarily unschedulable, it can indicate that the designated robot is indeed unschedulable, and the currently delivered task can be directly removed from the original task queue to which it belongs, and the task delivery can be determined to have failed, and the task caller can be notified.
[0080] In the technical solution of the embodiment of the present application, after it is determined that a designated robot is currently schedulable, the designated robot task is sent to the robot, and the success rate of the task transmission is guaranteed. Example 5
[0081] FIG. 5 is a flowchart of a robot scheduling method according to a fifth embodiment of the present application.
[0082] As shown in the figure, a scheduling policy is triggered every 3 seconds by a task scheduling timer (S1). Based on the robots available in the store, a designated robot task queue SSR corresponding to each robot is set, and a random robot task queue SSS is set (S2). Tasks generated in real time are placed in the corresponding queues according to their types. Next, the top tasks are obtained from the SSR and SSS queues, respectively, and sorted according to the time when each task was generated, to form a task queue SS to be distributed (S3). It is also possible to obtain a current robot list RL corresponding to the store (S4).
[0083] It is a cyclic process in which scheduling is performed on the delivery target task queue every time a scheduling policy is executed. First, the top task is obtained from SS as the current delivery target task (S5). Next, the state of the task is determined (S6). If the task is canceled or accepted, it is deleted from the SSR or SSS queue (S7). At this time, it is determined whether the delivery target task queue is empty (S37). If there is a task that has not yet been delivered in the delivery target task queue, the current delivery target task is deleted from SS (S51), and the process returns to the step of obtaining the top task from SS, i.e., S5. If the current delivery target task is not canceled or accepted, it is determined whether its scheduling time has timed out (S8). If the time has passed, it is determined that the task allocation has failed (S9), and it is deleted from the original queue (i.e., SSR or SSS) to which it belongs (S10), and it is determined whether the delivery target task queue is empty (S37). If the time has not passed, the task continues to be assigned and it is determined whether the task is a random robot task (S11).
[0084] If the current task to be distributed is a random robot task, first remove robots that are prohibited from being called from the RL list (S12), then remove robots with call history and refusal (S13). If the RL list is empty at this time (S14), it is determined that the task allocation has failed (S15) and the task is removed from the original SSS queue to which it belongs (S16). If the RL list is not empty, it marks the start of scheduling and starts timing (S17). Then, the robots that cannot be called are removed (S18). If the RL list is empty at this time (S19), it waits for the next time the current task to be distributed is scheduled (S21). If it is not empty, it determines the robot to be executed for the task. Specifically, first, determine whether the currently targeted task has been assigned to a robot before and the robot is still in the current RL list (S20); if so, determine whether the robot lock has been successfully acquired (S22); if successful, lock the robot in 6S (S24), re-distribute the currently targeted task to the robot (S27), and at the same time, mark the currently targeted task as a successful schedule (S29); if the robot lock has not been successfully acquired, indicate that the robot has once delivered the task in 6S, and may wait for the next scheduling (S25); If the currently targeted task has not been distributed to a robot, or has been distributed but the robot is not in the current RL list, sort the remaining robots in ascending order of SSR queue length (S23), i.e., sort according to the number of designated robot tasks corresponding to each robot, and acquire a robot lock for each robot after sorting (S26), determine whether the robot lock acquisition is successful (S28), determine the first robot that successfully acquires the lock as the current robot, lock the robot (S30), and distribute the task to the robot (S32). After the task is distributed to the robot, the task can be marked as successfully scheduled (S33).In addition, in the process of delivering the random robot task, it is determined whether the scheduling of the random robot task has been marked as successful (S34). If it is successful, the next task is obtained from the SSS (S35), put into the SS, and the current SS is re-sorted (S36). Then, the current scheduling policy is continued to be executed on the new SS queue after sorting.
[0085] If the current task to be distributed is a designated robot task, first, determine whether the current task is marked on the designated robot (S38), and if YES, wait for the next scheduling (S39), and if NO, mark the start of scheduling and start timing (S40). Then, determine whether the state of the designated robot is callable (S41), and if it is not callable, continue to determine whether it is temporarily not callable (S43). If it is determined that the state of the designated robot is callable, the designated robot is set as the robot to be scheduled (execute S42, S49, S50, and S46), and if the state of the designated robot is temporarily not callable, wait for the next scheduling (S44), and if it is not temporarily not callable, indicate that the robot state is call-prohibited (S45), in which case, mark the task as failed, notify the caller (S47), and remove the task from the original SSR queue (S48). Then, if the distribution target task queue SS is not empty, continue to execute the step of removing the current distribution target task from the SS queue, and continue to execute the current scheduling policy.
[0086] If the SS queue is empty, the execution of the current scheduling policy is completed, and the process may wait for the next scheduling policy to be started in the next execution cycle.
[0087] In the technical solution of the embodiment of the present application, a designated robot task queue corresponding to each robot is set, and a random robot task queue is set. When executing the scheduling policy, the task to be distributed located at the top of each task queue is obtained, and then these tasks to be distributed are scheduled in sequence according to the order in which they were generated, and a scheduled robot corresponding to each task to be distributed is determined based on the task type, the number of tasks of each robot, and the status. Next, the task to be distributed accepted by the scheduled robot can be deleted from the original task queue to which it belongs, and the above scheduling policy is repeatedly executed for each original task queue after the deletion until there are no tasks to be distributed or no robots that can be scheduled. In this way, the scheduling policy is scheduled for the random robot task or the designated robot task every time the scheduling policy is executed, so that the problem of all subsequent tasks being jammed due to the collision between the preceding task and the subsequent task in the problem of assigning a robot in the process of scheduling according to the time fairness principle in the prior art is avoided, and the scheduling efficiency and utilization rate of the robot are improved. Example 6
[0088] FIG. 6 is a structural schematic diagram of a robot scheduling device according to a sixth embodiment of the present application. This embodiment can be applied, for example, to a case where a robot in the same store is assigned to handle a task triggered by a user. The device can realize the robot scheduling method described in any of the embodiments of the present application. As shown in FIG. 6, the device specifically: a delivery target task acquisition module configured to acquire a plurality of delivery target tasks, where the plurality of delivery target tasks include a plurality of tasks located at the head of a queue in a plurality of original task queues, the plurality of original task queues including a random robot task queue sorted from the head of the queue to the tail of the queue according to the order in which they were generated, and at least two designated robot task queues corresponding to at least two robots among the plurality of robots, the tasks in each original task queue being sorted from the head of the queue to the tail of the queue according to the order in which they were generated, and the types of the plurality of delivery target tasks include a random robot task and a designated robot task; A robot scheduling module that determines a robot to be scheduled for each task to be delivered according to the generated order based on the type of each task to be delivered, the number of tasks of each robot, and a state of each robot, and transmits the task to be delivered to the robot to be scheduled; and a cyclic execution module that repeatedly executes the above operations on the remaining tasks in each original task queue.
[0089] Preferably, the robot scheduling module 602 is a delivery target task queue configuration unit that sorts a plurality of delivery target tasks according to the order in which the tasks are generated and configures a delivery target task queue; a top task acquisition unit that acquires a top target task from the issue target task queue as a current target task; A scheduling target robot determination unit that determines a scheduling target robot for a current delivery target task based on a type of a current delivery target task, the number of tasks of each robot, and a state of the robot, and delivers the current delivery target task to the scheduling target robot; and a cyclic execution unit that repeatedly executes an operation of acquiring a delivery target task located at the top of the delivery target task queue as a current delivery target task from the delivery target task queue for the remaining delivery target tasks in the delivery target task queue until the delivery target task queue becomes empty.
[0090] Preferably, the scheduling target robot determination unit is a schedulable robot acquisition subunit for determining a plurality of currently schedulable robots based on a state of each robot, and acquiring a number of tasks in a designated robot task queue corresponding to each currently schedulable robot; and a scheduling target robot determination subunit for selecting a currently schedulable robot having the smallest number of tasks as a scheduling target robot for the currently distributed task.
[0091] Preferably, the scheduling target robot determination subunit specifically includes: Sort the robots that can currently be scheduled according to the number of tasks, starting with the smallest. Acquire a robot lock for each currently schedulable robot in turn according to the sorted order; A robot lock is added to the currently schedulable robot that first succeeds in acquiring a robot lock, and the robot is made the scheduled robot for the currently distributed task.
[0092] Preferably, the scheduling target robot determination unit further includes a judgment processing subunit, specifically, determining whether the currently targeted task has been distributed to any of the plurality of currently schedulable robots; If the answer is YES, the target robot is again set as the scheduled robot for the current task to be delivered. If the result is NO, an operation is executed to select the currently schedulable robot having the smallest number of tasks as the robot to be scheduled for the task to be currently distributed.
[0093] Preferably, when the judgment processing unit executes an operation to set the target robot as a scheduled robot of the current delivery target task, specifically, determining whether a robot lock can be successfully obtained on the target robot; If the result is YES, the target robot is locked and the target robot is set as a scheduled robot for the current task to be delivered. If the result is NO, it indicates that the current task to be delivered has been delivered.
[0094] Preferably, the scheduling target robot determination unit further includes a scheduling mark processing subunit, and when the type of the current delivery target task is a random robot task, and the current delivery target task has been delivered to the scheduling target robot, the scheduling mark processing subunit specifically comprises: Mark the current delivery task as successful, Get the next task after the current target task from the random robot task queue, put it in the target task queue, and get the current target task queue; The current delivery target task queue is sorted again, and for the remaining delivery target tasks in the resorted delivery target task queue, an operation is executed to obtain the task located at the top of the delivery target task queue and set it as the current delivery target task.
[0095] Preferably, the scheduling target robot determination unit further includes a designated robot task first processing subunit. When the type of the current delivery target task is a designated robot task, the designated robot task first processing subunit specifically: responsive to the designated robot corresponding to the designated robot task being currently available for scheduling, determining whether a robot lock can be successfully acquired for the designated robot; If the answer is YES, the specified robot is locked and the specified robot is set as the scheduled robot for the current task to be distributed. If the result is NO, the operation of deleting the current task to be distributed from the task queue to be distributed is directly executed.
[0096] Preferably, the scheduling target robot determination unit further includes a designated robot task second processing subunit. When the type of the current delivery target task is a designated robot task, the designated robot task second processing subunit specifically: determining whether the designated robot corresponding to the designated robot task is temporarily unschedulable in response to the designated robot being currently unschedulable; If the answer is YES, the above operation is performed directly to delete the current task to be distributed from the task to be distributed queue, If the result is NO, the currently targeted task for distribution is deleted from the original task queue to which it belongs, and then the above operation of deleting the currently targeted task for distribution from the target task queue is executed.
[0097] Preferably, the robot scheduling module 602 further includes a status check unit, and the status check unit specifically includes: Before determining the robot to be scheduled, if the state of the current task to be distributed is accepted or canceled, the current task to be distributed is deleted from the original task queue to which it belongs, and the process proceeds to execute an operation to delete the current task to be distributed from the task to be distributed queue.
[0098] Preferably, the robot scheduling module 602 further includes a scheduling timekeeping unit, the scheduling timekeeping unit being configured to: In the process of determining a robot to be scheduled for the current task to be delivered, a time is measured to obtain a scheduling time. Here, the scheduling time is used to delete the current task to be delivered from the original task queue to which it belongs and then from the task to be delivered queue if the scheduling time of the current task to be delivered exceeds a preset threshold before the robot to be scheduled is determined.
[0099] The robot scheduling apparatus according to the embodiments of the present application can execute the robot scheduling method according to any embodiment of the present application, and includes functional modules and beneficial effects corresponding to the execution of the method. Example 7
[0100] Fig. 7 is a structural schematic diagram of an electronic device according to a seventh embodiment of the present application. Fig. 7 shows a block diagram of an exemplary electronic device 712 for implementing the embodiment of the present application. The electronic device 712 shown in Fig. 7 is merely an example and does not limit the function and scope of use of the embodiment of the present application.
[0101] 7, electronic device 712 is represented in the form of a general-purpose computing device. Components of electronic device 712 may include, but are not limited to, one or more processors or processing units 716, a memory 728, and a bus 718 connecting different system components (including memory 728 and processing unit 716).
[0102] Bus 718 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a number of bus structures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a MicroChannel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0103] Electronic device 712 typically includes several types of computer system readable media, which may be any available media that can be accessed by electronic device 712, including volatile and nonvolatile media, removable and non-removable media.
[0104] The memory 728 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 730 and / or a cache memory 732. The electronic device 712 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 734 may be used to read and write a non-removable, non-volatile magnetic medium (not shown in FIG. 7, but commonly referred to as a "hard disk drive"). Although not shown in FIG. 7, a magnetic disk drive may be provided for reading and writing a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive may be provided for reading and writing a removable, non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media). In these cases, each drive may be connected to the bus 718 via one or more data media interfaces. The memory 728 may store at least one program or program product having a set (e.g., at least one) of program modules configured to perform the functions of each embodiment of the present application.
[0105] A program / utility tool 740 having a set (at least one) of program modules 742 may be stored, for example, in memory 728, including, but not limited to, an operating system, one or more application programs, other program modules, and program data, any or some combination of which may include implementing a network environment. The program modules 742 generally implement the functions and / or methods of the embodiments described herein.
[0106] The electronic device 712 may communicate with one or more external devices 714 (e.g., keyboard, pointing device, display 724, etc.), one or more devices that allow a user to interact with the electronic device 712, and / or any device (e.g., network card, modem, etc.) that allows the electronic device 712 to communicate with one or more other computing devices. This communication may occur through an input / output interface 722. The electronic device 712 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 720. As shown, the network adapter 720 communicates with other modules of the electronic device 712 through a bus 718. It is noted that, although not shown, other hardware and / or software modules may be used in combination with the electronic device 712, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drivers, and data backup storage systems.
[0107] The processing unit 716 executes programs stored in the memory 728 to execute various functional applications and data processing, for example, to realize the robot scheduling method according to the embodiment of the present application. Example 8
[0108] Example 8 of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, realizes the robot scheduling method according to the example of the present application.
[0109] The computer storage medium of the embodiments of the present application may employ any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this specification, a computer readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0110] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0111] The program code contained in the computer readable medium may be transmitted over any suitable medium, including but not limited to wireless, wire, optical cable, RF, or the like, or any suitable combination thereof.
[0112] Computer program code for carrying out the operations of the present application may be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and the like, and further including conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computer, partially on the user computer, as a separate software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).
[0113] It should be noted that the above is only the preferred embodiment and the technical principle applied in the present application. As can be understood by those skilled in the art, the present application is not limited to the specific embodiment described herein, and various obvious modifications, adjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in detail by the above embodiment, the present application is not limited to the above embodiment, and may include many other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the appended claims.
Claims
1. 1. A robot scheduling method, comprising: Obtaining a plurality of tasks to be delivered, where the plurality of tasks to be delivered includes a plurality of tasks located at the head of a queue in a plurality of original task queues, the plurality of original task queues including a random robot task queue sorted from the head of the queue to the tail of the queue according to the order in which the tasks were generated, and at least two designated robot task queues corresponding to at least two robots among the plurality of robots, and the types of the plurality of tasks to be delivered include a random robot task and a designated robot task; Determining a robot to be scheduled for each task to be delivered according to the generated order based on the type of each task to be delivered, the number of tasks of each robot, and a state of each robot, and delivering the task to be delivered to the robot to be scheduled; repeatedly performing the above operations for the remaining tasks in each original task queue; and A robot scheduling method comprising:
2. Determining a scheduled robot for each task to be delivered in accordance with the generated order based on the type of each task to be delivered, the number of tasks of each robot, and a state of each robot, and delivering the task to be delivered to the scheduled robot; Sorting the plurality of tasks to be delivered according to the order in which they were generated, and configuring a queue of tasks to be delivered; Obtaining a delivery target task located at the top of the delivery target task queue as a current delivery target task; Determining a robot to be scheduled for the current task to be delivered based on a type of the current task to be delivered and the number of tasks and a state of each robot, and delivering the current task to be delivered to the robot to be scheduled; For the remaining tasks to be delivered in the delivery target task queue, repeatedly execute an operation of acquiring a delivery target task located at the head of the delivery target task queue from the delivery target task queue as a current delivery target task until the delivery target task queue becomes empty; The method of claim 1, further comprising:
3. The type of the current delivery target task is a random robot task, and determining a scheduled robot for the current delivery target task includes: determining a number of currently schedulable robots based on a state of each robot, and obtaining a number of tasks in a designated robot task queue corresponding to each currently schedulable robot; selecting a currently schedulable robot with the smallest number of tasks as a robot to be scheduled for the currently delivered task; The method of claim 2, further comprising:
4. The selection of the currently schedulable robot having the smallest number of tasks as a robot to be scheduled for the currently delivered task includes: sorting the plurality of currently schedulable robots according to the ascending order of task numbers; acquiring a robot lock for each currently schedulable robot in sequence according to the sorted order; adding a robot lock to the currently schedulable robot that first successfully acquires the robot lock, and making it the scheduled robot for the currently distributed task; 4. The method of claim 3, further comprising:
5. The type of the current delivery target task is a random robot task, and determining a scheduled robot for the current delivery target task includes: determining whether the currently delivered task has been delivered to any target robot among the plurality of currently schedulable robots; If the answer is YES, the target robot is again set as a scheduled robot for the current task to be delivered; If the determination is NO, the operation of selecting a currently schedulable robot having the smallest number of tasks as a robot to be scheduled for the currently distributed task is executed; 4. The method of claim 3, further comprising:
6. The step of again setting the target robot as a scheduled robot for the current task to be delivered is determining whether a robot lock on the target robot can be successfully acquired; If the answer is YES, lock the target robot and set the target robot as a scheduled robot for the current task to be delivered again; if the determination is NO, indicating that the current task to be delivered has been delivered; The method of claim 5, further comprising:
7. The type of the current task to be delivered is a random robot task, and the current task to be delivered has already been delivered to the scheduled robot, and determining the scheduled robot for the task to be delivered includes: setting a scheduling success mark for the current task to be delivered; obtaining a next task of the current task to be delivered from the random robot task queue and putting the next task into the task to be delivered queue to obtain a current task to be delivered queue; Sorting the current delivery target task queue again, and for the remaining delivery target tasks in the re-sorted delivery target task queue, acquiring the delivery target task located at the top of the queue from the delivery target task queue as the current delivery target task; The method of claim 2, further comprising:
8. The type of the current task to be delivered is a designated robot task, and determining a robot to be scheduled for the current task to be delivered includes: determining whether a robot lock can be successfully acquired for a designated robot corresponding to the designated robot task in response to the designated robot being currently schedulable; If the answer is YES, locking the designated robot and setting the designated robot as a scheduled robot for the current task to be delivered; if the determination is NO, removing the current task to be delivered from the task to be delivered queue; The method of claim 2, further comprising:
9. The type of the current task to be delivered is a designated robot task, and determining a robot to be scheduled for the current task to be delivered includes: In response to a designated robot corresponding to the designated robot task being currently unschedulable, determining whether the designated robot is temporarily unschedulable; If the answer is YES, removing the current task to be delivered from the task to be delivered queue; if it is determined that the task is not currently being delivered, deleting the task from the original task queue to which it belongs, and then deleting the task from the task queue to be delivered; The method of claim 8, further comprising:
10. The step of determining a robot to be scheduled for the task to be delivered includes: If the state of the current task to be delivered is accepted or cancelled, removing the current task to be delivered from its original task queue and from the task to be delivered queue; The method of claim 2, further comprising:
11. The step of determining a robot to be scheduled for each of the tasks to be delivered includes: measuring a time in the process of determining a robot to be scheduled for the current task to be delivered, and obtaining a scheduling time; Wherein, the scheduling time is used to delete the current task to be delivered from the original task queue to which it belongs and to further delete the current task to be delivered from the delivery target task queue when the scheduling time of the current task to be delivered exceeds a preset threshold before the robot to be scheduled is determined; The method of claim 2, further comprising:
12. A robot scheduling device, comprising: a delivery target task acquisition module configured to acquire a plurality of delivery target tasks, where the plurality of delivery target tasks include a plurality of tasks located at the head of a queue in a plurality of original task queues, the plurality of original task queues including a random robot task queue sorted from the head of the queue to the tail of the queue according to a generated order, and at least two designated robot task queues corresponding to at least two robots among the plurality of robots, and the types of the plurality of delivery target tasks include a random robot task and a designated robot task; A robot scheduling module that determines a robot to be scheduled for each task to be delivered according to the generated order based on the type of each task to be delivered, the number of tasks of each robot, and a state of each robot, and delivers the task to be delivered to the robot to be scheduled; a cyclic execution module that repeatedly executes the above operations on the remaining tasks in each original task queue; A robot scheduling device comprising:
13. An electronic device, one or more processors; a memory for storing one or more programs; The one or more programs, when executed by the one or more processors, cause the one or more processors to implement a robot scheduling method according to any one of claims 1 to 11.
1. An electronic device comprising:
14. A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to realize the robot scheduling method according to any one of claims 1 to 11. A computer-readable storage medium comprising:
Citation Information
Patent Citations
Integrated computer control program, recording medium for recording its program and integrated system
JP2005327007A
Scheduling program for job execution, scheduling method for job execution, scheduling apparatus for job execution
JP2008090507A
Multi-tool scheduling for cooperative manufacturing
US20180200965A1
