Robot task control method and device, electronic equipment, storage medium and computer program product

By saving context snapshot information of the robot task sequence and restoring the task execution starting point after receiving an interruption command, the problem of disordered robot task flow is solved, and the orderly recovery and coherent execution of tasks are realized.

CN121374575APending Publication Date: 2026-01-23CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511585037.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing robots are prone to task flow disorder when their tasks are interrupted, making it difficult to correctly identify the status of task nodes and resulting in task execution errors.

Method used

When an interrupt command is received, the context snapshot information of the task sequence is saved to determine the cancellation status of the target task node. The interrupt command is then executed to produce a new task sequence. After the new task sequence is completed, the execution starting point of the original task sequence is restored according to the cancellation status, ensuring the continuity of the task flow.

Benefits of technology

This effectively prevents task flow disruptions, ensuring that the robot can resume tasks in an orderly manner after receiving an interruption command, avoiding incorrect skipping or repeated execution of task nodes, and improving the continuity and accuracy of task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121374575A_ABST
    Figure CN121374575A_ABST
Patent Text Reader

Abstract

The invention provides a robot task control method and device, electronic equipment, a storage medium and a computer program product.The robot task control method comprises the steps that when a first interruption instruction of a user for a target task node in a first task sequence is received, context snapshot information of the first task sequence is determined, the context snapshot information of the first task sequence comprises the state of the target task node, and the state of the target task node is a cancelling state; responding to the first interruption instruction to execute a second task sequence; and after the execution of the second task sequence is completed, obtaining the state of the target task node, and when the state of the target task node is the cancelling state, executing the first task sequence by taking the target task node as an execution starting point. According to the invention, task flow disorder after the robot is interrupted can be prevented.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of robot control, in particular to a robot task control method and device, electronic equipment, storage medium and computer program product. BACKGROUND

[0002] At present, robots can realize automatic explanation by completing the cycle process of "guiding → moving → explaining → interactive questioning → continuing / jumping" and cooperating with navigation, mechanical arm / gesture, voice broadcast / voice recognition, map positioning and other modules.

[0003] However, when the existing technology person executes a task, if the user interrupts, it will be considered that the current task node has been completed, and thus the state of the current task node is incorrectly identified. The incorrect state identification result will further cause the task flow of the robot to be disordered. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a robot task control method and device, electronic equipment, storage medium and computer program product to prevent the task flow of the robot from being disordered after being interrupted.

[0005] In a first aspect, the present application provides a robot task control method, comprising: When a first interrupt instruction of a user for a target task node in a first task sequence is received, context snapshot information of the first task sequence is determined, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is a cancel state; In response to the first interrupt instruction, a second task sequence is executed; After the execution of the second task sequence is completed, the state of the target task node is obtained, and when the state of the target task node is the cancel state, the first task sequence is executed with the target task node as the execution starting point.

[0006] The method of the present application can determine the context snapshot information of the first task sequence when a first interrupt instruction for a target task node in the first task sequence is received, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is a cancel state; then, the second task sequence is executed in response to the first interrupt instruction; then, after the execution of the second task sequence is completed, the state of the target task node is obtained, and when the state of the target task node is the cancel state, the first task sequence is executed with the target task node as the execution starting point, that is, the target node is resumed according to the cancel state after the execution of the interrupt instruction. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0007] In an optional embodiment, after the determination of the context snapshot information of the first task sequence, before the execution of the second task sequence in response to the first interrupt instruction, the method further comprises: determining the state of the functional module of the robot; when the state of all the functional modules of the robot is an idle state, the second task sequence is executed in response to the first interrupt instruction.

[0008] The optional embodiment can switch the task sequence only when the state of all the functional modules of the robot is an idle state, thereby avoiding the task flow disorder and the competition for computing resources caused by the cross of multiple tasks.

[0009] In an optional embodiment, the method further comprises: during the execution of the second task sequence in response to the interrupt instruction, if a second interrupt instruction for the second task sequence is received, the third task sequence is executed in response to the second interrupt instruction; after the execution of the third task sequence, the second task sequence is executed according to the context snapshot information of the second task sequence, and then the first task sequence is executed based on the context snapshot information of the first task sequence after the execution of the second task sequence is completed.

[0010] The optional embodiment can orderly resume according to the context information of each interrupt in the case of multiple interrupts, thereby avoiding the task flow disorder caused by the error of the resumed node.

[0011] In an optional embodiment, after the execution of the second task sequence is completed, before the execution of the first task sequence based on the context snapshot information of the first task sequence, the method further comprises: obtaining the current position of the robot; matching the current position of the robot with a target position, determining a prompt information if the current position of the robot does not match the target position, the prompt information being used to prompt a user whether to continue to execute the first task sequence, wherein the target position is a region required for executing a task node in the first task sequence.

[0012] The optional embodiment can remind the user through the prompt information when the current position of the robot does not match the target position when returning to execute the task interrupted before, so as to avoid disorder of the task flow.

[0013] In the optional embodiment, the method further comprises: when the first instruction information of the user is received in response to the prompt information, skipping the target task node, determining a next task node of the target task node based on the first task sequence, and taking the next task node of the target task node as a starting point for execution to execute the first task sequence, wherein the execution of the first task sequence is stopped during the waiting for the user to make a response to the prompt information.

[0014] The optional embodiment can regard the user's selection of skipping the target task node as only skipping the target task node, instead of skipping all task nodes in the task sequence in which the target task node is located, so as to avoid disorder of the flow caused by erroneous skipping. At the same time, the task sequence is stopped during the response period, so as to prevent the flow from being erroneously advanced during the inquiry period.

[0015] In the optional embodiment, the method further comprises: if multiple first interruption instructions or multiple second interruption instructions are received within a time window, then the multiple first interruption instructions are combined into one first interruption instruction, or the multiple second interruption instructions are combined into one second interruption instruction.

[0016] The optional embodiment can regard multiple triggering of the same interruption instruction within a time window as once, so as to prevent the robot from shaking caused by repeated instructions.

[0017] In the optional embodiment, the method further comprises: real-time acquisition of a task completion signal output by the functional module; determination of whether a duration of the task completion signal is greater than or equal to a preset threshold value, and if the duration of the task completion signal is greater than or equal to the preset threshold value, then the state of the functional module is determined as the idle state.

[0018] The optional embodiment can prevent the duration of the task completion signal from being too short to cause a state recognition error, and further prevent the state recognition error from causing a process disorder.

[0019] In the optional embodiment, the method further comprises: When the explanation task node of the first task sequence is executed, it is determined whether the robot moves to a required area for executing the playing task node; When the robot moves to the required area for executing the playing task node, the corpus used by the explanation task node is updated based on the required area for executing the playing task node.

[0020] The optional embodiment can update the corpus according to the arrival position only after the robot moves to the specified position, so as to avoid a disorder of the explanation corpus, for example, the robot is moving to an A area, but has not yet moved to the arrival position, and the playing module of the robot may have started the corpus for explanation.

[0021] In a second aspect, the present application provides a robot task control device, comprising: A determination module is configured to determine context snapshot information of a first task sequence when a first interrupt instruction of a user for a target task node in the first task sequence is received, wherein the context snapshot information of the first task sequence comprises a state of the target task node, and the state of the target task node is a cancel state. A response module is configured to execute a second task sequence in response to the first interrupt instruction. An execution module is configured to obtain the state of the target task node after the execution of the second task sequence is completed, and execute the first task sequence with the target task node as a starting point when the state of the target task node is the cancel state.

[0022] The device of the present application can determine context snapshot information of a first task sequence when a first interrupt instruction of a user for a target task node in the first task sequence is received, wherein the context snapshot information of the first task sequence comprises a state of the target task node, and the state of the target task node is a cancel state; further execute a second task sequence in response to the first interrupt instruction; and further obtain the state of the target task node after the execution of the second task sequence is completed, and execute the first task sequence with the target task node as a starting point when the state of the target task node is the cancel state, that is, execute the target node according to the cancel state after the execution of the interrupt instruction is completed. Thus, the interrupt instruction is prevented from causing a task process disorder.

[0023] In a third aspect, the present application provides an electronic device, comprising: a processor; and a memory configured to store machine-readable instructions that, when executed by the processor, perform the method of any of the preceding embodiments.

[0024] The electronic device of the present application can determine the context snapshot information of the first task sequence when receiving the first interrupt instruction of the user for the target task node in the first task sequence, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is the cancel state; further respond to the first interrupt instruction to execute the second task sequence; further obtain the state of the target task node after the execution of the second task sequence is completed, and execute the first task sequence with the target task node as the execution starting point when the state of the target task node is the cancel state, that is, after the execution of the interrupt instruction is completed, the target node is executed according to the cancel state. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0025] In a fourth aspect, the present application provides a storage medium, the storage medium storing a computer program, the computer program being executed by a processor to perform the method of any of the preceding embodiments.

[0026] The storage medium of the present application can determine the context snapshot information of the first task sequence when receiving the first interrupt instruction of the user for the target task node in the first task sequence, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is the cancel state; further respond to the first interrupt instruction to execute the second task sequence; further obtain the state of the target task node after the execution of the second task sequence is completed, and execute the first task sequence with the target task node as the execution starting point when the state of the target task node is the cancel state, that is, after the execution of the interrupt instruction is completed, the target node is executed according to the cancel state. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0027] In a fifth aspect, the present application provides a computer program product, the computer program product comprising a computer program, the computer program being executed by a processor to implement the method of any of the preceding embodiments.

[0028] The computer program product provided in the application can determine context snapshot information of a first task sequence when a first interrupt instruction of a user for a target task node in the first task sequence is received, wherein the context snapshot information of the first task sequence includes a state of the target task node, and the state of the target task node is a cancel state; then, a second task sequence is executed in response to the first interrupt instruction; then, after the second task sequence is executed, the state of the target task node is obtained, and when the state of the target task node is the cancel state, the first task sequence is executed with the target task node as a starting point of execution, that is, the target node is resumed for execution according to the cancel state after the interrupt instruction is executed. Thus, the task flow is prevented from being disordered due to the interrupt instruction. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments of the application. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0030] Figure 1 is a flow diagram of a robot task control method provided by an embodiment of the application; Figure 2 is a structural diagram of a robot task control device provided by an embodiment of the application; Figure 3 is a structural diagram of an electronic device provided by an embodiment of the application. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the application will be described below with reference to the drawings in the embodiments of the application.

[0032] Please refer to Figure 1 , Figure 1 is a flow diagram of a robot task control method provided by an embodiment of the application. As Figure 1 described, the robot task control method provided by the embodiment of the application includes the following steps: 101. When a first interrupt instruction of a user for a target task node in a first task sequence is received, determine context snapshot information of the first task sequence, wherein the context snapshot information of the first task sequence includes a state of the target task node, and the state of the target task node is a cancel state; 102. In response to the first interrupt instruction, execute a second task sequence; 103、In the second task sequence execution is completed, the state of the target task node is acquired, and when the state of the target task node is a cancel state, the first task sequence is executed with the target task node as a starting point of execution.

[0033] In the embodiment of the present application, the first task sequence refers to the current task sequence executed before the second task sequence and the third task sequence, which can be the first task sequence after the robot is started. Further, the target task node in the first task sequence refers to a specific task node directly pointed to by the first interrupt instruction sent by the user in the first task sequence being executed by the robot, which can be any one of the multiple task nodes in the first task sequence. The user can initiate the first interrupt instruction for any one of the task nodes in the first task sequence.

[0034] In the embodiment of the present application, the first task sequence can include two or more task nodes. For example, for an exhibition service robot, an exhibition explanation task is divided into three task nodes A, B and C, wherein the task node A is used to broadcast a welcome speech, the task node B is used to make a first explanation, and the task node C is used to make a second explanation. Therefore, the first task sequence includes the three task nodes A, B and C.

[0035] In the embodiment of the present application, the context snapshot information of the first task sequence refers to a set of key state information related to the first task sequence determined by the robot when the first interrupt instruction for the target task node in the first task sequence is received by the user. The context snapshot information of the first task sequence can include a main flow pointer, remaining task nodes in the first task sequence, and the state of each task node. Further, the main flow pointer points to which task node in the first task sequence is the node being executed.

[0036] In the embodiment of the present application, the first interrupt instruction refers to an instruction for the user to interrupt the execution of the first queue by the robot and execute a second task queue outside the first task queue, which can be triggered by the user through a command button on the robot.

[0037] In the embodiment of the present application, the state of the target task node refers to data reflecting the current completion of the target task, wherein the state of the target task node can be a cancel state, a complete state, a to-be-executed state, etc.

[0038] In the embodiment of the present application, the cancel state refers to a specific state identifier of the target task node, indicating that the node is not completed due to interruption and needs to be re-executed when it is recovered.

[0039] In the embodiments of the present application, the second task sequence refers to a new task process triggered by the first interrupt instruction and needing to be executed immediately by the robot.

[0040] In the embodiments of the present application, the execution starting point refers to a specific task node position selected to start execution when a task sequence is resumed.

[0041] The method of the embodiments of the present application can determine context snapshot information of a first task sequence when a first interrupt instruction for a target task node in the first task sequence is received by a user, wherein the context snapshot information of the first task sequence includes a state of the target task node, and the state of the target task node is a cancel state; then, the second task sequence is executed in response to the first interrupt instruction; then, the state of the target task node is obtained after the execution of the second task sequence is completed, and the first task sequence is executed with the target task node as the execution starting point when the state of the target task node is the cancel state, that is, the target node is resumed for execution according to the cancel state after the execution of the interrupt instruction is completed. Thus, the task process is prevented from being disordered due to the interrupt instruction. As an embodiment, the exhibition hall robot is executing a task sequence (the first task sequence) of “explaining the A bronze ding”, and the process includes: moving to the front of the ding, playing the casting history, and introducing the meaning of the ornament. When the casting history is just played and the ornament is about to be introduced, the user issues an interrupt instruction: “please tell me where the washroom is?” (the first interrupt instruction). Based on this, the robot saves the context snapshot of the current explanation task (marks the “introduction of the ornament” node as “cancel state”), and then responds to the interrupt to execute the “guide the washroom position” task (the second task sequence). After the guidance is completed, it resumes the explanation according to the snapshot and directly starts from the “introduction of the meaning of the ornament” node to continue the explanation. This avoids starting from “moving to the front of the ding” or repeating “playing the casting history” after being interrupted, resulting in incoherent explanation process.

[0042] In the embodiments of the present application, as an optional implementation, after the context snapshot information of the first task sequence is determined, before the second task sequence is executed in response to the first interrupt instruction, the method of the embodiments of the present application further includes the following steps: determining the state of the functional module of the robot; when the states of all the functional modules of the robot are idle states, the second task sequence is executed in response to the first interrupt instruction.

[0043] In the above optional implementation, the functional module refers to an independent hardware or software unit responsible for a specific function in the robot system, such as a hardware module including a mobile chassis, a mechanical arm, a voice broadcast system, etc. The software module can include a task decomposer for cutting the business intent such as "welcome -> A area -> B area -> … -> end" into queue elements (such as TTS, gesture, navigation, inquiry), and supporting "group concurrency" definition and interruption strategy. It is connected to the intent processor above and the queue executor below.

[0044] Further, the software module further includes an intent processor (Intent Handler) for mapping ASR / key / external system input into standardized intent (GOTO_X, YES / NO, REPEAT, STOP, etc.), and doing time window debouncing and same target deduplication / merging. It is connected to the microphone / panel / master computer; output to the task decomposer.

[0045] Further, the software module further includes a queue executor (Queue Executor, including "group concurrency barrier" and "all idle barrier") for switching the to-be-executed queue to the formal queue in an atomic manner, and issuing to each underlying module one by one / group concurrency; using barrier convergence (ALL / ANY / timeout fault tolerance) for "group concurrency"; not switching new tasks until the all idle barrier is satisfied. On the other hand, it is connected to the navigation control, mechanical arm control, and interactive broadcast three types of modules; recycling the states (IDLE / RUNNING / DONE) of the three.

[0046] Further, the software module further includes a state manager (State Manager, including context stack) for maintaining a recoverable context snapshot (main flow position, remaining sequence, completion flag, whether the welcome word has been broadcast, last_spoken_scene, branch ID, etc.); stack when interrupted, pop stack when restored; unified cancellation semantics and "cancel not complete" statistical yardstick. On the other hand, it communicates with the task decomposer and the queue executor.

[0047] Further, the software module further includes a navigation control module (Nav Controller) for navigating according to the target point, outputting the pose and arrival event; state three states: IDLE / RUNNING / DONE. On the other hand, the navigation control module accepts the navigation instruction of the queue executor; reports the state and arrival event.

[0048] Further, the software module further includes a mechanical arm control module (Arm Controller) for scripting "pointing / directing / waving hands" and other gestures; three-state reporting.

[0049] Further, the software modules further include an Interaction / TTS Controller for performing voice announcement or "question-wait-for-reply" loop; supporting DONE minimum hold time, ensuring upper layer observability.

[0050] Further, the software modules further include a Map Localizer for providing stable mapping of position and scene name based on localization, threshold / hysteresis judgment for reaching a scene.

[0051] Further, the software modules further include a Logger / Tracer for unifying semantic recording of cancel / resume / barrier / gate / propel / question, etc. key events, supporting problem review.

[0052] It should be noted that the above software modules use the following parameters for performing the method of the embodiments of the present application: a debounce time window Δt_d: 300-1000 ms (ASR / key press), wherein the debounce time window is the determination time window mentioned below. The preset threshold for determining the duration of the completed state is T_hold: 300-800 ms (upper limit of interaction / robot arm availability). A full-idle barrier polling period: 50-100 ms a reaching determination threshold: a distance threshold of 0.3-0.8 m; an angle threshold of 10-25°; with 1-2 periods of hysteresis. A group concurrency timeout T_group: 5-20 s (which can be automatically estimated according to the task) In the above optional embodiment, the idle state means that the functional module has completed the previous task and has not received a new task instruction, and is in a state of availability and standby.

[0053] The optional embodiment can switch the task sequence only when the states of all functional modules of the robot are idle, thereby avoiding task flow disorder and resource contention caused by multiple task crossing. As an example, the robot is executing "playing holographic projection" to demonstrate the cultural relic restoration process (belonging to the first task sequence), at this time the system receives a new movement instruction, requiring it to receive another visitor. At this time, the system will not immediately interrupt the projection to move, but will first check the state of the "holographic projection module". If the projector is working (non-idle state), the system will wait until it enters the idle state after playing, and then execute the movement command. This prevents the robot from moving while projecting, causing image distortion, shaking or projection onto the wrong wall, resource contention and flow disorder.

[0054] In the embodiments of the present application, as an optional embodiment, the method of the embodiments of the present application further includes the following steps: In the process of responding to the interrupt instruction to execute the second task sequence, if a second interrupt instruction for the second task sequence is received, the second interrupt instruction is responded to to execute a third task sequence; After the third task sequence is executed, the second task sequence is executed according to the context snapshot information of the second task sequence, and after the second task sequence is executed, the first task sequence is executed based on the context snapshot information of the first task sequence.

[0055] In the optional implementation, the second interrupt instruction refers to an interrupt instruction issued by the user again when the robot is executing the second task sequence (i.e., a task executed after the first interrupt).

[0056] In the optional implementation, the third task sequence refers to a new task process triggered by the second interrupt instruction and required to be executed in priority to the second task sequence.

[0057] In the optional implementation, the context snapshot information of the second task sequence refers to context snapshot information saved by the system for the second task sequence when the second task sequence is interrupted, so that the second task sequence can be correctly restored after the third task sequence is completed.

[0058] The optional implementation can sequentially restore according to the context information of each interrupt in the case of multiple interrupts, and avoid task process disorder caused by incorrect restoration of nodes. As an example, the robot is performing a regular explanation in the "Qin Dynasty exhibition area" (the first task sequence), is interrupted by a staff member, and is required to go to the "Han and Tang Dynasty exhibition area" to assist in crowd management (the second task sequence). During the crowd management, an emergency instruction is received, and the robot is required to immediately go to the "entrance" to handle a child who is separated from the team (the third task sequence). The effect is that after the robot handles the child's search, it will return to the "Han and Tang Dynasty exhibition area" to continue the crowd management task (restore the second task sequence) according to the saved context stack. After the crowd management is completed, the regular explanation task in the "Qin Dynasty exhibition area" is finally restored (restore the first task sequence). This ensures that each level of task can continue in the correct context, and avoids forgetting the crowd management duty in the Han and Tang Dynasty exhibition area by directly returning to the explanation in the Qin Dynasty exhibition area.

[0059] In the embodiment of the application, as an optional implementation, before the first task sequence is executed based on the context snapshot information of the first task sequence after the second task sequence is executed, the method of the embodiment of the application further includes the following steps: Obtain the current position of the robot; Match the current position of the robot with a target position, and if the current position of the robot does not match the target position, determine a reminder information, and the reminder information is used to remind the user whether to continue to execute the first task sequence, wherein the target position is a required area of a task node in the first task sequence.

[0060] In the optional implementation described above, before resuming the execution of the task, the current position of the robot can be compared with the target position required by the task. If they are not consistent, the user is asked through a prompt message to prevent the task from failing due to a position error.

[0061] In the optional implementation described above, the geographic coordinates or area information of the robot can be obtained in real time through a sensor or a positioning system.

[0062] In the optional implementation described above, the prompt message refers to a prompt message generated and presented to the user by the system when an abnormal state (such as a position mismatch) is detected, to request the user's decision. The prompt message can be a confirmation prompt, for example, asking the user to answer "yes" or "no" to confirm whether to continue.

[0063] The optional implementation described above can remind the user through a prompt message when the current position of the robot does not match the target position before resuming the execution of the interrupted task, to avoid confusion in the task flow. As an example, assume that the robot was originally explaining to visitors in the "ceramics museum" and was interrupted and moved to the "silk museum" to answer a query. After the interruption, it is ready to resume the explanation in the ceramics museum.

[0064] At this time, before resuming, the robot detects that it is currently located in the "silk museum", which does not match the target position "ceramics museum". Therefore, it generates a prompt message: "I am not currently in the ceramics museum. Do you need to continue the previous ceramics explanation?". This effectively prevents the robot from mistakenly starting to explain ceramics in the silk museum, avoiding the confusion of space and content misplacement.

[0065] In the embodiments of the present application, as an optional implementation, the method of the embodiments of the present application further includes the following steps: Upon receiving the first instruction information of the user in response to the prompt message, the target task node is skipped, the next task node of the target task node is determined based on the first task sequence, and the first task sequence is executed from the next task node of the target task node as the starting point of execution. During the period of waiting for the user to respond to the prompt message, the execution of the first task sequence is stopped.

[0066] In the optional implementation described above, the first instruction information refers to an instruction made by the user in response to the prompt message issued by the system and indicating that the robot skips the target task node.

[0067] In the optional implementation described above, the next task node refers to the task node that needs to be executed immediately after the target task node in the current task sequence.

[0068] The optional embodiment can regard the skipping of the target task node as skipping only the target task node, instead of skipping all task nodes in the task sequence in which the target task node is located, thereby avoiding incorrect skipping and causing process disorder. Meanwhile, the task sequence advancement is stopped during the response period, thereby preventing the process from being incorrectly advanced during the inquiry period. As an example, after receiving the prompt of the position mismatch, the visitor considers that it is unnecessary to go back specially and instructs the robot to skip, at which time the robot does not cancel the entire "ceramic museum explanation" task sequence because of this, but only skips the target task node of "in-depth explanation at the current position of the ceramic museum" and automatically transitions to the next node in the sequence, such as "guide the visitor to the jade museum". Meanwhile, the explanation task sequence is completely paused during the entire process of waiting for the visitor's decision and no automatic action is performed, thereby ensuring the accuracy of the process control.

[0069] In the embodiment of the present application, as an optional embodiment, the method of the embodiment of the present application further includes the following steps: If multiple first interruption instructions or multiple second interruption instructions are received within the time window, the multiple first interruption instructions are combined into one first interruption instruction, or the multiple second interruption instructions are combined into one second interruption instruction.

[0070] In the optional embodiment described above, the time window is a short time interval preset by the system, which is used to determine whether multiple similar instructions received within the interval should be combined and processed.

[0071] In the optional embodiment described above, the robot jitter refers to the phenomenon that the robot produces unnecessary and frequent start-stop or action oscillation due to the excessive response of the system to repeated instructions.

[0072] The optional embodiment can regard multiple triggering of the same interruption instruction within the time window as one, thereby preventing the robot from jittering due to repeated instructions. As an example, it is assumed that a visitor says "next page! Next page! Next page!" in front of the robot continuously and quickly multiple times to flip through the electronic display board. At this time, the system combines these continuous "next page" instructions into one page flipping instruction within a very short time window. The robot screen only smoothly flips one page, instead of quickly and continuously flipping multiple pages, which causes the visitor to not have enough time to read, thereby eliminating the behavior "jitter" caused by repeated instruction responses.

[0073] In the embodiment of the present application, as an optional embodiment, determining the state of the functional module of the robot includes the following steps: Real-time acquisition of the task completion signal output by the functional module; determining whether the duration of the task completion signal is greater than or equal to a preset threshold value, and if the duration of the task completion signal is greater than or equal to the preset threshold value, determining that the state of the functional module is an idle state.

[0074] In the optional implementation described above, the task completion signal refers to a signal sent by the functional module to the master system after completing the task assigned to it, indicating that the task has ended.

[0075] In the optional implementation described above, the preset threshold value refers to a time length standard set by the system in advance, used to determine whether the duration of a signal (such as the task completion signal) is long enough and stable enough.

[0076] This optional implementation can prevent the duration of the task completion signal from being too short, thereby preventing state recognition errors and further preventing process confusion caused by state recognition errors. As an example, assume that a robot arm performs the action of "pointing to an exhibit". After the joint motor reaches the predetermined position, a transient "in-position" signal may be generated. At this time, the robot will not immediately determine that the "pointing" task is complete and start the narration based on this transient signal. It will require the "in-position" signal to last for a minimum time to ensure that the arm has stably pointed in the direction of the exhibit and is not still slightly shaking. This prevents the system from starting the narration when the arm is not stable, resulting in the embarrassment of the visitor not knowing what the robot is pointing to.

[0077] In the embodiments of the present application, as an optional implementation, the method of the embodiments of the present application further includes the following steps: When performing the narration task node of the first task sequence, determining whether the robot moves to a required area for performing the playback task node; When the robot moves to the required area for performing the playback task node, updating the corpus used by the narration task node based on the required area for the playback task node.

[0078] In the optional implementation described above, the narration task node refers to a specific task node in the task sequence that is responsible for information broadcasting, explanation, or voice interaction with people.

[0079] In the optional implementation described above, the required area for the playback task node refers to a specific location or area that the robot needs to reach in order to ensure that the content matches the scene when performing the playback or explanation task.

[0080] In the optional implementation described above, the corpus refers to text, audio, or multimedia content materials used by the robot for explanation, broadcasting, or dialogue. It can include a static corpus and a dynamic corpus, where the static corpus refers to a pre-stored set of explanation materials with fixed content. The dynamic corpus template refers to a template that can be filled with specific content according to environmental variables (such as location, object).

[0081] The optional embodiment can only update the corpus after the robot moves to the specified position, so as to avoid disordered explanation corpus, for example, the robot is moving to the A area, but has not yet moved to the destination, at this time, the robot may have started the corpus for explanation. As an example, it is assumed that the task of the robot is to move from the "calligraphy and painting hall" to the "Buddha statue hall" and explain a thousand-hand Avalokitesvara statue to the tourists. At this time, the robot will not play the explanation words of the thousand-hand Avalokitesvara in advance in the calligraphy and painting hall or during the moving. Only when it confirms that it has accurately moved to the front of the thousand-hand Avalokitesvara statue in the "Buddha statue hall" (i.e., the required area of the playing task node), will it update the explanation corpus to the exclusive content of the thousand-hand Avalokitesvara and start playing. This ensures that "what you see is what you say", and avoids explaining the wrong content in the wrong position.

[0082] Please refer to Figure 2 , Figure 2 is a structural schematic diagram of a robot task control device provided by an embodiment of the present application. As shown in Figure 2 , the device comprises: a determination module 201 configured to determine context snapshot information of a first task sequence when a first interrupt instruction of a user for a target task node in the first task sequence is received, wherein the context snapshot information of the first task sequence comprises a state of the target task node, and the state of the target task node is a cancel state; a response module 202 configured to execute a second task sequence in response to the first interrupt instruction; an execution module 203 configured to obtain the state of the target task node after the execution of the second task sequence is completed, and execute the first task sequence with the target task node as a starting point when the state of the target task node is the cancel state.

[0083] The device of the embodiment of the present application can determine context snapshot information of a first task sequence when a first interrupt instruction of a user for a target task node in the first task sequence is received, wherein the context snapshot information of the first task sequence comprises a state of the target task node, and the state of the target task node is a cancel state; then execute a second task sequence in response to the first interrupt instruction; and then obtain the state of the target task node after the execution of the second task sequence is completed, and execute the first task sequence with the target task node as a starting point when the state of the target task node is the cancel state, that is, resume the execution of the target node according to the cancel state after the execution of the interrupt instruction. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0084] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of an electronic device disclosed by an embodiment of the present application. As shown in Figure 3As shown, the electronic device of the embodiment of the present application comprises: a processor 301; and a memory 302 configured to store machine readable instructions, the instructions being executed by the processor 301 to perform the method of any one of the preceding embodiments.

[0085] The electronic device of the embodiment of the present application can determine the context snapshot information of the first task sequence when receiving the first interrupt instruction of the user for the target task node in the first task sequence, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is the cancel state; further, in response to the first interrupt instruction, the second task sequence is executed; further, after the execution of the second task sequence is completed, the state of the target task node is obtained, and when the state of the target task node is the cancel state, the first task sequence is executed with the target task node as the execution starting point, that is, after the execution of the interrupt instruction is completed, the target node is executed according to the cancel state. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0086] The embodiment of the present application also provides a storage medium, the storage medium stores a computer program, and the computer program is executed by the processor to perform the method of any one of the preceding embodiments.

[0087] The storage medium of the embodiment of the present application can determine the context snapshot information of the first task sequence when receiving the first interrupt instruction of the user for the target task node in the first task sequence, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is the cancel state; further, in response to the first interrupt instruction, the second task sequence is executed; further, after the execution of the second task sequence is completed, the state of the target task node is obtained, and when the state of the target task node is the cancel state, the first task sequence is executed with the target task node as the execution starting point, that is, after the execution of the interrupt instruction is completed, the target node is executed according to the cancel state. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0088] In addition, the embodiment of the present application also provides a computer program product, the computer program product includes a computer program, and the computer program is executed by the processor to implement the method of any one of the preceding embodiments.

[0089] The computer program product provided in the embodiments of the present application can execute the robot task control method, and when a first interrupt instruction of a user for a target task node in a first task sequence is received, context snapshot information of the first task sequence is determined, wherein the context snapshot information of the first task sequence includes a state of the target task node, and the state of the target task node is a cancel state; then, the second task sequence is executed in response to the first interrupt instruction; then, after the second task sequence is executed, the state of the target task node is obtained, and when the state of the target task node is the cancel state, the first task sequence is executed with the target task node as a starting point of execution, that is, after the interrupt instruction is executed, the target node is executed according to the cancel state. Thus, the task flow disorder caused by the interrupt instruction is prevented.

[0090] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The described device embodiments are merely illustrative. For example, the division of the units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some communication interfaces, and can be electrical, mechanical or other forms.

[0091] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiments.

[0092] Furthermore, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0093] It should be noted that, if the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part or the technical solutions of the present application that make contributions to the prior art. The computer software product is stored in a storage medium, includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0094] In this article, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations.

[0095] The above is only an embodiment of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A robot task control method, characterized in that, include: Upon receiving a user's first interrupt command for a target task node in a first task sequence, the context snapshot information of the first task sequence is determined, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is a canceled state. Responding to the first interrupt command, execute the second task sequence; After the second task sequence is completed, the status of the target task node is obtained, and when the status of the target task node is the canceled status, the first task sequence is executed with the target task node as the execution starting point.

2. The method as described in claim 1, characterized in that, After determining the context snapshot information of the first task sequence and before responding to the first interruption instruction to execute the second task sequence, the method further includes: Determine the status of the robot's functional modules; When all the functional modules of the robot are in an idle state, the robot responds to the first interruption command to execute the second task sequence.

3. The method as described in claim 1, characterized in that, The method further includes: During the process of responding to the first interruption instruction to execute the second task sequence, if a second interruption instruction for the second task sequence is received, the context snapshot information of the second task sequence is determined, and then the second interruption instruction is responded to to execute the third task sequence. After the third task sequence is executed, the second task sequence is executed based on the context snapshot information of the second task sequence. After the second task sequence is executed, the first task sequence is executed based on the context snapshot information of the first task sequence.

4. The method as described in claim 3, characterized in that, Before executing the second task sequence based on the context snapshot information of the second task sequence, or before executing the first task sequence based on the context snapshot information of the first task sequence, the method further includes: Obtain the current position of the robot; The robot's current position is matched with the target position. If the robot's current position does not match the target position, a reminder message is generated. The reminder message is used to remind the user whether to continue executing the first task sequence. The target position is the area required to execute the current task node in the first task sequence or the area required to execute the current task node in the second task sequence.

5. The method as described in claim 4, characterized in that, The method further includes: Upon receiving the user's first instruction regarding the reminder information, skip the current task node in the first task sequence or the current task node in the second task sequence; The first task sequence is executed with the next task node of the first task sequence as the execution starting point, or the second task sequence is executed with the next task node of the second task sequence as the execution starting point, wherein the execution of the first task sequence or the second task sequence is stopped while waiting for the user to respond to the reminder information.

6. The method as described in claim 3, characterized in that, The method further includes: Determine the judgment time window; Within the judgment time window, if multiple first interruption commands or multiple second interruption commands are received, the multiple first interruption commands are merged into one first interruption command, or the multiple second interruption commands are merged into one second interruption command.

7. The method as described in claim 3, characterized in that, The determination of the state of the robot's functional modules includes: Real-time acquisition of task completion signals output by the functional modules; Determine whether the duration of the task completion signal is greater than or equal to a preset threshold. If the duration of the task completion signal is greater than or equal to the preset threshold, then determine that the state of the functional module is the idle state.

8. The method as described in claim 3, characterized in that, The method further includes: When executing the explanation task node of the first task sequence, determine whether the robot has moved to the area required to execute the playback task node; When the robot moves to the area required to perform the playback task node, the corpus used by the explanation task node is updated based on the area required by the playback task node.

9. A robot task control device, characterized in that, include: The determination module is used to determine the context snapshot information of the first task sequence when it receives a first interrupt command from the user for a target task node in the first task sequence, wherein the context snapshot information of the first task sequence includes the state of the target task node, and the state of the target task node is a canceled state. A response module is used to respond to the first interruption command in order to execute the second task sequence; The execution module is used to obtain the status of the target task node after the second task sequence is completed, and to execute the first task sequence with the target task node as the execution starting point when the status of the target task node is the canceled status.

10. An electronic device, characterized in that, include: processor; as well as A memory configured to store machine-readable instructions that, when executed by the processor, perform the method as described in any one of claims 1-8.

11. A storage medium, characterized in that, The storage medium stores a computer program, which is executed by a processor according to any one of claims 1-8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.