CN-117520394-B - Cloud edge computing-based robot rule real-time computing method and device
Abstract
The invention discloses a cloud end computing-based robot rule real-time computing method and device, which comprise a visualization module, a storage module, a computing module and an event module, wherein the visualization module is used for providing a rule and event editing function, storing edited rule data and event data in the storage module, displaying a computing result and an event sending result, the storage module is used for storing the rule data and the event data, the computing module is used for reading the rule data from the storage module and carrying out rule computing through the feature data obtained in real time to obtain the computing result, the event module is used for reading the event data from the storage module and determining an event sending channel, and when the rule computing is completed and the event sending condition is reached, the event is sent according to the event sending channel after being triggered by the computing module, and the event carries the rule computing result. The method and the device can realize the efficient transmission and the transmission of the whole system of the robot, realize the monitoring of the running state and the rule of the real-time robot and realize the efficient information processing of the robot.
Inventors
- ZHOU YUANHAI
- SONG WEI
- YIN YUE
- ZHU SHIQIANG
- WU QIN
- NIE XIAOQI
- ZHAO YONG
Assignees
- 之江实验室
Dates
- Publication Date
- 20260508
- Application Date
- 20231107
Claims (8)
- 1. The robot rule real-time computing device based on cloud side computing is characterized by comprising a visualization module, a computing module, an event module and a storage module; The visualization module is used for providing the editing function of rules and events, storing the edited rule data and event data in the storage module and displaying rule calculation results and event sending results; the storage module is used for storing rule data, event data and rule calculation results, wherein the event is a rule notification mechanism, each event is bound with a rule, one rule binds at least one event, the event is sent out after being triggered by the rule according to a default binding order, and each event is defined as a data table comprising event names, robot real-time data stored with triggering rules and a sending channel; The calculation module is used for reading the rule data from the storage module and carrying out rule calculation through the feature data acquired in real time to obtain a rule calculation result; The event module is used for reading event data from the storage module, determining a sending channel of an event, and sending the event according to the sending channel of the event after being triggered by the calculation module when the rule calculation is completed and the condition of sending the event is reached, wherein the event carries a rule calculation result; the robot rule real-time computing device is realized based on a rule engine, wherein the rule engine comprises a service interface layer, a rule and event map, a database, a management module, a scheduler, a thread pool and a communication protocol module; The service interface layer is used for front-end call or active call and comprises the steps of inquiring, modifying, creating and deleting the event and the rule, actively triggering the rule calculation, acquiring a real-time rule calculation result, acquiring a sending record of the event and switching the calculation state of the rule; the rule and event map memory has rule event instances and refers to each other; The database is used for storing rules, events, logs and computing backups for a long time; the management module is used for providing authority access constraint, controlling the running and suspension of rules in the engine, adding, deleting and checking the rules and the events; the scheduler is used for scheduling regular calculation occasions; The thread pool is used for abstracting the computing resources of the CPU and carrying out rule computation; the communication protocol module is used for sending the bound event to a user or synchronizing the rule calculation result to the feature management platform.
- 2. The cloud-edge computing-based robotic rule real-time computing device of claim 1, wherein the event is sent by a channel-based event transmission mechanism, wherein the event transmission mechanism comprises: The event queues triggered by the same rule can only be transmitted in one channel, the external robot only corresponds to one channel, and the transmission event is monitored on the corresponding channel; During transmission, the event ID is used as a unique rule identifier, is composed of an external robot and a rule profile, and also comprises event parameters, wherein the event parameters carry a rule calculation result.
- 3. The cloud-edge computing-based robot rule real-time computing device according to claim 1, wherein the rule data comprises a rule tree list and a rule node list, the rule tree is of a nested structure, the rule tree represents that other rules are applied to the current rule, and the rule tree has logic symbols to represent combinational logic of rule computing results; each rule tree also has rule nodes, each rule node corresponds to one rule and is used for storing a calculation expression of the rule, each rule is used for unique name and ID, and IDs of different rules are connected through logic symbols to form the rule tree.
- 4. The cloud-edge computing-based robotic rule real-time computing device of claim 1, wherein the flow of rule computation and event call notification implemented by the real-time computing device based on a rule engine comprises: Registering an event according to the event definition, storing the registered event into a database of a storage module, and forming an event queue; Inputting rules, namely defining registration rules according to the rules, and storing the registered rules into a database of a storage module; The rule engine monitors feature data update of the feature platform; Extracting rules from the rule queue in turn according to the regular polling period, or extracting rules from the rule queue when monitoring the updating of the feature data; judging the obtained rule, carrying out rule calculation to obtain a calculation result when the characteristic data are read from the characteristic platform, and storing the calculation result to a storage module or the characteristic platform; When the rule binds an event, packing a data table after the triggering condition of the binding rule is met, and entering the event into an event queue; and the monitoring party executes the response strategy of the event corresponding rule after obtaining the time from the event queue.
- 5. The cloud-edge computing-based robot rule real-time computing device according to claim 1, wherein rules are grouped according to different rule training times in rule computing, each group sets a timer, and when the timer expires, real-time update computing of a group of rules is triggered.
- 6. The cloud-edge computing-based robotic rule real-time computing device of claim 1, wherein for rule computing, depth traversal is used to traverse and translate into rule trees and record, with defined depth.
- 7. The cloud-edge computing-based robotic rule real-time computing device of claim 1, wherein the rule tree is stored as a json data structure.
- 8. A real-time calculation method of robot rules based on cloud edge end calculation is characterized in that, the method adopts the robot rule real-time computing device based on cloud edge computing as claimed in any one of claims 1-7, and comprises the following steps: Editing rules and events by using a visualization module, storing the edited rule data and event data in a storage module, and displaying a calculation result and an event sending result; the method comprises the steps that a storage module is used for storing rule data and event data, wherein each event is a rule notification mechanism, each event is bound with a rule, one rule binds at least one event, the events are sent out after being triggered by the rule according to a default binding order, and each event is defined to comprise an event name, a data table storing real-time data of the robot triggering the rule and a sending channel; the calculation module is used for reading rule data from the storage module, and rule calculation is carried out through the feature data obtained in real time to obtain a calculation result; And reading event data from the storage module by using the event module, determining a sending channel of the event, and sending the event according to the sending channel of the event after being triggered by the calculation module when the rule calculation is completed and the condition of sending the event is reached, wherein the event carries a rule calculation result.
Description
Cloud edge computing-based robot rule real-time computing method and device Technical Field The invention relates to the technical field of robot automation control, in particular to a cloud edge computing-based robot rule real-time computing method and device. Background A Robot (Robot) is an intelligent machine that can operate semi-autonomously or fully autonomously. Robots can perform tasks such as work or movement through programming and automatic control, and are widely used in medical industry, education industry, subway inspection, and various aspects of production and life. Robot behavior control refers to controlling a robot to make different reactions or actions by means of a computer program. Robot behavior control requires determining actions that the robot should take next, including movement, grabbing objects, etc., based on environmental information perceived by the robot. The development of robot behavior control is advancing toward more flexible and efficient directions. Some robots are now already available for autonomous decision making and capable of task execution in complex environments. For example, in the medical field, robots may perform surgical operations, or assist doctors in diagnosing conditions, etc. In the field of robot behavior control, an important development direction in recent years is deep reinforcement learning. The deep reinforcement learning is to control the intelligent robot by combining a deep neural network with a reinforcement learning algorithm, and the method can help the robot to better adapt to complex environments and can more efficiently execute various tasks. At present, robot behavior control is controlled by means of rule constraint, but the behavior of the robot is guided by various dynamically-changing environments, states and logic control factors, so that a redundant complex system and repeated robot design logic can be caused. Thus, for a robotic design system, there is a need to design a robotic functional subsystem that can be independent of the robotic decision system for these problems. The method has the advantages of expressing complex rules in a pseudo code mode, providing real-time and responsive rule calculation, and providing a long-term rule calculation recording system and an on-line tracking system. The robot system is an overall engineering combining multiple functional modules, and each module involves the problems of condition, threshold judgment and logic branch selection. At present, rule calculation is independently processed in each module, but according to the research and development process of the cloud brain end of the robot at present, the processing has the following problems that the calculation is scattered and unconstrained, rights and potential safety hazards exist, a large number of repeated calculation rules exist, the rule calculation is not visual enough, and the problems are difficult to track. Disclosure of Invention The invention aims to provide a cloud side computing-based robot rule real-time computing method and device, which can realize the efficient transmission and transmission of a robot overall system, realize the monitoring of the running state and rule of a real-time robot and realize the efficient information processing of the robot. In order to achieve the above object, an embodiment further provides a real-time calculation device for robot rules based on cloud end calculation, which comprises a visualization module, a calculation module, an event module and a storage module; The visualization module is used for providing the editing function of rules and events, storing the edited rule data and event data in the storage module and displaying rule calculation results and event sending results; the storage module is used for storing rule data, event data and rule calculation results; The calculation module is used for reading the rule data from the storage module and carrying out rule calculation through the feature data acquired in real time to obtain a rule calculation result; the event module is used for reading event data from the storage module, determining a sending channel of the event, and sending the event according to the sending channel of the event after being triggered by the calculation module when the rule calculation is completed and the condition of sending the event is reached, wherein the event carries a rule calculation result. Preferably, the event is a rule notification mechanism, each event is bound to a rule, one rule binds at least one event, the events are sent out according to a default binding order after being triggered by the rule, and each event is defined as including an event name, a data table storing real-time data of the robot triggering the rule, and a transmission channel. Preferably, the event is sent through a channel-based event transmission mechanism, wherein the event transmission mechanism comprises: The event queues triggered by the same rule can only be