Task interruption processing method of patrol robot and related equipment
By calculating the task cost when a patrol robot is interrupted and scheduling other robots to perform or continue the task, the problem of time and energy waste caused by manual replanning in existing technologies is solved, and the efficiency of handling task interruptions is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
- Filing Date
- 2026-04-07
- Publication Date
- 2026-05-12
AI Technical Summary
When existing patrol robots face mission interruptions, manual replanning or reassignment is required. This results in low intelligence, wasted time and energy, and low efficiency in handling mission interruptions.
After receiving a task interruption signal, the task information is obtained and the task cost is calculated. If the cost is higher than the threshold, other robots are scheduled to execute the task; otherwise, the robot continues to execute the task, thereby reducing empty driving mileage and power consumption.
It effectively reduces the robot's empty driving mileage and power consumption, extends the single-operation endurance, and improves the efficiency of handling mission interruptions.
Smart Images

Figure CN122018562A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to a method and related equipment for handling mission interruptions of a patrol robot. Background Technology
[0002] Patrol robots are widely used in industrial parks, factories, communities, border areas, and other scenarios, undertaking tasks such as security inspections, environmental monitoring, and anomaly alarms. In actual operation, patrol robots often face task interruptions. For example, sudden emergency tasks (such as fire confirmation or intrusion alarms) have higher priority and require immediate robot response; or the robot itself experiences low battery or hardware malfunctions, preventing the current task from continuing. In existing technologies, after the robot interrupts its current task, it switches to execute the emergency task, and the original task is marked as failed or suspended. After the emergency task is completed, the original task needs to be manually replanned or reassigned, resulting in low intelligence, delayed response, wasted time and energy, and low efficiency in handling task interruptions. Summary of the Invention
[0003] This application provides a method for handling task interruptions in patrol robots, which solves the problems of existing technologies where the original task needs to be manually replanned or reissued, resulting in low intelligence, delayed response, wasted time and energy, and low efficiency in handling task interruptions. For interruptions with low cost, the original robot continues execution; for interruptions with high cost, other robots take over, eliminating the need for the original robot to return, effectively reducing the robot's empty mileage and power consumption, extending the robot's single-operation endurance, and improving the efficiency of task interruption handling.
[0004] In a first aspect, embodiments of this application provide a method for handling mission interruption of a patrol robot, the method comprising the following steps:
[0005] Upon receiving the task interruption signal from the first patrol robot, the first task information of the task originally performed by the first patrol robot is obtained, wherein the task interruption signal includes the interruption time and the interruption location;
[0006] Based on the first task information, the first-generation value of the originally executed task is determined;
[0007] If the value of the first generation is greater than the preset value threshold of the first generation, then based on the interruption time and the interruption location, the second patrol robot is scheduled to perform the original task.
[0008] If the value of the first generation is less than the preset value threshold of the first generation, then the first patrol robot is scheduled to continue to perform the original task.
[0009] Optionally, determining the first-generation value of the originally executing task based on the first task information includes:
[0010] Obtain the length of the executed path and the remaining path length of the originally executed task;
[0011] In addition, the execution time and remaining estimated time of the originally executed task are obtained;
[0012] The first generation value is calculated based on the first ratio of the executed path length to the remaining path length, the second ratio of the executed time to the remaining estimated time, and the preset priority weight of the original task at the interruption point. Different locations in the original task's task path correspond to different priority weights.
[0013] Optionally, scheduling the second patrol robot to perform the originally scheduled task based on the interruption time and the interruption location includes:
[0014] Based on the location of the interruption, search for candidate patrol robots within a preset area;
[0015] Based on the task status of the candidate patrol robots, the patrol robot that is in an idle state is selected from the candidate patrol robots as the second patrol robot;
[0016] If there are no idle patrol robots, then select the second patrol robot whose value is less than the first cost value from the candidate patrol robots that interrupted the current task execution from the interruption time.
[0017] The second patrol robot is then dispatched to perform the original task.
[0018] Optionally, selecting a second-generation patrol robot with a value less than the first cost value that interrupted the currently executing task from the interruption time from the candidate patrol robots as the second patrol robot includes:
[0019] For each non-idle candidate patrol robot, obtain the second task information of the current task being executed by the non-idle candidate patrol robot, and calculate the second generation value required if the non-idle candidate patrol robot were to interrupt the current task being executed from the interruption time.
[0020] Compare the value of the second generation with the value of the first generation;
[0021] The candidate patrol robot whose value is less than that of the first generation and whose difference is the largest is selected as the second patrol robot.
[0022] Optionally, the step of scheduling the first patrol robot to continue performing its original task if the value of the first generation is less than a preset first generation value threshold includes:
[0023] If the value of the first generation is less than or equal to a preset first generation value threshold, and the value of the first generation is greater than a preset second generation value threshold, then the first patrol robot is scheduled to continue executing the original task starting from the interruption point.
[0024] If the first value is less than or equal to a preset second-generation value threshold, a connecting point is predicted in the original task execution path, and the first patrol robot is scheduled to continue executing the original task starting from the connecting point. The second-generation value threshold is less than the first-generation value threshold.
[0025] Optionally, predicting the connecting location in the original task execution path includes:
[0026] Obtain the priority weights of each unexecuted path point in the original path where the task was originally executed;
[0027] The unexecuted path point with the highest priority weight is selected as the continuation point.
[0028] Optionally, before determining the first-generation value of the originally executing task based on the first task information, the method further includes:
[0029] Obtain the interruption reason indicated by the task interruption signal;
[0030] When the interruption is caused by an abnormality in the first patrol robot, the second patrol robot is directly dispatched from the interruption point to take over the original task, and the first patrol robot is controlled to exit the task.
[0031] Secondly, embodiments of this application provide a task interruption handling device for a patrol robot, the task interruption handling device for the patrol robot comprising:
[0032] The first acquisition module is used to acquire the first task information of the first patrol robot after receiving the task interruption signal of the first patrol robot. The task interruption signal includes the interruption time and the interruption location.
[0033] The processing module is used to determine the first-generation value of the originally executed task based on the first task information;
[0034] The first scheduling module is used to schedule the second patrol robot to perform the original task based on the interruption time and the interruption location if the value of the first generation is greater than the preset value threshold of the first generation.
[0035] The second scheduling module is used to schedule the first patrol robot to continue performing the original task if the value of the first generation is less than a preset first generation value threshold.
[0036] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the task interruption handling method for patrol robots provided in embodiments of the present invention.
[0037] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps in the task interruption handling method for patrol robots provided in the embodiments of the present invention.
[0038] The above-described solution of this application has the following beneficial effects: After receiving the task interruption signal of the first patrol robot, the first task information of the task originally executed by the first patrol robot is obtained, and the task interruption signal includes the interruption time and the interruption location; based on the first task information, the first generation value of the originally executed task is determined; if the first generation value is greater than a preset first generation value threshold, then based on the interruption time and the interruption location, the second patrol robot is scheduled to execute the originally executed task; if the first generation value is less than the preset first generation value threshold, then the first patrol robot is scheduled to continue executing the originally executed task. This invention allows the original robot to continue executing tasks with smaller interruptions; for interruptions with larger interruptions, other robots take over, eliminating the need for the original robot to make an additional return trip, effectively reducing the robot's empty mileage and power consumption, extending the robot's single-operation endurance time, and improving the efficiency of task interruption handling.
[0039] Other beneficial effects of this application will be described in detail in the following detailed description section. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating a task interruption handling method for a patrol robot provided in one embodiment of this application;
[0042] Figure 2This is a schematic diagram of the structure of a task interruption handling device for a patrol robot provided in one embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0044] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0045] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0046] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0047] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0048] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0049] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0050] like Figure 1 As shown, Figure 1 This is a flowchart of a task interruption handling method for a patrol robot provided in an embodiment of the present invention. The task interruption handling method for a patrol robot includes the following steps:
[0051] 101. Upon receiving the task interruption signal from the first patrol robot, obtain the first task information of the first patrol robot that was originally performing the task.
[0052] In this embodiment of the invention, the aforementioned task interruption signal includes the interruption time and the interruption location. The aforementioned patrol robot refers to a robotic device capable of autonomously moving within a preset area and performing tasks such as patrolling, inspection, and monitoring, including but not limited to wheeled robots, tracked robots, and legged robots. The aforementioned task interruption signal refers to a trigger signal generated by the first patrol robot itself or the central scheduling system when the first patrol robot, while performing its original task, is unable to continue due to external instructions (such as preemption by a higher-priority task) or internal abnormalities (such as insufficient power or hardware failure). The aforementioned interruption signal includes at least the time of the interruption (interruption time) and the robot's location (interruption location). The aforementioned originally executing task refers to the patrol task that the first patrol robot was performing before receiving the task interruption signal. This task has preset task routes, path point sequences, expected execution time, and task objectives, collectively referred to as first task information. The aforementioned first patrol robot is the robot that interrupted its original task execution.
[0053] When the first patrol robot, while performing a patrol task (i.e., its original task), is unable to continue due to being reassigned to a higher-priority emergency task or due to its own malfunction, it generates a task interruption signal. Upon receiving this signal, the robot scheduling platform parses the interruption time and location contained within it. It then retrieves the complete information of the first robot's original task from the task database, i.e., the first task information. The first task information includes at least: the task route, the preset priority weights of each path point, the total task path length, the length of the executed path, the remaining path length, the total estimated task duration, the executed duration, and the remaining estimated duration. The task route includes the coordinates and order of all path points.
[0054] It should be noted that different locations can be configured with different priority weights within the original task execution path. For example, key locations such as park entrances and exits, and important equipment rooms have higher weights than ordinary roads, so that the importance of these locations can be reflected in subsequent generation value calculations.
[0055] 102. Based on the information from the first task, determine the first-generation value of the original task.
[0056] In this embodiment of the invention, the aforementioned cost value is a numerical value used to quantify the degree of impact of task interruption on the original task. The higher the cost value, the greater the negative impact of the interruption on the completion progress, importance, or timeliness of the original task.
[0057] Specifically, the core function of the first-generation value mentioned above is to quantify the impact caused by the interruption of the originally executing task. Generally speaking, the longer the remaining path length of the originally executing task, the greater the remaining estimated time, and the higher the importance of the interruption point in the task path, the greater the value of the first cost value.
[0058] In one possible embodiment, after obtaining the first task information, the central scheduling server needs to calculate the first-generation value of the originally executing task based on the first task information. The first-generation value is a numerical value used to quantify the degree of impact caused by the interruption of the originally executing task. Generally speaking, the higher the first-generation value, the greater the negative impact of the interruption on the originally executing task, and the more necessary it is to schedule other patrol robots to take over the execution; conversely, the lower the first-generation value, the smaller the impact of the interruption, and it is more reasonable for the first patrol robot to continue execution on its own.
[0059] The first task information includes at least: the length of the executed path, the remaining path length, the executed time, the remaining estimated time, and the preset priority weight of the interruption point within the task path. The first generation value can be calculated using various mathematical or logical methods based on one or more of the above information.
[0060] In one possible embodiment, after obtaining the first task information, the first-generation value of the originally executing task can be calculated based on the first task information. The first-generation value is a numerical value used to quantify the degree of impact caused by the interruption of the originally executing task. Generally speaking, the higher the first-generation value, the greater the negative impact of the interruption on the originally executing task, and the more necessary it is to schedule other patrol robots to take over the execution; conversely, the lower the first-generation value, the smaller the impact of the interruption, and it is more reasonable for the first patrol robot to continue the execution on its own.
[0061] In one possible embodiment, a multi-dimensional mapping table can be pre-established. The input dimensions of the mapping table include the remaining path length range, the remaining estimated time range, and the interruption location priority level. The output is the corresponding first-generation value. During actual operation, the corresponding value is looked up in the mapping table based on the first task information as the first-generation value.
[0062] In one possible embodiment, the remaining path length, remaining estimated duration, and interruption location priority weight can be fuzzified into membership functions (e.g., three levels: "small", "medium", and "large"). Then, fuzzy reasoning is performed using a preset fuzzy rule base (e.g., "if the remaining path length is large and the interruption location priority is high, then the first generation value is large"). Finally, the fuzzy reasoning is performed to obtain the specific value of the first generation value.
[0063] In one possible implementation, a regression model (e.g., linear regression, decision tree regression, neural network, etc.) can be pre-trained using historical interruption processing data. During actual operation, the first task information can be used as input features and fed into the regression model; the model output is the first generation value. This allows for the automatic learning of the optimal generation value mapping relationship from historical data, adapting to complex and ever-changing patrol environments.
[0064] The above calculation formula is only a specific example. Those skilled in the art will understand that the cost value can also be calculated using other mathematical combinations (such as product, nonlinear function, etc.), as long as it can reflect the combined impact of the remaining workload and the importance of the interruption point.
[0065] The next area is the predicted coverage area of an adjacent fixed camera after the tracked mobile stall leaves the current fixed camera's coverage area, based on its direction of movement. Determining the next area relies on a combined assessment of the event's duration and the direction of movement. The event's duration affects the predicted time it will leave the current area, while the direction of movement determines the location the stall will head towards.
[0066] The time it takes for a tracked mobile stall to move to the next area can be predicted based on the event's persistence. Specifically, the historical average dwell time of the tracked mobile stall in the current area can be obtained (e.g., calculated based on the stall's historical behavior data), and then the event persistence can be used to adjust this historical average dwell time. The higher the event persistence, the longer the adjusted predicted dwell time, meaning the tracked mobile stall will stay in the current area for a longer period. Adding the current time to the predicted dwell time gives the predicted time for the stall to leave the current area.
[0067] 103. If the value of the first generation is greater than the preset value threshold of the first generation, then based on the interruption time and interruption location, the second patrol robot is scheduled to perform the original task.
[0068] In this embodiment of the invention, the obtained first-generation value is compared with a pre-stored first-generation value threshold. The first-generation value threshold is a configurable parameter. For example, in areas with high security levels, the first-generation value threshold can be set lower to more sensitively trigger the takeover by the second patrol robot; in ordinary office parks, the first-generation value threshold can be set higher to prioritize the first patrol robot completing the task autonomously. The specific value of the first-generation value threshold can be determined through experiments or experience based on the actual application scenario, or it can be dynamically adjusted by the system administrator.
[0069] The comparison results are divided into two categories: the first-generation value is greater than the first-generation value threshold, and the first-generation value is less than the first-generation value threshold. It should be noted that when the first-generation value is exactly equal to the first-generation value threshold, it can be classified into either of the two cases depending on the system configuration.
[0070] When the value of the first generation exceeds the first generation value threshold, it indicates that the interruption of the original task has a significant impact. For example, the original task had just begun, and the remaining path was long; or the interruption point happened to be the most critical point in the entire patrol task, and interrupting the task would pose a high security risk. In this case, if we wait for the first patrol robot to complete the task corresponding to the interruption reason (such as performing an emergency task) before returning to continue, it will cause a long delay in the original task, affecting the overall task completion time of the system.
[0071] Therefore, the operation of scheduling a second patrol robot to perform the original task can be executed. Specifically, based on the interruption location, other available patrol robots can be searched as candidates within a preset area. Then, one of the candidate patrol robots is selected as the second patrol robot. The specific rules for selecting the second patrol robot are, for example, prioritizing idle robots, and if no idle robots are available, selecting the robot with the lowest cost of interrupting its own task.
[0072] Once the second patrol robot is selected, its original mission route, current interruption point, and remaining path information can be sent to it. The second patrol robot is then instructed to resume its original mission route from the interruption point. The first patrol robot is then released and either performs the emergency task that caused the interruption or enters standby mode.
[0073] 104. If the value of the first generation is less than the preset threshold value of the first generation, then the first patrol robot is scheduled to continue to perform its original task.
[0074] In this embodiment of the invention, when the first-generation value is less than the first-generation value threshold, it indicates that the interruption of the original task has a minor impact. For example, the original task was nearing completion, and the remaining path was very short; or the priority weight of the interruption location was low, and interrupting the task would not cause a significant impact. In this case, it is unnecessary to schedule other patrol robots to take over, because scheduling itself will also incur communication overhead, path planning overhead, and possible task handover delays.
[0075] Therefore, the operation of scheduling the first patrol robot to continue performing its original task can be executed. Specifically, a continuation command is sent to the first patrol robot. After completing the task that caused its interruption, such as completing an emergency task or repairing a fault, the first patrol robot returns to the execution flow of its original task according to the issued command.
[0076] In this embodiment of the invention, upon receiving a task interruption signal from the first patrol robot, the first task information of the original task performed by the first patrol robot is obtained. The task interruption signal includes the interruption time and the interruption location. Based on the first task information, the first generation value of the original task is determined. If the first generation value is greater than a preset first generation value threshold, then based on the interruption time and the interruption location, a second patrol robot is scheduled to perform the original task. If the first generation value is less than the preset first generation value threshold, then the first patrol robot is scheduled to continue performing the original task. This invention allows the original robot to continue performing tasks with lower value interruptions, while allowing other robots to take over tasks with higher value interruptions. The original robot does not need to make an additional return trip, effectively reducing the robot's empty mileage and power consumption, extending the robot's single-operation endurance time, and improving the efficiency of task interruption handling.
[0077] It is understood that in the specific implementation of this application, data related to behavioral data, graph data, content data, user data, etc. are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required. Furthermore, the collection, use and processing of related data, as well as the training, deployment and invocation of algorithm models, must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0078] Optionally, in the step of determining the first-generation value of the original task based on the first task information, the length of the executed path and the remaining path length of the original task can be obtained; and the execution time and the remaining estimated time of the original task can be obtained; the first-generation value can be calculated based on the first ratio of the executed path length to the remaining path length, the second ratio of the executed time to the remaining estimated time, and the preset priority weight of the original task at the interruption point. In the task path of the original task, different locations correspond to different priority weights.
[0079] In this embodiment of the invention, the executed path length refers to the actual path length traversed along the preset task route from the original starting point of the task to the interruption point. The executed path length can be calculated by summing the coordinates of the path points already traversed by the first patrol robot. The remaining path length refers to the remaining path length along the preset task route from the interruption point to the original task endpoint. The remaining path length is equal to the total task path length minus the executed path length. The first ratio is the ratio of the remaining path length to the total task path length of the original task. The first ratio reflects the proportion of remaining workload of the original task when the interruption occurred, and its value ranges from 0 to 1. The larger the first ratio, the greater the amount of unfinished task caused by the interruption. The executed time refers to the time elapsed from the start of the original task to the interruption time. The executed time is recorded by the task timing module of the patrol robot. The remaining estimated time refers to the time required from the interruption point to the task endpoint, estimated based on the preset travel speed of the original task and the remaining path length. The remaining estimated time can be calculated by dividing the remaining path length by the average movement speed, or it can be estimated based on the segmented time consumption in historical task data. The second ratio mentioned above is the ratio of the remaining estimated time to the total estimated time of the task originally being executed. The total estimated time of the task is equal to the sum of the executed time and the remaining time. The second ratio represents the percentage of the original task's remaining execution time when the interruption occurred, and its value ranges from 0 to 1. The larger the second ratio, the more severe the impact of the interruption on the task's timeliness.
[0080] The preset priority weights are importance values pre-configured for different locations within the original task execution path. Different locations within the original task execution path correspond to different preset priority weights. Priority weights can be preset based on one or more of the following factors: a location's security level (e.g., core server room areas have the highest weight, ordinary passageways have the lowest weight), the frequency of historical abnormal events at a location (areas with frequent events have higher weights), and the location's criticality in the patrol logic (e.g., essential routes or monitoring blind spots have higher weights). These priority weights can be normalized to a uniform value range (e.g., between 0 and 1) for combined calculations with other factors.
[0081] The preset priority weight at the interruption location is a priority weight value pre-configured on the path points corresponding to the interruption location. The preset priority weight at the interruption location can participate in the calculation of the first cost value. The higher the weight, the more critical the location of the interruption, and the greater the cost caused by interrupting the original task execution.
[0082] The length of the executed path and the remaining path length of the original task are read from the first task information. The length of the executed path can be calculated based on the position coordinates reported by the first patrol robot at the time of interruption, combined with the coordinates of path points in the task route. The remaining path length can be obtained by subtracting the length of the executed path from the total task path length, or it can be directly read from the first task information.
[0083] The execution time and estimated remaining time of the originally executed task are read from the first task information. The execution time is determined by the difference between the task start time and the interruption time of the first patrol robot. The estimated remaining time can be calculated based on the remaining path length and the preset average movement speed of the first patrol robot, or it can be assigned a value based on the typical time taken for the remaining path of the task in historical statistics.
[0084] Based on the acquired data, the aforementioned robot scheduling platform calculates the following two ratios:
[0085] The first ratio = Remaining path length ÷ Total task path length.
[0086] The second ratio = Remaining estimated time ÷ Total estimated time of the task.
[0087] The total task path length is equal to the sum of the executed path length and the remaining path length, and the total estimated task duration is equal to the sum of the executed duration and the remaining estimated duration.
[0088] Based on the location of the interruption point within the original task route, the preset priority weight corresponding to that location is retrieved from the task route configuration data. It should be noted that different locations within the original task route can be configured with different priority weights. For example, critical locations such as park entrances / exits, important equipment rooms, and hazardous materials storage areas can be configured with higher priority weights (e.g., 0.9), while ordinary patrol roads can be configured with lower priority weights (e.g., 0.1). The specific values of these priority weights can be preset by the system administrator according to the actual scenario, or they can be dynamically learned and updated based on historical event data.
[0089] The first generation value is calculated based on the first ratio, the second ratio, and the preset priority weight at the interruption location.
[0090] The first-generation value is calculated using a weighted summation method. Specifically, the first ratio, the second ratio, and the preset priority weights at the interruption locations are each assigned a preset weight coefficient, and then a weighted summation is performed to obtain the first-generation value. The calculation formula is as follows:
[0091]
[0092] in, , , The preset weighting coefficients are used, and they satisfy the following conditions: Alternatively, it can be set to other positive values based on actual needs. The aforementioned weighting coefficients can be dynamically adjusted based on the original task type (e.g., scheduled inspections, random checks, key area protection) or the security level of the patrolled area. For example, in time-sensitive tasks (such as time-limited full-area inspections), the weighting coefficients can be adjusted accordingly. The time weight is set relatively high; in path-length sensitive tasks (such as patrolling large sparse areas), it can be... The path weight is set relatively high; in key area protection tasks, it can be... The (location weight) is set too high. By adjusting the above weight coefficients, the first-generation value can more accurately reflect the true extent of the interruption impact in different scenarios.
[0093] In one possible embodiment, the above-mentioned weighting coefficients , , Default values can be used, for example , , This is to reflect the dominant role of remaining path length and remaining estimated duration in the impact of interruptions, while also taking into account the importance of the interruption points.
[0094] In one possible embodiment, the aforementioned weighting coefficients can be adaptively adjusted based on the preset priority of the originally executed tasks. For example, for high-priority originally executed tasks, the weighting coefficients can be appropriately increased. The value of is determined to strengthen the impact of the importance of the interruption point on the cost, making it easier for this type of task to trigger the takeover of the second patrol robot, thereby ensuring the completion quality of high-priority tasks.
[0095] In one possible embodiment, the first ratio, the second ratio, and the preset priority weight at the interruption point can be normalized before participating in the weighted summation to ensure that the three are on the same scale. Since all three have been normalized to the 0 to 1 range, they can be directly weighted summed.
[0096] Optionally, in the step of scheduling the second patrol robot to perform its original task based on the interruption time and interruption location, candidate patrol robots can be searched within a preset area based on the interruption location; based on the task status of the candidate patrol robots, patrol robots in an idle state can be selected as the second patrol robot; if there are no idle patrol robots, then patrol robots with a value less than the first cost value that interrupted the current task from the interruption time can be selected as the second patrol robot; and the second patrol robot can be scheduled to perform the original task.
[0097] In this embodiment of the invention, the aforementioned preset area refers to a geographical area defined by the interruption location as the center and a preset distance as the radius. The preset area defines the spatial range within which the robot scheduling platform searches for candidate patrol robots. The size of the preset area can be dynamically adjusted according to factors such as the distribution density of patrol robots, communication latency, and task urgency. For example, in a densely deployed park, the preset area can be set smaller (e.g., 50 meters) to quickly find a nearby replacement robot; in a sparsely deployed factory area, the preset area can be set larger (e.g., 200 meters) to ensure that a usable candidate robot can be found.
[0098] The aforementioned candidate patrol robots refer to all patrol robots located within the aforementioned preset area and in normal working condition (i.e., not faulty, not offline, and with sufficient power). These candidate patrol robots form the shortlist for the subsequent selection of a second patrol robot. The aforementioned task status refers to the current working status of each patrol robot, including at least two states: idle and non-idle. An idle state indicates that the patrol robot is not currently performing a task and can immediately accept a new task assignment; a non-idle state indicates that the patrol robot is currently performing a task, including patrol tasks, emergency tasks, or other types of tasks. The aforementioned idle patrol robot refers to a patrol robot in an idle state. Idle patrol robots are the preferred candidates for scheduling task replacement because scheduling idle robots will not interrupt any currently executing tasks and will not affect other tasks. The aforementioned second-generation value refers to the quantified value of the impact caused by the interruption of a non-idle patrol robot's current task when the robot scheduling platform considers interrupting that task. The calculation method for the second cost value is the same as that for the first-generation value, i.e., it is calculated by weighted summation based on the length of the executed path, the remaining path length, the executed time, the remaining estimated time, and the preset priority weights at the breakpoints of the non-idle patrol robot's current task. The higher the second-generation value, the greater the negative impact caused by interrupting the current task of the non-idle patrol robot.
[0099] Interrupting the currently executing task from the aforementioned interruption time means that at the aforementioned interruption time, the task being executed by a non-idle patrol robot is forcibly terminated, and the robot is then put in charge of the task.
[0100] Specifically, based on the aforementioned interruption location, candidate patrol robots are searched within a preset area. Using the interruption location as the center and the preset area as the radius, all patrol robots located within this radius are searched. The search can be performed by spatial matching using the real-time positioning data of each patrol robot (e.g., GPS coordinates, UWB positioning, or SLAM positioning), filtering out patrol robots whose distance from the interruption location is less than or equal to the preset radius. Simultaneously, the first patrol robot itself, as well as patrol robots that are in a faulty, offline, or severely low-battery state, must be excluded.
[0101] In one possible embodiment, the radius of the preset area can be dynamically adjusted based on the remaining path length of the original task. For example, when the remaining path length is large, the preset area can be appropriately expanded to increase the probability of finding a candidate patrol robot; when the remaining path length is small, the preset area can be reduced to prioritize the selection of a replacement robot closer to the interruption point, thereby reducing the empty driving distance of the replacement robot.
[0102] In one possible embodiment, if no candidate patrol robot is found within the aforementioned preset area, the robot scheduling platform can gradually expand the preset area (e.g., increasing by 50 meters each time) until at least one candidate patrol robot is found. If no robot is available even after expanding the entire patrol area, the robot that was originally performing the task is marked as waiting for replacement, and manual intervention is triggered or the robot automatically resumes operation after completing its task.
[0103] Based on the task status of the candidate patrol robots, the idle patrol robots are selected as the second patrol robots; the current task status of each candidate patrol robot is obtained. For each candidate patrol robot, its task queue can be queried. If the task queue of a candidate patrol robot is empty, it is determined that the candidate patrol robot is in an idle state.
[0104] Among all candidate patrol robots, those that are currently idle can be prioritized. If at least one idle patrol robot exists, it can be selected as the second patrol robot mentioned above.
[0105] In one possible embodiment, if multiple idle patrol robots exist, the robot scheduling platform can select one from them according to a preset selection rule. For example, the idle patrol robot closest to the interruption point can be selected as the second patrol robot to reduce its travel time and energy consumption to reach the interruption point. Alternatively, the idle patrol robot with the most sufficient battery power can be selected as the second patrol robot to ensure it can complete the remaining part of the original task. The selection rule can be further defined in subsequent dependent embodiments; this step only requires the ability to filter out idle patrol robots.
[0106] If there are no idle patrol robots, then the second patrol robot with a value less than the first cost value that interrupted the current task execution from the above interruption time will be selected from the candidate patrol robots.
[0107] If no idle patrol robots are found within the aforementioned preset area (i.e., all candidate patrol robots are in a non-idle state), the robot scheduling platform needs to evaluate whether it is worthwhile to interrupt the current task of each non-idle patrol robot. Specifically, for each non-idle candidate patrol robot, the robot scheduling platform calculates the second-generation value required to interrupt its current task execution during the aforementioned interruption time.
[0108] The calculation method for the second cost value can be consistent with the calculation method for the first cost value to facilitate direct comparison between the two. That is, the second task information of the non-idle patrol robot currently executing the task is obtained. The second task information includes the length of the executed path, the remaining path length, the executed time, the remaining estimated time, and the preset priority weight at the breakpoint. The second-generation value is calculated by weighted summation.
[0109] The second-generation value of each non-idle candidate patrol robot is compared with the first-generation value mentioned above. Non-idle candidate patrol robots with a second-generation value lower than their first-generation value are selected. The overall benefit is ensured by ensuring that interrupting the current task of the non-idle patrol robot is less impactful than not taking over the previously performed task (i.e., the impact of a prolonged delay in the previously performed task).
[0110] In one possible embodiment, if there are multiple non-idle candidate patrol robots that meet the condition that the value of the second generation is less than the value of the first generation, the robot scheduling platform can select the one with the smallest second-generation value as the second patrol robot to minimize the negative impact of interrupting the current task. Alternatively, it can select the one with the largest difference between the value of the second generation and the value of the first generation to maximize the overall benefit of the replacement. The above selection rule can be further defined in subsequent embodiments.
[0111] In one possible implementation, if there are no second-generation non-idle candidate patrol robots with a value less than that of the first generation, it means that interrupting any currently executing task would cause a greater loss than not taking over. In this case, the robot scheduling platform can abandon scheduling the second patrol robot and instead wait for the first patrol robot to complete the transaction that caused the interruption before resuming the original task, or mark the original task as a high-cost waiting state and trigger manual intervention.
[0112] After identifying the second patrol robot, the robot dispatching platform issues a dispatch instruction to it. This dispatch instruction includes at least: the original mission route, the interruption point, remaining path information, and the mission objective.
[0113] If the second patrol robot is an idle patrol robot, it will directly receive instructions, navigate to the interruption point, and continue its mission along the remaining part of the original mission route from the interruption point.
[0114] If the second patrol robot is a non-idle patrol robot (i.e., selected by interrupting its current task), the robot scheduling platform first sends an interrupt signal to the second patrol robot to interrupt its current task. After the second patrol robot confirms the interruption, it then issues the takeover instruction for the original task. The interrupted current task of the second patrol robot can be marked as pending recovery so that it can be continued by the robot or another robot, or it can be directly marked as canceled, depending on the task priority and system configuration.
[0115] In one possible embodiment, while scheduling the second patrol robot to perform its original task, the robot scheduling platform also needs to update the task status of the first patrol robot. The first patrol robot is then released to perform the task that caused its interruption (such as a higher-priority emergency task), or enters a standby state to await subsequent task assignments.
[0116] In this embodiment of the invention, idle patrol robots are preferentially scheduled to take over the originally executing tasks based on the interruption location, avoiding unnecessary interference with the ongoing tasks. When no idle robots are available, tasks with lower interruption costs are selectively interrupted by comparing the value of the first generation with the value of the second generation of each non-idle patrol robot, thereby minimizing overall system losses.
[0117] Optionally, in the step of selecting patrol robots from the candidate patrol robots whose second-generation value is less than the first cost value if the current task is interrupted from the interruption time, the second task information of the current task being executed by each non-idle candidate patrol robot can be obtained, the second-generation value required if the current task is interrupted from the interruption time can be calculated, the second-generation value can be compared with the first-generation value, and the candidate patrol robot with the largest difference between the second-generation value and the first-generation value can be selected as the second patrol robot.
[0118] In this invention, the currently executing task refers to the task that the non-idle candidate patrol robot is executing during the interruption time. The currently executing task has its own task information, including the task route, the length of the executed path, the remaining path length, the executed duration, the remaining estimated duration, and the preset priority weights of each path point, collectively referred to as the second task information. The second task information refers to all preset and real-time data related to the currently executing task of the non-idle candidate patrol robot, including at least: the total task path length, the length of the executed path, the remaining path length, the total estimated task duration, the executed duration, the remaining estimated duration, and the preset priority weights at the interruption point (i.e., the current position of the patrol robot) assuming the task is interrupted during the interruption time. The calculation method for the second cost value can use the same calculation logic as the first-generation value, that is, it is calculated based on the second task information using a weighted summation method. Specifically, the second-generation value = α′ × (remaining path length of the task / total path length of the task) + β′ × (remaining estimated time of the task / total estimated time of the task) + γ′ × (preset priority weight at the interruption point). Here, α′, β′, and γ′ are weighting coefficients, which can be the same as α, β, and γ in the first-generation value calculation, or they can be set independently according to the type of interrupted task. A higher second-generation value indicates a greater negative impact caused by interrupting the current task of the non-idle candidate patrol robot.
[0119] The difference between the first-generation value and the second-generation value is the net benefit of scheduling the non-idle candidate patrol robot to take over the original task. The larger the difference, the greater the loss avoided by taking over the original task compared to the loss caused by interrupting the robot's current task, and therefore the higher the overall efficiency of scheduling the robot.
[0120] Among all non-idle candidate patrol robots that meet the condition that the value of the second generation is less than that of the first generation, the one that maximizes the difference is selected to maximize the overall benefit of the task scheduling.
[0121] Specifically, the second patrol robot, whose value is less than the first cost value, is selected from the candidate patrol robots and whose current task is interrupted from the interruption time.
[0122] For each non-idle candidate patrol robot, obtain the second task information of the currently executed task. Iterate through all non-idle candidate patrol robots. For each non-idle candidate patrol robot, read the complete information of its currently executed task from its task database, i.e., the aforementioned second task information. The aforementioned second task information includes at least: the total path length of the currently executed task; the path length already executed by the robot during the aforementioned interruption time (calculated based on the robot's reported position coordinates at the interruption time and its task route); the remaining path length (equal to the total task path length minus the already executed path length); the total estimated duration of the currently executed task; the duration already executed by the robot during the aforementioned interruption time (equal to the difference between the task start time and the aforementioned interruption time); the remaining estimated duration (calculated based on the remaining path length and the robot's preset average movement speed); and the preset priority weight corresponding to the robot's position (i.e., the interruption point) within the task route of the currently executed task.
[0123] Calculate the second-generation value required for the aforementioned non-idle candidate patrol robot to interrupt its current task execution from the interruption time. Based on the acquired second task information, calculate the second-generation value of the non-idle candidate patrol robot. The calculation method for the second cost value should be consistent with the calculation method for the first cost value to ensure that the comparison between the two has the same dimensions and benchmark.
[0124] In one possible embodiment, the second-generation value is calculated using the same weighted summation formula as the first-generation value:
[0125]
[0126] in, and These are the remaining path length and the total path length of the currently executing task, respectively. and These are the remaining estimated duration and the total estimated duration of the task, respectively. This sets the preset priority weights at the breakpoint. The weight coefficients α′, β′, and γ′ can use the same values as in the first-generation value calculation (e.g., α′=0.4, β′=0.4, γ′=0.2), or they can be set independently according to the task type of the currently executing task. To simplify system design, both are usually set to be the same.
[0127] In one possible embodiment, if the robot scheduling platform has pre-calculated and cached the value of the current task being performed by each patrol robot (e.g., updated periodically), the cached value can be directly read as the second-generation value without recalculation, thus improving response speed.
[0128] The second-generation value is compared with the first-generation value. For each non-idle candidate patrol robot, the robot scheduling platform compares its calculated second-generation value with the previously determined first-generation value.
[0129] If the value of the second-generation robot is greater than that of the first-generation robot, it means that the loss caused by interrupting the robot's current task is greater than the loss caused by not taking over the original task. In this case, scheduling the robot to take over would be counterproductive, and the candidate robot should be excluded.
[0130] If the value of the second generation equals the value of the first generation, it means the interruption loss is equal to the non-replacement loss. In this case, scheduling or not scheduling has no impact on the overall system benefit, and the decision to retain the candidate robot can be made based on the system configuration. In a preferred embodiment, such candidate robots are excluded to reduce unnecessary task interruptions.
[0131] If the value of the second generation is less than that of the first generation, it means that the loss caused by interrupting the robot's current task is less than the loss caused by not taking over the original task. In this case, scheduling the robot to take over can bring a positive net benefit, and the candidate robot is retained for the next screening step.
[0132] The candidate patrol robot with the largest difference between its second-generation value and its first-generation value is selected as the second patrol robot. For all non-idle candidate patrol robots that meet the condition that their second-generation value is less than their first-generation value, the robot scheduling platform calculates the difference for each candidate robot:
[0133]
[0134] This difference reflects the net benefit gained from scheduling the candidate robot to take over the original task. The larger the difference, the higher the overall efficiency of scheduling the robot.
[0135] From all candidate robots, the one with the largest difference is selected as the second patrol robot. If multiple candidate robots have the same maximum difference, further selection can be made according to preset secondary selection rules, such as selecting the one closest to the interruption location, the one with the most sufficient battery power, or the one with the lowest second-generation value.
[0136] In one possible implementation, if the second-generation value of no non-idle candidate patrol robot is less than the first-generation value (i.e., the second-generation value of all candidate robots is greater than or equal to the first-generation value), it indicates that scheduling any non-idle robot to take over within the current preset area would cause a greater overall loss. In this case, scheduling the second patrol robot can be abandoned, and the robot can wait for the first patrol robot to complete the interrupted transaction before resuming its original task; alternatively, the preset area can be expanded, and a search for eligible patrol robots can be repeated within a larger area; the original task can be marked as a high-cost waiting state, triggering manual intervention or reporting to the system administrator.
[0137] The second patrol robot selected by the dispatcher will execute the original task. After the second patrol robot is selected, an interruption signal is sent to it to terminate its current task. After the robot confirms the interruption, a takeover instruction for the original task is issued, including the original task route, the interruption location, the remaining path information, and the task objective. The second patrol robot navigates to the interruption location and continues execution along the remaining part of the original task route from that location.
[0138] For interrupted currently executing tasks, based on the task's importance and remaining value, it can be marked as pending recovery (so that it can be continued by the same robot or another robot later), or directly marked as canceled. If marked as pending recovery, the task can be automatically resumed when resources become available later.
[0139] Optionally, in the step of scheduling the first patrol robot to continue performing its original task if the first generation value is less than a preset first generation value threshold, if the first generation value is less than or equal to the preset first generation value threshold and the first generation value is greater than the preset second generation value threshold, then the first patrol robot is scheduled to continue performing its original task starting from the interruption point; if the first value is less than or equal to the preset second generation value threshold, then a connecting point is predicted in the path of the original task, and the first patrol robot is scheduled to continue performing its original task starting from the connecting point, where the second generation value threshold is less than the first generation value threshold.
[0140] In this embodiment of the invention, the aforementioned second-generation value threshold refers to another preset numerical benchmark, the value of which is less than the aforementioned first-generation value threshold. Specifically, the aforementioned second-generation value threshold divides the interval where the first-generation value is less than the first-generation value threshold into two sub-intervals: one is the interval where the first-generation value is greater than the second-generation value threshold (i.e., moderate interruption impact), and the other is the interval where the first-generation value is less than or equal to the second-generation value threshold (i.e., very slight interruption impact). The aforementioned second-generation value threshold can be determined through experiments or experience based on actual application scenarios, or it can be dynamically adjusted by the system administrator. For example, in scenarios where energy conservation is emphasized, the second-generation value threshold can be set higher to encourage the use of predicted connection points in more situations, thereby reducing the robot's empty travel distance.
[0141] The aforementioned resuming point is an optimal resuming point predicted by the robot scheduling platform within the original task path. This resuming point is not necessarily the interruption point, but rather a point selected from unexecuted path points according to preset rules (such as closest distance, highest priority, etc.). The first patrol robot continues to execute the original task from the aforementioned resuming point without returning to the original interruption point.
[0142] Specifically, when the value of the first generation is less than the preset threshold value of the first generation, the first patrol robot is scheduled to continue performing the original task.
[0143] The first-generation value is compared with a preset second-generation value threshold. The robot scheduling platform first obtains the preset second-generation value threshold. This second-generation value threshold is a pre-configured value, ranging from 0 to the first-generation value threshold. Then, the robot scheduling platform compares the first-generation value calculated in step 102 with the second-generation value threshold. The comparison results are categorized as follows: the first-generation value is greater than the second-generation value threshold (and necessarily less than or equal to the first-generation value threshold, as this is a prerequisite for proceeding to this step); and the first-generation value is less than or equal to the second-generation value threshold.
[0144] It should be noted that when the value of the first generation is exactly equal to the value threshold of the second generation, a predictive handover point approach can be used to prioritize the adoption of a more energy-efficient strategy.
[0145] If the first-generation value is less than or equal to a preset first-generation value threshold, and the first-generation value is greater than a preset second-generation value threshold, then the first-generation value falls within the range between the second-generation value threshold and the first-generation value threshold. This indicates that the interruption of the original task execution has a moderate impact—neither severe enough to require dispatching a second patrol robot to take over, nor extremely minor. Since a considerable portion of the original task has already been executed, incurring certain time and path costs, continuing execution directly from the interruption point is reasonable, and the additional overhead of returning to the interruption point is acceptable.
[0146] Therefore, the robot scheduling platform executes the first patrol robot to resume its original task from the interruption point.
[0147] Specifically, a continuation command is sent to the first patrol robot. This command includes the coordinates of the interruption point and the original task route. After completing the task that caused the interruption (e.g., completing a higher-priority emergency task), the first patrol robot navigates back to the interruption point according to the command and continues execution along the remaining part of the original task route from the interruption point until the task ends.
[0148] In one possible embodiment, the robot scheduling platform can verify the validity of the interruption point before executing the resume function. For example, if the interruption point is inaccessible due to temporary obstacles or safety reasons, the robot scheduling platform can automatically adjust to continue execution from the nearest reachable path point to the interruption point, or trigger a replanning of the path.
[0149] In one possible embodiment, a time requirement for the first patrol robot to reach the interruption point can also be issued to ensure the timeliness of the originally performed task. If the first patrol robot takes too long to perform an emergency task, causing the remaining tasks to time out after returning to the interruption point, the system can dynamically upgrade the strategy and schedule a second patrol robot to take over.
[0150] If the first-generation value is less than or equal to a preset second-generation value threshold, then the first-generation value falls within the range of 0 to the second-generation value threshold (inclusive). This indicates that the interruption of the original task execution was very minor. The original task was nearing completion, with a short remaining path; or the interruption point had extremely low priority; or both. In this case, requiring the first patrol robot to return to the original interruption point might result in unnecessary long-distance empty travel due to the emergency task causing it to be far from the interruption point, wasting time and energy. Therefore, a better strategy is to predict a more suitable resuming point, allowing the first patrol robot to directly proceed to that point to continue execution.
[0151] Therefore, the system predicts the next location on the original task path and schedules the first patrol robot to continue the original task operation from the next location.
[0152] Specifically, the robot scheduling platform first needs to predict a resuming point. This resuming point should be located in the unexecuted portion of the original task route (i.e., a path point from the interruption point to the task endpoint). There are various methods for predicting the resuming point, such as:
[0153] The following options are available: 1) Select the unexecuted path point closest to the expected return location of the first patrol robot after completing its emergency task as the reconnection point; 2) Select the unexecuted path point with the highest preset priority weight as the reconnection point; 3) Select the unexecuted path point closest to the interruption point as the reconnection point; 4) Dynamically calculate the most energy-efficient reconnection point based on the remaining battery power and expected travel time of the first patrol robot.
[0154] After determining the aforementioned resuming point, a continuation command is sent to the first patrol robot. This command includes the coordinates of the resuming point and the original task route (the portion starting from the resuming point). After completing the task that caused the interruption, the first patrol robot directly navigates to the resuming point and continues execution along the remaining portion of the original task route until the task's endpoint. Since the first patrol robot does not need to return to the original interruption point, significant travel distance and energy consumption are saved.
[0155] In one possible implementation, if the aforementioned continuation point happens to be the aforementioned interruption point itself (e.g., when the aforementioned interruption point is already the closest or highest priority point in the unexecuted path), then the prediction result is actually equivalent to starting from the interruption point. In this case, the execution results of the two strategies are the same.
[0156] After completing the above scheduling operations, update the status of the original task, record the continuing execution method of the first patrol robot (breakpoint resumption or predicted resuming point), and generate corresponding log information for subsequent analysis and optimization of threshold settings.
[0157] Optionally, in the step of predicting the successor location in the original task execution path, the priority weight of each unexecuted path point in the original task execution path can be obtained; the unexecuted path point with the highest priority weight is selected as the successor location.
[0158] In this embodiment of the invention, the aforementioned unexecuted path points refer to all path points located after the aforementioned interruption point (i.e., not yet traversed by the aforementioned first patrol robot) within the original task route. The original task route consists of a series of ordered path points, each with coordinates, a sequence number, and a preset priority weight. All path points from the aforementioned interruption point (excluding the interruption point itself, or, depending on the system configuration, including the interruption point) to the task endpoint are considered unexecuted path points. It should be noted that the aforementioned interruption point may be exactly one path point, or it may be located between two path points. When the interruption point is located between two path points, unexecuted path points typically refer to all path points from the next path point to the endpoint.
[0159] Specifically, the priority weights of each unexecuted path point in the original task execution path are obtained. Which path points in the original task execution route are unexecuted path points are determined. Based on the location of the interruption point in the task route, all path points located after the interruption point are identified. This identification can be achieved by comparing the sequential number of the path point with the number of the last path point traversed by the first patrol robot, thereby determining the starting index of the unexecuted path points.
[0160] The system reads the preset priority weight corresponding to each unexecuted path point from the task route configuration data. These priority weights can be static values pre-stored in the database or dynamic values periodically synchronized from the cloud. For each unexecuted path point, the robot scheduling platform records its path point identifier (such as coordinates or sequence number) and its priority weight.
[0161] In one possible embodiment, if the interruption point is located exactly between two path points (rather than exactly on a path point), there are two ways to process it: treat the next path point as the first unexecuted path point; or treat the interruption point itself as a temporary path point and assign it a weight (e.g., calculate based on the weights of two adjacent path points).
[0162] Compare the priority weights of all the unexecuted path points and find the one with the highest weight. One method for this comparison is to iterate through all unexecuted path points, record the current maximum weight and its corresponding path point, and finally obtain the unexecuted path point with the highest priority weight.
[0163] In one possible implementation, if multiple unexecuted path points have the same highest priority weight, the robot scheduling platform needs to select one as the successor location. In this case, a preset two-level selection rule can be used, for example:
[0164] Choose the one closest to the aforementioned interruption point to reduce the travel distance of the first patrol robot from the emergency mission completion location to the resuming location; or choose the one that is first in the mission route (i.e., the one that will be passed first) to make the subsequent patrol path more continuous; or choose the one closest to the expected return location of the first patrol robot after completing the emergency mission.
[0165] After determining the aforementioned rendezvous point, the coordinates of the rendezvous point and the remaining task route starting from that point can be encapsulated into a continuation command and issued to the first patrol robot. After completing the task that caused its interruption (such as completing an emergency task), the first patrol robot directly navigates to the aforementioned rendezvous point and continues execution from that point along the remaining part of the original task route until the task's endpoint.
[0166] In one possible embodiment, a skip path segment identifier can also be included in the instruction, explicitly informing the first patrol robot that it does not need to traverse the path segment between the interruption point and the rejoining point, thereby avoiding unnecessary movement.
[0167] Selecting the highest priority unexecuted path point as the continuation point ensures that the most important and most monitored points in the entire patrol mission are completed first, improving the effectiveness and safety of the patrol mission.
[0168] Optionally, before determining the first generation value of the original task based on the first task information, the interruption reason indicated by the task interruption signal can also be obtained; when the interruption reason is that the first patrol robot has an abnormality, the second patrol robot is directly dispatched to start from the interruption point to take over the original task, and the first patrol robot is controlled to exit the task.
[0169] In this embodiment of the invention, the aforementioned interruption reason refers to the root cause that triggers the aforementioned task interruption signal. The aforementioned task interruption signal carries an interruption reason field, used to distinguish different types of interruption events. Interruption reasons include at least two main categories: high-priority task preemption and robot anomalies.
[0170] The first patrol robot mentioned above proactively interrupts its current task due to receiving a higher-priority emergency task (such as fire confirmation or intrusion alarm). In this situation, the first patrol robot remains in normal working order and can continue to perform other tasks after completing the emergency task.
[0171] The aforementioned first patrol robot is unable to continue performing any tasks, or even move autonomously, due to internal or external reasons such as hardware or software malfunctions (e.g., motor damage, sensor failure, system crash), severely depleted battery (below the safety threshold), or blocked paths. In this situation, the first patrol robot lacks the ability to continue performing its original tasks and cannot recover within a foreseeable timeframe.
[0172] The aforementioned anomalies specifically refer to abnormal states that occur in the first patrol robot, preventing it from continuing to perform its original tasks and preventing it from recovering on its own within a short period of time. Anomalies may include situations such as battery level falling below a preset forced shutdown threshold, drive motor failure, navigation system malfunction, communication interruption, or encountering physical obstacles that it cannot bypass. When an anomaly occurs, the first patrol robot typically reports the abnormal state proactively, or its loss of contact is detected by the robot scheduling platform through heartbeat detection.
[0173] Since the abnormal interruption means that the first patrol robot has lost its ability to continue performing its task, it is meaningless to conduct a cost assessment at this point, because regardless of the cost, the first patrol robot cannot continue to perform its task on its own. A second patrol robot can be directly dispatched to take over, saving decision-making time and restoring the original task execution as quickly as possible. An exit command is sent to the first patrol robot, causing it to stop all activities related to the original task, release the occupied task resources, and enter the appropriate subsequent state based on the type of abnormality (e.g., entering maintenance mode, automatically returning to the charging station, or waiting for manual intervention). Simultaneously, the robot scheduling platform removes the original task from the first patrol robot's task queue and updates the task status to "taken over" or "awaiting recovery."
[0174] The second patrol robot navigates directly to the point where the first patrol robot broke down (i.e., the location where the anomaly occurred), and from that point continues execution along the remaining portion of the original task route. Similar to the scheduling in the above embodiments, instead of performing idle robot screening or cost-benefit comparisons, scheduling is executed directly.
[0175] Specifically, after receiving the aforementioned task interruption signal, the robot scheduling platform not only parses the interruption time and location, but also parses the interruption reason field carried in the signal. This interruption reason field can be a predefined enumerated value, such as: high-priority task preemption; insufficient battery power; hardware failure; path blockage; communication loss, etc.
[0176] The value of the interruption reason field is matched against a predefined list of exception reasons. If a match is found, the robot is considered to have malfunctioned; if a high-priority task preemption is matched, the preemption is considered normal, and subsequent tasks continue to be executed.
[0177] In one possible embodiment, the above-mentioned interruption cause may also include more granular information, such as the severity of the anomaly (recoverable anomaly, unrecoverable anomaly), the estimated recovery time, etc.
[0178] If the interruption is caused by a high-priority task preemption, then proceed to calculate the first generation value and subsequent processes.
[0179] If the interruption is due to a robot malfunction, the exception handling process will be initiated.
[0180] When the first patrol robot is determined to be malfunctioning, the robot scheduling platform immediately performs a takeover scheduling. It calculates the first-generation value and uses this value to locate a suitable second patrol robot. The second patrol robot then takes over, resuming the original task execution as quickly as possible.
[0181] Based on the aforementioned interruption locations, search for other available patrol robots within a preset area. Available patrol robots refer to robots that are in normal working condition (not faulty, not offline, and with sufficient power). Prioritize patrol robots that are idle; if no idle robots are available, select the non-idle robot with the lowest interruption cost for currently executing its task (i.e., the robot with the lowest second-generation value), or directly select any available robot based on the system configuration.
[0182] Issuing a takeover instruction: The robot dispatching platform issues a takeover instruction to the selected second patrol robot. The takeover instruction includes at least: the original mission route, the interruption location, the remaining path information, and the mission objective.
[0183] Execution of takeover: The second patrol robot navigates to the aforementioned interruption point and, starting from that point, continues along the remaining portion of the original mission route until the mission ends.
[0184] In one possible embodiment, if no available second patrol robot can be found within a preset area (e.g., all other patrol robots are in a faulty state or have severely low power), the robot scheduling platform can mark the robot that was originally performing the task as an abnormal waiting state and trigger manual intervention or send an alarm to the system administrator.
[0185] While dispatching the second patrol robot to take over, the robot dispatching platform also needs to process the first patrol robot's exit. Specifically, it sends an exit command to the first patrol robot (if communication is still normal), requiring it to stop all task-related activities and release task resources. The robot is then removed from its task queue.
[0186] Based on the type of anomaly, update the status of the first patrol robot. For example, if the anomaly is due to insufficient power, set the status of the first patrol robot to return to charging, instructing it to automatically return to the charging station; or, if the anomaly is due to hardware failure, set the status of the first patrol robot to await repair, record the fault information, and wait for manual intervention; or, if the anomaly is due to communication loss, the robot scheduling platform can attempt to re-establish the connection, and if it cannot be restored after a long period of time, mark it as disconnected and notify maintenance personnel.
[0187] If the first patrol robot is unable to move autonomously (e.g., due to motor failure), other robots can be dispatched or human personnel can be notified to handle the situation on-site.
[0188] In one possible embodiment, the robot scheduling platform described above can also record the time, location, cause of the anomaly, and information about the replacement robot, and generate an anomaly report for subsequent robot maintenance and task optimization.
[0189] like Figure 2 As shown, an embodiment of the present invention provides a task interruption handling device for a patrol robot, the task interruption handling device for the patrol robot comprising:
[0190] The first acquisition module 201 is used to acquire the first task information of the first patrol robot after receiving the task interruption signal of the first patrol robot. The task interruption signal includes the interruption time and the interruption location.
[0191] Processing module 202 is used to determine the first generation value of the originally executed task based on the first task information;
[0192] The first scheduling module 203 is used to schedule the second patrol robot to perform the original task based on the interruption time and the interruption location if the value of the first generation is greater than the preset value threshold of the first generation.
[0193] The second scheduling module 204 is used to schedule the first patrol robot to continue performing the original task if the value of the first generation is less than a preset value threshold of the first generation.
[0194] Optionally, the processing module 202 is further configured to obtain the length of the executed path and the remaining path length of the originally executed task; and to obtain the execution time and the remaining estimated time of the originally executed task; and to calculate the first generation value based on the first ratio of the executed path length to the remaining path length, the second ratio of the executed time to the remaining estimated time, and the preset priority weight of the originally executed task at the interruption location, wherein different locations in the task path of the originally executed task correspond to different priority weights.
[0195] Optionally, the first scheduling module 203 is further configured to search for candidate patrol robots within a preset area based on the interruption location; select an idle patrol robot from the candidate patrol robots as a second patrol robot based on the task status of the candidate patrol robots; if there is no idle patrol robot, select a second-generation patrol robot whose value is less than the first cost value that interrupted the current task execution from the interruption time as a second patrol robot from the candidate patrol robots; and schedule the second patrol robot to execute the original task.
[0196] Optionally, the first scheduling module 203 is further configured to, for each non-idle candidate patrol robot, obtain the second task information of the currently executed task of the non-idle candidate patrol robot, calculate the second generation value required if the non-idle candidate patrol robot interrupts the currently executed task from the interruption time; compare the second generation value with the first generation value; and select the candidate patrol robot whose second generation value is less than the first generation value and has the largest difference as the second patrol robot.
[0197] Optionally, the second scheduling module 204 is further configured to: if the first generation value is less than or equal to a preset first generation value threshold and the first generation value is greater than a preset second generation value threshold, then schedule the first patrol robot to continue executing the original task starting from the interruption point; if the first value is less than or equal to a preset second generation value threshold, then predict the continuation point in the path of the original task and schedule the first patrol robot to continue executing the original task starting from the continuation point, wherein the second generation value threshold is less than the first generation value threshold.
[0198] Optionally, the second scheduling module 204 is further configured to obtain the priority weight of each unexecuted path point in the original execution task path; and select the unexecuted path point with the highest priority weight as the successor location.
[0199] Optionally, the device further includes:
[0200] The second acquisition module is used to acquire the interruption reason indicated by the task interruption signal;
[0201] The third scheduling module is used to directly schedule the second patrol robot to start from the interruption point and take over the original task when the interruption is caused by an abnormality in the first patrol robot, and to control the first patrol robot to exit the task.
[0202] like Figure 3 As shown, this embodiment of the invention also provides an electronic device, including a processor, which can execute any of the above-described patrol robot task interruption handling methods.
[0203] Specifically, it includes a processor 301 and a memory 302, as well as a computer program stored in the memory 302 and capable of running on the processor 301, which executes a task interruption handling method for the patrol robot, wherein:
[0204] The processor 301 executes the calculator program for the patrol robot's task interrupt handling method stored in memory 302, and performs the following steps:
[0205] When a fixed camera in the current area detects a mobile stall to be tracked, determine the duration of the event and the direction of movement of the mobile stall to be tracked;
[0206] Based on the persistence of the above events and the above direction of movement, determine the next area to which the mobile stall to be tracked is going;
[0207] If the untrackable distance between the next area and the current area is greater than the preset distance, then the patrol robot in the predetermined area is searched; wherein, the preset distance is dynamically set according to the probability of events occurring between the current area and the next area;
[0208] When the probability of an event being detected by the patrol robot is less than the preset probability of an event being detected, the patrol robot is scheduled to perform a tracking task for the event to be tracked between the current area and the next area.
[0209] Optionally, the process executed by processor 301 to determine the first-generation value of the originally executing task based on the first task information includes:
[0210] Obtain the length of the executed path and the remaining path length of the originally executed task;
[0211] In addition, the execution time and remaining estimated time of the originally executed task are obtained;
[0212] The first generation value is calculated based on the first ratio of the executed path length to the remaining path length, the second ratio of the executed time to the remaining estimated time, and the preset priority weight of the original task at the interruption point. Different locations in the original task's task path correspond to different priority weights.
[0213] Optionally, the processor 301's execution of scheduling the second patrol robot to perform the originally scheduled task based on the interruption time and the interruption location includes:
[0214] Based on the location of the interruption, search for candidate patrol robots within a preset area;
[0215] Based on the task status of the candidate patrol robots, the patrol robot that is in an idle state is selected from the candidate patrol robots as the second patrol robot;
[0216] If there are no idle patrol robots, then a second-generation patrol robot with a value less than the first cost value that interrupted the current task execution from the interruption time is selected from the candidate patrol robots and selected as the second patrol robot.
[0217] The second patrol robot is then dispatched to perform the original task.
[0218] Optionally, the step of processor 301 in selecting a second-generation patrol robot with a value less than the first cost value from the candidate patrol robots, which interrupted its current task from the interruption time, as the second patrol robot, includes:
[0219] For each non-idle candidate patrol robot, obtain the second task information of the current task being executed by the non-idle candidate patrol robot, and calculate the second generation value required if the non-idle candidate patrol robot were to interrupt the current task being executed from the interruption time.
[0220] Compare the value of the second generation with the value of the first generation;
[0221] The candidate patrol robot whose value is less than that of the first generation and whose difference is the largest is selected as the second patrol robot.
[0222] Optionally, the step of processor 301 executing the statement "If the value of the first generation is less than a preset first generation value threshold, then schedule the first patrol robot to continue performing the original task" includes:
[0223] If the value of the first generation is less than or equal to a preset first generation value threshold, and the value of the first generation is greater than a preset second generation value threshold, then the first patrol robot is scheduled to continue executing the original task starting from the interruption point.
[0224] If the first value is less than or equal to a preset second-generation value threshold, a connecting point is predicted in the original task execution path, and the first patrol robot is scheduled to continue executing the original task starting from the connecting point. The second-generation value threshold is less than the first-generation value threshold.
[0225] Optionally, the process performed by processor 301 to predict the continuation location in the original task execution path includes:
[0226] Obtain the priority weights of each unexecuted path point in the original path where the task was originally executed;
[0227] The unexecuted path point with the highest priority weight is selected as the continuation point.
[0228] Optionally, before determining the first-generation value of the originally executing task based on the first task information, the method executed by the processor 301 further includes:
[0229] Obtain the interruption reason indicated by the task interruption signal;
[0230] When the interruption is caused by an abnormality in the first patrol robot, the second patrol robot is directly dispatched from the interruption point to take over the original task, and the first patrol robot is controlled to exit the task.
[0231] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the patrol robot task interruption handling method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0232] The above are preferred embodiments of this application. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the above principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for handling mission interruption of a patrol robot, characterized in that, The method includes the following steps: Upon receiving the task interruption signal from the first patrol robot, the first task information of the task originally performed by the first patrol robot is obtained, wherein the task interruption signal includes the interruption time and the interruption location; Based on the first task information, the first-generation value of the originally executed task is determined; If the value of the first generation is greater than the preset value threshold of the first generation, then based on the interruption time and the interruption location, the second patrol robot is scheduled to perform the original task. If the value of the first generation is less than the preset value threshold of the first generation, then the first patrol robot is scheduled to continue to perform the original task.
2. The task interruption handling method for patrol robots as described in claim 1, characterized in that, The step of determining the first-generation value of the originally executing task based on the first task information includes: Obtain the length of the executed path and the remaining path length of the originally executed task; In addition, the execution time and remaining estimated time of the originally executed task are obtained; The first generation value is calculated based on the first ratio of the executed path length to the remaining path length, the second ratio of the executed time to the remaining estimated time, and the preset priority weight of the original task at the interruption point. Different locations in the original task's task path correspond to different priority weights.
3. The task interruption handling method for patrol robots as described in claim 1, characterized in that, The step of scheduling the second patrol robot to perform the original task based on the interruption time and the interruption location includes: Based on the location of the interruption, search for candidate patrol robots within a preset area; Based on the task status of the candidate patrol robots, the patrol robot that is in an idle state is selected from the candidate patrol robots as the second patrol robot. If there are no idle patrol robots, then select the second patrol robot whose value is less than the first cost value from the candidate patrol robots that interrupted the current task execution from the interruption time. The second patrol robot is dispatched to perform the original task.
4. The task interruption handling method for patrol robots as described in claim 1, characterized in that, The step of selecting a second-generation patrol robot with a value less than the first cost value from the candidate patrol robots, which interrupted its current task execution from the interruption time, as the second patrol robot includes: For each non-idle candidate patrol robot, obtain the second task information of the current task being executed by the non-idle candidate patrol robot, and calculate the second generation value required if the non-idle candidate patrol robot were to interrupt the current task being executed from the interruption time. Compare the value of the second generation with the value of the first generation; The candidate patrol robot whose value is less than that of the first generation and has the largest difference is selected as the second patrol robot.
5. The task interruption handling method for a patrol robot as described in claim 1, characterized in that, If the value of the first generation is less than a preset threshold for the value of the first generation, then scheduling the first patrol robot to continue performing the original task includes: If the value of the first generation is less than or equal to a preset first generation value threshold, and the value of the first generation is greater than a preset second generation value threshold, then the first patrol robot is scheduled to continue executing the original task starting from the interruption point. If the first value is less than or equal to a preset second-generation value threshold, a connecting point is predicted in the original task execution path, and the first patrol robot is scheduled to continue executing the original task starting from the connecting point. The second-generation value threshold is less than the first-generation value threshold.
6. The task interruption handling method for a patrol robot as described in claim 5, characterized in that, The prediction of the next location within the original task execution path includes: Obtain the priority weights of each unexecuted path point in the original path where the task was originally executed; The unexecuted path point with the highest priority weight is selected as the continuation point.
7. The method for handling mission interruption of a patrol robot as described in any one of claims 1 to 6, characterized in that, Before determining the first-generation value of the originally executing task based on the first task information, the method further includes: Obtain the interruption reason indicated by the task interruption signal; When the interruption is caused by an abnormality in the first patrol robot, the second patrol robot is directly dispatched from the interruption point to take over the original task, and the first patrol robot is controlled to exit the task.
8. A task interruption handling device for a patrol robot, characterized in that, The patrol robot's mission interruption handling device includes: The first acquisition module is used to acquire the first task information of the first patrol robot after receiving the task interruption signal of the first patrol robot. The task interruption signal includes the interruption time and the interruption location. The processing module is used to determine the first-generation value of the originally executing task based on the first task information; The first scheduling module is used to schedule the second patrol robot to perform the original task based on the interruption time and the interruption location if the value of the first generation is greater than the preset value threshold of the first generation. The second scheduling module is used to schedule the first patrol robot to continue performing the original task if the value of the first generation is less than a preset first generation value threshold.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the task interruption handling method for a patrol robot as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the patrol robot task interruption handling method as described in any one of claims 1 to 7.