Multi-device Serial Communication Method and System Based on Remote Control Instructions
By receiving and parsing the identification in the remote control data packet and distinguishing the control function and data flow, the problems of long development cycle and low transmission efficiency in multi-device serial communication are solved, and faster communication time and higher real-time data transmission are achieved.
Patent Information
- Application Number
- CN202210947812.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-08-05
AI Technical Summary
The existing remote communication control protocols lead to a long development cycle and low data transmission efficiency in multi-device serial communication, which cannot effectively shorten communication time.
Using a multi-device serial communication method based on remote control instructions, by receiving and parsing remote control data packets determined by preset protocols, using identification to distinguish different control functions and data flow directions, determining the data that the current device needs to parse or pass through, and performing corresponding operations.
The development cycle of multi-device serial communication is shortened, the real-time nature of data transmission is improved, the number of encoding and decoding times of intermediate devices is reduced, and the communication efficiency is improved.
Smart Images

Figure CN115499422B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a multi-device serial communication method and system based on remote control instructions. Background Art
[0002] The existing remote communication control protocol Q / GDW 1376.1-2021 "Communication Protocol for Power User Electricity Information Acquisition System: Master Station and Acquisition Terminal Communication Protocol" realizes multi-device access to the system, and stipulates the frame format, data encoding and transmission rules for data transmission between devices. There are large deviations in the understanding and implementation of the protocol by each manufacturer, and on-site debugging and modification are required for each device access, which takes a long time. There are dozens or hundreds of data type formats defined in this protocol. Therefore, for multi-device serial communication, the development cycle is long, and the data type encoding and decoding seriously affect the communication efficiency.
[0003] Therefore, for multi-device serial communication in a remote control excavation communication system, how to shorten the development cycle, shorten the communication time, and improve the real-time performance of data transmission is a technical problem that needs to be solved currently. Summary of the Invention
[0004] The present invention provides a multi-device serial communication method and system based on remote control instructions, which are used to solve the problems in the prior art that in the process of multi-device serial communication, different protocols are adopted by multiple devices, resulting in a long development time and a long communication time due to a large number of data encoding and decoding, and to realize shortening the development cycle, shortening the communication time, and improving the real-time performance of data transmission.
[0005] A multi-device serial communication method based on remote control instructions, the method includes: receiving a remote control data packet, the remote control data packet being determined based on a pre-set protocol; parsing the remote control data packet to determine at least one identifier; different identifiers are used to distinguish different control functions and to identify the data flow direction; based on the at least one identifier, determining the data that the current device needs to parse in the remote control data packet; determining a control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction; or, based on the at least one identifier, determining the data that the current device needs to transparently transmit in the remote control data packet, and transparently transmitting the data that the current device needs to transparently transmit to the target device.
[0006] In one of the embodiments, the determining, based on the at least one identifier, the data that the current device needs to parse in the remote control data packet includes:
[0007] If the identifier in the at least one identifier is a first identifier corresponding to detecting the operating state of the device, determine the data corresponding to the first identifier in the remote control data packet as the data that the current device needs to parse; or,
[0008] If the identifier in the at least one identifier is a second identifier corresponding to feedbacking the operating state of the device, determine the data corresponding to the second identifier in the remote control data packet as the data that the current device needs to parse; or
[0009] If the identifier in the at least one identifier is a third identifier corresponding to feedbacking the operating state of the device, determine the data corresponding to the third identifier in the remote control data packet as the data that the current device needs to parse.
[0010] In one embodiment, determining the data that the current device needs to transparently transmit in the remote control data packet based on the at least one identifier includes:
[0011] If the identifier in the at least one identifier is a fourth identifier corresponding to data transmission, and the current device is an intermediate device during the data transmission process, determine the data corresponding to the fourth identifier as the data that the current device needs to transparently transmit.
[0012] In one embodiment, determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction includes:
[0013] Parse the data corresponding to the first identifier in the remote control data packet;
[0014] Generate a first instruction for detecting the operating state of the current device based on the data corresponding to the first identifier, and detect the operating state data of the current device based on the first instruction;
[0015] Save the operating state data of the current device into the data of the second identifier or the third identifier corresponding to the current device.
[0016] In one embodiment, the remote control data packet further includes the version of the protocol and the number of identifiers, and the number of identifiers corresponding to different protocol versions is different.
[0017] In one embodiment, the data corresponding to the third identifier is data for feedback when the device runs abnormally, and the data corresponding to the fourth identifier is emergency braking control data for identifying the remote control end. Accordingly, determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction includes: after the terminal device at the remote control end parses the data corresponding to the third identifier, generating an instruction to send a data packet containing the data corresponding to the fourth identifier to the terminal device at the controlled end, and generating and sending a data packet containing the data corresponding to the fourth identifier.
[0018] In one embodiment, the data corresponding to the third identifier is data for feedback when the device runs abnormally, and the data corresponding to the fourth identifier is braking state data for identifying the controlled end. Accordingly, determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction includes: the terminal device at the remote control end parses the data corresponding to the fourth identifier from the terminal device at the control end, determines the emergency braking state of the terminal device at the control end based on the data containing the data corresponding to the fourth identifier, and determines whether to restore the emergency braking position of the terminal device at the remote control end based on the emergency braking state.
[0019] In one embodiment, if the identifier contained in the remotely controlled data packet that is parsed cannot be recognized by the current device, the current device only parses the data corresponding to the identifier that the current device can recognize.
[0020] In one embodiment, the data content corresponding to each identifier includes the length of the data and the specific value of the data.
[0021] In one embodiment, the data type in the remotely controlled data packet is a data type common to multiple devices.
[0022] The present invention also provides a multi-device serial communication system based on a remote control instruction. The system includes: a receiving module for receiving a remotely controlled data packet determined based on a preset protocol; an analyzing module for analyzing the remotely controlled data packet to determine at least one identifier, where different identifiers are used to distinguish different control functions and to identify the data flow direction; a determining module for determining, based on the at least one identifier, the data that the current device needs to parse in the remotely controlled data packet; a processing module for determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction; or, determining, based on the at least one identifier, the data that the current device needs to transparently transmit in the remotely controlled data packet, and transparently transmitting the data that the current device needs to transparently transmit to the target device.
[0023] The present invention also provides a computer device, including a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor is caused to execute the steps of the multi-device serial communication method based on remote control instructions described above.
[0024] The present invention also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the multi-device serial communication method based on remote control instructions described above.
[0025] For the multi-device serial communication method and system based on remote control instructions described above, by receiving and parsing a remote control data packet determined based on a pre-set protocol, at least one identifier for distinguishing different control functions and for identifying the data flow direction is determined. Then, based on the at least one identifier, the data that needs to be parsed by the current device and the data that needs to be relayed by the current device can be obtained. Further, corresponding operations are performed based on the data that needs to be parsed by the current device, and the data that needs to be relayed by the current device is relayed. Based on the foregoing method, since it is possible to determine which data in the data packet needs to be parsed and which data needs to be relayed according to the at least one identifier, in the multi-device serial communication system based on remote control instructions, both the devices that need to relay and the devices that need to parse can use the foregoing method for communication. And since multiple devices use the same protocol, not only can the development cycle be shortened, but also for the intermediate devices in data transmission, the data that needs to be relayed can be directly determined and transmitted to the target device, without encoding and decoding the data that needs to be relayed multiple times, thereby shortening the communication time and improving the real-time performance of data transmission. Description of the Drawings
[0026] Figure 1 It is one of the framework schematic diagrams of the multi-device serial communication system based on remote control instructions provided by the present invention;
[0027] Figure 2 It is another framework schematic diagram of the multi-device serial communication system based on remote control instructions provided by the present invention;
[0028] Figure 3 It is one of the flow schematic diagrams of the multi-device serial communication method based on remote control instructions provided by the present invention;
[0029] Figure 4 It is another flow schematic diagram of the multi-device serial communication method based on remote control instructions provided by the present invention;
[0030] Figure 5 It is yet another flow schematic diagram of the multi-device serial communication method based on remote control instructions provided by the present invention;
[0031] Figure 6 The fourth flowchart diagram of the multi-device serial communication method based on remote control instructions provided by the present invention;
[0032] Figure 7 The fifth flowchart diagram of the multi-device serial communication method based on remote control instructions provided by the present invention;
[0033] Figure 8 The third framework diagram of the multi-device serial communication system based on remote control instructions provided by the present invention;
[0034] Figure 9 The schematic diagram of the electronic device provided by the present invention. Detailed implementation manners
[0035] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0036] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be of the ordinary meaning understood by those of ordinary skill in the art to which the present disclosure belongs. The "first", "second" and similar terms used in the embodiments of the present disclosure do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "include" or "comprise" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms such as "connect" or "couple" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0037] For the convenience of understanding, the technical terms involved in the present application are explained.
[0038] (1) Multi-access edge computing (MEC)
[0039] MEC can use the radio access network to provide the IT services and cloud computing functions required by telecom users nearby, thereby creating a telecom-level service environment with high performance, low latency and high bandwidth, and accelerating various contents in the network.
[0040] (2) Message Queuing Telemetry Transport (MQTT)
[0041] MQTT is a message protocol based on the publish / subscribe paradigm under the ISO standard (ISO / IEC PRF 20922). It operates on the TCP / IP protocol family and is a publish / subscribe message protocol designed for remote devices with low hardware performance and poor network conditions.
[0042] (3) 5GCPE
[0043] 5GCPE is used to convert the 5G signal of mobile communication into a local area network signal for users to use.
[0044] It can be understood that in the remote control excavation communication system, there are remote control devices such as handles / foot pedals, acquisition boards, and operation console hosts at the remote control end, and there are also shovel end devices such as industrial control computers, main control boards, and excavators. Multiple devices are connected in series, and serial interactions occur between different types of modules. Different instructions correspond to different devices, and it is necessary to support transparent transmission rules. For example, how to effectively control the main control board at high speed by the acquisition board, or how the operation console host controls the main control board, or how the main control board quickly feedbacks to the operation console / acquisition board are the technical problems that need to be solved currently. Therefore, the present invention provides a multi-device serial communication method based on remote control instructions for the multi-device serial communication in the remote control excavation communication system, which can shorten the development cycle, shorten the communication time, and improve the real-time performance of data transmission.
[0045] Figure 1 As one of the framework schematic diagrams of the multi-device serial communication system based on remote control instructions provided in an embodiment, as Figure 1 shown. In this framework schematic diagram, it includes a shovel end device 110, a remote control end device 120, a 5G base station 130, and an MEC server device 140. Among them, the shovel end device 110 can include an industrial control computer, 5GCPE, a camera, a vehicle-mounted controller, etc. The shovel end device 110 can subscribe to remote control instructions, publish the shovel end status, and actively push the shovel end camera video stream to the MEC server device 140 through the 5G base station 130. The remote control end device 120 can include an operation handle, a foot pedal, a seat, an acquisition board, 5GCPE, and a display, which are used to receive hardware operation instructions such as the operation console handle, and are also used to subscribe to the status, pull the shovel end video stream from the MEC server device through the 5G base station 130, and display it on the display. The MEC server device 140 can be an X86 high-performance server, which supports the publication and query of control instructions, etc., and also supports the push and pull of video streams.
[0046] Figure 2This is the second schematic diagram of the framework of the multi-device serial communication system based on remote control instructions provided in an embodiment. It can be understood that Figure 2 is based on Figure 1 The schematic diagram of the framework of the abstract multi-device serial communication system. As Figure 2 shown, in this schematic diagram of the framework, it includes an acquisition board 210, an operation console 220, an industrial control computer 230, and a main control board 240. Among them, the acquisition board 210 is an embedded board with a real-time system, which is used to collect data of the handle, the foot pedal, and the control buttons of the operation panel, and is used to control devices such as relevant indicator lights that reflect the vehicle state. The operation console 220 includes operation-related button handles, a display, an operation console host device, etc., which is used to receive the data of the acquisition board, publish control commands through MQTT, and play the video stream to display the on-site picture. The industrial control computer 230 is an industrial control computer, which can be widely used in the computing requirements of scenarios such as driverless. The main control board 240 is an embedded board running a real-time system, which can realize vehicle control and vehicle sensor reading.
[0047] The following combines the accompanying drawings to illustrate the multi-device serial communication method and system based on remote control instructions provided by the present invention.
[0048] Figure 3 This is the flow schematic diagram of a multi-device serial communication method based on remote control instructions provided by the present invention. It can be understood that this multi-device serial communication method based on remote control instructions can be executed by devices or modules in the multi-device serial communication system based on remote control instructions.
[0049] As Figure 3 shown, in one embodiment, a multi-device serial communication method based on remote control instructions is proposed, which specifically can include the following steps:
[0050] Step 310, receive a remote control data packet.
[0051] Among them, the remote control data packet can be a data packet from a device or module in the multi-device serial communication system based on remote control instructions.
[0052] It can be understood that the devices or modules in the multi-device serial communication system based on remote control instructions can generate remote control data packets according to a pre-set protocol. Among them, the pre-set protocol includes a variable data header and a multi-data unit structure. Among them, the variable data header includes important general information such as the protocol version, data source, and vehicle model. Specifically, the pre-set protocol can refer to the relevant descriptions later, and the data header can be as shown in Table 2 later, which will not be elaborated here for the time being.
[0053] Step 320, parse the remote control data packet to determine at least one identifier.
[0054] Among them, different identifiers are used to distinguish different control functions and to identify the data flow direction. Different identifiers are used to distinguish different control functions. For example, they are used to distinguish the function of detecting the operating state of a device, the function of feedbackting the operating state of a device, or the function of data transmission. The data flow direction is the direction in which data is transmitted between multiple devices. For example, it is transmitted from the main control board to the industrial control computer, and then from the industrial control computer to the operation console.
[0055] It can be understood that the at least one identifier can be at least one identifier of at least one device. That is to say, for each device, at least one identifier can be set to represent the different control functions corresponding to the device, and the corresponding content is filled in the corresponding identifier to identify the data corresponding to the control function. Based on this, in a multi-device access system, a device can only focus on the data units it needs, improving the retrieval and processing efficiency.
[0056] As mentioned above, the remote control data packet can be generated according to a pre-set protocol. Therefore, the current device can parse the remote control data packet according to the pre-set protocol to determine at least one identifier.
[0057] Step 330, based on the at least one identifier, determine the data that the current device needs to parse or the data that the current device needs to transparently transmit in the remote control data packet; determine the control instruction of the current device based on the data that the current device needs to parse, and perform corresponding operations based on the control instruction.
[0058] Among them, the data that the current device needs to parse or the data that the current device needs to transparently transmit in the remote control data packet are all data corresponding to one or more identifiers in the at least one identifier.
[0059] It can be understood that since different identifiers are also used to identify the data flow direction, and for multi-device serial communication, the current device may be the device that the remote control data packet finally needs to reach, or the current device may only be an intermediate device in the data transmission process. Therefore, according to the at least one identifier, it can be determined which identifiers in the corresponding at least one identifier in the remote control data packet correspond to the data that the current device needs to parse, and which identifiers correspond to the data that the current device needs to transparently transmit to other devices.
[0060] As mentioned above, different identifiers are used to distinguish different control functions. Therefore, after determining that the data corresponding to certain identifiers is the data that the current device needs to parse, the data that the current device needs to parse can be parsed to generate corresponding control instructions and perform corresponding operations based on the control instructions. The corresponding operations are operations corresponding to the control functions. For example, for the function of detecting the operating state of a device, the corresponding operation is to detect the operating state of the current device.
[0061] Step 340: Determine the data that the current device needs to transparently transmit in the remote control data packet based on at least one identifier, and transparently transmit the data that the current device needs to transparently transmit to the target device.
[0062] The target device is the next device in the data stream corresponding to the data that needs to be transparently transmitted.
[0063] It can be understood that since different identifiers are used to distinguish different control functions and to identify the data flow direction, after determining that the data corresponding to certain identifiers is the data that the current device needs to transparently transmit, the data that needs to be transparently transmitted can be directly transparently transmitted to the next device in the data flow direction without any processing.
[0064] The multi-device serial communication method based on remote control instructions provided by the present invention determines at least one identifier for distinguishing different control functions and identifying the data flow direction by receiving and parsing a remote control data packet determined based on a pre-set protocol. Then, based on the at least one identifier, the data that needs to be parsed by the current device and the data that needs to be transparently transmitted by the current device can be obtained. Further, corresponding operations are performed based on the data that needs to be parsed by the current device, and the data that needs to be transparently transmitted by the current device is transparently transmitted. Based on the foregoing method, since it can be determined which data in the data packet needs to be parsed and which data needs to be transparently transmitted according to at least one identifier, in the multi-device serial communication system based on remote control instructions, both the devices that need to transparently transmit and the devices that need to parse can use the foregoing method for communication. And since multiple devices use the same protocol, not only can the development cycle be shortened, but for the intermediate devices in data transmission, the data that needs to be transparently transmitted can be directly determined, and the data that needs to be transparently transmitted can be transmitted to the target device without encoding and decoding the data that needs to be transparently transmitted multiple times, thereby shortening the communication time and improving the real-time performance of data transmission.
[0065] In one embodiment, determining the data that the current device needs to parse in the remote control data packet based on the at least one identifier includes:
[0066] If the identifier in the at least one identifier is a first identifier corresponding to detecting the device operating state, then determine the data corresponding to the first identifier in the remote control data packet as the data that the current device needs to parse; or,
[0067] If the identifier in the at least one identifier is a second identifier corresponding to feedbacking the device operating state, then determine the data corresponding to the second identifier in the remote control data packet as the data that the current device needs to parse; or
[0068] If the identifier in the at least one identifier is a third identifier corresponding to the feedback of the device operation state, the data corresponding to the third identifier in the remote control data packet is determined as the data that the current device needs to parse.
[0069] It can be understood that in a multi-device serial communication system based on remote control instructions, whether each device operates normally is of great significance for data output and transmission in the system. Therefore, a first identifier for detecting the device operation state can be predefined in a preset protocol, for example, ID = 1, for detecting whether all devices in the serial communication system operate normally. Similarly, a second identifier for feedbacking normal device operation, for example, ID = 2, or a third identifier for feedbacking abnormal device operation, for example, ID = 4, can also be predefined in the preset protocol, so that all devices can feedback the operation state of the device through the second identifier and the third identifier. Therefore, when all devices receive the data corresponding to the first identifier, the second identifier, or the third identifier, it can be determined as the data that the current device needs to parse.
[0070] In one embodiment, based on the at least one identifier, determining the data that the current device needs to transparently transmit in the remote control data packet includes:
[0071] If the identifier in the at least one identifier is a fourth identifier corresponding to data transmission, and the current device is an intermediate device during the data transmission process, the data corresponding to the fourth identifier is determined as the data that the current device needs to transparently transmit.
[0072] It can be understood that a fourth identifier corresponding to data transmission can be predefined in a preset protocol, and since each identifier can identify the flow direction of the corresponding data, the data corresponding to the fourth identifier can be transmitted to the last device in the data flow through one or more intermediate devices. Therefore, if the current device is an intermediate device, the data of the fourth identifier needs to be transparently transmitted to the target device, that is, the data of the fourth identifier is transparently transmitted to the next device in the data flow corresponding to the fourth identifier.
[0073] In one embodiment, determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction includes:
[0074] Parsing the data corresponding to the first identifier in the remote control data packet; generating a first instruction for detecting the operation state of the current device based on the data corresponding to the first identifier, detecting the operation state data of the current device based on the first instruction; saving the operation state data of the current device into the data of the second identifier or the third identifier corresponding to the current device.
[0075] In one embodiment, the remote control data packet further includes the version of the protocol and the number of identifiers, and the number of identifiers corresponding to different protocol versions is different.
[0076] It can be understood that the new version can add corresponding identifiers to add the identifiers not defined in the old version protocol, so as to identify new functions, thus ensuring the scalability of the protocol, so that the remote control data packet produced based on the protocol can transmit new information and make the data transmission more flexible.
[0077] In one embodiment, the data corresponding to the third identifier is the data for feedback when the device runs abnormally, and the data corresponding to the fourth identifier is the data for identifying the emergency braking control data of the remote control end. Accordingly, determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction, including: after the terminal device at the remote control end parses the data corresponding to the third identifier, generating an instruction to send a data packet containing the data corresponding to the fourth identifier to the terminal device at the controlled end, and generating and sending a data packet containing the data corresponding to the fourth identifier.
[0078] It can be understood that since the fourth identifier is used to identify data transmission, and the emergency braking control data of the remote control end needs to be transmitted from the remote control end to the controlled end, the intermediate device for transmission does not need to know what the emergency braking control data is and what it is used for. Therefore, in this embodiment, the fourth identifier can correspond to ID=8 in the following text, that is, after the terminal device at the remote control end, such as the operation console, receives the operation abnormal data of its own or other devices connecting the remote control end device and the controlled end device, it is necessary to perform emergency braking on the terminal device at the controlled end. Therefore, the terminal device at the remote control end sends a data packet containing the emergency braking control data to the terminal device at the controlled end.
[0079] In one embodiment, the data corresponding to the third identifier is the data for feedback when the device runs abnormally, and the data corresponding to the fourth identifier is the data for identifying the braking state data of the controlled end. Accordingly, determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction, including: the terminal device at the remote control end parses the data corresponding to the fourth identifier from the terminal device at the control end, determines the emergency braking state of the terminal device at the control end based on the data containing the data corresponding to the fourth identifier, and determines whether to restore the emergency braking position of the terminal device at the remote control end based on the emergency braking state.
[0080] It can be understood that since the fourth identifier is used to identify data transmission, and data transmission is a relatively broad category with diverse transmitted data, there can be multiple corresponding fourth identifiers. The braking state data of the controlled end needs to be transmitted from the controlled end to the remote control end, and the intermediate device for transmission does not need to know what the braking state data is and what it is used for. Therefore, in this embodiment, the fourth identifier can correspond to ID=16384 in the following text. That is, after the terminal device at the controlled end receives the emergency braking control data from the terminal device at the remote control end, the terminal device at the controlled end performs emergency braking based on the emergency braking control data, thereby obtaining the braking state data. After the terminal device at the control end obtains the braking state data, the terminal device at the control end can send a data packet containing the braking state data of the control end (a data packet containing the data corresponding to the fourth identifier) to the terminal device at the remote control end, so that the terminal device at the remote control end can parse and obtain the data corresponding to the fourth identifier from the terminal device at the control end, determine the emergency braking state of the terminal device at the control end based on the data corresponding to the fourth identifier, and determine whether to restore the emergency braking position of the terminal device at the remote control end based on the emergency braking state.
[0081] Among them, the emergency braking position of the terminal device at the remote control end is used to start or release the emergency braking of the controlled end.
[0082] It can be understood that the braking state data of the controlled end is one of the control state data of the controlled end. Therefore, similarly, other control state data of the controlled end can also be transmitted from the controlled end to the remote control end. Therefore, other control state data of the controlled end can also be identified by the fourth identifier. Specifically, it can correspond to the relevant data with ID=8192 in the following text. Among them, the control state data of the controlled end is the state data of the control end device collected after the controlled end executes corresponding operations in response to the operation control instructions from the remote control end.
[0083] In one embodiment, the data lengths of the data header and the data body in the preset protocol are both variable, and the data length of the data corresponding to the same identifier is variable.
[0084] Among them, the data header and the data body can specifically refer to the relevant descriptions in the following text, and will not be elaborated here for the time being.
[0085] It can be understood that data with different data lengths corresponding to the same identifier can be used to represent different meanings. Specific examples can refer to the relevant descriptions in Table 4 in the following text.
[0086] In one embodiment, the data body includes data units corresponding to multiple devices, each data unit includes the identifier corresponding to each device, and the identifier of the current device is determined based on the identifier corresponding to each device.
[0087] It can be understood that since data units are distinguished by unique IDs, such as sensor data or control data, both can be defined as a data unit. In a multi-device access system, a device can focus only on the data units it needs, improving the retrieval and processing efficiency.
[0088] In one embodiment, if the parsed remote control data packet contains an identifier that the current device cannot recognize, the current device only parses the data corresponding to the identifier that the current device can recognize.
[0089] It can be understood that in a multi-device serial communication system based on remote control instructions, each device can update and generate new functions at any time. Correspondingly, new content can be added to the new version of the protocol. Therefore, version parsing in the protocol needs to be backward compatible, that is, the high version can be compatible with the low version. In other words, the old version and the new version can expand the identifier type. When the old version encounters an unrecognizable identifier, it automatically ignores it, and the new version parses it normally. For the extended fields of the data body corresponding to the same identifier, the old version only takes the front old format fields, and the new version obtains the entire data body. This can be compatible with the old version to parse and execute according to the previous format.
[0090] It can also be understood that correspondingly, after the corresponding data is parsed, only the parsed data is processed, and the unparsed data is not processed.
[0091] In one embodiment, the data content corresponding to each identifier includes the length of the data and the specific value of the data.
[0092] It can be understood that the lengths of the data corresponding to different identifiers can be different or the same.
[0093] In one embodiment, the data type in the remote control data packet is a multi-device general data type.
[0094] It can be understood that a multi-device serial communication system based on remote control instructions includes multiple devices. For example, it can include embedded devices with real-time systems, high-performance artificial intelligence computing devices based on the Linux system, equipment related to the console system, vehicle controllers, etc. Multiple types of devices must have a unified communication data format to facilitate the access of various devices to the system. Therefore, the standard IEEE 754 floating-point number type can be used as the multi-device general data type, which can be correctly read under embedded systems, PC machines, and various systems. In line with the principle of being able to use it as soon as it is read, data encoding and decoding are not required, which improves the execution and processing efficiency to a certain extent.
[0095] Table 1 is a format schematic table of the pre-set protocol.
[0096] Table 1
[0097] Data content Data format Number of bytes Data header BIN Variable length Data body BIN Variable length
[0098] As shown in Table 1, the protocol consists of a variable-length data header and a variable-length data body. Among them, the variable-length data body is a multi-data unit structure. The multi-data unit structure is composed of data units corresponding to each device.
[0099] Among them, the data header is shown in Table 2 and may include important general information such as fixed values of feature bits, transmission protocol version, vehicle type identifier, data header length LEN = 12 + N, destination address, source address, transmission count, number of data unit IDs, data unit length, and others. Each data unit includes an identification ID and data content. A unique ID value is defined according to the control function and the data flow direction, and the corresponding data content is defined. The data content includes the data length and the specific data value.
[0100] Table 2
[0101]
[0102] Among them, the fixed value of the feature bit can be, for example, 0x0C 0x10, where 0x0C is transmitted first and then 0x10. The transmission protocol version is used to define the current transmission protocol version and can be, for example, V2.1. The vehicle type identifier is used to identify the type of vehicle and can be, for example: 1 excavator, 2 electric shovel, 3 loader, and 4 drill rig. The destination address indicates the address to which the current data packet will be transmitted, and the source address is the address from which the data packet is sent and can include, for example: 1: acquisition board, 2: operation console device, 128: vehicle main control board, 129: vehicle industrial control device, 255: broadcast address. Communication count: incremented by 1 each time it is sent, with a range of 0 to 255. The number of data unit IDs is used to indicate the number of data units included. Data unit length: the byte length of the data body (excluding the data header length). Also, when transmitting floating-point or 32- or 16-bit integer data, it can be defined to transmit the low byte first and then the high byte.
[0103] In addition, the data body defined by the protocol can adopt the following mode: the value of the identifier + the data length corresponding to the identifier + the specific value of the data. Therefore, when processing and parsing the data, the type can be determined according to the value of the identifier, the content can be determined according to the data length corresponding to the identifier, and the specific value of the data can be obtained. Among them, the data length corresponding to the identifier is variable. For the sake of understanding, the following is combined with Figure 2 An example is given to illustrate the data body defined by the protocol.
[0104] Exemplarily, let the value of the identifier be 1, that is, ID = 1, and its function can be understood as heartbeat detection, which is used to detect the operating state of the device to Figure 2Taking multiple devices in the framework schematic diagram of the multi-device serial communication system shown as an example, the interaction processes corresponding to the heartbeat detections of the acquisition board, the operation console, the industrial control computer, and the main control board are as follows Figure 4 as shown. As Figure 4 shown, in step 401, the operation console can send a data packet with ID = 1 to the acquisition board at a preset frequency. And in step 403, the operation console sends a data packet with ID = 1 to the industrial control computer to detect whether the acquisition board and the industrial control computer are operating normally. In addition, corresponding to step 405, the industrial control computer can also send a data packet with ID = 1 to the main control board at a preset frequency to detect whether the main control board is operating normally. Among them, the data body corresponding to ID = 1 is shown in Table 3 below.
[0105] Table 3
[0106] Data content Data format Number of bytes ID = 1 BIN 2 LEN = 4 BIN 2
[0107] As shown in Table 3, the data length corresponding to ID = 1 can be 4, that is, LEN = 4.
[0108] In addition, after the operation console sends a data packet with ID = 1 to the acquisition board and the industrial control computer, and after the industrial control computer sends a data packet with ID = 1 to the main control board, the current status of the other party can be judged according to the response of the other party.
[0109] As Figure 4 shown, when the other party receives normally, it can give a response data with ID = 2. For example, in step 402, when the acquisition board receives normally, it can send the response data with ID = 2 to the operation console at a preset frequency; and in step 404, when the industrial control computer receives normally, it can send the response data with ID = 2 to the operation console at a preset frequency. In addition, corresponding to step 406, when the main control board receives normally, it can also send the response data with ID = 2 to the industrial control computer at a preset frequency.
[0110] When the other party receives abnormally, it can give a status log data with ID = 4. As Figure 4As shown, in step 402', when the acquisition board receives an anomaly, it can send status log data with ID = 4 to the operation console at a preset frequency; and in step 404', when the industrial control computer receives an anomaly, it can send status log data with ID = 4 to the operation console at a preset frequency. In addition, corresponding to step 406', when the main control board receives an anomaly, it can also send status log data with ID = 4 to the industrial control computer at a preset frequency. ID = 4 rule: For whichever module detects a problem, send it (not send when not connected to the operation console) to the operation console at a preset frequency. After the operation console receives it, it will display an alarm reminder in real time. If no more data is received after 3 seconds, the alarm will automatically stop and return to normal. Specifically, the transfer processes of the response data and the status log data correspond to the heartbeat data, which can be from the acquisition board to the operation console, from the industrial control computer to the operation console, or from the main control board to the industrial control computer. Among them, the data body corresponding to ID = 2 is shown in Table 4 below; the data body corresponding to ID = 4 is shown in Table 5 below.
[0111] Table 4
[0112] Data content Data format Number of bytes ID = 2 BIN 2 LEN = 7 or 11 BIN 2 Confirmed ID BIN 2 Confirmed transmission count BIN 1 Execution result BIN 4
[0113] Among them, LEN = 7 indicates no execution result, or when LEN = 11 and the execution result is all 0, it indicates successful reception: when LEN = 11 and the execution result is not 0, it indicates failure.
[0114] Table 5
[0115] Data content Data format Number of bytes ID = 4 BIN 2 LEN = 6 BIN 2 Error reporting device address BIN 1 Error type information BIN 1
[0116] Among them, the error device address corresponds to the source address in the data header. Specifically, the status log data with ID = 4 can be used to record the status and error information of the logs (including the acquisition board, operation console, industrial control computer, main control board), and is transmitted in digital form. Each device has its own digital / log comparison table. It is mainly used for error troubleshooting, log storage, etc.
[0117] It can be understood that the above ID = 1 can correspond to the first identifier in the previous text, ID = 2 can correspond to the second identifier in the previous text, and ID = 4 can correspond to the third identifier in the previous text.
[0118] In addition, an identifier for setting emergency braking can also be defined, such as ID = 8. After the shovel-end vehicle completely stops and the heartbeat detection link is normal, the emergency braking position of ID = 8 is cancelled. Among them, the data body corresponding to ID = 8 is shown in Table 6 below.
[0119] Table 6
[0120] Data content Data format Number of bytes ID = 8 BIN 2 LEN = 56 BIN 2 Emergency brake BIN 1
[0121] Among them, when the value of the emergency brake is 0, it indicates normal, and when the value of the emergency brake is 1, it indicates that an emergency brake is being performed. The ID=8 data is continuously sent by the acquisition board at a fixed frequency interval of 20HZ after obtaining data from the handle or foot pedal, etc., and is transparently transmitted through the operation console and the industrial control computer. Finally, the main control board receives the information and parses and executes the operation.
[0122] In addition, an identifier can also be defined for the acquisition board to obtain and display the control status data of the shovel-end vehicle. For example, ID=8192. Specifically, the main control board can collect the vehicle status data, send a data packet containing ID=8192 to the industrial control computer, then the industrial control computer forwards the data corresponding to ID=8192 to the operation console, and then the operation console forwards the data corresponding to ID=8192 to the acquisition board. The acquisition board receives the information and parses and executes the operation. Among them, the data body corresponding to ID=8192 is shown in Table 7 below.
[0123] Table 7
[0124] Data content Data format Number of bytes ID = 8192 BIN 2 LEN = 6 BIN 2 To be determined BIN 2
[0125] In addition, an identifier can also be defined for the operation console to obtain and display the on-site data and sensor data of the shovel-end vehicle equipment and to determine whether to release the emergency brake. For example, ID=16384. Specifically, the main control board can collect the vehicle on-site data and sensor data, encapsulate the vehicle on-site data and sensor data into the data corresponding to ID=16384, send a data packet containing ID=16384 to the industrial control computer, then the industrial control computer forwards the data corresponding to ID=16384 to the operation console, and the operation console receives, parses and displays the status data. It can be understood that the on-site data and sensor data of the shovel-end vehicle equipment can reflect the braking state of the shovel-end vehicle equipment. Among them, the data body corresponding to ID=16384 is shown in Table 8 below.
[0126] Table 8
[0127] Data content Data format Number of bytes ID = 16384 BIN 2 LEN = 8 BIN 2 Emergency brake status BIN 1
[0128] Among them, when the value of the emergency brake state is 0, it indicates normal; when the value of the emergency brake is 1, it indicates that an emergency brake is in progress; when the value of the emergency brake state is 2, it indicates that the emergency brake is completed.
[0129] It can also be understood that the above-mentioned identifiers correspond to the interaction processes between the corresponding acquisition board, operation console, industrial control computer and main control board. However, in the corresponding interaction processes, some devices need to transparently transmit the data corresponding to the relevant identifiers, and some devices need to parse the data of the relevant identifiers. Specifically, as shown in Table 9 below.
[0130] Table 9
[0131] ID Acquisition board Operating console Industrial control computer Main control board 1 Parse Parse Parse Parse 2 Parse Parse Parse Parse 4 Parse Parse Parse Parse 8 Parse Transparent transmission Transparent transmission Parse 8192 Parse Transparent transmission Transparent transmission Parse 16384 Parse Transparent transmission Parse
[0132] Combined with the above-defined identifiers 8, 8192, and 16384, it gives Figure 5 , Figure 6 and Figure 7 a schematic diagram of the interaction process between the acquisition board, the operation console, the industrial control computer, and the main control board in
[0133] As Figure 5 shown, after the acquisition board obtains data from the handle or foot pedal, etc., it encapsulates the data into the data corresponding to ID = 8. In step 501, it continuously sends data packets containing ID = 8 to the operation console at a fixed frequency interval of 20HZ; in step 502, when the heartbeat detection is normal, the operation console forwards the data packet containing ID = 8 from the acquisition board to the industrial control computer. In step 503, when the heartbeat detection is normal, the industrial control computer forwards the data packet containing ID = 8 from the acquisition board to the main control board. Finally, the main control board receives the information and parses and executes the operation.
[0134] It can be understood that corresponding to step 502, if the operation console simultaneously monitors that it has not received a heartbeat for 5 consecutive times, the operation console prompts an alarm (500ms freezing period), and when the heartbeat of the operation console is abnormal, step 502' is executed. In step 502', the operation console constructs its own ID = 8 to set the emergency braking position, and the operation console waits to receive the emergency braking state in ID16384 to indicate the current vehicle braking state.
[0135] As Figure 6 shown, after the main control board obtains the control state data of the vehicle at the shovel end, it encapsulates the control state data into the data corresponding to ID = 8192. In step 601, it continuously sends data packets containing the control state data of the vehicle at the shovel end with ID = 8192 to the industrial control computer at a fixed frequency interval of 20HZ; in step 602, the industrial control computer forwards the data packet with ID = 8192 from the main control board to the operation console. In step 603, when the heartbeat detection is normal, the operation console forwards the data packet with ID = 8192 from the main control board to the acquisition board. Finally, the acquisition board receives the information and parses and executes the operation.
[0136] As mentioned above, in step 502', the operation console constructs its own ID = 8 to set the emergency braking position, and the operation console waits to receive the emergency braking state in ID = 16384 to indicate the current vehicle braking state. Therefore, as Figure 7 shown, after the main control board acquires the on-site data and sensor data of the vehicle at the shovel end, it encapsulates the on-site data and sensor data into the data corresponding to ID = 16384. In step 701, it continuously sends the on-site data and sensor data of the vehicle equipment at the shovel end with ID = 16384 at a fixed frequency interval of 20HZ. In step 702, it transparently transmits ID = 16384 to the operation console through the industrial control computer. Finally, the operation console receives ID = 16384, parses ID = 16384, and displays it on the screen.
[0137] It can be understood that the identifiers corresponding to the above-mentioned labels 8, 8192, and 16384 all correspond to the fourth identifier in the above text. The intermediate device involved can transparently transmit the data to be transmitted.
[0138] It can also be understood that the label values corresponding to all the above-mentioned predefined identifiers can be changed, and the user can add corresponding identifiers according to their own needs.
[0139] The multi-device serial communication system based on remote control instructions provided by the present invention will be described below. The multi-device serial communication system based on remote control instructions described below can be correspondingly referred to the multi-device serial communication method based on remote control instructions described above.
[0140] As Figure 8 shown, in one embodiment, a multi-device serial communication system based on remote control instructions is provided. The multi-device serial communication system based on remote control instructions may include:
[0141] A receiving module 810, configured to receive a remote control data packet, where the remote control data packet is determined based on a pre-set protocol;
[0142] A parsing module 820, configured to parse the remote control data packet to determine at least one identifier; different identifiers are used to distinguish different control functions and to identify the data flow direction;
[0143] A first processing module 830, configured to determine the data that the current device needs to parse in the remote control data packet based on the at least one identifier; determine a control instruction of the current device based on the data that the current device needs to parse, and perform corresponding operations based on the control instruction;
[0144] A second processing module 840, configured to determine the data that the current device needs to transparently transmit in the remote control data packet based on the at least one identifier, and transparently transmit the data that the current device needs to transparently transmit to a target device.
[0145] The multi-device serial communication system based on remote control instructions provided by the present invention determines at least one identifier for distinguishing different control functions and identifying the data flow direction by receiving and parsing remote control data packets determined based on a pre-set protocol. Then, according to the at least one identifier, the data that needs to be parsed by the current device and the data that needs to be transparently transmitted by the current device can be obtained. Further, corresponding operations are performed based on the data that needs to be parsed by the current device, and the data that needs to be transparently transmitted by the current device is transparently transmitted. Based on the foregoing method, since it is possible to determine which data in the data packet needs to be parsed and which data needs to be transparently transmitted according to the at least one identifier, in the multi-device serial communication system based on remote control instructions, both the devices that need to transparently transmit and the devices that need to parse can use the foregoing method for communication. And since multiple devices use the same protocol, not only can the development cycle be shortened, but for the intermediate devices in data transmission, the data that needs to be transparently transmitted can be directly determined, and the data that needs to be transparently transmitted is transmitted to the target device, without encoding and decoding the data that needs to be transparently transmitted multiple times, thereby shortening the communication time and improving the real-time performance of data transmission.
[0146] In one embodiment, the first processing module 830 includes:
[0147] A first determination unit, configured to, if the identifier in the at least one identifier is a first identifier corresponding to detecting the device operating state, determine the data corresponding to the first identifier in the remote control data packet as the data that needs to be parsed by the current device; or,
[0148] A second determination unit, configured to, if the identifier in the at least one identifier is a second identifier corresponding to feedbacking the device operating state, determine the data corresponding to the second identifier in the remote control data packet as the data that needs to be parsed by the current device; or
[0149] A third determination unit, configured to, if the identifier in the at least one identifier is a third identifier corresponding to feedbacking the device operating state, determine the data corresponding to the third identifier in the remote control data packet as the data that needs to be parsed by the current device.
[0150] In one embodiment, the second processing module 840 includes:
[0151] A fourth determination unit, configured to, if the identifier in the at least one identifier is a fourth identifier corresponding to data transmission and the current device is an intermediate device in the data transmission process, determine the data corresponding to the fourth identifier as the data that needs to be transparently transmitted by the current device.
[0152] In one embodiment, the second processing module 840 includes:
[0153] A parsing unit for parsing the data corresponding to the first identifier in the remote control data packet;
[0154] A first processing unit for generating a first instruction for detecting the operating state of the current device based on the data corresponding to the first identifier, and detecting the operating state data of the current device based on the first instruction;
[0155] A storage unit for storing the operating state data of the current device into the data corresponding to the second identifier or the third identifier of the current device.
[0156] In one embodiment, the remote control data packet further includes the version of the protocol and the number of identifiers, and the number of identifiers corresponding to different protocol versions is different.
[0157] In one embodiment, the data corresponding to the third identifier is data for feedback when the device runs abnormally, and the data corresponding to the fourth identifier is data for identifying the emergency braking control data of the remote control end. Accordingly, the first processing module 830 further includes:
[0158] A sending module for generating an instruction to generate and send a data packet containing the data corresponding to the fourth identifier to the terminal device of the controlled end after the terminal device of the remote control end parses the data corresponding to the third identifier, and generating and sending a data packet containing the data corresponding to the fourth identifier.
[0159] In one embodiment, the data corresponding to the third identifier is data for feedback when the device runs abnormally, and the data corresponding to the fourth identifier is data for identifying the braking state data of the controlled end. Accordingly, the first processing module 830 further includes: a second processing unit for the terminal device of the remote control end to parse the data corresponding to the fourth identifier from the terminal device of the control end, determine the emergency braking state of the terminal device of the control end based on the data containing the fourth identifier, and determine whether to restore the emergency braking position of the terminal device of the remote control end based on the emergency braking state.
[0160] In one embodiment, if the remote control data packet contains an identifier that the current device cannot recognize, the current device only parses the data corresponding to the identifier that the current device can recognize.
[0161] In one embodiment, the data content corresponding to each identifier includes the length of the data and the specific value of the data.
[0162] In one embodiment, the data type in the remote control data packet is a data type common to multiple devices.
[0163] Figure 9 Illustrates a schematic diagram of the physical structure of an electronic device, such as Figure 9As shown in the figure, the electronic device may include: a processor 910, a communications interface 920, a memory 930, and a communication bus 940. Among them, the processor 910, the communications interface 920, and the memory 930 complete communication with each other through the communication bus 940. The processor 910 may call the logical instructions in the memory 930 to execute a multi-device serial communication method based on a remote control instruction. The method includes: receiving a remote control data packet, where the remote control data packet is determined based on a pre-set protocol; parsing the remote control data packet to determine at least one identifier; different identifiers are used to distinguish different control functions and to identify the data flow direction; based on the at least one identifier, determining the data that the current device needs to parse in the remote control data packet; determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction; or, based on the at least one identifier, determining the data that the current device needs to transparently transmit in the remote control data packet, and transparently transmitting the data that the current device needs to transparently transmit to the target device.
[0164] In addition, when the logical instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0165] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the multi-device serial communication method based on remote control instructions provided by the present invention. The multi-device serial communication method based on remote control instructions includes: receiving a remote control data packet, which is determined based on a pre-set protocol; parsing the remote control data packet to determine at least one identifier; different identifiers are used to distinguish different control functions and to identify the data flow direction; based on the at least one identifier, determining the data that the current device needs to parse in the remote control data packet; determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction; or, based on the at least one identifier, determining the data that the current device needs to transparently transmit in the remote control data packet, and transparently transmitting the data that the current device needs to transparently transmit to the target device.
[0166] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the multi-device serial communication method based on remote control instructions provided by the present invention. The multi-device serial communication method based on remote control instructions includes: receiving a remote control data packet, which is determined based on a pre-set protocol; parsing the remote control data packet to determine at least one identifier; different identifiers are used to distinguish different control functions and to identify the data flow direction; based on the at least one identifier, determining the data that the current device needs to parse in the remote control data packet; determining the control instruction of the current device based on the data that the current device needs to parse, and performing corresponding operations based on the control instruction; or, based on the at least one identifier, determining the data that the current device needs to transparently transmit in the remote control data packet, and transparently transmitting the data that the current device needs to transparently transmit to the target device.
[0167] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0168] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0169] It can be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A multi-device serial communication method based on remote control instructions, characterized in that, The method includes: Receiving a remote control data packet, which is determined based on a pre-set protocol; Parsing the remote control data packet to determine at least one identifier; the at least one identifier is used to distinguish different control functions, identify the data flow direction, and whether to perform transparent transmission; Based on the at least one identifier, determining the data that the current device needs to transparently transmit in the remote control data packet, and transparently transmitting the data that the current device needs to transparently transmit to the target device, without any processing on the data to be transparently transmitted, including: If the identifier in the at least one identifier is the fourth identifier corresponding to data transmission, and the current device is an intermediate device during the data transmission process, then determining the data corresponding to the fourth identifier as the data that the current device needs to transparently transmit, and transparently transmitting the data to be transparently transmitted to the target device in the data flow direction of the identifier corresponding to the fourth identifier; If the current device is the target device during the data transmission process, then parsing the data corresponding to the fourth identifier, determining the control instruction of the target device, and performing corresponding operations based on the control instruction.
2. The multi-device serial communication method based on remote control instructions according to claim 1, wherein, The remote control data packet also includes the version of the protocol and the number of identifiers, and the number of identifiers corresponding to different protocol versions is different.
3. The multi-device serial communication method based on remote control instructions according to claim 1, characterized in that, The data corresponding to the fourth identifier is the braking state data used to identify the controlled end. Correspondingly, parsing the data corresponding to the fourth identifier, determining the control instruction of the target device, and performing corresponding operations based on the control instruction includes: the terminal device at the remote control end parses the data corresponding to the fourth identifier from the terminal device at the control end, determines the emergency braking state of the terminal device at the control end based on the data corresponding to the fourth identifier, and determines whether to restore the emergency braking position of the terminal device at the remote control end based on the emergency braking state.
4. A multi-device serial communication system based on remote control instructions, characterized in that, The system includes: A receiving module, configured to receive a remote control data packet, which is determined based on a pre-set protocol; A parsing module, configured to parse the remote control data packet to determine at least one identifier; the at least one identifier is used to distinguish different control functions, identify the data flow direction, and whether to perform transparent transmission; A second processing module, configured to determine the data that the current device needs to transparently transmit in the remote control data packet based on the at least one identifier, and transparently transmit the data that the current device needs to transparently transmit to the target device, without any processing on the data to be transparently transmitted, including: If the identifier in the at least one identifier is the fourth identifier corresponding to data transmission, and the current device is an intermediate device during the data transmission process, then determining the data corresponding to the fourth identifier as the data that the current device needs to transparently transmit, and transparently transmitting the data to be transparently transmitted to the target device in the data flow direction of the identifier corresponding to the fourth identifier; If the current device is the target device during the data transmission process, then parsing the data corresponding to the fourth identifier, determining the control instruction of the target device, and performing corresponding operations based on the control instruction.
5. A computer device, comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, characterized in that, When the computer-readable instructions are executed by the processor, the processor is caused to perform the steps of the multi-device serial communication method based on remote control instructions as described in any one of claims 1 to 3.
6. A storage medium storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the multi-device serial communication method based on remote control instructions as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Data transmission method, device and equipment and computer readable storage medium
CN109995482A
Vehicle control method and device
CN110682918A