Task execution method and device, robot and storage medium
By recording interrupt information when the robot executes a high-priority task and continuing to execute the original task after the task is completed, the traditional scheduling solution fails when multi-task priority conflict is solved, and the flexibility and efficiency of task execution are achieved .
Patent Information
- Application Number
- CN202310946796.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional robot scheduling solutions are difficult to effectively handle multitasking situations, especially when priority conflicts exist between different tasks, resulting in failure of task execution or degradation of quality.
By recording the interrupt information of the original task when executing high-priority tasks and continuing to execute the original task after the high-priority tasks are completed, flexible switching and priority management of tasks are achieved.
It improves the flexibility and efficiency of task execution, can effectively meet the execution needs of tasks of different priority levels, and ensures the continuity and quality of tasks.
Smart Images

Figure CN119427336A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of robot control, and in particular to a task execution method, device, robot and storage medium. Background Art
[0002] Split robots are increasingly developing in the direction of intelligent automation. The robot chassis carries multiple functions such as robot positioning, navigation, movement, and obstacle avoidance, while the cabin above the chassis can be used to perform tasks such as storing items, transporting items, cleaning, inspections, or interacting with users. When a robot supports the execution of multiple tasks, different tasks may conflict, causing the task being executed to fail. For example, a cleaning robot based on a split robot may encounter higher-value tasks that require the chassis to be requisitioned during the cleaning process. After completing the high-value task, it cannot continue to complete the cleaning, affecting the quality of the cleaning task. Traditional scheduling schemes usually require manual intervention or restarting the robot when a fault occurs or the battery is low, but for multi-tasking situations, they cannot meet the execution requirements of tasks of different priorities. Summary of the invention
[0003] The present invention provides a task execution method, device, robot and storage medium to improve the flexibility of task execution and meet the execution requirements of tasks of different priorities.
[0004] In a first aspect, an embodiment of the present invention provides a task execution method, including:
[0005] During the execution of the first task, if the second task is triggered and the priority of the second task is higher than the priority of the first task, recording the interruption information of the first task;
[0006] performing the second task;
[0007] After the second task is completed, the first task is continued to be executed according to the interruption information.
[0008] Optionally, if the priority of the second task is lower than the priority of the first task, the second task is executed after the first task is completed.
[0009] Optionally, before executing the second task, the method further includes: moving to a designated location and equipping a robot cabin corresponding to the second task.
[0010] Optionally, the interruption information includes at least one of the following: robot position information; timing information of the first task; progress information of the first task, and cabin information corresponding to the first task.
[0011] Optionally, the interruption information includes cabin information corresponding to the first task;
[0012] Continuing to execute the first task according to the interruption information includes:
[0013] According to the cabin information corresponding to the first task, the robot cabin is moved to the designated location and equipped with the robot cabin corresponding to the first task, and the first task is continued to be executed.
[0014] Optionally, the interruption information includes timing information of the first task;
[0015] Continuing to execute the first task according to the interruption information includes:
[0016] If the first task is a scheduled task, the first task is continuously executed within an executable time period corresponding to the timing information according to the timing information of the first task.
[0017] Optionally, the interruption information includes timing information of the first task;
[0018] Continuing to execute the first task according to the interruption information includes:
[0019] If the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is less than or equal to a set threshold, the first task continues to be executed.
[0020] Optionally, the interruption information includes timing information of the first task;
[0021] Continuing to execute the first task according to the interruption information includes:
[0022] If the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is greater than a set threshold, the first task is continued to be executed when the executable time period is entered next time.
[0023] Optionally, the interruption information includes robot position information;
[0024] Continuing to execute the first task according to the interruption information includes:
[0025] The first task is executed starting from the position corresponding to the robot position information.
[0026] Optionally, also include:
[0027] If an exception occurs, suspending execution of the first task and recording interruption information of the first task;
[0028] After the exception is resolved, the first task continues to be executed according to the interruption information.
[0029] Optionally, also include:
[0030] After the second task is completed, if the third task is triggered, execute the third task;
[0031] After the third task is completed, the first task is continued to be executed according to the interruption information.
[0032] In a second aspect, an embodiment of the present invention provides a task execution device, including:
[0033] a recording module, configured to record interruption information of the first task if a second task is triggered and the priority of the second task is higher than the priority of the first task during the execution of the first task;
[0034] A first execution module, configured to execute the second task;
[0035] The second execution module is used to continue executing the first task according to the interruption information after the second task is completed.
[0036] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0037] one or more processors;
[0038] A storage device for storing one or more programs;
[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the task execution method as described in the first aspect.
[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the task execution method as described in the first aspect is implemented.
[0041] The embodiment of the present invention provides a task execution method, device, robot and storage medium. The task execution method includes: in the process of executing a first task, if a second task is triggered and the priority of the second task is higher than the priority of the first task, then recording the interruption information of the first task; executing the second task; after the second task is completed, continuing to execute the first task according to the interruption information. The above technical solution improves the flexibility of task execution and meets the execution requirements of tasks of different priorities by recording the interruption information of the original task when executing a high-priority task and continuing to execute the original task after the high-priority task is completed. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0043] Figure 1 A flowchart of a task execution method provided in Embodiment 1 of the present invention;
[0044] Figure 2 A flowchart of a task execution method provided in Embodiment 2 of the present invention;
[0045] Figure 3 A flowchart of a task execution method provided in Embodiment 3 of the present invention;
[0046] Figure 4 A schematic diagram of a task execution process provided by Embodiment 3 of the present invention;
[0047] Figure 5 A schematic diagram of the structure of a task execution device provided in Embodiment 4 of the present invention;
[0048] Figure 6 This is a schematic diagram of the structure of a robot provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0049] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. It is also necessary to explain that, for the convenience of description, only the parts related to the present invention are shown in the accompanying drawings, rather than all structures.
[0050] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0051] Embodiment 1
[0052] Figure 1This is a flowchart of a task execution method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where the robot supports the execution of multiple tasks. Specifically, the task execution method can be executed by a task execution device, which can be implemented in software and / or hardware and integrated in the robot. Figure 1 As shown, the method specifically comprises the following steps:
[0053] S110 . During the execution of the first task, if a second task is triggered and the priority of the second task is higher than the priority of the first task, then recording the interruption information of the first task.
[0054] Specifically, the first task can be understood as the task that the robot is currently executing, or as a task that is interrupted by other tasks or failures, or as a default task, such as a cleaning task. The second task can be understood as a task that is triggered during the execution of the first task, such as a delivery task or an interactive task. The priority of the second task is higher than that of the first task, which means that when the first task and the second task exist at the same time, the second task needs to be executed first, and the first task can be interrupted or terminated.
[0055] The interruption information is used to record the execution status of the first task when it is interrupted, and may include the type of the first task, the execution progress, the real-time position of the robot, the task timeliness (such as the executable time period and number of repetitions of the first task, etc.) and / or the timing information of the robot control instructions and electrical signals.
[0056] S120: Execute the second task.
[0057] Specifically, when the second task is triggered and the priority of the second task is higher than the priority of the first task, the first task is interrupted, the interruption information of the first task is recorded, and the second task is executed.
[0058] S130: After the second task is completed, continue to execute the first task according to the interruption information.
[0059] Specifically, after the second task is completed, the robot can continue to execute the first task from the breakpoint according to the recorded interruption information, for example, continue to execute the remaining part of the first task from the position when the first task was interrupted.
[0060] Exemplarily, the first task may be a cleaning task, and the second task may be a delivery task. When the robot is performing the cleaning task and needs to perform the delivery task, the cleaning task can be paused and the current task progress and task location can be recorded. After completing the delivery task, the robot can automatically return to the corresponding position to continue cleaning the remaining uncleaned area.
[0061] The character execution method of this embodiment improves the flexibility of task execution and meets the execution requirements of tasks of different priorities by recording the interruption information of the original task when executing the high-priority task and continuing to execute the original task after the high-priority task is completed. In addition, this method can be combined with device map perception to achieve real-time positioning of the robot; it can be scheduled autonomously by the robot or uniformly scheduled by the cloud server; by setting reasonable task priority evaluation criteria and integrating the resource information of the split robots, efficient scheduling can be performed according to actual needs, achieving a closed-loop task and ensuring the quality of task completion.
[0062] Embodiment 2
[0063] Figure 2 This is a flowchart of a task execution method provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment concretizes the process of the split robot executing different tasks. It should be noted that the technical details not described in detail in this embodiment can be referred to any of the above embodiments.
[0064] Specifically, Figure 2 As shown, the method specifically comprises the following steps:
[0065] S210: During the execution of the first task, the second task is triggered.
[0066] S220: Is the priority of the second task higher than the priority of the first task? If yes, execute S230; otherwise, execute S270.
[0067] S230: Record the interruption information of the first task.
[0068] Optionally, the interruption information includes at least one of the following: robot position information; timing information of the first task; progress information of the first task, and cabin information corresponding to the first task.
[0069] Among them, the robot position information can be the position coordinates of the robot when the first task is interrupted; the timing information of the first task can include the execution time setting information of the first task (such as 6:00-8:00 in the morning of a certain day or certain days), the execution number setting information (such as repeating the cleaning of the same area twice) and / or the triggering scene information (such as the time period when the flow of people is lower than the threshold or the time period when it is detected that the task demand reaches the set level, such as when the garbage pile is large enough, the cleaning task needs to be performed), etc.; the progress information can include the completion ratio of the first task (such as the ratio of the cleaned area to the total area that needs to be cleaned when the interruption occurs) and / or the information of the remaining tasks (such as the specific location of the uncleaned area), etc.; the cabin information corresponding to the first task can be understood as the cabin type required to execute the first task (such as a delivery cabin, an automatic cleaning tool, or a screen for user interaction, etc.).
[0070] S240, moving to a designated location and equipping a robot cabin corresponding to the second task.
[0071] In this embodiment, before executing the second task, the robot can move to a designated location (such as a charging station or a dispatching station, etc.) and equip the robot cabin corresponding to the second task to facilitate the execution of the second task. For example, if the first task is a cleaning task, the robot chassis is equipped with an automatic cleaning tool; if the second task is a delivery task, before executing the second task, the robot can move to a designated location and replace the automatic cleaning tool with a delivery cabin to facilitate the user to pick up and place the objects to be transported.
[0072] S250: Execute the second task.
[0073] S260: Move to a designated location according to the cabin information corresponding to the first task and equip the robot cabin corresponding to the first task, and continue to execute the first task.
[0074] The cabin information corresponding to the first task can be recorded in the interruption information or can correspond to the interruption information. For example, if the interruption information includes the type of the first task (such as a cleaning task), the cabin corresponding to the first task can be an automatic cleaning tool. After the second task is completed, the robot can move to a designated location (such as a charging station or a dispatching station) and re-equip the robot cabin corresponding to the first task to continue to perform the first task.
[0075] S270: After the first task is completed, execute the second task.
[0076] In this embodiment, if the priority of the second task is lower than the priority of the first task, the second task may be executed after the first task is completed.
[0077] A task execution method provided in the second embodiment of the present invention enables the robot to support multiple tasks by replacing the cabin required to execute the corresponding task at a designated location, thereby ensuring the feasibility of multi-task execution, improving the flexibility of task execution, and further meeting the execution requirements of tasks of different priorities.
[0078] Optionally, the interruption information includes the robot position information; and continuing to execute the first task according to the interruption information includes: executing the first task from the position corresponding to the robot position information. For example, if the first task is a cleaning task, then after the second task is completed, the cleaning task can be continued from the position where the robot was when the cleaning task was interrupted, so as to ensure the continuity of the execution of the first task.
[0079] Optionally, the method further includes: if an exception occurs, suspending the execution of the first task and recording the interruption information of the first task; after the exception is resolved, continuing to execute the first task according to the interruption information. Specifically, similar to being interrupted by the second task, when the first task is interrupted by an exception or a fault, its interruption information can also be recorded, and after the exception is resolved, the first task can be continued according to the interruption information. On this basis, the exception or fault can be dealt with with high quality, and the reliability of task execution can be improved.
[0080] Optionally, the method further includes: after the second task is completed, if the third task is triggered, the third task is executed; after the third task is completed, the first task is continued to be executed according to the interruption information. Specifically, if the first task is interrupted, after the second task with a higher priority is completed and before the first task is continued to be executed, the third task can be executed first, and after the third task is completed, the first task can be continued to be executed according to the interruption information. In addition, the priority of the third task can also be determined. If the priority of the third task is higher than that of the first task, the third task is executed first, and after the third task is completed, the first task can be continued to be executed according to the interruption information; if the priority of the third task is lower than that of the first task, the first task can also be executed first, and after the first task is completed, the third task can be continued to be executed according to the interruption information. On this basis, the flexibility of task execution is significantly improved to meet the execution requirements of different tasks.
[0081] Embodiment 3
[0082] Figure 3 This is a flowchart of a task execution method provided by Embodiment 3 of the present invention. Based on the above embodiments, this embodiment specifies the process of interrupting and continuing the execution of a scheduled task. It should be noted that the technical details not described in detail in this embodiment can be referred to any of the above embodiments.
[0083] In this embodiment, the interruption information includes the timing information of the first task. The timing information is, for example, the execution time setting information of the first task (such as 5:00-6:00 a.m. on weekdays and 6:00-7:00 a.m. on weekends and statutory holidays), the execution times setting information (such as cleaning one type of area only once and repeating the cleaning of another type of area twice) and / or the triggering scene information (such as the time period when the flow of people is lower than the threshold or when it is detected that the amount of garbage piled is large enough and the cleaning task needs to be executed). Continuing to execute the first task according to the interruption information includes: if the first task is a scheduled task, according to the timing information of the first task, continuing to execute the first task within the executable time period corresponding to the timing information.
[0084] Specifically, Figure 3 As shown, the method specifically comprises the following steps:
[0085] S310: During the execution of the first task, the second task is triggered.
[0086] S320: Is the priority of the second task higher than the priority of the first task? If yes, execute S330; otherwise, execute S370.
[0087] S330: Record the interruption information of the first task.
[0088] S340: Execute the second task.
[0089] Optionally, after the second task is triggered and confirmed to have a higher priority than the first task, the second task can be executed immediately, or it can be executed after a certain period of time, so that the breakpoint of the first task can be more reasonable. The length of the delay is related to the type, location and / or progress of the first task. For example, when cleaning a certain area, part of the garbage on the ground has been cleaned up, and part of it has not been cleaned up. At this time, if the cleaning task is terminated immediately to perform the delivery task, it will seriously affect the cleanliness and aesthetics of the area. When the flow of people is large, it will affect the user experience and cause a bad feeling. Therefore, the delivery task can be performed after the remaining garbage in the area is cleaned up. The corresponding interruption information can record the information corresponding to the moment when the garbage cleaning in the area is completed. After the delivery task is completed, the cleaning task can be continued directly from the next area. In addition, if it takes a long time to complete the first task in the current area, it is also possible not to delay but to execute the high-priority second task immediately, so as not to delay the progress of the second task.
[0090] S350: Is the first task a scheduled task? If yes, execute S260; otherwise, execute S370.
[0091] S360: According to the timing information of the first task, continue to execute the first task within the executable time period corresponding to the timing information.
[0092] Specifically, the first task may be continued to be executed at the execution time and triggering scenario of the first task. For example, the cleaning task may be executed at 5:00-6:00 a.m. on weekdays and 6:00-7:00 a.m. on weekends and statutory holidays. S370: After the second task is completed, the first task is executed.
[0093] S380: After the first task is completed, execute the second task.
[0094] Optionally, continuing to execute the first task according to the interruption information includes: if the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is less than or equal to the set threshold, then continue to execute the first task. Specifically, when the second task is completed, if the current time is not in the executable time period corresponding to the timing information of the first task, but the difference between the executable time period corresponding to the timing information of the first task is less than or equal to the set threshold (such as 10 minutes), then the first task can be executed. For example, if the first task is 6:05 in the morning of a weekday, and the difference from the execution time set for the first task is 5 minutes, then the first task can also be executed. The execution time can be flexibly determined. For example, the execution time of the first task is extended according to the time taken to execute the second task. For example, if the second task takes 20 minutes, the cleaning task can be extended to 6:20 in the morning of a weekday. Before that, the robot can continue to execute the first task after the second task is completed.
[0095] Optionally, continuing to execute the first task according to the interruption information includes: if the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is greater than the set threshold, then wait for the next time to enter the executable time period to continue to execute the first task. Specifically, when the second task is completed, if the current time is not in the executable time period corresponding to the timing information of the first task, and the difference between the executable time period corresponding to the timing information of the first task is greater than the set threshold (such as 10 minutes), then the first task is temporarily not executed, and the first task is continued to be executed when the next time enters the executable time period. For example, if the first task is 6:20 in the morning of a weekday, and the difference from the execution time set for the first task is 20 minutes, then the first task cannot be executed temporarily, and the first task can be continued until 5:00 on the next weekday. The execution time can be flexibly determined. For example, the execution time of the first task is extended according to the time taken to execute the second task. For example, if the second task takes 20 minutes, the cleaning task can be extended to 6:20 in the morning of a weekday. Before that, the robot can continue to execute the first task after the second task is completed.
[0096] Figure 4 This is a schematic diagram of a task execution process provided by Embodiment 3 of the present invention. Figure 4As shown, during the execution of the cleaning task, if a high-priority task appears, it can be determined whether the current area can be cleaned within the set time (5 minutes). If it can, the cleaning task can be interrupted after the current area is cleaned; if it cannot be cleaned within 5 minutes, the cleaning task can be interrupted immediately; then the interruption information is recorded, and the interruption information may include the current area, coordinates, and timing information; arrive at the charging pile to replace the cabin to perform the high-priority task, and after the high-priority task is completed, the cabin can be returned to the charging pile to replace the cabin as needed. Before continuing to sweep, you can also wait for a certain length of time (5 minutes) to determine whether there are other tasks (third tasks) to be executed. If so, you can continue to sweep after the third task is completed. In addition, it is also possible to determine whether the first task is a scheduled task, continue to execute the first task within the executable time period corresponding to the timing information, or determine whether the gap between the current moment and the executable time period corresponding to the timing information of the first task is greater than the set threshold (10 minutes) to execute the first task.
[0097] A task execution method is provided in embodiment three of the present invention, wherein the interruption information includes the timing information of the first task. By continuing to execute the first task within the executable time period corresponding to the timing information, or determining whether to execute the first task based on the gap between the current moment and the executable time period corresponding to the timing information of the first task, the timeliness and flexibility of the execution of the first task are fully met, and various execution requirements can be met.
[0098] Embodiment 4
[0099] Figure 5 This is a schematic diagram of the structure of a task execution device provided in Embodiment 4 of the present invention. The task execution device provided in this embodiment includes:
[0100] A recording module 410, configured to record interruption information of the first task if a second task is triggered and the priority of the second task is higher than the priority of the first task during the execution of the first task;
[0101] A first execution module 420, configured to execute the second task;
[0102] The second execution module 430 is configured to continue executing the first task according to the interruption information after the second task is completed.
[0103] A task execution device provided in a fourth embodiment of the present invention improves the flexibility of task execution and meets the execution requirements of tasks of different priorities by recording the interruption information of the original task when executing a high-priority task and continuing to execute the original task after the high-priority task is completed.
[0104] Based on the above embodiment, the first execution module 420 is configured to: if the priority of the second task is lower than the priority of the first task, execute the second task after the first task is completed.
[0105] Based on the above embodiment, before executing the second task, the method further includes:
[0106] The cabin changing module is used to move to a designated location and be equipped with a robot cabin corresponding to the second task.
[0107] Based on the above embodiment, the interruption information includes at least one of the following: robot position information; timing information of the first task; progress information of the first task, and cabin information corresponding to the first task.
[0108] Based on the above embodiment, the interruption information includes cabin information corresponding to the first task;
[0109] The second execution module 430 is specifically configured to:
[0110] According to the cabin information corresponding to the first task, the robot cabin is moved to the designated location and equipped with the robot cabin corresponding to the first task, and the first task is continued to be executed.
[0111] Based on the above embodiment, the interruption information includes timing information of the first task;
[0112] The second execution module 430 is specifically configured to:
[0113] If the first task is a scheduled task, the first task is continuously executed within an executable time period corresponding to the timing information according to the timing information of the first task.
[0114] Based on the above embodiment, the interruption information includes timing information of the first task;
[0115] The second execution module 430 is specifically configured to:
[0116] If the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is less than or equal to a set threshold, the first task continues to be executed.
[0117] Based on the above embodiment, the interruption information includes timing information of the first task;
[0118] The second execution module 430 is specifically configured to:
[0119] If the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is greater than a set threshold, the first task is continued to be executed when the executable time period is entered next time.
[0120] Based on the above embodiment, the interruption information includes robot position information;
[0121] The second execution module 430 is specifically configured to:
[0122] The first task is executed starting from the position corresponding to the robot position information.
[0123] Based on the above embodiment, it also includes:
[0124] A pause module, used for pausing the execution of the first task if an exception occurs, and recording the interruption information of the first task;
[0125] A recovery module is used to continue executing the first task according to the interruption information after the exception is resolved.
[0126] Based on the above embodiment, the device further includes:
[0127] A third execution module, configured to execute the third task if a third task is triggered after the second task is completed;
[0128] The fourth execution module is used to continue executing the first task according to the interruption information after the third task is completed.
[0129] The task execution device provided in the fourth embodiment of the present invention can be used to execute the task execution method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0130] Embodiment 5
[0131] Figure 6 A schematic structural diagram of a robot that can be used to implement an embodiment of the present invention is shown.
[0132] like Figure 6 As shown, a robot provided in this embodiment includes: a processor 510 and a storage device 520. The processor in the robot may be one or more, Figure 6 Taking a processor 510 as an example, the processor 510 and the storage device 520 in the robot can be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0133] The one or more programs are executed by the one or more processors 510, so that the one or more processors implement the task execution method described in any of the above embodiments.
[0134] The storage device 520 in the robot is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the task execution method in the embodiment of the present invention (for example, the attached Figure 3 The modules in the task execution device shown include: a recording module 310, a first execution module 320, and a second execution module 330). The processor 510 executes various functional applications and data processing of the robot by running the software programs, instructions and modules stored in the storage device 520, that is, the task execution method in the above method embodiment is implemented.
[0135] The storage device 520 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the robot (such as interrupt information, priority, etc. in the above embodiment). In addition, the storage device 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 520 may further include a memory remotely arranged relative to the processor 510, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0136] Furthermore, when one or more programs included in the above-mentioned robot are executed by the one or more processors 510, the program performs the following operations: during the execution of the first task, if the second task is triggered and the priority of the second task is higher than the priority of the first task, the interruption information of the first task is recorded; the second task is executed; after the second task is completed, the first task is continued to be executed according to the interruption information.
[0137] The robot further includes: a communication device 530 , an input device 540 and an output device 550 .
[0138] The processor 510, memory 520, communication device 530, input device 540 and output device 550 in the robot can be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0139] The input device 540 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the robot. The output device 550 may include a display device such as a display screen.
[0140] The communication device 530 may include a receiver and a transmitter. The communication device 530 is configured to perform information transmission and reception communication according to the control of the processor 510.
[0141] The robot proposed in this embodiment and the task execution method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to any of the above embodiments, and this embodiment has the same beneficial effects as the task execution method.
[0142] Based on the above embodiments, this embodiment also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a data storage device, the robot scheduling method in any of the above embodiments of the present invention is implemented. The method includes: during the execution of a first task, if a second task is triggered and the priority of the second task is higher than the priority of the first task, recording the interruption information of the first task; executing the second task; and after the second task is completed, continuing to execute the first task according to the interruption information.
[0143] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention, whose computer executable instructions are not limited to the operations of the data storage method described above, can also execute related operations in the data storage method provided in any embodiment of the present invention, and have corresponding functions and beneficial effects.
[0144] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the data storage method described in each embodiment of the present invention.
[0145] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A task execution method, characterized in that: include: During the execution of the first task, if the second task is triggered and the priority of the second task is higher than the priority of the first task, recording the interruption information of the first task; performing the second task; After the second task is completed, the first task is continued to be executed according to the interruption information.
2. The method according to claim 1, characterized in that Also includes: If the priority of the second task is lower than the priority of the first task, the second task is executed after the first task is completed.
3. The method according to claim 1 or 2, characterized in that: Before performing the second task, the method further includes: Move to the designated location and equip the robot cabin corresponding to the second task.
4. The method according to claim 1, characterized in that: The interruption information includes at least one of the following: robot position information; timing information of the first task; progress information of the first task, and cabin information corresponding to the first task.
5. The method according to claim 1, characterized in that The interruption information includes cabin information corresponding to the first task; Continuing to execute the first task according to the interruption information includes: According to the cabin information corresponding to the first task, the robot cabin is moved to the designated location and equipped with the robot cabin corresponding to the first task, and the first task is continued to be executed.
6. The method according to claim 1, characterized in that The interruption information includes timing information of the first task; Continuing to execute the first task according to the interruption information includes: If the first task is a scheduled task, the first task is continuously executed within an executable time period corresponding to the timing information according to the timing information of the first task.
7. The method according to claim 1, characterized in that The interruption information includes timing information of the first task; Continuing to execute the first task according to the interruption information includes: If the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is less than or equal to a set threshold, the first task continues to be executed.
8. The method according to claim 1, characterized in that The interruption information includes timing information of the first task; Continuing to execute the first task according to the interruption information includes: If the first task is a scheduled task, and the difference between the current time and the executable time period corresponding to the timing information of the first task is greater than a set threshold, the first task is continued to be executed when the executable time period is entered next time.
9. The method according to claim 1, characterized in that: The interruption information includes robot position information; Continuing to execute the first task according to the interruption information includes: The first task is executed starting from the position corresponding to the robot position information.
10. The method according to claim 1, characterized in that Also includes: If an exception occurs, suspending execution of the first task and recording interruption information of the first task; After the exception is resolved, the first task continues to be executed according to the interruption information.
11. The method according to claim 1, characterized in that: Also includes: After the second task is completed, if the third task is triggered, execute the third task; After the third task is completed, the first task is continued to be executed according to the interruption information.
12. A task execution device, characterized in that: include: a recording module, configured to record interruption information of the first task if a second task is triggered and the priority of the second task is higher than the priority of the first task during the execution of the first task; A first execution module, configured to execute the second task; The second execution module is used to continue executing the first task according to the interruption information after the second task is completed.
13. The device according to claim 12, characterized in that The interruption information includes at least one of the following: robot position information; timing information of the first task; progress information of the first task, and cabin information corresponding to the first task.
14. A robot, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task execution method according to any one of claims 1 to 9.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the task execution method as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Task scheduling method for track inspection robot
CN112318484A
Task scheduling method and related equipment
CN113467901A
Control method for automatically replacing upper-mounted module and related device
CN113858167A
Robot task planning method and device and robot
CN115809773A
Task scheduling method and device, equipment and medium
CN116185587A