CN104518841A - Data sending method and apparatus - Google Patents

Data sending method and apparatus Download PDF

Info

Publication number
CN104518841A
CN104518841A CN201310444704.3A CN201310444704A CN104518841A CN 104518841 A CN104518841 A CN 104518841A CN 201310444704 A CN201310444704 A CN 201310444704A CN 104518841 A CN104518841 A CN 104518841A
Authority
CN
China
Prior art keywords
sliding window
window length
packet loss
adjusting range
threshold value
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.)
Granted
Application number
CN201310444704.3A
Other languages
Chinese (zh)
Other versions
CN104518841B (en
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.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication Technology 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 Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN201310444704.3A priority Critical patent/CN104518841B/en
Publication of CN104518841A publication Critical patent/CN104518841A/en
Application granted granted Critical
Publication of CN104518841B publication Critical patent/CN104518841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/1867Arrangements specially adapted for the transmitter end
    • H04L1/187Details of sliding window management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data sending method and apparatus, and belongs to the field of communication. The method comprises the following steps: obtaining a packet loss ratio corresponding to an n-th time period, n being a positive integer; according to a size relation between the packet loss ratio and a preset packet loss threshold, adjusting the length of an n-th slide window when a data packet is sent in the n-th time period to be the length of an (n+1)-th slide window; and according to the length of the (n+1)-th slide window, sending the data packet in an (n+1)-th time period. The apparatus comprises an obtaining module, an adjusting module and a sending module. According to the invention, the problem is solved that the data sending efficiency is affected because the length of a slide window cannot be adjusted according to a current network environment, and the effect of improving the data sending efficiency is achieved.

Description

Data transmission method for uplink and device
Technical field
The present invention relates to the communications field, particularly a kind of data transmission method for uplink and device.
Background technology
Along with the development of network technology, data send become the Internet the most key realize part.Data send and are mainly divided into two kinds, and one is transmitting, need transmission to ensure the integrality of data, the business such as such as file transmission; Another kind is unreliable transmission, and unreliable transmission does not require the strict integrality of data to a certain extent, and more focuses on the real-time of data, such as audio frequency and video, the business such as flow rate test.For unreliable transmission, how being issued to optimum transmission rate in current network environment, is particularly crucial.
Existing data transmission method for uplink comprises: transmitting terminal acquisition has sent and do not received the number of the packet of response; Detect the number got and whether equal default sliding window length; If testing result is this number equal default sliding window length, then suspends and send packet, continue upon receiving the response to send packet; If testing result is this number be less than default sliding window length, then continue to send packet.Wherein, sliding window length refers to and allows to send and do not receive the number of the packet of response.
Transmitting terminal, by the transmission of sliding window control data bag, if current network environment there occurs change, cannot adjust sliding window length, thus cannot adjust the transmission rate of packet, have impact on the transmitting efficiency of data.
Summary of the invention
Cannot adjust according to current network environment the problem affecting the transmitting efficiency of data caused to sliding window length to solve, embodiments providing a kind of data transmission method for uplink and device.Described technical scheme is as follows:
First aspect, embodiments provides a kind of data transmission method for uplink, and described method comprises:
Obtain the packet loss corresponding to the n-th time period, n is positive integer;
According to the magnitude relationship between described packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within described n-th time period;
Within (n+1)th time period, packet is sent according to described (n+1)th sliding window length.
Second aspect, embodiments provides a kind of data sending device, and described device comprises:
Acquisition module, for obtaining the packet loss corresponding to the n-th time period, n is positive integer;
The n-th sliding window length adjustment when sending packet within described n-th time period, for the magnitude relationship between the described packet loss that gets according to described acquisition module and default packet loss threshold value, is the (n+1)th sliding window length by adjusting module;
Sending module, for sending packet according to the described (n+1)th sliding window length after described adjusting module adjustment within (n+1)th time period.
By obtaining the packet loss corresponding to the n-th time period, n is positive integer; According to the magnitude relationship between described packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within described n-th time period; Within (n+1)th time period, packet is sent according to described (n+1)th sliding window length, the (n+1)th sliding window length can be automatically regulated according to packet loss, because packet loss has fed back current network environment, therefore, solve and cannot adjust according to current network environment the problem affecting the transmitting efficiency of data caused to sliding window length, reach the effect of the transmitting efficiency improving data.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the data transmission method for uplink that one embodiment of the invention provides;
Fig. 2 is the method flow diagram of the data transmission method for uplink that another embodiment of the present invention provides;
Fig. 3 is the structural framing figure of the data sending device that one embodiment of the invention provides;
Fig. 4 is the structural framing figure of the data sending device that yet another embodiment of the invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it illustrates the method flow diagram of the data transmission method for uplink that one embodiment of the invention provides, this data transmission method for uplink can be applied in transmitting terminal, and this transmitting terminal can be terminal or server etc.When transmitting terminal is terminal, can be intelligent television, smart mobile phone or panel computer etc.This data transmission method for uplink, comprising:
Step 101, obtains the packet loss corresponding to the n-th time period, and n is positive integer;
Packet loss refers to the ratio of the number of the total data bag of number and the transmission not receiving successful packet.Owing to needing to add up with transmission number the successful number that do not receive of packet, therefore, a time period can be specified in advance, and the number of the total data bag of the number and transmission that do not receive successful packet in this time period is added up, calculate the packet loss corresponding with this time period.
Particularly, the packet that transmitting terminal can feed back according to receiving terminal does not receive the packet loss corresponding to successful RESPONSE CALCULATION n-th time period, or, transmitting terminal can receive the packet loss etc. corresponding to the n-th time period that receiving terminal or third party device calculating and sending are sent, and the present embodiment does not limit the obtain manner of packet loss.
The n-th sliding window length adjustment when sending packet within the n-th time period, according to the magnitude relationship between packet loss and default packet loss threshold value, is the (n+1)th sliding window length by step 102;
When network environment is constant, packet loss is relevant to the transmission rate of packet.If the transmission rate of packet exceedes the maximum transmission rate that network allows, then the packet loss of packet is comparatively large, and the integrality of business is poor.Therefore, in order to ensure the integrality of business, transmitting terminal can pre-set packet loss threshold value, and adjusts the transmission rate of packet according to the magnitude relationship of packet loss and packet loss threshold value.Wherein, packet loss threshold value refers to the maximum packet loss allowed in the time period, can according to the integrity demands setting of business and amendment.
Because transmitting terminal is by the transmission rate of sliding window adjustment packet, therefore, in the present embodiment, transmitting terminal can adjust sliding window length according to the magnitude relationship of packet loss and packet loss threshold value, with the transmission rate by sliding window length adjustment packet.Wherein, sliding window length refers to and allows to send and do not receive the number of the packet of response.
Step 103, sends packet according to the (n+1)th sliding window length within (n+1)th time period.
In sum, the data transmission method for uplink that the embodiment of the present invention provides, by obtaining the packet loss corresponding to the n-th time period, n is positive integer; According to the magnitude relationship between packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within the n-th time period; Within (n+1)th time period, packet is sent according to the (n+1)th sliding window length, the (n+1)th sliding window length can be automatically regulated according to packet loss, because packet loss has fed back current network environment, therefore, solve and cannot adjust according to current network environment the problem affecting the transmitting efficiency of data caused to sliding window length, reach the effect of the transmitting efficiency improving data.
Please refer to Fig. 2, it illustrates the method flow diagram of the data transmission method for uplink that another embodiment of the present invention provides, this data transmission method for uplink can be applied in transmitting terminal, and this transmitting terminal can be terminal or server etc.When transmitting terminal is terminal, can be intelligent television, smart mobile phone or panel computer etc.This data transmission method for uplink, comprising:
Step 201, obtains the packet loss corresponding to the n-th time period, and n is positive integer;
Packet loss refers to the ratio of the number of the total data bag of number and the transmission not receiving successful packet.If transmitting terminal have sent packet within the n-th time period, then can add up the transmission of packet and accepting state within the n-th time, obtain the packet loss corresponding to the n-th time period.Wherein, packet can be the packet sent with unreliable transmission means, such as, UDP(User Datagram Protocol, User Datagram Protoco (UDP)) packet.
Step 202, judges whether packet loss is greater than packet loss threshold value; If judged result is packet loss be greater than packet loss threshold value, then perform step 203; If judged result is packet loss be less than packet loss threshold value, then perform step 204;
Packet loss threshold value refers to the maximum packet loss allowed in the time period, can according to the integrity demands setting of business and amendment.Such as, when the integrity demands of business is lower, larger packet loss threshold value can be set; When the integrity demands of business is higher, less packet loss threshold value etc. can be set.
In the present embodiment, after receiving terminal receives packet, buffer memory is carried out to the packet received, and the packet of buffer memory is processed.If the packet size of receiving terminal buffer memory reaches the buffer memory limit, receiving terminal abandons subsequently received packet, causes packet loss to increase.When packet loss reaches packet loss threshold value, transmitting terminal determines that current transmission rate have impact on the integrality of business, then transmitting terminal can reduce the transmission rate of packet, namely performs step 203.When packet loss does not reach packet loss threshold value, terminal determines current transmission rate not traffic affecting integrality, then transmitting terminal can increase the transmission rate of packet, namely performs step 204.
Step 203, reduces the n-th sliding window length and obtains the (n+1)th sliding window length, performs step 205 afterwards;
Sliding window length refers to and allows to send and do not receive the number of the packet of response.N-th sliding window length is the sliding window length corresponding to the n-th time period, (n+1)th sliding window length is the sliding window length corresponding to (n+1)th time period, and (n+1)th time period is the time period after the n-th time period and adjacent with the n-th time period.The duration of (n+1)th time period and the n-th time period can be equal, also can be unequal.
Usually, sliding window length is longer, and the transmission rate of packet is faster; Sliding window length is shorter, and the transmission rate of packet is slower, and therefore, transmitting terminal can determine the adjustment trend of the transmission rate of packet according to the magnitude relationship of packet loss and packet loss threshold value, thus according to this adjustment trend adjustment sliding window length.
It should be added that, when transmitting terminal sends packet first, owing to there is not packet loss, therefore, the sliding window length of packet cannot be determined.Now, transmitting terminal can pre-set initial sliding window length, and sends packet with this initial sliding window length.
Step 204, increases the n-th sliding window length and obtains the (n+1)th sliding window length;
Step 205, sends packet according to the (n+1)th sliding window length within (n+1)th time period.
For step 203, reduce the n-th sliding window length and obtain the (n+1)th sliding window length, can comprise:
1) obtain the maximum sliding window length of history, this history maximum sliding window length is the maximum sliding window length recorded when packet loss is less than packet loss threshold value;
2) the (n-1)th adjusting range when acquisition is the n-th sliding window length from the maximum sliding window length adjustment of history;
3) arrange the n-th adjusting range, this n-th adjusting range is less than the (n-1)th adjusting range;
4) maximum for history sliding window length is added that the n-th adjusting range obtains the (n+1)th sliding window length.
Wherein, the maximum sliding length of history is the maximum sliding window length recorded when packet loss is less than packet loss threshold value.Such as n=3, suppose that packet loss when sending packet with the 1st sliding window length is less than packet loss threshold value, the 1st sliding window length is now 4, be then 4 by maximum for history sliding window length records; Be less than packet loss threshold value with packet loss during the 2nd sliding window length transmission packet, the 2nd sliding window length is now 8, then maximum for history sliding window length is updated to 8 by 4; Be greater than packet loss threshold value with packet loss during the 3rd sliding window length transmission packet, then history maximum sliding window length is constant, is still 8.
(n-1)th adjusting range is the adjusting range of the n-th sliding window length relative to the maximum sliding window length of history.Packet loss when being less than packet loss threshold value due to packet loss when sending packet with the maximum sliding window length of history and sending packet with the n-th sliding window length is greater than packet loss threshold value, then terminal determines that the (n-1)th adjusting range is too large, n-th adjusting range can be set, this n-th adjusting range is less than the (n-1)th adjusting range, more maximum for history sliding window length is added that the n-th adjusting range obtains the (n+1)th sliding window length.
In the present embodiment, transmitting terminal can pre-set adjustable strategies, and arranges the n-th adjusting range according to adjustable strategies.Such as, the (n-1)th adjusting range is deducted the first predetermined value a and obtain the n-th adjusting range, a is positive number.Suppose that the maximum sliding window length of history be the 20, (n-1)th adjusting range be the 3, first predetermined value is 1, then the n-th sliding window length is 20+3=23, and the (n+1)th sliding window length is 20+(3-1)=22.Again such as, the (n-1)th adjusting range is multiplied by the second predetermined value b and obtains the n-th adjusting range, 0<b<1 etc.Suppose that the maximum sliding window length of history be the 20, (n-1)th adjusting range be the 2, first predetermined value is 1/2, then the n-th sliding window length is 20+2=22, and the (n+1)th sliding window length is 20+ [2*(1/2)]=21.Further, the first predetermined value a adjusted each time or the second predetermined value b can be identical, also can be different, and the present embodiment is not construed as limiting.
For step 204, increase the n-th sliding window length and obtain the (n+1)th sliding window length, can comprise:
1) maximum for history sliding window length is updated to the n-th sliding window length, the maximum sliding length of this history is the maximum sliding window length recorded when packet loss is less than packet loss threshold value;
If packet loss 2a) corresponding to historical time section is all less than packet loss threshold value, then the n-th adjusting range is set according to predetermined policy;
If in packet loss 2b) corresponding to historical time section exist a packet loss be greater than packet loss threshold value, then obtain from upgrade before the maximum sliding window length adjustment of history be the n-th sliding window length time the (n-1)th adjusting range; Arrange the n-th adjusting range, this n-th adjusting range is less than the (n-1)th adjusting range;
3) the maximum sliding window length of history after renewal is added that the n-th adjusting range obtains the (n+1)th sliding window length.
As n=1, owing to there is not the (n-1)th adjusting range, therefore, transmitting terminal can pre-set the n-th initial adjusting range, and calculates the (n+1)th sliding window length according to the n-th adjusting range, sends packet with the (n+1)th sliding window length.
When n >=2, whether transmitting terminal can exist a packet loss in the packet loss corresponding to the detection history time period is greater than packet loss threshold value, if the packet loss of testing result corresponding to historical time section is all less than packet loss threshold value, the maximum of sliding window length that then transmitting terminal is uncertain when reaching packet loss threshold value, now, transmitting terminal can arrange the n-th adjusting range according to predetermined policy.If there is a packet loss in the packet loss of testing result corresponding to historical time section to be greater than packet loss threshold value, the maximum of sliding window length when then transmitting terminal is determined to reach packet loss threshold value, be less than, packet loss is greater than maximum sliding window length during packet loss threshold value, now, the (n-1)th adjusting range when transmitting terminal acquisition is the n-th sliding window length from the maximum sliding window length adjustment of history before renewal; Arrange the n-th adjusting range, this n-th adjusting range is less than the (n-1)th adjusting range.
Further, transmitting terminal can also arrange adjustment flag bit, and whether this adjustment flag bit exists a packet loss be greater than packet loss threshold value for identifying in the packet loss corresponding to historical time section.Particularly, if be greater than packet loss threshold value first with packet loss during the i-th sliding window length transmission packet, then adjustment flag bit can be set to predetermined value by transmitting terminal.A packet loss whether is there is when being greater than packet loss threshold value in packet loss corresponding to the transmitting terminal detection history time period, the numerical value of adjustment flag bit can be read, if this numerical value equals predetermined value, then determine that there is a packet loss in the packet loss corresponding to historical time section is greater than packet loss threshold value; If this numerical value is not equal to predetermined value, then determine that the packet loss corresponding to historical time section is all less than packet loss threshold value.
When transmitting terminal arranges the n-th adjusting range according to predetermined policy, n-th adjusting range can be set to random number, also the n-th adjusting range can be set according to history adjusting range, the n-th adjusting range etc. can also be set according to the maximum sliding window length of history after renewal.
Concrete, if arrange the n-th adjusting range according to history adjusting range, transmitting terminal can obtain any one history adjusting range, and arranges the n-th adjusting range according to this adjusting range.The present embodiment is that the (n-1)th adjusting range is described for history adjusting range, then the (n-1)th adjusting range can be added that the 3rd predetermined value c obtains the n-th adjusting range by transmitting terminal, makes the n-th adjusting range be positive number.Suppose that the maximum sliding window length of history be the 20, (n-1)th adjusting range be the 3, the 3rd predetermined value is 4, then the n-th sliding window length is 20+3=23, and the (n+1)th sliding window length is (20+3)+4=27.Again such as, the (n-1)th adjusting range is multiplied by the 4th predetermined value d and obtains the n-th adjusting range, d is positive number etc.Suppose that the maximum sliding window length of history be the 20, (n-1)th adjusting range be the 2, the 4th predetermined value is 2, then the n-th sliding window length is 20+2=22, and the (n+1)th sliding window length is (20+2)+2*2=26.Further, the 3rd predetermined value c adjusted each time or the 4th predetermined value d can be identical, also can be different, and the present embodiment is not construed as limiting.
Or, concrete, if transmitting terminal arranges the n-th adjusting range according to the maximum sliding window length of history after renewal, then the n-th adjusting range is set according to predetermined policy, can comprises:
The maximum sliding window length of history after upgrading is set to the n-th adjusting range.
Suppose that the maximum sliding window length of history be the 20, (n-1)th adjusting range is 4, then the n-th sliding window length is 20+4=24, now, maximum for history sliding window length is updated to the n-th sliding window length 24, then the n-th adjusting range is the maximum sliding window length 24 of history, and the (n+1)th sliding window length calculated is (20+4)+24=48.
It should be added that, if network environment is poor from better becoming, and the maximum sliding window length of history is greater than sliding window length when packet loss reaches packet loss threshold value, because transmitting terminal can not reduce the maximum sliding window length of history, therefore, if transmitting terminal continues to use the (n+1)th sliding window length obtained according to the maximum sliding window length computation of history to send packet, then packet loss will inevitably be caused to become large, have impact on the integrality of business.Therefore, transmitting terminal also needs to reset the (n+1)th sliding window length according to current network environment.Such as, the (n+1)th sliding window length, when the number of times detecting that packet loss is greater than packet loss threshold value is continuously greater than predetermined threshold, is reduced predetermined value by transmitting terminal, or, the (n+1)th sliding window length is set to initial value, re-executes step 201 to step 205 etc.
For the ease of understanding, the present embodiment supposes that suitable sliding window length when reaching packet loss threshold value is 91, this numerical value is only a hypothesis numerical value, need to obtain through repeatedly adjusting in the process sending packet, transmitting terminal can not get in advance, and computational process introduces this numerical value for convenience of description herein.The initial sliding window length that the present embodiment pre-sets is 2, increase the n-th sliding window length and packet loss corresponding to historical time section is all less than packet loss threshold value time the n-th adjusting range be the maximum sliding window length of history after upgrading, increase the n-th sliding window length and the n-th adjusting range existed in packet loss corresponding to historical time section when a packet loss is greater than packet loss threshold value is 1/2 of the (n-1)th adjusting range, the n-th adjusting range when reducing the n-th sliding window is 1/2 of the (n-1)th adjusting range, it is 0 that packet loss corresponding to historical time section adjusts flag bit when being all less than packet loss threshold value, adjusting flag bit when an existence packet loss is greater than packet loss threshold value in packet loss corresponding to historical time section is 1, the parameters calculated when then sending packet is as shown in the table:
The process of the calculating of parameters is specific as follows:
For the first time, without the maximum sliding window length Max of history and adjusting range, the sliding window length 2 of the 1st sliding window length=initial;
For the second time (n=1), due to the suitable sliding window length 91 of initial sliding window length 2<, therefore, the packet loss < packet loss threshold value of the 1st time, now Max=2.Packet loss corresponding to historical time section is all less than packet loss threshold value, adjustment flag bit=0, therefore, and 1st adjusting range=Max=2, the 2nd sliding window length=Max+ 1st adjusting range=2+2=4;
For the third time (n=2), due to the suitable sliding window length 91 of the 2nd sliding window length 4<, therefore, the packet loss < packet loss threshold value of the 2nd time, now Max=4.Packet loss corresponding to historical time section is all less than packet loss threshold value, adjustment flag bit=0,2nd adjusting range=Max=4, the 3rd sliding window length=Max+ 2nd adjusting range=4+4=8;
4th time (n=3), due to the suitable sliding window length 91 of the 3rd sliding window length 8<, therefore, the packet loss < packet loss threshold value of the 3rd time, now Max=8.Packet loss corresponding to historical time section is all less than packet loss threshold value, adjustment flag bit=0,3rd adjusting range=Max=8, the 4th sliding window length=Max+ 3rd adjusting range=8+8=16;
5th time (n=4), due to the suitable sliding window length 91 of the 4th sliding window length 16<, therefore, the packet loss < packet loss threshold value of the 4th, now Max=16.Packet loss corresponding to historical time section is all less than packet loss threshold value, adjustment flag bit=0,4th adjusting range=Max=16, the 5th sliding window length=Max+ 4th adjusting range=16+16=32;
6th time (n=5), due to the suitable sliding window length 91 of the 5th sliding window length 32<, therefore, the packet loss < packet loss threshold value of the 5th, now Max=32.Packet loss corresponding to historical time section is all less than packet loss threshold value, adjustment flag bit=0,5th adjusting range=Max=32, the 6th sliding window length=Max+ 5th adjusting range=32+32=64;
7th time (n=6), due to the suitable sliding window length 91 of the 6th sliding window length 64<, therefore, the packet loss < packet loss threshold value of the 6th time, now Max=64.Packet loss corresponding to historical time section is all less than packet loss threshold value, adjustment flag bit=0,6th adjusting range=Max=64, the 7th sliding window length=Max+ 6th adjusting range=64+64=128;
8th time (n=7), due to the suitable sliding window length 91 of the 7th sliding window length 128>, therefore, the packet loss > packet loss threshold value of the 7th time, now Max=64.There is a packet loss in packet loss corresponding to historical time section and be greater than packet loss threshold value, adjustment flag bit=1, the 7th adjusting range=6th adjusting range/2=32, the 8th sliding window length=Max+ 7th adjusting range=64+32=96;
9th time (n=8), due to the suitable sliding window length 91 of the 8th sliding window length 96>, therefore, the packet loss > packet loss threshold value of the 8th time, now Max=64.There is a packet loss in packet loss corresponding to historical time section and be greater than packet loss threshold value, adjustment flag bit=1, the 8th adjusting range=7th adjusting range/2=16, the 9th sliding window length=Max+ 8th adjusting range=64+16=80;
Tenth time (n=9), due to the suitable sliding window length 91 of the 9th sliding window length 80<, therefore, the packet loss < packet loss threshold value of the 9th time, now Max=80.There is a packet loss in packet loss corresponding to historical time section and be greater than packet loss threshold value, adjustment flag bit=1, the 9th adjusting range=8th adjusting range/2=8, the 10th sliding window length=Max+ 9th adjusting range=80+8=88;
Tenth once (n=10), due to the suitable sliding window length 91 of the 10th sliding window length 88<, therefore, and the packet loss < packet loss threshold value of the 10th time, now Max=88.There is a packet loss in packet loss corresponding to historical time section and be greater than packet loss threshold value, adjustment flag bit=1, the 10th adjusting range=9th adjusting range/2=4, the 11st sliding window length=Max+ 10th adjusting range=88+4=92;
12 time (n=11), due to the suitable sliding window length 91 of the 11st sliding window length 92>, therefore, the packet loss > packet loss threshold value of the 11st time, now Max=88.There is a packet loss in packet loss corresponding to historical time section and be greater than packet loss threshold value, adjustment flag bit=1, the 11st adjusting range=10th adjusting range/2=2, the 12nd sliding window length=Max+ 11st adjusting range=88+2=90;
13 time (n=12), due to the suitable sliding window length 91 of the 12nd sliding window length 90<, therefore, the packet loss < packet loss threshold value of the 12nd time, now Max=90.There is a packet loss in packet loss corresponding to historical time section and be greater than packet loss threshold value, adjustment flag bit=1, the 12nd adjusting range=11st adjusting range/2=1, the 13rd sliding window length=Max+ 12nd adjusting range=90+1=91.
In sum, the data transmission method for uplink that the embodiment of the present invention provides, by obtaining the packet loss corresponding to the n-th time period, n is positive integer; According to the magnitude relationship between packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within the n-th time period; Within (n+1)th time period, packet is sent according to the (n+1)th sliding window length, the (n+1)th sliding window length can be automatically regulated according to packet loss, because packet loss has fed back current network environment, therefore, solve and cannot adjust according to current network environment the problem affecting the transmitting efficiency of data caused to sliding window length, reach the effect of the transmitting efficiency improving data.In addition, by obtaining history maximum sliding window length, the (n-1)th adjusting range when to obtain from the maximum sliding window length adjustment of history be the n-th sliding window length; N-th adjusting range is set, this n-th adjusting range is less than the (n-1)th adjusting range, maximum for history sliding window length is added that the n-th adjusting range obtains the (n+1)th sliding window length, can when the (n-1)th adjusting range be excessive, reduce the n-th adjusting range, make the n-th sliding window length more meet current network environment, reach the effect of the accuracy of raising n-th sliding window length.
Please refer to Fig. 3, it illustrates the structural framing figure of the data sending device that one embodiment of the invention provides, this data sending device can be applied in transmitting terminal, and this transmitting terminal can be terminal or server etc.When transmitting terminal is terminal, can be intelligent television, smart mobile phone or panel computer etc.This data sending device, comprising:
Acquisition module 310, for obtaining the packet loss corresponding to the n-th time period, n is positive integer;
The n-th sliding window length adjustment when sending packet within the n-th time period, for the magnitude relationship between the packet loss that gets according to acquisition module 310 and default packet loss threshold value, is the (n+1)th sliding window length by adjusting module 320;
Sending module 330, sends packet for the (n+1)th sliding window length after adjusting according to adjusting module 320 within (n+1)th time period.
In sum, the data sending device that the embodiment of the present invention provides, by obtaining the packet loss corresponding to the n-th time period, n is positive integer; According to the magnitude relationship between packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within the n-th time period; Within (n+1)th time period, packet is sent according to the (n+1)th sliding window length, the (n+1)th sliding window length can be automatically regulated according to packet loss, because packet loss has fed back current network environment, therefore, solve and cannot adjust according to current network environment the problem affecting the transmitting efficiency of data caused to sliding window length, reach the effect of the transmitting efficiency improving data.
Please refer to Fig. 4, it illustrates the structural framing figure of the data sending device that yet another embodiment of the invention provides, this data sending device can be applied in transmitting terminal, and this transmitting terminal can be terminal or server etc.When transmitting terminal is terminal, can be intelligent television, smart mobile phone or panel computer etc.This data sending device, comprising: acquisition module 310, adjusting module 320 and sending module 330.
Acquisition module 310, for obtaining the packet loss corresponding to the n-th time period, n is positive integer;
The n-th sliding window length adjustment when sending packet within the n-th time period, for the magnitude relationship between the packet loss that gets according to acquisition module 310 and default packet loss threshold value, is the (n+1)th sliding window length by adjusting module 320;
Sending module 330, sends packet for the (n+1)th sliding window length after adjusting according to adjusting module 320 within (n+1)th time period.
Particularly, adjusting module 320, comprising:
Judging unit 321, for judging whether packet loss is greater than packet loss threshold value;
First adjustment unit 322, if be that packet loss is greater than packet loss threshold value for the result of judging unit 321 judgement, then reduce the n-th sliding window length and obtains the (n+1)th sliding window length;
Second adjustment unit 323, if be that packet loss is less than packet loss threshold value for the result of judging unit 321 judgement, then increase the n-th sliding window length and obtains the (n+1)th sliding window length.
Particularly, the first adjustment unit 322, comprising:
First obtains subelement 322A, and for obtaining the maximum sliding window length of history, the maximum sliding length of history is the maximum sliding window length recorded when packet loss is less than packet loss threshold value;
Second obtains subelement 322B, the (n-1)th adjusting range when being the n-th sliding window length for obtaining from the maximum sliding window length adjustment of history;
First arranges subelement 322C, and for arranging the n-th adjusting range, the n-th adjusting range is less than the (n-1)th adjusting range that the second acquisition subelement 322B gets;
First adjustment subelement 322D, the maximum sliding window length of history got for obtaining subelement 322A by first adds that the first the n-th adjusting range arranging subelement 322C setting obtains the (n+1)th sliding window length.
Particularly, the second adjustment unit 323, comprising:
Upgrade subelement 323A, for maximum for history sliding window length is updated to the n-th sliding window length, the maximum sliding length of history is the maximum sliding window length recorded when packet loss is less than packet loss threshold value;
Second arranges subelement 323B, if be all less than packet loss threshold value for the packet loss corresponding to historical time section, then arranges the n-th adjusting range according to predetermined policy;
3rd arranges subelement 323C, if in the packet loss corresponding to historical time section exist a packet loss be greater than packet loss threshold value, then obtain from upgrade before the maximum sliding window length adjustment of history be the n-th sliding window length time the (n-1)th adjusting range; Arrange the n-th adjusting range, the n-th adjusting range is less than the (n-1)th adjusting range;
Second adjustment subelement 323D, for by upgrade subelement 323A upgrade after the maximum sliding window length of history add that second arranges subelement 323B or the 3rd and arrange the n-th adjusting range that subelement 323C arranges and obtain the (n+1)th sliding window length.
Particularly, second arranges subelement 323B, for the maximum sliding window length of history after renewal is set to the n-th adjusting range.
In sum, the data sending device that the embodiment of the present invention provides, by obtaining the packet loss corresponding to the n-th time period, n is positive integer; According to the magnitude relationship between packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within the n-th time period; Within (n+1)th time period, packet is sent according to the (n+1)th sliding window length, the (n+1)th sliding window length can be automatically regulated according to packet loss, because packet loss has fed back current network environment, therefore, solve and cannot adjust according to current network environment the problem affecting the transmitting efficiency of data caused to sliding window length, reach the effect of the transmitting efficiency improving data.In addition, by obtaining history maximum sliding window length, the (n-1)th adjusting range when to obtain from the maximum sliding window length adjustment of history be the n-th sliding window length; N-th adjusting range is set, this n-th adjusting range is less than the (n-1)th adjusting range, maximum for history sliding window length is added that the n-th adjusting range obtains the (n+1)th sliding window length, can when the (n-1)th adjusting range be excessive, reduce the n-th adjusting range, make the n-th sliding window length more meet current network environment, reach the effect of the accuracy of raising n-th sliding window length.
It should be noted that: the data sending device that above-described embodiment provides is when carrying out data and sending, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by data sending device is divided into different functional modules, to complete all or part of function described above.In addition, the data sending device that above-described embodiment provides and data transmission method for uplink embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a data transmission method for uplink, is characterized in that, described method comprises:
Obtain the packet loss corresponding to the n-th time period, n is positive integer;
According to the magnitude relationship between described packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within described n-th time period;
Within (n+1)th time period, packet is sent according to described (n+1)th sliding window length.
2. method according to claim 1, it is characterized in that, described according to the magnitude relationship between described packet loss and default packet loss threshold value, be the (n+1)th sliding window length by the n-th sliding window length adjustment when sending packet within described n-th time period, comprise:
Judge whether described packet loss is greater than described packet loss threshold value;
If judged result is described packet loss be greater than described packet loss threshold value, then reduces described n-th sliding window length and obtain described (n+1)th sliding window length;
If judged result is described packet loss be less than described packet loss threshold value, then increases described n-th sliding window length and obtain described (n+1)th sliding window length.
3. method according to claim 2, is characterized in that, the described n-th sliding window length of described reduction obtains described (n+1)th sliding window length, comprising:
Obtain the maximum sliding window length of history, the maximum sliding length of described history is the maximum sliding window length recorded when described packet loss is less than described packet loss threshold value;
The (n-1)th adjusting range when acquisition is described n-th sliding window length from described history maximum sliding window length adjustment;
Arrange the n-th adjusting range, described n-th adjusting range is less than described (n-1)th adjusting range;
Maximum for described history sliding window length is added described n-th adjusting range obtains described (n+1)th sliding window length.
4. method according to claim 2, is characterized in that, the described n-th sliding window length of described increase obtains described (n+1)th sliding window length, comprising:
Maximum for history sliding window length is updated to described n-th sliding window length, and the maximum sliding length of described history is the maximum sliding window length recorded when described packet loss is less than described packet loss threshold value;
If the packet loss corresponding to historical time section is all less than described packet loss threshold value, then the n-th adjusting range is set according to predetermined policy;
If in the packet loss corresponding to historical time section exist a packet loss be greater than described packet loss threshold value, then obtain from upgrade before described history maximum sliding window length adjustment be described n-th sliding window length time the (n-1)th adjusting range; Arrange described n-th adjusting range, described n-th adjusting range is less than described (n-1)th adjusting range;
Described history maximum sliding window length after upgrading is added that described n-th adjusting range obtains described (n+1)th sliding window length.
5. method according to claim 4, is characterized in that, describedly arranges the n-th adjusting range according to predetermined policy, comprising:
Described history maximum sliding window length after upgrading is set to described n-th adjusting range.
6. a data sending device, is characterized in that, described device comprises:
Acquisition module, for obtaining the packet loss corresponding to the n-th time period, n is positive integer;
The n-th sliding window length adjustment when sending packet within described n-th time period, for the magnitude relationship between the described packet loss that gets according to described acquisition module and default packet loss threshold value, is the (n+1)th sliding window length by adjusting module;
Sending module, for sending packet according to the described (n+1)th sliding window length after described adjusting module adjustment within (n+1)th time period.
7. device according to claim 6, is characterized in that, described adjusting module, comprising:
Judging unit, for judging whether described packet loss is greater than described packet loss threshold value;
First adjustment unit, if be that described packet loss is greater than described packet loss threshold value for the result of described judging unit judgement, then reduce described n-th sliding window length and obtains described (n+1)th sliding window length;
Second adjustment unit, if be that described packet loss is less than described packet loss threshold value for the result of described judging unit judgement, then increase described n-th sliding window length and obtains described (n+1)th sliding window length.
8. device according to claim 7, is characterized in that, described first adjustment unit, comprising:
First obtains subelement, and for obtaining the maximum sliding window length of history, the maximum sliding length of described history is the maximum sliding window length recorded when described packet loss is less than described packet loss threshold value;
Second obtains subelement, the (n-1)th adjusting range when being described n-th sliding window length for obtaining the described history maximum sliding window length adjustment got from described first acquisition subelement;
First arranges subelement, and for arranging the n-th adjusting range, described n-th adjusting range is less than described (n-1)th adjusting range that described second acquisition subelement gets;
First adjustment subelement, the described history maximum sliding window length got for obtaining subelement by described first adds that the described first described n-th adjusting range arranging subelement setting obtains described (n+1)th sliding window length.
9. device according to claim 7, is characterized in that, described second adjustment unit, comprising:
Upgrade subelement, for maximum for history sliding window length is updated to described n-th sliding window length, the maximum sliding length of described history is the maximum sliding window length recorded when described packet loss is less than described packet loss threshold value;
Second arranges subelement, if be all less than described packet loss threshold value for the packet loss corresponding to historical time section, then arranges the n-th adjusting range according to predetermined policy;
3rd arranges subelement, if in the packet loss corresponding to historical time section exist a packet loss be greater than described packet loss threshold value, then obtain from upgrade before described history maximum sliding window length adjustment be described n-th sliding window length time the (n-1)th adjusting range; Arrange described n-th adjusting range, described n-th adjusting range is less than described (n-1)th adjusting range;
For the described history maximum sliding window length after described renewal subelement being upgraded, second adjustment subelement, adds that described second arranges subelement or the described 3rd and arrange described n-th adjusting range that subelement arranges and obtain described (n+1)th sliding window length.
10. device according to claim 9, is characterized in that, described second arranges subelement, for the described history maximum sliding window length after renewal is set to described n-th adjusting range.
CN201310444704.3A 2013-09-26 2013-09-26 Data transmission method for uplink and device Active CN104518841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310444704.3A CN104518841B (en) 2013-09-26 2013-09-26 Data transmission method for uplink and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310444704.3A CN104518841B (en) 2013-09-26 2013-09-26 Data transmission method for uplink and device

Publications (2)

Publication Number Publication Date
CN104518841A true CN104518841A (en) 2015-04-15
CN104518841B CN104518841B (en) 2018-07-20

Family

ID=52793636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310444704.3A Active CN104518841B (en) 2013-09-26 2013-09-26 Data transmission method for uplink and device

Country Status (1)

Country Link
CN (1) CN104518841B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107769988A (en) * 2016-08-19 2018-03-06 华为技术有限公司 The method, apparatus and the network equipment that information is sent and detection messages are lost
CN110351198A (en) * 2019-07-05 2019-10-18 视联动力信息技术股份有限公司 A kind of flow rate adjusting method, data transmission system, storage medium and equipment
CN113179220A (en) * 2021-05-12 2021-07-27 中移智行网络科技有限公司 Data transmission method, data transmission device and computer readable storage medium
CN113438180A (en) * 2021-06-02 2021-09-24 广联达科技股份有限公司 Transmission control method, device and equipment for UDP (user Datagram protocol) data packet and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101282173A (en) * 2008-05-21 2008-10-08 华为技术有限公司 Method, system and apparatus for adjusting data package transmission velocity
US7571343B1 (en) * 2006-08-31 2009-08-04 Nortel Networks Limited Handling sequence numbers and/or an anti-replay window after failover between servers
CN102547206A (en) * 2010-12-30 2012-07-04 ***通信集团公司 Method and device for determining video transmission parameter during video communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7571343B1 (en) * 2006-08-31 2009-08-04 Nortel Networks Limited Handling sequence numbers and/or an anti-replay window after failover between servers
CN101282173A (en) * 2008-05-21 2008-10-08 华为技术有限公司 Method, system and apparatus for adjusting data package transmission velocity
CN102547206A (en) * 2010-12-30 2012-07-04 ***通信集团公司 Method and device for determining video transmission parameter during video communication

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107769988A (en) * 2016-08-19 2018-03-06 华为技术有限公司 The method, apparatus and the network equipment that information is sent and detection messages are lost
CN107769988B (en) * 2016-08-19 2021-05-04 华为技术有限公司 Method, device and network equipment for sending information and detecting message loss
CN110351198A (en) * 2019-07-05 2019-10-18 视联动力信息技术股份有限公司 A kind of flow rate adjusting method, data transmission system, storage medium and equipment
CN113179220A (en) * 2021-05-12 2021-07-27 中移智行网络科技有限公司 Data transmission method, data transmission device and computer readable storage medium
CN113438180A (en) * 2021-06-02 2021-09-24 广联达科技股份有限公司 Transmission control method, device and equipment for UDP (user Datagram protocol) data packet and readable storage medium

Also Published As

Publication number Publication date
CN104518841B (en) 2018-07-20

Similar Documents

Publication Publication Date Title
CN106330757B (en) Flow control method and device
CN103916367A (en) Method and apparatus for transmission of multimedia data
CN103607780A (en) Mobile device and network connection method thereof
CN104518841A (en) Data sending method and apparatus
CN109495660B (en) Audio data coding method, device, equipment and storage medium
CN103560862A (en) Mobile terminal and coding-rate control method thereof
CN105553868A (en) Data transmission method and device and terminal
CN110149167B (en) Method and device for dynamically adjusting codes, mobile terminal and storage medium
CN106954248A (en) A kind of method for network access and device
CN104601521A (en) Method, device and system for dynamically selecting communication transmission protocol
US11695629B2 (en) Method and apparatus for configuring a network parameter
CN101989902A (en) Data retransmission method and device
CN104427286A (en) Method and system for making video call
CN105407411A (en) Data sending method and data sending device
CN105306424A (en) Stream media transmission method, stream media sending device and stream media transmission system
CN101815124A (en) Webpage browsing method, mobile terminal and network equipment
CN103916414A (en) Transmission rate configuration method, terminal device, server and system
CN106488039A (en) Volume adjusting method and system, mobile terminal and playback equipment
CN104135444A (en) A method and a device for controlling multimedia data transmission flow
CN104333728A (en) A Method, device and system for regulating and controlling audio and video transmission
CN103856558A (en) Data processing method and device for terminal application
CN104168218A (en) Jitter buffering method and device
WO2014062103A1 (en) Method, network device, computer program and computer program product for determining a set of power state parameters
CN103533452A (en) Transmission control method and device for streaming media
KR20120025176A (en) Method and apparatus for controlling data usage of mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building block A room 602

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.