CN116566920A - Data transmission control method and related device - Google Patents

Data transmission control method and related device Download PDF

Info

Publication number
CN116566920A
CN116566920A CN202310528248.4A CN202310528248A CN116566920A CN 116566920 A CN116566920 A CN 116566920A CN 202310528248 A CN202310528248 A CN 202310528248A CN 116566920 A CN116566920 A CN 116566920A
Authority
CN
China
Prior art keywords
packet loss
packet
data
loss list
adjusted
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.)
Pending
Application number
CN202310528248.4A
Other languages
Chinese (zh)
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.)
Shenzhen Shenxinfu Information Security Co ltd
Original Assignee
Shenzhen Shenxinfu Information Security Co ltd
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 Shenzhen Shenxinfu Information Security Co ltd filed Critical Shenzhen Shenxinfu Information Security Co ltd
Priority to CN202310528248.4A priority Critical patent/CN116566920A/en
Publication of CN116566920A publication Critical patent/CN116566920A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1809Selective-repeat protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • H04L47/225Determination of shaping rate, e.g. using a moving window
    • 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/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data transmission control method, which comprises the following steps: the first device sends a data packet to the second device; the first device and the second device are connected in a handshake mode; forming a packet loss list according to packet loss information fed back by the second equipment; judging whether to adjust the number of data packets and the sending rate in the packet loss list; if yes, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate. On the basis of handshake link between the first equipment and the second equipment, the reliability of data transmission is maintained, and then non-fixed data packet retransmission is carried out by adopting a packet loss list with the number of data packets adjusted and the sending rate with the rate adjusted, so that congestion running caused by the data packet retransmission is avoided, and the adaptability under the condition of weak network is improved. The application also discloses a data transmission control device, a server and a computer readable storage medium, which have the beneficial effects.

Description

Data transmission control method and related device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data transmission control method, a data transmission control device, a server, and a computer readable storage medium.
Background
With the continuous development of information technology, data transmission protocols for coping with different transmission scenarios are emerging in the field of data transmission.
In the related art, a UDP (UserDatagram Protocol ) protocol and a TCP (Transmission Control Protocol, transmission control protocol) protocol are provided. UDP, a connectionless transport layer protocol, provides a transaction-oriented simple unreliable information transport service, has the disadvantage of not providing packet grouping, assembling and not being able to order packets, i.e. it is not known whether it arrives safely and completely after the message is sent. Among other things, TCP is a reliable, connection-oriented, end-to-end transport protocol that ensures error-free delivery of data to a destination. However, this protocol ignores network congestion. Without knowing the current network congestion state, TCP may send more data than the bottleneck can handle, resulting in serious packet loss, significant degradation of network performance, increased packet delivery delay, and possibly "congestion collapse". In this scenario only a small portion of the packets are successfully transmitted and acknowledged, resulting in very low throughput and long queuing delay.
Therefore, how to improve the effective throughput in data transmission is a major concern for those skilled in the art.
Disclosure of Invention
The purpose of the present application is to provide a data transmission control method, a data transmission control device, a server and a computer readable storage medium, so as to improve the effective throughput in data transmission and avoid the congestion situation of data transmission.
In order to solve the above technical problems, the present application provides a data transmission control method, including:
the first device sends a data packet to the second device; wherein a handshake connection exists between the first device and the second device;
forming a packet loss list according to the packet loss information fed back by the second equipment;
judging whether to adjust the number of data packets and the sending rate in the packet loss list;
if yes, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
Optionally, the retransmitting the data packet to the second device based on the adjusted packet loss list and the adjusted sending rate includes:
performing rate adjustment based on network conditions and a congestion algorithm to obtain the adjusted sending rate;
and retransmitting the data packet based on the adjusted packet loss list and the adjusted sending rate.
Optionally, the retransmitting the data packet to the second device based on the adjusted packet loss list and the adjusted sending rate includes:
cleaning the packet loss list based on the time stamp and the overtime threshold of each lost data packet in the packet loss list to obtain the adjusted packet loss list;
and retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
Optionally, the cleaning the packet loss list based on the timestamp and the timeout threshold of each lost data packet in the packet loss list to obtain the adjusted packet loss list includes:
calculating the difference between the current time stamp and the time stamp of each lost data packet in the packet loss list;
and deleting the lost data packets with the difference value larger than the overtime threshold in the packet loss list to obtain the adjusted packet loss list.
Optionally, when retransmission of the lost data packet in the packet loss list is successful, the method further includes:
and deleting the lost data packet from the packet loss list.
Optionally, the forming a packet loss list according to the packet loss information fed back by the second device includes:
acquiring a sequence number and a time stamp of a lost data packet from the packet loss information;
and adding the serial number and the time stamp of the lost data packet into a local packet loss list to obtain a new packet loss list.
Optionally, the packet loss information is obtained by detecting a packet loss event by the second device according to the maximum sequence number of the historical data packet and the sequence number of the data packet.
The application also provides a data transmission control device, comprising:
the data sending module is used for sending the data packet to the second equipment; the data transmission control device is connected with the second equipment in a handshake way;
the packet loss list maintenance module is used for forming a packet loss list according to the packet loss information fed back by the second equipment;
the adjustment judging module is used for judging whether to adjust the number of the data packets and the sending rate in the packet loss list;
and the data packet retransmission module is used for retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate when the adjustment is carried out.
The application also provides a server comprising:
a memory for storing a computer program;
and a processor for implementing the steps of the data transmission control method as described above when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data transmission control method as described above.
The data transmission control method provided by the application comprises the following steps: the first device sends a data packet to the second device; wherein a handshake connection exists between the first device and the second device; forming a packet loss list according to the packet loss information fed back by the second equipment; judging whether to adjust the number of data packets and the sending rate in the packet loss list; if yes, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
On the basis of handshake link between the first equipment and the second equipment, the reliability of data transmission is maintained, and then a packet loss list with the number of data packets adjusted and the sending rate with the rate adjusted are adopted to carry out non-fixed data packet retransmission, so that congestion running caused by data packet retransmission is avoided, serious data packet loss is avoided, the network performance is improved, the delay of data packet delivery is reduced, and the adaptability under the condition of weak network is improved.
The application further provides a data transmission control device, a server and a computer readable storage medium, which have the above beneficial effects and are not described herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flowchart of a data transmission control method according to an embodiment of the present application;
fig. 2 is a data packet structure diagram of a data transmission control method according to an embodiment of the present application;
fig. 3 is a timing chart of a data transmission control method according to an embodiment of the present application;
fig. 4 is a transmission control schematic diagram of a data transmission control method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data transmission control device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a data transmission control method, a data transmission control device, a server and a computer readable storage medium, so as to improve the effective throughput in data transmission and avoid the congestion condition of the data transmission.
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In the related art, a UDP protocol and a TCP protocol are provided. UDP, a connectionless transport layer protocol, provides a transaction-oriented simple unreliable information transport service, has the disadvantage of not providing packet grouping, assembling and not being able to order packets, i.e. it is not known whether it arrives safely and completely after the message is sent. Among other things, TCP is a reliable, connection-oriented, end-to-end transport protocol that ensures error-free delivery of data to a destination. However, this protocol ignores network congestion. Without knowing the current network congestion state, TCP may send more data than the bottleneck can handle, resulting in serious packet loss, significant degradation of network performance, increased packet delivery delay, and possibly "congestion collapse". In this scenario only a small portion of the packets are successfully transmitted and acknowledged, resulting in very low throughput and long queuing delay.
Therefore, the data transmission control method is provided, the reliability of data transmission is maintained firstly on the basis of handshake link between the first equipment and the second equipment, then, the non-fixed data packet retransmission is carried out by adopting a packet loss list with the data packet quantity adjusted and the sending rate with the rate adjusted, congestion running caused by the data packet retransmission is avoided, serious data packet loss is avoided, the network performance is improved, the delay of data packet delivery is reduced, and the adaptability under the condition of weak network is improved.
A data transmission control method provided in the present application is described below by way of an embodiment.
Referring to fig. 1, fig. 1 is a flowchart of a data transmission control method according to an embodiment of the present application.
In this embodiment, the method may include:
s101, a first device sends a data packet to a second device; the first device and the second device are connected in a handshake mode;
this step aims at the first device sending a data packet to the second device. Wherein a handshake connection exists between the first device and the second device.
The first device and the second device refer to a data sender and a data receiver in a data transmission process. Therefore, both the devices can be regarded as the first device and the second device in the present embodiment as long as they exist in the data transmission relationship. Further, the first device and the second device may be hardware devices or virtual devices.
Generally in the prior art, connectionless protocols and connectionless protocols exist. The connectionless protocol has unreliable problem, and has high transmission efficiency, but when the network quality is poor, the data transmission quality is reduced. The link protocol means that the two end devices transmitted before transmission are connected by handshake first, so that the reliability of data transmission is improved. However, when the network is congested, the data that can be transmitted exceeds the upper limit of the amount of data that can be processed, which causes the problems of packet loss and network performance degradation.
Therefore, in the embodiment, the handshake link is performed between the first device and the second device on the basis of the connectionless protocol, so that the reliability of transmission is improved.
The first device and the second device are not particularly limited. The first device is a data transmitting device in the process of transmitting data, and can be a server, a client and an upper computer and a lower computer, and the second device is a data receiving device in the process of transmitting data, and can be a server, a client and an upper computer and a lower computer. Therefore, in this embodiment, the first device and the second device are not limited to the upper-level and lower-level devices, and may be any device in the data transmission process.
S102, forming a packet loss list according to packet loss information fed back by the second equipment;
on the basis of S101, this step aims at forming a packet loss list according to the packet loss information fed back by the second device. In general, transmission of a non-handshake connection is to improve efficiency of data transmission, and data is mainly transmitted rapidly without considering packet loss. In order to maintain reliability, the transmission of the handshake connection needs to establish a corresponding packet loss list and retransmit the lost data packet.
Therefore, in the technical scheme of the application, a corresponding retransmission list is established for maintaining the reliability of transmission. The method for maintaining the packet loss list based on the packet loss information may be any one of the maintenance methods for the packet loss list provided in the prior art, which is not limited herein.
Further, in order to maintain an accurate packet loss list locally and improve accurate management of packet loss data, the steps may include:
step 1, acquiring a sequence number and a time stamp of a lost data packet from packet loss information;
and step 2, adding the sequence number and the time stamp of the lost data packet into a local packet loss list to obtain a new packet loss list.
It can be seen that this alternative is mainly to explain how to maintain the packet loss list. In the alternative scheme, the sequence number and the time stamp of the lost data packet are obtained from the packet loss information; and adding the serial number and the time stamp of the lost data packet into a local packet loss list to obtain a new packet loss list. The time stamp is added into the packet loss list, so that the lost data packets are controlled and managed through the information of the time stamp, the effect of managing the packet loss list is improved, and the situation that the number of the lost data packets is excessive is avoided.
Furthermore, in order to enable the second device to effectively determine packet loss data and avoid missing data packets, the packet loss information can be obtained by detecting packet loss events according to the maximum sequence number of the historical data packets and the sequence number of the data packets by the second device.
It can be seen that this alternative is mainly to explain how to determine the packet loss information. In this alternative scheme, the second device may perform packet loss event detection based on the maximum sequence number of the historical data packet and the sequence number of the data packet, obtain packet loss information, and send the packet loss information to the first device. The sequence number of the data packet refers to the sequence number of the data packet currently received, and is sent to the second device by the first device; the historical data packet is a data packet received before the current data packet, and the historical data packet with the largest sequence number can be regarded as a data packet received by the second device at the time closest to the current time. Obviously, if the difference between the maximum sequence number and the sequence number of the current data packet is 1, it indicates that no packet loss exists, otherwise, it can determine that the packet loss exists, and further, it can determine packet loss information according to the difference between the two sequence numbers.
S103, judging whether to adjust the number of data packets and the sending rate in the packet loss list; if yes, executing S104;
it can be seen that this step is based on S102, and is intended to determine whether to adjust the number of packets in the packet loss list and whether to adjust the transmission rate. It should be noted that, the information adjustment operation related to the determination process herein is specifically determined by the actual situation, where the information adjustment operation may be whether to adjust both based on the network status determination, or whether to adjust both based on the information set by the user.
And S104, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
On the basis of S103, this step aims at retransmitting the data packet to the second device based on the adjusted packet loss list and the adjusted transmission rate.
Further, in order to improve the efficiency of data packet retransmission so as to adapt to different network states and improve the effect of data transmission under the condition of network congestion, the performing data packet retransmission to the second device based on the adjusted packet loss list and the adjusted sending rate may include:
step 1, rate adjustment is carried out based on network conditions and a congestion algorithm, and an adjusted sending rate is obtained;
and step 2, retransmitting the data packet based on the adjusted packet loss list and the adjusted transmission rate.
It can be seen that this alternative is mainly to explain how to retransmit the data packet. In this alternative, the adjusted sending rate is first determined based on the network situation and the congestion algorithm. That is, different sending rates are determined under different network conditions, and the sending rate is adjusted instead of adopting a fixed sending rate, so that the problem of congestion running is avoided under the condition of network congestion. And then, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
Further, in order to improve the effect of processing the packet loss list, avoid the influence of redundant lost data packets on the network, improve the effect of processing the lost data packets, and retransmit the data packets to the second device based on the adjusted packet loss list and the adjusted transmission rate may include:
step 1, cleaning a packet loss list based on a time stamp and a timeout threshold value of each lost data packet in the packet loss list to obtain a regulated packet loss list;
and step 2, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
It can be seen that in this alternative, how to retransmit the data packet is mainly described in terms of a packet loss list. In the alternative scheme, firstly, the packet loss list is cleaned based on the time stamp and the overtime threshold value of each lost data packet in the packet loss list, and the adjusted packet loss list is obtained. Namely, the overtime data packets in the packet loss list are cleaned, the pressure of the data packets in the packet loss list is reduced, and the reliability of the data packets is improved under the condition of maintaining a certain packet loss rate. Meanwhile, the problem of congestion and running caused by too much packet loss data is avoided. And then, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
In one possible implementation manner, the information adjustment operation may be to adjust only the number of data packets in the packet loss list, or may be to adjust only the sending rate.
Further, in order to improve the effectiveness of cleaning the data in the packet loss list and avoid the occurrence of the lost data packet with overtime, the cleaning the packet loss list based on the timestamp and the overtime threshold of each lost data packet in the packet loss list, and the obtaining the adjusted packet loss list may include:
step 1.1, calculating a difference value between a current time stamp and a time stamp of each lost data packet in a packet loss list;
and 1.2, deleting the lost data packets with the difference value larger than the timeout threshold in the packet loss list to obtain a regulated packet loss list.
It can be seen that the present alternative is mainly to explain how to clean up the packet loss list. In the alternative scheme, calculating the difference between the current time stamp and the time stamp of each lost data packet in the packet loss list; and deleting the lost data packets with the difference value larger than the timeout threshold in the packet loss list to obtain a regulated packet loss list. That is, whether the time length of the lost data packet in the lost packet list is overtime is judged through the difference value of the time stamps, so that the lost packet list is cleaned based on time, the excessive number of the lost data packets in the lost packet list is avoided, and the effectiveness of data transmission is improved.
Further, the embodiment may further include:
and deleting the lost data packet from the lost data packet list when the retransmission of the lost data packet in the lost data packet list is successful.
Therefore, in the alternative scheme, when the retransmission of the lost data packet is successful, the lost data packet is deleted in the packet loss list, so that redundant data packets in the packet loss list are avoided, and the use effect of the packet loss list is improved. Of course, the second device also maintains the corresponding packet loss list, so when the retransmission of the lost data packet in the packet loss list is successful, the second device may delete the lost data packet in the packet loss list maintained by the second device.
In summary, the embodiment maintains the reliability of data transmission on the basis of handshake link between the first device and the second device, and then uses the packet loss list with the adjusted number of data packets and the sending rate with the adjusted rate to perform non-fixed data packet retransmission, so as to avoid congestion and running burst caused by data packet retransmission, avoid serious data packet loss, improve network performance, reduce delay of data packet delivery, and improve adaptability under the condition of weak network.
The following further describes a data transmission control method provided in the present application through another specific embodiment.
The device for transmitting data in this embodiment includes a first device and a second device. The first device and the second device are not particularly limited as long as they are two-terminal devices that perform transmission. Either as physical hardware devices or as virtual devices.
Based on the above embodiment, data transmission is performed between the first device and the second device through SRDT (Semi-Reliable Data Transmission Protocol ) in this embodiment. Among them, SRDT is a framework for achieving reliability transmission and congestion control through UDP. The protocol realizes the improvement of effective throughput and real-time performance of data transmission by controlling the packet loss list. The SRDT reserves a congestion control module to implement configuration of congestion control algorithms in the user state. Meanwhile, the protocol can be combined with transmission optimization algorithms such as FEC (Forward Error Correction ) and the like to further improve the reliability of data transmission.
Clearly, SRDT combines the advantages of UDP and TCP fully, flexibly handles retransmission control and congestion control, and is adaptively customized by the needs of the application itself.
Further, SRDT is a connection-oriented duplex protocol. It supports reliable data flows and partially reliable messaging. Thus, SRDT entity a sends an application data packet to SRDT entity B. Data is sent from a sender of a to a receiver of B, while a control flow is exchanged between the two receivers. The receiver is also responsible for triggering and handling all control events, including congestion control and reliability control, and related mechanisms.
Referring to fig. 2, fig. 2 is a data packet structure diagram of a data transmission control method according to an embodiment of the present application.
There are two kinds of data packets in the SRDT, which may include a data packet and a control packet, and the types of the two kinds of packets are distinguished by the first bit of the header of the packet, and the structures of the data packet and the control packet are shown in fig. 2.
Wherein the headers of the data packet and the control packet are 32 x 4 bits, except for the definition of each part.
The data packets of the SRDT contain a packet-based sequence number, a message sequence number, and a relative timestamp (beginning counting in microseconds after connection establishment, message sequence number field indicates a packet made up of application-specific messages, a message may contain one or more data packets-FF field indicates a message boundary-FF position bit 10 of the first data packet, last data packet bit 01, and individual data packet 11-0 field indicates whether this message should be delivered in order.
Referring to fig. 3, fig. 3 is a timing chart of a data transmission control method according to an embodiment of the present application.
In this embodiment, the transmission method between the first device and the second device may include:
s201, the first device establishes handshake connection to the second device;
the first device will first send a handshake packet to wait for a message returned by the second device to establish a handshake connection. The first device may continue to send handshake packets every other fixed time interval (which should be determined by the balance between response time and overhead) until it receives a response handshake from the second device or the timeout timer expires. The first device is a sender, and the second device is a receiver. Wherein the second device may be a server that created the SRDT entity.
The handshake packet may include the following information: (1) SRDT version, (2) socket type, (3) initial random sequence number, (4) maximum packet size, (5) maximum stream window size.
The second device, upon receiving the handshake packet, checks its version and socket type. If the version and type of the request are the same, the packet size is compared to its own value and its own value is set to a smaller value. And finally, after the setting is successful, the initial sequence number and the maximum flow window size are sent to the first device through the response handshake data packet.
The second device is ready to send or receive data immediately after this step.
S202, the first device sends a data packet to the second device;
referring to fig. 4, fig. 4 is a transmission control schematic diagram of a data transmission control method according to an embodiment of the present application.
Fig. 4 is a logic structure of the SRDT and a flow direction of a packet. The solid lines represent data flows and the dashed lines represent control flows. The buffer and packet loss list of the sender, the buffer and packet loss list of the receiver are data components, the API (application program interface), the UDPchannel (UDP connection), the sender and the receiver are functional components, the CC is a congestion control module, and a user-defined algorithm or an SRDT default algorithm may be used. In addition, a listener is included and is responsible for listening to remote clients requesting to establish a connection. Among other things, UDPchannel is responsible for creating UDP connections and sending SRDT packets. The packet loss list is responsible for storing packets that failed to be transmitted in transmission. The sender's buffer and the receiver's buffer are responsible for buffering the data blocks to be sent. An API is an interface that provides for use by upper layer applications.
S203, forming a packet loss list according to packet loss information fed back by the second equipment;
when the data packet arrives at the second device, first, packet loss event monitoring is performed, and in the SRDT protocol, the receiving party records the sequence number smax of the received maximum data packet. If the sequence number si of the currently received data packet is greater than smax+1, the packet loss is indicated, at this time, smax is updated to si, and the sequence number interval of the data packet which is not received is added into the packet loss list, namely:
RLL=RLL∪{smax+1,...,si-1}。
then, the second device sends a NACK control packet to inform the second device of the data to be retransmitted, the same sequence number interval is added into the sender packet loss list,
in the SRDT protocol, a Sender (first device) and a receiver (second device) each maintain a packet Loss List, a set of receiver lost packets (ReceiverLost List) is denoted by rll= { < p1, t1>, < p2, t2> < pn, tn > }, a set of Sender lost packets (Sender Loss List) is denoted by sll= { < p1, t1>, < p2, t2> < pn, tn > }, pi denotes a sequence number of a lost packet, and ti denotes a timestamp added to the List.
S204, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
The first equipment adjusts the sending rate according to a congestion algorithm (BBR) strategy, and then the first equipment performs adding and deleting processing on the data of the packet loss list of the sender so as to achieve the high throughput performance effectively and ensure certain reliability capability.
Further, when the packet loss list is not empty, the sender preferentially sends the data packet in the packet loss list. When the data packet is successfully retransmitted, deleting the data packet from a packet loss list; and meanwhile, when the receiving party receives the data packet, the sequence number of the data packet is deleted from the packet loss list.
In addition, the embodiment can set a timeout threshold to clear the sender packet loss list, so as to avoid a large amount of old data from being retained in the buffer. And according to the availability of the packet loss list of the sender, the packet loss list of the sender comprises a time stamp for recording the acquisition loss state. When the data packet is retransmitted each time, the time stamp contained in the packet loss list is compared with the current time stamp, and if the difference exceeds a threshold value, the lost data packet is deleted in the packet loss list. By the method, the problem that effective throughput of data is low due to multiple times of retransmission is avoided. Similarly, when the lost data packet item in the packet loss list receives the retransmission packet and updates the packet loss list, the timestamp and the overtime threshold value are also judged, so that the lost data packet is prevented from being continuously requested to the sender.
Therefore, according to the embodiment, on the basis of handshake link between the first device and the second device, the reliability of data transmission is maintained, and then the non-fixed data packet retransmission is performed by adopting the packet loss list with the number of the data packets adjusted and the sending rate with the rate adjusted, so that congestion running caused by the data packet retransmission is avoided, serious data packet loss is avoided, the network performance is improved, the delay of data packet delivery is reduced, and the adaptability under the condition of weak network is improved.
The following describes a data transmission control device provided in an embodiment of the present application, and the data transmission control device described below and the data transmission control method described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data transmission control device according to an embodiment of the present application.
In this embodiment, the apparatus may include:
a data transmitting module 100, configured to transmit a data packet to a second device; the data transmission control device is connected with the second equipment in a handshake way;
the packet loss list maintenance module 200 is configured to form a packet loss list according to packet loss information fed back by the second device;
the adjustment judging module 300 is configured to judge whether to adjust the number of data packets and the sending rate in the packet loss list;
and the data packet retransmission module 400 is configured to, when performing adjustment, retransmit the data packet to the second device based on the adjusted packet loss list and the adjusted transmission rate.
Optionally, the data packet retransmission module 400 is specifically configured to perform rate adjustment based on a network condition and a congestion algorithm, so as to obtain an adjusted sending rate; and retransmitting the data packet based on the adjusted packet loss list and the adjusted transmission rate.
Optionally, the packet retransmission module 400 may include:
the packet loss cleaning unit is used for cleaning the packet loss list based on the time stamp and the overtime threshold value of each lost data packet in the packet loss list to obtain an adjusted packet loss list;
and the packet loss retransmission unit is used for retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
Optionally, the packet loss cleaning unit may be specifically configured to calculate a difference between the current timestamp and a timestamp of each lost data packet in the packet loss list; and deleting the lost data packets with the difference value larger than the overtime threshold in the packet loss list to obtain an adjusted packet loss list.
Optionally, the apparatus may further include:
and the packet loss list cleaning module is used for deleting the lost data packet from the packet loss list when the retransmission of the lost data packet in the packet loss list is successful.
Optionally, the packet loss list maintenance module 200 is specifically configured to obtain a sequence number and a timestamp of a lost packet from the packet loss information; and adding the serial number and the time stamp of the lost data packet into a local packet loss list to obtain a new packet loss list.
Optionally, the packet loss information may be obtained by the second device detecting a packet loss event according to a maximum sequence number of the historical data packet and a sequence number of the data packet.
Therefore, according to the embodiment, on the basis of handshake link between the first device and the second device, the reliability of data transmission is maintained, and then the non-fixed data packet retransmission is performed by adopting the packet loss list with the number of the data packets adjusted and the sending rate with the rate adjusted, so that congestion running caused by the data packet retransmission is avoided, serious data packet loss is avoided, the network performance is improved, the delay of data packet delivery is reduced, and the adaptability under the condition of weak network is improved.
The present application further provides a server, please refer to fig. 6, fig. 6 is a schematic structural diagram of a server provided in an embodiment of the present application, and the server may include:
a memory for storing a computer program;
and a processor for implementing the steps of any one of the data transmission control methods described above when executing the computer program.
As shown in fig. 6, which is a schematic diagram of a composition structure of a server, the server may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all complete communication with each other through a communication bus 13.
In the present embodiment, the processor 10 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a field programmable gate array, or other programmable logic device, etc.
Processor 10 may call a program stored in memory 11, and in particular, processor 10 may perform operations in an embodiment of an abnormal IP identification method.
The memory 11 is used for storing one or more programs, and the programs may include program codes, where the program codes include computer operation instructions, and in this embodiment, at least the programs for implementing the following functions are stored in the memory 11:
the first device sends a data packet to the second device; the first device and the second device are connected in a handshake mode;
forming a packet loss list according to packet loss information fed back by the second equipment;
judging whether to adjust the number of data packets and the sending rate in the packet loss list;
if yes, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
In one possible implementation, the memory 11 may include a storage program area and a storage data area, where the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, the memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage device.
The communication interface 12 may be an interface of a communication module for interfacing with other devices or systems.
Of course, it should be noted that the structure shown in fig. 6 does not limit the server in the embodiment of the present application, and the server may include more or fewer components than those shown in fig. 6 or may combine some components in practical applications.
Therefore, according to the embodiment, on the basis of handshake link between the first device and the second device, the reliability of data transmission is maintained, and then the non-fixed data packet retransmission is performed by adopting the packet loss list with the data packet quantity adjusted and the sending rate with the rate adjusted, so that congestion running caused by the data packet retransmission is avoided, serious data packet loss is avoided, the network performance is improved, the delay of data packet delivery is reduced, and the adaptability under the condition of weak network is improved.
The present application also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of any one of the data transmission control methods described above.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
For the description of the computer-readable storage medium provided in the present application, reference is made to the above method embodiments, and the description is omitted herein.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above describes in detail a data transmission control method, a data transmission control device, a server, and a computer-readable storage medium provided in the present application. Specific examples are set forth herein to illustrate the principles and embodiments of the present application, and the description of the examples above is only intended to assist in understanding the methods of the present application and their core ideas. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.

Claims (10)

1. A data transmission control method, characterized by comprising:
the first device sends a data packet to the second device; wherein a handshake connection exists between the first device and the second device;
forming a packet loss list according to the packet loss information fed back by the second equipment;
judging whether to adjust the number of data packets and the sending rate in the packet loss list;
if yes, retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
2. The data transmission control method according to claim 1, wherein the retransmitting the data packet to the second device based on the adjusted packet loss list and the adjusted transmission rate includes:
performing rate adjustment based on network conditions and a congestion algorithm to obtain the adjusted sending rate;
and retransmitting the data packet based on the adjusted packet loss list and the adjusted sending rate.
3. The data transmission control method according to claim 1, wherein the retransmitting the data packet to the second device based on the adjusted packet loss list and the adjusted transmission rate includes:
cleaning the packet loss list based on the time stamp and the overtime threshold of each lost data packet in the packet loss list to obtain the adjusted packet loss list;
and retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate.
4. The data transmission control method according to claim 3, wherein the cleaning the packet loss list based on the time stamp and the timeout threshold of each lost data packet in the packet loss list to obtain the adjusted packet loss list includes:
calculating the difference between the current time stamp and the time stamp of each lost data packet in the packet loss list;
and deleting the lost data packets with the difference value larger than the overtime threshold in the packet loss list to obtain the adjusted packet loss list.
5. The data transmission control method according to claim 1, wherein when retransmission of the missing data packet in the lost packet list is successful, further comprising:
and deleting the lost data packet from the packet loss list.
6. The method for controlling data transmission according to claim 1, wherein the forming a packet loss list according to the packet loss information fed back by the second device includes:
acquiring a sequence number and a time stamp of a lost data packet from the packet loss information;
and adding the serial number and the time stamp of the lost data packet into a local packet loss list to obtain a new packet loss list.
7. The data transmission control method according to claim 1, wherein the packet loss information is obtained by the second device performing packet loss event detection according to a maximum sequence number of a historical packet and a sequence number of the packet.
8. A data transmission control apparatus, comprising:
the data sending module is used for sending the data packet to the second equipment; the data transmission control device is connected with the second equipment in a handshake way;
the packet loss list maintenance module is used for forming a packet loss list according to the packet loss information fed back by the second equipment;
the adjustment judging module is used for judging whether to adjust the number of the data packets and the sending rate in the packet loss list;
and the data packet retransmission module is used for retransmitting the data packet to the second equipment based on the adjusted packet loss list and the adjusted sending rate when the adjustment is carried out.
9. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data transmission control method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the data transmission control method according to any one of claims 1 to 7.
CN202310528248.4A 2023-05-10 2023-05-10 Data transmission control method and related device Pending CN116566920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310528248.4A CN116566920A (en) 2023-05-10 2023-05-10 Data transmission control method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310528248.4A CN116566920A (en) 2023-05-10 2023-05-10 Data transmission control method and related device

Publications (1)

Publication Number Publication Date
CN116566920A true CN116566920A (en) 2023-08-08

Family

ID=87491161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310528248.4A Pending CN116566920A (en) 2023-05-10 2023-05-10 Data transmission control method and related device

Country Status (1)

Country Link
CN (1) CN116566920A (en)

Similar Documents

Publication Publication Date Title
US8537664B2 (en) Method and system for accelerating transmission of data between network devices
KR101143172B1 (en) Efficient transfer of messages using reliable messaging protocols for web services
US9007915B2 (en) Method and node for transmitting data over a communication network using negative acknowledgment
CN101189840B (en) Data unit relay device and method for controlling the same
US6694471B1 (en) System and method for periodic retransmission of messages
US6526022B1 (en) Detecting congestion by comparing successive loss of packets in windows to provide congestion control in reliable multicast protocol
JP5544430B2 (en) Communication apparatus and communication system
US20070121506A1 (en) Efficient loss recovery architecture for loss-decoupled tcp
KR20130082070A (en) Communication apparatus and communication method
CN106210924B (en) Video network transmission control method and system
JP2002152308A (en) Data communication system, data communication method, and recording medium with communication program recorded therein
JP2004537218A (en) Reliable and efficient method of congestion control in NACK based protocol
AU751285B2 (en) Method and system for data communication
WO2016201904A1 (en) Tcp-based data transmission method and device
US20200162394A1 (en) Transmission timeout system
CN110602568B (en) Video stream transmission packet loss retransmission method, device and storage device based on RTP
JP7067544B2 (en) Communication systems, communication devices, methods and programs
EP3939191B1 (en) Device and method for delivering acknowledgment in network transport protocols
US7561523B1 (en) Method and apparatus for flow control in a reliable multicast communication system
CN116566920A (en) Data transmission control method and related device
CN115348336A (en) Universal transmission architecture for heterogeneous data streams
KR100913897B1 (en) Method for controlling congestion of TCP for reducing the number of retransmission timeout
US7013418B1 (en) Method and apparatus for reliable delivery of status information for multiple sets of data units in a single packet
CN115499108A (en) Closed-loop network communication method and system based on UDP protocol
CN117956045A (en) Communication system and method based on UDP protocol

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