Firmware Update Method, Device, Electronic Device, and Computer-Readable Medium
By determining the robotic arm assembly in the robotic arm system, assigning a virtual controller and performing hot switching, automatic update of the robotic arm firmware is achieved, solving the problems of low update efficiency and suspending the robotic arm in the prior art, improving the update efficiency and ensuring control continuity.
Patent Information
- Application Number
- CN202510525142.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-25
AI Technical Summary
In the prior art, the firmware update efficiency of robotic arm is low, and the robotic arm needs to be suspended during the update process, which affects normal operation.
Automatic update of the robotic arm firmware is achieved by determining the robotic arm set, assigning a virtual controller, and using hot switching technology. The method includes determining the set of robotic arms, assigning a virtual controller, hot-switching the controller, updating firmware, collecting control information and judging stability, and finally switching the robotic arms from the virtual controller back to the main controller.
It realizes automatic update of the robotic arm firmware while ensuring the normal operation of the robotic arm, which improves the update efficiency, reduces hardware costs, and ensures the continuity of robotic arm control.
Smart Images

Figure CN120066549B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a firmware update method, apparatus, electronic device, and computer-readable medium. Background Art
[0002] With the application of many advanced disciplinary technologies, traditional industrial equipment has achieved a breakthrough innovation. Among them, the robotic arm, as one of the representative industrial applications, has greatly improved work efficiency and accuracy. To ensure that the robotic arm meets the actual work requirements, it is often necessary to update the robotic arm firmware related to the robotic arm in a timely manner. Currently, when updating the firmware of the robotic arm, the commonly adopted method is to update the firmware of the controller corresponding to the robotic arm one by one manually.
[0003] However, when the above method is adopted, the following technical problems often exist:
[0004] The method of updating the firmware of the controller corresponding to the robotic arm one by one manually has low update efficiency. In addition, the robotic arm is often in a suspended working state during the update process, which also affects the normal operation of the robotic arm.
[0005] The above information disclosed in this background art section is only used to enhance the understanding of the background of the inventive concept of the present invention. Therefore, it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] This content part of the present disclosure is used to introduce the concepts in a brief form, and these concepts will be described in detail in the following detailed implementation part. This content part of the present disclosure is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure propose a firmware update method, apparatus, electronic device, and computer-readable medium to solve the technical problems mentioned in the above background art section.
[0008] In a first aspect, some embodiments of the present disclosure provide a firmware update method, which includes: determining a set of robotic arms, where each robotic arm in the set of robotic arms is located on the same assembly production line and has the same corresponding robotic arm attribute information, and each robotic arm in the set of robotic arms corresponds to a main controller, and the robotic arm attribute information includes: robotic arm type and current firmware version; in response to successfully allocating a virtual controller to the set of robotic arms, determining update path information according to the robotic arm task information corresponding to the robotic arms in the set of robotic arms, where the current firmware version corresponding to the virtual controller is the same as the current firmware version corresponding to the robotic arms in the set of robotic arms, and the robotic arm task information includes: task status and task description information; hot-switching the target robotic arm from being controlled by the corresponding main controller to being controlled by the virtual controller, where the target robotic arm is the currently to-be-updated robotic arm represented by the update path information; in response to the completion of the switching, updating the robotic arm firmware of the target robotic arm to the target firmware version, where the target firmware version is greater than or equal to the current firmware version; in response to the completion of the update, collecting a control information group, where the control information group includes: first control information and second control information, the first control information represents the control instructions and corresponding control results when the virtual controller controls the target robotic arm, and the second control information represents the control instructions and control results simulated by the main controller corresponding to the target robotic arm; in response to the control information group meeting a preset condition, hot-switching the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller.
[0009] Second aspect, some embodiments of the present disclosure provide a firmware update device, which includes: a first determination unit configured to determine a set of robotic arms, where each robotic arm in the set of robotic arms is located on the same assembly production line and has the same corresponding robotic arm attribute information, and each robotic arm in the set of robotic arms corresponds to a main controller, and the robotic arm attribute information includes: robotic arm type and current firmware version; a second determination unit configured to, in response to successfully allocating a virtual controller to the set of robotic arms, determine update path information according to the robotic arm task information corresponding to the robotic arms in the set of robotic arms, where the current firmware version corresponding to the virtual controller is the same as the current firmware version corresponding to the robotic arms in the set of robotic arms, and the robotic arm task information includes: task status and task description information; a first hot-swap unit configured to hot-swap a target robotic arm from being controlled by the corresponding main controller to being controlled by the virtual controller, where the target robotic arm is the currently to-be-updated robotic arm characterized by the update path information; an update unit configured to, in response to the completion of the swap, update the robotic arm firmware of the target robotic arm to the target firmware version, where the target firmware version is greater than or equal to the current firmware version; a collection unit configured to, in response to the completion of the update, collect a control information group, where the control information group includes: first control information and second control information, the first control information represents the control instructions and corresponding control results when the virtual controller controls the target robotic arm, and the second control information represents the control instructions and control results simulated by the main controller corresponding to the target robotic arm; a second hot-swap unit configured to, in response to the control information group meeting a preset condition, hot-swap the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller.
[0010] Third aspect, some embodiments of the present disclosure provide an electronic device, including: one or more processors; a storage device having stored thereon one or more programs, which when executed by the one or more processors cause the one or more processors to implement the method described in any implementation manner of the first aspect above.
[0011] Fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program, where the program, when executed by a processor, implements the method described in any implementation manner of the first aspect above.
[0012] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the firmware update method of some embodiments of the present disclosure, the automatic update of the robotic arm firmware corresponding to the robotic arm is realized on the premise of ensuring the normal operation of the robotic arm, greatly improving the update efficiency. Specifically, the present disclosure first determines a set of robotic arms, where each robotic arm in the set of robotic arms is located on the same assembly line and has the same corresponding robotic arm attribute information. Each robotic arm in the set of robotic arms corresponds to a main controller, and the robotic arm attribute information includes: robotic arm type and current firmware version. By updating a batch of robotic arms with the same robotic arm type and the same current firmware version on the same assembly line, the update efficiency is ensured. Secondly, in response to the successful allocation of a virtual controller to the above-mentioned set of robotic arms, according to the robotic arm task information corresponding to the robotic arms in the set of robotic arms, update path information is determined, where the current firmware version corresponding to the virtual controller is consistent with the current firmware version corresponding to the robotic arms in the set of robotic arms, and the robotic arm task information includes: task status and task description information. In practice, the task statuses of different robotic arms are different. Therefore, it is necessary to combine the robotic arm task information corresponding to the robotic arm and the actual task situation of the robotic arm to generate corresponding update path information. Then, the target robotic arm is hot-switched from the control of the corresponding main controller to the control of the virtual controller, where the target robotic arm is the currently to-be-updated robotic arm characterized by the above-mentioned update path information. In practice, currently, the robotic arm is usually controlled in the master-slave (backup) controller or single (master) controller mode. For the former, it is necessary to redundantly set the slave (backup) controller, and the hardware cost is relatively high. At the same time, during the controller switching process, there is still a certain control interruption situation. Therefore, it often cannot meet the robotic arm control scenario with millisecond-level time granularity. For the latter, when updating the main controller, the robotic arm needs to stop working. Therefore, the present disclosure uses a virtual controller and, at the same time, through the hot-switching method, can reduce the hardware cost and ensure the continuity of robotic arm control. Further, in response to the completion of the switching, the robotic arm firmware of the target firmware version is updated for the above-mentioned target robotic arm, where the target firmware version is greater than or equal to the current firmware version. At this time, the target robotic arm is temporarily taken over by the virtual controller, so the robotic arm firmware of the corresponding main controller of the target robotic arm can be updated. In addition, in response to the completion of the update, a control information group is collected, where the control information group includes: first control information and second control information. The first control information represents the control instructions and corresponding control results when the virtual controller controls the target robotic arm, and the second control information represents the control instructions and control results simulated by the main controller corresponding to the target robotic arm. Finally, in response to the control information group meeting the preset conditions, the target robotic arm is hot-switched from the control of the virtual controller to the control of the corresponding main controller. In practice, the robotic arm firmware of the target version is often tested for its corresponding firmware stability in a simulation scenario or with a limited number of robotic arms.When directly updating the robotic arm in the working environment, there is a certain probability of firmware anomalies. Therefore, in the present disclosure, by collecting a control information group, that is, collecting the control instructions and control results of the virtual controller and the main controller for the same sensor signal, the firmware stability of the robotic arm with the target firmware version when updated to the robotic arm in the working environment is judged. Under the condition of meeting the preset conditions, the target robotic arm is then hot-switched from being controlled by the virtual controller to being controlled by the corresponding main controller. By this means, the update efficiency of the robotic arm firmware is improved. Description of the Drawings
[0013] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flowchart of some embodiments of the firmware update method according to the present disclosure;
[0015] Figure 2 is a schematic diagram of the positions of the robotic arms on an assembly production line;
[0016] Figure 3 is a schematic diagram of the determination process of the candidate robotic arm set;
[0017] Figure 4 is a schematic diagram of the process of the node to be updated corresponding to the robotic arm enqueueing into the initial double-ended queue;
[0018] Figure 5 is a schematic diagram of the hot-switching process between the main controller and the virtual controller corresponding to the target robotic arm;
[0019] Figure 6 is a schematic diagram of the structure of some embodiments of the firmware update device according to the present disclosure;
[0020] Figure 7 is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Embodiments
[0021] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0022] In addition, it should be noted that for the convenience of description, only the parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.
[0023] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules or units.
[0024] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes, and are not used to limit the scope of these messages or information.
[0026] The present disclosure will be described in detail below with reference to the drawings and in combination with embodiments.
[0027] Reference Figure 1 , a flow 100 of some embodiments of a firmware update method according to the present disclosure is shown. The firmware update method includes the following steps:
[0028] Step 101, determine a robotic arm set.
[0029] In some embodiments, the execution subject of the firmware update method (for example, a computing device) may determine a robotic arm set. Among them, each robotic arm in the robotic arm set is located on the same assembly line, and the corresponding robotic arm attribute information is the same. Each robotic arm in the robotic arm set corresponds to a main controller. The robotic arm attribute information includes: robotic arm type and current firmware version. In practice, the robotic arm type characterizes the type of the robotic arm. For example, the robotic arm type may include, but is not limited to: spraying robotic arm type, welding robotic arm type. The current firmware version characterizes the current version of the robotic arm firmware of the main controller corresponding to the robotic arm. The robotic arm firmware characterizes the control program for the robotic arm. In practice, there may be multiple assembly lines. If only the robotic arm types are the same as the condition for screening to obtain the robotic arm set and the firmware is updated accordingly, when the firmware update is abnormal, it may cause the shutdown of a large area and multiple assembly lines. At the same time, if only the assembly lines are the same as the condition for screening to obtain the robotic arm set and the firmware is updated accordingly, due to different robotic arm types and different current firmware versions, the complexity of the firmware update will increase. Therefore, the present disclosure screens out the robotic arm set with the robotic arm type, firmware type and assembly line as the constraint conditions, so as to improve the subsequent firmware update efficiency and reduce the adverse effects when the firmware update is abnormal.
[0030] For example, refer to Figure 2 the position schematic diagram of each robotic arm on an assembly line as shown, where Figure 2 the shown assembly line can be an assembly line for automobiles, where Figure 2 the shown assembly line can include: robotic arm A, robotic arm B, robotic arm C, robotic arm D, robotic arm E, robotic arm F, robotic arm G, robotic arm H. Among them, robotic arm A can correspond to main controller A, where main controller A can be used to control robotic arm A. Robotic arm B can correspond to main controller B, where main controller B can be used to control robotic arm B. Similarly, robotic arm C, robotic arm D, robotic arm E, robotic arm F, robotic arm G, and robotic arm H each correspond to a main controller for controlling the corresponding robotic arm, which will not be elaborated here. For example, the robotic arm attribute information corresponding to robotic arm A, robotic arm B, robotic arm C, and robotic arm D is the same (the current firmware version is the same, and the robotic arm type is the same), so they can form a robotic arm set.
[0031] It should be noted that the above computing device can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the above-listed hardware devices. It can be implemented as, for example, multiple software or software modules for providing distributed services, or as a single software or software module. Specific limitations are not made here.
[0032] In some optional implementation manners of some embodiments, the above execution subject determines the robotic arm set, which may include the following steps:
[0033] First step, in response to the robotic arm firmware of the target firmware version being at the head position of the firmware update queue, determine the candidate robotic arm set.
[0034] Among them, the candidate robotic arms in the above candidate robotic arm set satisfy the screening condition group. Among them, the above screening condition group includes: the first screening condition, the second screening condition, and the third screening condition. The first screening condition is: the working state of the candidate robotic arm is the online state. The second screening condition is: the robotic arm type corresponding to the candidate robotic arm is the same as the robotic arm type corresponding to the robotic arm firmware of the target firmware version. The third screening condition is: each candidate robotic arm in the candidate robotic arm set is located on the same assembly line. Among them, the firmware update queue can be a queue for storing robotic arm firmware for firmware update.
[0035] In practice, when determining whether a robotic arm needs firmware update, it is often necessary to communicate with the robotic arm to confirm the working status, the affiliated assembly line, and the robotic arm attribute information of the robotic arm. Therefore, the candidate robotic arms need to be in an online state. In addition, frequent communication confirmation will cause unnecessary consumption and occupation of network resources in the control network. Therefore, in the present disclosure, by setting a firmware update queue, when the robotic arm firmware moves to the head position of the firmware update queue, the determination of the set of robotic arms is triggered, thereby effectively reducing the consumption and occupation of network resources in the control network. Among them, multiple robotic arms can be controlled and data can be transmitted through a control network based on a local area network, for example.
[0036] As an example, refer to Figure 3 the schematic diagram of the determination process of the candidate robotic arm set shown in the figure. Among them, when the robotic arm firmware of the target firmware version is located at the head position of the firmware update queue, the execution entity will determine the working status of all robotic arms, the above-mentioned assembly line, and the robotic arm attribute information through the control network, and screen out the candidate robotic arm set from them in combination with the screening condition group.
[0037] The second step is to determine the firmware record list corresponding to the above-mentioned candidate robotic arm set.
[0038] Among them, the above-mentioned firmware record list includes: a firmware record set. The firmware records and the candidate robotic arms correspond one by one. The firmware record includes: the current firmware version and the record update time. The firmware records in the firmware record list are updated regularly by the candidate robotic arms. In practice, by setting the firmware record list to record the firmware records corresponding to the candidate robotic arms, unnecessary communication confirmation through the control network is avoided, and further reduction of the consumption and occupation of network resources in the control network is achieved.
[0039] The third step is to determine whether there is a target firmware record in the above-mentioned firmware record list.
[0040] Among them, the target firmware record is a firmware record whose time difference between the record update time included and the current time is greater than a preset time difference. In practice, the above-mentioned execution entity can judge whether there is a target firmware record by judging whether the time difference between the record update time included in the firmware record and the current time is greater than the preset time difference.
[0041] The fourth step is to, in response to the existence of a target firmware record, initiate a firmware version confirmation request to the candidate robotic arm corresponding to the above-mentioned target firmware record.
[0042] Among them, the firmware version confirmation request is an inquiry request used to determine the current firmware version corresponding to the candidate robotic arm. In practice, the above-mentioned execution entity can initiate a firmware version confirmation request to the candidate robotic arm corresponding to the above-mentioned target firmware record through the control network.
[0043] In practice, when the time difference is greater than the preset time difference, it can be considered that the candidate robotic arm has not actively updated the corresponding current firmware version for a long time. At this time, the corresponding firmware record can be considered to be in an untrusted state. Therefore, the executing entity needs to actively send a firmware version confirmation request to the candidate robotic arm corresponding to the target firmware record.
[0044] Step 5: In response to receiving the updated firmware record sent by the candidate robotic arm corresponding to the target firmware record, update the above firmware record list according to the above updated firmware record to obtain an updated firmware record list.
[0045] In practice, the updated firmware record may include: the current firmware version. The above executing entity may use the time when the updated firmware record is received as the firmware record update time included in the firmware record.
[0046] Step 6: According to the updated firmware record list, screen out the candidate robotic arms in the candidate robotic arm set whose corresponding current firmware version is less than the target firmware version to obtain the above robotic arm set.
[0047] In practice, the above executing entity may compare the current firmware version included in the firmware record in the updated firmware record list with the target firmware version, so as to screen out the candidate robotic arms whose corresponding current firmware version is less than the target firmware version to obtain the above robotic arm set.
[0048] Step 102: In response to successfully allocating a virtual controller to the robotic arm set, determine the update path information according to the robotic arm task information corresponding to the robotic arms in the robotic arm set.
[0049] In some embodiments, the above executing entity may, in response to successfully allocating a virtual controller to the robotic arm set, determine the update path information according to the robotic arm task information corresponding to the robotic arms in the robotic arm set.
[0050] In practice, a virtual controller is a controller that is used to simulate the functions and performance of an ECU (Electronic Control Unit) without using an ECU hardware as a carrier. Among them, the current firmware version corresponding to the virtual controller is the same as the current firmware version corresponding to the robotic arms in the above robotic arm set. The robotic arm task information includes: task status and task description information. The task status represents the task execution status of the robotic arm. For example, the task status may include, but is not limited to: in task execution, not in task execution. The task description information is used to represent the description of the task when the task status of the robotic arm is in task execution. For example, the task description information may include: task content and task duration. The update path information represents the firmware update order for the robotic arms in the robotic arm set.
[0051] As an example, the robotic arm set may include: robotic arm A, robotic arm B, and robotic arm C. The above-mentioned execution entity may allocate 1 virtual controller to robotic arm A, robotic arm B, and robotic arm C. When performing firmware update on any one of robotic arm A, robotic arm B, and robotic arm C, hot switching can be performed between the virtual controller and the main controller corresponding to the robotic arm that needs to perform firmware update. In practice, for the setting of a conventional master-slave (backup) controller, at least 2 controllers need to be set for a single robotic arm to implement the "master-slave (backup)" architecture, resulting in extremely high hardware costs. Therefore, in the firmware update scenario, the present disclosure temporarily takes over the robotic arm that needs to perform firmware update by setting a virtual controller, which can not only ensure the normal progress of firmware update, but also greatly reduce the hardware cost.
[0052] As an example, the above-mentioned execution entity may map and generate a firmware update priority for the robotic arm according to the task status and task description information included in the robotic arm and the corresponding robotic arm task information, and construct update path information according to the high or low firmware update priority corresponding to the robotic arm. For example, the robotic arm with a high firmware update priority is updated first.
[0053] Optionally, the update path information includes: a sequence of nodes to be updated, and the nodes to be updated correspond to the robotic arms one by one. In practice, the update path information can be stored in the form of a linked list.
[0054] In some optional implementation manners of some embodiments, the above-mentioned execution entity, in response to successfully allocating a virtual controller to the above-mentioned robotic arm set, determines update path information according to the robotic arm task information corresponding to the robotic arms in the above-mentioned robotic arm set, including:
[0055] The first step is to generate an initial double-ended queue.
[0056] Among them, enqueue operations can be performed on both the queue head and the queue tail of the above-mentioned initial double-ended queue. The above-mentioned initial double-ended queue is empty.
[0057] The second step is to perform the following processing steps for each robotic arm in the above-mentioned robotic arm set:
[0058] The first sub-step, in response to the task status indicated in the robotic arm task information corresponding to the above-mentioned robotic arm indicating that the task is being executed, generates the node to be updated corresponding to the above-mentioned robotic arm, and enqueues the node to be updated corresponding to the above-mentioned robotic arm from the queue tail of the above-mentioned initial double-ended queue.
[0059] The second sub-step, in response to the task status indicated in the robotic arm task information corresponding to the above-mentioned robotic arm indicating that the task has not been executed, generates the node to be updated corresponding to the above-mentioned robotic arm, and enqueues the node to be updated corresponding to the above-mentioned robotic arm from the queue head of the above-mentioned initial double-ended queue.
[0060] For example, refer to Figure 4 The schematic diagram of the process of enqueueing the nodes to be updated corresponding to the robotic arm shown in Figure 4 . Among them, the robotic arm set may include: robotic arm A, robotic arm B, robotic arm C, robotic arm D, and robotic arm E. Among them, the task statuses corresponding to robotic arm A and robotic arm B are both tasks not yet executed. The task statuses corresponding to robotic arm C, robotic arm D, and robotic arm E are all tasks in progress. Therefore, the node to be updated corresponding to robotic arm A is enqueued from the head of the initial double-ended queue, and immediately afterwards, the node to be updated corresponding to robotic arm B is enqueued from the head of the initial double-ended queue. In addition, the node to be updated corresponding to robotic arm C, the node to be updated corresponding to robotic arm D, and the node to be updated corresponding to robotic arm E are sequentially enqueued from the tail of the initial double-ended queue.
[0061] Step 3, according to the task description information included in the robotic arm task information corresponding to the robotic arm, perform local node order adjustment on the nodes to be updated in the initial double-ended queue corresponding to the task status indicating tasks in progress, so as to obtain the sequence of nodes to be updated included in the above update path information.
[0062] In practice, the above execution entity can perform local node order adjustment on the nodes to be updated corresponding to the task status indicating tasks in progress in ascending order according to the task duration included in the task description information.
[0063] For example, the task duration corresponding to robotic arm C is greater than the task duration corresponding to robotic arm E > the task duration corresponding to robotic arm D. Therefore, in the order from the head to the tail of the queue, the node to be updated corresponding to robotic arm D is before the node to be updated corresponding to robotic arm E, and the node to be updated corresponding to robotic arm E is before the node to be updated corresponding to robotic arm C.
[0064] In practice, by adopting the structure of a double-ended queue, it is allowed to perform enqueueing and dequeueing operations simultaneously from the head and the tail of the initial double-ended queue. One is that it can improve the enqueueing efficiency. The second is that for the requirement of local node order adjustment, it only needs to re-adjust the node order of the nodes to be updated corresponding to the task status indicating tasks in progress from the tail of the queue. Compared with the conventional queue structure, there is no need to adjust the order of all nodes to be updated. Especially when the number of robotic arms in the robotic arm set is large, the time consumption is greatly reduced.
[0065] Step 103, switch the control of the target robotic arm from the corresponding main controller to the virtual controller.
[0066] In some embodiments, the above-mentioned execution entity may, in various ways, hot-switch the target robotic arm from being controlled by the corresponding main controller to being controlled by a virtual controller. The target robotic arm is the robotic arm to be currently updated characterized by the above-mentioned update path information.
[0067] In practice, since the sequence of nodes to be updated included in the update path information is stored in a double-ended queue after local node order adjustment, the above-mentioned execution entity may determine the robotic arm corresponding to the node to be updated at the head of the double-ended queue after local node order adjustment as the target robotic arm. In particular, the robotic arm task information corresponding to the robotic arm may change. Therefore, when performing firmware update on the target robotic arm, when the robotic arm task information corresponding to the robotic arms other than the target robotic arm in the robotic arm set changes, it is necessary to perform dynamic queue adjustment on the double-ended queue after local node order adjustment. Specifically, the second and third steps in step 102 may be re-executed, which will not be elaborated here.
[0068] In some optional implementation manners of some embodiments, the above-mentioned execution entity hot-switching the target robotic arm from being controlled by the corresponding main controller to being controlled by a virtual controller includes:
[0069] The first step is to generate a snapshot of the main controller.
[0070] The above-mentioned snapshot of the main controller corresponds to the main controller corresponding to the target robotic arm. In practice, the above-mentioned execution entity may capture the main controller state of the main controller corresponding to the target robotic arm at the current moment and the sensor signals received by the target robotic arm as the snapshot of the main controller.
[0071] The second step is to activate the above-mentioned virtual controller according to the above-mentioned snapshot of the main controller.
[0072] In practice, the above-mentioned execution entity may simulate the corresponding controller parameters according to the snapshot of the main controller to activate the virtual controller. By combining the snapshot of the main controller, the virtual controller can quickly be in the same working state as the main controller corresponding to the target robotic arm.
[0073] The third step is to, in response to the successful activation of the above-mentioned virtual controller, convert the working mode of the above-mentioned virtual controller to the forwarding mode.
[0074] In the forwarding mode, the sensor signals corresponding to the target robotic arm are synchronously transmitted to the main controller corresponding to the target robotic arm and the above-mentioned virtual controller, the real-time control instructions generated by the main controller corresponding to the target robotic arm are forwarded to the target robotic arm by the virtual controller, and the virtual controller synchronously generates shadow control instructions for the sensor signals.
[0075] It should be noted that when the target robotic arm is in the state of not performing a task for the corresponding task, the target robotic arm can be controlled to execute a preset task, so as to make the target robotic arm generate a sensor signal, so as to make the main controller corresponding to the target robotic arm generate a real-time control instruction, and make the virtual controller generate a shadow control instruction. When the target robotic arm is in the state of performing a task for the corresponding task, corresponding sensor signals can be generated according to the task being performed, so as to make the main controller corresponding to the target robotic arm generate a real-time control instruction, and make the virtual controller generate a shadow control instruction. In particular, when the target robotic arm is in the state of not performing a task for the corresponding task, since the target robotic arm does not perform an actual task, the conventional method often adopts a static and direct update method. However, in the conventional method, only whether the firmware is effectively installed can be verified, and the stability of the firmware often cannot be directly and real-time determined. Therefore, when the target robotic arm is in the state of not performing a task for the corresponding task, the present disclosure simulates a real task processing environment. By controlling the target robotic arm to execute a preset task, and then also adopting a hot-swap method for firmware update, the firmware stability of the robotic arm firmware of the target firmware version can be verified in a timely manner.
[0076] Fourthly, in response to the shadow instruction generated by the above virtual controller being consistent with the real-time control instruction generated by the main controller corresponding to the above target robotic arm, switch the control of the target robotic arm from the corresponding main controller to the virtual controller.
[0077] As an example, refer to Figure 5 the schematic diagram of the hot-swap process of the main controller and the virtual controller corresponding to the target robotic arm shown in the figure. Among them, the target robotic arm will generate sensor signals in real time during the task execution process. In the forwarding mode, the sensor signals will be synchronously sent to the main controller and the virtual controller corresponding to the target robotic arm. At this time, the main controller corresponding to the target robotic arm will generate a real-time control instruction according to the sensor signals. At the same time, the virtual controller will also generate corresponding shadow control instructions according to the sensor signals. If the real-time control instruction and the shadow control instruction are inconsistent, the main controller will forward the real-time control instruction to the virtual controller, and the virtual controller will send it to the target robotic arm. If the real-time control instruction and the shadow control instruction are consistent, cut off the control of the main controller over the target robotic arm, and transfer the control of the target robotic arm to the virtual controller.
[0078] In practice, the reason for the present disclosure to adopt the above-mentioned third and fourth steps is that through the snapshot of the master controller, the virtual controller can be quickly reproduced to the working state of the corresponding master controller of the target robotic arm. However, a certain amount of time is still required during the activation process. For a robotic arm control scenario in milliseconds, if the target robotic arm is directly controlled by the virtual controller after the virtual controller is activated, due to the time difference during reproduction, the control signal will be discontinuous and the problem of uneven transition will occur. In addition, there will also be a problem of instruction conflict when the master controller and the virtual controller output control instructions simultaneously. Therefore, the present disclosure adopts a forwarding mode, that is, the real-time control instructions generated by the master controller are forwarded to the target robotic arm through the virtual controller, so as to avoid the problem of instruction conflict. At the same time, a small time difference will be generated during the forwarding process for the comparison of the real-time control instructions and the virtual control instructions. When they are consistent, it indicates that the master controller and the virtual controller corresponding to the target robotic arm are in the same working state. At this time, the real-time control instruction is equal to the shadow control instruction. Therefore, the target robotic arm can be directly controlled by the virtual controller, thus realizing a smooth controller switch. In addition, by comparing the real-time control instruction and the virtual control instruction, there is no need to compare the feedback results corresponding to the instructions, thereby improving the switching speed.
[0079] Step 104, in response to the completion of the switch, update the robotic arm firmware of the target robotic arm to the target firmware version.
[0080] In some embodiments, the above-mentioned execution subject may, in response to the completion of the switch, update the robotic arm firmware of the target robotic arm to the target firmware version. Among them, the target firmware version is greater than or equal to the current firmware version. For example, the current firmware version may be "v2.2" and the target firmware version may be "v2.3". In practice, the OTA (Over-The-Air) method can be adopted to update the robotic arm firmware of the target robotic arm to the target firmware version.
[0081] In some optional implementation manners of some embodiments, the above-mentioned execution subject updating the robotic arm firmware of the target robotic arm to the target firmware version in response to the completion of the switch may include the following steps:
[0082] The first step is to determine the network state of the target network.
[0083] Among them, the above-mentioned target network is a control network used for data interaction with the robotic arms in the above-mentioned robotic arm set. In practice, multiple robotic arms can be controlled and data can be transmitted through a control network based on a local area network. Since the firmware update only involves the local network where the robotic arm set is located, it is possible to determine only the network status of the target network containing the robotic arm set. Specifically, first, the above-mentioned execution entity can obtain the network rate, network bandwidth, network latency, network packet loss rate, and network throughput of the target network. Then, the above-mentioned execution entity can determine the network status according to a pre-constructed network status decision tree, in combination with the network rate, network bandwidth, network latency, network packet loss rate, and network throughput. Specifically, the network status can include: a stable network status and an unstable network status.
[0084] In the second step, in response to the above-mentioned network status being the first network status, the robotic arm firmware of the above-mentioned target robotic arm with the target firmware version is updated in an incremental update manner.
[0085] In practice, the first network status can be an unstable network status. Specifically, the full update method has relatively high requirements for network stability. In an unstable network status, compared with the full update method, the incremental update method can improve the success rate of firmware update.
[0086] In the third step, in response to the above-mentioned network status being the second network status, the robotic arm firmware of the above-mentioned target robotic arm with the target firmware version is updated in a full update manner.
[0087] In practice, the second network status can be a stable network status. Specifically, compared with the incremental update method, the full update method has higher fault tolerance and data consistency, and is relatively simple to implement. Therefore, in a stable network status, the full update method is selected.
[0088] In the fourth step, in response to the failure of the incremental update, the robotic arm firmware of the above-mentioned target robotic arm with the target firmware version is updated again in a full update manner.
[0089] In practice, the incremental update method may have problems due to abnormal interruption. At this time, it is not conducive to version rollback. Therefore, it is necessary to convert to the full update method to ensure the success of firmware update by overwriting the firmware. In particular, when converting from the incremental update failure to the full update method, the network status needs to be considered, that is, when the network status of the target network becomes the second network status, the full update is performed.
[0090] Step 105, in response to the completion of the update, collect the control information group.
[0091] In some embodiments, the above-mentioned execution entity may collect a control information group in response to the completion of the update. The control information group includes: first control information and second control information. The first control information represents the control instructions and corresponding control results when the virtual controller controls the target robotic arm. The second control information represents the control instructions and control results of the simulation of the target robotic arm corresponding to the main controller. In practice, the sensor signals generated by the target robotic arm can be synchronized in real time to the main controller corresponding to the target robotic arm (the robotic arm firmware is the target firmware version) and the virtual controller (the robotic arm firmware is the current firmware version). Thus, the virtual controller can combine the sensor signals to generate the control instructions included in the first control information, send the control instructions included in the first control information to the target robotic arm, obtain the feedback from the robotic arm, and use it as the control result included in the first control information. Also, the main controller corresponding to the target robotic arm can combine the sensor signals to generate the control instructions included in the second control information, send the control instructions included in the second control information to the target robotic arm, obtain the feedback from the robotic arm, and use it as the control result included in the second control information.
[0092] Similarly, when the target robotic arm is a robotic arm with a corresponding task status of not executing a task, the target robotic arm can be controlled to continue executing the preset task, and thus the control information group can be collected. When the target robotic arm is a robotic arm with a corresponding task status of executing a task, the control information group can be collected according to the task being executed.
[0093] In some optional implementation manners of some embodiments, before the above-mentioned execution entity switches the control of the target robotic arm from the virtual controller to the corresponding main controller in response to the control information group satisfying the preset conditions, the method further includes:
[0094] First step, perform control information feature extraction on the control instructions and control results included in the above-mentioned first control information to obtain a first instruction feature and a first control result feature.
[0095] Second step, perform control information feature extraction on the control instructions and control results included in the above-mentioned second control information to obtain a second instruction feature and a second control result feature.
[0096] Third step, generate a control evaluation result for the first control information through an evaluation model, the above-mentioned first instruction feature, and the above-mentioned first control result feature, as the first evaluation result.
[0097] In practice, for the first control information and the second control information, the present disclosure uses the MobileNet model to extract the control information features. The reason is that since the robotic arm needs to meet the requirements of low-latency control and fast response, the process of extracting the control information features is required to be low-latency. At the same time, in order to improve the robustness and meet the operating requirements of low-computing-power hardware, the MobileNet model is selected to extract the control information features.
[0098] Step 4: Generate a control evaluation result for the second control information through the above evaluation model, the above second instruction feature, and the above second control result feature as the second evaluation result.
[0099] In practice, first, the first instruction feature and the above first control result feature need to be feature-stitched and used as the input of the evaluation model, and the second instruction feature and the above second control result feature need to be feature-stitched and used as the input of the evaluation model. Among them, the evaluation model is implemented by using 3 serial fully-connected layers to respectively regress and obtain the first evaluation result and the second evaluation result. In practice, both the first evaluation result and the second evaluation result are represented in the form of result scores. In particular, in the model training stage, the MobileNet model and the evaluation model are trained as a whole in a supervised manner. The training samples used in the training process are control instructions labeled with corresponding evaluation results, and the sample labels used in the training process are the evaluation results labeled for the control instructions. Among them, the preset condition is that the result score of the above second evaluation result is greater than or equal to the result score of the first evaluation result.
[0100] Step 106: In response to the control information group meeting the preset condition, hot-switch the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller.
[0101] In some embodiments, the above-mentioned execution entity may, in response to the control information group satisfying a preset condition, perform a hot switch on the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller. In practice, during the task execution process of the target robotic arm, sensor signals will be generated and sent synchronously to the main controller and the virtual controller corresponding to the target robotic arm. Compared with the situation where the main controller corresponding to the target robotic arm before firmware update is switched to the virtual controller, during the process of hot-switching the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller, the main controller corresponding to the target robotic arm will generate a shadow control instruction according to the sensor signal. At the same time, the virtual controller will also generate a corresponding real-time control instruction according to the sensor signal. At this time, the real-time control instruction generated by the virtual controller will be forwarded to the target robotic arm through the main controller corresponding to the target robotic arm, and the target robotic arm will feedback the execution result of the real-time control instruction. At the same time, the main controller corresponding to the target robotic arm will simulate the execution of the shadow control instruction to obtain a feedback result. When the feedback result corresponding to the real-time control instruction is consistent with the feedback result of the shadow control instruction, the control of the target robotic arm by the virtual controller will be cut off, and the main controller corresponding to the target robotic arm will take over the control of the target robotic arm. Compared with the hot-switching process in step 103, in the hot-switching process of step 106, the feedback result is obtained by comparison as the hot-switching timing. The reason is that since the current firmware version corresponding to the virtual controller is different from the target firmware version corresponding to the main controller of the target robotic arm at this time, the generated control instructions may vary due to changes in the link library, execution logic, etc. At this time, if the method of comparing control instructions in the hot-switching process in step 103 is used, it will instead lead to an unreasonable hot-switching timing. Under the same sensor signal, there are often the same or similar control results (feedback results).
[0102] In some optional implementation manners of some embodiments, the above method further includes:
[0103] First step, in response to the control information group not satisfying the preset condition, roll back the robotic arm firmware of the main controller corresponding to the above-mentioned target robotic arm.
[0104] In practice, the above-mentioned execution entity may control the main controller corresponding to the target robotic arm to roll back to the robotic arm firmware corresponding to the current firmware version.
[0105] Second step, in response to the completion of the firmware rollback, switch the control of the target robotic arm from the virtual controller to the corresponding main controller, and send a firmware update failure reminder to the update control terminal.
[0106] In practice, the update control terminal can be a visualization terminal for updating the firmware of the robotic arm. Specifically, the firmware of the robotic arm of the target version is often tested for its corresponding firmware stability in a simulation scenario or with a limited number of robotic arms. When directly updating the robotic arm in the working environment, there is a certain probability of firmware anomalies. When anomalies occur, at this time, the problem of uneven transition during the switching between the virtual controller and the main controller corresponding to the target robotic arm is not the primary consideration, but the primary purpose is to ensure that the target robotic arm quickly returns to the operable state. At the same time, in order to prevent the target robotic arm from occupying the virtual controller for a long time, thus affecting the firmware update of robotic arms other than the target robotic arm in the robotic arm set, it is necessary to directly switch the target robotic arm to be controlled by the corresponding main controller.
[0107] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the firmware update method of some embodiments of the present disclosure, the automatic update of the robot arm firmware corresponding to the robot arm is realized while ensuring the normal operation of the robot arm, greatly improving the update efficiency. Specifically, first, a set of robot arms is determined. Among them, each robot arm in the set of robot arms is located on the same assembly line, and the corresponding robot arm attribute information is the same. Each robot arm in the set of robot arms corresponds to a main controller. The robot arm attribute information includes: robot arm type and current firmware version. By updating a batch of robot arms with the same robot arm type and the same current firmware version on the same assembly line, the update efficiency is ensured. Secondly, in response to the successful allocation of a virtual controller to the above-mentioned set of robot arms, according to the robot arm task information corresponding to the robot arms in the above-mentioned set of robot arms, update path information is determined. Among them, the current firmware version corresponding to the virtual controller is the same as the current firmware version corresponding to the robot arms in the above-mentioned set of robot arms. The robot arm task information includes: task status and task description information. In practice, the task statuses of different robot arms are different. Therefore, it is necessary to combine the robot arm task information corresponding to the robot arm and the actual task situation of the robot arm to generate corresponding update path information. Then, the target robot arm is hot-switched from the control of the corresponding main controller to the control of the virtual controller, where the target robot arm is the currently to-be-updated robot arm characterized by the above-mentioned update path information. In practice, currently, the robot arm is usually controlled by a master-slave (backup) controller or a single (master) controller. For the former, it is necessary to redundantly set the slave (backup) controller, and the hardware cost is relatively high. At the same time, during the controller switching process, there is still a certain control interruption situation. Therefore, it often cannot meet the robot arm control scenario with a millisecond-level time granularity. For the latter, when the main controller is updated, the robot arm needs to stop working. Therefore, the present disclosure uses a virtual controller and, at the same time, through the hot-switching method, can reduce the hardware cost and ensure the continuity of robot arm control. Further, in response to the completion of the switching, the robot arm firmware of the target firmware version is updated for the above-mentioned target robot arm, where the target firmware version is greater than or equal to the current firmware version. At this time, the target robot arm is temporarily taken over by the virtual controller, so the robot arm firmware of the corresponding main controller of the target robot arm can be updated. In addition, in response to the completion of the update, a control information group is collected, where the control information group includes: first control information and second control information. The first control information represents the control instructions and the corresponding control results when the virtual controller controls the target robot arm, and the second control information represents the control instructions and control results simulated by the main controller corresponding to the target robot arm. Finally, in response to the control information group meeting the preset conditions, the target robot arm is hot-switched from the control of the virtual controller to the control of the corresponding main controller. In practice, the robot arm firmware of the target version is often tested for its corresponding firmware stability in a simulation scenario or with a limited number of robot arms.When directly updating the robotic arm in the working environment, there is a certain probability of firmware anomalies. Therefore, in the present disclosure, by collecting a control information group, that is, collecting the control instructions and control results of the virtual controller and the main controller for the same sensor signal, the firmware stability of the robotic arm with the target firmware version when updated to the robotic arm in the working environment is judged. When the preset conditions are met, the target robotic arm is then hot-switched from being controlled by the virtual controller to being controlled by the corresponding main controller. By this means, the update efficiency of the robotic arm firmware is improved.
[0108] Further referring to Figure 6 , as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a firmware update device. These device embodiments correspond to Figure 1 the method embodiments shown, and the firmware update device can be specifically applied to various electronic devices.
[0109] As Figure 6 shown, the firmware update device 600 of some embodiments includes: a first determination unit 601, a second determination unit 602, a first hot-switching unit 603, an update unit 604, a collection unit 605, and a second hot-switching unit 606. Among them, the first determination unit 601 is configured to determine a robotic arm set, where each robotic arm in the robotic arm set is located on the same assembly production line and the corresponding robotic arm attribute information is the same. Each robotic arm in the robotic arm set corresponds to a main controller, and the robotic arm attribute information includes: robotic arm type and current firmware version; the second determination unit 602 is configured to, in response to successfully allocating a virtual controller to the above-mentioned robotic arm set, determine update path information according to the robotic arm task information corresponding to the robotic arms in the above-mentioned robotic arm set, where the current firmware version corresponding to the virtual controller is the same as the current firmware version corresponding to the robotic arms in the above-mentioned robotic arm set, and the robotic arm task information includes: task status and task description information; the first hot-switching unit 603 is configured to hot-switch the target robotic arm from being controlled by the corresponding main controller to being controlled by the virtual controller, where the target robotic arm is the currently to-be-updated robotic arm characterized by the above-mentioned update path information; the update unit 604 is configured to, in response to the completion of the switching, update the robotic arm firmware of the target robotic arm to the target firmware version, where the target firmware version is greater than or equal to the current firmware version; the collection unit 605 is configured to, in response to the completion of the update, collect a control information group, where the control information group includes: first control information and second control information. The first control information represents the control instructions and corresponding control results when the virtual controller controls the target robotic arm, and the second control information represents the control instructions and control results simulated by the main controller corresponding to the target robotic arm; the second hot-switching unit 606 is configured to, in response to the control information group meeting the preset conditions, hot-switch the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller.
[0110] It can be understood that the units described in the firmware update device 600 correspond to the respective steps in the method described in the reference Figure 1 description. Thus, the operations, features, and beneficial effects described above for the method also apply to the firmware update device 600 and the units included therein, and will not be elaborated herein
[0111] Reference is made below to Figure 7 , which shows a schematic structural diagram of an electronic device (e.g., a computing device) suitable for implementing some embodiments of the present disclosure Figure 7 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure. As Figure 7 shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any of the above methods. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium, and when the computer program is executed by the processor, the processor can execute any of the above methods. The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 7 the structure shown in
[0112] is only a block diagram of a part of the structure related to the solution of the present disclosure and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout
[0113] Among them, in one embodiment, the above-mentioned processor is used to run a computer program stored in a memory to implement the following steps: determining a set of robotic arms, where each robotic arm in the set of robotic arms is located on the same assembly production line and the corresponding robotic arm attribute information is the same, and each robotic arm in the set of robotic arms corresponds to a main controller, and the robotic arm attribute information includes: robotic arm type and current firmware version; in response to successfully allocating a virtual controller to the above-mentioned set of robotic arms, determining update path information according to the robotic arm task information corresponding to the robotic arms in the above-mentioned set of robotic arms, where the current firmware version corresponding to the virtual controller is the same as the current firmware version corresponding to the robotic arms in the above-mentioned set of robotic arms, and the robotic arm task information includes: task status and task description information; switching the target robotic arm from being controlled by the corresponding main controller to being controlled by the virtual controller, where the target robotic arm is the currently to-be-updated robotic arm characterized by the above-mentioned update path information; in response to the completion of the switching, updating the robotic arm firmware of the target robotic arm to the target firmware version, where the target firmware version is greater than or equal to the current firmware version; in response to the completion of the update, collecting a control information group, where the control information group includes: first control information and second control information, the first control information represents the control instructions and corresponding control results when the virtual controller controls the target robotic arm, and the second control information represents the control instructions and control results simulated by the main controller corresponding to the target robotic arm; in response to the control information group meeting a preset condition, switching the target robotic arm from being controlled by the virtual controller to being controlled by the corresponding main controller.
[0114] The embodiments of the present disclosure also provide a computer-readable storage medium. A computer program is stored on the above-mentioned computer-readable storage medium, and the program instructions in the above-mentioned computer program, when executed, implement a method that can refer to each embodiment of the above-mentioned method of the present disclosure.
[0115] Among them, the above-mentioned computer-readable storage medium may be an internal storage unit of the above-mentioned computer device in the foregoing embodiment, such as the hard disk or memory of the above-mentioned computer device. The above-mentioned computer-readable storage medium may also be an external storage device of the above-mentioned computer device, such as a plug-in hard disk equipped on the above-mentioned computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc.
[0116] It should be noted that, in this document, the terms "including", "comprising" or any other variation thereof are intended to cover non-exclusive inclusion, such that a process, method, article or system including a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or system. Without further limitation, an element defined by the phrase "including an..." does not exclude the presence of additional identical elements in the process, method, article or system including such element.
[0117] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) disclosed in the embodiments of the present disclosure that have similar functions.
Claims
1. A firmware update method, characterized in that: include: Determine a robotic arm set, wherein each robotic arm in the robotic arm set is located in the same assembly line, and the corresponding robotic arm attribute information is the same, and each robotic arm in the robotic arm set corresponds to a main controller, and the robotic arm attribute information includes: robotic arm type and current firmware version; In response to successfully allocating the virtual controller to the set of robotic arms, determining update path information according to robotic arm task information corresponding to the robotic arms in the set of robotic arms, wherein the current firmware version corresponding to the virtual controller is consistent with the current firmware version corresponding to the robotic arms in the set of robotic arms, and the robotic arm task information includes: task status and task description information; Hot-switching the target robotic arm from the control of the corresponding main controller to the control of the virtual controller, wherein the target robotic arm is the robotic arm currently to be updated represented by the update path information; In response to the switching being completed, updating the target firmware version of the target robotic arm firmware for the target robotic arm, wherein the target firmware version is greater than or equal to the current firmware version; In response to the update being completed, a control information group is collected, wherein the control information group includes: first control information and second control information, the first control information represents a control instruction and a corresponding control result when the virtual controller controls the target robotic arm, and the second control information represents a control instruction and a control result of the target robotic arm corresponding to the simulation of the main controller; In response to the control information group satisfying a preset condition, the target robot arm is hot-switched from control of the virtual controller to control of the corresponding main controller.
2. The method according to claim 1, characterized in that: The determining of the set of mechanical arms comprises: In response to the mechanical arm firmware of the target firmware version being located at the first position of the firmware update queue, a candidate mechanical arm set is determined, wherein the candidate mechanical arms in the candidate mechanical arm set satisfy a screening condition group, wherein the screening condition group includes: a first screening condition, a second screening condition and a third screening condition, the first screening condition is: the working state of the candidate mechanical arm is an online state, the second screening condition is: the mechanical arm type corresponding to the candidate mechanical arm is the same as the mechanical arm type corresponding to the mechanical arm firmware of the target firmware version, and the third screening condition is: each candidate mechanical arm in the candidate mechanical arm set is located at the same assembly production line; Determine a firmware record list corresponding to the candidate robotic arm set, wherein the firmware record list includes: a firmware record set, a firmware record and a candidate robotic arm correspond one to one, a firmware record includes: a current firmware version and a record update time, and the firmware records in the firmware record list are uploaded and updated by the candidate robotic arm at a regular interval; Determine whether there is a target firmware record in the firmware record list, wherein the target firmware record is a firmware record including a record update time and a time difference between the current time that is greater than a preset time difference; In response to the existence of a target firmware record, initiating a firmware version confirmation request to the candidate mechanical arm corresponding to the target firmware record; In response to receiving an updated firmware record sent by a candidate mechanical arm corresponding to the target firmware record, updating the firmware record list according to the updated firmware record to obtain an updated firmware record list; According to the updated firmware record list, candidate robotic arms whose corresponding current firmware versions are smaller than the target firmware version are screened out from the candidate robotic arm set to obtain the robotic arm set.
3. The method according to claim 2, characterized in that The update path information includes: a sequence of nodes to be updated, where the nodes to be updated correspond to the robotic arms one by one, and in response to the successful allocation of the virtual controller to the robotic arm set, the update path information is determined according to the robotic arm task information corresponding to the robotic arms in the robotic arm set, including: Generate an initial bidirectional queue, wherein both the queue head and the queue tail of the initial bidirectional queue can perform a queue entry operation; For each robot in the set of robots, the following processing steps are performed: In response to the task state representation of the robot arm task information corresponding to the robot arm, a node to be updated corresponding to the robot arm is generated, and the node to be updated corresponding to the robot arm is queued from the tail of the initial bidirectional queue; In response to the task status representation of an unexecuted task included in the task information of the mechanical arm corresponding to the mechanical arm, generating a node to be updated corresponding to the mechanical arm, and enqueuing the node to be updated corresponding to the mechanical arm from the head of the queue of the initial bidirectional queue; According to the task description information included in the robot task information corresponding to the robot arm, the local node order of the nodes to be updated in the initial bidirectional queue of the nodes to be updated and in the corresponding task state representation execution task inserted into the nodes to be updated is adjusted to obtain the node sequence to be updated included in the update path information.
4. The method according to claim 3, characterized in that: The step of hot-switching the target robotic arm from the control of the corresponding main controller to the control of the virtual controller includes: Generate a main controller snapshot, wherein the main controller snapshot corresponds to the main controller corresponding to the target robotic arm; activating the virtual controller according to the main controller snapshot; In response to the successful activation of the virtual controller, the working mode of the virtual controller is converted to a forwarding mode, wherein in the forwarding mode, the sensor signal corresponding to the target robotic arm is synchronously transmitted to the main controller corresponding to the target robotic arm and the virtual controller, the real-time control instruction generated by the main controller corresponding to the target robotic arm is forwarded to the target robotic arm by the virtual controller, and the virtual controller synchronously generates a shadow control instruction for the sensor signal; In response to the shadow instruction generated by the virtual controller being consistent with the real-time control instruction generated by the main controller corresponding to the target robotic arm, the target robotic arm is switched from control of the corresponding main controller to control of the virtual controller.
5. The method according to claim 4, characterized in that The step of updating the target firmware version of the target robotic arm firmware includes: Determining a network state of a target network, wherein the target network is a control network for performing data interaction with a robotic arm in the set of robotic arms; In response to the network state being the first network state, updating the target firmware version of the target robotic arm firmware in an incremental update manner; In response to the network state being the second network state, updating the target firmware version of the target robotic arm firmware in a full update manner; In response to the failure of the incremental update, a full update is adopted to re-update the target robotic arm firmware of the target firmware version.
6. The method according to claim 5, characterized in that Before hot-switching the target robot arm from the control of the virtual controller to the control of the corresponding main controller in response to the control information group satisfying the preset condition, the method further includes: Extracting control information features from the control instructions and control results included in the first control information to obtain first instruction features and first control result features; Extracting control information features from the control instructions and control results included in the second control information to obtain second instruction features and second control result features; Generate a control evaluation result for the first control information as a first evaluation result through an evaluation model, the first instruction feature, and the first control result feature; A control evaluation result for the second control information is generated through the evaluation model, the second instruction feature and the second control result feature as a second evaluation result, wherein the preset condition is that the result score of the second evaluation result is greater than or equal to the result score of the first evaluation result.
7. The method according to claim 6, characterized in that The method further comprises: In response to the control information group not satisfying a preset condition, rolling back the robot arm firmware of a main controller corresponding to the target robot arm; In response to the firmware rollback being completed, the target robotic arm is switched from being controlled by the virtual controller to being controlled by the corresponding main controller, and a firmware update failure reminder is sent to the update control terminal.
8. A firmware update device, characterized in that: include: A first determining unit is configured to determine a set of robotic arms, wherein each robotic arm in the set of robotic arms is located in the same assembly line, and the corresponding robotic arm attribute information is the same, and each robotic arm in the set of robotic arms corresponds to a main controller, and the robotic arm attribute information includes: a robotic arm type and a current firmware version; A second determination unit is configured to determine update path information according to robot task information corresponding to the robot arms in the robot arm set in response to the success of allocating the virtual controller to the robot arm set, wherein the current firmware version corresponding to the virtual controller is consistent with the current firmware version corresponding to the robot arms in the robot arm set, and the robot arm task information includes: task status and task description information; A first hot-switching unit is configured to hot-switch a target mechanical arm from control of a corresponding main controller to control of a virtual controller, wherein the target mechanical arm is a mechanical arm currently to be updated represented by the update path information; An updating unit, configured to update the target firmware version of the target robotic arm firmware in response to the switching being completed, wherein the target firmware version is greater than or equal to the current firmware version; The collecting unit is configured to collect a control information group in response to the completion of the update, wherein the control information group includes: first control information and second control information, the first control information representing a control instruction and a corresponding control result when the virtual controller controls the target manipulator, and the second control information representing a control instruction and a control result of the target manipulator corresponding to the simulation of the main controller; The second hot-switching unit is configured to hot-switch the target robot arm from the control of the virtual controller to the control of the corresponding main controller in response to the control information group satisfying a preset condition.
9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium, characterized in that A computer program is stored thereon, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Firmware upgrading method, firmware upgrading system, server and storage medium
CN116418791A
Processor upgrade debugging method and device, equipment, storage medium and program product
CN117792905A