CN111212097A - Method, device and storage medium for robot to access server - Google Patents

Method, device and storage medium for robot to access server Download PDF

Info

Publication number
CN111212097A
CN111212097A CN202010318882.1A CN202010318882A CN111212097A CN 111212097 A CN111212097 A CN 111212097A CN 202010318882 A CN202010318882 A CN 202010318882A CN 111212097 A CN111212097 A CN 111212097A
Authority
CN
China
Prior art keywords
server
request
request information
robot
cloud service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010318882.1A
Other languages
Chinese (zh)
Inventor
李尧
张杨敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Syrius Technology Shenzhen Co Ltd
Original Assignee
Syrius Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Syrius Technology Shenzhen Co Ltd filed Critical Syrius Technology Shenzhen Co Ltd
Priority to CN202010318882.1A priority Critical patent/CN111212097A/en
Publication of CN111212097A publication Critical patent/CN111212097A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Manipulator (AREA)

Abstract

The invention discloses a method, equipment and a storage medium for a robot to access a server.A data request module is used for packaging request information, and the packaged request information is sent to a cloud service module in the robot through an IPC communication interface according to a user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol; the purpose of isolating the module of the robot accessing the server from the specific product form of the robot is achieved, and maintenance cost is reduced.

Description

Method, device and storage medium for robot to access server
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, and a storage medium for a robot to access a server.
Background
The robot system is composed of a plurality of basic functional modules, wherein the capability of accessing the cloud server is an important capability of the robot. Currently, there are numerous robot types on the market, just depending on whether the function of accessing the cloud server is available, such as: some robots do not need to be networked, some robots are networked through tablet computers connected with the robots, and some robots directly access the network through a Linux system operated by the robots. Therefore, in the research and development design stage of the robot, it is necessary to consider whether the current robot needs to add the capability of accessing the cloud server and whether the robot needs to increase the requirement of accessing the cloud server later according to the form and specific application scenario of the robot product, and what way the robot accesses the network when the robot needs to have the function of accessing the cloud server. Aiming at the situation, in the actual development process of the robot, a plurality of branches are formed to solve the difference caused by multiple versions, and the maintenance cost of the robot is improved.
Disclosure of Invention
The invention provides a method, equipment and a storage medium for a robot to access a server, which are used for isolating a module of the robot to access the server from the specific product form of the robot and reducing the maintenance cost.
In a first aspect, the present invention provides a method for a robot to access a server, the method for the robot to access the server comprising:
a data request module in the robot encapsulates the request information, and sends the encapsulated request information to a cloud service module in the robot through an Inter-Process Communication (IPC) Communication interface according to a user-defined Communication protocol;
the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server;
the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol;
the cloud service module has portability and is independent of the data request module and other functional modules in the robot, and the cloud service module is only responsible for communication data interaction between the robot and the cloud server.
In a second aspect, the present invention provides an apparatus for a robot to access a server, the apparatus comprising: the robot comprises a data request module and a cloud service module, wherein the cloud service module has portability and is independent of the data request module and other functional modules in the robot, and the cloud service module is only responsible for communication data interaction between the robot and a cloud server; wherein:
the data request module is configured to: packaging the request information, and sending the packaged request information to the cloud service module through an IPC communication interface according to a user-defined communication protocol;
the cloud service module is used for:
receiving and analyzing the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sending the obtained request information of the standard communication protocol to a server; receiving response information returned by the server according to the request information of the standard communication protocol, and sending the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol;
or:
the cloud service module is used for: when a communication connection is established with a server based on a user-defined MQTT (Message queue Telemetry Transport protocol) communication protocol, request information corresponding to the user-defined MQTT communication protocol is sent to the server, and the server sends the acquired task information of the user-defined MQTT communication protocol to the cloud service module, so that the robot can analyze the task information and execute related operations by using the user-defined MQTT communication protocol.
In a third aspect, the present invention provides an electronic device, which includes a memory and a processor, wherein the memory stores a server access program operable on the processor, and the server access program is executed by the processor to perform the method for accessing the server by the robot.
In a fourth aspect, the present invention provides a computer storage medium having stored thereon a server access program executable by one or more processors to perform the steps of the method for a robot to access a server.
The invention relates to a method, equipment and a storage medium for a robot to access a server.A data request module encapsulates request information, and the encapsulated request information is sent to a cloud service module in the robot through an IPC communication interface according to a user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol; the method and the device achieve the purpose of isolating the module of the robot accessing the server from the specific product form of the robot, reduce the maintenance cost and improve the expandability of the robot.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart illustrating an embodiment of a method for a robot to access a server according to the present invention.
Fig. 2 is a schematic diagram of a specific application scenario of a communication mode between a robot and a server in the method for accessing the server by the robot according to the present invention.
Fig. 3 is a signal flow diagram of an embodiment between robot internal modules and between a robot and a server in the method for accessing the server by the robot according to the invention.
Fig. 4 is a functional module schematic diagram of an embodiment of the device for accessing the server by the robot.
Fig. 5 is a schematic internal structure diagram of an embodiment of the electronic device of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
The invention provides a method, equipment and a storage medium for a robot to access a server, which are used for isolating a module of the robot to access the server from the specific product form of the robot, improving the expandability of the robot and reducing the maintenance cost. In the embodiment of the invention, the described robot at least comprises one data request module, and when the robot needs to be in communication connection with a server, a corresponding cloud service module can be deployed. In practical applications, except for the situation that the robot actively requests the cloud server, the robot needs to have a service center for acquiring tasks and/or instructions from the cloud server, and can assign the tasks and/or instructions to corresponding function modules in the robot for processing and return processing results to the cloud server. In the embodiment of the invention, the cloud service module is isolated from the specific product form corresponding to the robot, can be installed and operated on any platform at any time as a single basic module, and accords with a single responsibility mode from the design point of view, so that other functional modules can be more concentrated on the service capability of the self module, and the interaction with the cloud server is uniformly handed to the cloud service module for access and processing. Therefore, the cloud service module can be quickly, conveniently and safely reused for all types of robots of the same organization or the same company, so that the maintenance cost is reduced.
In one embodiment, the cloud service module merely provides the basic capability of the unified access server externally without any business logic, and the cloud service module may be an application program or APP running on a tablet, or a service or a process running on the robot software system, for example, the cloud service module may be a service running on a Linux operating system. In addition, as a centralized cloud service module in the robot is connected with the server, the whole robot can be uniformly scheduled, and compared with the traditional development mode that all related modules are independently communicated with the server, the centralized module can better judge the whole condition of the robot relatively integrally; and because the communication protocol between the internal module of the robot and the cloud service module is customized, the cloud service module is implemented in any way, the robot is not sensible and is IPC communication, when the cloud service module is updated or upgraded by modification, the cloud service module only needs to be modified, and other modules do not need to be processed, so that the maintenance cost of the robot is further reduced.
As shown in fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for a robot to access a server according to the present invention; in the embodiment illustrated in fig. 1, the method of the robot accessing the server of the present invention includes steps S10-S30:
and S10, encapsulating the request information by the data request module in the robot, and sending the encapsulated request information to the cloud service module in the robot through the IPC communication interface according to the user-defined communication protocol.
In the embodiment of the invention, when the data request module in the robot needs to communicate with the server, the data request module can be implemented through the cloud service module deployed on the robot.
In order to enable any service module inside the robot to request the cloud server through the unified Protocol, a common HTTP (HyperText Transfer Protocol) request Protocol needs to be encapsulated by one layer, so that the IPC communication can be performed through the unified Protocol no matter what system the access cloud service module runs on.
In the embodiment of the invention, any service module needing to access the server in the robot is defined as the data request module, the data request module encapsulates the request information and sends the encapsulated request information to the cloud service module through the IPC communication interface, so that the communication connection with the server is realized based on the cloud service module. In addition, for the robot system, the cloud service module can also be understood as: the cloud service module is a centralized module, the cloud service module and other functional modules in the robot system are in communication connection and data interaction through a user-defined communication protocol similar to JSON, and the cloud service module can run on any platform.
And step S20, the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server.
And step S30, the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol.
When the cloud service module receives the request information encapsulated by the data request module through the IPC communication interface, the encapsulated request information is firstly analyzed to obtain the request information corresponding to the uniform standard communication protocol, and the request information of the standard communication protocol is sent to the server. The server receives request information sent by the cloud service module of the robot, and returns corresponding response information to the cloud service module of the robot according to the request information. And the cloud service module of the robot receives response information returned by the server and sends the response information to the corresponding data request module through the IPC communication interface according to the self-defined communication protocol.
In addition, the cloud service module in the robot can also establish a communication connection with the server through MQTT, such as MQTT-based communication and customized communication protocol content, so as to receive tasks and/or instructions from the server based on the customized MQTT communication protocol, and assign the tasks and/or instructions sent by the server to the relevant modules of the robot for processing. And when communication connection is established with a server based on the user-defined MQTT communication protocol, the cloud service module sends request information corresponding to the user-defined MQTT communication protocol to the server. And when receiving the request information sent by the cloud service module based on the user-defined MQTT communication protocol, the server sends the acquired task information of the user-defined MQTT communication protocol to the cloud service module. The cloud service module receives task information sent by the server, and the robot analyzes the task information by using the user-defined MQTT communication protocol and executes related operations of task information mapping. Meanwhile, inside the robot, data communication can be carried out between each data request module and the cloud service module according to a customized communication protocol, and the data security is improved by the mode of carrying out communication by using the customized communication protocol. For a robot system, the internal communication safety is very important, and as the communication protocols of all functional modules such as a data request module and a cloud service module are customized, the threshold is increased by cracking the specific customized protocol; and each module can also use an encryption algorithm in the communication transmission process based on the IPC communication interface, thereby further ensuring the information security of the robot.
The cloud service module described in the embodiment of the invention can be understood as a function module abstracted according to functions, the cloud service module can be a service or a process running on any carrier, the cloud service module realizes a standard HTTP network protocol, provides a set of standard IPC communication interfaces for the outside, and can provide a set of customized standard protocols so that the request type and the request parameters can be packaged in a protocol with a preset format, thereby performing cross-process communication and analysis. In addition, the cloud service module has portability and is independent of the data request module and other functional modules in the robot, and the cloud service module is only responsible for data communication interaction between the robot and the cloud server
In a specific application scenario, the cloud service module can be assembled and disassembled at will based on the requirements of the robot, so that different robots do not need to be provided with the cloud service module if the networking capability is not required; if the networking capability is required, the cloud service module of the robot can perform access analysis according to a custom standard protocol; meanwhile, the cloud service module communicating through the IPC can be operated on the tablet computer as an APP and can also be operated as a process (such as a Linux process), so that all other service modules configured by the robot do not need to concern the carrier of the cloud service module, and only a standard passing protocol needs to be realized.
In a specific application scenario, as shown in fig. 2, fig. 2 is a schematic diagram of a specific application scenario of a communication manner between a robot and a server in the method for accessing the server by the robot according to the present invention; it is assumed that in the application scenario shown in fig. 2, the robot includes three data request modules, i.e., a module a, a module B, and a module C, the three data request modules are respectively connected to the cloud service module through IPC communication interfaces in a communication manner, and the cloud service module is connected to the server in a communication manner. For example, module a, module B, and module C represent components that want to request a cloud server, and the cloud service module represents a basic service and is used to connect the cloud server with other requesting modules, i.e., module a, module B, and module C.
In one embodiment, as shown in fig. 2, the data request module a encapsulates the data request information including the data request type, the request parameter information and the server address into JSON-format data, and sends the JSON-format data to the cloud service module through the IPC communication interface. Meanwhile, the data request module A encapsulates the module name and the routing point information corresponding to the data request module A, so that the cloud service module can quickly and conveniently find the corresponding data request module A according to the encapsulated module name and the routing point information. For example, a route name and an endPoint attribute value can be added to the encapsulation protocol, and the two attribute values respectively represent a corresponding routing module and a corresponding routing point, so that the cloud service module can quickly find the corresponding data request module; the processing mode has particularly remarkable beneficial effect on the robot comprising a plurality of functional modules.
For example, in a specific application scenario, the data request module a encapsulates the request information as follows:
{
"type":"post",
"url":"https://xxx.com/api/",
"payload":{
"paramA":"xxxx"
}
}
wherein: type represents a request type; url denotes the server address of the request; payload represents the requested parameter information.
The cloud service module receives request information in a JSON format sent by the data request module through the IPC communication interface; analyzing the request information in the JSON format to obtain the request information of a standard HTTP communication protocol; and sending the acquired request information of the standard HTTP communication protocol to a server for the server to return corresponding response information according to the request information of the standard HTTP communication protocol.
As shown in fig. 3, fig. 3 is a signal flow diagram of an embodiment between robot internal modules and between a robot and a server in the method for accessing a server by a robot according to the present invention; based on the application scenario described in fig. 2, in fig. 3, a data request module, that is, the module a in fig. 3, encapsulates a request protocol and sends encapsulated request information to a cloud service module through an IPC communication interface, the cloud service module receives the communication protocol encapsulated by the module a, parses the request protocol, requests a server according to a standard HTTP communication protocol with the parsed request protocol, the server returns response information according to a request sent by the cloud module and sends return data corresponding to the response information to the cloud service module, and the cloud service module sends the return data to the module a through the IPC communication interface.
Further, in one embodiment, the cloud service module provides a request list document and shares the request list document with the data request module; the request list document comprises a request number and a request document which is in one-to-one correspondence with the request number, and the request document stores data request information comprising a data request type, request parameter information and a server address.
Based on the request list document, the data request module sends a request number to the cloud service module; the cloud service module receives the request number, searches the request list document, acquires the request document corresponding to the request number, obtains the request information contained in the request document, and sends the request information to a server.
That is to say, when the data request module and the cloud service module in the robot perform IPC communication, request information such as a request address and a request parameter does not need to be sent, and the cloud service module can provide a request list document to the outside, and the data request module as a caller only needs to tell the cloud service module which request to execute.
Further, in one embodiment, the data request module inside the robot is further provided with a data encryption function. For example, if the data request information sent by the data request module relates to sensitive information, there may be a risk of data leakage, and therefore, when data is encapsulated, the data request module identifies the security level of the request information; if the security level of the request information reaches a preset security level, the data request module not only needs to package the request information, but also needs to encrypt the request information; and sending the encrypted and packaged request information to the cloud service module through an IPC communication interface, so that the cloud server can perform data communication with the server based on the request information. When the request information is encrypted, the data request module may be encrypted before encapsulation or encrypted after encapsulation, and the encryption mode may be selected according to the sensitivity and security level of the data or a specific application scenario or other modes.
Further, in one embodiment, the cloud service module further has a data caching function. Before the cloud service module sends the obtained request information of the standard communication protocol to a server, the cloud service module identifies the real-time property of response information corresponding to the request information; if the real-time performance of the response information corresponding to the request information meets a preset caching condition, caching the response information corresponding to the current request information; and within the preset caching duration, if the cloud service module receives the same request information, directly returning the cached response information corresponding to the request information. For example, under the condition that the requirement on the real-time performance of data is not high for an IPC communication interface and the requirement on the real-time performance of response information corresponding to some request information is not high, the cloud service module may also internally cache the response information corresponding to the request information. Within the preset caching duration, if the request information is received again, the cloud service module directly returns the response information corresponding to the cached request information, so that the cached response information is directly returned by the cloud service module without passing through the server, and the pressure of the server is relieved to a certain extent. In an embodiment of the present invention, when the cloud service module identifies the request information, the request information may be the request information in the JSON format after being packaged, or the request information in the standard communication protocol after being analyzed by the cloud server module; the embodiment of the present invention does not limit the specific format of the request information.
Further, in an embodiment, the cloud service module receives request information sent by the plurality of data request modules through the IPC communication interface at the same time, analyzes the received request information, and obtains request information corresponding to the analyzed standard communication protocol; identifying whether sharable request information exists or not based on the request information corresponding to the standard communication protocol obtained after analysis; if sharable request information exists, the cloud service module sorts and aggregates the request information and then sends the request information to a server; in this way, server stress is saved. And if the sharable request information does not exist, the cloud service module sends all the request information to the server according to the current communication capacity of the robot. For example, under the condition that the current communication quality is better, all request information is directly sent to the server together; when the current communication quality is not enough to bear the communication requests corresponding to all the request information, the cloud service module sequences the request information corresponding to the IPC communication interfaces according to the timeliness corresponding to the IPC communication interfaces and the real-time requirement, and sequentially sends the request information to the server according to the sequence, so that the smooth interaction of data between the cloud service module of the robot and the server is realized under the condition that communication is not interrupted and the server is not subjected to overlarge communication pressure.
The method for the robot to access the server comprises the steps that request information is packaged through a data request module in the robot, and the packaged request information is sent to a cloud service module in the robot through an IPC (Internet control protocol) communication interface according to a user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol; the method and the device achieve the purpose of isolating the module of the robot accessing the server from the specific product form of the robot, reduce the maintenance cost and improve the expandability of the robot.
Corresponding to the method for accessing the cloud server by the robot described in the above embodiment, the embodiment of the present invention further provides a device for accessing the server by the robot; the means for the robot to access the server functionally comprises: the robot comprises a data request module 100 and a cloud service module 200, wherein the cloud service module 200 has portability and is independent from the data request module 100 and other functional modules in the robot, and the cloud service module 200 is only responsible for communication data interaction between the robot and a cloud server.
Wherein the data request module 100 is configured to: and packaging the request information, and sending the packaged request information to the cloud service module through an IPC communication interface according to a user-defined communication protocol.
The cloud service module 200 is configured to: receiving and analyzing the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sending the obtained request information of the standard communication protocol to a server based on a preset telemetering transmission technology; receiving response information returned by the server according to the request information of the standard communication protocol, and sending the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol;
or:
the cloud service module 200 is configured to: when communication connection is established between the robot and the server based on the user-defined MQTT communication protocol, request information corresponding to the user-defined MQTT communication protocol is sent to the server, the server sends the acquired task information of the user-defined MQTT communication protocol to the cloud service module, and therefore the robot can analyze the task information and execute related operations by using the user-defined MQTT communication protocol.
The specific implementation of the device for accessing the server by the robot of the present invention is basically the same as the implementation principle of each embodiment of the method for accessing the server by the robot, and will not be described in detail herein.
The device for the robot to access the server encapsulates the request information through the data request module in the robot, and sends the encapsulated request information to the cloud service module in the robot through the IPC communication interface according to the user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol; the method and the device achieve the purpose of isolating the module of the robot accessing the server from the specific product form of the robot, reduce the maintenance cost and improve the expandability of the robot.
The invention also provides an electronic device which can access the server according to the method for accessing the server by the robot shown in fig. 1. Fig. 5 is a schematic diagram of the internal structure of an embodiment of the electronic device of the present invention, as shown in fig. 5.
In the present embodiment, the electronic device 1 may be a PC (Personal Computer), or may be a terminal device such as a smartphone, a tablet Computer, or a mobile Computer. The electronic device 1 comprises at least a memory 11, a processor 12, a communication bus 13, and a network interface 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, for example a hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in hard disk provided on the electronic device 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the server access program 01, which is a program for the robot to access the server, but also to temporarily store data that has been output or is to be output.
Processor 12, which in some embodiments may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip, executes program code or processes data stored in memory 11, such as executing server access program 01.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
Fig. 5 only shows the electronic device 1 with the components 11-14 and the server access program 01, and it will be understood by those skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
Based on the descriptions of the embodiments of fig. 1, fig. 2, fig. 3, and fig. 4, in the embodiment of the electronic device 1 shown in fig. 5, the memory 11 stores a server access program 01; the server access program 01 stored in the memory 11 is executable on the processor 12, and when the server access program 01 is executed by the processor 12, the following steps are implemented:
the data request module in the robot encapsulates the request information, and the encapsulated request information is sent to the cloud service module in the robot through the IPC communication interface according to the user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; and the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol.
The cloud service module has portability and is independent of the data request module and other functional modules in the robot, and the cloud service module is only responsible for communication data interaction between the robot and the cloud server.
The specific implementation of the electronic device of the present invention is substantially the same as the implementation principle of the embodiments of the robot access server method, and will not be described herein again.
The electronic equipment encapsulates the request information through the data request module, and sends the encapsulated request information to the cloud service module in the robot through the IPC communication interface according to the user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface according to a user-defined communication protocol; the method and the device achieve the purpose of isolating the module of the robot accessing the server from the specific product form of the robot, reduce the maintenance cost and improve the expandability of the robot.
Furthermore, an embodiment of the present invention further provides a computer storage medium, where a server access program is stored on the computer storage medium, and the server access program may be executed by one or more processors to implement the following operations:
the data request module in the robot encapsulates the request information, and the encapsulated request information is sent to the cloud service module in the robot through the IPC communication interface according to the user-defined communication protocol; the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server; and the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol.
The detailed implementation of the computer-readable storage medium of the present invention is substantially the same as the implementation principle of the embodiments corresponding to the method for accessing a server by a robot, the apparatus for accessing a server by a robot, and the electronic device, and will not be described herein in detail.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for a robot to access a server, the method for the robot to access the server comprising:
the data request module in the robot encapsulates the request information, and the encapsulated request information is sent to the cloud service module in the robot through the IPC communication interface according to the user-defined communication protocol;
the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to a server;
the cloud service module receives response information returned by the server according to the request information of the standard communication protocol, and sends the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol;
the cloud service module has portability and is independent of the data request module and other functional modules in the robot, and the cloud service module is only responsible for communication data interaction between the robot and the cloud server.
2. The method for a robot to access a server according to claim 1, wherein a data request module inside the robot encapsulates request information, comprising:
the data request module encapsulates data request information comprising a data request type, request parameter information and a server address into data in a JSON format;
meanwhile, the data request module encapsulates the module name and the routing point information corresponding to the data request module and the request information together, so that the cloud service module can quickly find the corresponding data request module based on the encapsulated module name and routing point information.
3. The method for the robot to access the server as claimed in claim 2, wherein the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain the request information corresponding to the standard communication protocol, and sends the obtained request information of the standard communication protocol to the server, comprising:
the cloud service module receives request information in a JSON format sent by the data request module through the IPC communication interface;
analyzing the request information in the JSON format to obtain the request information of a standard HTTP communication protocol;
sending the acquired request information of the standard HTTP communication protocol to a server for the server to return corresponding response information according to the request information of the standard HTTP communication protocol;
or:
when the cloud service module establishes communication connection with a server based on a user-defined MQTT communication protocol, the cloud service module sends request information corresponding to the user-defined MQTT communication protocol to the server, and the server sends acquired task information of the user-defined MQTT communication protocol to the cloud service module, so that the robot can analyze the task information and execute related operations by using the user-defined MQTT communication protocol.
4. The method of robot access to a server of claim 1, wherein the method of robot access to a server further comprises:
the cloud service module provides a request list document and shares the request list document with the data request module; the request list document comprises a request number and a request document which is in one-to-one correspondence with the request number, and the request document stores data request information comprising a data request type, request parameter information and a server address;
based on the request list document, the data request module sends a request number to the cloud service module;
the cloud service module receives the request number, searches the request list document, acquires the request document corresponding to the request number, obtains the request information contained in the request document, and sends the request information to a server.
5. The method for robot to access server as claimed in claim 1, wherein the cloud service module sends the obtained request information of the standard communication protocol to the server, and before further comprising:
the cloud service module identifies the real-time performance of response information corresponding to the request information sent by the data request module;
if the real-time performance of the response information corresponding to the request information meets a preset caching condition, caching the response information corresponding to the current request information; and within the preset caching duration, if the cloud service module receives the same request information, directly returning the cached response information corresponding to the request information.
6. The method for the robot to access the server as claimed in claim 1, wherein the data request module inside the robot encapsulates the request information, and the encapsulated request information is sent to the cloud service module inside the robot through the IPC communication interface according to the custom communication protocol, comprising:
the data request module identifies a security level of the requested information;
if the security level of the request information reaches a preset security level, the data request module not only encapsulates the request information, but also encrypts the request information;
and sending the encrypted and packaged request information to the cloud service module through an IPC (International Industrial communication) interface by using a custom communication protocol for communication between internal data modules of the robot, so that the cloud server can perform data communication with the server based on the request information.
7. The method for the robot to access the server according to any one of claims 1 to 6, wherein the cloud service module receives and analyzes the encapsulated request information through the IPC communication interface to obtain the request information corresponding to the analyzed standard communication protocol, and sends the obtained request information of the standard communication protocol to the server, and the method includes:
the cloud service module receives request information respectively sent by a plurality of data request modules through the IPC communication interface, analyzes the received request information and respectively obtains request information corresponding to the analyzed standard communication protocol;
identifying whether sharable request information exists or not based on the request information corresponding to the standard communication protocol obtained after analysis;
if sharable request information exists, the cloud service module sorts and aggregates the request information and then sends the request information to a server;
and if the sharable request information does not exist, the cloud service module sends all the request information to the server according to the current communication capacity of the robot.
8. An apparatus for a robot to access a server, the apparatus comprising: the robot comprises a data request module and a cloud service module, wherein the cloud service module has portability and is independent of the data request module and other functional modules in the robot, and the cloud service module is only responsible for communication data interaction between the robot and a cloud server; wherein:
the data request module is configured to: packaging the request information, and sending the packaged request information to the cloud service module through an IPC communication interface according to a user-defined communication protocol;
the cloud service module is used for:
receiving and analyzing the encapsulated request information through the IPC communication interface to obtain request information corresponding to the analyzed standard communication protocol, and sending the obtained request information of the standard communication protocol to a server; receiving response information returned by the server according to the request information of the standard communication protocol, and sending the response information to the data request module through an IPC communication interface and according to the user-defined communication protocol;
or:
the cloud service module is used for: when communication connection is established between the robot and the server based on the user-defined MQTT communication protocol, request information corresponding to the user-defined MQTT communication protocol is sent to the server, the server sends the acquired task information of the user-defined MQTT communication protocol to the cloud service module, and therefore the robot can analyze the task information and execute related operations by using the user-defined MQTT communication protocol.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a server access program executable on the processor, the server access program when executed by the processor performing the method of robot accessing a server according to any of claims 1 to 7.
10. A computer storage medium having stored thereon a server access program executable by one or more processors to perform the steps of a method of robot access to a server according to any of claims 1 to 7.
CN202010318882.1A 2020-04-21 2020-04-21 Method, device and storage medium for robot to access server Withdrawn CN111212097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010318882.1A CN111212097A (en) 2020-04-21 2020-04-21 Method, device and storage medium for robot to access server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010318882.1A CN111212097A (en) 2020-04-21 2020-04-21 Method, device and storage medium for robot to access server

Publications (1)

Publication Number Publication Date
CN111212097A true CN111212097A (en) 2020-05-29

Family

ID=70788949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010318882.1A Withdrawn CN111212097A (en) 2020-04-21 2020-04-21 Method, device and storage medium for robot to access server

Country Status (1)

Country Link
CN (1) CN111212097A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535627A (en) * 2021-07-30 2021-10-22 张恒 Method and device for realizing integration of multiple protocols
CN115883678A (en) * 2023-03-08 2023-03-31 国网瑞嘉(天津)智能机器人有限公司 Data processing system, method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291437A (en) * 2011-07-27 2011-12-21 武汉天喻信息产业股份有限公司 System and method for realizing application of cross-platform internet
CN106060058A (en) * 2016-06-16 2016-10-26 华南理工大学 Internet-based industrial robot remote control method
CN106686092A (en) * 2016-12-30 2017-05-17 深圳先进技术研究院 Communication method and system of robots
CN109413154A (en) * 2018-09-26 2019-03-01 平安普惠企业管理有限公司 Conversion method of data format, device, computer equipment and storage medium
CN109525661A (en) * 2018-11-14 2019-03-26 北京奇艺世纪科技有限公司 Data transmission method and device
CN110733038A (en) * 2019-09-30 2020-01-31 浙江工业大学 Industrial robot remote monitoring and data processing system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291437A (en) * 2011-07-27 2011-12-21 武汉天喻信息产业股份有限公司 System and method for realizing application of cross-platform internet
CN106060058A (en) * 2016-06-16 2016-10-26 华南理工大学 Internet-based industrial robot remote control method
CN106686092A (en) * 2016-12-30 2017-05-17 深圳先进技术研究院 Communication method and system of robots
CN109413154A (en) * 2018-09-26 2019-03-01 平安普惠企业管理有限公司 Conversion method of data format, device, computer equipment and storage medium
CN109525661A (en) * 2018-11-14 2019-03-26 北京奇艺世纪科技有限公司 Data transmission method and device
CN110733038A (en) * 2019-09-30 2020-01-31 浙江工业大学 Industrial robot remote monitoring and data processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535627A (en) * 2021-07-30 2021-10-22 张恒 Method and device for realizing integration of multiple protocols
CN115883678A (en) * 2023-03-08 2023-03-31 国网瑞嘉(天津)智能机器人有限公司 Data processing system, method, device, equipment and medium

Similar Documents

Publication Publication Date Title
EP3764220B1 (en) Automatic application updates
US10222926B2 (en) Systems and methods for providing user interfaces for management applications
WO2021259013A1 (en) Data processing method and apparatus, electronic device, and computer-readable medium
JP6766895B2 (en) How to communicate securely and industrial computing equipment
CN111045833B (en) Interface calling method and device
CN109815107B (en) Method and device for automatic testing
US20190173960A1 (en) Method, device and computer program product for protocol selection
CN110830374B (en) Method and device for gray level release based on SDK
CN103747004A (en) Realizing method of internet of things communication protocol
CN111212097A (en) Method, device and storage medium for robot to access server
Kim et al. Developing an On‐Demand Cloud‐Based Sensing‐as‐a‐Service System for Internet of Things
US12026218B2 (en) Technologies for cross-device shared web resource cache
CN113595927A (en) Method and device for processing mirror flow in bypass mode
CN112965739A (en) Front-end HTTP request processing method, device and system
CN115374207A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN112491792B (en) Data secure transmission method, device, equipment and readable storage medium
CN114237765A (en) Functional component processing method and device, electronic equipment and medium
CN114564280A (en) Method and system for realizing software package by dynamically loading interface during running
CN113595795A (en) Network communication method, device, system, equipment and medium
CN113722115A (en) Method, device, equipment and computer readable medium for calling interface
CN112559001A (en) Method and device for updating application
CN112162868B (en) Data communication method, device and storage medium applied to cluster processing
CN111783044B (en) Method and device for sharing login state
CN117348946A (en) Management method and device for micro front terminal application
CN116032966A (en) Rapid construction system and method for communication network of Internet of things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200529