Data transmission control method, related device and storage medium

文档序号:1660258 发布日期:2019-12-27 浏览:10次 中文

阅读说明:本技术 数据传输控制方法及相关设备、存储介质 (Data transmission control method, related device and storage medium ) 是由 闫闯 于 2019-09-27 设计创作,主要内容包括:本发明提供了一种数据传输控制方法,该方法获得目标业务数据切分后得到的数据分组,在数据分组中确定丢失数据分组,并将数据分组中的待确认数据分组和/或目标业务数据切分得到的新数据分组作为目标数据分组,进而在重传丢失数据分组时,发送目标数据分组。可见,本方法在重传丢失数据分组时,可以携带发送其他还未被确认的数据分组,以使接收端可能更多地接收数据分组,从而返回更多的ACK确认信息。发送端根据这些ACK确认信息,可以加快对数据分组的处理效率,使数据分组尽快被确认或者被重传,从而提高数据传输效率。另外,本发明还提供了一种数据传输控制相关设备以及存储介质。(The invention provides a data transmission control method, which obtains a data packet obtained by segmenting target service data, determines a lost data packet in the data packet, takes a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting the target service data as the target data packet, and further sends the target data packet when the lost data packet is retransmitted. Therefore, when the lost data packet is retransmitted, the method can carry and send other data packets which are not confirmed yet, so that the receiving end can receive more data packets, and more ACK confirmation information is returned. The sending end can accelerate the processing efficiency of the data packet according to the ACK confirmation information, so that the data packet is confirmed or retransmitted as soon as possible, and the data transmission efficiency is improved. In addition, the invention also provides a data transmission control related device and a storage medium.)

1. A data transmission control method is applied to a sending end, and comprises the following steps:

acquiring a data packet which is obtained after target service data is segmented and is sent;

determining, among the data packets, a missing data packet;

determining a target data packet, wherein the target data packet comprises a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting target service data;

transmitting the target data packet upon retransmission of the lost data packet.

2. The data transmission control method according to claim 1, wherein the determining a target data packet includes:

obtaining the retransmission times of the lost data packets and/or determining the transmission loss rate of the network;

determining a number of packets corresponding to the number of retransmissions and/or a transmission loss rate of the network;

and obtaining the target data packets with the number of the packets.

3. The data transmission control method according to claim 1, wherein the determining of the missing data packet among the data packets stored in the data packet storage includes:

obtaining a confirmation message returned by a receiving end, wherein the confirmation message carries a confirmation state of a data packet;

determining a loss detection range in the data packet according to the acknowledgement message;

within the loss detection range, a missing data packet is determined.

4. The data transmission control method according to claim 3, wherein the acknowledgement message carries a data packet sequence number acknowledged by a receiving end; then said determining lost data packets within said loss detection range comprises:

determining the data packet indicated by the sequence number except the data packet sequence number confirmed by the receiving end in the loss detection range as a data packet to be detected;

and determining the lost data packet according to the logic position of the data packet to be detected.

5. The data transmission control method according to claim 4, wherein the determining the missing data packet according to the logical position of the data packet to be detected comprises:

if the difference value between the sequence number of the data packet to be detected and the sequence number of the specified data packet in the data packet is within a preset difference value range, adding a preset value to the number of times of the loss mark of the data packet to be detected to obtain the number of times of the target loss mark;

if the difference value of the serial number of the data packet designated by the serial number of the data packet to be detected is not within the preset difference value range, adding the number of times of the loss marking of the data packet to be detected to a value corresponding to the logical position according to the logical position of the data packet to be detected in the loss detection range to obtain the number of times of the target loss marking;

and determining the data packet to be detected with the target loss marking times meeting the preset retransmission condition as a lost data packet.

6. The data transmission control method according to claim 3, wherein the determining a loss detection range in the data packet according to the acknowledgement message comprises:

determining the data packet serial number confirmed by the receiving end and the maximum data packet serial number received by the receiving end according to the confirmation message;

obtaining the minimum unacknowledged data packet serial number of a sending end;

and determining the loss detection range according to the minimum unacknowledged data packet sequence number of the sending end and the maximum data packet sequence number received by the receiving end.

7. The data transmission control method according to claim 6, wherein the determining the loss detection range according to the minimum unacknowledged data packet sequence number of the transmitting end and the maximum data packet sequence number received by the receiving end comprises:

determining the minimum unacknowledged data packet serial number of a sending end as a detection range starting boundary;

determining the maximum data packet serial number received by a receiving end as a detection range termination boundary;

and determining a range formed by the detection range starting boundary and the detection range ending boundary as a loss detection range.

8. The data transmission control method according to claim 6, wherein the determining the loss detection range according to the minimum unacknowledged data packet sequence number of the transmitting end and the maximum data packet sequence number received by the receiving end comprises:

determining the minimum unacknowledged data packet serial number of a sending end as a detection range starting boundary;

acquiring the maximum data packet serial number sent by a sending end;

the method comprises the steps that the number of data packets to be confirmed is obtained after the maximum data packet serial number sent by a sending end is differentiated from the maximum data packet serial number received by a receiving end, and a detection range termination boundary is determined according to the maximum data packet serial number received by the receiving end and the number of the data packets to be confirmed;

and determining a range formed by the detection range starting boundary and the detection range ending boundary as a loss detection range.

9. The method of claim 8, wherein the determining the detection range termination boundary according to the maximum data packet sequence number received by the receiving end and the number of the data packets to be acknowledged comprises:

determining a detection coefficient according to the transmission performance of the current network; wherein the detection coefficient is less than or equal to 1;

and multiplying the detection coefficient by the number of the data packets to be confirmed, and adding the multiplication result to the maximum data packet serial number received by the receiving end to obtain a detection range termination boundary.

10. A data transmission control apparatus, applied to a transmitting end, the apparatus comprising:

the data grouping obtaining unit is used for obtaining the data grouping which is obtained after the target service data is segmented and is sent;

a lost data packet determination unit for determining a lost data packet among the data packets;

the target data packet obtaining unit is used for determining a target data packet, wherein the target data packet comprises a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting target service data;

a target data packet transmitting unit for transmitting the target data packet when retransmitting the lost data packet.

11. A data transmission control apparatus characterized by comprising: a processor and a memory, the processor implementing the data transmission control method according to any one of claims 1 to 9 by executing a software program stored in the memory and calling data stored in the memory.

12. A storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing a data transmission control method according to any one of claims 1 to 9.

Technical Field

The present invention relates to the field of network transmission technologies, and in particular, to a data transmission control method, and related device and storage medium.

Background

In a network transmission scenario, the data transmission mode process is as follows: the sending end carries out segmentation operation on data to be sent to obtain data packets, adds serial numbers to the data packets, and sends the data packets with the serial numbers to the receiving end. After receiving a certain data packet, the receiving end returns an Acknowledgement (ACK) message to the sending end, where the ACK message carries a sequence number of the data packet to notify the sending end that the data packet is accurately received.

Since poor network performance may cause some data packets to arrive late or be lost, after a sending end sends out a plurality of data packets, the plurality of data packets are stored in a local cache, and a loss detection is performed on a part of the data packets in the cache. If a data packet that has been lost is detected, the data packet is retransmitted. The transmission efficiency of the existing data transmission method is low.

Disclosure of Invention

In view of this, the present invention provides a data transmission control method to improve the transmission efficiency of data packets. In addition, the invention also provides a data transmission control related device and a storage medium, which are used for ensuring the application and the realization of the method in practice.

In order to achieve the purpose, the technical scheme provided by the invention is as follows:

in a first aspect, the present invention provides a data transmission control method, which is applied to a sending end, and the method includes:

acquiring a data packet which is obtained after target service data is segmented and is sent;

determining, among the data packets, a missing data packet;

determining a target data packet, wherein the target data packet comprises a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting target service data;

transmitting the target data packet upon retransmission of the lost data packet.

In a second aspect, the present invention provides a data transmission control apparatus, applied to a transmitting end, including:

the data grouping obtaining unit is used for obtaining the data grouping which is obtained after the target service data is segmented and is sent;

a lost data packet determination unit for determining a lost data packet among the data packets;

the target data packet obtaining unit is used for determining a target data packet, wherein the target data packet comprises a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting target service data;

a target data packet transmitting unit for transmitting the target data packet when retransmitting the lost data packet.

In a third aspect, the present invention provides a data transmission control apparatus, including: the processor executes the software program stored in the memory and calls the data stored in the memory to realize the data transmission control method.

In a fourth aspect, the present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the data transmission control method described above.

According to the scheme, the data transmission control method provided by the invention obtains the data packet corresponding to the target service data, determines the lost data packet in the data packet, and divides the data packet to be confirmed and/or the target service data in the data packet into a new data packet as the target data packet, and then transmits the target data packet when retransmitting the lost data packet. Therefore, when the lost data packet is retransmitted, the method can carry and send other data packets which are not confirmed yet, so that the receiving end can receive more data packets, and more ACK confirmation information is returned. The sending end can accelerate the processing efficiency of the data packet according to the ACK confirmation information, so that the data packet is confirmed or retransmitted as soon as possible, and the data transmission efficiency is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

FIG. 1 is a flow chart of a data packet transmission provided by the present invention;

FIG. 2 is a flow chart of a data transmission control method according to the present invention;

fig. 3 is a schematic diagram of a transmitting end adding an identifier to a data packet according to the present invention;

FIG. 4 is a flow chart of determining lost data packets provided by the present invention;

FIG. 5A is a schematic diagram illustrating a boundary of a confirmed loss detection range according to the present invention;

FIG. 5B is a schematic diagram of another exemplary acknowledgement loss detection range boundary provided in the present invention;

fig. 6 is a schematic structural diagram of a data transmission control device according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In the network data transmission process, a sending end divides service data to be sent into a plurality of data packets, adds serial numbers to the data packets according to a dividing sequence, then sends the data packets according to a sequence order of the serial numbers, and stores the data packets in a local cache. And after receiving the data packet sent by the sending end, the receiving end generates a confirmation message of the data packet and returns the confirmation message to the sending end.

However, the network may have instability factors that result in the loss or delay of transmitted data packets to the receiving end. The sending end can perform loss detection on the sent data packets, and once determining that a certain data packet is lost, the sending end can retransmit the data packet.

Currently, loss detection strategies used by a sending end mainly include two types:

firstly, loss detection is performed according to the ACK acknowledgement information returned by the receiving end. The ACK acknowledgement information may carry unacknowledged information, and one way of the unacknowledged information may be a sequence number of an unacknowledged data packet, where the unacknowledged information is used to notify the sending end of a data packet that has not been successfully received. The sending end uses the loss marking times (faststack) to record the possible loss situation of the data packet and judges whether the data packet is lost or not based on the loss marking times. Specifically, each time the sending end receives unacknowledged information of an ACK acknowledgment information about a certain data packet, the number of times of loss marking of the certain data packet is increased by 1, and when the number of times of loss marking of the certain data packet is greater than or equal to a certain threshold, the data packet is determined to be lost. The threshold value may be set according to the actual situation, for example, may be set to 3.

For example, the transmitting end transmits five data packets with sequence numbers 0, 1, 2, 3, 4, and 5. Assuming that the receiving end receives the data packet with the sequence number 1, the content returned to the sending end comprises una _ sn: 0, ack _ sn: ACK acknowledge message 1, to notify the sending end that the data packet with sequence number 0 has not been received and the data packet with sequence number 1 has been successfully received. The sending end sets the number of times of the loss marker with the sequence number of 0 to 1 according to the ACK confirmation message. If the receiving end receives the data packet with the sequence number 2, the returned content comprises una _ sn: 0, ack _ sn: 2, so as to notify the sending end that the data packet with sequence number 0 is not received and the data packet with sequence number 2 is successfully received. The sending end sets the number of times of the loss marker with the sequence number of 0 to 2 according to the ACK confirmation message. If the receiving end receives the data packet with the sequence number 3, the returned content comprises una _ sn: 0, ack _ sn: and 3, the ACK acknowledgement message informs the sending end that the data packet with sequence number 0 is not received and the data packet with sequence number 3 is successfully received. The sending end sets the number of times of the loss marker with the sequence number of 0 to 3 according to the ACK confirmation message. If the threshold is 3 and the number of times of loss marker reaches the threshold, the transmitting end determines that the data packet with sequence number 0 is lost.

Second, a time-out timer (RTO) is used to detect if packets are lost. Specifically, in order to ensure reliable transmission of the data packet, the sending end starts timing after sending out the data packet. If the data packet is still not confirmed by the receiving end after the time length of the timeout timer RTO, the transmitting end determines that the data packet is lost. For retransmitted packets, the duration of the timeout timer RTO increases by a multiple of the number of retransmissions, and the transmitted data packets are rather slow if detected only by a timeout. For example, for the first data packet, the duration of the timeout timer RTO is set to RTO; for the data packet of the first retransmission, the timeout timer RTO is set to 2 arto; the first retransmitted data packet may still be lost due to the unreliability of the network, and when the data packet is lost, the timeout timer RTO of the second retransmitted data packet is set to 2^2 × RTO. As the number of retransmissions increases, the timeout timer RTO exhibits an exponential growth trend of 2^ n × RTO. The two loss detection schemes can be used simultaneously, and when the same data packet is subjected to loss detection, any loss detection result meets the corresponding condition, so that the data packet loss can be directly determined. Of course, it is also possible to use only one of the schemes for loss detection.

Regardless of the loss detection scheme used, the sender retransmits the data packet as soon as it is determined that the data packet is lost. For example, as shown in fig. 1, a sending end cuts out six data packets from service data to be sent, the sequence numbers are 0 to 5, after the six data packets are sent, it is detected whether there is a lost data packet in the six data packets, and if it is detected that the lost data packet is a data packet 1, the data packet 1 is retransmitted.

It should be noted that, in the existing data transmission scheme, when the data packet is retransmitted, only the lost data packet is retransmitted, and no other data packet is carried. The present invention is to improve data transmission efficiency by transmitting a data packet together with another data packet in addition to a data packet when retransmitting the data packet.

Specifically, referring to fig. 2, the data transmission control method includes the following steps S201 to S204.

S201: and acquiring the data packet which is obtained after the target service data is segmented and has been sent.

The target service data is service data to be sent, the service data to be sent needs to be segmented into data packets, and serial numbers are added to each data packet according to the segmentation condition. The sequence numbers are obtained by numbering the positions of the data packets in the target service data. For example, as shown in fig. 1, the sequence numbers of the cut data packets are 0, 1, 2, 3, 4, and 5, respectively.

After the sending end sends the data packet, the data packet sent this time is stored in the buffer queue for the retransmission of the data packet. And the sending end processes the data packet in the cache according to the received ACK confirmation information. For example, one process includes deleting a data packet from the buffer queue if the data packet is acknowledged by an ACK acknowledgment message. Another example process includes the loss detection of step S202 described below.

S202: among the data packets, a missing data packet is determined.

The method may use any loss detection scheme to determine the lost data packet, such as the scheme described above that sets the number of times of the loss flag according to the ACK acknowledgment information, or the scheme of the timeout timer RTO. Of course, other loss detection schemes may be used, as described in more detail below.

S203: and determining a target data packet, wherein the target data packet comprises a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting target service data.

Wherein the target data packet is a data packet retransmitted together with the lost data packet. The target data packet may include any one or a combination of two of the following: a data packet to be acknowledged and a new data packet.

The data packet to be acknowledged refers to a data packet which is transmitted by the transmitting end and is not acknowledged by the receiving end. The data packet to be acknowledged may further specifically include any one or a combination of two types of data packets: a first type of data packet to be acknowledged and a second type of data packet to be acknowledged.

As shown in fig. 3, the data packets transmitted by the transmitting end to the receiving end in a certain transmission period include 10 data packets with sequence numbers 0-9. The sending end can divide the data packets into three categories according to the confirmation condition of the data packets: the first type is acknowledged data packets (i.e., data packets 0, 4, 5, 6 filled with dark gray colors in the illustration), indicating data packets that have been successfully received by the receiving end; the second type is unacknowledged data packets (i.e., data packets 1, 2, and 3 filled with light gray colors in the figure), which are data packets that have not been acknowledged before the maximum sequence number data packet that has been received by the receiving end; the third type is the data packet to be acknowledged (i.e. the data packets 7, 8, 9 not filled with color in the figure), which is the data packet in the buffer queue and located after the maximum sequence number data packet that the receiving end has received. The first type of data packets to be acknowledged refers to unacknowledged data packets shown in fig. 3, and the second type of data packets to be acknowledged refers to data packets to be acknowledged shown in fig. 3.

And the new data packet refers to the data packet obtained by segmenting the target service data after the data packet of the buffer queue is segmented. Taking fig. 3 as an example, the service data may also be segmented to obtain new data packets, with serial numbers 10, 11, and 12 in sequence.

In practical application, the target data packet can be obtained from the above two types of data packets. The number of the target data packets may be a fixed value set in advance, in this case, if the data packets to be confirmed in the buffer queue are not enough, the new data packets may be continuously obtained as the target data packets.

Of course, the number of target data packets may also be determined according to the transmission state of the data packets. In particular, the number of retransmissions of lost data packets and/or the transmission loss rate of the network may be determined; determining the number of packets corresponding to the retransmission times and/or the transmission loss rate of the network, thereby obtaining the target data packets of the number of packets.

Specifically, the data packet retransmitted by the sending end may be lost again, and the sending end continues to send the data packet lost again, so that the corresponding number of packets may be set according to the transmission loss rate of the network and the retransmission times of the lost data packet.

For example, a transmission loss rate threshold of the network may be preset, and the sending end determines whether the current network is suitable for data transmission according to the detected current transmission condition of the network. For example, when the transmission loss rate of the network is greater than the preset transmission loss rate threshold value by 15%, it indicates that the current network state is bad.

Further, the network management configurator sets the number of the sent data packets according to the network transmission condition. For example, if the transmission loss rate of the network is lower than 5%, it indicates that the network is in a good condition, and the number of packets set by the network management configurator is 200. If the transmission loss rate of the network is between 5% and 15%, the network status is normal, and the number of packets set by the network management configurator is 100. That is, the number of packets corresponding to the transmission loss rate may be manually preset, and the lower the transmission loss rate, the higher the set number of packets may be.

For another example, a retransmission number threshold may be set in advance, and the number of packets may be set according to a relationship between the retransmission number and the retransmission number threshold. Specifically, for example, when a certain lost data packet is retransmitted for the first time, the number of packets corresponding to the first retransmission may be set to a higher value. If the sending end does not receive the confirmation message returned by the receiving end, the sending end performs the second retransmission, and the number of the packets corresponding to the first retransmission can be set as a comparative value. If the second retransmission is still not received, the network management configuration personnel judges that the current network is poor and is not suitable for data transmission, so that the threshold value of the retransmission times can be set to be 2, and the number of data packets is set to be a minimum value after the retransmission times are greater than 2. Of course, the threshold may be set to other values, and a higher value, a middle value and a minimum value are relative concepts, and specific values may be set according to actual requirements. It can be seen that the number of packets corresponding to the number of retransmissions can be manually preset, and the smaller the number of retransmissions is, the higher the number of packets set can be.

It can be seen that different packet numbers can be set for different retransmission times or network transmission rates, so that in practical applications, the corresponding packet number is determined according to the specific retransmission times or network transmission rates. It should be noted that, the retransmission times and the network transmission rate may be used in combination, for example, the network transmission rate is not considered in some retransmission times, but the network transmission rate is considered to determine the number of packets corresponding to both retransmission times when the retransmission times reach a certain threshold. Of course, the combination can be other schemes that can be conceived by those skilled in the art according to the idea of permutation and combination.

The target data packet may be obtained in the above manner, and the following step S204 is performed on the obtained target data packet.

S204: upon retransmission of the missing data packet, the target data packet is transmitted.

Wherein, the target data packet and the retransmitted data packet are sent to the receiving end together. There are various ways of doing this, for example, it may be sent in one packet or it may be sent in several different packets.

According to the technical scheme, the data transmission control method obtains the data packet obtained after the target service data is segmented, determines the lost data packet in the data packet, takes the data packet to be confirmed in the data packet and/or the new data packet obtained by segmenting the target service data as the target data packet, and further sends the target data packet when the lost data packet is retransmitted. Therefore, when the lost data packet is retransmitted, the method can carry and send other data packets which are not confirmed yet, so that the receiving end can receive more data packets, and more ACK confirmation information is returned. The sending end can accelerate the processing efficiency of the data packet according to the ACK confirmation information, so that the data packet is confirmed or retransmitted as soon as possible, and the data transmission efficiency is improved.

Specifically, by sending other data packets together, the receiving end may receive more data packets and return more ACK acknowledgment information. The sending end can accelerate the processing efficiency of the data packet according to the ACK confirmation information. Specifically, the transmitting end may determine that the data packet has been successfully received according to the acknowledged message of the ACK acknowledgement messages, or may increase the number of times of loss marking of the data packet according to the unacknowledged message of the ACK acknowledgement messages, so as to speed up recognizing the loss and performing fast retransmission.

It should be noted that the lost data packet determined in step S202 may be the smallest unacknowledged data packet, and the above technical advantages are more obvious for the smallest unacknowledged data packet. The specific reasons are:

the minimum unacknowledged data packet is a data packet corresponding to the minimum unacknowledged sequence number in the data packets sent by the sending end. It is to be understood that the smallest unacknowledged data packet is the first data packet after the data packet that the transmitting end has consecutively transmitted successfully. The minimum unacknowledged data packet is a packet sent earlier by the sending end, and the minimum unacknowledged data packet can influence the moving process of a sending window (congestion window) of the sending end. If the minimum unacknowledged data packet has not been acknowledged, the send window cannot move backwards and no new data packet can be sent. That is, the movement of the transmission window is limited to the minimum unacknowledged packet, and the movement of the transmission window can be increased only by increasing the acknowledgment rate of the minimum unacknowledged packet, thereby prompting the transmission of a new data packet.

However, currently, the retransmission strategy for the minimum unacknowledged data packet is to disallow the transmitting end to continue to transmit other data packets after the transmitting end is deemed to be lost by the minimum unacknowledged packet, so that whether the minimum unacknowledged data packet is lost again can be determined only by the timeout of the timeout timer, and the detection efficiency is low. However, when the minimum unacknowledged data packet is retransmitted, the method can also continue to transmit other data packets, and the data packets can update the number of times of the loss marker of the minimum unacknowledged data packet, so that whether the loss marker data reaches the threshold value or not is judged to detect whether the minimum unacknowledged data packet is lost or not, and the quick retransmission is performed under the condition that the detection result is lost.

Therefore, the method can accelerate the loss detection efficiency and the retransmission efficiency of the minimum unacknowledged data packet, and further improve the possibility that the minimum unacknowledged data packet is acknowledged. The minimum unacknowledged data packet can only be rapidly acknowledged before the send window is moved backward, thereby improving the throughput and utilization of the network as a whole.

In the above embodiment, a specific implementation manner of step S202 (determining a lost data packet in a data packet) may include, in addition to an existing loss detection scheme, an implementation manner shown in steps S401 to S403 shown in fig. 4.

S401: and obtaining a confirmation message returned by the receiving end, wherein the confirmation message carries the confirmation state of the data packet.

After receiving the data packet, the receiving end generates an acknowledgement message of the corresponding data packet, and if the data packet with sequence number 0 is received, the receiving end generates an acknowledgement message with sequence number 0, and the identifier of the acknowledgement message may be set to ACK 0. Each acknowledgement message may be sent separately. Alternatively, the acknowledgement of multiple data packets may be included in one acknowledgement message, in which case different fields may be used in the acknowledgement message to indicate the acknowledgement of different data packets. For example, the acknowledgement message uses fields to mark the acknowledgements of all data packets, the field corresponding to the data packet that has not been received is set to 0, and the field corresponding to the data packet that has been received is set to 1. Specifically, for example, if the data packet 0 is not received by the receiving end, the acknowledgment message corresponding to the data packet 0 is set to 0, and if the data packet 1 is received by the receiving end, the acknowledgment message corresponding to the data packet 1 is set to 1.

As can be seen, the acknowledgement message carries an acknowledgement status of the data packet, and the acknowledgement status may indicate which data packets have been acknowledged or may indicate which data packets have not been acknowledged.

S402: a loss detection range is determined in the data packet based on the acknowledgement message.

The sending end determines a loss detection range in the data packets cached locally, and detects which data packets are lost and which data packets have been successfully received according to the received confirmation message in the loss detection range. For a data packet detected as lost, the sending end needs to retransmit the data packet in the local cache.

The specific implementation process for determining the loss detection range may include the following steps a 1-A3.

A1: and determining the data packet sequence number confirmed by the receiving end and the maximum data packet sequence number received by the receiving end according to the confirmation message.

The acknowledgement message carried in the acknowledgement message may include the data packet sequence number acknowledged by the receiving end, so that the data packet sequence number acknowledged by the receiving end is extracted from the acknowledgement message.

According to the acknowledgement message, the maximum data packet sequence number received by the receiving end is determined, which can be implemented in at least one of the following two ways.

In a first determination manner, the receiving end may set an identifier for recording the maximum data packet sequence number received by the receiving end, which may be referred to as a first identifier for convenience of description. And after receiving the data packet, the receiving end determines the maximum data packet sequence number in the received data packet, further updates the value of the first identifier, and returns the updated first identifier contained in the confirmation message to the sending end. For example, if the receiving end receives four data packets with sequence numbers 1, 2, 3, and 4, the first identifier is updated to 4, and the receiving end sends the acknowledgement messages corresponding to the four data packets with sequence numbers 1, 2, 3, and 4 to the transmitting end. A field may be provided in the acknowledgement message, which is used to record the first identity. The sending end extracts the data packet sequence number confirmed by the receiving end from the confirmation message and extracts the maximum data packet sequence number received by the receiving end from the first identification.

The second determination method is that after receiving the data packet, the receiving end generates a confirmation message of the corresponding data packet, and sends the confirmation message to the sending end, and the sending end determines the first identifier according to the confirmation message. For example, when the sender receives an acknowledgment message including four data packets with sequence numbers 1, 2, 3, and 4 returned by the receiver, the sender updates the maximum data packet sequence number received by the receiver to 4. Compared with the first determination method, the acknowledgement message in this determination method may not carry the value of the first identifier.

A2: and obtaining the minimum unacknowledged data packet sequence number of the sending end.

The sending end needs to obtain the sequence number of the minimum unacknowledged data packet in the sent data packets.

A3: and determining a loss detection range in the data packets according to the minimum unacknowledged data packet sequence number of the sending end and the maximum data packet sequence number received by the receiving end.

The determining of the loss detection range mainly includes determining a detected boundary, and specifically, determining left and right boundaries of the loss detection range according to a minimum unacknowledged data packet sequence number and a maximum data packet sequence number received by a receiving end, respectively.

The first determination method includes: determining the minimum unacknowledged data packet sequence number of the sending end as a detection range starting boundary (the starting boundary can also be called as a left boundary); determining the maximum data packet sequence number received by the receiving end as a detection range termination boundary (the termination boundary may also be referred to as a right boundary); in the data packet, a range composed of a detection range start boundary and a detection range end boundary is determined as a loss detection range.

For example, as shown in fig. 5A, the first arrow indicates the minimum unacknowledged data packet sequence number of the transmitting end, which points to the data packet with sequence number 1, and indicates that the left boundary is the data packet, and more specifically indicates that the detection range is from the data packet with sequence number 1 to the back.

The maximum data packet sequence number received by the receiving end may be used to distinguish a data packet to be acknowledged from an unacknowledged data packet. For example, as shown in fig. 5A, the second arrow indicates the maximum data packet sequence number received by the receiving end, which points to the data packet with sequence number 6, and indicates that the right boundary is the data packet, and more specifically indicates that the detection range is from the data packet with sequence number 6 onward.

The data packet range surrounded by the detection range starting boundary and the detection range ending boundary is used as a loss detection range, and then the loss detection is carried out on the data packets in the range.

The first determination method includes: determining the minimum unacknowledged data packet serial number of a sending end as a detection range starting boundary; acquiring the maximum data packet serial number sent by a sending end; the number of the data packets to be confirmed is obtained after the maximum data packet serial number sent by the sending end is differentiated from the maximum data packet serial number received by the receiving end, and the detection range termination boundary is determined according to the maximum data packet serial number received by the receiving end and the number of the data packets to be confirmed; in the data packet, a range composed of a detection range start boundary and a detection range end boundary is determined as a loss detection range.

The present embodiment differs from the first embodiment in the manner of confirming the end of the detection range boundary, and only this difference will be described below.

And subtracting the maximum data packet sequence number received by the receiving end from the maximum data packet sequence number sent by the sending end, wherein the difference value represents the number of the data packets to be confirmed. The number of data packets to be acknowledged may be noted as field max _ diff. The present embodiment is intended to take the end boundary of the previous part in the data packet to be acknowledged as the end boundary of the detection range. Wherein the previous portion of the data packet to be acknowledged is denoted by a max diff, the width of the previous portion depending on the extent of the data packet to be acknowledged and the value of the detection coefficient a. The detection coefficient a is a preset value, which indicates the transmission performance of the current network, and the size of the value can be set by a configurator according to the transmission performance of the network.

Specifically, the detection coefficient may be determined first according to the transmission performance of the current network; and the detection coefficient is less than or equal to 1, then the detection coefficient is multiplied by the number of the data packets to be confirmed, and the multiplication result is added with the maximum data packet serial number received by the receiving end to obtain a detection range termination boundary. The network management and configuration personnel sets or modifies the detection coefficient according to the real-time condition of the network, the maximum value of the detection coefficient can be 1, and the minimum value of the detection coefficient can be 0.

The above calculation process can be expressed as the following formula: r _ last _ max _ vir _ seq + a × max _ diff;

in the formula, r _ last _ max _ vir _ seq is the maximum data packet sequence number received by the receiving end, a is a detection coefficient, and max _ diff is the number of data packets to be confirmed. The calculation result of the formula is the ending boundary of the loss detection range, the ending boundary is a value which is greater than or equal to the boundary of the maximum data packet sequence number received by the receiving end, a is a number which is less than 1, and max _ diff can be a large number.

As can be seen, the second way to determine the loss detection range is to determine the maximum data packet sequence number that the sending end has successfully sent continuously as the starting boundary, and to take the boundary of a part of data packets to be confirmed after the maximum data packet sequence number that the receiving end has received as the ending boundary. In the example shown in fig. 5B, the data packets sent by the sending end to the receiving end in a certain sending period include 10 data packets with data packet sequence numbers 0-9, the data packet 0 pointed by the first arrow is the starting boundary of the loss detection range, and the data packet 8 pointed by the second arrow is the ending boundary of the loss detection range. As can be seen from a comparison between fig. 5A and fig. 5B, the loss detection range is larger further behind the ending boundary of the loss detection range determined by the second determination method.

Compared with the first embodiment, the detection range end boundary of the present embodiment is larger, so that the effect is better than the method in which the maximum data packet sequence number received by the receiving end is the end boundary in the transmission of a large number of data packets, and more data packet loss detection can be performed.

S403: within the loss detection range, a lost data packet is determined.

Wherein the loss detection range includes data packets that have been acknowledged and data packets that have not been acknowledged. This step is to determine which data packets are lost data packets among the data packets that have not yet been acknowledged.

The confirmation message carries the data packet serial number confirmed by the receiving end, and the confirmed data packet serial number does not need to be lost, so that the data packet indicated by the serial number except the data packet serial number confirmed by the receiving end in the loss detection range can be determined as the data packet to be detected, and the lost data packet is determined according to the logic position of the data packet to be detected.

Specifically, determining the missing data packet according to the logical position of the data packet to be detected comprises: if the difference value between the serial number of the data packet to be detected and the serial number of the specified data packet in the cache queue is within the preset difference value range, adding a preset value to the number of times of the loss mark of the data packet to be detected to obtain the number of times of the target loss mark; if the difference value between the serial number of the data packet to be detected and the serial number of the specified data packet in the data packet is not within the preset difference value range, adding the number of times of the loss marking of the data packet to be detected to a value corresponding to the logic position according to the logic position of the data packet to be detected in the loss detection range to obtain the number of times of the target loss marking; and determining the data packet to be detected with the target loss marking times meeting the preset retransmission condition as a lost data packet.

More specifically, the designated data packet may be the last data packet in the buffer queue. The preset difference range may be set to a range including a plurality of values according to actual conditions, or may be set to a specific value, for example, may be set to 0. It is assumed to be set to 0, that is, whether the data packet to be detected is the last data packet sent by the sending end is determined by comparing whether the difference between the sequence number of the data packet to be detected and the sequence number of the last data packet in the buffer queue is 0.

For ease of description, several field identifications are introduced. As shown in fig. 3, the sender may set some field identifications (as indicated by arrows in fig. 3) for recording various parameters. Of course, these identifiers may not be all provided, and only some of them may be provided. The description about the identification is as follows:

the first flag (r _ last _ max _ vir _ seq) records the maximum data packet sequence number received by the receiving end. Specifically, the data packet with the largest sequence number in the data packets received by the receiving end, for example, the largest sequence number successfully received by the receiving end is known to be 6 according to the acknowledgement message returned by the receiving end, in which case the identifier points to the data packet with the sequence number of 6.

The second flag (s _ max _ ack _ vir _ seq) records the maximum acknowledgment data packet number of the sender, which is the same as the value of the first flag. The values of the first identifier and the second identifier are updated each time an acknowledgement message is received.

The third identifier (s _ max _ con _ success _ vir _ seq) records the maximum data packet sequence number that the sending end successfully sends, and the value of the identifier is determined according to the sequence number that the receiving end successfully receives the data packet, specifically, the maximum continuous sequence number in the data packet that the receiving end receives, as follows: the receiving end receives four data packets with sequence numbers 0, 4, 5 and 6, in which case the identification points to the data packet with sequence number 0. The value of the identity is updated each time an acknowledgement message is received.

The fourth identifier (s _ max _ vir _ seq) records the sequence number of the maximum data packet sent by the sending end, specifically, the data packet with the maximum sequence number in the data packets currently sent by the sending end, for example, the sending end sends 10 data packets in total, where the identifier points to the data packet with the sequence number of 9. The value of the identification is updated after the sender sends one data packet at a time.

The fifth flag (s _ next _ ack _ seq) records the minimum unacknowledged data packet sequence number of the sender.

Under the condition that the designated data packet is the last data packet in the cache queue, judging whether the data packet to be detected is the last data packet sent by the sending end, specifically judging whether the logic sequence number of the data packet to be detected is consistent with the logic sequence number of the data packet recorded by the fourth identifier, if so, judging that the data packet to be detected is the last data packet sent by the sending end, wherein the specific formula is as follows:

vir_diff=s_max_vir_seq-vir_seq (1)

for example: if the sequence number of the fourth identification record is 9 and the sequence number of the data packet to be detected is also 9, then vir _ diff is 9-9 is 0. The sending end detects the value of the flag vir _ diff, and if the value of the flag is 0 and the preset difference range is 0, it indicates that the data packet to be detected is the last data packet sent by the sending end.

If the data packet to be detected is the last data packet sent by the sending end, whether the time length of the sending time of the data packet to be detected from the current time reaches the preset cycle time length of data sending is judged, and if yes, the number of times of losing marks of the data packet to be detected is increased by one.

Specifically, there is a preset period duration from sending to receiving of the data packet, if the duration is less than the preset period duration, the current network is normal, and if the duration is greater than the preset period duration, the current network is unstable. The preset period duration is set by a network management configurator. If the data packet to be detected is the last data packet sent by the sending end, the process for determining the number of times of the loss marker of the data packet to be detected is as follows: recording the time length from the sending time to the current time of the data packet to be detected, comparing the recorded time length with the preset period time length, and if the recorded time length is greater than the preset period time length, adding one to the number of times of the loss mark of the data packet to be detected; and if the time length is less than the preset period time length, adding zero to the number of times of the loss marks of the data packet to be detected.

If the data packet to be detected is not the last data packet sent by the sending end, determining the position of the data packet to be detected in the loss detection range; if the position is located near the initial boundary of the loss detection range, adding a first numerical value to the loss marking times of the data packet to be detected; if the position is located near the ending boundary of the loss detection range, adding a second value to the number of times of loss marking of the data packet to be detected; if the data packet is located at the middle position beyond the position near the starting termination boundary, adding a third numerical value to the number of times of the loss marking of the data packet to be detected; wherein the nearby position is a position meeting the preset distance requirement; wherein the first value is greater than the third value and greater than the second value.

Specifically, if the sequence number of the data packet to be detected is not consistent with the sequence number of the data packet recorded by the fourth identifier, different values are assigned to the number of times of the loss marker in the data packet to be detected according to the position of the data packet to be detected in the loss check range. The method comprises the following specific steps:

and if the serial number of the data packet to be detected is at a position near the starting boundary, namely at a position near the third identifier, the position near the starting boundary is a position required by a preset distance. And adding a first numerical value to the number of times of the loss marking of the data packet to be confirmed which meets the preset condition, wherein the first numerical value can be the difference value between the data packet sequence number recorded by the fourth identification and the sequence number of the current data packet to be detected.

If the serial number of the data packet to be detected is at the position near the termination boundary, and the position near the termination boundary is the position required by the preset distance, adding a second numerical value to the number of times of the loss marks of the data packet to be confirmed, which meets the preset condition, wherein the second numerical value can be 0. And if the data packet to be detected is in the position of the termination boundary attachment, the data packet to be detected is the data packet to be confirmed, and if the data packet to be detected belongs to the data packet to be confirmed, the data packet to be detected only needs to wait, so that the second numerical value can be 0.

And if the serial number of the data packet to be detected is located at the middle position outside the position near the starting and ending boundary, and the middle position is the position required by the preset distance, adding a third numerical value to the number of times of the loss marks of all the data packets in the data packet to be detected, wherein the third numerical value can be set to be 1, and adding 1 to the number of times of the loss marks of the data packet to be detected when the data packet to be detected belongs to the middle position, so that the loss judgment of the part of the data packet to be detected is accelerated after the part of the data packet to be detected receives the next confirmation message. The loss decision is the detection of the number of times of the loss mark, and it can be referred to the following.

It has been explained above that different values can be added to the number of loss markers of a data packet to be detected depending on the position of the data packet to be detected within the loss detection range. Therefore, the position of the data packet to be detected in the loss detection range is determined, which is a precondition for processing the number of times of the loss marker. An embodiment is described in detail below to determine the position of a data packet to be detected within a loss detection range.

Calculating a difference value between an original serial number of the data packet to be detected and a minimum unconfirmed original serial number of a sending end, determining the difference value as a first difference value, and if the first difference value is smaller than a preset value, determining that the data packet to be detected is located at a position near an initial boundary of a loss detection range; obtaining the number of data packets to be confirmed, and determining a detection coefficient according to the transmission performance of the current network; calculating a difference value between the maximum data packet serial number sent by the sending end and the serial number of the data packet to be detected, determining the difference value as a second difference value, and if the second difference value is smaller than the product of the detection coefficient and the number of the data packet to be confirmed, determining that the data packet to be detected is positioned near the termination boundary of the loss detection range; and if the first difference is not less than the preset value and the second difference is not less than the product of the detection coefficient and the number of the data packets to be confirmed, determining that the data packets to be detected are positioned at the middle position outside the position near the starting and ending boundary.

Specifically, the case where the data packet to be detected is located in the vicinity of the start boundary of the loss detection range is as follows:

calculating a difference value between an original serial number of a data packet to be detected and a minimum unconfirmed original serial number of a sending end to obtain a first difference value, wherein the specific formula is as follows:

D1=seq-s_next_ack_seq (2)

where D1 is the first difference, seq is the original sequence number of the data packet to be detected, and s _ next _ ack _ seq is the minimum unacknowledged original sequence number of the sender.

The difference value represents the distance between the original sequence number of the data packet to be detected and the minimum unconfirmed original sequence number, and if the difference value between the original sequence number of the data packet to be detected and the minimum unconfirmed original sequence number is within a preset value range, that is, D1 is smaller than a preset value, the difference value represents the position of the data packet to be detected near the initial boundary of the loss detection range. If the original sequence number of the data packet to be detected is 1 and the minimum unacknowledged original sequence number is 0, the first difference value is 1. The value of D1 calculated by the above formula is compared with the preset value for D1, and assuming that the preset value is 3, D1 is less than 3, and the data packet to be detected is located near the start boundary of the loss detection range. When D1 is 0, it means that the data packet to be detected is the minimum unacknowledged original sequence number.

The case where the data packet to be detected is located in the vicinity of the termination boundary of the loss detection range is as follows:

the number of data packets to be acknowledged (max _ diff) may be obtained by subtracting the value of the first flag, i.e. s _ max _ vir _ seq-r _ last _ max _ vir _ seq, from the value of the fourth flag. For example, the transmitting end sends 10 data packets in total from 0 to 9, and the receiving end receives the maximum logical sequence number of 6, which means that three data packets in total from 7, 8, and 9 are to-be-confirmed data packets. The number (max _ diff) of the data packets to be acknowledged may indicate the data packets sent by the sending end, but the data amount of any acknowledgement message returned by the receiving end has not been received yet, that is, the data amount that whether the receiving end is received or not cannot be judged.

And determining a detection coefficient a according to the transmission performance of the current network, wherein the detection coefficient a is a numerical value set by a network management configurator according to the transmission performance of the network, and the numerical value is less than or equal to 1. Then, the product of the detection coefficient and the number of data packets to be acknowledged is calculated: a max _ diff is a (s _ max _ vir _ seq-r _ last _ max _ vir _ seq), the formula represents a part of the data packet to be confirmed, the amount of the part is determined by a in the formula, when a is 1, the formula represents all the packets in the data packet to be confirmed, and a max _ diff is another implementation mode of the termination boundary in the above embodiment.

And calculating the difference between the sequence number of the maximum data packet sent by the sending end and the sequence number of the data packet to be detected according to the formula (1) vir _ diff, i.e. s _ max _ vir _ seq-vir _ seq, and determining the difference as a second difference vir _ diff. The second difference is used to determine whether the data packet to be detected belongs to the data packet to be confirmed, and if the data packet to be detected belongs to the data packet to be confirmed, the second difference indicates that the data packet to be detected is located near the termination boundary of the loss detection range.

If the second difference is smaller than the product of the detection coefficient and the number of the data packets to be confirmed, that is, vir _ diff < a × max _ diff, it indicates that the sequence number of the current data packet to be detected is greater than the maximum data packet sequence number received by the receiving end, that is, it identifies that the data packet to be detected is in the data packet to be confirmed, and further indicates that the data packet to be detected is in the position near the termination boundary of the loss check range, and it also indicates that the data packet to be detected is in the position near the termination boundary of the loss check range when the data packet to be detected is greater than or equal to the maximum data packet sequence number received by the receiving end and smaller than the maximum data packet sequence number sent by the sending.

If the data packet to be detected is between the position near the starting boundary and the position near the ending boundary, the data packet to be detected belongs to the middle position.

Therefore, after the position of the data packet to be detected in the loss detection range is determined, different numerical values can be added to the loss marking times of the data packet to be detected according to the position of the data packet to be detected in the loss detection range. Furthermore, the data packet to be detected whose number of times of loss marker satisfies the preset retransmission condition may be determined as a lost data packet, and the lost data packet may be retransmitted.

It should be noted that the sequence numbers used in the present invention may only include original sequence numbers, or may include both original sequence numbers and logical sequence numbers. Specifically, the maximum data packet sequence number received by the receiving end is a logic sequence number, the maximum confirmed data packet sequence number of the sending end is a logic sequence number, the maximum data packet sequence number successfully sent by the sending end continuously is a logic sequence number, the maximum data packet sequence number sent by the sending end is a logic sequence number, the minimum unconfirmed data packet sequence number of the sending end is an original sequence number, and a difference between the sequence number (original sequence number) of the data packet to be detected and the minimum unconfirmed data packet sequence number (original sequence number) of the sending end is calculated to obtain a first difference formula.

And the original sequence number represents the position of the data packet in all the data packets obtained after the target service data is segmented. The logical sequence number indicates the position of the data packet in all data packets sent by the sending end for transmitting the target service data. In the case of including a logical sequence number, the logical sequence number is always incremented, and for retransmitted data packets, which have both the logical sequence number and the original sequence number, the two are not identical.

At present, a data packet sent by a sending end only has an original sequence number, and the original sequence number represents the position of the data packet in all data packets obtained after target service data segmentation. The sending end determines the loss detection range according to the original sequence number of the data packet, that is, the data packet in the loss detection range is the data packet sent for the first time. However, after a certain data packet or some data packets are lost, the sending end may also retransmit the data packet, and the retransmitted data packet may also be lost or arrive with a delay, that is, the transmission condition of the retransmitted data packet may also reflect the performance of the transmission network, but the loss detection range determined at present does not include the retransmitted data packet, and only depends on the transmission condition of the first data packet to determine whether the data packet is lost and whether the data packet is retransmitted, so that the determination accuracy is not high.

In contrast, the present application proposes a scheme for adding a logic sequence number to a data packet, where the logic sequence number is a sequence number of all data packets sent by a sending end for sending target service data, and the logic sequence number is not only for a first data packet, but also for a retransmitted data packet sent for a lost data packet. The data packets sent by the sending end all have logic sequence numbers, and the logic sequence numbers are sequentially increased. Before the sending end sends the data packets, a logical sequence number is added to each data packet. The logical sequence numbers are added to solve the problems of loss, disorder and transmission errors in data packet transmission. The logical sequence number indicates the number of all data packets transmitted during the transmission of the target service data, and the data packets include both the first data packet and the data packet retransmitted after the loss.

The original sequence number and the logical sequence number of the same data packet may or may not coincide. For example: the sending end is about to send data packets with 0-4 original serial numbers, firstly, the data packets with 0-4 original serial numbers are subjected to logic serial numbers, and at the moment, the logic serial numbers of 0-4 are consistent with the original serial numbers. When the data packet is lost, the sending end resends the lost data packet and adjusts the logic sequence number of the lost data packet according to the situation, and at the moment, the logic sequence number of the data packet is not consistent with the original sequence number.

After the retransmission lost data packet is sent by the sending end, the retransmission data packet is stored in the buffer queue, so that the data packet in the buffer queue comprises both the original data packet and the retransmission data packet, the determined loss detection range can better reflect the performance of the transmission network, and the loss detection accuracy is higher.

In addition, the invention provides a data transmission control device which is applied to a sending end. As shown in fig. 6, the apparatus includes: a data packet obtaining unit 601, a missing data packet determining unit 602, a target data packet obtaining unit 603, and a target data packet transmitting unit 604.

A data packet obtaining unit 601, configured to obtain a data packet that is obtained after the target service data is segmented and that has been sent;

a missing data packet determining unit 602, configured to determine, among the data packets, a missing data packet;

a target data packet obtaining unit 603, configured to obtain a target data packet, where the target data packet includes a data packet to be confirmed in the data packet and/or a new data packet obtained by segmenting target service data;

a target data packet sending unit 604, configured to send the target data packet when retransmitting the lost data packet.

In an implementation manner, when the target data packet obtaining unit 603 obtains the target data packet, it is specifically configured to: obtaining the retransmission times of the lost data packets and/or determining the transmission loss rate of the network; determining a number of packets corresponding to the number of retransmissions and/or a transmission loss rate of the network; and obtaining the target data packets with the number of the packets.

In one implementation, the lost data packet determining unit 602 is specifically configured to, when determining a lost data packet in the data packets: obtaining a confirmation message returned by a receiving end, wherein the confirmation message carries a confirmation state of a data packet; determining a loss detection range in the data packet according to the acknowledgement message; within the loss detection range, a missing data packet is determined.

The confirmation message carries a data packet sequence number confirmed by a receiving end; in one implementation, when determining that a data packet is lost within the loss detection range, the lost data packet determining unit 602 is specifically configured to: determining the data packet indicated by the sequence number except the data packet sequence number confirmed by the receiving end in the loss detection range as a data packet to be detected; and determining the lost data packet according to the logic position of the data packet to be detected.

In an implementation manner, when determining the missing data packet according to the logical position of the data packet to be detected, the missing data packet determining unit 602 is specifically configured to: if the difference value between the sequence number of the data packet to be detected and the sequence number of the specified data packet in the data packet is within a preset difference value range, adding a preset value to the number of times of the loss mark of the data packet to be detected to obtain the number of times of the target loss mark; if the difference value between the sequence number of the data packet to be detected and the sequence number of the specified data packet in the data packet is not within the preset difference value range, adding the number of times of the loss marking of the data packet to be detected to a value corresponding to the logic position according to the logic position of the data packet to be detected in the loss detection range to obtain the number of times of the target loss marking; and determining the data packet to be detected with the target loss marking times meeting the preset retransmission condition as a lost data packet.

In an implementation manner, when determining the loss detection range in the data packet according to the acknowledgement message, the lost data packet determining unit 602 is specifically configured to: determining the data packet serial number confirmed by the receiving end and the maximum data packet serial number received by the receiving end according to the confirmation message; obtaining the minimum unacknowledged data packet serial number of a sending end; and determining a loss detection range in the data packets according to the minimum unacknowledged data packet sequence number of the sending end and the maximum data packet sequence number received by the receiving end.

In an implementation manner, when determining the loss detection range in the data packet according to the minimum unacknowledged data packet sequence number of the sending end and the maximum data packet sequence number received by the receiving end, the lost data packet determining unit 602 is specifically configured to: determining the minimum unacknowledged data packet serial number of a sending end as a detection range starting boundary; determining the maximum data packet serial number received by a receiving end as a detection range termination boundary; in the data packet, a range composed of the detection range start boundary and the detection range end boundary is determined as a loss detection range.

In an implementation manner, when determining the loss detection range in the data packet according to the minimum unacknowledged data packet sequence number of the sending end and the maximum data packet sequence number received by the receiving end, the lost data packet determining unit 602 is specifically configured to: determining the minimum unacknowledged data packet serial number of a sending end as a detection range starting boundary; acquiring the maximum data packet serial number sent by a sending end; the method comprises the steps that the number of data packets to be confirmed is obtained after the maximum data packet serial number sent by a sending end is differentiated from the maximum data packet serial number received by a receiving end, and a detection range termination boundary is determined according to the maximum data packet serial number received by the receiving end and the number of the data packets to be confirmed; in the data packet, a range composed of the detection range start boundary and the detection range end boundary is determined as a loss detection range.

In an implementation manner, when determining the detection range termination boundary according to the maximum data packet sequence number received by the receiving end and the number of the data packets to be confirmed, the lost data packet determining unit 602 is specifically configured to: determining a detection coefficient according to the transmission performance of the current network; wherein the detection coefficient is less than or equal to 1; and multiplying the detection coefficient by the number of the data packets to be confirmed, and adding the multiplication result to the maximum data packet serial number received by the receiving end to obtain a detection range termination boundary.

In addition, the present invention provides a data transmission control apparatus including: the data transmission control system comprises a processor and a memory, wherein the processor calls data stored in the memory by running a software program stored in the memory, and at least any one of the data transmission control methods is adopted.

It should be noted that, for a specific implementation process of each step of the data transmission control method, reference may be made to the above-mentioned method embodiment section, which is not described herein again.

In addition, the present invention provides a storage medium having a computer program stored thereon, wherein the computer program is configured to implement any one of the above-mentioned data transmission control methods when executed by a processor.

It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.

It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the same element.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于数据子帧聚合重传的硬件重传电路及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类