Method and device for controlling robot abnormality in cluster environment
Through the heartbeat detection and task synchronization mechanism, automatic processing of robot abnormalities in a cluster environment is realized, which solves the problem of frequent manual intervention and improves efficiency and utilization.
Patent Information
- Application Number
- CN202011284484.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-11-17
AI Technical Summary
The existing technology lacks an automated solution for robotic process automation (RPA) exception handling in a cluster environment, resulting in frequent manual intervention, increased costs and reduced efficiency.
The robot status information is obtained in real time through the heartbeat detection method to determine the type of exception. When an exception occurs, the second robot performs the task. The task splitting and call chain synchronization mechanism is used to ensure the automation and continuity of exception handling.
It improves robot utilization, reduces manual intervention, reduces costs, and supports task interruption points to continue execution after exceptions, improving processing efficiency.
Smart Images

Figure CN112395124B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, in particular to robotic process automation technology, and specifically to a method and device for controlling robot anomalies in a cluster environment. Background Art
[0002] With the popularity of RPA (Robotic Process Automation, an automated software tool that can use and understand the company's existing applications through a user interface, automate routine rule-based operations, and replace people in front of computers to perform regular and repetitive office processes.) in recent years, the demand for RPA is strong, and more companies have realized the benefits of RPA. RPA can replace manual processing of tedious and complex large-scale affairs, liberate manpower, reduce corporate labor costs, improve efficiency, and realize process automation. RPA is now widely used in fields such as clearing robots, financial robots, IT operation and maintenance robots, approval robots, customer service robots, and human resources robots.
[0003] In the prior art, technologies related to RPA all focus on the research of transaction processing. The related prior art only involves monitoring robot status, data statistics and other aspects, and does not involve the automated processing of robot abnormalities. That is, there is no solution for when an RPA robot has an abnormality. For financial enterprises, risk management is an important link that cannot be ignored. Therefore, the main purpose of the present invention is to provide users with an automated solution for when a robot has an abnormality in a cluster environment. Summary of the invention
[0004] In response to the problems in the prior art, the present invention can establish a method for controlling robot anomalies in a controllable cluster environment, which can improve the utilization rate of robots by handling anomalies and monitoring machine status when the number of robots is limited; it can provide users with an automated solution for handling robot anomalies, reduce manual intervention, reduce costs, and improve processing efficiency; and after an anomaly occurs in a robot, it can support the next robot to continue execution at the interruption point.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides a method for controlling robot anomalies in a cluster environment, comprising:
[0007] Acquire the status information of the first robot in real time according to the heartbeat detection method;
[0008] Determining whether an abnormality occurs in the first robot according to the status information;
[0009] When an abnormality occurs in the first robot, the task is performed by the second robot.
[0010] In one embodiment, judging whether an abnormality occurs in the first robot according to the state information includes:
[0011] Determining the type of abnormality that occurred in the first robot according to the network status, CPU processing speed, and number of tasks of the first robot;
[0012] The abnormal types include: robot failure, unstable network delay, CPU full load and downtime.
[0013] In one embodiment, the method for controlling robot anomalies in a cluster environment further includes:
[0014] Splitting said task into multiple processes;
[0015] Generate call chains based on multiple processes.
[0016] In one embodiment, when the first robot is abnormal, executing the task by the second robot includes:
[0017] When an exception occurs in the first robot, an identifier is set in the call chain to record the task location where the exception occurs;
[0018] The second robot performs task synchronization with the first robot according to the identifier.
[0019] In one embodiment, the second robot performs task synchronization with the first robot according to the identifier, including:
[0020] Sending the IP address and key of the second robot to the first robot;
[0021] Sending the IP address, port, interface name, interface parameters corresponding to the synchronization task, and the key of the first robot to the second robot;
[0022] The second robot generates a uniform resource locator according to the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key;
[0023] The second robot generates a synchronization request according to the uniform resource locator using the RPC method, and sends the synchronization request to the first robot.
[0024] In a second aspect, the present invention provides a device for controlling robot anomalies in a cluster environment, the device comprising:
[0025] A state information acquisition unit, used to acquire the state information of the first robot in real time according to the heartbeat detection method;
[0026] an abnormality occurrence judgment unit, used for judging whether an abnormality occurs in the first robot according to the state information;
[0027] The task execution unit is used to execute the task through the second robot.
[0028] In one embodiment, the abnormality occurrence judgment unit is specifically used to judge the type of abnormality occurring in the first robot according to the network status, CPU processing speed and task quantity of the first robot;
[0029] The abnormal types include: robot failure, unstable network delay, CPU full load and downtime.
[0030] In one embodiment, the control device for robot abnormality in a cluster environment further includes:
[0031] A task splitting unit, used for splitting the task into multiple processes;
[0032] The call chain generation unit is used to generate a call chain according to multiple processes.
[0033] In one embodiment, the task execution unit includes:
[0034] an identifier setting module, configured to set an identifier in the call chain to record the task location where the exception occurs when an exception occurs in the first robot;
[0035] A synchronization module is used for the second robot to synchronize tasks with the first robot according to the identifier.
[0036] In one embodiment, the synchronization module includes:
[0037] A key sending module, used for sending the IP address and key of the second robot to the first robot;
[0038] An interface name sending module, used to send the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key of the first robot to the second robot;
[0039] A locator generation module, used by the second robot to generate a uniform resource locator according to the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key;
[0040] A synchronization request sending module is used for the second robot to generate a synchronization request according to the uniform resource locator using the RPC method and send it to the first robot.
[0041] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, steps of a method for controlling robot anomalies in a cluster environment are implemented.
[0042] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for controlling robot anomalies in a cluster environment.
[0043] From the above description, it can be seen that the present invention provides a method and device for controlling robot anomalies in a cluster environment. First, the status information of the first robot is obtained in real time according to the heartbeat detection method; then, whether the first robot has an abnormality is determined according to the status information; finally, when the first robot has an abnormality, the task is performed by the second robot. The present invention has the following beneficial effects: when the number of robots is limited, the utilization rate of robots can be improved by handling anomalies and monitoring the status of machines; it can provide users with an automated solution for handling robot anomalies, reduce manual intervention, reduce costs, and improve processing efficiency; after an anomaly occurs, it can support the next robot to continue execution at the interruption point. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A schematic diagram of an RPA architecture of the prior art in an embodiment of the present invention;
[0046] Figure 2 The process diagram of the method for controlling robot abnormalities in a cluster environment in an embodiment of the present invention is shown in FIG. Figure 1 ;
[0047] Figure 3 A schematic diagram of a flow chart of a method for solving a robot abnormality in an embodiment of the present invention;
[0048] Figure 4 is a flow chart of step 200 in an embodiment of the present invention;
[0049] Figure 5 The process diagram of the method for controlling robot abnormalities in a cluster environment in an embodiment of the present invention is shown in FIG. Figure 2 ;
[0050] Figure 6is a flow chart of step 300 in an embodiment of the present invention;
[0051] Figure 7 This is a flow chart of step 302 in an embodiment of the present invention;
[0052] Figure 8 A schematic diagram of a robot task synchronization process in an embodiment of the present invention;
[0053] Fig. 9 It is a flow chart of a method for controlling robot anomalies in a cluster environment in a specific application example of the present invention;
[0054] Fig.10 Schematic diagram of the structure of the control device for abnormal robot in a cluster environment in an embodiment of the present invention Figure 1 ;
[0055] Fig.11 Schematic diagram of the structure of the control device for abnormal robot in a cluster environment in an embodiment of the present invention Figure 2 ;
[0056] Fig.12 A schematic diagram of the structure of a task execution unit in an embodiment of the present invention;
[0057] Fig.13 A schematic diagram of the structure of a synchronization module in an embodiment of the present invention;
[0058] Fig.14 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] At present, many large enterprises’ internal systems are not open to the outside world for security reasons, such as financial internal systems. Therefore, most RPA architectures adopt the CS architecture of robot client and robot server. Multiple robots correspond to one or more server ends, and relay servers or other intermediate media can be added in the middle to achieve interactive effects (such as Figure 1). In such a cluster situation, when one or more robots have an abnormality (robot automation is often performed in the middle of the night or early morning), if manual intervention is required, it will be very labor-intensive. Based on this, the embodiment of the present invention provides a specific implementation method of a robot abnormality control method in a cluster environment, see Figure 2 , the method specifically includes the following contents:
[0061] Step 100: Acquire the status information of the first robot in real time according to the heartbeat detection method.
[0062] Specifically, the connection is normal by sending a heartbeat packet. The server sends a short data packet to the robot at a certain interval, and then starts a thread to continuously detect the response from the robot. If no response is received from the robot within a certain period of time, it is considered that the robot has been disconnected; similarly, if the robot does not receive the heartbeat packet from the server within a certain period of time, it is considered that the connection is unavailable.
[0063] Step 200: Determine whether an abnormality occurs in the first robot according to the status information.
[0064] Specifically, the type of abnormality of the first robot is determined based on the network status, CPU processing speed, and number of tasks of the first robot; the abnormality types include: robot failure, unstable network delay, CPU full load, and downtime. It is understandable that different solutions are determined according to the abnormality type, see Figure 3 When the exception type is a robot failure, first try to recover. The server sends a command to restart the robot. If no reply is received within the preset time interval, it is considered that the restart has failed and the robot is unavailable, and a new robot is recommended to execute the process. When the exception type is unstable network delay or full CPU load, first determine whether the flag is needed. If necessary, establish a connection with the previous robot. If the acquisition is successful, continue execution from the flag; if the acquisition fails, obtain it through the server as a transfer.
[0065] Step 300: When an abnormality occurs in the first robot, the task is performed by the second robot.
[0066] It should be noted that the strategy for recommending a new robot, that is, how to select the second robot, is as follows: In a cluster, if there is an idle robot, randomly select an idle robot. If there is no idle robot, select the robot with the least task list among the robots and add it to the task list of the robot. If there is no idle robot and the robot's task list is full, first add it to the server's task list, and then add the robot's task list or idle robot later.
[0067] In addition, the method of selecting an idle robot includes: selecting according to the robot priority (initializing the priority according to the machine performance); the server maintains a robot execution status list, and calculates a corresponding status value according to the execution status (network status, CPU processing speed, number of tasks, etc.). If it is less than the threshold, it means that the status is good and the task can be accepted. If it is greater than the threshold, it means that the tasks are piled up and the robot's tasks can be appropriately reduced. The smaller the status value, the better the status, and the tasks can be arranged with priority.
[0068] From the above description, it can be seen that the present invention provides a method for controlling robot anomalies in a cluster environment. First, the status information of the first robot is obtained in real time according to the heartbeat detection method; then, whether the first robot has an abnormality is determined according to the status information; finally, when the first robot has an abnormality, the task is performed by the second robot. The present invention has the following beneficial effects: when the number of robots is limited, the robot utilization rate can be improved by handling anomalies and monitoring the machine status; it can provide users with an automated solution for handling robot anomalies, reduce manual intervention, reduce costs, and improve processing efficiency; after an abnormality occurs, it can support the next robot to continue execution at the interruption point.
[0069] In one embodiment, see Figure 4 , step 200 specifically includes:
[0070] Step 201: determining the type of abnormality of the first robot according to the network status, CPU processing speed and number of tasks of the first robot;
[0071] Among them, the abnormal types include: robot failure, unstable network delay, CPU full load and downtime.
[0072] In one embodiment, see Figure 5 ,The control methods for robot anomalies in cluster environments also include:
[0073] Step 400: split the task into multiple processes;
[0074] It is understandable that a task is composed of multiple small processes or steps, so a task can be split into several small tasks (small processes).
[0075] Step 500: Generate a call chain according to multiple processes.
[0076] In one embodiment, see Figure 6 , step 300 further comprises:
[0077] Step 301: When an exception occurs in the first robot, an identifier is set in the call chain to record the task location where the exception occurs;
[0078] Step 302: The second robot performs task synchronization with the first robot according to the identifier.
[0079] In step 301 and step 302, when an exception occurs when the robot performs a task, the robot will mark the position in the call chain. If the successor robot needs to inherit the flag and continue to perform the task from the flag, the following strategy is followed: when the successor robot starts to perform the task, it will first determine whether the flag is needed. If it is needed, it will establish a connection with the previous robot. If the acquisition is successful, it will continue to execute from the flag; if the acquisition fails, it will be obtained through the server as a transfer.
[0080] In one embodiment, see Figure 7 , step 302 further comprises:
[0081] Step 3021: Send the IP address and key of the second robot to the first robot;
[0082] Step 3022: Send the IP address, port, interface name, interface parameters corresponding to the synchronization task, and the key of the first robot to the second robot;
[0083] Step 3023: the second robot generates a uniform resource locator according to the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key;
[0084] Step 3024: The second robot generates a synchronization request according to the uniform resource locator using the RPC method, and sends it to the first robot.
[0085] In steps 3021 to 3024, see Figure 8 When two robots need to synchronize (A>>B), they agree on a unified message format. The server sends the IP / port / interface name / interface parameters corresponding to the synchronization task / random key to the B machine; the server sends the caller IP / random key to the A machine for verification. After receiving it, the B machine assembles the URL and calls the A machine using the RPC method. After receiving the request from the B machine, the A machine verifies whether the IP is legal and uses the key to decrypt the parameters. If the decryption fails, it means that the request is illegal.
[0086] To further illustrate the present solution, the present invention provides a specific application example of a method for controlling robot anomalies in a cluster environment. The specific application example specifically includes the following contents, see Fig. 9 .
[0087] S0: Get the status information of the first robot in real time.
[0088] S1: Determine whether the first robot has an abnormality according to the status information.
[0089] S2: When an abnormality occurs in the first robot, a second robot is selected.
[0090] It is understandable that the robot itself has a task queue, and it will prioritize tasks from the queue. The server maintains a robot execution status list, and calculates a corresponding status value based on the execution status (network status, CPU processing speed, number of tasks, etc.). If it is less than the threshold, it means the status is good and tasks can be accepted. If it is greater than the threshold, it means tasks are piled up and the robot can be appropriately relieved of tasks. The smaller the status value, the better the status and tasks can be arranged first.
[0091] In addition, it should be noted that if the robot fails, the command will be tried to restore the robot. If the recovery is successful, the execution will continue. When the new robot executes a task, it will first determine whether a flag is required. If necessary, the flag information is obtained through the cluster. Otherwise, it will be executed directly. Within the cluster, robots can communicate directly. If they cannot connect, they can connect indirectly through the server as a relay.
[0092] From the above description, it can be seen that the present invention provides a method for controlling robot anomalies in a cluster environment. First, it is necessary to identify the risk anomalies of the robot, which include robot failure, robot downtime, unstable network delay, CPU full load, business anomalies, etc. The robot will report its status to the server regularly. The server will match the type of anomaly according to the status and then make a corresponding processing plan. If the robot status cannot be detected after a timeout, it is considered that the robot is down. If the robot status is detected again after a period of time, and the robot status is continuously detected above the threshold time period, it is considered that the robot has recovered and can be assigned tasks.
[0093] Based on the same inventive concept, the embodiments of the present application also provide a control device for robot anomalies in a cluster environment, which can be used to implement the methods described in the above embodiments, as described in the following embodiments. Since the principle of solving the problem by the control device for robot anomalies in a cluster environment is similar to the method for controlling robot anomalies in a cluster environment, the implementation of the control device for robot anomalies in a cluster environment can refer to the implementation of the method for controlling robot anomalies in a cluster environment, and the repeated parts will not be repeated. As used below, the terms "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0094] The embodiment of the present invention provides a specific implementation of a robot abnormality control device in a cluster environment that can implement a robot abnormality control method in a cluster environment, see Fig.10, the control device for robot abnormality in a cluster environment specifically includes the following contents:
[0095] A state information acquisition unit 10, used to acquire the state information of the first robot in real time according to the heartbeat detection method;
[0096] an abnormality occurrence judgment unit 20, used to judge whether an abnormality occurs in the first robot according to the state information;
[0097] The task execution unit 30 is used to execute the task through the second robot.
[0098] In one embodiment, the abnormality occurrence judgment unit 20 is specifically used to judge the type of abnormality occurring in the first robot according to the network status, CPU processing speed and task quantity of the first robot;
[0099] The abnormal types include: robot failure, unstable network delay, CPU full load and downtime.
[0100] In one embodiment, see Fig.11 , the control device for robot abnormality in the cluster environment also includes:
[0101] A task splitting unit 40, used for splitting the task into multiple processes;
[0102] The call chain generating unit 50 is used to generate a call chain according to multiple processes.
[0103] In one embodiment, see Fig.12 , the task execution unit 30 includes:
[0104] An identifier setting module 301 is used to set an identifier in the call chain to record the task location where the exception occurs when the first robot has an exception;
[0105] The synchronization module 302 is used for the second robot to synchronize tasks with the first robot according to the identifier.
[0106] In one embodiment, see Fig.13 , the synchronization module 302 includes:
[0107] A key sending module 3021 is used to send the IP address and key of the second robot to the first robot;
[0108] The interface name sending module 3022 is used to send the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key of the first robot to the second robot;
[0109] A locator generating module 3023, configured for the second robot to generate a uniform resource locator according to the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key;
[0110] The synchronization request sending module 3024 is used for the second robot to generate a synchronization request according to the uniform resource locator using the RPC method and send it to the first robot.
[0111] From the above description, it can be seen that the present invention provides a control device for robot anomalies in a cluster environment. First, the status information of the first robot is obtained in real time according to the heartbeat detection method; then, whether the first robot has an abnormality is determined according to the status information; finally, when the first robot has an abnormality, the task is performed by the second robot. The present invention has the following beneficial effects: when the number of robots is limited, the utilization rate of robots can be improved by handling abnormalities and monitoring the status of machines; it can provide users with an automated solution for handling robot anomalies, reduce manual intervention, reduce costs, and improve processing efficiency; after an abnormality occurs, it can support the next robot to continue execution at the interruption point.
[0112] The embodiments of the present application also provide a specific implementation of an electronic device that can implement all steps in the method for controlling robot anomalies in a cluster environment in the above embodiments, see Fig.14 , electronic equipment specifically includes the following:
[0113] Processor (processor) 1201, memory (memory) 1202, communication interface (CommunicationsInterface) 1203 and bus 1204;
[0114] The processor 1201, the memory 1202, and the communication interface 1203 communicate with each other via the bus 1204; the communication interface 1203 is used to realize information transmission between relevant devices such as the server-side device, the acquisition device, and the user-side device.
[0115] The processor 1201 is used to call the computer program in the memory 1202. When the processor executes the computer program, all steps in the method for controlling robot anomalies in a cluster environment in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0116] Step 100: Acquire the status information of the first robot in real time according to the heartbeat detection method;
[0117] Step 200: determining whether an abnormality occurs in the first robot according to the state information;
[0118] Step 300: When an abnormality occurs in the first robot, the task is performed by the second robot.
[0119] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the method for controlling robot anomalies in a cluster environment in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the method for controlling robot anomalies in a cluster environment in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0120] Step 100: Acquire the status information of the first robot in real time according to the heartbeat detection method;
[0121] Step 200: determining whether an abnormality occurs in the first robot according to the state information;
[0122] Step 300: When an abnormality occurs in the first robot, the task is performed by the second robot.
[0123] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0124] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0125] Although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0126] Although the present specification embodiment provides the method operation steps as described in the embodiment or flow chart, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way in the order of execution of many steps, and does not represent a unique execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel (such as a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment) according to the method shown in the embodiment or the accompanying drawings. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements.
[0127] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0128] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0129] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0133] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0134] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0135] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0136] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0137] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0138] The above is only an example of the embodiment of the present specification and is not intended to limit the embodiment of the present specification. For those skilled in the art, the embodiment of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of the present specification shall be included in the scope of the claims of the embodiment of the present specification.
Claims
1. A method for controlling robot anomalies in a cluster environment. It is characterized in that include: Acquire the status information of the first robot in real time according to the heartbeat detection method; Determining whether an abnormality occurs in the first robot according to the status information; When an abnormality occurs to the first robot, the task is performed by the second robot; Splitting said task into multiple processes; Generate call chains based on multiple processes; When the first robot is abnormal, executing the task by the second robot includes: When an exception occurs in the first robot, an identifier is set in the call chain to record the task location where the exception occurs; The second robot performs task synchronization with the first robot according to the identifier; The second robot performs task synchronization with the first robot according to the identifier, including: Sending the IP address and key of the second robot to the first robot; Sending the IP address, port, interface name, interface parameters corresponding to the synchronization task, and the key of the first robot to the second robot; The second robot generates a uniform resource locator according to the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key; The second robot generates a synchronization request according to the uniform resource locator using an RPC method, and sends the synchronization request to the first robot; When an exception occurs when a robot is executing a task, the robot will mark the position in the call chain; if the successor robot needs to inherit the flag and continue to execute the task from the flag, it will operate according to the following strategy: when the successor robot starts to execute the task, it will first determine whether the flag is needed. If it is needed, it will establish a connection with the previous robot. If the acquisition is successful, it will continue to execute from the flag; if the acquisition fails, it will be obtained through the server as a transfer; When two robots need to synchronize: A>>B, the message format is agreed upon, the server sends the IP / port / interface name / interface parameters corresponding to the synchronization task / random key to the B machine; the server sends the caller's IP / random key to the A machine for verification; after receiving it, the B machine assembles the URL and calls the A machine using the RPC method; after receiving the request from the B machine, the A machine verifies whether the IP is legal and uses the key to decrypt the parameters. If the decryption fails, it means that the request is illegal.
2. The method for controlling robot abnormalities in a cluster environment as claimed in claim 1, It is characterized in that The determining, according to the state information, whether an abnormality occurs in the first robot includes: Determining the type of abnormality that occurred in the first robot according to the network status, CPU processing speed, and number of tasks of the first robot; The abnormal types include: robot failure, unstable network delay, CPU full load and downtime.
3. A control device for abnormal robot in a cluster environment, It is characterized in that include: A state information acquisition unit, used to acquire the state information of the first robot in real time according to the heartbeat detection method; an abnormality occurrence judgment unit, used for judging whether an abnormality occurs in the first robot according to the state information; A task execution unit, configured to execute the task through the second robot; A task splitting unit, used for splitting the task into multiple processes; A call chain generation unit, used for generating a call chain according to multiple processes; The task execution unit comprises: an identifier setting module, configured to set an identifier in the call chain to record the task location where the exception occurs when the first robot has an exception; A synchronization module, used for the second robot to perform task synchronization with the first robot according to the identifier; The synchronization module comprises: A key sending module, used for sending the IP address and key of the second robot to the first robot; An interface name sending module, used to send the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key of the first robot to the second robot; A locator generation module, used by the second robot to generate a uniform resource locator according to the IP address, port, interface name, interface parameters corresponding to the synchronization task and the key; a synchronization request sending module, used for the second robot to generate a synchronization request according to the uniform resource locator using an RPC method, and send the synchronization request to the first robot; The identifier setting module and the synchronization module are specifically used for when an exception occurs when the robot performs a task, the robot will mark the position in the call chain; if the successor robot needs to inherit the flag bit and continue to perform the task from the flag bit, the operation is performed according to the following strategy: when the successor robot starts to perform the task, it will first determine whether the flag bit is needed, and if so, it will establish a connection with the previous robot, and if the acquisition is successful, it will continue to execute from the flag bit; if the acquisition fails, it will be obtained through the server as a transfer; The key sending module, the interface name sending module, the locator generating module and the synchronization request sending module are specifically used when two robots need to be synchronized: A>>B, the message format is agreed upon, the server sends the IP / port / interface name / interface parameters corresponding to the synchronization task / random key to the B machine; the server sends the caller IP / random key to the A machine to verify the use; after receiving it, the B machine assembles the URL and calls the A machine using the RPC method; after receiving the request from the B machine, the A machine verifies whether the IP is legal and uses the key to decrypt the parameters. If the decryption fails, it means that the request is illegal.
4. The device for controlling robot abnormalities in a cluster environment as claimed in claim 3, It is characterized in that The abnormality occurrence judgment unit is specifically used to judge the type of abnormality occurring in the first robot according to the network status, CPU processing speed and task quantity of the first robot; The abnormal types include: robot failure, unstable network delay, CPU full load and downtime.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method for controlling robot abnormalities in a cluster environment described in any one of claims 1 to 2 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for controlling robot anomalies in a cluster environment described in any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Robot control system
CN108388187A
Rescue method and device for failure robot
CN108994840A
Robot abnormal state processing method and system
CN109048996A
Multi-robot coordinated control system
CN110308730A
Main / standby switching processing method and device of server
CN111385107A
