CN107976918B - Task switching method and related device - Google Patents
Task switching method and related device Download PDFInfo
- Publication number
- CN107976918B CN107976918B CN201610939702.5A CN201610939702A CN107976918B CN 107976918 B CN107976918 B CN 107976918B CN 201610939702 A CN201610939702 A CN 201610939702A CN 107976918 B CN107976918 B CN 107976918B
- Authority
- CN
- China
- Prior art keywords
- task
- robot
- function
- action
- action set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Manipulator (AREA)
Abstract
The embodiment of the invention discloses a task switching method and a related device, under the premise that a robot has a first task and a valid time interval of the first task which are configured in advance, the robot is configured with a second task and a valid time interval of the second task, when the robot is judged to be in the valid time interval of the second task, the robot can be switched to the second task, the robot is controlled to execute a second function in the second task according to a second action set corresponding to the second task, a plurality of tasks can be configured for the robot, the time interval where the robot is located is used as a basis for switching the tasks, as a task server has action sets corresponding to different tasks, after the tasks of the robot are switched, the robot can be controlled to realize the functions under the tasks according to the action set corresponding to the switched tasks, therefore, the efficient task switching of the robot is realized, and the same robot can complete functions under different tasks.
Description
Technical Field
The present invention relates to the field of data processing, and in particular, to a task switching method and related apparatus.
Background
With the development of the robot technology, the robot can replace people to complete various works and realize various functions.
In the traditional mode, the functions that can be realized by the robot are single, so the control instruction for the robot is solidified in the local storage space of the robot, and the robot realizes the single function through the instruction of the control instruction. If the robot function is expected to realize a new function, new control instructions need to be newly customized and developed for the robot and solidified into the local storage space of the robot to enable the robot to realize the new function.
Therefore, if the functions realized by the robot need to be changed at present, the changing process is time-consuming and tedious.
Disclosure of Invention
In order to solve the technical problem, the invention provides a task switching method and a related device, which realize high-efficiency task switching of a robot.
The embodiment of the invention discloses the following technical scheme:
in a first aspect, the present invention provides a task switching method, which is applied to a task server, where the task server provides a first task, the first task includes a type of a first function to be executed and a first action set, the first action set is an action set for implementing the first function, and the task server is configured with the first task and an effective time interval of the first task in advance for a robot; the method comprises the following steps:
configuring a second task and a valid time interval of the second task for the robot, wherein the second task comprises a type of a second executed function and a second action set, and the second action set is an action set for realizing the second function;
judging the time interval of the robot;
and if the second task is within the effective time interval of the second task, switching the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
Optionally, the determining a time interval in which the robot is located includes:
if the task is in the effective time interval of the second task and the effective time interval of the first task, further comparing the priorities of the first task and the second task;
and if the priority of the second task is higher than that of the first task, executing the step of switching the robot to the second task.
Optionally, before the step of switching the robot to the second task is performed, the method further includes:
judging whether the robot has a first function of the first task which is not executed;
if yes, after the robot finishes executing the tasks of the first tasks which are not executed, the step of switching the robot to the second tasks is executed.
Optionally, the setting mode of the priority of the first task includes presetting or setting when the first task is configured for the robot;
the setting mode of the priority of the second task comprises presetting or setting when the second task is configured for the robot.
Optionally, the comparing the priorities of the first task and the second task includes:
and if the priority of the first task is higher than that of the second task, the robot is kept under the first task.
Optionally, after the switching the robot to the second task, the method further includes:
judging the time interval of the robot;
and if the first task is within the effective time interval of the first task, switching the robot to the first task, and controlling the robot to execute a first function in the first task according to the first action set.
Optionally, the second task is preset in the task server.
Optionally, the second action set includes a plurality of action components and a workflow for indicating an order of execution between the action components.
Optionally, configuring a second task for the robot includes:
determining a plurality of action components required for implementing the second function, and a workflow for indicating an order of execution between the action components;
generating the second action set according to the plurality of components and the corresponding workflow required for realizing the second function;
configuring the second task for the robot according to the second function and second set of actions.
Optionally, the controlling the robot to perform the second function in the second task according to the second action set includes:
generating a first control instruction according to a first action component in the second action set, and sending the first control instruction to the robot;
acquiring processing information fed back by the robot aiming at the first control instruction;
generating a second control instruction according to a second action component in the second action set, and sending the second control instruction to the robot, wherein the second action component is an action component which needs to be executed after the first action component is executed under the execution sequence indicated by the workflow of the second action set;
and sequentially generating control instructions sent to the robot according to the processing information fed back by the robot and the execution sequence indicated by the workflow of the second action set until the robot finishes a second function in the second task.
Optionally, the first task further includes a region for performing the first function, the second task further includes a region for performing the second function, and the controlling the robot to perform a task in the second task according to the second action set includes:
controlling the robot to perform a second function in the second task in the area performing the second function according to the second set of actions.
In a second aspect, the present invention provides a task switching apparatus, which is applied to a task server, where the task server provides a first task, the first task includes a type of a first function to be executed and a first action set, the first action set is an action set for implementing the first function, and the task server is configured with the first task and a valid time interval of the first task in advance for a robot; the device comprises a configuration unit, a judgment unit and a switching unit:
the configuration unit is configured to configure a second task and an effective time interval of the second task for the robot, where the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function;
the judging unit is used for judging the time interval of the robot; if the task is in the effective time interval of the second task, triggering the switching unit;
and the switching unit is used for switching the robot to the second task and controlling the robot to execute a second function in the second task according to the second action set.
Optionally, the determining unit is further configured to further compare priorities of the first task and the second task if the time interval in which the robot is located is both in the valid time interval of the second task and in the valid time interval of the first task;
and if the priority of the second task is higher than that of the first task, triggering the switching unit.
In a third aspect, the present invention provides a task server, where the task server provides a first task, the first task includes a type of a first function to be executed and a first action set, the first action set is an action set for implementing the first function, and the task server is configured with the first task and a valid time interval of the first task in advance for a robot; the task server comprises a memory and a transmitter, and a processor respectively connected with the memory and the transmitter, wherein the memory is used for storing a group of program instructions, and the processor is used for calling the program instructions stored in the memory to execute the following operations:
triggering the transmitter to configure a second task and a valid time interval of the second task for the robot, wherein the second task comprises a type of a second executed function and a second action set, and the second action set is an action set for realizing the second function;
judging the time interval of the robot;
and if the robot is in the effective time interval of the second task, triggering the transmitter to switch the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
if the task is in the effective time interval of the second task and the effective time interval of the first task, further comparing the priorities of the first task and the second task;
and if the priority of the second task is higher than that of the first task, triggering the transmitter to switch the robot to the second task.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
judging whether the robot has a first function of the first task which is not executed;
if yes, after the robot finishes executing the tasks of the first tasks which are not finished, the transmitter is triggered to switch the robot to the second tasks.
Optionally, the setting mode of the priority of the first task includes presetting or setting when the first task is configured for the robot;
the setting mode of the priority of the second task comprises presetting or setting when the second task is configured for the robot.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
and if the priority of the first task is higher than that of the second task, the robot is kept under the first task.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
judging the time interval of the robot;
and if the first task is within the effective time interval of the first task, triggering the transmitter to switch the robot to the first task, and controlling the robot to execute a first function in the first task according to the first action set.
Optionally, the second task is preset in the task server.
Optionally, the second action set includes a plurality of action components and a workflow for indicating an order of execution between the action components.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
determining a plurality of action components required for implementing the second function, and a workflow for indicating an order of execution between the action components;
generating the second action set according to the plurality of components and the corresponding workflow required for realizing the second function;
triggering the transmitter to configure the second task for the robot according to the second function and a second set of actions.
Optionally, the task server further includes a receiver, the receiver is connected to the processor, and the processor is further configured to call the program instruction stored in the memory to perform the following operations:
generating a first control instruction according to a first action component in the second action set, and triggering the transmitter to transmit the first control instruction to the robot;
triggering the receiver to acquire processing information fed back by the robot aiming at the first control instruction;
generating a second control instruction according to a second action component in the second action set, and triggering the transmitter to transmit the second control instruction to the robot, wherein the second action component is an action component which needs to be executed after the first action component is executed under the execution sequence indicated by the workflow of the second action set;
and sequentially generating control instructions sent to the robot according to the processing information fed back by the robot and the execution sequence indicated by the workflow of the second action set until the robot finishes a second function in the second task.
Optionally, the first task further includes an area for executing the first function, the second task further includes an area for executing the second function, and the processor is further configured to call the program instruction stored in the memory to perform the following operations:
controlling the robot to perform a second function in the second task in the area performing the second function according to the second set of actions.
In a fourth aspect, the present invention provides a task switching method, applied to a robot, where the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task includes a type of a first function to be executed and a first action set, the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function; the robot implements the first function by performing a first set of actions, the method comprising:
the robot acquires a first switching command from the server, wherein the first switching command is used for instructing the robot to switch to the second task;
the robot switches from the first task to the second task according to the first switch command;
and the robot controls the robot to execute a second function in the second task according to the second action set.
Optionally, after the robot switches from the first task to the second task according to the switching command, the method further includes:
the robot acquires a second switching command from the server, wherein the second switching command is used for instructing the robot to switch to the first task;
the robot switches from the second task to the first task according to the second switching command;
the robot controls the robot to perform a first function in the first task according to the first action set.
In a fifth aspect, the present invention provides a task switching apparatus applied to a robot, where the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task includes a type of a first function to be executed and a first action set, the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function; the robot realizes the first function by executing a first action set, and the device comprises an acquisition unit, a switching unit and an execution unit:
the acquisition unit is used for acquiring a first switching command from the server, and the first switching command is used for instructing the robot to switch to the second task;
the switching unit is used for switching from the first task to the second task according to the first switching command;
and the execution unit is used for controlling the robot to execute a second function in the second task according to the second action set.
Optionally, the obtaining unit is further configured to obtain a second switching command from the server, where the second switching command is used to instruct the robot to switch to the first task;
the switching unit is further used for switching from the second task to the first task according to the second switching command;
the execution unit is further configured to control the robot to perform a first function in the first task according to the first set of actions.
In a sixth aspect, the present invention provides a robot, the robot being preconfigured with a first task and a valid time interval of the first task by a server, the robot being preconfigured with a second task and a valid time interval of the second task by the server, the first task including a type of a first function performed and a first action set, the second task including a type of a second function performed and a second action set, the second action set being an action set for implementing the second function; the robot realizes the first function by executing a first action set, the robot comprises a memory and a receiver, and a processor respectively connected with the memory and the receiver, the memory is used for storing a group of program instructions, and the processor is used for calling the program instructions stored in the memory to execute the following operations:
triggering the receiver to obtain a first switch command from the server, the first switch command being used to instruct the robot to switch to the second task;
switching from the first task to the second task according to the first switch command;
and controlling the robot to execute a second function in the second task according to the second action set.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
triggering the receiver to acquire a second switching command from the server, wherein the second switching command is used for instructing the robot to switch to the first task;
switching from the second task to the first task according to the second switching command;
and controlling the robot to execute a first function in the first task according to the first action set.
According to the technical scheme, the task server is provided with a preset first task, the first task comprises the type of a executed first function and a first action set, the robot is provided with a second task and an effective time interval of the second task on the premise that the robot is provided with the preset first task and the effective time interval of the first task, when the robot is judged to be in the effective time interval of the second task, the robot can be switched to the second task, the robot is controlled to execute the second function in the second task according to the second action set corresponding to the second task, the invention can be seen in that a plurality of tasks are configured for the robot, the time interval of the robot is used as the basis for switching the tasks, as the task server is provided with the action sets corresponding to different tasks, after the tasks of the robot are switched, the robot can be controlled to realize the function under the task according to the action set corresponding to the switched task, so that the high-efficiency task switching of the robot is realized, and the same robot can complete the functions under different tasks.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a task switching system according to an embodiment of the present invention
Fig. 2 is a flowchart of a task switching method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another task switching method according to an embodiment of the present invention;
FIG. 4 is a diagram of an apparatus structure of a task switching apparatus according to an embodiment of the present invention;
fig. 5 is a hardware structure diagram of a task server according to an embodiment of the present invention;
fig. 6 is a flowchart of a method of task switching according to an embodiment of the present invention;
FIG. 7 is a diagram of an apparatus structure of a task switching apparatus according to an embodiment of the present invention;
fig. 8 is a hardware structure diagram of a robot according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the development of information technology, robots are more and more commonly used in daily work and life. In some tasks, a robot is usually used for replacing manual work to execute corresponding work, but at present, the work task and the work flow of the robot are too modeled, and the robot can only work under a preset task. When the robot is required to execute a work task under a new task, corresponding software setting needs to be carried out for the robot again, and the setting process is complicated and time-consuming. If the robot can be efficiently switched under different tasks, the working efficiency of the robot is greatly improved.
Therefore, the embodiment of the invention provides a task switching method and a related device, wherein the corresponding relation between a task and an action set is preset in a task server, the task and an effective time interval of the task are configured, the time interval of a robot is judged, the task switching is realized according to the time interval, and the robot is controlled to complete the function in the task according to the action set of the task, so that the efficient task switching of the robot is realized, and the same robot can complete the tasks under different tasks.
Based on the basic idea, the embodiment of the invention is mainly realized by the interaction of the task server and the robot. As can be seen from fig. 1, the task server 100 may be provided with one or more tasks, each task including a corresponding function and a set of actions for implementing the function, wherein a first task may be one of preset tasks, the first task including a type of the first function performed and a first set of actions. The manner in which the task server 100 provides the tasks may be various, such as presetting the tasks in the task server 100, or the task server 100 obtaining the tasks from other devices or approaches.
The task server 100 may pre-configure the robot 200 with a first task and a valid time interval of the first task. The first task may be a task set in the task server, and the first action set is an action set for implementing a first function specified by the first task, for example, multiple steps are required for implementing the first function, each step needs to be implemented by executing one action component, and a set of multiple action components having an execution order may be understood as one action set. Besides the first task, the task server may also be provided with a corresponding relationship between other tasks and action sets. In the illustration of fig. 1, the first task is a task related to the distribution of items, and the first function may be the distribution of items.
In the embodiment of the invention, a task has a function specified to be realized, and when a task is configured for a robot, the robot can realize the function specified by the task within a time interval specified by the task. The action set corresponding to one task may be used to control the robot to implement the function specified by the task, for example, the robot may implement the first function by executing the first action set, so the action set of the one task corresponds to a specific way of implementing the function specified by the task. The functions specified by the different tasks may be different or the same. The functions specified by a task may be those that the robot is capable of performing, and may include, for example, the delivery of items, the receipt of packages, the display of robot functions, and the like.
When a task is configured for the robot, a corresponding valid time interval can be configured for the task, and the valid time interval is used for indicating that the robot can complete the function specified by the task within the valid time interval. Taking the example where the robot 200 has the first task and the valid time zone of the first task arranged in advance, it is equivalent to making clear that the robot 200 can realize the first function specified by the first task in the valid time zone of the first task. For example, to sequentially dispense the carried items to the A, B and C positions shown in fig. 1.
The configured validity time interval for a task may include one or more time periods. When the robot is in the effective time interval of a task, the robot can complete the work completed by the specified function by implementing the function specified by the task. For example, if a task functions as the delivery of items, then the work under that task may be the delivery of a particular number of items. The number of jobs under a task is not limited, and the valid time interval of the task and the time for completing a job are related, for example, the valid time interval of the task configured for a robot is 8 to 12, the task is assigned the function of article delivery, then from 8, the robot starts delivery (corresponding to one job in the task) with a batch of articles, and after the batch of articles is delivered, the robot starts delivery (also corresponding to one job in the task) with another batch of articles again, and the cycle is repeated until 12.
In addition to the configuration of the first task and the effective time interval of the first task for the robot, the configuration of the second task and the effective time interval of the second task for the robot is also possible. The second task is different from the first task, and the robot can realize the function specified by the second task through the second action set under the second task. In the illustration of fig. 1, the second task is a task related to a robot presentation, and the second function may be a presentation.
Since the first task and the second task are configured with corresponding valid time intervals, whether to switch the tasks configured by the robot can be determined by judging the current time interval in which the robot is located. For example, when the robot is in the effective time interval of the second task, the robot may be switched to the second task, and the robot may be instructed to implement the function specified by the second task to complete the work in the second task.
In order to make clear that the embodiment of the present invention can implement the above task switching function, a task switching method provided by the embodiment of the present invention is described next with reference to fig. 2,
as shown in fig. 2, a flowchart of a method for switching tasks according to an embodiment of the present invention is provided, where the method includes:
s201: and configuring a second task and an effective time interval of the second task for the robot, wherein the second task comprises the type of the executed second function and a second action set, and the second action set is an action set for realizing the second function.
The task server can add configured tasks to the robot according to the requirements of specific application tasks, and can configure the new tasks for the robot if the robot is required to realize functions under the new tasks, wherein the new tasks are different from the preset first tasks and can be called as second tasks.
And on the premise that the first task and the effective time interval of the first task are configured in advance for the robot, configuring a second task and an effective time interval of the second task for the robot. The effective time interval of the task is configured, so that the effective time interval can be used as a basis when the task needs to be switched in the subsequent operation.
When the condition is met, the task of the robot can be switched rapidly, so that the robot can realize the function specified by the second task. In a specific implementation, the first task configured for the robot in advance may be a default task, and the second task configured for the robot may be a temporary task.
It should be noted that, in the embodiment of the present invention, it is not limited that the second task must be configured for the robot after the first task, and in some cases, the first task and the second task may also be configured for the robot in advance at the same time, only by default, the robot is in the first task.
Since the type of the second function specified by the second task is already clear by the second task, the task server can determine the action set capable of implementing the second function according to the type of the second function. This set of actions that can implement the second function may be the second set of actions of the corresponding second task.
S202: and judging the time interval of the robot. If the second task is within the valid time interval of the second task, S203 is executed.
Before the task server executes the judging step, at least two tasks and effective time intervals of the tasks are necessarily configured for the robot, so that the switching of different tasks can be realized. The first task and the second task will be described as an example.
The task server stores a first task and a valid time interval of the first task and a second task and a valid time interval of the second task. The task server compares the current time with the stored effective time interval, checks the effective time interval to which the current time belongs, and can judge the time interval in which the robot is located. For example, the valid time interval of the first task is set to 9 am to 11 am, the valid time of the second task is set to 1 pm to 4 pm, and if the current time is 3 pm, the task server may determine that the current time belongs to the valid time interval of the second task, that is, may determine that the time interval in which the robot is located is the valid time interval of the second task. If the current time is 10 am, the task server may determine that the current time belongs to the valid time interval of the first task, that is, may determine that the time interval in which the robot is located is the valid time interval of the first task, and may not perform task switching, and keep the robot in the first task. When the time of the robot is the effective time interval of the first task, the robot can realize the function of the first task according to the default first task. For the subsequent operations of the first task, detailed description is omitted here.
S203: and switching the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
When the task needs to be switched, the task server controls the robot to complete the switching of the task, and controls the robot to execute the function in the task according to the action set of the switched task.
Taking the first task and the second task as an example, the reason why the switching is required in S203 is that before S201, the task server has preset a corresponding relationship between the first task and the first action set, and the first task is generally a default task of the robot, that is, when the robot does not receive a new instruction, the robot defaults to complete the work in the first task by executing the first action set within the valid time interval of the first task. Therefore, when the task server determines that the time of the robot belongs to the effective time interval of the second task, the robot needs to be switched from the original first task to the second task.
Specifically, the task switching can be performed by sending a switching instruction to the robot. For example, when the time of the robot belongs to the effective time interval of the second task, the task server sends a switching instruction (the switching instruction carries information of the second task) to the robot, and the robot receives the switching instruction and switches from the default first task mode to the second task.
Or the robot may not need to sense the switching of the tasks, the task server may complete the switching of the tasks of the robot in the background, and then the robot is controlled to execute the second function in the second task through the second action set corresponding to the second task, so that the robot can complete different tasks under different tasks.
After the robot switches to the second task, the task server may control the robot to execute the second function in the second task according to the second action set determined in S202.
All tasks mentioned above comprise types of functions, and different tasks may be distinguished according to the types of functions they contain. For example, the first function specified by the first task is to deliver the package, and the type of the first function is to deliver the package; the second function specified by the second task is a presentation, and the type of the second function is a presentation type.
To define a task more accurately, a task may include, in addition to the type of function specified, a region in which to perform the function, to serve as an indication in which region the robot is to perform the function. For example, the first task is to deliver packages at a 9 th shop, the second task is to deliver packages at a 10 th shop, the first task and the second task are two different tasks, but the two tasks include the same type of function and are both delivery types, but the areas of the 9 th shop and the 10 th shop are different areas. Thereby distinguishing different tasks according to the area of executing the function. Of course, the two tasks may be tasks in which the type of function and the area of the function are different. For example, the first task is to deliver packages at shop 9, and the second task is to show at shop 10.
Taking the first task and the second task as an example, the first task may include, in addition to the type of the first function, an area for performing the first function; the second task may include a region for performing the second function in addition to the type of the second function. When the robot executes the work in the first task, specifically, the robot is controlled to complete the work of the first task by executing the first function in a specified area according to a first action set; when the robot executes a task in the second task, specifically, the robot is controlled to complete the work of the second task by executing the second function in a specified area according to a second action set.
For the case that the task further includes a region for executing the function, the task server may control the robot to execute the function in the task according to the motion set, specifically, control the robot to execute the function in the region for executing the function according to the motion set.
According to the areas of the execution functions included in the tasks, the range of one task can be more accurately defined, the tasks can be distinguished, and the task server can conveniently control the robot to execute work in the designated area according to the areas included in the tasks.
It can be seen that in the method for switching tasks provided in this embodiment, the task server has a preset first task, where the first task includes a type of a executed first function and a first action set, and on the premise that the robot has the preset first task and an effective time interval of the first task, the robot is configured with a second task and an effective time interval of the second task, and when it is determined that the robot is within the effective time interval of the second task, the robot may be switched to the second task, and the robot is controlled to execute a second function in the second task according to a second action set corresponding to the second task, and as a result, the task server has action sets corresponding to different tasks, after the tasks of the robot are switched, the robot can be controlled to realize the functions under the tasks according to the action set corresponding to the switched tasks, so that the high-efficiency task switching of the robot is realized, and the same robot can complete the functions under different tasks.
Example two
On the basis of the embodiment corresponding to fig. 2, the present embodiment is described in detail with respect to different situations that may occur when determining the time interval in which the robot is located. As shown in fig. 3, a flowchart of another task switching method provided in an embodiment of the present invention is provided, where the method includes:
s301: and configuring a second task and an effective time interval of the second task for the robot, wherein the second task comprises the type of the executed second function and a second action set, and the second action set is an action set for realizing the second function.
S302: and judging the time interval of the robot. And if the second task is in the valid time interval of the second task and the first task is in the valid time interval of the first task, executing S303.
One or more effective time intervals can be configured for one task, and the effective time intervals corresponding to one task are not overlapped with each other. However, for different tasks, overlapping of the respective validity time intervals may occur. For example, if the valid time interval allocated for the first task is 9 am to 11 am, and the valid time interval allocated for the second task is 8 am to 10 am, the valid time interval allocated for the second task from 9 am to 10 am belongs to a portion where the valid time interval of the first task and the valid time interval of the second task overlap, and if the robot is half am at 9 am, the task server determines that the time interval in which the robot is located is both the valid time interval of the first task and the valid time interval of the second task, and for one robot, the functions specified by two different tasks cannot be simultaneously implemented, and the tasks of the two different tasks cannot be simultaneously executed. For this case, therefore, the determination of the priority in S303 may be further made to decide whether the robot performs the work of the first task or switches to the work of the second task to perform the work of the second task.
S303: and judging whether the priority of the second task is higher than that of the first task. If the priority of the second task is higher than the priority of the first task, executing S304.
The priority may be a setting for indicating the importance of the task, and may be set in various levels according to actual needs, for example, the priority may be classified into a high priority, a medium priority, a low priority, and the like. When the time interval in which the robot is located belongs to the effective time interval in which two or more tasks are overlapped, whether the robot needs to switch the tasks or what the specific tasks need to be switched are determined by comparing the priorities of the tasks.
In the embodiment of the invention, the first task and the second task are set with different levels of priorities, so that when the effective time intervals of the first task and the second task overlap, the task switching can be determined according to the priorities of the first task and the second task. For example, when two tasks with different priorities exist in the time interval in which the robot is located, the robot may be switched to the task with the high priority, or the robot may continue to be in the task with the high priority without switching the tasks.
The priority level of a task may be determined according to the type of the function included in the task, for example, the type of the function of the first task is a delivery type, the type of the function of the second task is an exhibition type, and if the delivery type is more important than the exhibition type, the first task may be set to a high priority and the second task may be set to a low priority.
The priority level of a task may also be determined according to the area included in the task, for example, the area of the first function executed by the first task is the 9 th museum, the area of the second function executed by the second task is the campus, the two different areas are compared, if the importance level of the 9 th museum is higher than that of the campus, the first task may be set as high priority, and the second task may be set as low priority.
The time for setting the priority of the task can be selected in various ways, for example, the priority can be set in advance, that is, the priority of the task is set when the task server sets the task. Or when the task server configures the task for the robot, the priority of the task is set according to the requirement.
In the case of the priority of the preset task, the previously set priority may need to be changed in consideration of the variability of the actual situation, and the priority of the task may be set again when the task is configured for the robot. For example, the task server may set the task to a low priority when the task is to be configured, and may change the priority to a high priority when the task is to be configured for the robot and robot priority processing is required in case of an emergency in the task.
The first task and the second task will be described as an example.
When the time interval in which the robot is located belongs to a time interval in which the first task and the second task overlap, the priorities of the first task and the second task may be further compared. When the priority of the second task is higher than that of the first task, S304 is performed.
It is noted that when the priority of the first task is higher than the priority of the second task, the robot remains under the first task and continues to execute the tasks in the first task.
According to the embodiment of the invention, the corresponding task is selected according to the effective time interval, when the time interval in which the robot is located belongs to the effective time intervals of a plurality of tasks, the priorities of the tasks can be compared, and when the robot is not in the high-priority task, the task switching is carried out, so that the robot can serve the high-priority task preferentially, the control capability of the robot is enhanced, and the user experience is improved.
S304: judging whether the robot has a first function of the first task which is not executed; if yes, the first function is executed.
Through the priority judgment in S303, it is determined that the priority of the second task is higher than the priority of the first task, and at this time, the robot needs to switch to the second task, and considering that when the priority judgment result is obtained and the robot is ready to switch to the second task, the robot may be in the process of executing the first function in the first task, and at this time, if the robot is directly switched to the second task and is controlled to execute the second function in the second task, the work of the executing first task cannot be finished. For example, when the robot performs a first function in a first task of delivering a package, the robot may switch to a second task before reaching the delivery location of the package and perform a second function of the second task, which may result in the package not being delivered in a timely manner.
Therefore, in order to avoid the above situation, before the robot is switched to the second task, the operation of determining the execution function may be added to determine whether the robot has the first function of the first task that is not executed.
If yes, the robot waits for the first task whose execution has not been completed to be executed by the robot, and then executes S305.
It should be noted that there is a possibility that if the task in the second task is a very urgent task and needs to be executed by the robot immediately, S305 may not be executed at this time, and S306 may be directly executed to switch the robot to the second task, and whether to execute S305 does not affect the implementation of the present embodiment.
Therefore, before the task is switched, whether the robot is switched to the second task immediately can be determined by judging whether the robot executes the corresponding function. And when the robot executes the function in the first task, the robot can wait for the first function of the first task which is not executed to be executed by the robot and then switch the task, so that the adverse effect possibly caused by incomplete work is avoided. And under the condition that the robot needs to execute the second function in the second task immediately, the robot can be directly switched to the second task without judging whether the robot is executing the task, so that the reaction speed of the robot to the important task is increased, and the execution requirement of the important task is met.
S305: and switching the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
And after the robot is switched to the second task, the task server controls the robot to execute the task in the second task according to the second action set. Certainly, after the robot is switched to the second task, the robot is not always under the second task, and in order to enable the robot to more flexibly execute tasks under different tasks, the robot can be switched back to the first task according to requirements, so that the control capability of the robot is enhanced. Specifically, the method may further include:
s306: and judging the time interval of the robot. If the time interval is within the valid time interval of the first task, S307 is executed.
S307: and switching the robot to the first task, and controlling the robot to execute a first function in the first task according to the first action set.
For example, the effective time interval of the first task is 8 am to 10 am and 1 pm to 3 pm, and the effective time interval of the second task is 10 am to 1 pm. The task server judges the time interval of the robot, executes work in a first task from 8 am to 10 am, switches the robot to a second task when the time reaches 10 am, executes work in the second task, and switches the robot to the first task again when the time reaches 1 pm to execute work in the first task.
EXAMPLE III
The determination of the action set according to the task is mentioned in the first embodiment, and the present embodiment is introduced for several different determination manners on the basis of the first embodiment.
The action set is determined by the task server according to the task, wherein the task can be a task preset by the task server or a task configured by the task server when the task needs to be configured for the robot.
One way to determine the action set from the task may be to determine the action set by searching for a correspondence through the task. When the task is a task preset by the task server, the task server generates an action set for realizing the function according to the function contained in the task when setting the task, and stores the corresponding relation between the task and the action set. When the robot needs to execute a task in the task, the task server searches the corresponding relation between the pre-stored task and the action set, and determines the action set corresponding to the task. For example, the task server may have a preset second task. Then a corresponding second set of actions may be looked up according to the second task.
Another way of determining this is to generate the set of actions when configuring a task for the robot, which may be understood as a direct determination of the set of actions by the function of the task. The task is configured by the task server when configuration is needed, that is, the task server does not store an action set corresponding to the task. There may be various reasons for not saving the action set, wherein one reason may be that the robot is required to execute the corresponding function for the task in some emergency, and the task is never generated in the task server, so the natural task server does not have the corresponding action set. Another reason may be that the task server has generated the task, but does not store the action set corresponding to the task, and when the robot needs to execute the function in the task, the task server needs to set the action set again.
In the case where a task is configured by a task server when configuration is required, since the task server does not store an action set of the task, it is necessary to configure an action set of the task.
In embodiments of the present invention, an action set may be composed of a plurality of action components and a workflow for indicating the order of execution among the action components.
The action set is used for realizing a function, a plurality of action components can be included in the action set, and one action component can be understood as a link in the process of realizing the function. The action set also comprises a workflow for indicating the execution sequence among the action components, namely, the workflow is used for determining in which sequence the action components are executed, and the action components are executed according to the sequence so as to realize a function smoothly, wherein the sequence of the action components is required to be coordinated by the workflow. It should be noted that some common workflows may be saved in a task server for invocation when generating a set of actions.
The action components can be stored in the task server, and can be divided into general action components and non-general action components in the degree of generality. If a link is required in the implementation process of different functions, the link may be defined as a general action component, and if a link is mainly used in the implementation process of some specific functions, the link may be defined as a non-general action component. For example, when a task is to deliver packages in a 9 # hall, a delivery function is to be realized, and a series of links such as route identification, traffic light identification, pedestrian avoidance, elevator taking and rain sheltering are involved, wherein the links of the route identification, the traffic light identification, the pedestrian avoidance and the elevator taking are links which are frequently used for realizing the delivery function, the links are classified into general action components, and the rain sheltering link is a link which is used only in rainy days and is classified into a non-general action component.
When the second task is configured for the robot, if the second action set corresponding to the second task is not stored, the second action set needs to be generated. The action components required for realizing the second function can be determined from the saved action components according to the second function specified by the second task, and the workflow corresponding to the second function can be determined according to the execution sequence of the action components required for realizing the second function. And combining the selected action components according to the execution sequence of the selected workflow to generate a second action set capable of realizing a second function.
The task server may control the robot to perform a function in the task in accordance with the generated set of actions. Considering that the action components included in the generated action set are in a sequential order, the task server can detect the execution condition of each action component, so that the condition that the execution process of the action set is out of order is avoided, or the action set can be found in time when a certain link has a problem.
To this end, embodiments of the present invention provide a way to control a robot to perform a function in a task according to a set of actions.
Next, taking a second action set as an example, the task server generates a first control command according to a first action component in the second action set, and transmits the first control command to the robot. Wherein the first action component is one of a plurality of action components included in the second action set.
And after processing information fed back by the robot for the first control instruction is acquired, generating a second control instruction according to a second action component in the action set, and sending the second control instruction to the robot, wherein the second action component is an action component which needs to be executed after the first action component is executed under the execution sequence indicated by the workflow of the second action set. I.e., the next action component that needs to be executed after the first action component is executed according to the workflow.
And sequentially generating control instructions sent to the robot according to the processing information fed back by the robot and the execution sequence indicated by the workflow of the second action set until the robot finishes the function in the second task.
For example, a function includes five action assemblies, which have a chronological order, numbered 1 to 5, respectively, with the numbering distinguishing the chronological order. The task server controls the robot to execute the action component 1, and controls the robot to execute the action component 2 after receiving the feedback processing information (the feedback information can be that the action component 1 is executed completely) of the robot, and controls the robot to execute the action component 3 after receiving the feedback processing information (the feedback information can be that the action component 2 is executed completely) of the robot, and so on until the robot realizes the function (namely, the work in the task is completed).
By the method, the execution condition of the robot can be accurately controlled, the reliability of the robot in executing the function is improved, and when the robot executes the function, if a problem occurs in a certain link during execution, the task server can quickly find the problem, so that the problem that the robot is stuck or cannot continuously execute the function can be avoided.
Of course, the above-mentioned detection of the execution of the action component is only an alternative way. The execution condition of each action component in the action set is not monitored, after the action set of the task is generated, the control instruction set is directly generated according to the action set and sent to the robot, and the robot completes the function in the task by executing the instruction in the control instruction set, so that the processing pressure of the task server is reduced.
Fig. 4 is a device structure diagram of a task switching device, which is applied to a task server, where the task server provides a first task, the first task includes a type of a first function to be executed and a first action set, the first action set is an action set for implementing the first function, and the task server is configured with the first task and a valid time interval of the first task in advance for a robot; the device comprises a configuration unit 401, a judgment unit 402 and a switching unit 403:
the configuration unit 401 is configured to configure a second task and a valid time interval of the second task for the robot, where the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function;
the judging unit 402 is configured to judge a time interval in which the robot is located; if the task is in the effective time interval of the second task, triggering the switching unit;
the switching unit 403 is configured to switch the robot to the second task, and control the robot to execute a second function in the second task according to the second action set.
For the description of the above units, reference is made to the related description of the embodiment corresponding to fig. 2, which is not repeated herein.
Optionally, the determining unit is further configured to further compare priorities of the first task and the second task if the time interval in which the robot is located is both in the valid time interval of the second task and in the valid time interval of the first task;
and if the priority of the second task is higher than that of the first task, triggering the switching unit.
It can be seen that the task server has a preset first task, the first task includes a type of a first function to be executed and a first action set, on the premise that the robot has the preset first task and an effective time interval of the first task, the robot is configured with a second task and an effective time interval of the second task, when the robot is judged to be in the effective time interval of the second task, the robot can be switched to the second task, and the robot is controlled to execute a second function in the second task according to a second action set corresponding to the second task, it can be seen that the invention can configure a plurality of tasks for the robot, and the time interval in which the robot is located is used as a basis for switching tasks, because the task server has action sets corresponding to different tasks, after switching the tasks of the robot, the robot can be controlled according to the action set corresponding to the task to be switched to implement the function under the task, therefore, the efficient task switching of the robot is realized, and the same robot can complete functions under different tasks.
Fig. 5 is a hardware structure diagram of a task server according to an embodiment of the present invention, where the task server 500 provides a first task, where the first task includes a type of a first function to be performed and a first action set, the first action set is an action set for implementing the first function, and the task server 500 pre-configures, for a robot, the first task and a valid time interval of the first task; the task server 500 includes a memory 501 and a transmitter 502, and a processor 503 connected to the memory 501 and the transmitter 502, respectively, where the memory 501 is used to store a set of program instructions, and the processor 503 is used to call the program instructions stored in the memory 501 to perform the following operations:
triggering the transmitter 502 to configure a second task and a valid time interval of the second task for the robot, wherein the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function;
judging the time interval of the robot;
and if the robot is in the effective time interval of the second task, triggering the transmitter to switch the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
Alternatively, the processor 503 may be a Central Processing Unit (CPU), the Memory 501 may be an internal Memory of a Random Access Memory (RAM) type, and the transmitter 502 may include a common physical interface, which may be an Ethernet (Ethernet) interface or an Asynchronous Transfer Mode (ATM) interface. The processor 503, transmitter 502, and memory 501 may be integrated into one or more separate circuits or hardware, such as: application Specific Integrated Circuit (ASIC).
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
if the task is in the effective time interval of the second task and the effective time interval of the first task, further comparing the priorities of the first task and the second task;
and if the priority of the second task is higher than that of the first task, triggering the transmitter to switch the robot to the second task.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
judging whether the robot has a first function of the first task which is not executed;
if yes, after the robot finishes executing the tasks of the first tasks which are not finished, the transmitter is triggered to switch the robot to the second tasks.
Optionally, the setting mode of the priority of the first task includes presetting or setting when the first task is configured for the robot;
the setting mode of the priority of the second task comprises presetting or setting when the second task is configured for the robot.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
and if the priority of the first task is higher than that of the second task, the robot is kept under the first task.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
judging the time interval of the robot;
and if the first task is within the effective time interval of the first task, triggering the transmitter to switch the robot to the first task, and controlling the robot to execute a first function in the first task according to the first action set.
Optionally, the second task is preset in the task server.
Optionally, the second action set includes a plurality of action components and a workflow for indicating an order of execution between the action components.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
determining a plurality of action components required for implementing the second function, and a workflow for indicating an order of execution between the action components;
generating the second action set according to the plurality of components and the corresponding workflow required for realizing the second function;
triggering the transmitter to configure the second task for the robot according to the second function and a second set of actions.
Optionally, the task server further includes a receiver, the receiver is connected to the processor, and the processor is further configured to call the program instruction stored in the memory to perform the following operations:
generating a first control instruction according to a first action component in the second action set, and triggering the transmitter to transmit the first control instruction to the robot;
triggering the receiver to acquire processing information fed back by the robot aiming at the first control instruction;
generating a second control instruction according to a second action component in the second action set, and triggering the transmitter to transmit the second control instruction to the robot, wherein the second action component is an action component which needs to be executed after the first action component is executed under the execution sequence indicated by the workflow of the second action set;
and sequentially generating control instructions sent to the robot according to the processing information fed back by the robot and the execution sequence indicated by the workflow of the second action set until the robot finishes a second function in the second task.
Optionally, the first task further includes an area for executing the first function, the second task further includes an area for executing the second function, and the processor is further configured to call the program instruction stored in the memory to perform the following operations:
controlling the robot to perform a second function in the second task in the area performing the second function according to the second set of actions.
It can be seen that the task server has a preset first task, the first task includes a type of a first function to be executed and a first action set, on the premise that the robot has the preset first task and an effective time interval of the first task, the robot is configured with a second task and an effective time interval of the second task, when the robot is judged to be in the effective time interval of the second task, the robot can be switched to the second task, and the robot is controlled to execute a second function in the second task according to a second action set corresponding to the second task, it can be seen that the invention can configure a plurality of tasks for the robot, and the time interval in which the robot is located is used as a basis for switching tasks, because the task server has action sets corresponding to different tasks, after switching the tasks of the robot, the robot can be controlled according to the action set corresponding to the task to be switched to implement the function under the task, therefore, the efficient task switching of the robot is realized, and the same robot can complete functions under different tasks.
The solution provided by the invention is described next from the perspective of a robot. Fig. 6 is a flowchart of a method of a task switching method according to an embodiment of the present invention, which is applied to a robot, where the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task includes a type of a first function to be executed and a first action set, the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function; the robot implements the first function by performing a first set of actions, the method comprising:
s601: the robot obtains a first switch command from the server, the first switch command being used to instruct the robot to switch to the second task.
S602: the robot switches from the first task to the second task according to the first switch command.
S603: and the robot controls the robot to execute a second function in the second task according to the second action set.
It can be seen that the robot can implement the function specified by one task by executing the action set of the task, and when the task is switched, the robot only needs to select the action set for executing the switched task, so that the function specified by the switched task can be quickly implemented after the task is switched.
Optionally, after the robot switches from the first task to the second task according to the switching command, the method further includes:
the robot acquires a second switching command from the server, wherein the second switching command is used for instructing the robot to switch to the first task.
And the robot switches from the second task to the first task according to the second switching command.
The robot controls the robot to perform a first function in the first task according to the first action set.
Fig. 7 is a device structure diagram of a task switching device according to an embodiment of the present invention, which is applied to a robot, where the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task includes a type of a first function to be executed and a first action set, the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function; the robot realizes the first function by executing a first action set, and the apparatus includes an acquisition unit 701, a switching unit 702, and an execution unit 703:
the acquiring unit 701 is configured to acquire a first switching command from the server, where the first switching command is used to instruct the robot to switch to the second task;
the switching unit 702 is configured to switch from the first task to the second task according to the first switching command;
the executing unit 703 is configured to control the robot to execute a second function in the second task according to the second action set.
Optionally, the obtaining unit is further configured to obtain a second switching command from the server, where the second switching command is used to instruct the robot to switch to the first task;
the switching unit is further used for switching from the second task to the first task according to the second switching command;
the execution unit is further configured to control the robot to perform a first function in the first task according to the first set of actions.
It can be seen that the robot can implement the function specified by one task by executing the action set of the task, and when the task is switched, the robot only needs to select the action set for executing the switched task, so that the function specified by the switched task can be quickly implemented after the task is switched.
Fig. 8 is a hardware structure diagram of a robot according to an embodiment of the present invention, where the robot 800 is preconfigured with a first task and a valid time interval of the first task by a server, the robot 800 is preconfigured with a second task and a valid time interval of the second task by the server, the first task includes a type of a first function to be executed and a first action set, the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function; the robot 800 implements the first function by performing a first set of actions, the robot 800 comprises a memory 801 and a receiver 802, and a processor 803 connected to the memory 801 and the receiver 802, respectively, the memory 801 is configured to store a set of program instructions, and the processor 803 is configured to call the program instructions stored in the memory 801 to perform the following operations:
triggering the receiver 802 to obtain a first switch command from the server, the first switch command instructing the robot to switch to the second task.
Switching from the first task to the second task according to the first switch command.
And controlling the robot to execute a second function in the second task according to the second action set.
Alternatively, the processor 803 may be a CPU, the memory 801 may be an internal memory of a RAM type, and the receiver 802 may include a common physical interface, which may be an Ethernet interface or an ATM interface. The processor 803, receiver 802 and memory 801 may be integrated into one or more separate circuits or hardware, such as: an ASIC.
Optionally, the processor is further configured to call the program instruction stored in the memory to perform the following operations:
triggering the receiver to acquire a second switching command from the server, wherein the second switching command is used for instructing the robot to switch to the first task;
switching from the second task to the first task according to the second switching command;
and controlling the robot to execute a first function in the first task according to the first action set.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium may be at least one of the following media: various media that can store program codes, such as read-only memory (ROM), RAM, magnetic disk, or optical disk.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (30)
1. A task switching method is applied to a task server, the task server provides a first task, the first task comprises a type of a first function to be executed and a first action set, the first action set is an action set used for realizing the first function, and the task server is configured with the first task and a valid time interval of the first task for a robot in advance; the method comprises the following steps:
configuring a second task and a valid time interval of the second task for the robot, wherein the second task comprises a type of a second executed function and a second action set, and the second action set is an action set for realizing the second function;
judging the time interval of the robot;
and if the second task is within the effective time interval of the second task, switching the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
2. The method of claim 1, wherein the determining the time interval in which the robot is located comprises:
if the task is in the effective time interval of the second task and the effective time interval of the first task, further comparing the priorities of the first task and the second task;
and if the priority of the second task is higher than that of the first task, executing the step of switching the robot to the second task.
3. The method of claim 2, further comprising, prior to performing the step of switching the robot to the second task:
judging whether the robot has a first function of the first task which is not executed;
if yes, after the robot finishes executing the tasks of the first tasks which are not executed, the step of switching the robot to the second tasks is executed.
4. The method of claim 2, wherein the priority of the first task is set in a manner that is preset or set when the first task is configured for the robot;
the setting mode of the priority of the second task comprises presetting or setting when the second task is configured for the robot.
5. The method of claim 2, wherein comparing the priorities of the first and second tasks comprises:
and if the priority of the first task is higher than that of the second task, the robot is kept under the first task.
6. The method of claim 1 or 2, further comprising, after said switching the robot to the second task:
judging the time interval of the robot;
and if the first task is within the effective time interval of the first task, switching the robot to the first task, and controlling the robot to execute a first function in the first task according to the first action set.
7. The method of claim 1, wherein the second task is pre-provisioned in the task server.
8. The method of claim 1, wherein the second set of actions comprises a plurality of action components and a workflow for indicating an order of execution between the action components.
9. The method of claim 8, wherein configuring the robot with a second task comprises:
determining a plurality of action components required for implementing the second function, and a workflow for indicating an order of execution between the action components;
generating the second action set according to the plurality of components and the corresponding workflow required for realizing the second function;
configuring the second task for the robot according to the second function and second set of actions.
10. The method of claim 8, wherein said controlling the robot to perform a second function in the second task according to the second set of actions comprises:
generating a first control instruction according to a first action component in the second action set, and sending the first control instruction to the robot;
acquiring processing information fed back by the robot aiming at the first control instruction;
generating a second control instruction according to a second action component in the second action set, and sending the second control instruction to the robot, wherein the second action component is an action component which needs to be executed after the first action component is executed under the execution sequence indicated by the workflow of the second action set;
and sequentially generating control instructions sent to the robot according to the processing information fed back by the robot and the execution sequence indicated by the workflow of the second action set until the robot finishes a second function in the second task.
11. The method of claim 1, wherein the first task further comprises an area to perform the first function, wherein the second task further comprises an area to perform the second function, and wherein controlling the robot to perform a task of the second task according to the second set of actions comprises:
controlling the robot to perform a second function in the second task in the area performing the second function according to the second set of actions.
12. The task switching device is applied to a task server, the task server provides a first task, the first task comprises a type of a first function to be executed and a first action set, the first action set is an action set used for realizing the first function, and the task server is configured with the first task and a valid time interval of the first task in advance for a robot; the device comprises a configuration unit, a judgment unit and a switching unit:
the configuration unit is configured to configure a second task and an effective time interval of the second task for the robot, where the second task includes a type of a second function to be executed and a second action set, and the second action set is an action set for implementing the second function;
the judging unit is used for judging the time interval of the robot; if the task is in the effective time interval of the second task, triggering the switching unit;
and the switching unit is used for switching the robot to the second task and controlling the robot to execute a second function in the second task according to the second action set.
13. The apparatus according to claim 12, wherein the determining unit is further configured to further compare the priorities of the first task and the second task if the robot is located in the valid time interval of the second task and the valid time interval of the first task;
and if the priority of the second task is higher than that of the first task, triggering the switching unit.
14. A task server is characterized in that the task server provides a first task, the first task comprises a type of a first executed function and a first action set, the first action set is an action set used for realizing the first function, and the task server is configured with the first task and a valid time interval of the first task in advance for a robot; the task server comprises a memory and a transmitter, and a processor respectively connected with the memory and the transmitter, wherein the memory is used for storing a group of program instructions, and the processor is used for calling the program instructions stored in the memory to execute the following operations:
triggering the transmitter to configure a second task and a valid time interval of the second task for the robot, wherein the second task comprises a type of a second executed function and a second action set, and the second action set is an action set for realizing the second function;
judging the time interval of the robot;
and if the robot is in the effective time interval of the second task, triggering the transmitter to switch the robot to the second task, and controlling the robot to execute a second function in the second task according to the second action set.
15. The task server of claim 14, wherein the processor is further configured to invoke the memory-stored program instructions to perform the operations of:
if the task is in the effective time interval of the second task and the effective time interval of the first task, further comparing the priorities of the first task and the second task;
and if the priority of the second task is higher than that of the first task, triggering the transmitter to switch the robot to the second task.
16. The task server of claim 15, wherein the processor is further configured to invoke the memory-stored program instructions to perform the operations of:
judging whether the robot has a first function of the first task which is not executed;
if yes, after the robot finishes executing the tasks of the first tasks which are not finished, the transmitter is triggered to switch the robot to the second tasks.
17. The task server of claim 15, wherein the priority of the first task is set in a manner that is preset or set when the first task is configured for the robot;
the setting mode of the priority of the second task comprises presetting or setting when the second task is configured for the robot.
18. The task server of claim 15, wherein the processor is further configured to invoke the memory-stored program instructions to perform the operations of:
and if the priority of the first task is higher than that of the second task, the robot is kept under the first task.
19. The task server of claim 14 or 15, wherein the processor is further configured to invoke the memory-stored program instructions to perform the following operations:
judging the time interval of the robot;
and if the first task is within the effective time interval of the first task, triggering the transmitter to switch the robot to the first task, and controlling the robot to execute a first function in the first task according to the first action set.
20. The task server of claim 14, wherein the second task is pre-provisioned in the task server.
21. The task server of claim 14, wherein the second set of actions comprises a plurality of action components and a workflow for indicating an order of execution between the action components.
22. The task server of claim 21, wherein the processor is further configured to invoke the memory-stored program instructions to perform the operations of:
determining a plurality of action components required for implementing the second function, and a workflow for indicating an order of execution between the action components;
generating the second action set according to the plurality of components and the corresponding workflow required for realizing the second function;
triggering the transmitter to configure the second task for the robot according to the second function and a second set of actions.
23. The task server of claim 21, further comprising a receiver coupled to the processor, the processor further configured to invoke the program instructions stored in the memory to perform the following operations:
generating a first control instruction according to a first action component in the second action set, and triggering the transmitter to transmit the first control instruction to the robot;
triggering the receiver to acquire processing information fed back by the robot aiming at the first control instruction;
generating a second control instruction according to a second action component in the second action set, and triggering the transmitter to transmit the second control instruction to the robot, wherein the second action component is an action component which needs to be executed after the first action component is executed under the execution sequence indicated by the workflow of the second action set;
and sequentially generating control instructions sent to the robot according to the processing information fed back by the robot and the execution sequence indicated by the workflow of the second action set until the robot finishes a second function in the second task.
24. The task server of claim 14, wherein the first task further comprises an area to perform the first function, wherein the second task further comprises an area to perform the second function, and wherein the processor is further configured to invoke the memory-stored program instructions to perform the following operations:
controlling the robot to perform a second function in the second task in the area performing the second function according to the second set of actions.
25. A task switching method is applied to a robot, wherein the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task comprises a type of a first executed function and a first action set, the second task comprises a type of a second executed function and a second action set, and the second action set is an action set for realizing the second function; the robot implements the first function by performing a first set of actions, the method comprising:
the robot acquires a first switching command from the server, wherein the first switching command is used for instructing the robot to switch to the second task;
the robot switches from the first task to the second task according to the first switch command;
and the robot controls the robot to execute a second function in the second task according to the second action set.
26. The method of claim 25, further comprising, after the robot switches from the first task to the second task in accordance with the switch command:
the robot acquires a second switching command from the server, wherein the second switching command is used for instructing the robot to switch to the first task;
the robot switches from the second task to the first task according to the second switching command;
the robot controls the robot to perform a first function in the first task according to the first action set.
27. A task switching device is applied to a robot, wherein the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task comprises a type of a first executed function and a first action set, the second task comprises a type of a second executed function and a second action set, and the second action set is an action set for realizing the second function; the robot realizes the first function by executing a first action set, and the device comprises an acquisition unit, a switching unit and an execution unit:
the acquisition unit is used for acquiring a first switching command from the server, and the first switching command is used for instructing the robot to switch to the second task;
the switching unit is used for switching from the first task to the second task according to the first switching command;
and the execution unit is used for controlling the robot to execute a second function in the second task according to the second action set.
28. The apparatus of claim 27, wherein the obtaining unit is further configured to obtain a second switching command from the server, and wherein the second switching command is configured to instruct the robot to switch to the first task;
the switching unit is further used for switching from the second task to the first task according to the second switching command;
the execution unit is further configured to control the robot to perform a first function in the first task according to the first set of actions.
29. A robot, characterized in that the robot is preconfigured with a first task and a valid time interval of the first task by a server, the robot is preconfigured with a second task and a valid time interval of the second task by the server, the first task comprises a type of a first function performed and a first action set, the second task comprises a type of a second function performed and a second action set, the second action set is an action set for realizing the second function; the robot realizes the first function by executing a first action set, the robot comprises a memory and a receiver, and a processor respectively connected with the memory and the receiver, the memory is used for storing a group of program instructions, and the processor is used for calling the program instructions stored in the memory to execute the following operations:
triggering the receiver to obtain a first switch command from the server, the first switch command being used to instruct the robot to switch to the second task;
switching from the first task to the second task according to the first switch command;
and controlling the robot to execute a second function in the second task according to the second action set.
30. A robot as recited in claim 29, wherein the processor is further configured to invoke the memory-stored program instructions to perform the following operations:
triggering the receiver to acquire a second switching command from the server, wherein the second switching command is used for instructing the robot to switch to the first task;
switching from the second task to the first task according to the second switching command;
and controlling the robot to execute a first function in the first task according to the first action set.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610939702.5A CN107976918B (en) | 2016-10-24 | 2016-10-24 | Task switching method and related device |
TW106126278A TW201816598A (en) | 2016-10-24 | 2017-08-03 | Task switching method and related device |
PCT/CN2017/105643 WO2018077032A1 (en) | 2016-10-24 | 2017-10-11 | Task switching method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610939702.5A CN107976918B (en) | 2016-10-24 | 2016-10-24 | Task switching method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107976918A CN107976918A (en) | 2018-05-01 |
CN107976918B true CN107976918B (en) | 2020-10-13 |
Family
ID=62004107
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610939702.5A Active CN107976918B (en) | 2016-10-24 | 2016-10-24 | Task switching method and related device |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN107976918B (en) |
TW (1) | TW201816598A (en) |
WO (1) | WO2018077032A1 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659113A (en) * | 2018-06-29 | 2020-01-07 | 北京京东尚科信息技术有限公司 | A task communication method and device |
CN110209485B (en) * | 2019-06-05 | 2020-06-02 | 青岛海通胜行智能科技有限公司 | Dynamic avoidance method for multiple robots during cooperative operation |
CN110239868B (en) * | 2019-06-29 | 2021-05-11 | 深圳市海柔创新科技有限公司 | Pick-up task allocation method and goods sorting system |
JP7276185B2 (en) * | 2020-02-12 | 2023-05-18 | トヨタ自動車株式会社 | Task execution system, wireless connection method, and program |
CN111880877B (en) * | 2020-07-24 | 2023-10-31 | 上海米哈游天命科技有限公司 | Animation switching method, device, equipment and storage medium |
CN112356030B (en) * | 2020-11-05 | 2022-04-22 | 苏州工业园区卡鲁生产技术研究院 | Robot control method, device, computer equipment and storage medium |
CN115145233B (en) * | 2022-07-25 | 2023-08-01 | 西安热工研究院有限公司 | Multi-stage small-granularity movement scheduling control method, device and equipment for robot |
CN115946126B (en) * | 2023-02-22 | 2023-06-13 | 深圳市欧拉智造科技有限公司 | Task execution control method and robot |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101884585A (en) * | 2010-07-30 | 2010-11-17 | 山东建筑大学 | A Chinese medicine massage robot control system |
US8311905B1 (en) * | 2008-09-29 | 2012-11-13 | Honda Motor Co., Ltd. | Computerized system and method for automated demand-based parts delivery |
CN102914967A (en) * | 2012-09-21 | 2013-02-06 | 浙江工业大学 | Autonomous navigation and man-machine coordination picking operating system of picking robot |
CN103403628A (en) * | 2011-01-31 | 2013-11-20 | 丰田自动车株式会社 | Safety control device and safety control method |
CN104240041A (en) * | 2009-02-25 | 2014-12-24 | 西门子公司 | Method and system for scheduling a manufacturing process |
CN104657835A (en) * | 2013-11-20 | 2015-05-27 | 沈阳工业大学 | Machining workshop scheduling and monitoring system and method |
CN105447677A (en) * | 2014-09-22 | 2016-03-30 | 富士通株式会社 | Apparatus and scheduling method |
CN105700941A (en) * | 2015-12-18 | 2016-06-22 | 西安工业大学 | Three-dimensional scheduler model and scheduling algorithm thereof |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4210270B2 (en) * | 2005-06-07 | 2009-01-14 | ファナック株式会社 | Robot control apparatus and robot control method |
US10802876B2 (en) * | 2013-05-22 | 2020-10-13 | Massachusetts Institute Of Technology | Multiprocessor scheduling policy with deadline constraint for determining multi-agent schedule for a plurality of agents |
US20150324229A1 (en) * | 2014-05-09 | 2015-11-12 | International Business Machines Corporation | Propagation of task progress through the use of coalesced time intervals |
-
2016
- 2016-10-24 CN CN201610939702.5A patent/CN107976918B/en active Active
-
2017
- 2017-08-03 TW TW106126278A patent/TW201816598A/en unknown
- 2017-10-11 WO PCT/CN2017/105643 patent/WO2018077032A1/en active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8311905B1 (en) * | 2008-09-29 | 2012-11-13 | Honda Motor Co., Ltd. | Computerized system and method for automated demand-based parts delivery |
CN104240041A (en) * | 2009-02-25 | 2014-12-24 | 西门子公司 | Method and system for scheduling a manufacturing process |
CN101884585A (en) * | 2010-07-30 | 2010-11-17 | 山东建筑大学 | A Chinese medicine massage robot control system |
CN103403628A (en) * | 2011-01-31 | 2013-11-20 | 丰田自动车株式会社 | Safety control device and safety control method |
CN102914967A (en) * | 2012-09-21 | 2013-02-06 | 浙江工业大学 | Autonomous navigation and man-machine coordination picking operating system of picking robot |
CN104657835A (en) * | 2013-11-20 | 2015-05-27 | 沈阳工业大学 | Machining workshop scheduling and monitoring system and method |
CN105447677A (en) * | 2014-09-22 | 2016-03-30 | 富士通株式会社 | Apparatus and scheduling method |
CN105700941A (en) * | 2015-12-18 | 2016-06-22 | 西安工业大学 | Three-dimensional scheduler model and scheduling algorithm thereof |
Non-Patent Citations (1)
Title |
---|
"不使用实时操作系统实现任务定时切换";袁建州 等;《汽车电器》;20131231(第12期);36-41 * |
Also Published As
Publication number | Publication date |
---|---|
WO2018077032A1 (en) | 2018-05-03 |
CN107976918A (en) | 2018-05-01 |
TW201816598A (en) | 2018-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107976918B (en) | Task switching method and related device | |
CN110476402B (en) | Method, device and communication system for creating network slice | |
CN109116847A (en) | Path dispatching method, device, background server and storage medium | |
CN111274033B (en) | Resource deployment method, device, server and storage medium | |
CN105589748A (en) | Service request processing method and apparatus | |
CN106790131B (en) | Parameter modification method and device and distributed platform | |
KR102036731B1 (en) | System and method for cluster placement of virtualization network functions | |
CN111831191A (en) | Workflow configuration method and device, computer equipment and storage medium | |
CN104346219B (en) | A kind of method and apparatus of system call | |
CN109040178A (en) | Configuration information transmitting method and device | |
CN105100002B (en) | The operating method and device of attribute | |
CN111123870B (en) | System control method and device and electronic equipment | |
KR101655727B1 (en) | Programmable controller and control method for programmable controller | |
KR101513393B1 (en) | Program creation device and programmable logic controller | |
CN107025126B (en) | Resource scheduling method, NFVO and system | |
CN110958139B (en) | Network control method, orchestrator, controller, and computer-readable storage medium | |
CN113268331A (en) | Robot calling method, robot calling device, management system and storage medium | |
CN112429607A (en) | Elevator control system, method, apparatus, computer device and storage medium | |
JP6303486B2 (en) | Information processing system, monitoring method, and program | |
CN110865838A (en) | Robot upgrading method and device, electronic equipment and computer readable storage medium | |
CN109766252A (en) | Prompting frame element processing method, device, computer equipment and storage medium | |
CN103914339A (en) | Server management system and server management method | |
CN113032128B (en) | Multi-task control method and device, electronic equipment and storage medium | |
CN109831340B (en) | Server interaction method, device, server, client and readable storage medium | |
CN111526168B (en) | Scheduling management method and device for Network Function Virtualization (NFV) architecture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1254567 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |