Method, system and storage medium for robot and cloud platform command interaction

Through the use of long network connections and cache middleware, the issue of publish-subscribe mode and repeated message consumption that is difficult to maintain in the interaction between robots and cloud platforms is solved, and efficient and reliable command processing is achieved.

CN115396479BActive Publication Date: 2025-05-09GUANGZHOU GOSUNCN ROBOTICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210945430.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-08
Publication Date
2025-05-09
Estimated Expiration
2042-08-08

AI Technical Summary

Technical Problem

During the interaction between existing robots and cloud platforms, there is a lack of publication-subscription mode and repeated messages consumption leading to system errors, and the first-in-first-out queue mode may cause message blockage, reducing timeliness.

Method used

Adopting a long network connection solution, the cloud platform and the robot client connect through handshake, use cache middleware to temporarily store commands, and realize routing and distribution through timing tasks and loose clusters, supporting high concurrent message processing.

Benefits of technology

It improves the reliability and timeliness of the robot's command interaction with cloud platform, reduces message blocking, and enhances command scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115396479B_ABST
    Figure CN115396479B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and storage medium for command interaction between a robot and a cloud platform, and the method comprises the following steps: the cloud platform starts a network service end; the robot starts a network client; the robot client sends a network connection request to the cloud platform; the cloud platform performs identity verification on the robot connection request, establishes a network connection, and caches this session to a storage system; the user issues a command to the robot through the cloud platform, and the cloud platform finds the network connection through the cached session; the cloud platform starts a scheduled task, and monitors whether there is a command identification code from the storage system to confirm the robot's reply; the robot executes the command and replies to the cloud platform; the cloud platform receives the robot's reply message, processes it through a routing distribution business program, and parses out the command identification code and the result of execution, saves it to the storage system cache, and the command execution is completed. The present invention can effectively improve the reliability and timeliness of the command interaction between the robot and the cloud platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robot and cloud platform communication technology, and more specifically, to a method, system and storage medium for robot and cloud platform command interaction. Background Art

[0002] In the prior art, the interaction process between the robot and the cloud platform is usually a cloud robot computing node environment composed of a robot computing node and a cloud computing center. The topic message type corresponding to the published topic name of the robot computing node is compared with the topic message type of the same subscription topic name on the cloud computing center. At the same time, the topic message type of the subscription topic name of the robot computing node is compared with the topic message type of the published topic name of the cloud computing center. If they are the same, the robot computing node uses the subscription topic name to subscribe to the ROS message of the same topic name in the cloud computing center, and the robot computing node publishes the ROS message to the cloud computing center according to the published topic name. This subscription model requires a large number of topics, which is difficult to maintain. In addition, there is message duplication - the generation of dirty data, and repeated consumption may cause some errors in the system.

[0003] That is to say, the existing robots and cloud platforms use the websocket communication protocol to handshake multiple times to establish a long connection, which is based on the publish-subscribe mode of the message queue, or the first-in-first-out queue mode. The publish-subscribe mode requires a large number of topics, which is difficult to implement and maintain. In addition, there is message duplication - the generation of dirty data, and repeated consumption may cause some errors in the system. The first-in-first-out queue mode may cause some message blocking. The time required for each business processing is different, but they all need to queue in the queue, reducing timeliness. Summary of the invention

[0004] One object of the present invention is to provide a new technical solution for the method of interaction between a robot and a cloud platform command, which can at least solve the problems of poor reliability and timeliness of the methods in the prior art.

[0005] A first aspect of the present invention provides a method for interacting between a robot and a cloud platform command, the method comprising the following steps:

[0006] The cloud platform starts the network server;

[0007] The robot starts the network client;

[0008] The robot client sends a network connection request to the cloud platform;

[0009] The cloud platform performs identity verification on the robot connection request. If the verification is successful, the handshake is successful, a network connection is established, and the cloud platform caches the session to the storage system;

[0010] The user sends a command to the robot through the cloud platform, and the cloud platform finds the network connection through the cached session;

[0011] The cloud platform starts a scheduled task and monitors the storage system for a command identification code to confirm the robot's reply;

[0012] The robot executes the command and replies to the cloud platform;

[0013] The cloud platform receives the reply message from the robot, processes it through the routing distribution business program, and parses the command identification code and the execution result, and saves them to the storage system cache, and the command execution is completed.

[0014] Optionally, the step of the cloud platform caching the session to a storage system further includes:

[0015] The robot periodically sends a keep-alive heartbeat to the cloud platform;

[0016] The cloud platform starts a scheduled task to regularly check the keep-alive heartbeat.

[0017] Optionally, the cloud platform starts a scheduled task, and the step of regularly checking the keep-alive heartbeat includes:

[0018] When the keep-alive heartbeat is normal, the cloud platform continues to check regularly;

[0019] When the keep-alive heartbeat is abnormal, the cloud platform clears the session in the cache.

[0020] Optionally, the step of the user sending a command to the robot through the cloud platform includes:

[0021] The user issues commands in XML or JSON protocol format through the cloud platform;

[0022] Temporarily generate a unique command identification code and add it to the command message header;

[0023] Send commands to the robot network client in real time.

[0024] Optionally, the cloud platform starts a scheduled task, and the step of monitoring whether there is a command identification code from the storage system to confirm the robot's reply further includes:

[0025] A timeout period is set for the scheduled task. If no reply is received from the robot within the timeout period, the user is prompted that the command has failed.

[0026] Optionally, the cloud platform receives the reply message of the robot, processes it through the routing distribution business program, and parses the command identification code and the execution result, and saves them to the storage system cache, including:

[0027] The cloud platform network server receives the robot's message and parses the message type in the message header;

[0028] Through the loose set configuration relationship of routing, it is distributed to the corresponding business program, and the business program is processed in parallel by multiple threads;

[0029] After processing, the command identification code and execution result are parsed and saved in the storage system cache.

[0030] Optionally, the method further comprises:

[0031] The cloud platform scheduled task monitors the command execution result corresponding to the identification code;

[0032] Analyze the robot's reply execution result and prompt it to the user;

[0033] The cloud platform clears the identification code of the command in the storage system.

[0034] A second aspect of the present invention provides a system for interacting between a robot and a cloud platform command, which is applied to the method for interacting between a robot and a cloud platform command described in the above embodiment, comprising:

[0035] A startup module, which is used by the cloud platform to start the network server and the robot to start the network client;

[0036] A sending module, the sending module is connected to the starting module, and the sending module is used by the robot client to send a network connection request to the cloud platform;

[0037] A verification module, the verification module is connected to the sending module, and the verification module is used for the cloud platform to perform identity verification on the robot connection request to establish a network connection;

[0038] A command issuing module, the command issuing module is connected to the verification module, and the command issuing module is used for the user to issue commands to the robot through the cloud platform;

[0039] A monitoring module, the monitoring module is connected to the command issuing module, and the monitoring module is used to monitor whether there is a command identification code from the storage system to confirm the robot's reply when the cloud platform starts the scheduled task;

[0040] An execution module, the execution module is connected to the monitoring module, and the execution module is used for the robot to execute commands and reply to the cloud platform;

[0041] A processing and parsing module, the processing and parsing module is connected to the execution module, and is used for the cloud platform to receive the reply message of the robot, process it through the routing distribution business program, and parse out the command identification code and the execution result.

[0042] According to a third aspect of the present invention, there is provided an electronic device comprising: a processor and a memory, wherein computer program instructions are stored in the memory, wherein when the computer program instructions are executed by the processor, the processor executes the steps of the method for interaction between robot and cloud platform commands in the above-mentioned embodiment.

[0043] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the method for interaction between a robot and a cloud platform command in the above-mentioned embodiment.

[0044] The method of command interaction between the robot and the cloud platform of the present invention adopts a long network connection solution. The cloud platform server and the robot client are connected through a handshake. After the connection is successful, both can actively send or receive commands to each other. The cloud platform server references the cache middleware to temporarily store the commands reported by the robot, supports high concurrent messages, and can also be replaced by other cache middleware. Finally, a scheduled task is used to parse the command, and a loose cluster is used to realize routing distribution to each business program to process the command, which has high command scalability. The method of command interaction between the robot and the cloud platform of the present invention can effectively improve the reliability and timeliness of the command interaction between the robot and the cloud platform.

[0045] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0047] Figure 1 is a websocket connection flow chart of a method for interacting between a robot and a cloud platform command according to an embodiment of the present invention;

[0048] Figure 2 is a message processing flow chart of a method for interacting between a robot and a cloud platform command according to an embodiment of the present invention;

[0049] Figure 3 is a schematic diagram of an electronic device according to an embodiment of the present invention.

[0050] Reference numerals:

[0051] Processor 201;

[0052] Memory 202; operating system 2021; application program 2022;

[0053] Network interface 203;

[0054] Input device 204;

[0055] Hard disk 205;

[0056] Display device 206. DETAILED DESCRIPTION

[0057] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0058] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0059] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0060] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0061] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0062] In the specification and claims of the present invention, if the term "first" or "second" is involved, it may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the related objects are in an "or" relationship.

[0063] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation to the present invention.

[0064] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" involved should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0065] The following describes in detail the method for robot-cloud platform command interaction according to an embodiment of the present invention with reference to the accompanying drawings.

[0066] like Figure 1 and Figure 2 As shown, the method for interacting between a robot and a cloud platform command according to an embodiment of the present invention includes the following steps:

[0067] S1. The cloud platform starts the network server;

[0068] S2, the robot starts the network client;

[0069] S3, the robot client sends a network connection request to the cloud platform;

[0070] S4. The cloud platform verifies the identity of the robot's connection request. If the verification is successful, the handshake is successful, the network connection is established, and the cloud platform caches this session to the storage system.

[0071] S5. The user sends a command to the robot through the cloud platform, and the cloud platform finds the network connection through the cached session;

[0072] S6. The cloud platform starts a scheduled task and monitors the storage system for command identification codes to confirm the robot's response.

[0073] S7. The robot executes the command and replies to the cloud platform;

[0074] S8. The cloud platform receives the robot's reply message, processes it through the routing distribution business program, parses the command identification code and execution result, saves them to the storage system cache, and the command execution is completed.

[0075] In other words, see Figure 1 and Figure 2 In the method of command interaction between a robot and a cloud platform in an embodiment of the present invention, first, the cloud platform starts a network server (websocket server), and the robot starts a network client (websocket client). Then, the robot client sends a network connection (websocket connection) request to the cloud platform. The cloud platform receives the robot's connection request and performs an identity verification on the robot's connection request. If the verification fails, the robot's connection request is rejected. If the verification passes, the cloud platform and the robot shake hands successfully and establish a websocket connection. And the cloud platform caches this session (session) to the storage system (redis). In the computer field, websocket, session, redis, and uuid are all commonly used computer terms, which are well known to those skilled in the art and will not be explained in detail in the present invention.

[0076] Next, the user sends a command to the robot through the cloud platform, and the cloud platform finds the websocket connection through the cached session. The cloud platform starts a scheduled task and listens to redis for a command identification code (uuid) to confirm the robot's reply. The robot executes the command and replies to the cloud platform. Finally, the cloud platform receives the robot's reply message, processes it through the routing distribution business program, and parses the command uuid and execution result, saves it to the redis cache, and the command execution is completed.

[0077] The method of robot-cloud platform command interaction of the present invention, the cloud platform sends a command to the robot, and the command header carries the unique identifier uuid of this command, which is used for the cloud platform to asynchronously receive the corresponding relationship of the robot's reply. The cloud platform uses scheduled tasks and redis cache to asynchronously process the robot's reply after executing the command, parses the reply background, and automatically clears the robot's reply in redis, forming a closed-loop process of sending and replying. The cloud platform uses loose collections to configure message types and business program implementation classes. After the cloud platform receives the message reported by the robot, it parses the message header, matches the loose collection rules, and forwards it to the corresponding business program for multi-threaded processing to realize the routing distribution function, and the command has good scalability. For example, to add a command protocol, you only need to configure the relationship between the message type and the business implementation class in the collection, then the distribution can be achieved by routing to reduce message blocking.

[0078] Therefore, according to the method of robot-cloud platform command interaction according to an embodiment of the present invention, a websocket long connection solution is adopted, and the cloud platform server and the robot client are connected through a handshake. After the connection is successful, both can actively send or receive commands to each other. The cloud platform server references the cache middleware redis to temporarily store the commands reported by the robot, supports high concurrent messages, and can also be replaced by other cache middleware. Finally, a scheduled task is used to parse the command, and a loose cluster is used to realize routing distribution to each business program to process the command, which has high command scalability. The method of robot-cloud platform command interaction of the present invention can effectively improve the reliability and timeliness of the command interaction between the robot and the cloud platform.

[0079] In some embodiments of the present invention, see Figure 1 The cloud platform caches this session to the storage system in the following steps:

[0080] The robot sends a keep-alive heartbeat to the cloud platform at regular intervals;

[0081] The cloud platform starts a scheduled task to regularly check the keep-alive heartbeat.

[0082] The cloud platform starts a scheduled task and regularly checks the keep-alive heartbeat, including the following steps:

[0083] When the keep-alive heartbeat is normal, the cloud platform continues to check regularly;

[0084] When the keep-alive heartbeat is abnormal, the cloud platform clears the session in the cache.

[0085] See also Figure 2 ,The steps for users to send commands to robots through the cloud platform include:

[0086] Users send commands in XML or JSON protocol format through the cloud platform;

[0087] Temporarily generate a unique command identification code and add it to the command message header;

[0088] Send commands to the robot network client in real time.

[0089] like Figure 2 As shown, the cloud platform starts a scheduled task, and the steps of monitoring whether there is a command uuid from redis to confirm the robot's reply also include:

[0090] Set a timeout for the scheduled task. If no response is received from the robot within the timeout period, the user will be prompted that the command failed.

[0091] See also Figure 2The cloud platform receives the robot's reply message, distributes it through the routing business program, and parses the command UUID and the execution result, and saves it to the redis cache. The steps include:

[0092] The cloud platform websocket server receives the robot's message and parses the message type in the message header;

[0093] Through the loose set configuration relationship of routing, it is distributed to the corresponding business program, and the business program is processed in parallel by multiple threads;

[0094] After processing, the command uuid and execution result are parsed and saved in the redis cache.

[0095] like Figure 2 As shown, the method also includes:

[0096] The cloud platform scheduled task monitors the command execution results corresponding to the uuid;

[0097] The parsing robot replies with the execution result and prompts the user;

[0098] The cloud platform clears the uuid of the command in redis.

[0099] That is to say, Figure 1 and Figure 2 As shown, in the method of robot-cloud platform command interaction of the present invention:

[0100] Step 1: The cloud platform starts the websocket server.

[0101] Step 2: The robot starts the websocket client.

[0102] Step 3: The robot client sends a websocket connection request to the cloud platform.

[0103] Step 4: The cloud platform verifies the robot's connection request. If the verification fails, the connection is rejected. If the verification passes, the handshake is successful, the websocket connection is established, and the cloud platform caches the session to redis.

[0104] Step 5: The user sends a command to the robot through the cloud platform, and the cloud platform finds the websocket connection through the cached session. The command protocol format can be in XML or JSON format. A unique command uuid is temporarily generated and added to the command message header, and the command is sent to the robot websocket client in real time.

[0105] Step 6: The cloud platform starts a scheduled task and listens to the command uuid in redis to confirm the robot's reply. And this scheduled task sets a timeout. If the robot does not reply within the timeout, the user is prompted that the command has failed.

[0106] Step 7: After the robot executes the command, it sends a reply to the cloud platform through the websocket connection. The message header carries the command uuid issued by the cloud platform.

[0107] Step 8: The cloud platform websocket server receives the robot's message and parses the message type in the message header. It distributes it to the corresponding business program through the loose set configuration relationship of the route. After the business program processes in parallel with multiple threads, it parses the command uuid and the execution result and saves it to the redis cache.

[0108] Step 9: When the cloud platform scheduled task monitors the command execution result corresponding to the uuid, the parsing robot replies with the execution result and prompts the user. The cloud platform clears the uuid of the command in redis, and the interaction is completed.

[0109] In the present invention, since the relationship between the robot and the cloud platform is many-to-one, it is necessary to support high concurrency and ensure the one-to-one correspondence between the cloud platform and the robot command interaction. The present invention introduces redis and routing distribution mechanism. The cloud platform parses a large number of replies sent by the robot and caches them using redis first. And use loose collections to configure message types and business program implementation classes in advance to implement routing distribution functions, and commands have good scalability. For example, to add a command protocol, you only need to configure the relationship between the message type and the business implementation class in the collection, and then the routing can be used to distribute it, reducing the number of messages stored in the same message queue and causing message blocking.

[0110] In summary, according to the method of robot-cloud platform command interaction according to an embodiment of the present invention, a websocket long connection solution is adopted. The cloud platform server and the robot client are connected through a handshake. After the connection is successful, both can actively send or receive commands to each other. The cloud platform server references the cache middleware redis to temporarily store the commands reported by the robot, supports high concurrent messages, and can also be replaced by other cache middleware. Finally, a scheduled task is used to parse the command, and a loose cluster is used to realize routing distribution to each business program to process the command, which has high command scalability. The method of robot-cloud platform command interaction of the present invention can effectively improve the reliability and timeliness of the command interaction between the robot and the cloud platform.

[0111] The second aspect of the present invention provides a system for command interaction between a robot and a cloud platform, which is applied to the method for command interaction between a robot and a cloud platform in the above-mentioned embodiment, and the system includes a startup module, a sending module, a verification module, a command issuing module, a monitoring module, an execution module and a processing and parsing module. Among them, the startup module is used for the cloud platform to start the websocket server and the robot to start the websocket client. The sending module is connected to the startup module, and the sending module is used for the robot client to send a websocket connection request to the cloud platform. The verification module is connected to the sending module, and the verification module is used for the cloud platform to perform identity verification on the robot connection request to establish a websocket connection.

[0112] The command issuing module is connected to the verification module. The command issuing module is used by the user to issue commands to the robot through the cloud platform. The monitoring module is connected to the command issuing module. The monitoring module is used to monitor whether there is a command uuid from redis to confirm the robot's reply when the cloud platform starts a scheduled task. The execution module is connected to the monitoring module. The execution module is used by the robot to execute commands and reply to the cloud platform. The processing and parsing module is connected to the execution module. After the cloud platform receives the robot's reply message, the processing and parsing module is used to distribute the business program through the routing, and parse the command uuid and the execution result.

[0113] In the present invention, robots, 4G / 5G network communication modules, websocket network transmission protocols, and cloud platform servers are also included. The robot body is installed with a 4G / 5G network communication module, and then communicates with the cloud platform through the Internet. Since the robot and the cloud platform command interaction is relatively frequent, high real-time performance is required, and repeated http patrols to send invalid query requests consume a lot of bandwidth and CPU resources. We adopt the websocket long connection solution, and the cloud platform server and the robot client are connected through a handshake. After the connection is successful, both can actively send or receive commands to each other. The cloud platform can be connected to multiple robots. Therefore, the cloud platform end references the cache middleware redis to temporarily store the commands reported by the robot, supports high concurrent messages, and can also use other cache middleware instead. Finally, a scheduled task is used to parse the command, and the loose cluster is used to realize routing distribution to each business program to process the command, which has high command scalability.

[0114] In summary, the system for command interaction between a robot and a cloud platform according to an embodiment of the present invention adopts a websocket long connection solution. The cloud platform server and the robot client are connected through a handshake. After the connection is successful, both can actively send or receive commands to each other. The cloud platform server references the cache middleware redis to temporarily store the commands reported by the robot, supports high concurrent messages, and can also be replaced by other cache middleware. Finally, a scheduled task is used to parse the command, and a loose cluster is used to implement routing distribution to each business program to process the command, which has high command scalability. The system for command interaction between a robot and a cloud platform of the present invention can effectively improve the reliability and timeliness of command interaction between the robot and the cloud platform.

[0115] According to a third aspect of the present invention, there is also provided an electronic device, comprising: a processor 201 and a memory 202, wherein computer program instructions are stored in the memory 202, wherein when the computer program instructions are executed by the processor 201, the processor 201 executes the steps of the method for interaction between the robot and the cloud platform commands in the above-mentioned embodiment.

[0116] Furthermore, if Figure 3 As shown, the electronic device further includes a network interface 203 , an input device 204 , a hard disk 205 , and a display device 206 .

[0117] The above-mentioned interfaces and devices can be interconnected through a bus architecture. The bus architecture can include any number of interconnected buses and bridges. Specifically, one or more central processing units 201 (CPUs) represented by processor 201 and various circuits of one or more memories 202 represented by memory 202 are connected together. The bus architecture can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits together. It can be understood that the bus architecture is used to achieve connection and communication between these components. In addition to the data bus, the bus architecture also includes a power bus, a control bus, and a status signal bus, which are all well known in the art, so they will not be described in detail herein.

[0118] The network interface 203 can be connected to a network (such as the Internet, a local area network, etc.), obtain relevant data from the network, and save it in the hard disk 205.

[0119] The input device 204 can receive various instructions input by the operator and send them to the processor 201 for execution. The input device 204 can include a keyboard or a pointing device (for example, a mouse, a trackball, a touch pad or a touch screen, etc.).

[0120] The display device 206 can display the result obtained by the processor 201 executing the instruction.

[0121] The memory 202 is used to store programs and data necessary for the operation of the operating system 2021, as well as data such as intermediate results during the calculation process of the processor 201.

[0122] It is understood that the memory 202 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. The memory 202 of the apparatus and method described herein is intended to include, but is not limited to, these and any other suitable types of memory 202.

[0123] In some implementations, the memory 202 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 2021 and application programs 2022 .

[0124] The operating system 2021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 2022 includes various application programs 2022, such as a browser, etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 2022.

[0125] The processor 201, when calling and executing the application 2022 and data stored in the memory 202, specifically, the program or instructions stored in the application 2022, executes the steps of the method for robot-cloud platform command interaction according to the above embodiment.

[0126] The method disclosed in the above embodiment of the present invention can be applied to the processor 201, or implemented by the processor 201. The processor 201 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 201 or the instruction in the form of software. The above processor 201 can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general processor can be a microprocessor or the processor 201 can also be any conventional processor 201, etc. The steps of the method disclosed in conjunction with the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 202, and the processor 201 reads the information in the memory 202 and completes the steps of the above method in combination with its hardware.

[0127] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of the present application or a combination thereof.

[0128] For software implementation, the technology herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions herein. The software code can be stored in the memory 202 and executed by the processor 201. The memory 202 can be implemented in the processor 201 or outside the processor 201.

[0129] Specifically, the processor 201 is also used to read the computer program and execute the following steps: predict the pile charging method and output the answer to the question asked by the user.

[0130] The fourth aspect of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor 201, the processor 201 executes the steps of the method for robot-cloud platform command interaction of the above-mentioned embodiment.

[0131] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as 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.

[0132] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0133] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0134] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A method for interacting between a robot and a cloud platform command, characterized in that: The method comprises the following steps: The cloud platform starts the network server; The robot starts the network client; The robot client sends a network connection request to the cloud platform; The cloud platform performs identity verification on the robot connection request. If the verification is successful, the handshake is successful, a network connection is established, and the cloud platform caches the session to the storage system; The user sends a command to the robot through the cloud platform, and the cloud platform finds the network connection through the cached session; the message header of the command contains a unique command identification code; The cloud platform starts a scheduled task and monitors the storage system for a command identification code to confirm the robot's reply; The robot executes the command and replies to the cloud platform; The cloud platform receives the reply message of the robot, distributes the message routing to the business program for processing through the loose set configuration relationship of the routing, and parses the command identification code and the execution result, saves them to the storage system cache, and the command execution is completed; the set configures the relationship between the message type and the business implementation class.

2. The method for robot-cloud platform command interaction according to claim 1, characterized in that: The step of the cloud platform caching the session to the storage system further includes: The robot periodically sends a keep-alive heartbeat to the cloud platform; The cloud platform starts a scheduled task to regularly check the keep-alive heartbeat.

3. The method for robot-cloud platform command interaction according to claim 2, characterized in that: The cloud platform starts a scheduled task and the step of regularly checking the keep-alive heartbeat includes: When the keep-alive heartbeat is normal, the cloud platform continues to check regularly; When the keep-alive heartbeat is abnormal, the cloud platform clears the session in the cache.

4. The method for robot-cloud platform command interaction according to claim 1, characterized in that: The steps of the user sending a command to the robot through the cloud platform include: The user issues commands in XML or JSON protocol format through the cloud platform; Temporarily generate a unique command identification code and add it to the command message header; Send commands to the robot network client in real time.

5. The method for robot-cloud platform command interaction according to claim 4, characterized in that: The cloud platform starts a scheduled task, and the step of monitoring whether there is a command identification code from the storage system to confirm the robot's reply also includes: A timeout period is set for the scheduled task. If no reply is received from the robot within the timeout period, the user is prompted that the command has failed.

6. The method for robot-cloud platform command interaction according to claim 5, characterized in that: The cloud platform receives the reply message of the robot, processes it through the routing distribution business program, and parses the command identification code and the execution result, and saves them to the storage system cache, including the following steps: The cloud platform network server receives the robot's message and parses the message type in the message header; Through the loose set configuration relationship of routing, it is distributed to the corresponding business program, and the business program is processed in parallel by multiple threads; After processing, the command identification code and execution result are parsed and saved in the storage system cache.

7. The method for robot-cloud platform command interaction according to claim 6, characterized in that: The method further comprises: The cloud platform scheduled task monitors the command execution result corresponding to the identification code; Analyze the robot's reply execution result and prompt it to the user; The cloud platform clears the identification code of the command in the storage system.

8. A system for interacting between a robot and a cloud platform command, applied to the method for interacting between a robot and a cloud platform command according to any one of claims 1 to 7, characterized in that: The system comprises: A startup module, which is used by the cloud platform to start the network server and the robot to start the network client; A sending module, the sending module is connected to the starting module, and the sending module is used by the robot client to send a network connection request to the cloud platform; A verification module, the verification module is connected to the sending module, and the verification module is used for the cloud platform to perform identity verification on the robot connection request to establish a network connection; A command issuing module, the command issuing module is connected to the verification module, and the command issuing module is used for a user to issue a command to the robot through the cloud platform; the message header of the command contains a unique command identification code; A monitoring module, the monitoring module is connected to the command issuing module, and the monitoring module is used to monitor whether there is a command identification code from the storage system to confirm the robot's reply when the cloud platform starts the scheduled task; An execution module, the execution module is connected to the monitoring module, and the execution module is used for the robot to execute commands and reply to the cloud platform; A processing and parsing module, the processing and parsing module is connected to the execution module. After the cloud platform receives the reply message of the robot, the processing and parsing module is used to distribute the message routing to the business program for processing through the loose set configuration relationship of routing, and parse the command identification code and the execution result, save them to the storage system cache, and the command execution is completed; the set configures the relationship between the message type and the business implementation class.

9. An electronic device, characterized in that: include: A processor and a memory, wherein computer program instructions are stored in the memory, wherein when the computer program instructions are executed by the processor, the processor executes the steps of the method for robot-cloud platform command interaction of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method for robot-cloud platform command interaction according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information processing method and apparatus based on long connection

    CN106713328A

  • Cloud platform, service processing method, command interface and computer equipment

    CN110601880A

  • Client, intelligent robot and intelligent robot system

    CN111343255A

  • Real-time transmission interaction method and system for browser terminal and equipment

    CN113132477A