CN111277580B - Node data sending method, receiving method and transmission method - Google Patents

Node data sending method, receiving method and transmission method Download PDF

Info

Publication number
CN111277580B
CN111277580B CN202010039403.2A CN202010039403A CN111277580B CN 111277580 B CN111277580 B CN 111277580B CN 202010039403 A CN202010039403 A CN 202010039403A CN 111277580 B CN111277580 B CN 111277580B
Authority
CN
China
Prior art keywords
data
node
transmission mode
heartbeat
data transmission
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
CN202010039403.2A
Other languages
Chinese (zh)
Other versions
CN111277580A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN202010039403.2A priority Critical patent/CN111277580B/en
Publication of CN111277580A publication Critical patent/CN111277580A/en
Application granted granted Critical
Publication of CN111277580B publication Critical patent/CN111277580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Abstract

The application provides a node data sending method, a node data receiving method and a node data transmission method. Obtaining valid data; acquiring a data transmission mode for transmitting information with a data receiver; acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; according to the data transmission mode, a data generation protocol is adopted to package the effective data, so that data to be sent which are suitable for data transmission mode transmission and at least comprise attribute information and the effective data are formed; and sending the data to be sent to a data receiver through the data transmission mode. The node data sending method can be compatible with various different interfaces and different components.

Description

Node data sending method, receiving method and transmission method
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a node data sending method, a node data receiving method, and a node data transmission method.
Background
With the progress of modern technology, unmanned systems (unmanned aerial vehicles, ground-free mobile robots and the like) increasingly represent huge application values. Due to the limitations of a single unmanned system, it becomes increasingly important for multiple unmanned systems to cooperate with each other. A key technical link of mutual cooperation of unmanned systems is mutual transmission of data. While it can be seen from the general system framework that current unmanned systems have, it has the following notable specificities:
1. a large number of different types of sensors, computing units, drive actuators, etc. are arranged within the system.
Such as inertial sensors, temperature sensors, pressure sensors, displacement sensors, vision sensors, single-chip microcomputers, single-board computers, PCs, servo motors, steering engines, hydraulic actuators, etc.
2. The different components have different communication interfaces.
Such as asynchronous serial port, synchronous serial port, I2C, CAN, Ethernet, etc
3. Different components have different computing and storing capabilities.
For example, the low-performance embedded processing unit has only KByte memory and several MHz processing performance, the high-performance embedded processing unit may have several GByte memory and several hundred MHz or even 2GHz processing performance, and the x86 system in the system may even have several hundred GB memory and several tens of cores of processors.
4. The data transmitted in the system has different frequency, delay, data volume, reliability, unicast and multicast requirements.
As general status data commonly has: high frequency, low delay, medium data volume, low reliability and multicast characteristic requirements.
The key status data generally has: low frequency, high reliability and multicast characteristic requirements.
General parameter data generally have: medium frequency, low delay, low reliability, and unicast characteristics.
The key parameter data generally has: low frequency, high reliability and unicast property.
However, in the prior art, there is no data transmission method which is considered for the data characteristics of the unmanned system, optimized for the application of the unmanned system, and capable of unifying a plurality of different interfaces and a plurality of different transmission modes.
Accordingly, a technical solution is desired to overcome or at least alleviate at least one of the above-mentioned drawbacks of the prior art.
Content of application
The present application aims to provide a node data transmission method to overcome or at least mitigate at least one of the above-mentioned deficiencies of the prior art.
In order to achieve the above object, the present application provides a node data sending method for an unmanned system, where the node data sending method includes: obtaining valid data; acquiring a data transmission mode for transmitting information with a data receiver; acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; generating data packet length information according to the data packet length part and a data transmission mode; generating initial mark information according to the initial mark part and the data transmission mode; generating error flag information according to the error flag part and the data transmission mode; generating attribute information according to the data part and the data transmission mode; according to the data transmission mode, a data generation protocol is adopted to package the effective data, so that data to be sent which are suitable for data transmission mode transmission and at least comprise attribute information and the effective data are formed; and sending the data to be sent to a data receiver through the data transmission mode.
Optionally, the data transmission method for acquiring the information transmitted by the data receiver includes: acquiring an equipment list; acquiring equipment ID and interface information provided by a data receiver; and acquiring a data transmission mode according to the equipment ID and the interface information.
Optionally, the data transmission mode includes a TCP transmission mode, a UDP transmission mode, a UART transmission mode, and a CAN transmission mode.
Optionally, the encapsulating, according to the data transmission mode, the valid data by using a data generation protocol, so as to form data to be sent, which is suitable for data transmission mode transmission and at least includes attribute information and valid data, includes: when the data transmission mode is a TCP transmission mode, a data generation protocol is adopted to package the effective data, so that data to be sent suitable for transmission in the TCP transmission mode is formed, and the data to be sent comprises the effective data, data packet length information, initial mark information and attribute information; when the data transmission mode is a UDP transmission mode, a data generation protocol is adopted to package the effective data, so that data to be sent suitable for the UDP transmission mode is formed, and the data to be sent comprises the effective data and attribute information; when the data transmission mode is a UART transmission mode, a data generation protocol is adopted to package the effective data so as to form data to be sent suitable for the UART transmission mode, wherein the data to be sent comprises the effective data, data packet length information, initial mark information, error mark information and attribute information; and when the transmission mode is a CAN transmission mode, packaging the effective data by adopting a data generation protocol so as to form data to be transmitted, wherein the data to be transmitted comprises the effective data, initial mark information and attribute information.
Optionally, the start flag information includes start character information; the data packet length information comprises packet length information; the attribute information comprises source ID information, source component ID information, target component ID information and packet type information; the error flag information includes check code information.
Optionally, each piece of information in the attribute information is arranged in a manner of continuous arrangement across bytes.
The application also provides a node data receiving method, which is used for an unmanned system and comprises the following steps: acquiring a data transmission mode for transmitting information with a data transmitter; receiving data to be sent by a data sender according to the data transmission mode; acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; generating data packet length information according to the data packet length part and a data transmission mode; generating initial mark information according to the initial mark part and the data transmission mode; generating error flag information according to the error flag part and the data transmission mode; generating attribute information according to the data part and the data transmission mode; and analyzing the data to be sent according to the data transmission mode so as to obtain effective data.
The application also provides a node data transmission method, which is used for an unmanned system, wherein the unmanned system comprises a plurality of nodes, and the nodes are connected in a mode without loop; the node data transmission method comprises the following steps: any node generates a heartbeat data packet and selectively sends the heartbeat data packet to the node connected with the node through the node data sending method; each node receiving the heartbeat data packet updates a self equipment connection list according to a preset rule through the heartbeat data packet and selectively forwards the heartbeat data packet; any node which updates the own equipment connection list or generates the heartbeat data packet can selectively send data to be sent to the node connected with the node through the node data sending method; each node receiving data to be transmitted receives the valid data by the node data receiving method according to claim 7.
Optionally, the step of updating, by each node that receives the heartbeat packet according to a preset rule through the heartbeat packet, a device connection list of the node itself and selectively forwarding the heartbeat packet includes: judging whether the equipment ID in the received heartbeat data packet is in an equipment connection list of the node or not, if not, adding the data content of the node sending the heartbeat data packet in the equipment connection list; if yes, judging the relation between the TTL value in the heartbeat data packet and the TTL value in the equipment connection list of the node, and if the TTL value in the heartbeat data packet is larger than the TTL value in the equipment connection list of the node, updating the equipment connection list and forwarding the heartbeat data packet; and if the TTL value in the heartbeat data packet is equal to the TTL value in the equipment connection list of the node, updating the equipment connection list.
Optionally, the selectively sending, by any node that updates its own device connection list or generates the heartbeat packet, data to be sent to the node connected to the node through the node data sending method as described above includes: when the nodes connected with the nodes have a data transmission mode capable of carrying out multicast mode transmission and a data transmission mode capable of carrying out point-to-point mode transmission, judging the transmission mode required to be transmitted; if the transmission mode is a broadcast mode, transmitting by adopting a data transmission mode capable of transmitting in a multicast mode; if the transmission method is a point-to-point transmission method, the data is transmitted by using a data transmission method capable of performing point-to-point transmission.
The node data sending method has the following advantages:
1. can be compatible with various interfaces and different components.
2. The realization complexity is low, and the method is friendly to low-performance units.
3. Good reliability for low frequency data (relaxed delay requirements) and lower delay for high frequency data (relaxed reliability requirements).
4. The method can efficiently transmit smaller data packets, namely, the data coding efficiency is high and the bandwidth utilization rate is high.
5. The method can realize transmission of large data packets and ensure the support of certain variable-length data transmission.
6. Unicast and multicast are supported, and point-to-point communication and point-to-multipoint communication can be realized.
7. Self-discovery, a component may automatically discover other components and automatically generate a network path table.
Drawings
Fig. 1 is a flowchart illustrating a node data transmission method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a node data receiving method in an embodiment of the present application.
Fig. 3 is a flowchart illustrating a node data transmission method according to an embodiment of the present application.
Fig. 4 is a network topology diagram of the node data transmission method shown in fig. 3.
Detailed Description
In order to make the implementation objects, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below with reference to the drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are a subset of the embodiments in the present application and not all embodiments in the present application. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
It should be noted that the terms "first" and "second" in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Fig. 1 is a flowchart illustrating a node data transmission method according to an embodiment of the present application. Fig. 2 is a schematic flow chart of a node data receiving method in an embodiment of the present application. Fig. 3 is a flowchart illustrating a node data transmission method according to an embodiment of the present application.
The node data transmission method shown in fig. 1 includes:
step 101: obtaining valid data;
step 102: acquiring a data transmission mode for transmitting information with a data receiver;
step 103: acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; generating data packet length information according to the data packet length part and a data transmission mode; generating initial mark information according to the initial mark part and the data transmission mode; generating error flag information according to the error flag part and the data transmission mode; generating attribute information according to the data part and the data transmission mode;
step 104: according to the data transmission mode, a data generation protocol is adopted to package the effective data, so that data to be sent which are suitable for data transmission mode transmission and at least comprise attribute information and the effective data are formed;
step 105: and sending the data to be sent to a data receiver through the data transmission mode.
The data generation protocol of the present application includes only the five parts described above, and therefore, there are fewer items relative to other protocols, thereby saving space.
In this embodiment, the start flag information includes start character information; the data packet length information includes packet length information; the attribute information includes source ID information, source component ID information, destination component ID information, packet type information; the error flag information includes check code information.
In the present embodiment, the start flag portion is constituted by:
Figure BDA0002367202160000071
the start flag portion is used to identify the start of the packet in the streaming interface, for a total of 2 bytes.
In this embodiment, the packet length part is composed of:
Figure BDA0002367202160000072
the packet length part is used for indicating the packet length, and the range of the packet length is limited to 1-256 bytes according to the range of the value.
In the present embodiment, the error flag portion is constituted by:
field(s) Name (R) Length of Range Description of the invention
CRC16(CC) Check code 2Byte Check code
The error mark part is used for carrying out data error identification in the interface with partial no data transmission error guarantee. The encoding algorithm used is CRC16, the PA, PK parts are calculated.
In the present embodiment, the attribute section is constituted by:
Figure BDA0002367202160000073
Figure BDA0002367202160000081
the attribute part is packet attribute, and is continuously arranged across bytes according to bits, and the total number of the bytes is 3 bytes. The attributes of the packet are labeled, with device IDs used to distinguish between different devices and component IDs used to distinguish between different device types. A device may have multiple physical/logical components. The same component ID represents the same component function. By adopting the mode, the structure is compact in arrangement, and the space is saved.
The agreed EID represents the device ID to denote SID/TID, and when TID is 0, all devices are represented, and when SID is 0, unknown devices are represented. CID stands for component ID refers to SCID/TCID, and TCID 0 stands for all components and SCID 0 stands for unknown component. TCID and SCID can not be 0 at the same time.
And PT represents that the data organization mode in the Package defined later in the data packet is different, and is used for being compatible with more data organization methods.
In the present embodiment, the valid data is constituted by:
field(s) Name (R) Length of Range Description of the invention
DataID(DID) Data ID 1Byte Data ID
Data(DT) Data of 0~255Byte Data of
The data organization form described above is a data organization mode when PT is 0, and may be additionally set as needed when PT is equal to other values.
The Data carried by Data in the valid Data information is defined by specific application cases and is distinguished by using DID. However, it should be noted that different CIDs have different DID definition tables, i.e. different functional components have different data definition tables. And determines a CID for resolving a DID with the TCID when the TCID is not 0 and determines a CID for resolving a DID with the SCID when the TCID is 0.
In this embodiment, the data transmission method for acquiring the information transmitted by the data receiver includes:
acquiring an equipment list;
acquiring equipment ID and interface information provided by a data receiver;
and acquiring a data transmission mode according to the equipment ID and the interface information.
In one embodiment, the device ID and the interface information provided by the data receiving side are obtained by means of a heartbeat data packet.
In this embodiment, the data transmission mode includes a TCP transmission mode, a UDP transmission mode, a UART transmission mode, and a CAN transmission mode;
the data transmission protocol comprises: TCP transport protocol, UDP transport protocol, UART transport protocol, and CAN transport protocol.
In actual use, the following rules are adopted for transmission:
data part TCP UDP UART CAN
ST (initial mark information)
PL (packet length information)
PA (Attribute information)
PK (effective data information)
CC (error sign information)
In this embodiment, according to the data transmission mode, encapsulating the valid data by using a data generation protocol, so as to form data to be transmitted, which is suitable for the data transmission mode to transmit and includes at least attribute information and the valid data, includes:
and when the transmission mode is a TCP transmission mode, the effective data is encapsulated by adopting a data generation protocol, so that data to be sent suitable for the TCP transmission mode is formed, and the data to be sent comprises the effective data, the length information of the data packet, the initial mark information and the attribute information.
Specifically, when transmitting in the TCP interface, since TCP is streaming, ST and PL are included in order to identify the start position and length, and since TCP has checked data, CC is not included. PA, PK are the core and are carried data and must be contained in all interfaces. These 4 parts of data are in turn pushed into the TCP data stream for transmission.
And when the transmission mode is a UDP transmission mode, the effective data is encapsulated by adopting a data generation protocol, so that the data to be sent suitable for being transmitted by the TCP transmission mode is formed, and the data to be sent comprises the effective data and the attribute information.
Specifically, in the case of transmission in UDP, since UDP is packet-based transmission, it is not necessary to identify the start position and length and therefore it is not necessary to include ST and PL, and UDP does not need to include CC since it has already checked the packet. Therefore, only PA and PK are included. The two parts are sent out in the same packet using UDP after being put into the same buffer in turn.
And when the transmission mode is a UART transmission mode, packaging the effective data by adopting a data generation protocol so as to form data to be transmitted which is suitable for being transmitted by a TCP transmission mode, wherein the data to be transmitted comprises the effective data, the length information of a data packet, the initial mark information, the error mark information and the attribute information.
Specifically, during UART transmission, the UART is streaming and has no check guarantee, so that the UART includes 5 parts ST, PL, PA, PK, CC, and sequentially transmits them in byte code.
And when the transmission mode is a CAN transmission mode, the effective data is encapsulated by adopting a data generation protocol, so that data to be transmitted which is suitable for being transmitted in a TCP transmission mode is formed, and the data to be transmitted comprises the effective data, the initial mark information and the attribute information.
Specifically, when the CAN interface transmits, because the characteristics of the CAN frame are greatly different from the other interfaces, and the data length of the CAN frame is only 8 bytes at most. Therefore, packet transmission is required. The following is the organization of part of the data in the CAN frame.
The frame ID, in extended form, is 29 Bit. The following table was followed to store the various items in order.
Figure BDA0002367202160000101
The CAN frame Data entry is in the form of a Data packet (i.e., no remote frame form is used). Each packet stores up to 8 bytes of data, the specific length being determined by the frame DLC entry.
When Data is transmitted, due to the fact that the maximum length of the PK is 256 bytes, the PK Data are sequentially placed in the Data part of 32 CAN frames at most. And in each CAN frame of the same PK, the DS items are sequentially reduced to the value 1 from large to small, and the last packet is reduced to 0, which represents the end of packet transmission. The starting value of DS is determined by dividing the length of PK by 8 and rounding up to-1 (maximum 31 corresponds to the value range of DS).
The node data sending method realizes the support of the most common interfaces in the fields of industry and unmanned systems, can be continuously expanded subsequently, and can realize data transmission across different interfaces.
The analysis of the data organization form requires 8 bytes additionally for bearing one data packet in the worst case, provides higher packet transmission coding efficiency, well supports small data packets, and realizes the high-efficiency transmission of small packets.
The transmission capability of the long packet of the CAN bus is well expanded by supporting the transmission of 256Byte long data to the maximum extent. The effective transmission of the general unmanned system long packet can be realized.
The designed data structure has simple form, is convenient to realize, has low requirements on processing performance and storage space, and is friendly to low-performance units.
The application also provides a node data receiving method for the unmanned system, and the node data receiving method comprises the following steps:
step 201: acquiring a data transmission mode for transmitting information with a data transmitter;
step 202: receiving data to be sent by a data sender according to a data transmission mode;
step 203: acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; the method comprises the steps that data packet length information can be generated according to a data packet length part and a data transmission mode; generating initial mark information according to the initial mark part and the data transmission mode; error flag information can be generated according to the error flag part and the data transmission mode; generating attribute information according to the data part and the data transmission mode;
step 204: and analyzing the data to be sent according to the data transmission mode so as to obtain effective data.
In this embodiment, the data generation protocol is the same as the data generation protocol in the node data transmission method, and is not described herein again.
The application also provides a node data transmission method which is used for an unmanned system, wherein the unmanned system comprises a plurality of nodes, all the nodes are connected in a mode without loop, and any node is not connected with all the nodes; the node data transmission method comprises the following steps:
step 301: any node generates a heartbeat data packet and selectively sends the heartbeat data packet to the node connected with the node through the node data sending method; it can be understood that, at this time, the heartbeat data packet is valid data.
Step 302: each node receiving the heartbeat data packet receives the heartbeat data packet through the node data receiving method, updates the own equipment connection list according to the preset rule through the heartbeat data packet and selectively forwards the heartbeat data packet. It can be understood that, when the heartbeat data packet is selectively forwarded, the node data transmission method described above in the present application may be adopted, and other transmission methods may also be adopted for transmission. Similarly, other nodes receiving the forwarding may also receive the forwarding by using the above-mentioned node data receiving method or by using other receiving methods.
Step 303: any node which updates the own device connection list or generates the heartbeat data packet can selectively send data to be sent to the node connected with the node through the node data sending method; specifically, when needed, any node may generate or otherwise obtain valid data (for example, valid data delivered by a usb disk or the like), and encapsulate the valid data into data to be sent by the node data sending method as described above, and selectively send the data to be sent to the node connected to the node.
Step 304: each node receiving data to be transmitted receives valid data by the node data receiving method as described above.
The unmanned system of the application is a local area network formed by an unmanned aerial vehicle, a mobile robot and the like.
In this embodiment, the heartbeat packet is defined under basepack protocol with PackageType ═ 0.
The heartbeat data packet comprises the following contents:
Figure BDA0002367202160000121
Figure BDA0002367202160000131
in this embodiment, the device connection list includes the following:
Figure BDA0002367202160000132
in this embodiment, each node that receives a heartbeat packet updates its own device connection list according to a preset rule through the heartbeat packet and selectively forwards the heartbeat packet includes:
judging whether the equipment ID in the received heartbeat data packet is in the equipment connection list of the node or not, if not, adding the data content of the node sending the heartbeat data packet in the equipment connection list;
if yes, judging the relation between the TTL value in the heartbeat data packet and the TTL value in the equipment connection list of the node, and if the TTL value in the heartbeat data packet is larger than the TTL value in the equipment connection list of the node, updating the equipment connection list and forwarding the heartbeat data packet; if the TTL value in the heartbeat data packet is equal to the TTL value in the equipment connection list of the node, updating the equipment connection list; and if the TTL value in the heartbeat data packet is smaller than the TTL value in the equipment connection list of the node, no operation is performed.
In addition, each node can periodically judge whether the difference between the system time value of the node and the system time value of the node in the equipment connection list after the last update of any node in the equipment connection list and the node connected with the node is larger than a preset value, and if the difference is larger than the preset value, the information of the node is deleted in the equipment connection list.
It is understood that the preset value can be set according to the requirement, for example, set to 60 seconds, 360 seconds or other values.
In this embodiment, any node that updates its own device connection list or generates the heartbeat packet can selectively send data to be sent to the node connected to the node by the node data sending method as described above includes:
when the nodes connected with the nodes have a data transmission mode capable of carrying out multicast mode transmission and a data transmission mode capable of carrying out point-to-point mode transmission, judging the transmission mode required to be transmitted;
if the transmission mode is a broadcast mode, transmitting by adopting a data transmission mode capable of transmitting in a multicast mode;
if the transmission method is a point-to-point transmission method, the data is transmitted by using a data transmission method capable of performing point-to-point transmission.
For ease of understanding, the present application is further illustrated below by way of example, it being understood that this example does not constitute any limitation of the present application.
Referring to fig. 4, fig. 4 shows an unmanned system using the present application, where the unmanned system includes a plurality of nodes, and each node is connected with another node in a manner without a loop, and none of the nodes is connected with all of the nodes.
In the embodiment shown in fig. 4, the unmanned system comprises a first node 1, a second node 2, a third node 6, a fourth node 7, a first node group 3, a second node group 4, and a third node group 5, wherein the first node group 3 comprises three nodes, the second node group 4 comprises three nodes, and the third node group 5 comprises three nodes.
The nodes are connected in a loop-free manner, wherein the first node 1 is connected with the first node group 3 through a CAN bus, connected with the third node group 5 through a composite TCP/UDP manner, and connected with the third node 6 through a UART manner;
the second node 2 is connected with the second node group 4 through a CAN bus, connected with the third node group 5 in a composite TCP/UDP mode, and connected with the fourth node 7 in a UART mode.
Suppose that the second node 1 generates a heartbeat data packet and sends the heartbeat data packet to the nodes connected with the heartbeat data packet through the node data sending method, namely, the heartbeat data packet is sent to the first node group 3, the third node group 5 and the third node 6;
each node receiving the heartbeat data packet updates its own device connection list according to a preset rule through the heartbeat data packet and selectively forwards the heartbeat data packet, that is, the first node group 3, the third node group 5 and the third node 6 update their own device connection list according to the preset rule according to the heartbeat data packet.
Under a preset rule, if the TTL value in the heartbeat data packet is larger than the TTL value in the equipment connection list of the node, updating the equipment connection list and forwarding the heartbeat data packet; for example, if the TTL value of the composite heartbeat packet of one or more nodes in the third node group 5 is greater than the TTL value of the device connection list of the node, forwarding may be performed, it can be understood that any node in the present application does not have a loopback, and therefore, forwarding is not performed to the node that sends the heartbeat packet to the node, for example, one or more nodes in the third node group 5 are further connected to the second node, and therefore, when the TTL value is greater than the TTL value, forwarding is also performed to the second node, and after the second node is updated, if the TTL value is greater than the device connection list of the second node, forwarding is further performed. And will not be described in detail herein.
After the whole network is updated through the heartbeat data packets, each node respectively sends the heartbeat data packets in an appointed period, so that other devices can respectively discover each other.
When data needs to be transmitted, any node which updates a self device connection list or generates a heartbeat data packet obtains effective data;
in this example, the first node 1 is set to obtain valid data, and it is understood that the valid data may be obtained by other nodes or other manners, or may be generated by the first node itself.
The data to be transmitted is generated by the above-mentioned node data transmission method and is selectively transmitted to the nodes connected thereto, for example, selectively transmitted to each node in the first node group 3, each node in the third node group 5, and the third node 6.
Each node receiving data to be transmitted receives valid data by the node data receiving method as described above.
The following describes the above-mentioned node data transmission method by taking the first node as an example.
According to the above example, the first node is selectively sent to each node in the first node group 3, each node in the third node group 5, and the third node 6.
Step 101: the first node acquires valid data;
step 102: in this embodiment, the data transmission modes of each node in the first node group 3, each node in the third node group 5, and the third node 6, that is, the data transmission mode using the CAN bus with the first node group 3, the data transmission mode using the TCP/UDP with the third node group 5, and the data transmission mode using the UART with the third node 6 have been obtained in a heartbeat data packet mode;
step 103: acquiring a preset data generation protocol for data encapsulation;
step 104: according to the data transmission mode, the effective data is encapsulated by adopting a data generation protocol, so that data to be transmitted, which is suitable for transmission of the transmission mode and at least comprises attribute information and the effective data, is formed; that is to say that the first and second electrodes,
for each node in the first node group 3, generating data to be transmitted, which includes packet length information, attribute information, and valid data;
since the third node group 5 adopts a TCP/UDP connection method, it is necessary to determine whether the third node group is a broadcast method or a point-to-point transmission method, and if the third node group is a broadcast method, the third node group is sent in a UDP method, and if the third node group is a point-to-point transmission method, the third node group is sent in a TCP method, and if the third node group is a broadcast method, data to be sent including attribute information and valid data is generated for each node in the third node group 5.
For the third node 6, data to be transmitted including the packet length information, the start flag information, the attribute information, the error flag information, and the valid data is generated.
And sending the data to be sent to a data receiver through a data transmission protocol. That is, each node in the first node group 3 transmits data using the CAN bus.
And for the third node group 5, the data transmission mode of UDP is adopted for transmission.
And transmitting the data by adopting a data transmission mode of UART for the third node 6.
The following node data receiving method is described by taking the third node 6 as an example.
According to the above example, the third node 6 receives the data to be transmitted sent by the first node.
Step 1: acquiring a data transmission mode for transmitting information with a data transmitter; in this embodiment, the information is also obtained by the heartbeat packet.
Receiving data to be sent by a data sender according to the data transmission mode; namely, data to be transmitted is received through the data transmission protocol of the UART.
Acquiring a preset data generation protocol for data encapsulation; the data generation protocol is the above data generation protocol, and is not described herein again.
And analyzing the data to be sent according to the data transmission mode so as to obtain effective data.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media include both non-transitory and non-transitory, removable and non-removable media that implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps. A plurality of units, modules or devices recited in the device claims may also be implemented by one unit or overall device by software or hardware. The terms first, second, etc. are used to identify names, but not any particular order.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks identified in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor is the control center of the above-mentioned apparatus/terminal device of the present application, and various interfaces and lines are used to connect various parts of the above-mentioned apparatus/terminal device of the present application.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the apparatus/terminal device by running or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The device/terminal equipment integrated module/unit of the present application, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Finally, it should be pointed out that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (3)

1. A node data transmission method is used for an unmanned system, the unmanned system comprises a plurality of nodes, and the nodes are connected in a mode without loop; the node data transmission method is characterized by comprising the following steps:
any node generates a heartbeat data packet and selectively sends the heartbeat data packet to a node connected with the node through a node data sending method, wherein the node data sending method comprises the following steps:
obtaining valid data;
acquiring a data transmission mode for transmitting information with a data receiver;
acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; generating data packet length information according to the data packet length part and a data transmission mode; generating initial mark information according to the initial mark part and the data transmission mode; generating error flag information according to the error flag part and the data transmission mode; generating attribute information according to the attribute part and the data transmission mode;
according to the data transmission mode, a data generation protocol is adopted to package the effective data, so that data to be sent which are suitable for data transmission mode transmission and at least comprise attribute information and the effective data are formed;
sending the data to be sent to a data receiver through the data transmission mode;
each node receiving the heartbeat data packet updates a self equipment connection list according to a preset rule through the heartbeat data packet and selectively forwards the heartbeat data packet;
any node which updates the own equipment connection list or generates the heartbeat data packet can selectively send data to be sent to the node connected with the node through the node data sending method;
each node receiving data to be sent receives the effective data through a node data receiving method; the node data receiving method comprises the following steps:
acquiring a data transmission mode for transmitting information with a data transmitter;
receiving data to be sent by a data sender according to the data transmission mode;
acquiring a preset data generation protocol for data encapsulation, wherein the data generation protocol consists of a data packet length part, an initial mark part, an error mark part and an attribute part for encapsulation; generating data packet length information according to the data packet length part and a data transmission mode; generating initial mark information according to the initial mark part and the data transmission mode; generating error flag information according to the error flag part and the data transmission mode; generating attribute information according to the attribute part and the data transmission mode;
and analyzing the data to be sent according to the data transmission mode so as to obtain effective data.
2. The node data transmission method according to claim 1, wherein the step of updating, by each node that receives the heartbeat packet, its own device connection list according to a preset rule through the heartbeat packet and selectively forwarding the heartbeat packet comprises:
judging whether the equipment ID in the received heartbeat data packet is in an equipment connection list of the node or not, if not, adding the data content of the node sending the heartbeat data packet in the equipment connection list;
if yes, judging the relation between the TTL value in the heartbeat data packet and the TTL value in the equipment connection list of the node, and if the TTL value in the heartbeat data packet is larger than the TTL value in the equipment connection list of the node, updating the equipment connection list and forwarding the heartbeat data packet; and if the TTL value in the heartbeat data packet is equal to the TTL value in the equipment connection list of the node, updating the equipment connection list.
3. The node data transmission method according to claim 1, wherein the generating of the heartbeat packet by any one of the nodes and the selective transmission to the node connected thereto by the node data transmission method comprises:
when the nodes connected with the nodes have a data transmission mode capable of carrying out multicast mode transmission and a data transmission mode capable of carrying out point-to-point mode transmission, judging the transmission mode required to be transmitted;
if the transmission mode is a broadcast mode, transmitting by adopting a data transmission mode capable of transmitting in a multicast mode;
if the transmission method is a point-to-point transmission method, the data is transmitted by using a data transmission method capable of performing point-to-point transmission.
CN202010039403.2A 2020-01-15 2020-01-15 Node data sending method, receiving method and transmission method Active CN111277580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010039403.2A CN111277580B (en) 2020-01-15 2020-01-15 Node data sending method, receiving method and transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010039403.2A CN111277580B (en) 2020-01-15 2020-01-15 Node data sending method, receiving method and transmission method

Publications (2)

Publication Number Publication Date
CN111277580A CN111277580A (en) 2020-06-12
CN111277580B true CN111277580B (en) 2021-06-25

Family

ID=71001677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010039403.2A Active CN111277580B (en) 2020-01-15 2020-01-15 Node data sending method, receiving method and transmission method

Country Status (1)

Country Link
CN (1) CN111277580B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910658B (en) * 2021-02-02 2022-07-12 刘玉 Data packet transmission method and device for providing TCP proxy service
CN113589724B (en) * 2021-07-26 2022-11-15 广州医软智能科技有限公司 Key processing method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753528A (en) * 2008-12-22 2010-06-23 成都市华为赛门铁克科技有限公司 A kind of methods, devices and systems of communication of solid-state disk
CN103347077A (en) * 2013-07-03 2013-10-09 曙光信息产业(北京)有限公司 Method and device for data transmission of distributed file system
CN106686351A (en) * 2016-12-20 2017-05-17 银江股份有限公司 Video transmission method of uniform output of mixed protocol data
CN109684246A (en) * 2018-12-19 2019-04-26 东莞博力威电池有限公司 The method and system carried out data transmission between the equipment of distinct interface agreement

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753528A (en) * 2008-12-22 2010-06-23 成都市华为赛门铁克科技有限公司 A kind of methods, devices and systems of communication of solid-state disk
CN103347077A (en) * 2013-07-03 2013-10-09 曙光信息产业(北京)有限公司 Method and device for data transmission of distributed file system
CN106686351A (en) * 2016-12-20 2017-05-17 银江股份有限公司 Video transmission method of uniform output of mixed protocol data
CN109684246A (en) * 2018-12-19 2019-04-26 东莞博力威电池有限公司 The method and system carried out data transmission between the equipment of distinct interface agreement

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Omnidirectional vision applied to unmanned aerial;Mondragón IF 等;《Robot Auton Syst》;20100212;全文 *
一种小型无人机动态磁罗盘校准方法评估;管沁朴 等;《机器人技术与应用》;20180131;全文 *
基于数字地图技术的无人机测控软件设计与开发;杨小会;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20140715;全文 *

Also Published As

Publication number Publication date
CN111277580A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
WO2022078509A1 (en) Method and apparatus for encapsulating extension header of ipv6 packet
CN109391560B (en) Network congestion notification method, proxy node and computer equipment
US20210234724A1 (en) Electronic control unit, frame generating method, and non-transitory computer-readable recording medium storing a program
US9325812B2 (en) Method and apparatus for compressing nested protocol packet header
US20170244792A1 (en) Power-Line Carrier Terminal Control Apparatus, System, and Method
US20210160353A1 (en) Data sending method and device, data receiving method and device, and system
CN111277580B (en) Node data sending method, receiving method and transmission method
EP3813318B1 (en) Packet transmission method, communication device, and system
CN109936492B (en) Method, device and system for transmitting message through tunnel
EP4131870A1 (en) Service processing method and apparatus, and device and storage medium
CN110545229B (en) Message sending method and device in VXLAN axis networking mode
KR102536276B1 (en) Message generation method and apparatus, and message processing method and apparatus
US11134129B2 (en) System for determining whether to forward packet based on bit string within the packet
CN104754521A (en) Message transmitting method, wireless access point, wireless controller and system
WO2017041534A1 (en) Power line network communication method and device, and computer storage media
US11962673B2 (en) Packet tunneling and decapsulation with split-horizon attributes
US10171368B1 (en) Methods and apparatus for implementing multiple loopback links
CN114979090A (en) IPv6 data packet processing method, device, computer equipment and storage medium
CN113497767A (en) Method and device for transmitting data, computing equipment and storage medium
CN107925516A (en) Data transmission method and device
CN116133159B (en) GTP data packet processing method, device, computer equipment and storage medium
JP2020195048A (en) Communication device, communication system, communication method, and program
WO2022033496A1 (en) Message sending method, message processing method, and device
CN105682168A (en) Compressible wireless multi-hop data transmission method
CN115277554A (en) Transmission method and communication device for multicast data message

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