CN110647482A - Upper and lower computer communication system and method based on mobile robot - Google Patents
Upper and lower computer communication system and method based on mobile robot Download PDFInfo
- Publication number
- CN110647482A CN110647482A CN201910885303.9A CN201910885303A CN110647482A CN 110647482 A CN110647482 A CN 110647482A CN 201910885303 A CN201910885303 A CN 201910885303A CN 110647482 A CN110647482 A CN 110647482A
- Authority
- CN
- China
- Prior art keywords
- module
- tcp
- data
- unpacking
- mobile robot
- 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.)
- Pending
Links
- 238000004891 communication Methods 0.000 title claims abstract description 27
- 238000000034 method Methods 0.000 title claims abstract description 12
- 230000005540 biological transmission Effects 0.000 claims abstract description 40
- 238000007405 data analysis Methods 0.000 claims abstract description 22
- 238000004806 packaging method and process Methods 0.000 claims abstract description 18
- 238000012545 processing Methods 0.000 claims description 7
- 230000002708 enhancing effect Effects 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 6
- 238000005538 encapsulation Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/387—Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/169—Special adaptations of TCP, UDP or IP for interworking of IP based networks with other networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Manipulator (AREA)
- Communication Control (AREA)
Abstract
The invention relates to a mobile robot-based upper and lower computer communication system which is characterized by comprising a TCP (transmission control protocol) packaging module, a TCP unpacking module and a data analysis module, wherein the TCP packaging module, the TCP unpacking module and the data analysis module are arranged on an upper computer and a lower computer, and the upper and lower computer communication system also comprises a TCP data transmission module and a multithreading module. The invention further provides a communication method of the upper computer and the lower computer based on the mobile robot. The invention strips the communication function of the upper computer and the lower computer, and provides the communication function for the upper computer and the lower computer respectively in an interface mode, the upper computer and the lower computer can process respective logic with concentration without paying attention to specific transmission logic, thereby enhancing the expandability, and the data transmission can be carried out more quickly by utilizing a protobuf transmission protocol.
Description
Technical Field
The invention relates to a communication system and a communication method of an upper computer and a lower computer based on a mobile robot, and belongs to the technical field of network communication.
Background
With the development and growth of computer networks, data transmission becomes an indispensable function, people are developing a faster and more secure data transmission mode, traditional upper and lower computer communication is a very popular work for robots, and more researches show that a more perfect upper and lower computer communication system is urgently needed for data transmission. The traditional upper and lower computer communication has the defects of poor expandability, difficult debugging and difficult system maintenance.
Disclosure of Invention
The purpose of the invention is: the communication function of the upper computer and the lower computer is separated, the expandability is enhanced, and faster data transmission is realized.
In order to achieve the above object, the present invention provides a mobile robot-based upper and lower computer communication system, which is characterized by comprising a TCP encapsulation module, a TCP unpacking module, a data analysis module, a TCP data transmission module and a multithreading module, wherein the TCP encapsulation module, the TCP unpacking module, the data analysis module, the TCP data transmission module and the multithreading module are arranged in each of the upper computer and the lower computer, and wherein:
the data analysis module is used for: serializing data to be transmitted into a binary byte array in a Protocol network Protocol form and then transmitting the binary byte array to a TCP (transmission control Protocol) packaging module; performing deserialization processing on binary byte stream data output by the TCP unpacking module in a Protocol network Protocol form;
the TCP packaging module is used for packaging the binary byte groups received from the data analysis module and then sending the packaged binary byte groups to the TCP data transmission module;
the TCP data transmission module is used for sending data generated by a TCP packet module of the upper computer or data generated by a TCP packet module of the lower computer to a TCP unpacking module of the lower computer or a TCP unpacking module of the upper computer, the function of receiving data in the TCP data transmission module is realized in the multithreading module, and the multithreading module is used for realizing asynchronous data receiving;
the TCP unpacking module is used for unpacking the data received from the TCP data transmission module into binary byte stream data.
The invention also provides a communication method of the upper computer and the lower computer based on the mobile robot, which is characterized in that the communication system of the upper computer and the lower computer is adopted, and the method comprises the following steps:
step 1, a client initiates a data request for a mobile robot;
step 2, using a data analysis module to convert the data to be transmitted into binary byte stream in a serialized mode;
step 3, packaging the binary byte stream by using a TCP packaging module, and checking the correctness of the data;
step 4, the TCP data transmission module sends the data packet output by the TCP packet module to a TCP unpacking module at the mobile robot end;
step 5, a TCP unpacking module of the mobile robot end unpacks the data received from the TCP data transmission module into binary byte stream data;
and 6, the data analysis module at the mobile robot end carries out deserialization processing on the binary byte stream data output by the TCP unpacking module and replies specified data, and the processing is carried out repeatedly.
The invention strips the communication function of the upper computer and the lower computer, and provides the communication function for the upper computer and the lower computer respectively in an interface mode, the upper computer and the lower computer can process respective logic with concentration without paying attention to specific transmission logic, thereby enhancing the expandability, and the data transmission can be carried out more quickly by utilizing a protobuf transmission protocol.
Drawings
FIG. 1 is a data flow chart of an upper computer and a lower computer communication system based on a mobile robot according to the invention;
fig. 2 is a schematic flow chart of an embodiment of a mobile robot-based upper and lower computer communication system according to the present invention.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
As shown in fig. 1, the present invention provides a mobile robot-based upper and lower computer communication system, which is characterized by comprising a TCP packet module, a TCP unpacking module, and a data analysis module, wherein the TCP packet module, the TCP unpacking module, and the data analysis module are arranged in both the upper computer and the lower computer. The invention also comprises a TCP data transmission module and a multithreading module.
The data analysis module is used for: serializing data to be transmitted into a binary byte array in a Protocol network Protocol form and then transmitting the binary byte array to a TCP (transmission control Protocol) packaging module; and performing deserialization processing on binary byte stream data output by the TCP unpacking module in a Protocol network Protocol form.
The TCP packaging module is used for packaging the binary byte groups received from the data analysis module and then sending the packaged binary byte groups to the TCP data transmission module;
the TCP data transmission module is used for sending data generated by a TCP packet module of the upper computer or data generated by a TCP packet module of the lower computer to a TCP unpacking module of the lower computer or a TCP unpacking module of the upper computer, the function of receiving data in the TCP data transmission module is realized in the multithreading module, and the multithreading module is used for realizing asynchronous data receiving;
the TCP unpacking module is used for unpacking the data received from the TCP data transmission module into binary byte stream data.
The data analysis module carries out serialization and deserialization on data to be transmitted in a Protocol network Protocol mode, transmits the serialized data to the TCP packet module for data packet and carries out data transmission through the TCP data transmission module. The data analysis module utilizes the Protocol network Protocol to deserialize data, and sends the deserialized data to the TCP data unpacking module for unpacking and transmitting the data to the upper computer for displaying. The TCP packaging module converts data to be transmitted into binary stream and stores the binary stream into a byte array, the data unpacking module divides the data into a plurality of lengths for receiving, a network communication bridge is established, and the data are transmitted through the TCP data transmission module.
Referring to fig. 2, the present invention further provides a communication method for upper and lower computers based on a mobile robot, including the following steps:
(1) the client initiates a data request for the mobile robot, the request requires that the client and the mobile robot have fixed IP addresses and port numbers, and different port numbers are required for different large-class requests, so as to be convenient for classification and search;
(2) the data to be transmitted is serialized and converted into a binary byte stream by using a data analysis module, and a serialization method packaged by Protocol is used so as to facilitate the operations of serialization and deserialization on the data;
(3) and packaging the binary byte stream by using a TCP packaging module, and checking the correctness and accuracy of the data.
(4) The data are transmitted to the mobile robot packet by packet through a TCP data transmission module, the size of a character array which can be transmitted at most in each transmission process is specified in a predefined character array interval, in order to avoid the problems of memory leakage and the like, the size of the maximum array interval is required to be specified, and the movement of a pointer is utilized to divide and transmit the data of the whole packet;
(5) and unpacking the data transmitted to the mobile robot by using a TCP data unpacking module to obtain binary byte stream data. Unpacking and packing are completely opposite processes, but the principle is the same, namely, a character array and a pointer are used for dividing and transmitting binary stream data;
(6) the mobile robot analyzes the binary byte stream by using the data analysis module to generate an deserialized file and reply the designated data.
Claims (2)
1. The utility model provides a host computer communication system under based on mobile robot, its characterized in that includes TCP package module, TCP unpack module, data analysis module, and TCP package module, TCP unpack module, data analysis module have all been arranged to host computer and next machine, still include TCP data transmission module and multithread module, wherein:
the data analysis module is used for: serializing data to be transmitted into a binary byte array in a Protocol network Protocol form and then transmitting the binary byte array to a TCP (transmission control Protocol) packaging module; performing deserialization processing on binary byte stream data output by the TCP unpacking module in a Protocol network Protocol form;
the TCP packaging module is used for packaging the binary byte groups received from the data analysis module and then sending the packaged binary byte groups to the TCP data transmission module;
the TCP data transmission module is used for sending data generated by a TCP packet module of the upper computer or data generated by a TCP packet module of the lower computer to a TCP unpacking module of the lower computer or a TCP unpacking module of the upper computer, the function of receiving data in the TCP data transmission module is realized in the multithreading module, and the multithreading module is used for realizing asynchronous data receiving;
the TCP unpacking module is used for unpacking the data received from the TCP data transmission module into binary byte stream data.
2. An upper and lower computer communication method based on a mobile robot, characterized in that the upper and lower computer communication system of claim 1 is adopted, comprising the following steps:
step 1, a client initiates a data request for a mobile robot;
step 2, using a data analysis module to convert the data to be transmitted into binary byte stream in a serialized mode;
step 3, packaging the binary byte stream by using a TCP packaging module, and checking the correctness of the data;
step 4, the TCP data transmission module sends the data packet output by the TCP packet module to a TCP unpacking module at the mobile robot end;
step 5, a TCP unpacking module of the mobile robot end unpacks the data received from the TCP data transmission module into binary byte stream data;
and 6, the data analysis module of the mobile robot end carries out deserialization processing on the binary byte stream data output by the TCP unpacking module and replies specified data, and the processing is carried out repeatedly and accurately.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910885303.9A CN110647482A (en) | 2019-09-19 | 2019-09-19 | Upper and lower computer communication system and method based on mobile robot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910885303.9A CN110647482A (en) | 2019-09-19 | 2019-09-19 | Upper and lower computer communication system and method based on mobile robot |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110647482A true CN110647482A (en) | 2020-01-03 |
Family
ID=69010774
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910885303.9A Pending CN110647482A (en) | 2019-09-19 | 2019-09-19 | Upper and lower computer communication system and method based on mobile robot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110647482A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050228541A1 (en) * | 2004-04-09 | 2005-10-13 | Storage Technology Corporation | Robotic library communication protocol |
CN102957627A (en) * | 2012-11-19 | 2013-03-06 | 浪潮电子信息产业股份有限公司 | Method for improving data transmission efficiency on basis of TCP (Transmission Control Protocol) long connection |
US8990422B1 (en) * | 2011-06-21 | 2015-03-24 | Netlogic Microsystems, Inc. | TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data |
CN105653221A (en) * | 2015-12-21 | 2016-06-08 | 广州视睿电子科技有限公司 | Remote information synchronization method, terminals and system |
CN107172037A (en) * | 2017-05-11 | 2017-09-15 | 华东师范大学 | A kind of real-time subpackage analytic method of multichannel multi-channel high-speed data stream |
CN107966950A (en) * | 2017-10-26 | 2018-04-27 | 东莞智得电子制品有限公司 | Automate PLC and industrial robot communicating control method |
CN109818930A (en) * | 2018-12-27 | 2019-05-28 | 南京信息职业技术学院 | Communication text data transmission method based on TCP protocol |
-
2019
- 2019-09-19 CN CN201910885303.9A patent/CN110647482A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050228541A1 (en) * | 2004-04-09 | 2005-10-13 | Storage Technology Corporation | Robotic library communication protocol |
US8990422B1 (en) * | 2011-06-21 | 2015-03-24 | Netlogic Microsystems, Inc. | TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data |
CN102957627A (en) * | 2012-11-19 | 2013-03-06 | 浪潮电子信息产业股份有限公司 | Method for improving data transmission efficiency on basis of TCP (Transmission Control Protocol) long connection |
CN105653221A (en) * | 2015-12-21 | 2016-06-08 | 广州视睿电子科技有限公司 | Remote information synchronization method, terminals and system |
CN107172037A (en) * | 2017-05-11 | 2017-09-15 | 华东师范大学 | A kind of real-time subpackage analytic method of multichannel multi-channel high-speed data stream |
CN107966950A (en) * | 2017-10-26 | 2018-04-27 | 东莞智得电子制品有限公司 | Automate PLC and industrial robot communicating control method |
CN109818930A (en) * | 2018-12-27 | 2019-05-28 | 南京信息职业技术学院 | Communication text data transmission method based on TCP protocol |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11122151B2 (en) | Multi-protocol gateway for connecting sensor devices to cloud | |
US8346928B2 (en) | Administering an epoch initiated for remote memory access | |
CN112738042A (en) | Internet of things equipment model based on MQTT protocol and data penetration method thereof | |
CN106354568A (en) | Method and device for communication between different processes | |
CN106230826A (en) | Application system interface protocol automatic analyzer | |
CN107689868A (en) | The communication means of client application and trusted application, device and terminal | |
CN110177013A (en) | A kind of EtherCAT master-salve station design and implementation methods based on FPGA | |
CN110519138B (en) | Profibus-DP master station protocol implementation method and system | |
CN109981724A (en) | A kind of internet-of-things terminal based on block chain, artificial intelligence system and processing method | |
CN110769002A (en) | LabVIEW-based message analysis method, system, electronic device and medium | |
US7966618B2 (en) | Controlling data transfers from an origin compute node to a target compute node | |
US11740997B2 (en) | Method and apparatus for debugging a device | |
CN110647482A (en) | Upper and lower computer communication system and method based on mobile robot | |
TW201810037A (en) | Input/output expander chip and verification method therefor | |
WO2016127953A1 (en) | Debugging method specifically for fpga of high-end fault-tolerant computer based on software-hardware architecture, and device thereof | |
Nguyen et al. | Reducing data copies between gpus and nics | |
CN116450554A (en) | Interrupt processing method, root complex device and electronic device | |
CN115903569A (en) | Full-digital comprehensive modular avionics system | |
CN115384526A (en) | Debugging system and debugging method | |
CN115022328A (en) | Server cluster, server cluster testing method and device and electronic equipment | |
Rast et al. | Transport-independent protocols for universal AER communications | |
CN114924843B (en) | Information transmission method and device, computer equipment and storage medium | |
CN117806892B (en) | Memory chip model test method, device, communication equipment and storage medium | |
US11620251B2 (en) | Partitioned UFP for displayport repeater | |
US12008259B1 (en) | Data processing and transmission using hardware serialization and deserialization functions |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200103 |