CN114338836B - Man-machine command interaction method based on background agent - Google Patents

Man-machine command interaction method based on background agent Download PDF

Info

Publication number
CN114338836B
CN114338836B CN202210250312.2A CN202210250312A CN114338836B CN 114338836 B CN114338836 B CN 114338836B CN 202210250312 A CN202210250312 A CN 202210250312A CN 114338836 B CN114338836 B CN 114338836B
Authority
CN
China
Prior art keywords
message
data
software
fragment
communication protocol
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.)
Active
Application number
CN202210250312.2A
Other languages
Chinese (zh)
Other versions
CN114338836A (en
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.)
Foshan Institute Of Intelligent Equipment Technology
Original Assignee
Foshan Institute Of Intelligent Equipment Technology
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 Foshan Institute Of Intelligent Equipment Technology filed Critical Foshan Institute Of Intelligent Equipment Technology
Priority to CN202210250312.2A priority Critical patent/CN114338836B/en
Publication of CN114338836A publication Critical patent/CN114338836A/en
Application granted granted Critical
Publication of CN114338836B publication Critical patent/CN114338836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a human-computer command interaction method based on a background agent, which is applied to the technical field of human-computer interaction and relates to terminal equipment with built-in terminal software for a user to operate and a robot controller with built-in background agent software and a plurality of functional application software; the method comprises the following steps: the terminal software converts a user command packet packaged by a message type into user command data output in a message fragment form through a first message communication protocol and then sends the user command data to the background agent software; the background agent software analyzes and acquires a function application software appointed by a user from the user command data, and establishes a second message communication protocol in butt joint with the function application software; the background agent software generates a connection response data packet packaged by the message type, converts the connection response data packet into connection response data output in the form of message fragments through a first message communication protocol and feeds the connection response data back to the terminal software. The invention can carry out unified management and control on the data interaction between the terminal software and each function application software by setting the background agent software.

Description

Man-machine command interaction method based on background agent
Technical Field
The invention relates to the technical field of human-computer interaction, in particular to a human-computer command interaction method based on a background agent.
Background
As the hardware performance of the robot controller is gradually improved, the robot controller integrates more and more functional application software developed by different manufacturers, but a user needs to use different special tools to use the functional application software, which is not beneficial to the use, maintenance and performance expansion of the robot controller.
On the basis, the scholars propose to adapt the protocols of the functional application software developed by each manufacturer through a uniform protocol mode (i.e. the unification of the transmission medium type, the response mode, the data format and the like), but the two defects are also faced: firstly, the existing unified protocol mode adopts a specialized design, only limited transmission medium types and response modes can be compatible, the application range is narrow, and originally available functional application software of part of manufacturers can not be adapted, which is not beneficial to the performance expansion of the robot controller; secondly, the existing unified protocol mode adopts a generalized design and can support various transmission medium types and response modes, however, the protocol itself needs to continuously maintain an updated state, and content conflicts which cannot be avoided may exist during the operation of the protocol, so that various manufacturers are not easy to perform protocol adaptation and performance test, which is also not beneficial to the performance expansion of the robot controller.
Disclosure of Invention
The invention provides a man-machine command interaction method based on a background agent, which is used for solving one or more technical problems in the prior art and at least providing a beneficial selection or creation condition.
The embodiment of the invention provides a human-computer command interaction method based on a background agent, which is used for realizing command interaction between terminal equipment and a robot controller, wherein the terminal equipment is internally loaded with terminal software for a user to operate, and the robot controller is internally loaded with the background agent software and a plurality of functional application software; the man-machine command interaction method comprises the following steps:
the terminal software converts a user command packet packaged by a message type into user command data output in a message fragment form through a pre-established first message communication protocol, and then sends the user command data to the background agent software, wherein the first message communication protocol is used for realizing communication connection among cross-devices;
the background agent software analyzes and acquires a function application software appointed by a user from the user command data, and then creates a second message communication protocol in butt joint with the function application software, wherein the second message communication protocol is used for realizing communication connection among processes;
and the background agent software generates a connection response data packet packaged by the message type, converts the connection response data packet into connection response data output in a message fragment form through the first message communication protocol and feeds the connection response data back to the terminal software.
Further, the man-machine command interaction method further comprises the following steps:
the terminal software converts the data packet to be forwarded, which is encapsulated by the message type, into data to be forwarded, which is output in the form of message segments, through the first message communication protocol and then sends the data to be forwarded to the background agent software;
the background agent software updates the data to be forwarded into an operation instruction packet packaged by a message type, converts the operation instruction packet into an operation instruction output in a message fragment form through the second message communication protocol and then sends the operation instruction to the functional application software;
the functional application software starts to start running when receiving the running instruction, generates a running response data packet packaged by a message type, converts the running response data packet into running response data output in a message fragment form through the second message communication protocol and feeds the running response data back to the background agent software;
the background agent software arranges the operation response data into a response transfer data packet packaged by a message type, converts the response transfer data into response transfer data output in a message fragment form through the first message communication protocol and feeds the response transfer data back to the terminal software.
Further, the first message communication protocol is configured with a message serialization protocol and a message deserialization protocol, and the second message communication protocol is configured with a message serialization protocol and a message deserialization protocol, wherein the message serialization protocol is used for converting messages into message fragment data frames, and the message deserialization protocol is used for converting byte streams into message fragments.
Further, the structure of the message includes an intent type, a message sequence number, and message data.
Further, the message serialization protocol for converting a message into a message fragment data frame comprises:
dividing message data contained in a message into M message fragment data according to a set byte number, wherein M is a positive integer and is not less than 1, and sequentially packaging the M message fragment data into corresponding M message fragments, wherein the structure of each message fragment comprises an intention type, a message serial number, a fragment total number, a fragment number and the message fragment data;
and sequentially converting the M message fragments into corresponding M message fragment data frames, wherein the structure of each message fragment data frame comprises a frame header, a version number, an intention type, a message sequence number, a fragment total number, a fragment number, the byte number of message fragment data, a header check code, message fragment data and a data check code.
Further, the header, version number, intention type, message sequence number, total number of fragments, fragment number, byte number of the message fragment data, and header check code contained in each message fragment data frame occupy 20 bytes, and the message fragment data and data check code contained in each message fragment data frame occupy N +2 bytes, where N is the byte number of the message fragment data.
Further, the message deserialization protocol for converting the byte stream into message fragments comprises:
step 1, obtaining the first 20 bytes of a byte stream, performing head CRC (cyclic redundancy check) on the bytes, and obtaining the first 20+ N +2 bytes of the byte stream when the head CRC passes;
step 2, performing data CRC (cyclic redundancy check) on the N +2 bytes which are not subjected to the check, and directly cutting the first 20+ N +2 bytes of the byte stream out to obtain a message fragment data frame when the data check is passed, and simultaneously obtaining an updated byte stream;
and (3) circularly executing the step (1) and the step (2) until all message fragment data frames are obtained, and then sequentially extracting the content of all message fragment data frames to obtain all corresponding message fragments.
Further, when the head check fails, deleting the first byte of the byte stream to obtain an updated byte stream, and returning to perform head CRC check work on the updated byte stream again.
Further, when the data check fails, deleting the first 20+ N +2 bytes of the byte stream to obtain an updated byte stream, and returning to perform the head CRC check work on the updated byte stream again.
The invention has at least the following beneficial effects: by additionally loading the background agent software in the robot controller, when cross-device communication is carried out between the terminal software and the background agent software, the background agent software depends on a fixed transmission medium between the terminal equipment and the robot controller, and when inter-process communication is carried out between the background agent software and any one functional application software, the background agent software does not need to depend on any transmission medium, so that protocol adaptation and performance test of each manufacturer on the respectively developed functional application software can be facilitated. The data interaction function between the terminal software and each function application software is uniformly controlled by the background agent software, so that the function expansion of the robot controller is facilitated. The terminal software, the background agent software and any one functional application software send the interactive data packaged by the message type and receive the interactive data output in the form of message fragments, the data transmission formats of the adopted messages and the message fragments are simpler, and higher freedom is reserved for each manufacturer to define the data transmission formats of the functional application software developed by each manufacturer.
Drawings
The accompanying drawings 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 example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a schematic flow chart of a human-computer command interaction method based on a background agent in an embodiment of the present invention;
FIG. 2 is a schematic diagram of data interaction between terminal software and background agent software in the embodiment of the present invention;
FIG. 3 is a schematic diagram of data interaction between background agent software and functional application software in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a message fragment data frame in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that although functional block divisions are provided in the system drawings and logical orders are shown in the flowcharts, in some cases, the steps shown and described may be performed in different orders than the block divisions in the systems or in the flowcharts. The terms first, second and the like in the description and in the claims, as well as in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Referring to fig. 1, fig. 1 is a schematic flowchart of a human-machine command interaction method based on a background agent according to an embodiment of the present invention, where the method is used to implement command interaction between a terminal device and a robot controller, where terminal software for a user to operate is loaded in the terminal device, background agent software and a plurality of functional application software are loaded in the robot controller, and each functional application software has a unique mark.
Specifically, the man-machine command interaction method comprises the following steps:
s101, the terminal software converts a user command packet packaged by a message type into user command data output in a message fragment form through a pre-established first message communication protocol, and then sends the user command data to the background agent software, wherein the first message communication protocol is used for realizing communication connection among cross-devices.
Before executing step S101, a user first inputs a software selection command on an operation interface provided by the terminal software, and then the terminal software converts the software selection command into a user command packet encapsulated in a message type. In addition, after the terminal software sends the user command packet out, the information of 'command sent' is generated and displayed on the operation interface of the terminal software.
S102, the background agent software analyzes and obtains a function application software appointed by a user from the user command data, and then creates a second message communication protocol in butt joint with the function application software, wherein the second message communication protocol is used for realizing communication connection among processes.
In the implementation process, the background agent software mainly analyzes and acquires the carried tag information from the user command data, and further obtains the function application software specified by the user through the tag information.
And S103, the background agent software generates a connection response data packet packaged by a message type, converts the connection response data packet into connection response data output in a message fragment form through the first message communication protocol, and feeds the connection response data back to the terminal software.
After step S103, the terminal software will generate and display a message of "response received" on its operation interface according to the received connection response data, so as to inform the user that a new command can be input.
On the basis, the user continues to input the operation control command on the operation interface of the terminal software, and the terminal software converts the operation control command into a data packet to be forwarded, which is encapsulated by the message type, and then continues to execute step S104.
And S104, the terminal software converts the data packet to be forwarded, which is encapsulated by the message type, into data to be forwarded, which is output in the form of message fragments, through the first message communication protocol and then sends the data packet to the background agent software.
Similarly, after the terminal software executes step S104, the terminal software generates and displays the "command sent" information on its operation interface.
And S105, the background agent software updates the data to be forwarded into an operation instruction packet packaged by a message type, converts the operation instruction packet into an operation instruction output in a message segment form through the second message communication protocol, and then sends the operation instruction to the functional application software.
And S106, starting to start running when the functional application software receives the running instruction, generating a running response data packet packaged by a message type, converting the running response data packet into running response data output in a message fragment form through the second message communication protocol, and feeding the running response data back to the background agent software.
And S107, the background agent software arranges the operation response data into a response transfer data packet packaged by a message type, converts the response transfer data into response transfer data output in a message fragment form through the first message communication protocol and feeds the response transfer data back to the terminal software.
After step S107 is executed, the terminal software generates and displays a message of "response received" according to the received response forwarding data on its operation interface to inform the user that a new command can be input.
In the embodiment of the present invention, the terminal software interacts with the background agent software through the first message communication protocol, as shown in fig. 2, the first message communication protocol is a communication protocol adopting a client/server mode, and is configured with a message serialization protocol and a message deserialization protocol, the message serialization protocol is used for converting a message into a message fragment data frame, and the message deserialization protocol is used for converting a byte stream into a message fragment; more specifically, a first message communication protocol client is actually configured with a client interaction interface a1, the client interaction interface a1 may execute the message serialization protocol and the message deserialization protocol, a first message communication protocol server is actually configured with a server interaction interface a2, the server interaction interface a2 may execute the message serialization protocol and the message deserialization protocol, and the client interaction interface a1 and the server interaction interface a2 are in communication connection based on a cross-device communication protocol.
The cross-device communication protocol is a client/server mode communication protocol, is used for providing byte stream sending and receiving services for the client interactive interface a1 and the server interactive interface a2, and may be any one of a TCP/IP communication protocol, an RS232 serial communication protocol and an RS485 serial communication protocol, specifically depending on a hardware basis provided by the robot controller.
As shown in fig. 2, when the terminal software performs command data interaction to the background agent software, the following two interaction processes are involved: (1) the terminal software sends a message to the client-side interactive interface A1, so that the client-side interactive interface A1 executes the message serialization protocol to convert the message into a plurality of message fragment data frames (each message fragment data frame is also a byte stream in nature), and then the cross-device communication protocol client-side sequentially splices the plurality of message fragment data frames to form a byte stream and sends the byte stream; (2) and the cross-device communication protocol server side informs the server side interaction interface A2 of receiving the byte stream, so that the server side interaction interface A2 executes the message deserialization protocol to convert the byte stream into a plurality of message fragments and transmit the message fragments to the background agent software.
Similarly, when the background agent software performs response data interaction to the terminal software, the following two interaction processes are involved: (1) the background agent software sends a message to the server interactive interface A2, so that the server interactive interface A2 executes the message serialization protocol to convert the message into a plurality of message fragment data frames, and then the cross-device communication protocol server splices the plurality of message fragment data frames in sequence to form a byte stream and sends the byte stream out; (2) the cross-device communication protocol client informs the client interactive interface A1 of receiving the byte stream, so that the client executes the message deserialization protocol to convert the byte stream into a plurality of message fragments and transmit the message fragments to the terminal software.
It should be noted that, when the terminal software and the background agent software perform the above two types of data interaction, a communication connection relationship between them should be established first, and the specific implementation process includes the following steps: (1) the background agent software sends a request of 'open service end interaction interface A2 service' to the service end interaction interface A2, and then the service end interaction interface A2 sends a request of 'open cross-device communication protocol service' to a cross-device communication protocol service end; (2) the terminal software sends a request of connecting a service-side interactive interface A2 to the client-side interactive interface A1, and further sends a request of connecting a cross-device communication protocol service-side to a cross-device communication protocol client side through the client-side interactive interface A1; (3) actively establishing connection between the cross-device communication protocol client and the cross-device communication protocol server; (4) the cross-device communication protocol client informs the client interactive interface A1 of receiving 'the cross-device communication protocol server is connected', and further informs the terminal software of receiving 'the server interactive interface A2 is connected' by the client interactive interface A1; (5) the cross-device communication protocol server side informs the server side interactive interface A2 that the cross-device communication protocol client side is connected, and further informs the background agent software that the client side interactive interface A1 is connected through the server side interactive interface A2.
In the embodiment of the present invention, the background agent software interacts with the functional application software specified by the user through the second message communication protocol, as shown in fig. 3, the second message communication protocol is a communication protocol adopting a client/server mode and is configured with a message serialization protocol and a message deserialization protocol, the message serialization protocol is used for converting a message into a message fragment data frame, and the message deserialization protocol is used for converting a byte stream into a message fragment; more specifically, the second message communication protocol client is actually configured with a client interaction interface B1, the client interaction interface B1 may execute the message serialization protocol and the message deserialization protocol, the second message communication protocol server is actually configured with a server interaction interface B2, the server interaction interface B2 may execute the message serialization protocol and the message deserialization protocol, and the client interaction interface B1 and the server interaction interface B2 are in communication connection based on an inter-process communication protocol.
The interprocess communication protocol is a client/server mode communication protocol, and is used to provide a byte stream sending and receiving service for the client interactive interface B1 and the server interactive interface B2, and may be a socket-based interprocess communication mode or a shared memory-based interprocess communication mode, which is specifically determined by a user programming interface provided by a built-in operating system of the robot controller.
As shown in fig. 3, when the background agent software performs command data interaction with the functional application software, the following two interaction processes are involved: (1) the background agent software sends a message to the client interactive interface B1, so that the background agent software executes the message serialization protocol to convert the message into a plurality of message fragment data frames (each of which is also a byte stream in nature), and then the inter-process communication protocol client splices the plurality of message fragment data frames in sequence to form a byte stream and sends out the byte stream; (2) the interprocess communication protocol server side informs the server side interactive interface B2 of receiving the byte stream, so that the server side executes the message deserialization protocol to convert the byte stream into a plurality of message fragments and transmits the message fragments to the functional application software.
Similarly, when the functional application software performs response data interaction to the background agent software, the following two interaction processes are involved: (1) the functional application software sends a message to the server interactive interface B2, so that the functional application software executes the message serialization protocol to convert the message into a plurality of message fragment data frames, and then the interprocess communication protocol server splices the plurality of message fragment data frames in sequence to form a byte stream and sends the byte stream out; (2) the interprocess communication protocol client informs the client interactive interface B1 of receiving the byte stream, so that the client executes the message deserialization protocol to convert the byte stream into a plurality of message fragments and transmit the message fragments to the background agent software.
It should be noted that, when the background agent software and the functional application software execute the above two types of data interaction, a communication connection relationship between them should be established first, and the specific implementation process includes the following steps: (1) the functional application software sends a request of 'open service end interactive interface B2 service' to the service end interactive interface B2, and then the service end interactive interface B2 sends a request of 'open inter-process communication protocol service' to the inter-process communication protocol service end; (2) the background agent software sends a request of connecting a server-side interactive interface B2 to the client-side interactive interface B1, and further sends a request of connecting an inter-process communication protocol server to an inter-process communication protocol client through the client-side interactive interface B1; (3) the inter-process communication protocol client actively establishes connection with the inter-process communication protocol server; (4) the inter-process communication protocol client informs the client interactive interface B1 of receiving 'the inter-process communication protocol server is connected', and further informs the background agent software of receiving 'the server interactive interface B2 is connected' by the client interactive interface B1; (5) the interprocess communication protocol server side informs the server side interactive interface B2 that the client side of the interprocess communication protocol is connected, and further informs the function application software that the client side interactive interface B1 is connected through the server side interactive interface B2.
In this embodiment of the present invention, a specific processing procedure of the message serialization protocol when the message is converted into the message fragment data frame includes: based on the structure of the message, the structure comprises an intention type, a message serial number and message data, firstly, the message data contained in the message is divided into M message fragment data according to a set byte number, wherein M is a positive integer and is more than or equal to 1, and then the M message fragment data are sequentially packaged into corresponding M message fragments, wherein the structure of each message fragment comprises the intention type, the message serial number, the total number of the fragments, the fragment number and the message fragment data; and finally, sequentially converting the M message fragments into corresponding M message fragment data frames, wherein the structure of each message fragment data frame comprises a frame header, a version number, an intention type, a message sequence number, a fragment total number, a fragment number, the byte number of the message fragment data, a header check code, the message fragment data and a data check code.
It should be noted that, when the message data is divided into M message segment data according to the set number of bytes, where M is a positive integer, M is greater than or equal to 1, and it is assumed that the number of bytes of the message data is Y and the set number of bytes is X, the following three situations are actually included: firstly, when Y is less than or equal to X, directly defining message data as message fragment data; second, when Y = M × X, the message data may be sliced into M message fragment data; thirdly, when Y = (M-1) × X + K, K is the number of remaining bytes less than X, the message data can be preferentially divided into M-1 message fragment data, and then the remaining K bytes are defined as the mth message fragment data. Wherein the set byte number is a value obtained by a technician from the range of X E [256,65535 ].
In the embodiment of the present invention, before describing the message deserialization protocol, it should be clear that the byte arrangement occupied by each internal component of any message fragment data frame, as shown in fig. 4, a frame header, a version number, an intention type, a message sequence number, a total number of fragments, a fragment number, a byte number of message fragment data, and a header check code contained in each message fragment data frame occupy 20 bytes, and the message fragment data and the data check code contained in each message fragment data frame occupy N +2 bytes in total, where N is the byte number of the message fragment data.
In the embodiment of the present invention, a specific processing procedure of the message deserialization protocol when converting a byte stream into a message fragment is completed includes the following steps:
(1) acquiring the first 20 bytes of the byte stream and performing Cyclic Redundancy Check (Cyclic Redundancy Check) on the bytes, acquiring the first 20+ N +2 bytes of the byte stream when the Cyclic Redundancy Check is passed, and executing the step (2); and (3) deleting the first byte of the byte stream to obtain an updated byte stream when the header check fails, returning to the step (1) for re-execution, and jumping to the step (3) when the byte stream cannot be updated.
When the step (1) is executed, two operation steps are actually implicit, which are respectively: when the head CRC check is carried out on the first 20 bytes of the byte stream, the first 4 bytes (namely the frame head) of the byte stream are also matched synchronously; before the first 20+ N +2 bytes of the byte stream are obtained, the value of N is obtained by preferably querying the 17 th byte and the 18 th byte of the byte stream.
(2) Performing data CRC (cyclic redundancy check) on N +2 bytes which are not subjected to verification, directly cutting the first 20+ N +2 bytes of the byte stream to obtain a message fragment data frame when the data CRC passes, simultaneously obtaining the updated byte stream and returning to the step (1) for re-execution, and skipping to the step (3) when the byte stream cannot be updated; and (3) deleting the first 20+ N +2 bytes of the byte stream to obtain an updated byte stream when the data check fails, returning to the step (1) for re-execution, and jumping to the step (3) when the byte stream cannot be updated.
(3) And acquiring all message fragment data frames, and sequentially extracting the content of all message fragment data frames to obtain all corresponding message fragments.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a central processing unit, digital signal processor or microprocessor, or as hardware, or as integrated circuits. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art.
While the preferred embodiments of the present invention have been described in detail, it will be understood by those skilled in the art that the foregoing and various other changes, omissions and deviations in the form and detail thereof may be made without departing from the scope of this invention.

Claims (8)

1. A human-computer command interaction method based on background agent is used for realizing command interaction between terminal equipment and a robot controller and is characterized in that terminal software for a user to operate is loaded in the terminal equipment, and background agent software and a plurality of functional application software are loaded in the robot controller; the man-machine command interaction method comprises the following steps:
the terminal software converts a user command packet packaged by a message type into user command data output in a message fragment form through a pre-established first message communication protocol, and then sends the user command data to the background agent software, wherein the first message communication protocol is used for realizing communication connection among cross-devices;
the background agent software analyzes and acquires a function application software appointed by a user from the user command data, and then creates a second message communication protocol in butt joint with the function application software, wherein the second message communication protocol is used for realizing communication connection among processes;
the background agent software generates a connection response data packet packaged by a message type, converts the connection response data packet into connection response data output in a message fragment form through the first message communication protocol and feeds the connection response data back to the terminal software;
the terminal software converts the data packet to be forwarded, which is encapsulated by the message type, into data to be forwarded, which is output in the form of message segments, through the first message communication protocol and then sends the data to be forwarded to the background agent software;
the background agent software updates the data to be forwarded into an operation instruction packet packaged by a message type, converts the operation instruction packet into an operation instruction output in a message fragment form through the second message communication protocol and then sends the operation instruction to the functional application software;
the functional application software starts to start running when receiving the running instruction, generates a running response data packet packaged by a message type, converts the running response data packet into running response data output in a message fragment form through the second message communication protocol and feeds the running response data back to the background agent software;
the background agent software arranges the operation response data into a response transfer data packet packaged by a message type, converts the response transfer data into response transfer data output in a message fragment form through the first message communication protocol and feeds the response transfer data back to the terminal software.
2. The human-computer command interaction method based on the background agent as claimed in claim 1, wherein the first message communication protocol is configured with a message serialization protocol and a message deserialization protocol, and the second message communication protocol is configured with a message serialization protocol and a message deserialization protocol, wherein the message serialization protocol is used for converting messages into message fragment data frames, and the message deserialization protocol is used for converting byte streams into message fragments.
3. The human-computer command interaction method based on the background agent as claimed in claim 2, wherein the structure of the message comprises an intention type, a message sequence number and message data.
4. The human-computer command interaction method based on the background agent as claimed in claim 3, wherein the message serialization protocol is used for converting the message into the message fragment data frame and comprises:
dividing message data contained in a message into M message fragment data according to a set byte number, wherein M is a positive integer and is more than or equal to 1, and sequentially packaging the M message fragment data into corresponding M message fragments, wherein the structure of each message fragment comprises an intention type, a message sequence number, a fragment total number, a fragment number and message fragment data;
and sequentially converting the M message fragments into corresponding M message fragment data frames, wherein the structure of each message fragment data frame comprises a frame header, a version number, an intention type, a message sequence number, a fragment total number, a fragment number, the byte number of message fragment data, a header check code, message fragment data and a data check code.
5. The human-computer command interaction method based on the background agent as claimed in claim 4, wherein the header, the version number, the intention type, the message sequence number, the total number of fragments, the fragment number, the byte number of the message fragment data and the header check code contained in each message fragment data frame occupy 20 bytes, and the message fragment data and the data check code contained in each message fragment data frame occupy N +2 bytes, where N is the byte number of the message fragment data.
6. The human-computer command interaction method based on the background agent as claimed in claim 5, wherein the message deserialization protocol is used for converting a byte stream into a message segment and comprises:
step 1, obtaining the first 20 bytes of a byte stream, performing head CRC (cyclic redundancy check) on the bytes, and obtaining the first 20+ N +2 bytes of the byte stream when the head CRC passes;
step 2, performing data CRC (cyclic redundancy check) on the N +2 bytes which are not subjected to the check, and directly cutting the first 20+ N +2 bytes of the byte stream out to obtain a message fragment data frame when the data check is passed, and simultaneously obtaining an updated byte stream;
and (3) circularly executing the step (1) and the step (2) until all message fragment data frames are obtained, and then sequentially extracting the content of all message fragment data frames to obtain all corresponding message fragments.
7. A human-computer command interaction method based on a background agent as claimed in claim 6 wherein, when the header check fails, the first byte of the byte stream is deleted to obtain the updated byte stream, and then the header CRC check work is performed again on the updated byte stream.
8. The human-computer command interaction method based on the background agent as claimed in claim 6, wherein when the data check fails, the first 20+ N +2 bytes of the byte stream are deleted to obtain the updated byte stream, and then the head CRC check work is executed again on the updated byte stream.
CN202210250312.2A 2022-03-15 2022-03-15 Man-machine command interaction method based on background agent Active CN114338836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210250312.2A CN114338836B (en) 2022-03-15 2022-03-15 Man-machine command interaction method based on background agent

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210250312.2A CN114338836B (en) 2022-03-15 2022-03-15 Man-machine command interaction method based on background agent

Publications (2)

Publication Number Publication Date
CN114338836A CN114338836A (en) 2022-04-12
CN114338836B true CN114338836B (en) 2022-06-17

Family

ID=81033761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210250312.2A Active CN114338836B (en) 2022-03-15 2022-03-15 Man-machine command interaction method based on background agent

Country Status (1)

Country Link
CN (1) CN114338836B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10009708B2 (en) * 2016-03-09 2018-06-26 Tata Consultancy Services Limited System and method for mobile sensing data processing
US10855625B1 (en) * 2016-05-11 2020-12-01 Workato, Inc. Intelligent, adaptable, and trainable bot that orchestrates automation and workflows across multiple applications
CN108121221B (en) * 2016-11-26 2020-05-01 沈阳新松机器人自动化股份有限公司 Robot command interface control system and method
CN108833237B (en) * 2018-07-20 2021-01-26 京东方科技集团股份有限公司 Intelligent home gateway and control method thereof
CN109514555A (en) * 2018-11-30 2019-03-26 深圳市汇川技术股份有限公司 Command interaction method, robot demonstrator, robot controller and storage medium
CN111294399B (en) * 2020-02-04 2023-06-23 网宿科技股份有限公司 Data transmission method and device
CN111283680B (en) * 2020-02-28 2023-07-18 华南理工大学 System and method for wireless remote control of robot
CN114157649A (en) * 2021-12-01 2022-03-08 招商局金融科技有限公司 Reliable data transmission method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114338836A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
EP2866142A1 (en) Upgrade package generation method and device, dynamic file differential upgrade method and terminal
CN107493266B (en) Communication system, method and device of embedded self-service terminal
CN111726420A (en) Communication method, device, equipment and storage medium based on RPA
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
US20130152069A1 (en) Method, apparatus and system for initiating terminal operation
CN108833565A (en) A kind of method, apparatus of monitoring server, server and storage medium
CN111107059A (en) Unmanned aerial vehicle multi-protocol transmission data analysis method
CN115114044A (en) Message pushing method, device, equipment and medium
CN114285695B (en) Communication method, device, apparatus, system and storage medium
CN115001897A (en) Communication method and device, electronic equipment and automatic driving vehicle
CN114338836B (en) Man-machine command interaction method based on background agent
CN112511631B (en) Control system and method of intelligent device
KR20200087673A (en) Electronic message adaptation
CN114576828B (en) Communication management method, bifurcation box, multi-split air conditioning system and storage medium
CN114722099A (en) Method and equipment for transmitting and storing working condition data of engineering machinery
CN114090050A (en) Robot software remote automatic updating method, system and related products
CN108259236A (en) Server data processing method and system
CN110430110B (en) On-site bus gateway and protocol conversion method thereof
CN113645131A (en) Data processing method and device, electronic equipment and storage medium
CN110502418B (en) Method for realizing remote debugging
EP3038390A1 (en) Processing method and apparatus for signaling tracing
CN112565041B (en) Hardware information configuration method, device and medium of FF field bus system
CN110769053A (en) Data pushing method, system and storage medium
CN113037839B (en) Distributed batch framework communication system and method
US20230179480A1 (en) Method and apparatus for remote customization of function, device, and storage medium

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
GR01 Patent grant
GR01 Patent grant