Serial port-based ring ad hoc network topology and transmission protocol

By adopting the ring ad hoc network topology and transmission protocol in IoT devices, using two sets of serial port connections and custom transmission parameters, the problem of difficulty in linking the functions of IoT devices is solved, and efficient and stable multi-device communication and breakpoints are achieved. diagnosis.

CN119135472AInactive Publication Date: 2024-12-13WUXI JINZER TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411483493.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when IoT devices expand their functions through serial ports, independent serial ports and protocols are required, resulting in strict requirements on chip software and hardware and difficulty in function linkage.

Method used

A ring-shaped ad hoc network topology and transmission protocol based on serial port is adopted, including the physical connection layer and the physical transmission layer. The equipment is connected through two sets of serial ports and agrees on transmission parameters. The transmission layer includes the header code, event group, source address, and target. Address, data area and verification code, support multi-device communication and breakpoint diagnosis.

Benefits of technology

Optimize system routing, reduce chip IO overhead, improve system stability and linkage, and communicate directly between nodes, which can maintain functions and complete breakpoint diagnosis when some nodes fail, and support complex collaborative upgrades and message broadcasts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135472A_ABST
    Figure CN119135472A_ABST
Patent Text Reader

Abstract

The invention provides a serial port-based ring ad hoc network topology and transmission protocol, which comprises a physical connection layer and a physical transmission layer, the physical connection layer and equipment in the network are in head-to-head connection with other equipment through two groups of serial ports of the physical connection layer, transmission parameters related to adjacent serial ports can be agreed according to actual conditions of the physical connection layer, and the physical transmission layer can transmit the transmission parameters to the equipment. N devices can be automatically expanded according to actual requirements, and the actual transmission parameter n-1 of the serial port can be automatically determined according to the adjacent n-1 and the device n; the physical transmission layer comprises a head code, an event group, a source address, a target address, a transmission layer data length, a data area and a check code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network topology, and in particular to a serial port-based ring self-organizing network topology and transmission protocol. Background Art

[0002] With the development of the Internet of Things, more and more devices are expanding their IoT functions through serial ports. Each sub-function requires a set of independent serial ports and corresponding protocols to use. This puts very stringent requirements on the chip's software and hardware. The independent design is also not conducive to the linkage of different functions. Summary of the invention

[0003] The present invention aims to solve the above technical problems and provides a serial port-based ring ad hoc network topology and transmission protocol.

[0004] To solve the above technical problems, the technical solution adopted by the present invention is: a serial port-based ring self-organizing network topology and transmission protocol, including a physical connection layer and a physical transmission layer,

[0005] In the physical connection layer, the devices in the network are connected to other devices through their own two sets of serial ports. The transmission parameters related to the adjacent serial ports can be agreed upon according to their actual conditions. n devices can be expanded according to actual needs. The actual transmission parameter n-1 of the serial port can be determined by the adjacent n-1 and the device n.

[0006] The physical transmission layer includes a header code, an event group, a source address, a destination address, a transmission layer data length, a data area, and a check code.

[0007] The header code may select a fixed value according to actual conditions;

[0008] The event group,protocol expansion can be achieved through the event group, and the current event group includes the data flow direction;

[0009] The source address is used to identify the device that sends data in the physical transmission layer;

[0010] The target address is used to identify a device that is expected to process data in the physical transmission layer;

[0011] The transport layer data length is the length of a single physical data packet during physical transmission, which is the sum of the header length, event group length, source address length, destination address length, data area length, checksum length and the length occupied by the data packet itself;

[0012] The data area is the actual data from the source address to the target address, which can be a mutually agreed value or other protocol data;

[0013] The check code is the integrity check of the entire physical transmission layer, and is the value obtained by performing CRC16 calculation on all the data before the check code;

[0014] The physical transport layer message processing flow includes: after the device receives a message at one of the serial ports, it first determines whether the data packet is legal and complete; in the case of receiving a legal and complete data packet, if the target address is the address of the device, the data is processed according to the data area and the source address; if the target address is not equal to the address of the device, the data packet is forwarded intact through another set of serial ports; when a device needs to communicate with other devices, the device only needs to send the corresponding data packet through any set of serial ports; when evaluating network indicators, the source address and the target address can be set to the own address, the data flow direction can be set to forward, and the data is sent through one set of serial ports and received through another set of serial ports. The network delay can be calculated by the time difference between the sent data and the received data; the packet loss rate is represented by the ratio of the number of sent data packets to the number of successfully received data packets; when a breakpoint occurs in the network, the data flow direction in the event group can be set to reverse, the two serial ports of the local device communicate with other devices in turn, and the two devices with the largest network delays of the two serial ports of the device are counted, and the two devices with the largest delays are the breakpoints.

[0015] The advantages and positive effects of the present invention are: a serial port-based ring self-organizing network topology and transmission protocol, which optimizes system routing, reduces chip IO overhead, and a single node can choose to use one group of serial ports or two groups of serial ports to connect multiple nodes and complete communication; the system stability can be improved, nodes can communicate directly with each other, and some functions can be maintained in the event of partial node failure, and breakpoint diagnosis can be completed; it has rich linkage, adjacent nodes have private connection parameters, and nodes communicate directly with each other, which can complete complex collaborative upgrades, message broadcasts, and multi-master and multi-slave communication methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is the principle block diagram of the physical connection layer;

[0017] Figure 2 It is a flow chart of device processing messages. DETAILED DESCRIPTION

[0018] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0019] A serial port-based ring self-organizing network topology and transmission protocol, including a physical connection layer and a physical transmission layer.

[0020] like Figure 1As shown, in the physical connection layer, the devices in the network are connected to other devices through their own two sets of serial ports. The transmission parameters related to the adjacent serial ports can be agreed upon according to their actual conditions. n devices can be expanded according to actual needs. The actual transmission parameter n-1 of the serial port can be determined by the adjacent n-1 and the device n.

[0021] As shown in Table 1, the physical transmission layer includes 7 major parts: header code, event group, source address, destination address, transmission layer data length, data area, and check code.

[0022] 8 8 8 8 8 n 2 Header Event Group Source Address Target Address Transport layer data length Data Area Check code

[0023] Table 1 Physical transport layer structure diagram

[0024] The header code may select a fixed value according to actual conditions, such as 0x5A.

[0025] As shown in Table 2, the event group, the protocol extension can be implemented through the event group, and the current event group includes the data flow direction.

[0026]

[0027] Table 2 Event group composition diagram

[0028] Each device in an ad hoc network has a unique address in the network, which is fixed during the development phase. The source address and the destination address in the transport layer are both one of the unique addresses of the device. The source address identifies the device that sends data in the physical transport layer. The destination address identifies the device that expects to process data in the physical transport layer.

[0029] The transport layer data length is the length of a single physical data packet during physical transmission, which is the sum of the header code length, event group length, source address length, destination address length, data area length, check code length and the length occupied by the data packet itself.

[0030] The data area is the actual data from the source address to the target address. This data can be a mutually agreed value or other protocol data. The data length should be controlled between 0 and 248.

[0031] The check code is an integrity check of the entire physical transmission layer, and is a value obtained by performing CRC16 calculation on all data preceding the check code.

[0032] like Figure 2As shown, the physical transport layer message processing flow includes: after the device receives a message at one of the serial ports, it first determines whether the data packet is legal and complete; in the case of receiving a legal and complete data packet, if the target address is the address of the device, the data is processed according to the data area and the source address; if the target address is not equal to the address of the device, the data packet is forwarded intact through another set of serial ports; when a device needs to communicate with other devices, the device only needs to send the corresponding data packet through any set of serial ports; when evaluating network indicators, the source address and the target address can be set to the own address, the data flow direction can be set to forward, sent through one set of serial ports, received through another set of serial ports, and the network delay can be calculated by the time difference between sending data and receiving data; the ratio of the number of sent data packets to the number of successfully received data packets represents the packet loss rate; when a breakpoint occurs in the network, the data flow direction in the event group can be set to reverse, the two serial ports of the local device communicate with other devices in turn, and the two devices with the largest network delays of the two serial ports of the device are counted, and the two devices with the largest delays are the breakpoints.

[0033] A ring-shaped ad hoc network topology and transmission protocol based on serial ports improves the communication efficiency of IoT devices and the stability of the system, while reducing hardware requirements, making communication between devices more flexible and reliable; optimizes system routing and reduces chip IO overhead. A single node can choose to use one or two sets of serial ports to connect to multiple nodes and complete communication; improves system stability, nodes can communicate directly with each other, and can maintain some functions and complete breakpoint diagnosis when some nodes fail; has rich linkage, private connection parameters between adjacent nodes, direct communication between nodes, and can complete complex collaborative upgrades, message broadcasts, and multi-master and multi-slave communication methods

[0034] The embodiments of the present invention are described in detail above, but the contents described are only preferred embodiments of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of this patent.

Claims

1. A serial port-based ring ad hoc network topology and transmission protocol, Features: Including physical connection layer and physical transmission layer, In the physical connection layer, the devices in the network are connected to other devices through their own two sets of serial ports. The transmission parameters related to the adjacent serial ports can be agreed upon according to their actual conditions. n devices can be expanded according to actual needs. The actual transmission parameter n-1 of the serial port can be determined by the adjacent n-1 and the device n. The physical transmission layer includes a header code, an event group, a source address, a destination address, a transmission layer data length, a data area, and a check code. The header code may select a fixed value according to actual conditions; The event group,protocol expansion can be achieved through the event group, and the current event group includes the data flow direction; The source address is used to identify the device that sends data in the physical transmission layer; The target address is used to identify a device that is expected to process data in the physical transmission layer; The transport layer data length is the length of a single physical data packet during physical transmission, which is the sum of the header length, event group length, source address length, destination address length, data area length, checksum length and the length occupied by the data packet itself; The data area is the actual data from the source address to the target address, which can be a mutually agreed value or other protocol data; The check code is the integrity check of the entire physical transmission layer, and is the value obtained by performing CRC16 calculation on all the data before the check code; The physical transport layer message processing flow includes: after the device receives a message at one of the serial ports, it first determines whether the data packet is legal and complete; in the case of receiving a legal and complete data packet, if the target address is the address of the device, the data is processed according to the data area and the source address; if the target address is not equal to the address of the device, the data packet is forwarded intact through another set of serial ports; when a device needs to communicate with other devices, the device only needs to send the corresponding data packet through any set of serial ports; when evaluating network indicators, the source address and the target address can be set to the own address, the data flow direction can be set to forward, and the data is sent through one set of serial ports and received through another set of serial ports. The network delay can be calculated by the time difference between the sent data and the received data; the packet loss rate is represented by the ratio of the number of sent data packets to the number of successfully received data packets; when a breakpoint occurs in the network, the data flow direction in the event group can be set to reverse, the two serial ports of the local device communicate with other devices in turn, and the two devices with the largest network delays of the two serial ports of the device are counted, and the two devices with the largest delays are the breakpoints.

Citation Information

Patent Citations

  • Communication protocol applicable to reliable multi-machine communication, encoding and decoding method and communication device

    CN107147657A

  • Ring network

    CN117749564A

  • Serial cascade system based on 64b / 66b coding

    CN118449657A

  • Automatic network topology identification by nodes in the network

    US20100124176A1