A task scheduling method and system of a cleaning robot, and a storage medium

CN122984693APending Publication Date: 2026-10-27SHANGHAI SEER INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611478676.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-22
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]为此,本发明的主要目的在于提供一种清洁机器人的任务调度方法及系统、存储介质,以解决现有技术中清洁机器人的清扫作业与各类中断事件分散处理、任务中断后依赖人工干预且恢复不精确、任务状态难以统一管理的问题

Benefits of technology

[0027]通过本发明提供的该清洁机器人的任务调度方法及系统、存储介质,相比现有技术,可实现多类型中断事件下清扫任务的统一调度与无人干预连续作业。即设计上本方案以父任务作为对清扫任务进行生命周期管理的逻辑对象,父任务本身不对应清洁机器人的可执行动作,仅承载任务状态;而清扫、中断处理、续扫等可执行作业单元在执行过程中,随中断事件的发生按照生成时序,依次挂接于父任务,形成以父任务为管理节点、各作业单元为执行节点的任务链。由此,无论作业过程中发生何种类型的中断事件,均可被收敛至同一任务链上调度和衔接,无需人工重新下发任务或现场干预,显著提升了清洁机器人在长时间连续作业场景下的自主运行能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122984693A_ABST
    Figure CN122984693A_ABST
Patent Text Reader

Abstract

The application discloses a kind of task scheduling method and system of cleaning robot, storage medium, wherein method includes: creating parent task for cleaning task and generating cleaning subtask to issue execution, parent task is the logical object of life cycle management to cleaning task, only carries task state and does not correspond executable action;Job in response to interrupt event, record breakpoint position and generate corresponding interrupt processing subtask, resume cleaning based on breakpoint after interrupt elimination and generate continuation subtask;Each subtask is hung in parent task according to generation time sequence, forms to parent task as management node, subtask as execution node, only one subtask execution at the same time, and deduces parent task state according to current execution node state until terminal state.The application unifies multiple types of interruption into task chain scheduling, realizes accurate recovery and automatic management of state, and improves continuous operation capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile robot scheduling and control technology, and in particular to a task scheduling method, system and computer-readable storage medium for a cleaning robot. Background Technology

[0002] In large indoor environments such as buildings, industrial parks, and factories, cleaning robots are typically used for floor cleaning. In these scenarios, cleaning robots are generally controlled by a scheduling system. The host computer or scheduling system generates and issues cleaning tasks according to the cleaning area, the robot to be executed, and the task priority. After receiving the task, the robot navigates to the target area and performs cleaning along the planned path. During the operation, it continuously reports its location and running status to the scheduling system.

[0003] However, due to the limited capacity of the clean water and wastewater tanks carried by the robots, a single water refill is insufficient to support the cleaning of an entire area, resulting in frequent interruptions in practical applications. Taking water changing as an example, when the robot runs out of clean water or is nearly full of wastewater, existing systems typically control the robot to interrupt cleaning, return to the water changing point, and resume operation after the water change. However, the recovery method is rather crude. For example, existing systems directly control the robot to start cleaning from the beginning. Although some systems record the interruption location and return to continue cleaning after the water change, this type of interruption recovery only applies to the return-to-station handling scenario. Interruptions caused by other reasons during the operation still require manual reassignment of the task or on-site handling.

[0004] Besides water changes, another type of interruption exists in scenarios where multiple robots work together. For example, cleaning robots often share the road with robots used for handling, inspection, and other tasks controlled by other scheduling systems. When an external system requests passage, current practices often involve the cleaning robot immediately avoiding obstacles at the navigation level or stopping and waiting. While this method clears the way, the robot remaining near the passage may still affect on-site traffic. Furthermore, existing systems lack a task-level handling mechanism for how to resume the original cleaning task after the obstacle avoidance is completed.

[0005] It can be seen that the existing scheduling system handles cleaning, water changing, obstacle avoidance and recovery operations basically independently. The connection after the task is interrupted relies to a large extent on manual intervention. At the same time, due to the lack of unified management of cleaning tasks and their various interruption and recovery processes, the existing task scheduling system is also unable to automatically determine whether a cleaning task is currently in the execution, waiting or completed state. It is evident that the degree of automation of scheduling in continuous operation scenarios still needs to be improved. Summary of the Invention

[0006] Therefore, the main objective of this invention is to provide a task scheduling method and system for cleaning robots, as well as a storage medium, to solve the problems in the prior art of scattered handling of cleaning operations and various interruption events of cleaning robots, reliance on manual intervention after task interruption and inaccurate recovery, and difficulty in unified management of task status.

[0007] To achieve the above objectives, according to one aspect of the present invention, a task scheduling method for a cleaning robot is provided, comprising the steps of:

[0008] In response to a cleaning task, a corresponding parent task is created, and a cleaning sub-task is generated and sent to the cleaning robot for execution. The parent task is a logical object that manages the lifecycle of the cleaning task and is used to carry the task status of the cleaning task, but does not correspond to the executable actions of the cleaning robot.

[0009] During the cleaning robot's execution of the cleaning sub-task, in response to the occurrence of a preset type of interruption event, the current cleaning breakpoint position is recorded, an interruption handling sub-task corresponding to the type of interruption event is generated, and the cleaning robot is sent to execute it.

[0010] After the interruption event is cleared, a follow-up cleaning sub-task is generated based on the recorded cleaning breakpoint location to control the cleaning robot to resume the unfinished cleaning operation from the cleaning breakpoint location;

[0011] Each subtask is a work unit that can perform actions for the corresponding cleaning robot. Each work unit is sequentially attached to the parent task according to the generation sequence, forming a task chain with the parent task as the management node and each work unit as the execution node. At any given time, only one work unit on the task chain is in the execution state.

[0012] Based on the execution status of the job unit currently in execution on the task chain, the task status of the parent task is deduced and updated until the parent task reaches the final state.

[0013] In a possible preferred embodiment, the interruption event includes a water change event that indicates the cleaning robot needs to change its water. When the interruption event is the water change event, the step of generating the interruption handling sub-task includes: matching a target water change point according to the path planning distance in the set of reachable water change points of the cleaning robot; if the cleaning robot is currently executing the cleaning sub-task within the cleaning area, terminating the cleaning sub-task, recording the cleaning breakpoint position, and generating a water change sub-task, which includes the execution steps of stopping cleaning at the current position and navigating to the target water change point to perform the water change; if the cleaning robot is not currently executing the cleaning sub-task or the resume cleaning sub-task and is located outside the cleaning area, generating a water change sub-task for navigating to the target water change point to perform the water change.

[0014] In a possible preferred embodiment, the water change event is determined to occur when the following conditions are met: the amount of clean water in the cleaning robot is lower than a preset clean water threshold, or the amount of wastewater is higher than a preset wastewater threshold, and the cleaning robot is in an online controlled state, not in a charging state, and is not currently executing the interruption processing subtask corresponding to the water change event.

[0015] In a possible preferred embodiment, the interruption event includes an avoidance event triggered by external passage requirements; when the interruption event is the avoidance event, the step of generating the interruption handling sub-task includes: matching a target avoidance point for the cleaning robot from the set of avoidance points corresponding to the current cleaning area; terminating the currently executing work unit and recording the cleaning breakpoint position, generating an avoidance sub-task to control the cleaning robot to navigate to the target avoidance point and enter a continuous waiting state.

[0016] In a possible preferred embodiment, the step of generating a follow-up sweeping subtask includes: in response to receiving a return request indicating that the avoidance condition has been lifted, marking the avoidance subtask as completed, and generating a follow-up sweeping subtask based on the recorded sweeping breakpoint position.

[0017] In a possible preferred embodiment, the cleaning breakpoint location is recorded using the starting point identifier of the current path segment of the cleaning robot, the ending point identifier of the path segment, and the travel ratio of the cleaning robot on the path segment; when multiple interruptions occur during the execution of the cleaning task, only the most recently recorded cleaning breakpoint location is retained.

[0018] In a possible preferred embodiment, the continued cleaning sub-task includes: controlling the cleaning robot to navigate to the entrance point of the cleaning area, resuming cleaning based on the cleaning breakpoint location, and then navigating to the exit point of the cleaning area to complete the remaining cleaning work; if the cleaning breakpoint location is empty, controlling the cleaning robot to restart cleaning from the entrance point.

[0019] In a possible preferred embodiment, the step of deriving and updating the task state of the parent task includes: updating the task state of the parent task to a waiting state while the work unit currently in the execution state is the avoidance sub-task; restoring the task state of the parent task to a running state after the avoidance sub-task is completed and the continuing sweeping sub-task begins execution; updating the parent task to a completed state when the continuing sweeping sub-task is completed, and updating the parent task to a terminated state when the continuing sweeping sub-task terminates; after the parent task reaches the final state, removing the attachment relationship between each work unit in the task chain and the parent task, and clearing the record of the sweeping breakpoint position.

[0020] To achieve the above objectives, corresponding to the above method, according to another aspect of the present invention, a task scheduling system for a cleaning robot is also provided, comprising:

[0021] The task management module is used to respond to a received cleaning task, create a parent task corresponding to the cleaning task, and generate a cleaning sub-task to be sent to the cleaning robot for execution; wherein, the parent task is a logical object for lifecycle management of the cleaning task, and is only used to carry the task status of the cleaning task, and does not correspond to the executable actions of the cleaning robot.

[0022] The interrupt scheduling module is used to, in response to an interrupt event of a preset type during the execution of the cleaning sub-task by the cleaning robot, record the cleaning breakpoint position of the cleaning robot, and generate an interrupt handling sub-task corresponding to the type of the interrupt event and send it to the cleaning robot for execution.

[0023] The recovery scheduling module is used to generate a follow-up cleaning sub-task based on the recorded cleaning breakpoint position after the interruption event is eliminated, so as to control the cleaning robot to resume the unfinished cleaning operation from the cleaning breakpoint position.

[0024] Among them, the cleaning sub-task, the interruption handling sub-task, and the resume cleaning sub-task are all work units corresponding to the executable actions of the cleaning robot. Each work unit is sequentially attached to the parent task according to the generation sequence, forming a task chain with the parent task as the management node and each work unit as the execution node. At any given time, only one work unit on the task chain is in the execution state.

[0025] The state management module is used to deduce and update the task state of the parent task based on the execution state of the job unit currently in the execution state on the task chain, until the parent task reaches the final state.

[0026] To achieve the above objectives, in accordance with the above methods, according to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the task scheduling method as described in any of the above examples.

[0027] Compared to existing technologies, the task scheduling method, system, and storage medium for cleaning robots provided by this invention enable unified scheduling and unmanned continuous operation of cleaning tasks under various types of interruption events. Specifically, this design uses a parent task as the logical object for lifecycle management of cleaning tasks. The parent task itself does not correspond to any executable actions of the cleaning robot, but only carries the task status. During execution, executable work units such as cleaning, interruption handling, and resume cleaning are sequentially attached to the parent task according to the generation sequence following the occurrence of interruption events, forming a task chain with the parent task as the management node and each work unit as the execution node. Therefore, regardless of the type of interruption event occurring during operation, all tasks can be converged to the same task chain for scheduling and connection, eliminating the need for manual task re-issuance or on-site intervention, significantly improving the autonomous operation capability of the cleaning robot in long-term continuous operation scenarios.

[0028] Based on this, when an interruption event occurs, this solution can record the cleaning robot's cleaning breakpoint location and generate a resume cleaning sub-task based on the breakpoint location after the interruption event is cleared. This allows the robot to continue the unfinished cleaning work from the actual point of interruption, avoiding the problems of repeated cleaning and missed cleaning caused by starting from the beginning or restoring according to coarse-grained positions.

[0029] Furthermore, based on the task chain design, since only one job unit is in the execution state at any given time, the task state of the parent task can be deduced and updated based on the execution state of the currently executing job unit until the parent task reaches its final state. Therefore, the conditions for task execution, waiting, completion, and termination can all be automatically determined without manual tracking of the execution progress of each job stage, thereby improving the controllability of the entire task lifecycle and the automation level of the scheduling system. Attached Figure Description

[0030] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0031] Figure 1 This is an overall business process diagram of the cleaning robot task scheduling method provided in an embodiment of the present invention;

[0032] Figure 2 This is a schematic diagram of the structure of the cleaning robot task scheduling system provided in an embodiment of the present invention;

[0033] Figure 3 This is an automatic water exchange scheduling flowchart provided in an embodiment of the present invention;

[0034] Figure 4 A dynamic obstacle avoidance scheduling flowchart provided in an embodiment of the present invention;

[0035] Figure 5 This is a task state transition diagram provided for an embodiment of the present invention. Detailed Implementation

[0036] To enable those skilled in the art to better understand the technical solutions of the present invention, the specific technical solutions of the present invention will be clearly and completely described below in conjunction with embodiments, so as to help those skilled in the art further understand the present invention. Obviously, the embodiments described in this application are merely some embodiments of the present invention, and not all embodiments. It should be noted that, for those skilled in the art, the embodiments and features in the embodiments of this application can be combined with each other without departing from the concept of the present invention and without conflict. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the disclosure and protection scope of the present invention.

[0037] Furthermore, the terms "first," "second," "S100," "S200," etc., used in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such features can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those described herein. At the same time, the stages described in each step are not necessarily to be implemented in the same step; it should be understood that the implementation order of the contents of each step stage can be adjusted and interchanged without violating the inventive concept, so that embodiments of the invention described herein can be implemented in orders other than those described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. Unless otherwise expressly specified and limited, the terms "set," "arrange," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two elements. Those skilled in the art can understand the specific meaning of the above terms in this case based on the specific circumstances and in conjunction with existing technology.

[0038] To address the problems in existing cleaning robot technologies, such as fragmented handling of cleaning operations and various interruptions, reliance on manual intervention after task interruptions with inaccurate recovery, and difficulty in unified management of task status. For example... Figures 1 to 5 As shown, the present invention provides a task scheduling method and a task scheduling system for a cleaning robot.

[0039] In this embodiment of the invention, the execution entity is a scheduling system, which can be deployed on a host computer, server, or cloud, or it can be deployed on the cleaning robot itself. The scheduling system and the cleaning robot are connected via wired or wireless communication, and the scheduling system can issue sub-tasks to the robot and receive the status information reported by the robot.

[0040] For clarity, several terms used in this embodiment will be explained first.

[0041] "Parent task" refers to a logical object created for a received cleaning task. It is used to manage the lifecycle of the cleaning task. The parent task itself does not correspond to any executable actions of the cleaning robot, but only carries the task state of the cleaning task.

[0042] A "subtask" refers to a work unit that corresponds to an action that the cleaning robot can perform. It can be assigned to the cleaning robot for execution. In this embodiment, subtasks include cleaning subtasks, water changing subtasks, obstacle avoidance subtasks, and continued cleaning subtasks. "Attachment" refers to the operation of establishing a relationship between a subtask and its parent task. For example, a subtask records the task identifier of its parent task, and the parent task maintains a collection of all its subtasks.

[0043] A "task chain" refers to a chain-like task structure with a parent task as the management node, each subtask as the execution node, and the subtasks connected sequentially according to their generation order.

[0044] "Interruption event" refers to a preset type of event that causes the cleaning robot's current cleaning operation to be interrupted. Examples in this embodiment include: water change event, which indicates that the cleaning robot needs to change the water, and avoidance event triggered by external passage requirements.

[0045] Among them, such as Figure 1 As shown, the present invention exemplifies a task scheduling method for a cleaning robot, the steps of which include:

[0046] Step S100: In response to the cleaning task, create a corresponding parent task and generate a cleaning sub-task, which is then sent to the cleaning robot for execution; wherein, the parent task is a logical object for lifecycle management of the cleaning task, used to carry the task status of the cleaning task, and does not correspond to the executable actions of the cleaning robot.

[0047] Specifically, after the task scheduling system initializes the map scene, it receives cleaning task instructions from the host computer system. These task parameters include at least the executing robot, the target cleaning area, and the priority. The scheduling system parses and verifies the validity of the task parameters, and, in conjunction with the cleaning area topology information maintained by the area topology management module (i.e., the mapping relationship between the cleaning area and the sets of entry points, exit points, and avoidance points), generates cleaning sub-tasks, which are then sent to the designated robot for execution. The above describes the existing technology and will not be elaborated further here; it can be implemented by referring to existing technologies.

[0048] Simultaneously, the scheduling system responds to the cleaning task by creating a corresponding parent task. In this example, the parent task is a logical object that manages the lifecycle of the cleaning task, and its initial state is pending scheduling. When the task is received, only one execution node, the cleaning subtask, is attached to the task chain; during subsequent execution, other subtasks generated due to interruption events are sequentially attached to the parent task according to their respective generation sequence, and the task chain dynamically grows as the job progresses.

[0049] Step S200: During the cleaning robot's execution of the cleaning sub-task, in response to the occurrence of a preset type of interruption event, the current cleaning breakpoint position is recorded, an interruption handling sub-task corresponding to the type of interruption event is generated, and the cleaning robot is sent to execute it.

[0050] Specifically, during the robot's cleaning sub-task, the scheduling system continuously acquires the robot's reported operating status, wastewater status, and current location information to monitor for pre-defined interruption events. This embodiment will describe the scheduling process for water change events and obstacle avoidance events separately.

[0051] 1) Handling water change incidents

[0052] like Figure 3 As shown, the scheduling system obtains the amount of clean water reported by each controlled robot in each scheduling cycle. and sewage volume and the preset minimum clean water threshold Wastewater threshold The water change trigger condition is expressed as follows:

[0053]

[0054] In equation (1), The result of the water change trigger determination is true, indicating that the water change condition is met. In addition to equation (1), the following prerequisites must also be met: the robot is online and under control, not in a charging state, and not currently performing a water change sub-task. If the robot is performing a cleaning or continuing cleaning sub-task, water change is allowed; if the robot is in the final state of a task and is not in the cleaning area, water change is also allowed.

[0055] In addition, in the alternative implementation, the water replacement triggering condition can also be selected as a method based on a dynamic threshold (dynamically adjusted according to factors such as the remaining cleaning area and the distance from the water replacement point), or a triggering method based on the cleaning time and the cumulative value of the cleaning area.

[0056] For robots that meet the water exchange conditions, the scheduling system queries the set of reachable water exchange points, calculates the path distance from the robot to each water exchange point through path planning, and selects the water exchange point with the shortest distance as the target water exchange point:

[0057]

[0058] In equation (2), Rpos is the robot's current position, CPset is the set of reachable water exchange points, dist is the path planning distance function, and CPtarget is the matched target water exchange point.

[0059] Once a water exchange point is matched, the scheduling system generates a water exchange sub-task based on the robot's current task status and location, specifically in two cases:

[0060] In the first scenario, if the robot is currently performing a cleaning sub-task within the cleaning area, the scheduling system first terminates the current cleaning sub-task, calls the interrupt scheduling module to save the robot's current cleaning position (i.e., records the cleaning breakpoint position), and then generates a water-changing sub-task. This water-changing sub-task includes two execution steps: the first step is to execute a stop cleaning action at the robot's current position (…). The second step is to navigate to the target water exchange point and perform the water exchange action. ).

[0061] In the second scenario, if the robot is in the final state of the task and is not within the cleaning area, the scheduling system directly generates a water-changing sub-task. This sub-task contains only one execution step: navigating to the target water-changing point to perform the water-changing action.

[0062] In this way, the generated water-changing subtask is immediately attached to the parent task and sent to the robot for execution as a new execution node on the task chain.

[0063] 2) Handling of avoidance incidents

[0064] Unlike automatic water exchange scheduling, dynamic avoidance scheduling is triggered instantly by external events and is not executed within the periodic main process. For example... Figure 4 As shown, when an external traffic management system or other scheduling system issues a yielding request due to traffic needs, the scheduling system obtains the set of robots that need to be yielded to, and verifies one by one whether the robot is online, under control, and currently executing a cleaning-related sub-task (cleaning, continuing cleaning, or yielding sub-task); for robots that are not executing cleaning-related sub-tasks, the scheduling system does not take any action.

[0065] For robots that need to be avoided, the scheduling system performs differentiated processing based on the type of subtask they are currently executing:

[0066] If the robot is performing a cleaning subtask, the scheduling system matches the robot with the nearest avoidance point from the set of avoidance points in that cleaning area, based on the shortest path:

[0067]

[0068] In equation (3), TPset is the set of avoidance points configured in the current cleaning area, and TPtarget is the matched target avoidance point. After a avoidance point is matched, the scheduling system terminates the current cleaning subtask, calls the interrupt scheduling module to save the robot's current cleaning position, and generates an avoidance subtask. This avoidance subtask contains two execution steps: the first step is to execute a stop cleaning action (WashEnd) at the robot's current position; the second step is to navigate to the target avoidance point and enter a waiting state (Wait). The completion flag of the avoidance subtask is set to false, indicating that the robot will not automatically end the task after reaching the avoidance point, but will continue to wait until an external return command is issued.

[0069] If the robot is performing a follow-up sweeping sub-task, the handling method is the same as for the sweeping sub-task. If the robot is performing a water changing sub-task, no action is taken, as the water changing process usually does not affect the passage of other robots; if the robot is already performing a yielding sub-task, no further action is taken.

[0070] In addition, in optional alternative implementations, the matching strategy for water exchange points and avoidance points can be replaced by a method based on regional priority, congestion level, or a preset rule table.

[0071] As can be seen from the above process, before generating a new subtask in response to each interruption event, the scheduling system first terminates the currently executing subtask, then attaches the newly generated subtask to the parent task and sends it for execution. This ensures that only one job unit is in execution state on the task chain at any given time. This constraint is the basis for subsequent deduction of the parent task state based on the task chain.

[0072] Step S300: After the interruption event is eliminated, a follow-up cleaning sub-task is generated based on the recorded cleaning breakpoint position to control the cleaning robot to resume the unfinished cleaning operation from the cleaning breakpoint position.

[0073] Specifically, the breakpoint recording and recovery module is responsible for saving the robot's cleaning progress when a task is interrupted and providing breakpoint information when a resumed cleaning subtask is generated. When a water change scheduling or obstacle avoidance scheduling triggers a task interruption, the scheduling system obtains the robot's current position information on the cleaning path and records the breakpoint position in the form of a triplet (Sid, Eid, P):

[0074]

[0075] In equation (4), Sid represents the starting point of the current path segment where the robot is located, Eid represents the ending point of the current path segment, and P represents the percentage of the robot's travel on the path segment, with a value range of [0,1]. The three together determine the precise position of the robot on the cleaning path.

[0076] In addition, in alternative implementations, the breakpoint location can be recorded based on map coordinates and orientation angle (x, y, θ), or based on path segment number and offset distance.

[0077] After the interruption event is cleared, the scheduling system generates a resumed scan subtask based on the recorded breakpoint location. Specifically:

[0078] For water replacement events, after the water replacement subtask is completed, the scheduling system determines whether the conditions for continued scanning are met: the current water replacement subtask has been completed, and both the robot's clean water volume and wastewater volume have returned to normal ranges (i.e., and For robots that meet the conditions for continued cleaning, if the breakpoint location was previously recorded, a continued cleaning subtask will be generated based on the breakpoint information; if the breakpoint location was not recorded (indicating that cleaning was completed when the water change was triggered), a continued cleaning subtask will not be generated.

[0079] For avoidance events, once the avoidance conditions are lifted, the external system issues a return-to-site request. Upon receiving the return-to-site request, the scheduling system verifies whether the robot is currently executing an avoidance subtask. If so, it triggers the return-to-site scanning process: marking the current avoidance subtask as completed and generating a return-to-site scanning subtask based on the previously recorded breakpoint position.

[0080] The resume cleaning subtask consists of two execution steps: First, the robot navigates to the entry point of the cleaning area and executes a resume cleaning action (WashStart) with breakpoint parameters. This action uses the breakpoint information (Sid, Eid, P) to guide the robot freely back to the point of interruption and continue cleaning. Second, the robot navigates to the exit point of the cleaning area to complete the remaining cleaning work. ).

[0081] In addition, there is a special case: if the robot has not entered the cleaning area when it is interrupted (for example, it is triggered to avoid the robot while it is on its way to the entrance of the cleaning area), the breakpoint position is recorded as an empty value ("", "", -1). In this case, the generated resume cleaning subtask does not contain the resume cleaning script parameters, and the robot will restart the complete cleaning from the entrance of the cleaning area.

[0082] When a cleaning task is interrupted multiple times during execution (e.g., multiple water changes or multiple obstacle avoidances), the scheduling system only retains the record of the most recent breakpoint position to ensure that the resumed cleaning subtask always resumes from the latest breakpoint position; when the parent task reaches the final state, the scheduling system clears the breakpoint record corresponding to the robot.

[0083] Step S400: Based on the execution state of the job unit currently in execution state on the task chain, deduce and update the task state of the parent task until the parent task reaches the final state.

[0084] Specifically, the system maintains the relationship between parent tasks and each child task through a state management module, and derives the parent task state based on the execution state of the currently executing job unit in the task chain. For example... Figure 5 As shown, each cleaning parent task in the example is associated with four types of subtasks: cleaning, water change, reclean, and transfer. Examples of parent task states include: TOBEDISPATCHED, RUNNING, WAITING, FINISHED, and STOPPED, with the initial state being TOBEDISPATCHED. The state derivation rules are as follows:

[0085] When the cleaning subtask begins execution (its status changes to RUNNING), the parent task is moved from pending scheduling to running.

[0086] If there are no water-changing or avoidance sub-tasks in the task chain, the status of the parent task is directly determined by the cleaning sub-task: the parent task is completed when the cleaning sub-task is completed, and the parent task is terminated when the cleaning sub-task is terminated.

[0087] If there is a water exchange subtask but no avoidance subtask, the parent task's state is determined by the continuing sweep subtask: before the continuing sweep subtask is generated, the parent task remains in a running state; when the continuing sweep subtask is completed, the parent task is completed; when the continuing sweep subtask is terminated, the parent task is terminated.

[0088] If there is an avoidance subtask, the parent task's state transitions to waiting during the execution of the avoidance subtask; when the avoidance subtask is completed and the return sweeping subtask begins execution, the parent task's state returns to running; when the return sweeping subtask is completed, the parent task is completed; when the return sweeping subtask terminates, the parent task terminates.

[0089] Once the parent task reaches its final state (completed or terminated), the scheduling system disconnects each work unit in the task chain from the parent task, clears the corresponding breakpoint records, releases related resources, and ends the lifecycle management of this cleaning task.

[0090] It should be noted that the above state derivation is based on the single execution node constraint of the task chain: since only one job unit is in the execution state on the task chain at any given time, the scheduling system only needs to obtain the execution state of the current execution node and combine it with the type of the nodes attached to the task chain to uniquely determine the task state of the parent task, without the need for manual tracking of the execution progress of each subtask.

[0091] Furthermore, in an optional implementation, the main scheduling process of the above execution steps is executed periodically, and each scheduling cycle preferably completes three stages sequentially: the first stage is automatic water replacement scheduling, which handles water replacement triggering, water replacement point matching, water replacement sub-task generation, and follow-up sweeping sub-task generation; the second stage is new task processing, which handles the verification, allocation, and issuance of newly received sweeping tasks; the third stage is task status update, which derives the parent task status based on the sub-task status and cleans up the final state tasks. The avoidance scheduling process is triggered by external events and is not in the periodic main process, but is executed immediately upon receiving an avoidance request.

[0092] Furthermore, in alternative implementations, the state management method for parent and child tasks can be replaced with an event-driven approach (e.g., transmitting subtask state change events via message queues or publish-subscribe mechanisms, with the parent task listening and updating its own state), or with a database polling approach. The overall scheduling architecture can be replaced with a distributed architecture (e.g., deploying modules such as water exchange scheduling, obstacle avoidance scheduling, and state management as independent services, working collaboratively through remote calls), or with an edge computing architecture where the robot makes autonomous decisions (i.e., the robot locally determines water exchange and obstacle avoidance conditions and reports the decision results to the scheduling system).

[0093] Therefore, although it is impossible to exhaustively list them, those skilled in the art should understand that, under the premise of understanding the above-described inventive concept, any other variable implementation method that uses a parent task to manage the lifecycle of a cleaning task, where each work unit is attached to the parent task in the order of generation to form a task chain, and records the breakpoint when the task is interrupted and resumes cleaning based on the breakpoint after the interruption is cleared, falls within the scope of the equivalent implementation method of this invention.

[0094] Corresponding to the above method examples, such as Figure 2 As shown in the figure, this embodiment also provides a task scheduling system for a cleaning robot, which includes: a task management module, an interrupt scheduling module, a recovery scheduling module, and a status management module.

[0095] The task management module is used to respond to a received cleaning task, create a parent task corresponding to the cleaning task, and generate a cleaning sub-task to be sent to the cleaning robot for execution. The parent task is a logical object for lifecycle management of the cleaning task, and is only used to carry the task status of the cleaning task, and does not correspond to the executable actions of the cleaning robot.

[0096] The interrupt scheduling module is used to respond to a preset type of interrupt event during the cleaning robot's execution of a cleaning sub-task, record the cleaning breakpoint location of the cleaning robot, and generate an interrupt handling sub-task corresponding to the type of interrupt event and send it to the cleaning robot for execution.

[0097] The recovery scheduling module is used to generate a resume cleaning sub-task based on the recorded cleaning breakpoint position after the interruption event is cleared, so as to control the cleaning robot to resume the unfinished cleaning operation from the cleaning breakpoint position.

[0098] The state management module is used to maintain the connection between each job unit and its parent task, and to deduce and update the task state of the parent task based on the execution state of the job unit currently in execution on the task chain, until the parent task reaches the final state.

[0099] Among them, the cleaning sub-task, interruption handling sub-task, and resume cleaning sub-task are all work units that can perform actions of the corresponding cleaning robot. Each work unit is attached to the parent task in sequence according to the generation time, forming a task chain with the parent task as the management node and each work unit as the execution node. At any given time, only one work unit on the task chain is in the execution state.

[0100] In practical implementation, the above four functional modules can be further subdivided into seven sub-modules: the task management module can be subdivided into a task receiving and verification module and a task allocation and distribution module, which are responsible for the parameter verification of cleaning tasks and the management and distribution of task queues by robot dimension, respectively; the interruption scheduling module can be subdivided into an automatic water change scheduling module and a dynamic avoidance scheduling module, which are responsible for the response and processing of water change events and avoidance events, respectively; the breakpoint information of the recovery scheduling module is provided by the breakpoint recording and recovery module, which is responsible for saving the robot's current cleaning position when the task is interrupted and outputting the breakpoint information when the resume cleaning sub-task is generated; the status management module corresponds to the task status management module.

[0101] In addition, the system may include a region topology management module, which maintains the mapping relationship between the cleaning area and the entry point, exit point, and avoidance point, and provides topology information support for the task management module to generate cleaning sub-tasks and for the interruption scheduling module to match water change points and avoidance points. The specific processing procedures of each module are described in the aforementioned method embodiments and will not be repeated here.

[0102] In summary, the cleaning robot task scheduling method, system, and storage medium provided in this embodiment of the invention are designed such that cleaning tasks are incorporated into the scheduling system as parent tasks. The parent tasks themselves are not issued to the robot for execution; they are only used to record the task status. The actual cleaning, water changing, obstacle avoidance, and continued cleaning actions performed by the robot are generated as sub-tasks and sequentially attached to the parent task as the work progresses, forming a task chain. Since only one sub-task is in execution at any given time, the scheduling system only needs to track the currently executing sub-task to grasp the progress of the entire cleaning task. If an interruption occurs during the operation, the robot's current position is recorded as the breakpoint. After the cause of the interruption is eliminated, the robot continues to perform the remaining cleaning from the breakpoint without returning to the starting point of the area or requiring manual re-issuance of the task.

[0103] After adopting the above scheduling method, interruption events such as water changing and obstacle avoidance are no longer handled independently, but are uniformly incorporated into the task chain for connection. When the cleaning robot encounters an interruption during continuous operation, it can automatically complete task switching and recovery. The task recovery location is taken from the actual interruption point, thus avoiding repeated cleaning and missed cleaning. During obstacle avoidance, the robot goes to the obstacle avoidance point to wait instead of staying in the work channel, which has little impact on on-site traffic. After the obstacle avoidance condition is lifted, the original cleaning task can still be resumed. At the same time, the current status of the cleaning task, whether it is in the execution, waiting or completed state, is automatically determined by the scheduling system based on the currently executing sub-tasks on the task chain. After the task is completed, the association between the sub-task and the parent task and the breakpoint record are cleared. The entire operation process does not require manual tracking and intervention, thereby improving the controllability of the entire task life cycle and the degree of scheduling automation.

[0104] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The present invention is limited only by the claims and their full scope and equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

[0105] Those skilled in the art will understand that, besides implementing the system, apparatus, unit, and its modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system, apparatus, and its modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.

[0106] Furthermore, all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a microcontroller, chip, or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0107] Furthermore, various different implementations of the present invention can be combined arbitrarily, as long as they do not violate the spirit of the present invention, they should also be regarded as the content disclosed in the present invention.

Claims

1. A task scheduling method for a cleaning robot, characterized by the following steps: include: In response to a cleaning task, a corresponding parent task is created, and a cleaning sub-task is generated and sent to the cleaning robot for execution. The parent task is a logical object that manages the lifecycle of the cleaning task and is used to carry the task status of the cleaning task, but does not correspond to the executable actions of the cleaning robot. During the cleaning robot's execution of the cleaning sub-task, in response to the occurrence of a preset type of interruption event, the current cleaning breakpoint position is recorded, an interruption handling sub-task corresponding to the type of interruption event is generated, and the cleaning robot is sent to execute it. After the interruption event is cleared, a resume cleaning subtask is generated based on the recorded cleaning breakpoint location to control the cleaning robot to resume the unfinished cleaning operation from the cleaning breakpoint location. Each subtask is a work unit that can perform actions for the corresponding cleaning robot. Each work unit is sequentially attached to the parent task according to the generation sequence, forming a task chain with the parent task as the management node and each work unit as the execution node. At any given time, only one work unit on the task chain is in the execution state. Based on the execution status of the job unit currently in execution on the task chain, the task status of the parent task is deduced and updated until the parent task reaches the final state.

2. The task scheduling method according to claim 1, characterized in that, When the interruption event is a water change event, the steps for generating the interruption handling subtask include: In the set of reachable water exchange points of the cleaning robot, the target water exchange point is matched according to the path planning distance; If the cleaning robot is currently performing the cleaning sub-task within the cleaning area, the cleaning sub-task is terminated, the cleaning breakpoint position is recorded, and a water-changing sub-task is generated. The water-changing sub-task includes the steps of stopping cleaning at the current position and navigating to the target water-changing point to perform water changing. If the cleaning robot is not currently performing the cleaning sub-task or the continuing cleaning sub-task and is located outside the cleaning area, a water changing sub-task is generated to navigate to the target water changing point to perform water changing.

3. The task scheduling method according to claim 1, characterized in that, When the interruption event is an avoidance event, the steps for generating the interrupt handling subtask include: Match a target avoidance point for the cleaning robot from the set of avoidance points corresponding to the current cleaning area; The currently executing work unit is terminated and the cleaning breakpoint location is recorded. An avoidance subtask is generated to control the cleaning robot to navigate to the target avoidance point and enter a continuous waiting state.

4. The task scheduling method according to claim 3, characterized in that, The step of generating the follow-up sweeping sub-task includes: in response to receiving a return request indicating that the avoidance condition has been lifted, marking the avoidance sub-task as completed, and generating the follow-up sweeping sub-task based on the recorded sweeping breakpoint position.

5. The task scheduling method according to claim 1, characterized in that, The cleaning breakpoint location is recorded using the starting point identifier of the current path segment of the cleaning robot, the ending point identifier of the path segment, and the travel percentage of the cleaning robot on the path segment; if multiple interruptions occur during the execution of the cleaning task, only the most recently recorded cleaning breakpoint location is retained.

6. The task scheduling method according to claim 5, characterized in that, The resume cleaning sub-task includes: controlling the cleaning robot to navigate to the entrance point of the cleaning area, resuming cleaning based on the cleaning breakpoint location, and then navigating to the exit point of the cleaning area to complete the remaining cleaning work; if the cleaning breakpoint location is empty, controlling the cleaning robot to resume cleaning from the entrance point.

7. The task scheduling method according to claim 2, characterized in that, The water change event is determined to occur when the following conditions are met: the amount of clean water in the cleaning robot is lower than the preset clean water threshold, or the amount of wastewater is higher than the preset wastewater threshold, and the cleaning robot is in an online controlled state, not in a charging state, and is not currently executing the interruption processing subtask corresponding to the water change event.

8. The task scheduling method according to claim 4, characterized in that, The steps for deriving and updating the task state of the parent task include: While the currently executing work unit is the avoidance subtask, the task status of the parent task is updated to a waiting state; After the avoidance subtask is completed and the follow-up scan subtask begins execution, the task state of the parent task is restored to the running state. When the continuing sweeping sub-task is completed, the parent task is updated to a completed state; when the continuing sweeping sub-task is terminated, the parent task is updated to a terminated state. After the parent task reaches its final state, the connection between each work unit in the task chain and the parent task is released, and the record of the cleaning breakpoint position is cleared.

9. A task scheduling system for a cleaning robot, characterized in that, include: The task management module is used to respond to a received cleaning task, create a parent task corresponding to the cleaning task, and generate a cleaning sub-task to be sent to the cleaning robot for execution; wherein, the parent task is a logical object for lifecycle management of the cleaning task, used to carry the task status of the cleaning task, and does not correspond to the executable actions of the cleaning robot. The interrupt scheduling module is used to, in response to an interrupt event of a preset type during the execution of the cleaning sub-task by the cleaning robot, record the cleaning breakpoint position of the cleaning robot, and generate an interrupt handling sub-task corresponding to the type of the interrupt event and send it to the cleaning robot for execution. The recovery scheduling module is used to generate a follow-up cleaning sub-task based on the recorded cleaning breakpoint position after the interruption event is eliminated, so as to control the cleaning robot to resume the unfinished cleaning operation from the cleaning breakpoint position. Among them, the cleaning sub-task, the interruption handling sub-task, and the resume cleaning sub-task are all work units corresponding to the executable actions of the cleaning robot. Each work unit is sequentially attached to the parent task according to the generation sequence, forming a task chain with the parent task as the management node and each work unit as the execution node. At any given time, only one work unit on the task chain is in the execution state. The state management module is used to deduce and update the task state of the parent task based on the execution state of the job unit currently in the execution state on the task chain, until the parent task reaches the final state.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the task scheduling method as described in any one of claims 1 to 8.