A comprehensive data communication method with low latency and low bandwidth

By using UDP multicast heartbeat confirmation requests and a sliding window mechanism, combined with long and short data packet sending methods, the communication strategy between the server and terminal devices was optimized, solving the problems of high latency and high bandwidth, and realizing low latency and low bandwidth data communication.

CN116545994BActive Publication Date: 2025-12-02GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310440229.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2025-12-02
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

In existing technologies, the communication latency between servers and terminal devices is high and the bandwidth requirements are large, making it impossible to handle the data communication needs of a large number of terminal devices simultaneously.

Method used

By employing UDP multicast heartbeat acknowledgment requests and a sliding window mechanism, combined with long and short data packet sending methods, and through UDP multicast and TCP socket connections, the data packet sending strategy is optimized to avoid network congestion, and an appropriate sending method is selected based on the data packet length.

Benefits of technology

It effectively reduced data packet loss, lowered network bandwidth requirements, improved the server's control over terminal devices, and reduced overall communication latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116545994B_ABST
    Figure CN116545994B_ABST
Patent Text Reader

Abstract

This invention discloses a comprehensive data communication method with low latency and low bandwidth, comprising: Step 1: Sending UDP multicast heartbeat confirmation requests to the server at preset time intervals. If a heartbeat packet is received from the server, proceed to Step 2; otherwise, continue sending UDP multicast heartbeat confirmation requests at preset time intervals or terminate the process directly; Step 2: Determining whether the length of the data packet that the server needs to send currently exceeds a preset data packet length threshold. If so, a long data packet sending method is used; otherwise, a short data packet sending method is used. The data packet length refers to the size of the data packet in bytes. The long data packet sending method uses one of the following three methods. This invention can effectively reduce data packet loss due to unstable connections, reduce network bandwidth, enable a server with the same performance to control more terminal devices simultaneously, and reduce the overall time for sending data to a large number of terminal devices, thus reducing latency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data communication method technology, specifically a comprehensive data communication method with low latency and low bandwidth. Background Technology

[0002] Currently, communication between servers and terminal devices, and between terminal devices themselves, is generally achieved through HTTP requests. For servers with relatively low or no hardware performance, this means they cannot handle the concurrent data communication needs of too many terminal devices simultaneously sending HTTP requests. Furthermore, the same data often needs to be sent individually to each device, increasing the pressure on network bandwidth and requiring significant bandwidth. The frequent retransmission of the same data also leads to excessively long overall latency, failing to meet the requirement of low overall communication latency for data communication to all terminal devices simultaneously. Summary of the Invention

[0003] In view of the shortcomings of the prior art, the purpose of this invention is to provide a comprehensive data communication method with low latency and low bandwidth, which can solve the problems described in the background art.

[0004] The technical solution to achieve the objective of this invention is: a comprehensive data communication method with low latency and low bandwidth, comprising the following steps:

[0005] Step 1: Send UDP multicast heartbeat confirmation requests to the server at preset time intervals. If a heartbeat packet is received from the server, proceed to Step 2. Otherwise, continue sending UDP multicast heartbeat confirmation requests at preset time intervals or terminate the process directly.

[0006] Step 2: Determine if the length of the data packet the server needs to send exceeds the preset data packet length threshold. If so, use the long data packet sending method; otherwise, use the short data packet sending method. Data packet length refers to the size of the data packet in bytes.

[0007] The short data packet transmission method specifically includes: receiving data packets from the server via UDP multicast; the terminal device responding to the server whether it received the data packet; the server waiting for a certain period of time; if it still does not receive a response from the terminal device, it adds the corresponding terminal device's IP address to the retransmission list (initially empty) and retransmits the data packet to the terminal device, continuing to check for a response indicating whether the terminal device received the data packet. If a response is received, it indicates that the data packet transmission was successful; if not, a new round of retransmission is continued for online terminal devices until all terminal devices have successfully received the data packet. For offline terminal devices, data packet transmission stops until the terminal device comes back online and still has not received the data packet, then a new round of retransmission continues until the data packet has been successfully sent to all terminal devices in the retransmission list, at which point data packet transmission stops.

[0008] The long data packet sending method is implemented using one of the following three methods:

[0009] a. The server proactively uses short data packets to notify the terminal device to actively obtain the data packets via an HTTP request;

[0010] b. The terminal device autonomously and proactively sends an HTTP request to the server to obtain data packets;

[0011] c. The terminal device or server actively establishes a long-lived communication connection with the other party through TCP Socket to send data packets.

[0012] Furthermore, if heartbeat packets need to be sent to N terminal devices, where N≥2, a sliding window is used to select m heartbeat packets from the N heartbeat packets as the heartbeat packets to be sent each time, where 1≤m<N. Then, each of the heartbeat packets to be sent is sent to all terminal devices in sequence until each heartbeat packet is successfully received by all terminal devices.

[0013] Remove the heartbeat packet that meets condition one from the heartbeat packets to be sent, and add the next heartbeat packet from the N heartbeat packets not yet to be sent to the heartbeat packets to be sent, resulting in a new heartbeat packet to be sent. Then, continue to send each heartbeat packet in the new heartbeat packet to all terminal devices in sequence until each heartbeat packet is successfully received by all terminal devices.

[0014] Condition 1: The current heartbeat packet is successfully received by all terminal devices and an acknowledgment message indicating successful reception is returned.

[0015] Furthermore, the time taken for the server to return heartbeat packets and the packet loss rate are statistically analyzed within a statistical period. If the time taken to return heartbeat packets and the packet loss rate exceed a preset threshold, one or more data packets with a priority lower than the preset priority threshold are randomly dropped to avoid excessive transmission delays caused by continuing to send a large number of data packets under network congestion conditions.

[0016] The beneficial effects of this invention are as follows: This invention can effectively reduce data packet loss due to unstable connection to the station, and by selecting the method of sending long and short data packets, it can reduce network bandwidth, enable the server with the same performance to control more terminal devices at the same time, and reduce the overall time of sending to a large number of terminal devices, thus reducing latency. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0018] The present invention will now be further described with reference to the accompanying drawings and specific embodiments:

[0019] like Figure 1 As shown, a comprehensive data communication method with low latency and low bandwidth includes the following steps:

[0020] Step 1: Send UDP multicast heartbeat confirmation requests to the server at preset time intervals. If a heartbeat packet is received from the server, it indicates that a communication connection has been successfully established, and Step 2 continues. This means that the current terminal device has established a communication connection with the server, or that the current terminal device is online, and both parties are aware that the other is online. The preset time interval can be set according to the actual situation, for example, it can be set to 25ms (milliseconds). Otherwise, continue sending UDP multicast heartbeat confirmation requests at the preset time intervals or terminate the process directly.

[0021] In this step, when there are multiple (i.e. a large number) terminal devices, each terminal device sends a UDP multicast heartbeat confirmation request to the server. That is, it sends a heartbeat packet to the server using the UDP multicast communication protocol. If the server can respond to the heartbeat packet and return an acknowledgment heartbeat packet, it means that the current terminal device is online.

[0022] In an optional embodiment, if heartbeat packets need to be sent to N (N≥2) terminal devices, a sliding window is used to select m (1≤m<N) heartbeat packets from the N heartbeat packets as the heartbeat packets to be sent each time. Then, each heartbeat packet in the heartbeat packets to be sent is sent to all terminal devices sequentially until each heartbeat packet is successfully received by all terminal devices. The heartbeat packets that meet condition one are removed from the heartbeat packets to be sent, and the next heartbeat packet from the N heartbeat packets not in the heartbeat packets to be sent is added to the heartbeat packets to be sent, resulting in a new heartbeat packet to be sent. Then, each heartbeat packet in the new heartbeat packet to be sent is sent to all terminal devices sequentially until each heartbeat packet is successfully received by all terminal devices.

[0023] Condition 1: The current heartbeat packet is successfully received by all terminal devices and an acknowledgment message indicating successful reception is returned.

[0024] In another optional embodiment, the time taken for the server to return heartbeat packets and the packet loss rate are statistically analyzed within a statistical period. If the time taken to return heartbeat packets and the packet loss rate exceed a preset threshold, one or more data packets with a priority lower than the preset priority threshold are randomly discarded to avoid excessive transmission delay caused by continuing to send a large number of data packets under network congestion conditions.

[0025] Step 2: Determine whether the length of the data packet the server needs to send exceeds the preset data packet length threshold. If so, use the long data packet sending method; otherwise, use the short data packet sending method. In other words, when the data packet is long, use the long data packet sending method to send it to the terminal device; when the data packet is short, use the short data packet sending method to send it to the terminal device.

[0026] Data packet length refers to the size of a data packet in bytes. For example, if the preset data packet length threshold is set to 1440 bytes, a long data packet will be sent if the data packet to be sent to the terminal device is longer than 1440 bytes; otherwise, a short data packet will be sent.

[0027] In practical use, information such as voting information and check-in information often has very small data packets, that is, very short data packet length. In this case, it is advisable to use the short data packet sending method.

[0028] The short data packet transmission method specifically includes: receiving data packets from the server via UDP multicast; the terminal device responding to the server to confirm receipt of the data packet; the server waiting for a certain period (e.g., 25ms) and, if still not receiving a response from the terminal device, adding the corresponding terminal device's IP address to the retransmission list (initially empty); and retransmitting the data packet to the terminal device in a new round. The server continues to check for a response indicating whether the terminal device has received the data packet. If a response is received, the data packet transmission is successful. If not, a new round of retransmission continues for online terminal devices until all terminal devices have successfully received the data packet. For offline terminal devices, data packet transmission stops until the terminal device reconnects and still hasn't received the data packet, then a new round of retransmission continues until the data packet has been successfully sent to all terminal devices in the retransmission list, at which point data packet transmission stops.

[0029] The long data packet sending method is implemented using one of the following three methods:

[0030] a. The server proactively uses short data packets to notify the terminal device to actively obtain the data packets via an HTTP request;

[0031] b. The terminal device autonomously and proactively sends an HTTP request to the server to obtain data packets;

[0032] c. The terminal device or server actively establishes a long-lived communication connection with the other party through TCP Socket to send data packets.

[0033] This invention can effectively reduce data packet loss due to unstable connections to the station. Furthermore, by selecting the method of sending long and short data packets, it can reduce network bandwidth while enabling servers with the same performance to control more terminal devices simultaneously, and reduce the overall time of sending to a large number of terminal devices, thus reducing latency.

[0034] The embodiments disclosed in this specification are merely illustrative of one aspect of the invention, and the scope of protection of the invention is not limited to these embodiments. Any other functionally equivalent embodiments fall within the scope of protection of the invention. Those skilled in the art can make various other corresponding changes and modifications based on the technical solutions and concepts described above, and all such changes and modifications should fall within the scope of protection of the claims of this invention.

Claims

1. A comprehensive data communication method with low latency and low bandwidth, characterized in that, Includes the following steps: Step 1: Send UDP multicast heartbeat confirmation requests to the server at preset time intervals. If a heartbeat packet is received from the server, proceed to Step 2. Otherwise, continue sending UDP multicast heartbeat confirmation requests at preset time intervals or terminate the process directly. Step 2: Determine if the length of the data packet the server needs to send exceeds the preset data packet length threshold. If so, use the long data packet sending method; otherwise, use the short data packet sending method. Data packet length refers to the size of the data packet in bytes. The short data packet transmission method specifically includes: receiving data packets from the server via UDP multicast; the terminal device responding to the server whether it received the data packet; the server waiting for a certain period of time; if it still does not receive a response from the terminal device, it adds the corresponding terminal device's IP address to the retransmission list (initially empty) and retransmits the data packet to the terminal device, continuing to check for a response indicating whether the terminal device received the data packet. If a response is received, it indicates that the data packet transmission was successful; if not, a new round of retransmission is continued for online terminal devices until all terminal devices have successfully received the data packet. For offline terminal devices, data packet transmission stops until the terminal device comes back online and still has not received the data packet, then a new round of retransmission continues until the data packet has been successfully sent to all terminal devices in the retransmission list, at which point data packet transmission stops. The long data packet sending method is implemented using one of the following three methods: a. The server proactively uses short data packets to notify the terminal device to actively obtain the data packets via an HTTP request; b. The terminal device autonomously and proactively sends an HTTP request to the server to obtain data packets; c. The terminal device or server actively establishes a long-lived communication connection with the other party through TCP Socket to send data packets.

2. The integrated data communication method with low latency and low bandwidth according to claim 1, characterized in that, If heartbeat packets need to be sent to N terminal devices, where N≥2, a sliding window is used to select m heartbeat packets from the N heartbeat packets each time as the heartbeat packets to be sent, where 1≤m<N. Then, each of the heartbeat packets to be sent is sent to all terminal devices in sequence until each heartbeat packet is successfully received by all terminal devices. Remove the heartbeat packet that meets condition one from the heartbeat packets to be sent, and add the next heartbeat packet from the N heartbeat packets not yet to be sent to the heartbeat packets to be sent, resulting in a new heartbeat packet to be sent. Then, continue to send each heartbeat packet in the new heartbeat packet to all terminal devices in sequence until each heartbeat packet is successfully received by all terminal devices. Condition 1: The current heartbeat packet is successfully received by all terminal devices and an acknowledgment message indicating successful reception is returned.

3. The integrated data communication method with low latency and low bandwidth according to claim 1 or 2, characterized in that, The system tracks the time it takes for servers to return heartbeat packets and the packet loss rate within a statistical period. If the time it takes to return heartbeat packets and the packet loss rate exceed a preset threshold, it randomly discards one or more data packets with a priority lower than the preset priority threshold to avoid excessive transmission delays caused by continuing to send large numbers of data packets in the event of network congestion.

Citation Information

Patent Citations

  • Satellite link based one-to-many data transmission system, and method

    CN105490729A

  • Electronic device adaptively selecting TCP / r-UDP and packet transmitting / receiving method thereof

    KR1020170063280A