Based on the self-adapting high-speed information transferring method of measuring
Technical field
The present invention relates to network information high speed transmission technology field, exactly relate to a kind of based on the self-adapting high-speed information transferring method of measuring.
Background technology
Under network quality instability and wireless network environment, the existing network transmission protocol can not the limited network bandwidth of good use.Do not increasing under the network infrastructure condition of cost, how better to make full use of effective bandwidth, transmission service more at a high speed is being provided, becoming the focus of research to the network user.
Existing transport layer protocol mainly is to be the basis with TCP.TCP is towards connecting (connection-oriented); Promptly began before the Another application process is sent data an application process; These two processes are " shaking hands " earlier each other: send some preparation message segment mutually, guarantee the transfer of data parameters needed with foundation.Simultaneously; TCP has set up a kind of reliable data transmission service (reliable data transfer server) on insecure service basis of doing one's best of IP; Require data message of the every transmission of transmit leg; All require the recipient to receive response message ACK of loopback behind the data message, the expression recipient has received message; If transmit leg is not received ACK in the regular hour, then need the data retransmission message.TCP can guarantee that the recipient can both receive all data messages that transmit leg sends at last, but its shortcoming is also very obvious: the time of having sacrificed the ACK message that awaits a response; Increased the expense of control message to the network bandwidth.
Publication number is CN101123606, comprises following steps for the Chinese patent document of 2008.02.13 discloses a kind of AVS transfer control method based on RTP or real time control protocol in open day:
Step 1, transmitting terminal send data;
Step 2, receiving terminal receive data;
The parametric statistics module of step 3, receiving terminal is the statistical correlation parameter at any time, in real time the computing network bandwidth;
Step 4, every at a distance from the identical time interval, the prediction network bandwidth that step 3 is obtained feeds back to transmitting terminal;
The self adaptation adjusting module of step 5, transmitting terminal is adjusted transmission rate rate according to the network bandwidth r of feedback, and to adapt to current network conditions: the network bandwidth of the network bandwidth ten p * current prediction of rate=(1-p) * predicted out last time, p is a smoothing factor.
This scheme is utilized adaptive approach feedback network situation, thus the adjustment transmission rate, and the prevention network congestion has suppressed buffering area and has overflowed, and guarantees the service quality of video transmission, realizes flow control end to end.
But technique scheme still following problem can occur in actual application:
On the one hand, the network bandwidth of technique scheme prediction is inaccurate, also just can't really judge network quality;
On the other hand, the purpose of said method only is to guarantee video transmission service quality, the network actual bandwidth is not farthest utilized in the transmission course, therefore can't reach best laser propagation effect and transmission speed;
In addition, the transmitting terminal of technique scheme needs the wait recipient to reply to the ACK to this packet and could send next packet after sending a packet, and transmission rate can receive the influence of network delay;
Summary of the invention
For solving the problems of the technologies described above; The present invention proposes and a kind ofly can either make full use of the network bandwidth not increasing under the network infrastructure condition of cost, it is congested based on the self-adapting high-speed information transferring method of measuring to guarantee that again network transmission process can not cause; The present invention adopts the thinking of kinetic measurement; In transmission course, network quality (available bandwidth) is carried out real time dynamic measurement, and, adjust transmission rate automatically according to the quality of network quality; Make the rate of information throughput always work in the lower edge of network availability bandwidth, thereby farthest utilized the high-speed transfer of the idle bandwidth completion information of network.
The present invention realizes through following technical proposals:
A kind of based on the self-adapting high-speed information transferring method of measuring, it is characterized in that:
A, employing udp protocol, transmit leg will send the grouping that object is divided into a plurality of fixed sizes, and the size of dividing into groups is L;
B, transmit leg are when the transmission beginning; Send two groupings continuously, it is right that these two groupings are called the measurement bag, and the recipient receives after these two groupings; Calculate the time interval Δ T of these two packet arrives, and calculate current available network bandwidth PB=L/ Δ T thus;
C, recipient will be sent to said transmit leg through the network bandwidth PB value that step b obtains; After transmit leg received, the adjustment data were sent interval delta T
Transfer=p*L/PB, wherein, p is the adjustment coefficient, span is 1.2-1.5, then with adjusted Δ T
TransferBe the time interval, continue to send packet continuously to the recipient;
D, that the regular time t in the every interval of transmit leg sends the one-shot measurement bag to the recipient is right, and reciever calculates PB according to the method in b step, and the method according to the c step feeds back to transmit leg with PB then, and transmit leg sends at interval according to the method adjustment data in c step.
The present invention's technical scheme further is:
Each grouping described in the step a has unique integer packet numbering, and packet numbering increases progressively continuously;
And e in steps also after steps d: the recipient remembers all packet numberings of having received, record the packet numbering that might lose, and to count paid-in number of packet be CG; The number of packet of losing is CL; Calculating packet loss thus is LR=CL/ (CG+CL), if reciever find N continuous in second packet loss LR in continuous growth, then in the calculating of PB value next time; The PB value that b step is obtained impels transmit leg to increase the transmission interval delta T divided by 2.
The size of said L is for being not more than 1200 bytes.
Said t is 1 second.
Said N is 8-12 second, preferably 10 seconds.
Described transmission object is a block of information, and said block of information is the memory storage unit or the disk file of appointment in the computer.
With publication number is that CN101123606 is that the prior art of representative is compared, and advantage of the present invention shows:
1, the present invention adopts udp protocol; The sending direction reciever sends data, and in transmission course, transmit leg is after sending a grouping; Need not wait for that the ACK that the recipient is directed against this packet just replys next grouping of directly transmission, so transmission rate can not receive the influence of network delay.
2, adopt step b of the present invention, c and d; Can really accomplish to calculate in real time the network bandwidth accurately; Judge network quality, in transmission course, method is carried out kinetic measurement to bandwidth through bag; And adjust transmission rate in real time according to bandwidth, guarantee that message transmitting procedure can make full use of the network idle bandwidth;
3, adopt step e of the present invention, in transmission course, increase (showing that network quality descends), just can reduce transmission rate automatically, avoid further causing or aggravating network congestion in case detect packet loss.
4, the technical scheme that adopts a of the present invention, b, c, d and e to constitute; Not increasing under the network infrastructure condition of cost, can either make full use of the network bandwidth, it is congested to guarantee that again network transmission process can not cause; The present invention adopts the thinking of kinetic measurement; In transmission course, network quality (available bandwidth) is carried out real time dynamic measurement, and, adjust transmission rate automatically according to the quality of network quality; Make the rate of information throughput always work in the lower edge of network availability bandwidth, thereby farthest utilized the high-speed transfer of the idle bandwidth completion information of network.
Description of drawings
To combine Figure of description and embodiment that the present invention is done further detailed description below, wherein:
Fig. 1 is a principle schematic of the present invention
Fig. 2 is MSN and this protocol transmission speed comparison diagram
Fig. 3 is FTP and this protocol transmission speed comparison diagram
Embodiment
Embodiment 1
The invention discloses a kind of self-adapting high-speed information transferring method based on measurement, transmission course has two roles to participate in: transmit leg and recipient.The object that sends is the information specific piece, for example like the memory storage unit or the disk file of appointment in the computer.This programme adopts the udp protocol transmission, thereby has avoided the affirmation process of handshake procedure and the ACK of TCP, has avoided the interference of network delay.Its concrete grammar is following:
A, employing udp protocol, transmit leg will send the grouping that object is divided into a plurality of fixed sizes, and the size of dividing into groups is L;
B, transmit leg are when the transmission beginning; Send two groupings continuously, it is right that these two groupings are called the measurement bag, and the recipient receives after these two groupings; Calculate the time interval Δ T of these two packet arrives, and calculate current available network bandwidth PB=L/ Δ T thus;
C, recipient will be sent to said transmit leg through the network bandwidth PB value that step b obtains; After transmit leg received, the adjustment data were sent interval delta T
Transfer=p*L/PB, wherein, p is the adjustment coefficient, span is 1.2-1.5, then with adjusted Δ T
TransferBe the time interval, continue to send packet continuously to the recipient, as shown in Figure 1;
D, that the regular time t in the every interval of transmit leg sends the one-shot measurement bag to the recipient is right, and reciever calculates PB according to the method in b step, and the method according to the c step feeds back to transmit leg with PB then, and transmit leg sends at interval according to the method adjustment data in c step.
Embodiment 2
As a preferred embodiments of the present invention, the present invention's technical scheme further is: each grouping described in the step a has unique integer packet numbering, and packet numbering increases progressively continuously; And e in steps also after steps d: the recipient remembers all packet numberings of having received; Record the packet numbering that might lose, and to count paid-in number of packet be CG, the number of packet of losing is CL; Calculating packet loss thus is LR=CL/ (CG+CL); If reciever find N continuous in second packet loss LR in continuous growth, then in the calculating of PB value next time, with the PB value of b step acquisition divided by 2; Impel transmit leg to increase and send interval delta T, avoid causing that network is further congested.The value of said P preferably 1.2, the size of said L is for being not more than 1200 bytes.Said t is 1 second.Said N is 10 seconds.
Embodiment 3
According to the size of L value, N also can do correspondingly to be adjusted into 8 seconds to 12 seconds.
Embodiment 4
Experimental verification:
Two host As in network, B is last, utilizes the host-host protocol (being called " this agreement ") of MSN, FTP and this programme to transmit file respectively.In the transport process, the effective transmission speed of monitoring host A.
MSN and the contrast of this protocol transmission speed, as shown in Figure 2, among the figure, the sampling time (1 second at interval);
FTP and the contrast of this protocol transmission speed, as shown in Figure 3, among the figure, the sampling time (1 second at interval);
It is thus clear that the effective transmission speed of this agreement is apparently higher than the conventional transmission agreement based on TCP, and be in state comparatively stably.