Disclosure of Invention
An object of an embodiment of the present invention is to provide an information communication method, a robot, and a storage medium, which enable the robot to obtain a transmission state of data information sent through feedback information of a cloud, thereby ensuring communication quality between the robot and the cloud.
In order to solve the above technical problem, an embodiment of the present invention provides an information communication method, including: sending the data information and the transmission state information to a cloud end, wherein the cloud end generates feedback information according to the data information and the transmission state information; receiving feedback information, wherein the feedback information comprises transmission adjustment information or data retransmission information; and executing the operation corresponding to the feedback information.
Embodiments of the present invention also provide a robot including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the information communication method as described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the information communication method as above.
Compared with the prior art, the robot can receive feedback information generated by the cloud according to the data information and the transmission state information after the data information and the transmission state information are sent to the cloud, and the feedback information comprises transmission adjustment information or data retransmission information, so that the robot can know whether the cloud successfully receives the sent data information or not, and can adjust the transmission state of the data information according to the transmission adjustment information, and the communication quality between the robot and the cloud is guaranteed.
In addition, send data message and transmission state information to the high in the clouds, specifically include: transmitting different types of data information to a cloud terminal by adopting the same protocol; and transmitting the transmission state information to the cloud in preset time, wherein the transmission state information is used for indicating the total amount of the data information of different types.
In addition, the feedback information further includes: a motion control command.
In addition, the executing the operation corresponding to the feedback information specifically includes: when the feedback information is determined to be transmission adjustment information, performing transmission adjustment operation according to the transmission adjustment information; when the feedback information is determined to be data retransmission information, performing data retransmission operation according to the data retransmission information; and when the feedback information is determined to be the motion control command, executing motion conversion operation according to the motion control command.
In addition, the executing of the transmission adjustment operation according to the transmission adjustment information specifically includes: acquiring jitter information of the data information according to the transmission adjustment information; and judging whether the jitter information is larger than a preset jitter threshold value, if so, reducing the transmission frequency of the data information, and otherwise, increasing the transmission frequency of the data information. In the implementation, the jitter information of the data information is acquired according to the transmission adjustment information, and the transmission rate of the data information is adaptively adjusted according to the comparison result of the jitter information and the preset jitter threshold, so that the transmission quality of the data information is ensured.
In addition, the data retransmission operation is performed according to the data retransmission information, and specifically includes: acquiring the serial number of the data information which is not received by the cloud according to the data retransmission information; acquiring data information corresponding to the sequence number from the local; and retransmitting the data information corresponding to the sequence number to the cloud. In the implementation, when data retransmission operation is performed according to the data retransmission information, the serial number of the data information lost in the transmission process of the robot can be acquired from the data retransmission information, the data information corresponding to the serial number can be acquired from the local, and the data information corresponding to the serial number is retransmitted to the cloud, so that the accuracy of data retransmission is ensured.
In addition, the executing of the motion conversion operation according to the motion control command specifically includes: identifying the motion control command, and determining a conversion action corresponding to the motion control command; determining a current action; and converting the current action according to the conversion action.
In addition, before identifying the motion control command and determining the conversion action corresponding to the motion control command, the method further comprises the following steps: generating command response information, wherein the command response information is used for indicating that the motion control command is successfully received; and transmitting the command response information to the cloud. In the implementation, when the robot acquires the motion control command sent by the cloud end, the robot can generate command response information and transmit the command response information to the cloud end, so that the cloud end is informed of successfully receiving the sent motion control command, and the communication quality between the robot and the cloud end is further improved.
In addition, the types of data information include: audio data, video data, and sensor data.
In addition, the protocol includes: HMTP protocol.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present invention relates to an information communication method applied to a robot. The specific process is shown in fig. 1, and comprises the following steps:
step 101, sending the data information and the transmission state information to a cloud, wherein the cloud generates feedback information according to the data information and the transmission state information.
Specifically, in this embodiment, different types of data information are transmitted to the cloud terminal by using the same protocol, and the transmission status information is transmitted to the cloud terminal within a preset time, where the transmission status information is used to indicate the total amount of the different types of data information. The types of data information in this embodiment include audio data, video data, and sensor data, and the same protocol used for different types of data information is specifically the HMTP protocol.
Specifically, when the HMTP protocol is used to transmit data information, audio data, video data, and sensor data respectively collected by the robot through the microphone, the camera, and the ultrasonic sensor may be encapsulated according to the HMTP protocol format to obtain a transmission data packet, where the structure of the data packet is shown in table 1.
TABLE 1
Header
|
Extension Header
|
Payload |
The Header is Header information, has a fixed length, and has 26 bytes in total, the Extension Header is an Extension Header for extending the Header information, the Payload is used for storing different types of data information, and the format of the Header information is shown in table 2.
TABLE 2
Number of bits
|
32
|
3
|
1
|
4
|
24
|
8
|
64
|
8
|
32
|
32
|
Identification
|
F
|
V
|
EXT
|
DT
|
PL
|
P
|
TS
|
TSE
|
SEQ
|
SSRC |
Wherein, F is the identifier of the used data packet and is identified by HARI; v is the protocol version number used by the data packet; EXT indicates extension header identification, 0 indicates no extension, and 1 indicates extension; DT is data type, 1 denotes audio data, 2 denotes video data, and 3 denotes sensor data; PL is the packet length, representing the total length of the data packet; p is a capability identifier which represents the function of each data type; TS is time stamp, unit is millisecond; TES is an extended timestamp; SEQ is the sequence number of the missing data; the SSRC is a synchronization source and indicates the port source identifier of the current packet being sent.
Specifically, the transmission status information transmitted to the cloud within the preset time may be specifically represented by an SR packet, and a format of the SR packet is shown in table 3.
TABLE 3
Number of bits
|
32
|
8
|
64
|
32
|
32
|
32
|
32
|
Identification
|
F
|
V
|
TS
|
SSRC
|
SPC
|
SOC
|
SEQ |
Wherein, F is an identifier of a transmission packet used for transmitting the status information, and is represented by "SENR"; v is the protocol version number used for transmitting the state information; TS is time stamp, unit is millisecond; the SSRC is a synchronous source and represents a port source identifier for sending the current SR packet; SPC is a transmission packet count indicating the total number of different types of data information transmitted within a preset time; the SOC is a transmission payload count indicating the total number of bytes of net data (including no header information) transmitted within a predetermined time.
The feedback information in the present embodiment includes transmission adjustment information or data retransmission information, and further includes a motion control command.
Step 102, receiving feedback information.
Specifically, in this embodiment, data information sent by the robot may not be received by the cloud end in a case where there is a possibility of packet loss, and the cloud end generates data retransmission information in a case where it is determined that there is lost data, the data retransmission information may specifically be represented by a NACK packet, and a format of the NACK packet is shown in table 4.
TABLE 4
Number of bits
|
32
|
4
|
4
|
24
|
32
|
32
|
16
|
16
|
Identification
|
F
|
V
|
T
|
L
|
SSRC
|
SSRCS
|
PID
|
BLP |
Wherein, F is an identifier of a transmission packet used for data retransmission information, and is denoted by "NACK"; v is the protocol version number used by the data retransmission information; t is a type identifier; l is the packet length, which represents the total length of the NACK packet; the SSRC is a synchronous source and represents a port source identifier for sending the NACK packet; the SSRCS is a media source identifier and represents an object received by the NACK packet; PID is an initial serial number of data information which is not received by the cloud; the BLP is a mask of data information that is not received by the cloud.
Specifically, in the embodiment, after receiving the transmission state information of the robot, the cloud generates the transmission adjustment information according to the transmission state information and the actually received data information, and the transmission adjustment information in the embodiment may be specifically represented by an RR packet, where a format of the RR packet is shown in table 5.
TABLE 5
Number of bits
|
32
|
8
|
64
|
32
|
32
|
32
|
32
|
32
|
Identification
|
F
|
V
|
TS
|
SSRC
|
SSRCS
|
CPL
|
JT
|
SEQ |
Wherein, F is an identifier of a transmission packet used for transmitting the adjustment information, and is represented by "RECR"; v is the protocol version number used for transmitting the adjustment information; TS is time stamp, unit is millisecond; the SSRC is a synchronous source and represents a port source identifier for sending the current RR packet; the SSRCS is a media source identifier and represents an object received by the RR packet; CPL is the total accumulated packet loss; JT is delay jitter; SEQ is the sequence number of RR packet.
It should be noted that the feedback information of the present embodiment further includes a motion control command, where the motion control command is obtained by analyzing the acquired data information of different types, such as audio data, video data, and sensor data, by the cloud. For example, the acquired data information is video data of a depression on a road surface in front of the robot, which is shot by the robot through the camera, and the cloud analyzes the video data to obtain a motion control command of 'reverse'. And the motion control command is transmitted in the same packet format as the data packet, but DT of the packet header information in the motion control command, that is, a specific data type value is 4.
It should be noted that, in the present embodiment, both the data retransmission information transmitted in the form of NACK packet and the transmission adjustment information transmitted in the form of RR packet, and the motion control command may be received in a wireless communication manner, for example, in a WIFI or bluetooth communication manner.
And 103, executing the operation corresponding to the feedback information.
Specifically, in this embodiment, the robot may perform an operation corresponding to the specific content according to the specific content of the feedback information, that is, perform a transmission adjustment operation according to the transmission adjustment information when it is determined that the feedback information is the transmission adjustment information; when the feedback information is determined to be data retransmission information, performing data retransmission operation according to the data retransmission information; and when the feedback information is determined to be the motion control command, executing motion conversion operation according to the motion control command.
When the feedback information is determined to be transmission adjustment information, jitter information of the data information is acquired according to the transmission adjustment information; and judging whether the jitter information is larger than a preset jitter threshold value, if so, reducing the transmission frequency of the data information, and otherwise, increasing the transmission frequency of the data information. For example, if the jitter information JT obtained from the RR packet of the transmission adjustment information is 8 and the jitter threshold is set to be 7, the robot may decrease the transmission frequency of the subsequent data information because the jitter information obtained from the RR packet of the transmission adjustment information is greater than the preset threshold.
When the feedback information is determined to be data retransmission information, acquiring a serial number of the data information which is not received by the cloud according to the data retransmission information; acquiring data information corresponding to the sequence number from the local; and retransmitting the data information corresponding to the sequence number to the cloud. For example, a beginning serial number PID of unreceived data information is 25, binary systems corresponding to masks of the unreceived data information are 0000, 0101, 1010, and 1110 respectively, which indicate that 4 data are required to be retransmitted, and serial numbers of each data information are 25+0 to 25, 25+5 to 30, 25+10 to 35, and 25+14 to 39, respectively, after the serial number of the data information which is not received by the cloud is determined, the data information corresponding to the serial number is locally obtained, and the data information with the serial number 25, the data information with the serial number 30, the data information with the serial number 35, and the data information with the serial number 39 are retransmitted to the data which is lost, thereby ensuring the communication quality between the robot and the cloud. In practical applications, when the amount of data to be retransmitted is relatively large, the robot retransmits the data in the order of the priority from high to low, and the level information of the data information corresponding to each sequence number is already stored in the robot.
When the feedback information is determined to be the motion control command, the motion control command is identified, the conversion action corresponding to the motion control command is determined, the current action is determined, and the current action is converted according to the conversion action. For example, if it is determined that the received motion control command is "reverse", the "reverse" motion control command is recognized, the converted motion corresponding to "reverse" is determined to be forward movement, and if it is determined that the current motion is forward movement, the robot converts the forward movement into forward movement.
It should be noted that, before identifying the motion control command and determining the conversion action corresponding to the motion control command, generating command response information, where the command response information is used to indicate that the motion control command is successfully received and transmit the command response information to the cloud, the command response information may specifically be represented by an ACK response packet, and a format of the ACK response packet is shown in table 6.
TABLE 6
Number of bits
|
32
|
8
|
32
|
32
|
32
|
Identification
|
F
|
V
|
SSRC
|
SSRCS
|
SEQ |
Wherein, F is an identifier of a transmission packet used by the command response message, and is represented by "ACKN"; v is the protocol version number used for transmitting the command response information; the SSRC is a synchronous source and represents a port source identifier for sending the current ACK response packet; the SSRCS is a media source identifier and represents an object received by the ACK response packet; SEQ is the sequence number of the ACK response packet.
Compared with the prior art, according to the information communication method provided by the embodiment, after the robot sends the data information and the transmission state information to the cloud end, the feedback information generated by the cloud end according to the data information and the transmission state information can be received, and the feedback information comprises the transmission adjustment information or the data retransmission information, so that the robot can know whether the cloud end successfully receives the sent data information or not, and can adjust the transmission state of the data information according to the transmission adjustment information, and the communication quality between the robot and the cloud end is ensured.
A second embodiment of the present invention relates to an information communication method. The embodiment is further improved on the basis of the first embodiment, and the specific improvement is as follows: after the data information, namely the transmission state information, is sent to the cloud, a step of caching the data information locally is added. The flow of the information communication method in this embodiment is shown in fig. 2. Specifically, in this embodiment, step 201 to step 204 are included, where step 201 is substantially the same as step 101 in the first embodiment, and step 203 to step 204 are substantially the same as step 102 to step 103 in the first embodiment, and are not described herein again, and differences are mainly introduced below, and technical details not described in detail in this embodiment may be referred to the information communication method provided in the first embodiment, and are not described herein again.
After step 201, step 202 is performed.
Step 202, caching the data information locally.
Specifically, in this embodiment, when the data information is cached, a First In First Out (FIFO) mode may be specifically used for caching, and the larger the cached data amount is, the larger the success rate that the robot can obtain the lost data from the local and perform retransmission when it is determined that there is data loss in the transmission process according to the data retransmission information fed back by the cloud. Therefore, in the embodiment, the data information is cached locally, so that the success rate of data retransmission can be improved, and the communication quality between the robot and the cloud end is further improved.
Step 203, receiving feedback information.
And step 204, executing the operation corresponding to the feedback information.
Compared with the prior art, according to the information communication method provided by the embodiment, after the robot sends the data information and the transmission state information to the cloud end, the feedback information generated by the cloud end according to the data information and the transmission state information can be received, and the feedback information comprises the transmission adjustment information or the data retransmission information, so that the robot can know whether the cloud end successfully receives the sent data information or not, and can adjust the transmission state of the data information according to the transmission adjustment information, and the communication quality between the robot and the cloud end is ensured. And data information is cached locally, so that the success rate of data retransmission can be improved, and the communication quality between the robot and the cloud is further improved.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to an information communication apparatus, and the specific configuration thereof is as shown in fig. 3.
As shown in fig. 3, the information communication apparatus includes: a sending module 301, a receiving module 302 and an executing module 303.
The sending module 301 is configured to send the data information and the transmission state information to the cloud, where the cloud generates feedback information according to the data information and the transmission state information.
A receiving module 302, configured to receive the feedback information.
And an executing module 303, configured to execute an operation corresponding to the feedback information.
It should be understood that this embodiment is an example of the apparatus corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
A fourth embodiment of the present invention relates to an information communication apparatus. This embodiment is substantially the same as the third embodiment, and the specific configuration is as shown in fig. 4. Wherein, the main improvement lies in: the fourth embodiment is added with the cache module 304 on the basis of the third embodiment.
The sending module 301 is configured to send the data information and the transmission state information to a cloud, where the cloud generates feedback information according to the data information and the transmission state information.
And the caching module 304 is used for locally caching the data information.
A receiving module 302, configured to receive the feedback information.
And an executing module 303, configured to execute an operation corresponding to the feedback information.
It should be understood that this embodiment is an example of the apparatus corresponding to the second embodiment, and that this embodiment can be implemented in cooperation with the second embodiment. The related technical details mentioned in the second embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the second embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A fifth embodiment of the present invention relates to a robot, as shown in fig. 5, including at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501, so that the at least one processor 501 can execute the information communication method in the above embodiments.
In this embodiment, the processor 501 is a Central Processing Unit (CPU), and the Memory 502 is a Random Access Memory (RAM). The processor 501 and the memory 502 may be connected by a bus or other means, and fig. 5 illustrates the connection by the bus as an example. The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as programs that implement the information communication method according to the embodiments of the present application, in the memory 502. The processor 501 executes various functional applications of the device and data processing by executing nonvolatile software programs, instructions, and modules stored in the memory 502, that is, implements the above-described information communication method.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more program modules are stored in the memory 502 and, when executed by the one or more processors 501, perform the information communication method in any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A sixth embodiment of the present application relates to a computer-readable storage medium having stored therein a computer program which, when executed by a processor, is capable of implementing an information communication method involved in any of the method embodiments of the present invention.
Those skilled in the art will understand that all or part of the steps in the method according to the above embodiments may be implemented by a program instructing related hardware to complete, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.