Method, device, equipment and medium for managing state of robot equipment
By establishing a synchronization queue in the persistent repository of the robot device and recording and transmitting task status in real time, the problem of difficulty in recovering the robot device in abnormal state is solved, and reliable storage and recovery of task status is achieved to ensure the normal operation of the equipment.
Patent Information
- Application Number
- CN202410175765.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2025-08-08
AI Technical Summary
When the robot device is in an abnormal state (such as crash and restart or network abnormality), it is difficult to restore to the previous state in time, resulting in failure of subsequent tasks.
By establishing a synchronization queue in the persistent repository of the robot device, recording task status in real time and transmitting data to the server device in chronological order, ensuring reliable storage and recovery of status data.
Even in exceptional circumstances, the robot device can restore task status from the synchronous queue to ensure normal operation and continuous execution of tasks.
Smart Images

Figure CN120439271A_ABST
Abstract
Description
Technical Field
[0001] Example implementations of the present disclosure relate generally to robot management, and more particularly to methods, apparatuses, devices, and computer-readable storage media for managing the state of a robotic device. Background Art
[0002] Robotics technology has been widely adopted in a variety of application scenarios, enabling robotic devices to perform diverse tasks. Generally speaking, robotic devices may operate in complex environments and frequently encounter various abnormalities. For example, robotic devices may crash and restart, or encounter network anomalies. In these cases, it is desirable to ensure that the robotic device can be restored to its pre-announcement state during the post-announcement recovery phase, thereby ensuring continued normal operation. Summary of the Invention
[0003] In a first aspect of the present disclosure, a method for managing the state of a robotic device is provided. In the method, a set of task states for a set of tasks in a task queue executed by the robotic device is obtained. For a target task in the set of tasks, in response to determining that a target task state of the target task has changed, the set of task states is added to a data node in a synchronization queue, the synchronization queue including at least one data node, the at least one data node being used to store data to be synchronized to a server device for controlling the robotic device. The data in the at least one data node is transmitted to the server device in the order of the at least one data node in the synchronization queue.
[0004] In a second aspect of the present disclosure, an apparatus for managing the status of a robotic device is provided. The apparatus includes: an acquisition module configured to acquire a set of task states for a set of tasks in a task queue executed by the robotic device; an addition module configured to, for a target task in the set of tasks, add the set of task states to a data node in a synchronization queue in response to determining that a target task state of the target task has changed, the synchronization queue including at least one data node, the at least one data node being configured to store data to be synchronized to a server device for controlling the robotic device; and a transmission module configured to transmit the data in the at least one data node to the server device in the order of the at least one data node in the synchronization queue.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.
[0007] It should be understood that the content described in this summary section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0009] Figure 1 A block diagram illustrating an application environment according to an exemplary implementation of the present disclosure is shown;
[0010] Figure 2 shows a block diagram for managing the state of a robotic device according to some implementations of the present disclosure;
[0011] Figure 3 A block diagram illustrating a page for presentation at a robotic device according to some implementations of the present disclosure is shown;
[0012] Figure 4 A block diagram illustrating state encoding according to some implementations of the present disclosure is shown;
[0013] Figure 5 A block diagram illustrating a process for synchronizing data to a server device according to some implementations of the present disclosure is shown;
[0014] Figure 6 A block diagram for recovering a robotic device according to some implementations of the present disclosure is shown;
[0015] Figure 7 A flowchart illustrating a method for managing the state of a robotic device according to some implementations of the present disclosure is shown;
[0016] Figure 8 A block diagram illustrating an apparatus for managing the state of a robotic device according to some implementations of the present disclosure; and
[0017] Figure 9 A block diagram is shown of a device capable of implementing various implementations of the present disclosure. DETAILED DESCRIPTION
[0018] The following describes implementations of the present disclosure in more detail with reference to the accompanying drawings. Although certain implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the implementations described herein. Rather, these implementations are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and implementations of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0019] In the description of the implementation of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "an implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". The following may also include other explicit and implicit definitions. As used herein, the term "model" can represent the association relationship between various data. For example, the above-mentioned association relationship can be obtained based on a variety of technical solutions currently known and / or to be developed in the future.
[0020] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0021] It is understandable that before using the technical solutions disclosed in each implementation of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0022] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0023] As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0024] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0025] As used herein, the term "in response to" refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of executing a subsequent action executed in response to the event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is satisfied. For example, in some cases, a subsequent action may be executed immediately upon the occurrence of the event or the satisfaction of the condition; in other cases, the subsequent action may be executed some time after the occurrence of the event or the satisfaction of the condition.
[0026] Sample Environment
[0027] Robotics has been widely used in a variety of application scenarios, and robotic devices can be used to perform different tasks. Figure 1 Describes an application environment according to an example implementation of the present disclosure. Figure 1 A block diagram 100 of an application environment according to an exemplary implementation of the present disclosure is shown. For ease of description, in the following, more details of managing robot devices will be described by taking a transport robot for delivering goods as an example.
[0028] like Figure 1 As shown, a control device 120 may be deployed at the robotic device 110. Here, the robotic device 110 may be, for example, a transport robot for delivering goods. The control device 120, such as a tablet computer, may be deployed at the robotic device 110 to control the operation of the robotic device 110. The robotic device 110 may be connected to and communicate with a server device 130 via a network 140. The robotic device 110 may send data related to various tasks performed by the robotic device 110 to the server device 130 in real time.
[0029] Server device 130 can receive data related to various tasks and remotely control the operation of robotic device 110. For example, the robotic device can perform a package delivery service, where information such as the package's origin, destination, recipient, and recipient's contact information can be input to control device 120. Alternatively and / or additionally, the operation of the robotic device can be controlled via a server device.
[0030] Robotic devices may operate in complex environments and may often encounter various abnormal conditions. For example, a robot device may crash and restart or encounter network anomalies. Generally speaking, the control application of the robot device is implemented in a web view application. In this case, various status data of the robot device is stored in the memory device of the robot device. Various anomalies may cause data loss in the memory device, which will result in the robot device being unaware of subsequent operations to be performed after the anomaly. In this case, it is desirable to record the status data of the robot device in real time and transmit the status data to the server device in a timely manner to ensure the normal operation of the robot device.
[0031] Overview of Managing Robotic Devices
[0032] In order to at least partially address the deficiencies in the prior art, according to an exemplary implementation of the present disclosure, a method for managing the status of a robot device is proposed. Figure 2 Describes more details of an example implementation according to the present disclosure, Figure 2 A block diagram 200 is shown for managing the state of a robotic device according to some implementations of the present disclosure. Figure 2 As shown, the status data of the robot device 110 may be synchronized from the robot device 110 to the server device 130 .
[0033] Specifically, a set of task states for a set of tasks in task queue 210 executed by the robotic device may be obtained. Task queue 210 may include one or more tasks. For example, received tasks may be stored in chronological order. For example, task 212 may be the task currently being executed (also referred to as the target task for ease of description), and tasks subsequent to task 212 may be subsequent tasks awaiting execution. Each task may have a corresponding task state. For example, the state of task 212 may be represented as task state 214, and so on.
[0034] During the execution of task 212 by the robot device 110, the task state 214 may change over time. Before task 212 is completed, subsequent tasks will not be executed, but the tasks in the task queue 210 need to be executed in sequence, and only the target task is executed at the same time. For a target task in a group of tasks, if it is determined that the target task state of the target task has changed, a group of task states may be added to the data node in the synchronization queue 220. Here, the synchronization queue 220 may include at least one data node, and the at least one data node is used to store data to be synchronized to the server device 130 for controlling the robot device. Figure 2As shown, a node 222 may be added to the synchronization queue 220 , and the task status of each task in the task queue 210 may be stored in the node 222 .
[0035] Furthermore, data in at least one data node can be transmitted to server device 130 in the order of at least one data node in synchronization queue 220. By using synchronization queue 220, the task status of each task can be stored in a more reliable manner. The synchronization queue can be continuously checked to see if it contains data. If it is detected that no data has been transmitted, the data can be sent to server device 130.
[0036] It should be understood that the server device 130 needs to know the task status of each task at the robot device 110 in real time. However, due to various abnormalities of the robot device 110 (e.g., restart abnormalities and / or network abnormalities, etc.), the robot device 110 cannot notify the server device 130 in a timely manner, which leads to potential risks for the robot device 110.
[0037] Using the exemplary implementations of the present disclosure, even if robot device 110 faces a reboot and / or network anomalies, it is ensured that robot device 110 can promptly retrieve the task status of each task from the synchronization queue and send this data to server device 130 to ensure the normal operation of the robot device. Compared to existing technical solutions that store status data only in memory devices, the synchronization queue can be stored in the robot device's persistent storage, thereby storing status data in a more reliable manner.
[0038] Detailed process for managing robotic devices
[0039] Having described an overview of an example implementation of the present disclosure, further details regarding robotic device management will be described below. According to an example implementation of the present disclosure, a robotic device may be a movable device used to deliver items, and the movable device may move within a predetermined geographic area. Specifically, the predetermined geographic area may be a company's work area, and a robotic device may be used to deliver an employee's package to their seat.
[0040] See also Figure 3 Describe an example of a task performed by a robotic device, the Figure 3 A block diagram 300 of a page for presentation at a robotic device is shown according to some implementations of the present disclosure. Figure 3 As shown, a page 310 may be presented at the control device to specify a task to be performed by the robotic device. For example, an administrator at the front desk may place packages for multiple employees in multiple storage boxes of the robotic device and instruct the robotic device to deliver the packages to the employees' seats.
[0041] On page 310, the administrator can enter relevant information for the package delivery task: the recipient's name, seat, contact information, and the location of the storage box where the package will be stored. The administrator can confirm the information by pressing control 312 or cancel the input by pressing control 314. The robot device can then automatically deliver the package according to the specified task. For example, it can send a pickup code and scheduled arrival time to the recipient's phone number and then proceed to the designated seat "SEAT002" to deliver the package.
[0042] When the robotic device arrives, page 420 may be presented at the control device, at which point the recipient may enter the received pickup code at control 322 and click control 330 to open the storage box "BOX01" and take the package away. Alternatively and / or additionally, the recipient may press control 332 to cancel the input, and so on. It should be understood that different pages may be presented when the robotic device performs different types of tasks. For example, when performing a transport-type task, controls for specifying the origin, destination, and cargo name, and so on, may be presented on the page. Using the example implementation of the present disclosure, the tasks to be performed by the robotic device may be input in a visual manner via the control device. Alternatively and / or additionally, the robotic device may receive tasks from a server device.
[0043] According to an exemplary implementation of the present disclosure, a robotic device may receive one or more tasks via a control device and / or a server device, and a task queue 210 may store the one or more tasks. The task queue 210 may be managed in chronological order. For example, the task at the head of the task queue 210 may represent the target task currently being executed. The robotic device may execute the target task, and the task status of the target task may change over time.
[0044] See also Figure 4 Describes the task status in more detail. Figure 4 A block diagram 400 illustrating state encoding according to some implementations of the present disclosure is shown. Figure 4 As shown, the status code 410 can be used to represent the task status. In the context of package delivery, code "001" can, for example, indicate that the task has not yet started; code "002" can, for example, indicate that the task has started and the package is being delivered; code "003" can indicate that the robot device has arrived at the recipient's seat and is waiting for the recipient to pick up the package; code "004" can indicate that the package has been successfully picked up and the task has been successfully completed; and code "005" can indicate that the task has not been completed due to a failure to pick up the package, etc. It should be understood that Figure 4 The status codes shown in are merely exemplary, and different status codes may be provided.
[0045] According to an example implementation of the present disclosure, the status of each task can be stored in a list. Figure 2 The task queue 210 shown, the task status of each task in the task queue 210 can be expressed as [003, 001, ..., 001]. Assume that the task queue 210 includes N tasks, at this time, only the current task has started to execute (coded as 003), and the subsequent N-1 tasks have not yet started to execute (coded as 001). The task status of each task can be stored in node 222: [003, 001, ..., 001]. Alternatively and / or additionally, the identifier of each task (for example, task01, task02, ..., taskN) can be further stored, and the corresponding task status is followed by the identifier. At this time, the task status of each task can be expressed as [<task01,003> ,<task02,001> ,…,<taskN,001> ].
[0046] According to an example implementation of the present disclosure, the process described above can be implemented in a web view application on a robot device, and the synchronization queue is stored in a persistent repository on the robot device. Specifically, during the operation of the web view application, a synchronization queue can be established in the persistent repository, and data from the memory device on the robot device can be copied to the data node of the synchronization queue. In this way, even if the robot device loses data in the memory device due to power failure or fault restart, the various task states can be restored from the persistent repository.
[0047] In addition, in the case of network anomalies, even if data transmission to the server device fails, there is no need for a complex failure handling mechanism to manage the unsent data. In this case, the data in the nodes in the synchronization list can be continuously sent to the server device until a confirmation message is received from the server device.
[0048] According to an exemplary implementation of the present disclosure, data in each node can be synchronized to the server device in chronological order. Figure 5 Describe in more detail the Figure 5 A block diagram 500 is shown of a process for synchronizing data to a server device according to some implementations of the present disclosure. Figure 5 As shown, the synchronization queue 220 may include multiple nodes 510, 512, ..., 514 arranged in time sequence. Time 520 represents the order in which the nodes are added to the synchronization queue, that is, the addition time of the node 510 at the head of the queue is earlier than the addition time of the node 514 at the tail of the queue.
[0049] The nodes in the synchronization queue can be processed in the order of addition time. For example, the data in the node 510 at the head of the queue can be sent to the server device 130 first. Since the robot device may be abnormal, multiple transmissions can be performed to the server device 130 until the transmission is successful. According to an example implementation of the present disclosure, the data in the head node can be transmitted to the server device at a predetermined frequency. Alternatively and / or additionally, when it is detected that the robot device has recovered from an abnormal state, the data in the head node can be transmitted to the server device. In this way, it can be ensured that the server device 130 can receive the task data of each task in a timely manner, thereby ensuring the normal operation of the robot device.
[0050] Here, the abnormal state may include at least one of a restart state and a network abnormal state. During operation of the robot device, after the robot device successfully restarts, it may be possible to detect whether the synchronization queue contains data, and if so, initiate a transmission process. Alternatively and / or additionally, if the robot device is in an abnormal network state (e.g., a weak network), a transmission failure may occur, and the transmission process may be continuously executed until the transmission is successful.
[0051] According to an exemplary implementation of the present disclosure, if the server device successfully receives data from a node, the server device may send a response message to the robot device to indicate that the server device has received the data from the target data node. At this point, if the robot device receives a response message from the server device for the target data node in at least one data node, the target data node may be removed from the synchronization queue.
[0052] like Figure 5 As shown, after confirming that the server device 130 has received the data in the node 510, the node 510 can be removed from the synchronization queue 220. At this time, the next node 512 after the node 510 will be at the head of the queue, and the data in the node 512 can be sent to the server device 130.
[0053] By using an example implementation of the present disclosure, it is possible to ensure that each node in the synchronization queue 220 is processed one by one in chronological order, and to ensure that the server device 130 can receive the data in each node. According to an example implementation of the present disclosure, a new node can be added to the end of the synchronization queue 220 (for example, after node 514) in chronological order to ensure that the synchronization queue complies with the chronological order.
[0054] According to an example implementation of the present disclosure, during the operation of a robotic device, the robot state of the robotic device while executing a target task can be further obtained. Furthermore, the target task and robot state can be stored in a persistent storage repository of the robotic device. Using this example implementation, even if the robotic device is restarted and various data in the memory device is lost, the lost data is still saved in the persistent storage repository, and the state of the robotic device can be restored using the persistent storage repository.
[0055] See also Figure 6 Describe in more detail the Figure 6 A block diagram 600 is shown for recovering a robotic device according to some implementations of the present disclosure. Figure 6 As shown, assuming that the robotic device 110 is performing a package delivery task (eg, task 01 ), the robotic device 110 may go from an origin 620 to a destination 630 along a predetermined path as shown by an arrow.
[0056] During the movement of the robotic device 110, when the robotic device 110 is located at the origin 620 and has not yet started delivery, the corresponding task state can be represented as<task01,001> When the robot device 110 is located at position 640, the corresponding task state can be expressed as<task01,002> The task status of task task01 can be continuously determined, and when a task status change is found, the task status of task task01 and subsequent tasks in the task list are added to the node at the end of the queue in the synchronization queue.
[0057] According to an example implementation of the present disclosure, the robot state may be obtained, where the robot state may include, for example, the position and / or orientation of the robot device, or other configuration parameters. The robot state may be stored in a persistent storage in real time. For example, if the robot device 110 moves to position 640, the robot state may be stored in a persistent storage.<pos,rot> (pos represents the position 640 of the robot, and rot represents the orientation.) Alternatively and / or additionally, relevant information about the current task task01 may be stored in the persistent storage, such as the task's identifier, origin, destination, recipient, recipient's phone number, the location of the storage box "BOX01" where the package being delivered is located, and so on.
[0058] Assume that the robot device is restarted, the robot status is<pos,rot> The relevant information of the current delivery task will not be lost, but will be saved to the persistent storage. Furthermore, if it is detected that the robot device recovers from the restart state, the target task and the robot state can be read from the persistent storage. Then, based on the read target task and robot state, the robot device can continue to execute the target task. Specifically, the robot state can be<pos,rot> The relevant information of the current delivery task is reloaded into the memory device to determine the subsequent operation. Using the exemplary implementation of the present disclosure, the operating state of the robot device can be restored to the state before the restart.
[0059] According to an example implementation of the present disclosure, the robot device may continue to perform the target task. Specifically, the unfinished portion of the target task may be determined based on the target task and the robot state. Figure 6 As shown, based on the position and orientation of the robotic device, it can be determined that the robotic device 110 should follow path 650 to destination 630 and wait for the recipient to retrieve the package. Furthermore, the robotic device can execute any unfinished tasks. Using the exemplary implementations of the present disclosure, the state of the robotic device can be restored to its pre-restart state, thereby ensuring normal operation of the robotic device.
[0060] It should be understood that although the process of managing robotic devices is described above using the delivery mode and the transport mode as examples, alternatively and / or additionally, in other application scenarios, the robotic devices may perform different tasks. For example, the robotic devices may perform a guidance task to guide tourists to a designated destination, etc.
[0061] Using the example implementations of this disclosure, during the recovery phase after a robot device exception occurs, the robot device can promptly retrieve the task status of each task from the synchronization queue and restore it to its pre-abnormal state. In this way, the robot device can continue to send status data to the server device, ensuring that the server device can maintain the normal operation of the robot device based on the received status data.
[0062] Example Process
[0063] Figure 7A flow chart of a method 700 for managing the state of a robotic device according to some implementations of the present disclosure is shown. At block 710, a set of task states for a set of tasks in a task queue executed by the robotic device is obtained. At block 720, for a target task in the set of tasks, in response to determining that a target task state of the target task has changed, the set of task states is added to a data node in a synchronization queue, the synchronization queue including at least one data node, the at least one data node being configured to store data to be synchronized to a server device for controlling the robotic device. At block 730, data in the at least one data node is transmitted to the server device in an order of the at least one data node in the synchronization queue.
[0064] According to an example implementation of the present disclosure, the method further includes: for a target data node among at least one data node, in response to receiving a reply message from a server device, removing the target data node from the synchronization queue, the reply message indicating that the server device has received the data in the target data node.
[0065] According to an example implementation of the present disclosure, the method of transmitting data from at least one data node to a server device includes transmitting data based on at least any one of: a predetermined frequency; and in response to detecting that the robot device recovers from an abnormal state, the abnormal state including at least any one of a restart state and a network abnormal state.
[0066] According to an example implementation of the present disclosure, the method further includes: obtaining a robot state of the robot device when executing a target task; and storing the target task and the robot state in a persistent storage repository of the robot device.
[0067] According to an example implementation of the present disclosure, the method further includes: in response to detecting that the robot device recovers from a restart state, reading the target task and the robot state from a persistent repository; and based on the read target task and robot state, the robot device continues to execute the target task.
[0068] According to an example implementation of the present disclosure, continuing to execute the target task by the robotic device includes: determining an unfinished portion of the target task based on the target task and a robot state; and executing the unfinished portion by the robotic device.
[0069] According to an exemplary implementation of the present disclosure, the robot state includes at least any one of the following items of the robot device: position and orientation.
[0070] According to one example implementation of the present disclosure, the robotic device is a movable device for delivering items, and the movable device moves within a predetermined geographical area.
[0071] According to an example implementation of the present disclosure, the method is implemented in a web view application at a robot device, and the synchronization queue is stored in a persistent storage repository of the robot device.
[0072] Example devices and equipment
[0073] Figure 8 A block diagram of an apparatus 800 for managing the state of a robotic device according to some implementations of the present disclosure is shown. The apparatus 800 includes: an acquisition module 810 configured to acquire a set of task states for a set of tasks in a task queue executed by the robotic device; an adding module 820 configured to, in response to determining that a target task state of the target task has changed, add the set of task states to a data node in a synchronization queue, the synchronization queue including at least one data node for storing data to be synchronized to a server device for controlling the robotic device; and a transmission module 830 configured to transmit the data in the at least one data node to the server device in the order of the at least one data node in the synchronization queue.
[0074] According to an example implementation of the present disclosure, the apparatus further includes: a removal module configured to remove a target data node from a synchronization queue in response to receiving a response message from a server device, with the response message indicating that the server device has received the data in the target data node.
[0075] According to an example implementation of the present disclosure, the transmission module is further configured to transmit data based on at least any one of: a predetermined frequency; and in response to detecting that the robot device recovers from an abnormal state, the abnormal state including at least any one of a restart state and a network abnormal state.
[0076] According to an example implementation of the present disclosure, the apparatus further includes: a state acquisition module configured to acquire the robot state of the robot device when performing a target task; and a storage module configured to store the target task and the robot state in a persistent storage repository of the robot device.
[0077] According to an example implementation of the present disclosure, the apparatus further includes: a reading module configured to read the target task and the robot state from a persistent repository in response to detecting that the robot device has recovered from a restart state; and an execution module configured to continue executing the target task by the robot device based on the read target task and the robot state.
[0078] According to an example implementation of the present disclosure, the execution module includes: a task determination module configured to determine an unfinished part of a target task based on the target task and the robot state; and a calling module configured to execute the unfinished part by the robot device.
[0079] According to an exemplary implementation of the present disclosure, the robot state includes at least any one of the following items of the robot device: position and orientation.
[0080] According to one example implementation of the present disclosure, the robotic device is a movable device for delivering items, and the movable device moves within a predetermined geographical area.
[0081] According to an exemplary implementation of the present disclosure, the apparatus is implemented in a web view application at a robot device, and the synchronization queue is stored in a persistent storage repository of the robot device.
[0082] Figure 9 9 is a block diagram of a device 900 capable of implementing various implementations of the present disclosure. Figure 9 The illustrated computing device 900 is merely exemplary and should not be construed as limiting the functionality and scope of the implementations described herein. Figure 9 The illustrated computing device 900 may be used to implement the methods described above.
[0083] like Figure 9 As shown, computing device 900 is in the form of a general-purpose computing device. Components of computing device 900 may include, but are not limited to, one or more processors or processing units 910, memory 920, storage devices 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960. Processing unit 910 may be a real or virtual processor and is capable of performing various processes according to a program stored in memory 920. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of computing device 900.
[0084] The computing device 900 typically includes a plurality of computer storage media. Such media can be any available media accessible to the computing device 900, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 920 can be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 930 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data (e.g., training data for training) and can be accessed within the computing device 900.
[0085] The computing device 900 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 9 As shown in FIG, a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. Memory 920 may include a computer program product 925 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.
[0086] The communication unit 940 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 900 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the computing device 900 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or other network nodes.
[0087] Input device 950 may be one or more input devices, such as a mouse, keyboard, or trackball. Output device 960 may be one or more output devices, such as a display, a speaker, or a printer. Computing device 900 may also communicate with one or more external devices (not shown) via communication unit 940, as needed, such as storage devices, display devices, or the like, with one or more devices that allow a user to interact with computing device 900, or with any device that allows computing device 900 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0088] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0089] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0090] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0091] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0092] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0093] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for managing the state of a robotic device, comprising: obtaining a set of task states for a set of tasks in a task queue executed by the robotic device; For a target task in the set of tasks, in response to determining that a target task state of the target task has changed, adding the set of task states to a data node in a synchronization queue, the synchronization queue comprising at least one data node, the at least one data node being used to store data to be synchronized to a server device for controlling the robotic device; as well as The data in the at least one data node is transmitted to the server device according to the order of the at least one data node in the synchronization queue.
2. The method according to claim 1, further comprising: For a target data node among the at least one data node, in response to receiving a response message from the server device, the target data node is removed from the synchronization queue, the response message indicating that the server device has received the data in the target data node.
3. The method according to claim 1 , wherein transmitting the data in the at least one data node to the server device comprises transmitting the data based on at least any one of the following: Predetermined frequency; and In response to detecting that the robot device is recovered from an abnormal state, the abnormal state includes at least any one of a restart state and a network abnormal state.
4. The method according to claim 1, further comprising: Obtaining a robot state of the robot device when performing the target task; as well as The target task and the robot state are stored in a persistent storage repository of the robot device.
5. The method according to claim 4, further comprising: In response to detecting that the robot device recovers from a restart state, reading the target task and the robot state from the persistent storage; as well as Based on the read target task and the robot state, the robot device continues to execute the target task.
6. The method of claim 5, wherein continuing to perform the target task by the robotic device comprises: Determining an unfinished portion of the target task based on the target task and the robot state; as well as The unfinished portion is executed by the robotic device. The method according to claim 4 , wherein the robot state comprises at least any one of the following of the robot device: position and orientation.
8. The method of claim 1, wherein the robotic device is a movable device for delivering items, and the movable device moves within a predetermined geographic area.
9. The method of claim 1, wherein the method is implemented in a web view application at the robot device, and the synchronization queue is stored in a persistent storage repository of the robot device.
10. An apparatus for managing the state of a robotic device, comprising: an acquisition module configured to acquire a set of task states of a set of tasks in a task queue executed by the robotic device; an adding module configured to, for a target task in the set of tasks, add the set of task states to a data node in a synchronization queue in response to determining that a target task state of the target task has changed, the synchronization queue comprising at least one data node, the at least one data node being used to store data to be synchronized to a server device for controlling the robotic device; as well as The transmission module is configured to transmit the data in the at least one data node to the server device according to the order of the at least one data node in the synchronization queue.
11. An electronic device comprising: at least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit. 12 . A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to claim 1 .