Communication protocol method and communication equipment based on multi-host Ethernet networking

By adopting UDP multicast protocol and intelligent data transmission strategy in multi-host Ethernet networking, the problems of limited network number and low bandwidth utilization in the existing technology are solved, and more efficient data transmission and larger-scale network networking are achieved.

CN120075320APending Publication Date: 2025-05-30SHENZHEN FANHAI SANJIANG TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510218868.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, the maximum number of hosts when forming Ethernet networks is limited, the processing efficiency is low, and the bandwidth utilization is insufficient, so they cannot meet higher business needs.

Method used

The communication protocol method based on multi-host Ethernet networking is adopted to send host information through the UDP multicast protocol, realize automatic discovery and configuration of the host, and select unicast or multicast sending modes according to the number of destination hosts, and integrate sending packets to reduce the proportion of small packets.

Benefits of technology

It improves the flexibility and efficiency of data transmission, increases the maximum number of hosts networks, has high processing efficiency, and improves bandwidth utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075320A_ABST
    Figure CN120075320A_ABST
Patent Text Reader

Abstract

The invention relates to a communication protocol method and communication equipment based on multi-host Ethernet networking. The method comprises the following steps: a host completes configuration and accesses a local area network; when a networking host sends data packets, multiple packets of data are integrated to reduce a small packet proportion, and then the data packets are sent according to a sending priority set by a current message; when the host sends data, the number of target hosts is judged, and the data can be sent in a unicast sending mode or a multicast sending mode. The communication protocol method and the communication equipment are ingenious in design, a unicast or multicast sending mode is selected according to the number of target hosts, automatic discovery and configuration of the hosts can be achieved, and the workload of manual configuration is reduced; according to the method, the sending bandwidth occupied by the host is reduced, the maximum networking number of the host is greatly increased by integrating the sent messages, reducing the small packet proportion and increasing the actual communication bandwidth, the maximum networking number of the host is increased by integrating the sent messages and reducing the small packet proportion, and the processing efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and more particularly, to a communication protocol method and a communication device based on multi-host Ethernet networking. Background Art

[0002] The main frequency of the MCU currently used by the host is about 300MHZ. When the host uses Ethernet networking, limited by the main frequency of the MCU, the maximum bandwidth is about 150kb / s when processing a large number of small packet data (the size of the Ethernet packet is 64 bytes). Most of the data packets generated during the current host Ethernet networking belong to small packets. In such a case, the maximum networking number of the host is greatly limited. Currently, the actual networking number of Ethernet is at most 255. With the development of related industry services, higher requirements are put forward for the maximum networking number of the host, and it is required to support a maximum networking number of about 999 hosts. However, the networking number in the prior art cannot meet the requirement of the maximum networking number, and there are also problems of a large proportion of small packets, low processing efficiency, and insufficient bandwidth utilization. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a communication protocol method and a communication device based on multi-host Ethernet networking in view of the above-mentioned defects of the prior art.

[0004] On the one hand, the technical solution adopted by the present invention to solve its technical problems is: a communication protocol method based on multi-host Ethernet networking, which includes the following steps:

[0005] The host completes configuration and accesses the local area network where the network device is located through a network cable;

[0006] The host sends its own IP address, MAC address, and host number to other hosts in the local area network through the UDP multicast protocol to learn the binding relationship between the host numbers and IP addresses of each host in the local area network;

[0007] When the networking host sends a data packet, it integrates multiple packets of data to reduce the proportion of small packets, and then sends them according to the sending priority set in the current message;

[0008] When the host sends data, it judges the number of destination hosts; if the destination host is one, it queries the IP address of the destination host and sends the data in the UDP unicast sending mode; if the destination host is multiple, it sends the data in the UDP multicast sending mode.

[0009] In the communication protocol method of the present invention, in the unicast sending mode, after the sending host sends data, it starts a timeout timer. If no response message is received within the specified time, the data is retransmitted. After three consecutive retransmission failures, it is regarded as a sending failure, and the message buffer is released.

[0010] For the communication protocol method described in the present invention, it is characterized in that in the multicast sending mode, after the sending host sends data, if it does not receive responses from all destination hosts within the specified time, it retransmits the data to the unresponsive hosts in unicast mode.

[0011] For the communication protocol method described in the present invention, it is characterized in that the communication protocol method supports data integration for data sending to reduce the proportion of small packets during the sending process. The integrated data sending is to first cache the data to be sent. When there is data to be sent, calculate the total length of the data to be sent this time and the cached data.

[0012] For the communication protocol method described in the present invention, it is characterized in that according to the total length of the data to be sent and the cached data, set the sending priority of the data to be sent; the priorities are divided into three levels:

[0013] Level 1 is the highest priority. When the total length is greater than 512 bytes, immediately send the cached data and cache the data to be sent this time;

[0014] Level 2 is that within the preset maximum waiting time, when the total length is less than 512 bytes, cache the data to be sent this time and wait for the next sending request;

[0015] Level 3 is to send when the sum is equal to 512 bytes, and send the data to be sent this time and the cached data together.

[0016] For the communication protocol method described in the present invention, it is characterized in that when the host receives a unicast request message, it judges whether the destination address is itself. If so, it immediately sends a response message;

[0017] When the host receives a multicast request message, it judges whether the destination address contains itself. If so, it delays for t = [(host number) / 15] × 10 milliseconds and then sends a response message.

[0018] For the communication protocol method described in the present invention, it is characterized in that after timeout retransmission, the following steps are further included: each host sends a heartbeat message through UDP multicast every 10 seconds. The heartbeat message includes the host ID, IP address, and MAC address of itself;

[0019] If a certain host does not receive any data messages from another host within 35 seconds, mark this host as "communication failure"; the host marked as "communication failure" is ignored in subsequent communications until it receives its valid message again.

[0020] For the communication protocol method described in the present invention, it is characterized in that the configuration of the host includes static IP address configuration or dynamically obtaining an IP address through DHCP, and all hosts are in the same IP network segment.

[0021] On the other hand, the present invention also provides a communication device based on multi-host Ethernet networking, which includes:

[0022] Configuration module: used to enable the host to complete network configuration and access the local area network where the network device is located through a network cable;

[0023] Information sending module: used to enable the host to send its own IP address, MAC address and host number to other hosts in the local area network through the UDP multicast protocol, so as to learn the binding relationship between the host numbers and IP addresses of each host in the local area network;

[0024] Data integration module: when the networking host sends data packets, it integrates multiple packets of data to reduce the proportion of small packets, and then sends them according to the sending priority set by the current message;

[0025] Destination host quantity judgment module: used to judge the quantity of destination hosts when the host has a data sending requirement; when it is judged that the destination host is one, it is used to query the IP address of the destination host and send the data to the destination host in the UDP unicast sending mode; when it is judged that the destination host is multiple, it is used to send the data to multiple destination hosts in the UDP multicast sending mode.

[0026] The beneficial effects of the present invention are as follows: The communication protocol method and communication device based on multi-host Ethernet networking are ingeniously designed. By sending host information through the UDP multicast protocol, it can not only realize the automatic discovery and configuration of hosts, reduce the workload of manual configuration, and because UDP multicast is not limited by the restriction of the Ethernet broadcast domain (255 hosts); select the unicast or multicast sending mode according to the quantity of destination hosts, improve the flexibility and efficiency of data transmission; for the data transmission of a single destination host, using unicast can avoid unnecessary network broadcasts and reduce network load; for the quantity transmission of multiple destination hosts, the data can be sent to multiple hosts at the same time, and a larger-scale network networking can be realized; it is flexible to use, greatly reducing the sending bandwidth occupied by the host; staggering the traffic of response messages, avoiding the problem of excessive bandwidth occupancy rate caused by the instantaneous response traffic peak brought by the multicast sending and unicast response mechanism; by integrating the sent messages, reducing the proportion of small packets, thereby increasing the actual communication bandwidth, thus greatly increasing the maximum networking quantity of hosts and having high processing efficiency. Description of the Drawings

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will further illustrate the present invention in conjunction with the drawings and embodiments. The drawings in the following description are only partial embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings:

[0028] Figure 1 is a flowchart of the communication protocol method based on multi-host Ethernet networking in Embodiment 1 of the present invention;

[0029] Figure 2 is in Embodiment 1 based on Figure 1 schematic diagram of the data sending process in the embodiment;

[0030] Figure 3 is in Embodiment 1 based on Figure 1 schematic diagram of the data receiving process in the embodiment;

[0031] Figure 4 is a framework diagram of a communication device based on multi-host Ethernet networking in Embodiment 2 of the present invention. Detailed implementation manners

[0032] Terms such as "first", "second", "third", and "fourth" in the specification and claims of the present invention and in the accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.

[0033] Referring to "embodiment" herein means that a specific feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears at various positions in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.

[0034] "Plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0035] Moreover, terms indicating directions such as "upper, lower, front, rear, left, right, upper end, lower end, longitudinal" etc. are all referenced based on the attitude position of the device or equipment described in this solution when it is in normal use.

[0036] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are partial embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0037] Embodiment 1:

[0038] A communication protocol method based on multi-host Ethernet networking in Embodiment 1 of the present invention is used to increase the number of networking hosts. As Figure 1 shown, the communication protocol method includes the following steps:

[0039] Step S101: The host completes the configuration and accesses the local area network where the network device is located through a network cable;

[0040] Among them, according to the actual networking requirements, all hosts are selected to obtain addresses using static IP addresses or the DHCP method. If it is necessary to configure DHCP address pool information, it can only be configured on the #1 machine; all hosts are configured with the same IP network segment;

[0041] Step S102: The host sends its own IP address, MAC address, and host number to other hosts in the local area network through the UDP multicast protocol to learn the binding relationship between the host numbers and IP addresses of each host in the local area network;

[0042] Step S103: When the networking host sends a data packet, it integrates multiple packets of data to reduce the proportion of small packets, and then sends them according to the sending priority set in the current message;

[0043] Step S104: When the host has a data sending requirement, it judges the number of destination hosts; if the destination host is one, it queries the IP address of the destination host and sends the data using the UDP unicast sending mode; if the destination host is multiple, it sends the data using the UDP multicast sending mode.

[0044] Further, in the unicast sending mode, after the sending host sends the data, it starts a timeout timer. If no response message is received within the specified time, the data is retransmitted. After three consecutive retransmission failures, it is regarded as a sending failure, and the message buffer is released.

[0045] Further, in the multicast sending mode, after the sending host sends the data, if it does not receive responses from all destination hosts within the specified time, it retransmits the data to the unresponsive hosts using the unicast mode.

[0046] Specifically, as Figure 2 shown, the data sending process steps are as follows:

[0047] Step S1041: The host generates data to be sent: Set the destination host to which the data needs to be delivered and the sending priority of this data.

[0048] Step S1042: Select the sending method according to the destination host information of the data: When the destination address is a single host, UDP unicast is used for sending; when the destination address is 0, it is for all hosts within the local area network, and when the destination address is an address list, it needs to be sent to the hosts in the list. For these two destination addresses, multicast is used for sending.

[0049] Step S1043: Send according to the sending priority of the data: Support sending according to sending levels 1, 2, and 3.

[0050] Furthermore, the communication protocol method reduces the proportion of small packets during the sending process through data integrated sending. The data integrated sending is to first cache the data to be sent. When there is data to be sent, calculate the total length of the data to be sent this time and the cached data.

[0051] Among them, according to the total length of the data to be sent and the cached data, set the sending priority of the data to be sent; the priority is divided into three levels:

[0052] Level 1 is the highest priority. When the total length is greater than 512 bytes, immediately send the cached data and cache the data to be sent this time.

[0053] Level 2 is within the preset maximum waiting time. When the total length is less than 512 bytes, cache the data to be sent this time and wait for the next sending request.

[0054] Level 3 is sent when the sum is equal to 512 bytes, and send the data to be sent this time and the cached data together.

[0055] Step S105: When the host receives a unicast request message, judge whether the destination address is the local machine. If so, immediately send a response message.

[0056] When the host receives a multicast request message, judge whether the destination address contains the local machine. If so, delay for t = [(host number) / 15] × 10 milliseconds and then send a response message.

[0057] Specifically, as Figure 3 shown, the data reception process steps are as follows:

[0058] Step S1051: Unicast and multicast judgment after the host receives a packet: After the host receives a unicast or multicast protocol packet, it needs to judge whether the local machine ID is within the received packet destination address.

[0059] Step S1052, Response Processing: The host receives a unicast packet. If a response is required, it directly sends a response reply. If it receives a multicast packet, it delays the response.

[0060] Step S1053, Delayed Response: After delaying for t = [(host number) / 15] * 10 milliseconds, send a response packet.

[0061] Step S106: After timeout retransmission, the following steps are also included: Each host sends a heartbeat packet through UDP multicast every 10 seconds. The heartbeat packet contains the local ID, IP address, and MAC address.

[0062] If a host does not receive any data packets from another host within 35 seconds, mark this host as "communication failure". The host marked as "communication failure" is ignored in subsequent communications until a valid packet from it is received again.

[0063] Furthermore, the configuration of the host includes static IP address configuration or dynamically obtaining an IP address through DHCP, and all hosts are in the same IP network segment.

[0064] This communication protocol method and communication device based on multi-host Ethernet networking are ingeniously designed. By sending host information through the UDP multicast protocol, it can not only achieve automatic discovery and configuration of hosts, reducing the workload of manual configuration, but also because UDP multicast is not limited by the Ethernet broadcast domain limit (255 hosts); select unicast or multicast sending mode according to the number of destination hosts, improving the flexibility and efficiency of data transmission; for data transmission to a single destination host, using unicast can avoid unnecessary network broadcasts and reduce network load; for data transmission to multiple destination hosts, data can be sent to multiple hosts simultaneously, enabling larger-scale network networking; being flexible, greatly reducing the sending bandwidth occupied by hosts; staggering the traffic of response packets, avoiding the problem of excessive bandwidth occupancy rate caused by the instantaneous response traffic peak brought by the multicast sending and unicast response mechanism; by integrating sending packets, reducing the proportion of small packets, thereby increasing the actual communication bandwidth, thus greatly increasing the maximum number of hosts in the network, and having high processing efficiency.

[0065] Embodiment 2:

[0066] This embodiment provides a communication device based on multi-host Ethernet networking, including the following modules:

[0067] Configuration Module: Used to enable the host to complete network configuration and access the local area network where the network device is located through a network cable.

[0068] Information sending module: It is used to enable the host to send the host's IP address, MAC address, and host number to other hosts in the local area network through the UDP multicast protocol, so as to learn the binding relationship between the host numbers and IP addresses of each host in the local area network;

[0069] Data integration module: When the networking host sends data packets, it integrates multi-packet data to reduce the proportion of small packets, and then sends the data according to the sending priority set by the current message;

[0070] Destination host quantity judgment module: It is used to judge the quantity of destination hosts when the host has a data sending requirement; when it judges that the destination host is one, it is used to query the IP address of the destination host and send the data to the destination host in the UDP unicast sending mode; when it judges that the destination host is multiple, it is used to send the data to multiple destination hosts in the UDP multicast sending mode.

[0071] The communication protocol method and communication device based on multi-host Ethernet networking are ingeniously designed. By sending host information through the UDP multicast protocol, it can not only realize the automatic discovery and configuration of hosts, reducing the workload of manual configuration, and because UDP multicast is not limited by the Ethernet broadcast domain limit (255 hosts); it selects the unicast or multicast sending mode according to the quantity of destination hosts, improving the flexibility and efficiency of data transmission; for the data transmission of a single destination host, using unicast can avoid unnecessary network broadcasts and reduce network load; for the quantity transmission of multiple destination hosts, the data can be sent to multiple hosts simultaneously, enabling a larger-scale network networking; it is flexible to use, greatly reducing the sending bandwidth occupied by the host; by integrating the sending messages, reducing the proportion of small packets, thereby increasing the actual communication bandwidth, thus greatly increasing the maximum networking quantity of the host, and having high processing efficiency.

[0072] It should be understood that for those of ordinary skill in the art, improvements or transformations can be made according to the above description, and all such improvements and transformations should fall within the protection scope of the appended claims of the present invention.

Claims

1. A communication protocol method based on multi-host Ethernet networking, characterized in that: The following steps are involved: The host completes configuration and connects to the LAN where the network device is located via a network cable; The host sends the local IP address, MAC address and host number to other hosts in the local area network through the UDP multicast protocol to learn the binding relationship between the host number and the IP address of each host in the local area network; When the networking host sends data packets, it integrates multiple packets to reduce the proportion of small packets, and then sends them according to the sending priority set for the current message; When sending data, the host determines the number of destination hosts; If there is only one destination host, the IP address of the destination host is queried and the data is sent in UDP unicast mode; If there are multiple destination hosts, UDP multicast mode is used to send data.

2. The communication protocol method according to claim 1, characterized in that: In unicast sending mode, the sending host starts the timeout timer after sending data. If no response message is received within the specified time, the data is retransmitted. After three consecutive retransmission failures, the sending is considered a failure and the message buffer is released.

3. The communication protocol method according to claim 2, characterized in that: In multicast sending mode, after the sending host sends data, if it does not receive responses from all destination hosts within a limited time, it will retransmit the data to the hosts that did not respond in unicast mode.

4. The communication protocol method according to claim 3, characterized in that: The communication protocol method supports data integration and data transmission to reduce the proportion of small packets during the transmission process. The integrated data transmission is to cache the data to be sent first, and when there is data to be sent, calculate the total length of the data to be sent and the cached data.

5. The communication protocol method according to claim 4, characterized in that: The sending priority of the data to be sent is set according to the total length of the data to be sent and the buffered data; the priority is divided into three levels: Level 1 is the highest priority. If the total length is greater than 512 bytes, the cached data is sent immediately and the next data to be sent is cached. Level 2: within the preset maximum waiting time, the total length is less than 512 bytes, the data to be sent is cached, and the next sending request is waited; Level 3 is sent when the sum is equal to 512 bytes, and the data to be sent this time and the cached data are sent together.

6. The communication protocol method according to any one of claims 2 to 5, characterized in that: The steps further include: when the host receives the unicast request message, determining whether the destination address is the host, and if so, immediately sending a response message; When a host receives a multicast request message, it determines whether the destination address includes the host. If so, it sends a response message after a delay of t=[(host number) / 15]×10 milliseconds.

7. The communication protocol method according to claim 6, characterized in that: After the timeout retransmission, the following steps are also included: each host sends a heartbeat message via UDP multicast every 10 seconds, and the heartbeat message contains the local ID, IP address and MAC address; If a host does not receive any data message from another host within 35 seconds, the host will be marked as "communication failure"; the host marked as "communication failure" will be ignored in subsequent communications until its valid message is received again.

8. The communication protocol method according to claim 6, characterized in that: The configuration of the host includes static IP address configuration or dynamic acquisition of IP address through DHCP, and all hosts are located in the same IP network segment.

9. A communication device based on multi-host Ethernet networking, characterized in that: include: Configuration module: used to enable the host to complete network configuration and access the local area network where the network equipment is located through a network cable; Information sending module: used to enable the host to send its IP address, MAC address and host number to other hosts in the LAN through the UDP multicast protocol, so as to learn the binding relationship between the host number and IP address of each host in the LAN; Data integration module: When the networking host sends data packets, it integrates multiple packets to reduce the proportion of small packets, and then sends them according to the sending priority set for the current message; Destination host quantity judgment module: used to judge the number of destination hosts when the host has a data sending demand; when it is judged that there is only one destination host, it is used to query the IP address of the destination host and use the UDP unicast sending mode to send data to the destination host; when it is judged that there are multiple destination hosts, it is used to use the UDP multicast sending mode to send data to multiple destination hosts.