CN106936730A - A kind of file transmitting method, TCP agent and TCP Client - Google Patents

A kind of file transmitting method, TCP agent and TCP Client Download PDF

Info

Publication number
CN106936730A
CN106936730A CN201511024912.3A CN201511024912A CN106936730A CN 106936730 A CN106936730 A CN 106936730A CN 201511024912 A CN201511024912 A CN 201511024912A CN 106936730 A CN106936730 A CN 106936730A
Authority
CN
China
Prior art keywords
tcp
token
bandwidth
sample
message
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
CN201511024912.3A
Other languages
Chinese (zh)
Other versions
CN106936730B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201511024912.3A priority Critical patent/CN106936730B/en
Priority to PCT/CN2016/111079 priority patent/WO2017114231A1/en
Publication of CN106936730A publication Critical patent/CN106936730A/en
Application granted granted Critical
Publication of CN106936730B publication Critical patent/CN106936730B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/407Bus networks with decentralised control
    • H04L12/417Bus networks with decentralised control with deterministic access, e.g. token passing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/19Flow control; Congestion control at layers above the network layer
    • H04L47/193Flow control; Congestion control at layers above the network layer at the transport layer, e.g. TCP related
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/2871Implementation details of single intermediate entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of file transmitting method, TCP agent and TCP Client.For being effectively prevented from network moment into excessive message, TCP handling capacities are improved.Present invention method includes:M message is sent to TCP Client;Receive N number of TCP response messages of the M message that TCP Client sends;The sample delivery bandwidth that the TCP between TCP agent and TCP Client is connected is calculated according to each sample TCP response messages, sample TCP response messages are at least one of N number of TCP response messages;Estimation bandwidth sample set is determined according to sample delivery bandwidth, estimation bandwidth sample set includes the sample delivery bandwidth being calculated according to each sample TCP response messages;Estimation bandwidth is determined according to estimation bandwidth sample set;Target bandwidth is determined according to estimation bandwidth;Available tokens token numbers are determined according to target bandwidth, according to the transmission that can use token numerical control messages.

Description

A kind of file transmitting method, TCP agent and TCP Client
Technical field
The present invention relates to the communications field, more particularly to a kind of file transmitting method, TCP agent and TCP Client.
Background technology
It is excessive that network congestion refers to certain a part of message (packet) quantity up in communication network so that The subnetwork has little time to process the message, so that under causing this subnetwork or even whole network performance The phenomenon of drop, even can make network traffic be absorbed in pause when serious, and this phenomenon is referred to as congestion. Congestion is a kind of network state of sustained overload, and now user (including link bandwidth, deposits to Internet resources Storage space and processor disposal ability etc.) demand exceeded intrinsic capacity.
In the prior art, mainly by based on transmission control protocol (English full name:Transmission Control Protocol, English abbreviation:TCP application) controls to enter in network by TCP sliding window mechanisms Message quantity.After there is congestion in network, TCP congestion controls increase according to additivity/and multiplying property subtracts (English Full name:Additive-increase multiplicative-decrease, English abbreviation:AIMD) algorithm is continuous Adjustment sends window to adapt to network quality.
Because the participant of TCP sliding window mechanisms is only transmitting terminal and the reception of single TCP connections End, it only considered the receiving ability of receiving terminal, without the transmittability in view of network, easily go out Existing network network moment enters excessive message, bursts of traffic occurs.Such as work as network intermediary device, for example, route Device etc., during relatively busier or generation congestion, now the message based on sliding window sends or receives Ability has exceeded network capacity, and network has little time to treat many messages, i.e., not to the hair of message Transmission rate is controlled, and now, the message in window will be abandoned by the network equipment, network transmission quality It is deteriorated, ultimately causes TCP throughput degradations.
The content of the invention
A kind of file transmitting method, TCP agent and TCP Client are the embodiment of the invention provides, is used In network moment into excessive message is effectively prevented from, TCP handling capacities are improved.
In view of this, in a first aspect, the embodiment of the present invention provides a kind of file transmitting method, including:
After TCP agent sends M message to TCP Client, M of TCP Client feedback is received N number of TCP response messages of message, TCP agent, can after N number of TCP response messages are received To determine sample TCP response messages from these TCP response messages, rung further according to each sample TCP Message is answered to calculate the sample delivery bandwidth of the TCP connections between TCP agent and TCP Client.
TCP agent determines estimation bandwidth sample set according to the sample delivery bandwidth being calculated, according to estimation Bandwidth sample set determines estimation bandwidth, and target bandwidth is determined according to estimation bandwidth, is determined according to target bandwidth Available tokens token numbers, finally according to the transmission of available token numerical controls message.
In the embodiment of the present invention, whether message can be transmitted is controlled by TCP agent, specifically Show as:Whether message is sent by token numbers to determine, and the token numbers are true by target bandwidth institute Fixed, therefore network moment into excessive message can be effectively prevented from, improve TCP handling capacities.
Preferably, in the embodiment of the present invention, TCP agent determines available tokens token according to target bandwidth Number, has following several possible implementations, specifically finally according to the transmission of available token numerical controls message It is as follows:
In a kind of implementation, TCP agent determines available tokens token numbers, last root according to target bandwidth According to can be included with the transmission of token numerical control messages:
TCP agent can set token number rates of rise according to target bandwidth, then determine according to token Whether the number of the token that number rate of rise is obtained reaches default value, if reaching, to TCP visitors Family end sends the message.
In this implementation, transmission of the TCP agent to message is controlled especially by according to the mesh Marker tape determination token number rates of rise wide, it is determined that obtained according to the token numbers rate of rise Whether the number of token reaches default value, if reaching, TCP agent just sends to the TCP Client The message.
I.e. in the embodiment of the present invention, there is provided it is specific that a kind of transmission of TCP agent to message is controlled Implementation, for being effectively prevented from network moment into excessive message, improves TCP handling capacities.
In a kind of possible design, in the file transmitting method of foregoing description, can also include:
TCP agent can set a transmission timer, and start the transmission timer, when the transmission is fixed When device timing the token for determining to obtain according to token numbers rate of rise is performed when reaching preset time period, then Number the step of whether reach default value.
In the embodiment of the present invention, when TCP agent determines the token according to the acquisition of token numbers rate of rise Number when being not up to default value, it is necessary to the message for being sent can be buffered in TCP agent side socket Socket buffering areas are medium to be transmitted, it is necessary to wait the arrival of the instruction of transmission message to be triggered, i.e. TCP (English is complete for the confirmation message of TCP Client feedback when agency needs to wait last time message to send successfully Claim:Acknowledgement, English abbreviation:ACK), now TCP agent just can again perform determination The step of whether number of the token increased according to token numbers rate of rise reaches default value, but, Because network failure or other reasons communicate, ACK two-way time (English names are can frequently result in: Round-trip time, English abbreviation:RTT it is) oversize, in this case, even if the number of token is Through reaching default value, data in buffering area cannot can also send for a long time, now in order to avoid The appearance of such case, in the embodiment of the present invention, TCP agent passes through to set a transmission timer, only Will transmission timer timing when reaching preset time period, carry out determination according to token number rates of rise The step of whether number of the token of acquisition reaches default value, and when the number of token reaches preset number During value, then TCP agent just sends message to TCP Client.Appearance socket can be efficiently avoid The situation that data in word socket buffering areas cannot send for a long time.
In a kind of possible design, the file transmitting method can also include:
TCP agent can set the depth capacity of token resource queues and token resource queues, wherein, Token resource queues are used to deposit the token that TCP agent is obtained according to token numbers rate of rise, most What what big depth was used to indicating token resource queues to deposit obtained according to token numbers rate of rise The maximum number of token.
In the embodiment of the present invention, token resource queues are used to deposit TCP agent according to the growth of token numbers The token that speed is obtained, depth capacity is for indicating token resource queues to deposit according to token numbers The maximum number of the token that mesh rate of rise is obtained.In actual applications, on the one hand, in week regular hour In phase, if needing to be sent by TCP agent without message, can now be given birth to according to token numbers rate of rise Into going out more token, and the depth capacity of the token resource queues to constrain token to increase impossible More than certain threshold value, the effect on the other hand being brought is that the depth capacity of token resource queues is played One cushioning effect, i.e., when TCP agent does not have message to need to send in time period, token Resource queue can preserve a number of token, now, if having suddenly a large amount of messages need send when, The message amount that can be sent with maximum raising permission, the relative speed for being finally reached transmission message compares Uniform effect.
In a kind of possible design, TCP agent calculates TCP generations according to each sample TCP response messages The sample delivery bandwidth of the TCP connections between reason and TCP Client is specially:
For each sample TCP response messages, TCP agent can be according to sample TCP response messages correspondence Message send the time, the reception time of sample TCP response messages, and corresponding message length Calculate the sample delivery bandwidth of TCP connections.
In a kind of possible design, TCP agent can be with before determining target bandwidth according to estimation bandwidth Including:
TCP agent can determine the type of service of the TCP connections between TCP Client, then obtain plan Configuration information is omited, wherein, tactful configuration information includes that the adjustment ratio of target bandwidth is right with type of service Should be related to, the tactful configuration information is configured by user by the products configuration interface that TCP agent is provided, The adjustment ratio of target bandwidth can be determined with tactful configuration information according to type of service afterwards, further according to estimating Calculate bandwidth and tactful configuration information determines target bandwidth;
Now, TCP agent determines that target bandwidth is specially according to estimation bandwidth and tactful configuration information:
TCP agent is calculated target bandwidth according to below equation:
Adjustment ratio × estimation the bandwidth of target bandwidth=target bandwidth.
In the embodiment of the present invention, TCP agent can receive the products configuration that user is provided by TCP agent Interface input policing configuration information, wherein, tactful configuration information can include the adjustment ratio of target bandwidth With the corresponding relation of type of service, further, marker tape adjustment ratio wide is specifically as follows object tape Adjustment percentage of float cap value wide or the floating lower limit of target bandwidth or target bandwidth etc..Exist In the embodiment of the present invention, target bandwidth is not only only determined according to the estimation bandwidth determined by TCP agent, The need for also having considered according to the TCP connection types of service between TCP agent and TCP Client Carry out the determination of target bandwidth, in actual applications, can according to actual type of service conditions of demand, The such as type of service such as video class business or picture category business, selects input corresponding by manual type Tactful configuration information.TCP agent is determined by the tactful configuration information and estimation bandwidth of user input Target bandwidth, can cause that the token number rates of rise for setting are more reasonable, more accurately, in reality In, can more efficiently avoid network moment from entering excessive message, improve TCP handling capacities.
In another implementation, transmission of the TCP agent to message be controlled including:
TCP agent can be sent to TCP Client target bandwidth, to cause TCP Client according to mesh Marker tape setting token number rates of rise wide, and determine the token obtained according to token numbers rate of rise Number whether reach default value, if reaching, send message.
In this implementation, TCP agent sends to TCP Client target bandwidth, to cause TCP visitors Family end sets token number rates of rise according to target bandwidth, and determines according to token number rates of rise Whether the number of the token of acquisition reaches default value, if reaching, TCP Client just sends message.I.e. A kind of transmission there is provided TCP agent to message is controlled another concrete implementation mode, for having Avoid network moment from entering excessive message to effect, improve TCP handling capacities.
Second aspect, the embodiment of the invention provides a kind of file transmitting method, including:
TCP Client can receive the target bandwidth of TCP agent transmission, wherein, target bandwidth is by TCP Agency determines according to estimation bandwidth, and estimates that bandwidth is determined by TCP agent according to estimation bandwidth sample set, Estimation bandwidth sample set is determined that sample delivery bandwidth is by TCP generations by TCP agent according to sample delivery bandwidth Manage the TCP connections calculated according to each sample TCP response messages between TCP agent and TCP Client Obtain, sample TCP response messages are at least one of N number of TCP response messages, N number of TCP rings Message is answered to feed back to TCP agent after M message of TCP agent transmission is received for TCP Client Message, then TCP Client according to target bandwidth setting token number rates of rise, press by finally determination Whether the number of the token obtained according to token numbers rate of rise reaches default value, if reaching, should TCP Client just sends message.
In a kind of possible design, the file transmitting method also includes:
TCP Client can set transmission timer and start the transmission timer, when transmission timer is fixed When reaching preset time period, then performing TCP Client, to determine whether the number of current token reaches preset The step of numerical value.
When TCP Client determine according to token numbers rate of rise obtain token number be not up to it is pre- , it is necessary to the message for being sent can be buffered in the socket buffering area of TCP client side during setting value Etc. to be transmitted, it is necessary to wait the arrival of the instruction of transmission message to be triggered, i.e. TCP Client needs The ACK fed back when last time, message sent successfully, now TCP Client can just perform again It is determined that the step of whether number of the token increased according to token numbers rate of rise reaches default value, But, because network failure or other reasons communicate, it is oversize to can frequently result in ACK two-way times RTT, In this case, even if the number of token has reached default value, TCP client side socket Data in socket buffering areas cannot can also send for a long time, now going out in order to avoid such case Existing, in the embodiment of the present invention, TCP Client is by setting a transmission timer, as long as the transmission is fixed When device timing when reaching preset time period, carry out the token for determining to obtain according to token numbers rate of rise Number the step of whether reach default value, and when the number of token reaches default value, then TCP Client sends message.The data occurred in buffering area can be efficiently avoid cannot be sent for a long time Situation about going out.
In a kind of possible design, the file transmitting method can also include:
TCP Client can set the depth capacity of token resource queues and token resource queues, Wherein, token resource queues are used to deposit the token obtained according to token numbers rate of rise, maximum deep Spend the token's that is obtained according to token numbers rates of rise for indicating token resource queues to deposit Maximum number.
In the embodiment of the present invention, token resource queues are used to deposit according to the acquisition of token numbers rate of rise Token, depth capacity is used to indicate what token resource queues can deposit to increase speed according to token numbers The maximum number of the token that rate is obtained.In actual applications, on the one hand, within cycle regular hour, if TCP Client does not have message to need to send, and can now be generated according to token numbers rate of rise more Make token, and the depth capacity of the token resource queues constrain token increase can not possibly exceed it is certain Threshold value, the on the other hand effect that is brought is that the depth capacity of token resource queues plays a buffering Effect, i.e., when TCP Client does not have message to need to send in time period, token resource queues A number of token can be preserved, now, if having suddenly a large amount of messages need send when, can be with maximum Raising allow the message amount that is sent, be finally reached the relative speed for sending message than more uniform effect Really.
In a kind of possible design, target bandwidth is by TCP agent according to estimation bandwidth and strategy configuration Information is obtained, wherein tactful configuration information can specifically include the adjustment ratio and type of service of target bandwidth Corresponding relation, the tactful configuration information can by TCP agent provide products configuration interface be set Put.Further, marker tape adjustment ratio wide is specifically as follows the float cap value or mesh of target bandwidth Adjustment percentage of marker tape floating lower limit wide or target bandwidth etc..
I.e. in embodiments of the present invention, target bandwidth is not only only according to the estimation band determined by TCP agent Width is determined, has also considered and connected business according to the TCP between TCP agent and TCP Client The determination of target bandwidth is carried out the need for type, can cause that the token numbers that TCP Client is set increase Speed long is more reasonable, more accurately, in actual applications, can more efficiently avoid network moment Into excessive message, TCP handling capacities are improved.
The third aspect, the embodiment of the invention provides a kind of TCP agent, and the TCP agent has to be realized State the function of TCP agent behavior in method design.The function can be realized by hardware, it is also possible to logical Cross hardware and perform corresponding software realization.The hardware or software include one or more and above-mentioned functions phase Corresponding module.The module can be software and/or hardware.
In a kind of possible design, the TCP agent includes:
Sending module, for sending M message to TCP Client;
Receiver module, N number of TCP response messages of the M message for receiving TCP Client transmission;
Processing module, each sample TCP response messages for being received according to receiver module calculate TCP generations The sample delivery bandwidth of the TCP connections between reason and TCP Client, sample TCP response messages are N At least one of individual TCP response messages, estimation bandwidth sample set is determined according to sample delivery bandwidth, is estimated Calculating bandwidth sample set includes the sample delivery bandwidth being calculated according to each sample TCP response messages, root It is estimated that bandwidth sample set determines estimation bandwidth, target bandwidth is determined according to estimation bandwidth, according to object tape Width determines that token numbers can be used, according to the transmission that can use token numerical control messages.
In a kind of possible design, the structure of TCP agent includes transmitter, receiver and treatment Device, the transmitter, for TCP Client send M message, the receiver, for receiving N number of TCP response messages of the M message that TCP Client sends, the processor, for basis Each sample TCP response messages that receiver is received calculate the TCP between TCP agent and TCP Client The sample delivery bandwidth of connection, sample TCP response messages are at least one of N number of TCP response messages, Estimation bandwidth sample set is determined according to sample delivery bandwidth, estimation bandwidth sample set is included according to each sample The sample delivery bandwidth that TCP response messages are calculated, estimation bandwidth is determined according to estimation bandwidth sample set, Target bandwidth is determined according to estimation bandwidth, available tokens token numbers are determined according to target bandwidth, according to available The transmission of token numerical control messages.
Fourth aspect, the embodiment of the invention provides a kind of TCP Client, and the TCP Client has real The function of TCP Client behavior in existing above method design.The function can be realized by hardware, Corresponding software can be performed by hardware to realize.The hardware or software include one or more with it is above-mentioned The corresponding module of function phase.
In a kind of possible design, the TCP Client includes:
Receiver module, the target bandwidth for receiving TCP agent transmission, target bandwidth is by TCP agent root It is estimated that bandwidth determines, estimation bandwidth is determined by TCP agent according to estimation bandwidth sample set, estimates bandwidth Sample set is determined that sample delivery bandwidth is by TCP agent according to every by TCP agent according to sample delivery bandwidth The TCP connections that individual sample TCP response messages are calculated between TCP agent and TCP Client are obtained, sample This TCP response messages are at least one of N number of TCP response messages, and N number of TCP response messages are TCP Client feeds back to the message of TCP agent after receiving M message of TCP agent transmission;
Processing module, for setting token number rates of rise according to target bandwidth, it is determined that according to token Whether the number of the token that number rate of rise is obtained reaches default value;
Sending module, if the token for determining to be obtained according to token numbers rate of rise for processing module Number reaches default value, then send message.
In a kind of possible design, the structure of TCP Client includes receiver, processor and hair Send device, the receiver, the target bandwidth for receiving TCP agent transmission, target bandwidth is by TCP generations Reason determines that estimation bandwidth is determined by TCP agent according to estimation bandwidth sample set, is estimated according to estimation bandwidth Bandwidth sample set is determined that sample delivery bandwidth is by TCP agent root by TCP agent according to sample delivery bandwidth The TCP connections calculated according to each sample TCP response messages between TCP agent and TCP Client are obtained, Sample TCP response messages are at least one of N number of TCP response messages, N number of TCP response messages The message of TCP agent is fed back to after receiving M message of TCP agent transmission for TCP Client, The processor, for setting token number rates of rise according to target bandwidth, it is determined that according to token numbers Whether the number of the token that mesh rate of rise is obtained reaches default value, the transmitter, if for processing Device determines that the number of the token obtained according to token numbers rate of rise reaches default value, then send report Text.
5th aspect, the embodiment of the invention provides a kind of computer-readable storage medium, and the Computer Storage is situated between Have program stored therein code in matter, and the program code is used to indicating performing above-mentioned first aspect or second aspect Method.
Compared to prior art, as can be seen from the above technical solutions, in the embodiment of the present invention, TCP generations Manage and send M message to TCP Client, receive the N number of of the M message that TCP Client sends TCP response messages, according to each sample TCP response messages calculate TCP agent and TCP Client it Between TCP connection sample delivery bandwidth, sample TCP response messages be N number of TCP response messages in At least one, according to sample delivery bandwidth determine estimation bandwidth sample set, estimation bandwidth sample set include According to the sample delivery bandwidth that each sample TCP response messages are calculated, according to estimation bandwidth sample set It is determined that estimation bandwidth, target bandwidth is determined according to estimation bandwidth, determine that order can be used finally according to target bandwidth Board token numbers, according to the transmission that can use token numerical control messages.Compared to prior art, reported when sending Wen Shi, the transmission of message is limited to token numbers, the i.e. transmission rate to message and is controlled, effectively Avoid network moment from entering excessive message, improve TCP handling capacities.
Brief description of the drawings
Fig. 1 is a system architecture schematic diagram of the embodiment of the present invention;
Fig. 2 is a kind of file transmitting method one embodiment schematic diagram of the embodiment of the present invention;
Fig. 3 is the system architecture schematic diagram in a kind of file transmitting method one embodiment of the embodiment of the present invention;
Fig. 4 is a kind of embodiment of the present invention another embodiment schematic diagram of file transmitting method;
Fig. 5 is a kind of TCP agent one embodiment schematic diagram of the embodiment of the present invention;
Fig. 6 is a kind of embodiment of the present invention another embodiment schematic diagram of TCP agent;
Fig. 7 is a kind of embodiment of the present invention another embodiment schematic diagram of TCP agent;
Fig. 8 is a kind of TCP Client one embodiment schematic diagram of the embodiment of the present invention;
Fig. 9 is a kind of embodiment of the present invention another embodiment schematic diagram of TCP Client.
Specific embodiment
A kind of file transmitting method, TCP agent and client are the embodiment of the invention provides, for having Avoid network moment from entering excessive message to effect, improve TCP handling capacities.
Fig. 1 is referred to, in the embodiment of the present invention, TCP Client passes through SCG gateways and TCP server Set up TCP connections.
The TCP Client, can refer to the equipment for providing a user with voice and/or data connectivity, for example It is portable equipment with wireless connecting function or is connected to other treatment of radio modem and sets It is standby.
TCP agent can be deployed on SCG gateways and realize, or can also be network element independent in network, The network element can be deployed between TCP Client and SCG gateways, it is also possible to be deployed in SCG gateways with Between TCP server.
The message that TCP server is sent to TCP Client first can be sent to TCP agent, then by TCP agent is sent to TCP Client.
In order to avoid network moment enters excessive message, TCP agent is sending message to TCP Client Can be specifically according to target before, it is necessary to the current bandwidth situation according to network is transmitted control Bandwidth determines available tokens token numbers, then further according to the transmission of available token numerical controls message.
In the embodiment of the present invention, TCP agent is transmitted control specifically various ways, enters separately below Row description:
First, TCP agent determines token numbers rate of rise and determines according to token numbers according to target bandwidth Whether the number of the token that mesh rate of rise is obtained reaches default value, if reaching, to TCP client End sends message:
Refer to Fig. 2, a kind of file transmitting method one embodiment of the embodiment of the present invention, including:
201st, TCP agent sends M message to TCP Client;
In the embodiment of the present invention, TCP agent can send M message to TCP Client, wherein, After TCP agent sends M message to TCP Client, in the embodiment of the present invention, TCP agent can be with Receive N number of TCP response messages of the above-mentioned M message that TCP Client sends.
It should be noted that in the present embodiment, M is the positive integer more than or equal to 1, N be also more than Or the positive integer equal to 1, and M is more than or equal to N, concrete numerical value is not limited herein.
It should be noted that TCP agent can also be deployed in TCP server certain to have specific work( The processing unit of energy, can also be deployed in carry out data interaction between TCP server and TCP Client During certain network equipment for passing through of message, such as Service Control Gateway (English full name:service Control gateway, English abbreviation:SCG) the network equipment independent in gateway, or in network, Do not limit herein specifically.
In order to make it easy to understand, being said so that TCP agent is deployed in SCG gateways as an example in the embodiment of the present invention Bright, the interaction flow between SCG gateways and TCP Client is as shown in Figure 3:
Specifically, illustrated by taking TCP Client online as an example;TCP server is connect by TCP agent The get messages that TCP Client sends are received, after TCP agent receives get messages, the get messages is carried out Protocol analysis, the type of service that identification TCP Client is asked, and forward TCP to TCP Client The message that server sends according to the type of service, after TCP Client receives message, can be to TCP Agency sends TCP response messages.
202nd, TCP agent calculates TCP agent and TCP Client according to each sample TCP response messages Between TCP connection sample delivery bandwidth;
In the embodiment of the present invention, TCP agent can calculate TCP generations according to each sample TCP response messages Reason and TCP Client between TCP connection sample delivery bandwidth, be in practice SCG gateways and The sample delivery bandwidth of the TCP connections between TCP Client.
It should be noted that above-mentioned sample TCP response messages can be one in N number of response message or Multiple messages, do not limit specifically herein.
Specifically, when TCP agent receives N number of response message of TCP Client transmission, for every Individual sample TCP response messages, TCP agent can be according to the corresponding message of the sample TCP response messages Send the time, the reception time of the sample TCP response messages, and the sample TCP response report The sample delivery bandwidth of the TCP connections at the length computation of the corresponding message of text.
203rd, TCP agent determines estimation bandwidth sample set according to sample delivery bandwidth;
In the embodiment of the present invention, TCP agent according to each sample TCP response messages calculate TCP agent and After the sample delivery bandwidth of the TCP connections between TCP Client, can be passed according to the sample being calculated Defeated bandwidth determines estimation bandwidth sample set, wherein, the estimation bandwidth sample set includes TCP agent according to every The sample delivery bandwidth that individual sample TCP response messages are calculated.
It should be noted that the estimation bandwidth sample set can also include TCP agent according at least one sample The sample delivery bandwidth that this TCP response messages are calculated, does not limit specifically herein.
204th, TCP agent determines estimation bandwidth according to estimation bandwidth sample set;
In the embodiment of the present invention, TCP agent can determine estimation band according to the estimation bandwidth sample set for obtaining Width, specifically, TCP agent can be calculated the sample TCP response messages that estimation bandwidth sample set is included The sample delivery bandwidth for obtaining simply is calculated, and such as calculates average bandwidth as estimation bandwidth, can be with Understand, can also such as be weighted average computation and obtain estimating bandwidth by other computational methods, Do not limit herein specifically.
205th, TCP agent determines target bandwidth according to estimation bandwidth;
In the embodiment of the present invention, after estimation bandwidth is determined according to estimation bandwidth sample set, TCP agent can Determine target bandwidth with according to estimation bandwidth.It should be noted that determining target bandwidth according to estimation bandwidth Before, TCP agent can be with acquisition strategy configuration information, tune of the tactful configuration information comprising target bandwidth The corresponding relation of whole ratio and type of service, what the tactful configuration information was provided by user by TCP agent Products configuration interface is configured, and the type of service recognized according to TCP agent determines target bandwidth Adjustment ratio.
In the present embodiment, TCP agent determines that the concrete mode of target bandwidth can be according to estimation bandwidth:
TCP agent determines target bandwidth according to estimation bandwidth and tactful configuration information;
Now, TCP agent determines that target bandwidth is specifically included according to estimation bandwidth and tactful configuration information:
TCP agent is calculated target bandwidth according to below equation:
Adjustment ratio × estimation the bandwidth of target bandwidth=target bandwidth.
It should be noted that the adjustment ratio of the target bandwidth is specifically as follows the float cap of target bandwidth The floating lower limit or the adjustment percentage of target bandwidth of value or target bandwidth, wherein, the strategy matches somebody with somebody confidence The configuration interface that breath can be provided by TCP agent is input into.For example, according to actual type of service demand, The products configuration interface that can be provided by TCP agent is configured, and has target bandwidth on configuration interface The adjustment percentage options for user of the floating lower limit option or target bandwidth of float cap option or target bandwidth It is input into the float cap value of corresponding target bandwidth, the floating lower limit of target bandwidth and target bandwidth Adjustment percentage, here so that target Bandwidth adjustment ratio is target float higher limit as an example, then TCP agent root It is estimated that bandwidth and tactful configuration information determine that target bandwidth is specifically as follows:
Float cap value × estimation the bandwidth of target bandwidth=target bandwidth.
It should be noted that the computational methods of the target bandwidth of above-mentioned formula description are one of which calculating Method, in addition, can also have other to calculate target according to target Bandwidth adjustment ratio and estimation bandwidth The method of bandwidth, does not limit specifically herein.
206th, TCP agent sets token number rates of rise according to target bandwidth;
In the embodiment of the present invention, after TCP agent determines target bandwidth, token can be set according to target bandwidth Number rate of rise.
207th, TCP agent sets the depth capacity of token resource queues and token resource queues;
In the embodiment of the present invention, TCP agent can set token resource queues, for depositing TCP generations The token obtained according to token numbers rate of rise is managed, the maximum of token resource queues can also be set Depth, for the token obtained according to token numbers rate of rise for indicating token resource queues to deposit Maximum number.
In the embodiment of the present invention, within cycle regular hour, if needing to be sent out by TCP agent without message Send, now can generate more token according to token numbers rate of rise, and the token resources team The depth capacity of row constrain token increase can not possibly exceed certain threshold value, on the other hand, when one section When TCP agent does not have message to need to send in time cycle, token resource queues can preserve certain amount Token, now, if there are a large amount of messages to need to send suddenly, can allow be sent with maximum raising Message amount, be finally reached send message relative speed than more uniform effect.
It should be noted that sequential precedence relationship is had no between step 207 and step 201 to step 206, Do not limit herein specifically.
208th, TCP agent sets transmission timer and starts the transmission timer, when the transmission timer is fixed When reaching preset time period, perform step 209;
In the embodiment of the present invention, TCP agent can set transmission timer, and start the timer, when When transmission timer timing reaches preset time period, step 209 is performed.
In the embodiment of the present invention, when TCP agent determines the token according to the acquisition of token numbers rate of rise Number when being not up to default value, it is necessary to the message for being sent can be buffered in the socket of TCP agent side Buffering area is medium to be transmitted, at this time, it may be necessary to wait the arrival of the instruction of transmission message to be triggered, i.e. TCP When agency needs the message for waiting last time to send to send successfully, the ACK of TCP Client feedback, this When TCP agent just can again perform the number of token for determining to obtain according to token numbers rate of rise and be It is not no the step of reach default value, but, due to network failure or other communicative reasons, can frequently result in The RTT of ACK is oversize, in this case, even if the number of token has reached default value, socket Data in buffering area cannot can also send for a long time, now in order to avoid the appearance of such case, In the embodiment of the present invention, TCP agent is by setting a transmission timer, as long as the transmission timer is fixed When reaching preset time period, carry out the number of the token for determining to obtain according to token numbers rate of rise The step of whether mesh reaches default value, you can long efficiently avoid the data in socket buffering areas The situation that time cannot send.
It is understood that step 208 is i.e. executable after step 206, do not limit herein specifically.
209th, TCP agent determines that the number of the current token obtained according to token numbers rate of rise is It is no to reach default value, if reaching, perform step 210;
In the embodiment of the present invention, TCP agent will need the message for being transmitted to TCP Client to be stored in TCP Act on behalf of socket buffering areas medium to be transmitted, now, TCP agent judges token in token resource queues Number the step of whether reach default value, however, it is determined that if reaching, perform step 210.In addition can be with Understand, the concrete numerical value of the default value is not limited specifically herein.
210th, TCP agent sends message to TCP Client.
In the embodiment of the present invention, the number of token reaches pre- in TCP agent determines token resource queues During setting value, then TCP agent sends message to TCP Client.
In order to make it easy to understand, being illustrated so that default value is 3 token as an example below:
TCP agent will need 8 messages for being transmitted to TCP Client to be stored in TCP agent socket Buffering area is medium to be transmitted, now, if TCP agent detects the token's in token resource queues Number is 5, then TCP agent takes out 3 messages from socket buffering areas, and by this 3 messages Send to TCP Client, it is necessary to explanation, TCP agent can also take out 4 from buffering area, Or the message of other numbers is sent to TCP Client, is not limited specifically herein.It should be noted that It is mutual according to transmission control protocol/internet after the above-mentioned message for being sent is successfully transmitted to TCP Client Connection agreement (English full name:Transmission Control Protocol/Internet Protocol, English abbreviation: TCP/IP) ICP/IP protocol, TCP Client can send an ACK to TCP agent, when TCP generations After reason receives the ACK, re-execute determine token in token resource queues number whether reach it is pre- The step of setting value, if reach it is preset, and in socket buffering areas also have message be not transmitted, then after Supervention send the message in socket buffering areas, and specific here is omitted.
If the number of the token in TCP agent detection token resource queues is less than 3, above-mentioned 8 Message continues to be stored in socket buffering areas medium to be transmitted.
It is further to note that whenever TCP agent will need the message for being transmitted to TCP Client to deposit During in the socket buffering areas of TCP agent side, i.e., can judge the number of token in token resource queues is It is no to reach default value.
In the embodiment of the present invention, TCP agent sends M message to TCP Client, receives TCP visitors N number of TCP response messages of the M message that family end sends, according to each sample TCP response message meters Calculate the sample delivery bandwidth of the TCP connections between TCP agent and TCP Client, sample TCP responses Message is at least one of N number of TCP response messages, and estimation bandwidth sample is determined according to sample delivery bandwidth This collection, estimation bandwidth sample set includes the sample delivery being calculated according to each sample TCP response messages Bandwidth, estimation bandwidth is determined according to estimation bandwidth sample set, and target bandwidth, root are determined according to estimation bandwidth According to target bandwidth, token number rates of rise are set, it is determined that obtained according to token numbers rate of rise Whether the number of token reaches default value, if reaching, message is sent to TCP Client.Compared to Prior art, when message is sent, the transmission of message is limited to token numbers, i.e., to the transmission rate of message Controlled, be effectively prevented from network moment into excessive message, improved TCP handling capacities.
2nd, TCP agent sends to the TCP Client target bandwidth, to cause TCP Client root According to target bandwidth, token number rates of rise are set, and determination is obtained according to the token numbers rate of rise Whether the number of the token for obtaining reaches default value, if reaching, sends the message:
Refer to Fig. 4, a kind of another embodiment of file transmitting method of the embodiment of the present invention, including:
Step 401 is identical to step 205 with the step 201 in above-described embodiment respectively to step 405, It is specific that here is omitted.
406th, TCP agent sends to TCP Client target bandwidth;
In the embodiment of the present invention, after TCP agent determines target bandwidth according to estimation bandwidth, Ke Yixiang TCP Client sends the target bandwidth, and TCP Client can be connected to receives the target bandwidth.
407th, TCP Client sets token number rates of rise according to target bandwidth;
In the embodiment of the present invention, TCP Client can set token resource queues, for deposit according to The token that token numbers rate of rise is obtained, can also set the depth capacity of token resource queues, use In the maximum of the token obtained according to token numbers rate of rise for indicating token resource queues to deposit Number.
In the embodiment of the present invention, within cycle regular hour, if TCP Client does not have message to need hair Send, now can generate more token according to token numbers rate of rise, and the token resources team The depth capacity of row constrains token to increase can not possibly exceed certain threshold value, on the other hand, when one section Between when TCP agent does not have message to need to send in the cycle, token resource queues can preserve a number of Token, now, if having a large amount of messages to need to send suddenly, can allow what be sent with maximum raising Message amount, is finally reached the relative speed for sending message than more uniform effect.
It should be noted that sequential precedence relationship is had no between step 408 and step 401 to step 407, Do not limit herein specifically.
409th, TCP Client sets transmission timer and starts transmission timer, when the transmission timer is fixed When reaching preset time period, perform step 410;
In the embodiment of the present invention, TCP Client can set transmission timer, and start the timer, When transmission timer timing reaches preset time period, step 410 is performed.
In the embodiment of the present invention, when TCP Client determines the token according to the acquisition of token numbers rate of rise Number when being not up to default value, it is necessary to the message for being sent can be buffered in the socket of TCP client side Buffering area is medium to be transmitted, at this time, it may be necessary to wait the arrival of the instruction of transmission message to be triggered, i.e. TCP Client waits the ACK that the message that last time sends is fed back when sending successfully, now TCP client Whether the number that just can again perform the token for determining to obtain according to token numbers rate of rise is held to reach pre- The step of setting value, but, due to network failure or other communicative reasons, can frequently result in ACK's RTT is oversize, in this case, even if the number of token has reached default value, socket bufferings Data in area cannot can also send for a long time, now in order to avoid the appearance of such case, this hair In bright embodiment, TCP Client passes through to set a transmission timer, as long as the transmission timer is regularly When reaching preset time period, carry out and determine the current token's increased according to token numbers rate of rise The step of whether number reaches default value, you can efficiently avoid the data in socket buffering areas Situation about cannot send for a long time.
It is understood that step 409 is i.e. executable after step 407, do not limit herein specifically.
410th, whether the number of the token that TCP Client determination is obtained according to token numbers rate of rise Default value is reached, if reaching, step 411 is performed;
The message for needing to send is stored in TCP client side by TCP Client by socket Socket buffering areas are medium to be transmitted, and now, execution TCP Client is determined in token resource queues The step of whether number of token reaches default value, however, it is determined that if reaching, performs step 411.Can To understand, the concrete numerical value of the default value is not limited herein.
411st, TCP Client sends message.
In the embodiment of the present invention, when TCP Client determines currently to increase according to token numbers rate of rise The number of token when reaching default value, then TCP Client sends message.
In order to make it easy to understand, being illustrated so that default value is 3 token as an example below:
TCP Client will need 8 messages for being transmitted to TCP Client to be stored in TCP client side Waited in socket buffering areas and being sent by TCP Client, now, if TCP Client detection token moneys The number of the token in the queue of source is 5, then TCP Client takes out 3 from socket buffering areas Message, and 3 messages are sent to TCP agent, it is necessary to explanation, TCP Client can also 4 messages are taken out from buffering area, or the message of other numbers is sent to TCP agent, specifically herein not Limit.It should be noted that after the above-mentioned message for being sent is successfully transmitted, according to ICP/IP protocol, TCP agent can feed back an ACK to TCP Client, after TCP Client receives the ACK, weight The step of whether new number for performing token in determination token resource queues reaches default value, if reaching There is message not to be transmitted in default value, and socket buffering areas, then continue to send socket bufferings Message in area, specific here is omitted.
If the number of the token in TCP Client detection token resource queues is less than 3, above-mentioned 8 Individual message continues to be stored in socket buffering areas medium to be transmitted.
It is further to note that whenever TCP Client will need to be sent to TCP by socket When the message of agency is stored in the socket buffering areas of TCP client side, i.e., can perform TCP Client true The step of whether number for determining token in token resource queues reaches default value.
M message is sent to TCP Client by TCP agent, the M that TCP Client sends is received N number of TCP response messages of individual message, according to each sample TCP response messages calculate TCP agent and The sample delivery bandwidth of the TCP connections between TCP Client, sample TCP response messages are N number of TCP At least one of response message, estimation bandwidth sample set is determined according to sample delivery bandwidth, estimates bandwidth Sample set includes the sample delivery bandwidth being calculated according to each sample TCP response messages, according to estimation Bandwidth sample set determines estimation bandwidth, and target bandwidth is sent to TCP Client, to cause TCP client End sets token number rates of rise according to target bandwidth, and determination is obtained according to token number rates of rise Whether the number of the token for obtaining reaches default value, if reaching, sends message.Compared to prior art, When message is sent, the transmission of message is limited to token numbers, the i.e. transmission rate to message and is controlled, Network moment into excessive message is effectively prevented from, TCP handling capacities are improved.
Above to the embodiment of the present invention in a kind of file transmitting method be described, below to the present invention TCP agent is described in embodiment.
Specifically refer to Fig. 5, one embodiment of TCP agent of the present invention, including:Sending module 501, Receiver module 502 and processing module 503.
Sending module 501, for sending M message to TCP Client;
Receiver module 502, N number of TCP responses of the M message for receiving TCP Client transmission Message;
Processing module 503, based on each sample TCP response messages received according to receiver module 502 Calculate the sample delivery bandwidth of the TCP connections between TCP agent and TCP Client, sample TCP responses Message is at least one of N number of TCP response messages, and estimation bandwidth sample is determined according to sample delivery bandwidth This collection, estimation bandwidth sample set includes the sample delivery being calculated according to each sample TCP response messages Bandwidth, estimation bandwidth is determined according to estimation bandwidth sample set, and target bandwidth is determined according to estimation bandwidth, according to Target bandwidth sets token number rates of rise, it is determined that the token obtained according to token numbers rate of rise Number whether reach default value;
If sending module 501 is additionally operable to processing module 503 determines what is obtained according to token numbers rate of rise The number of token reaches default value, then send message to TCP Client;
With reference to above-described embodiment, the processing module 503 is additionally operable to:
Transmission timer is set and starts the transmission timer;
When transmission timer timing reaches preset time period, it is determined that obtained according to token numbers rate of rise The number of token whether reach default value;
The depth capacity of token resource queues and token resource queues is set, and token resource queues use In the token that storage is obtained according to token numbers rate of rise, depth capacity is used to indicate token resources The maximum number of the token obtained according to token numbers rate of rise that queue can be deposited;
For each sample TCP response messages, according to the transmission of the corresponding message of sample TCP response messages Time, the reception time of sample TCP response messages, and the corresponding message of sample TCP response messages The sample delivery bandwidth of length computation TCP connections;
Acquisition strategy configuration information, tactful configuration information includes the adjustment ratio and type of service of target bandwidth Corresponding relation;
Corresponding type of service is connected according to estimation bandwidth, TCP and tactful configuration information determines object tape It is wide.
The angle of slave module functional entity is described to the TCP agent in the embodiment of the present invention above, The TCP agent in the embodiment of the present invention is described from the angle of hardware handles below, Fig. 6 is referred to, A kind of TCP agent structural representation provided in an embodiment of the present invention, the TCP agent 600 can because configuration or Performance is different and the larger difference of producing ratio, can such as include one or more above-described embodiment processing modules 503 corresponding entity apparatus processors (for example, one or more processors), with above-described embodiment The corresponding entity apparatus transmitter 602 of middle sending module 501, the corresponding entity apparatus of receiver module 502 connect Receive device 603 and memory 604, one or more data 608 or store program codes 609 are deposited Storage media 605 (such as one or more mass memory units).Wherein, memory 604 and storage Medium 605 can be of short duration storage or persistently storage.The program stored in storage medium 605 can include One or more modules (diagram is not marked), during each module can include to TCP agent one is Row command operating.Further, central processing unit 601 could be arranged to be communicated with storage medium 605, Series of instructions operation in performing storage medium 605 in TCP agent 600.
TCP agent 600 can also include one or more power supplys 606, one or more operations System 607.
Step in the present embodiment as performed by TCP agent can be based on the TCP agent knot shown in the Fig. 6 Structure schematic diagram, specifically may be referred to the corresponding process in previous embodiment, will not be repeated here.
Refer to Fig. 7, another embodiment of embodiment of the present invention TCP agent, including:Sending module 701 Receiver module 702 and processing module 703.
Sending module 701, for sending M message to TCP Client;
Receiver module 702, for receiving the N number of of the M message that the TCP Client sends TCP response messages;
Processing module 703, each sample TCP for being received according to the receiver module 702 responds report Text calculates the sample delivery bandwidth of the TCP connections between the TCP agent and the TCP Client, The sample TCP response messages are at least one of described N number of TCP response messages, according to the sample This transmission bandwidth determines estimation bandwidth sample set, and the estimation bandwidth sample set is included according to each sample The sample delivery bandwidth that this TCP response messages are calculated, determines to estimate according to the estimation bandwidth sample set Bandwidth is calculated, target bandwidth is determined according to the estimation bandwidth;
Sending module 701 is additionally operable to send target bandwidth to TCP Client, to cause TCP Client Token number rates of rise are set according to target bandwidth, and determines to be obtained according to token numbers rate of rise The number of token whether reach default value, if reaching, send message.
Similarly, corresponding entity apparatus can refer to the structural representation shown in Fig. 6, phase in the present embodiment The step of correspondence is performed can refer to above-described embodiment, and specific here is omitted.
The TCP agent in the embodiment of the present invention is described above, below in the embodiment of the present invention TCP Client be described, refer to Fig. 8, embodiment of the present invention TCP Client one embodiment, Including:Receiver module 801, processing module 802 and sending module 803.
Receiver module 801, the target bandwidth for receiving TCP agent transmission, target bandwidth is by TCP generations Reason determines that estimation bandwidth is determined by TCP agent according to estimation bandwidth sample set, is estimated according to estimation bandwidth Bandwidth sample set is determined that sample delivery bandwidth is by TCP agent root by TCP agent according to sample delivery bandwidth The TCP connections calculated according to each sample TCP response messages between TCP agent and TCP Client are obtained, Sample TCP response messages are at least one of N number of TCP response messages, N number of TCP response messages The message of TCP agent is fed back to after receiving M message of TCP agent transmission for TCP Client;
Processing module 802, for setting token number rates of rise according to target bandwidth, it is determined that according to Whether the number of the token that token numbers rate of rise is obtained reaches default value;
Sending module 803, if determining what is obtained according to token numbers rate of rise for processing module 802 The number of token reaches default value, then send message.
With reference to above-described embodiment, the processing module 802 is additionally operable to:
Transmission timer is set and starts transmission timer;
When transmission timer timing reaches preset time period, it is determined that obtained according to token numbers rate of rise The number of token whether reach default value;
The depth capacity of token resource queues and token resource queues is set, and token resource queues use In the token that storage is obtained according to token numbers rate of rise, depth capacity is used to indicate token resources The maximum number of the token obtained according to token numbers rate of rise that queue can be deposited.
The angle of slave module functional entity is retouched to the TCP Client in the embodiment of the present invention above State, the TCP Client in the embodiment of the present invention is described from the angle of hardware handles below, such as scheme Shown in 9, for convenience of description, the part related to the embodiment of the present invention, particular technique details are illustrate only Do not disclose, refer to the corresponding method part of the embodiment of the present invention, refer to Fig. 9, the embodiment of the present invention A kind of TCP Client structural representation for providing:
The TCP Client includes:It is corresponding with above-described embodiment receiver module 801 and sending module 803 Entity apparatus be receiver 901 and transmitter 903, the treatment of the corresponding entity apparatus of processing module 802 Device 902, the TCP Client also includes memory 904, for store program codes, when described program generation When code is performed by the processor 902, it is possible to achieve the method for the various embodiments described above of the present invention.This area Technical staff is appreciated that the TCP Client structure shown in Fig. 9 is not constituted to TCP Client Limit, part more more or less than diagram can be included, or combine some parts, or it is different Part is arranged.
Step in the present embodiment as performed by TCP Client can be based on the TCP client shown in the Fig. 9 End structure schematic diagram, specifically may be referred to the corresponding process in previous embodiment, will not be repeated here.
It should be noted that the processor involved by said apparatus embodiment can be central processing unit (English Literary full name:Central processing unit, English abbreviation:CPU), network processing unit (English full name: Network processor, English abbreviation:NP) or CPU and NP combination.Processor can be with Hardware chip is further included, can be specifically application specific integrated circuit (English full name:application-specific Integrated circuit, English abbreviation:ASIC), programmable logic device (English full name:programmable Logic device, English abbreviation:PLD) or its combination.Other PLD can be complex programmable logic Device (English full name:Complex programmable logic device, English abbreviation:CPLD), it is existing Field programmable logic gate array (English full name:Field-programmable gate array, English abbreviation: FPGA), GAL (English full name:Generic array logic, English abbreviation:GAL) or Its any combination, any restriction is not done in the present invention.
In several embodiments provided herein, it should be understood that disclosed system, module and Method, can realize by another way.For example, device embodiment described above is only to show Meaning property, for example, the division of the module, only a kind of division of logic function can when actually realizing To there is other dividing mode, such as multiple units or component can be combined or be desirably integrated into another System, or some features can be ignored, or not perform.It is another, it is shown or discussed each other Coupling or direct-coupling or communication connection can be the INDIRECT COUPLING of device or unit by some interfaces Or communication connection, can be electrical, mechanical or other forms.
It is described as separating component illustrate unit can be or may not be it is physically separate, make For the part that unit shows can be or may not be physical location, you can with positioned at a place, Or can also be distributed on multiple NEs.Can select according to the actual needs part therein or Person whole units realize the purpose of this embodiment scheme.
In addition, during each functional module in each embodiment of the invention can be integrated in a processing unit, Can also be that unit is individually physically present, it is also possible to which two or more units are integrated in a list In unit.Above-mentioned integrated unit can both be realized in the form of hardware, it would however also be possible to employ software function list The form of unit is realized.
The integrated module fruit using realize in the form of SFU software functional unit and as independent production marketing or When using, can store in a computer read/write memory medium.Based on such understanding, this hair Part that bright technical scheme substantially contributes to prior art in other words or the technical scheme it is complete Portion or part can be embodied in the form of software product, and computer software product storage is deposited at one In storage media, including some instructions are used to so that a computer equipment (can be personal computer, take Business device, or the network equipment etc.) perform all or part of step of each embodiment methods described of the invention. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (English full name:Read-Only Memory, English abbreviation:ROM), random access memory (English full name:Random Access Memory English abbreviations:RAM), magnetic disc or CD etc. are various can be with the medium of store program codes.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations; Although being described in detail to the present invention with reference to the foregoing embodiments, one of ordinary skill in the art should Work as understanding:It can still modify to the technical scheme described in foregoing embodiments, or to it Middle some technical characteristics carry out equivalent;And these modifications or replacement, do not make appropriate technical solution Essence depart from various embodiments of the present invention technical scheme spirit and scope.

Claims (20)

1. a kind of file transmitting method, it is characterised in that methods described is performed by TCP agent, the side Method includes:
M message is sent to TCP Client;
Receive N number of TCP response messages of the M message that the TCP Client sends;
Calculated between the TCP agent and the TCP Client according to each sample TCP response messages TCP connections sample delivery bandwidth, the sample TCP response messages are the N number of TCP response At least one of message;
Estimation bandwidth sample set is determined according to the sample delivery bandwidth, the estimation bandwidth sample set includes According to the sample delivery bandwidth that each described sample TCP response message is calculated;
Estimation bandwidth is determined according to the estimation bandwidth sample set;
Target bandwidth is determined according to the estimation bandwidth;
Available tokens token numbers are determined according to the target bandwidth, token numerical control reports are used according to described The transmission of text.
2. file transmitting method according to claim 1, it is characterised in that described according to the mesh Marker tape is wide to determine available tokens token numbers, can be included with the transmission of token numerical control messages according to described:
Token number rates of rise are set according to the target bandwidth;
It is determined that whether the number of the token obtained according to the token numbers rate of rise reaches preset number Value, if reaching, the message is sent to the TCP Client.
3. file transmitting method according to claim 1, it is characterised in that described according to the mesh Marker tape is wide to determine available tokens token numbers, can be included with the transmission of token numerical control messages according to described:
The target bandwidth is sent to the TCP Client, to cause the TCP Client according to institute State target bandwidth and token number rates of rise are set, and determination is obtained according to the token numbers rate of rise Whether the number of the token for obtaining reaches default value, if reaching, sends the message.
4. file transmitting method according to claim 2, it is characterised in that methods described also includes:
Transmission timer is set and starts the transmission timer;
When transmission timer timing reaches preset time period, then the determination is performed according to the token The step of whether number of the token that number rate of rise is obtained reaches default value.
5. file transmitting method according to claim 4, it is characterised in that methods described also includes:
The depth capacity of token resource queues and the token resource queues, the token moneys are set Source queue is used to deposit the token obtained according to the token numbers rate of rise, and the depth capacity is used In the token obtained according to the token numbers rate of rise for indicating the token resource queues to deposit Maximum number.
6. file transmitting method according to claim 5, it is characterised in that described according to each sample This TCP response messages calculate the sample of the TCP connections between the TCP agent and the TCP Client This transmission bandwidth includes:
For each sample TCP response messages, according to the corresponding message of the sample TCP response messages Transmission time, the reception time of the sample TCP response messages, and the sample TCP response messages The sample delivery bandwidth of TCP connections described in the length computation of corresponding message.
7. file transmitting method according to claim 6, it is characterised in that the TCP agent root It is estimated that bandwidth determines also to include before target bandwidth:
Acquisition strategy configuration information, the adjustment ratio of the tactful configuration information including the target bandwidth with The corresponding relation of type of service;
It is described to determine that target bandwidth includes according to the estimation bandwidth:
Corresponding type of service is connected according to the estimation bandwidth, the TCP and the strategy matches somebody with somebody confidence Breath determines the target bandwidth.
8. a kind of file transmitting method, it is characterised in that including:
TCP Client receives the target bandwidth that TCP agent sends, and the target bandwidth is by the TCP generations Reason determines that the estimation bandwidth is true according to estimation bandwidth sample set by the TCP agent according to estimation bandwidth Fixed, the estimation bandwidth sample set is determined by the TCP agent according to sample delivery bandwidth, the sample Transmission bandwidth by the TCP agent according to each sample TCP response messages calculate the TCP agent and TCP connections between the TCP Client are obtained, and the sample TCP response messages are N number of TCP At least one of response message, N number of TCP response messages receive institute for the TCP Client The message of the TCP agent is fed back to after M message for stating TCP agent transmission;
The TCP Client sets token number rates of rise according to the target bandwidth;
The TCP Client determines that the number of the token obtained according to the token numbers rate of rise is It is no to reach default value, if reaching, send message.
9. file transmitting method according to claim 8, it is characterised in that methods described also includes:
The TCP Client sets transmission timer and starts the transmission timer;
When transmission timer timing reaches preset time period, then the determination is performed according to the token The step of whether number of the token that number rate of rise is obtained reaches default value.
10. the file transmitting method according to any one of claim 8 or 9, it is characterised in that Methods described also includes:
The TCP Client sets token resource queues and the maximum of the token resource queues is deep Degree, the token resource queues are used to deposit the token, and the depth capacity is used to indicate the token The maximum number of the token that resource queue can deposit.
A kind of 11. TCP agents, it is characterised in that including:
Sending module, for sending M message to TCP Client;
Receiver module, the N number of TCP for receiving the M message that the TCP Client sends Response message;
Processing module, each sample TCP response messages for being received according to the receiver module calculate institute State the sample delivery bandwidth of the TCP connections between TCP agent and the TCP Client, the sample TCP response messages are at least one of described N number of TCP response messages, according to the sample delivery band Width determines estimation bandwidth sample set, and the estimation bandwidth sample set includes being rung according to each sample TCP The sample delivery bandwidth that message is calculated is answered, estimation bandwidth is determined according to the estimation bandwidth sample set, Target bandwidth is determined according to the estimation bandwidth, available tokens token numbers is determined according to the target bandwidth, According to the transmission with token numerical control messages.
12. TCP agents according to claim 11, it is characterised in that the processing module is used for:
Token number rates of rise are set according to the target bandwidth;
It is determined that whether the number of the token obtained according to the token numbers rate of rise reaches preset number Value;
The sending module, if determining to be obtained according to the token numbers rate of rise for the processing module The number of the token for obtaining reaches default value, then send the message to the TCP Client.
13. TCP agents according to claim 11, it is characterised in that the sending module is used for:
The target bandwidth is sent to the TCP Client, to cause the TCP Client according to institute State target bandwidth and token number rates of rise are set, and determination is obtained according to the token numbers rate of rise Whether the number of the token for obtaining reaches default value, if reaching, sends the message.
14. TCP agents according to claim 12, it is characterised in that the processing module is used for:
Transmission timer is set and starts the transmission timer;
When transmission timer timing reaches preset time period, it is determined that increase according to the token numbers Whether the number of the token that speed is obtained reaches default value.
15. TCP agents according to claim 14, it is characterised in that the processing module is used for:
The depth capacity of token resource queues and the token resource queues, the token moneys are set Source queue is used to deposit the token obtained according to the token numbers rate of rise, and the depth capacity is used In the token obtained according to the token numbers rate of rise for indicating the token resource queues to deposit Maximum number.
16. TCP agents according to claim 15, it is characterised in that the processing module is used In:
For each sample TCP response messages, according to the corresponding message of the sample TCP response messages Transmission time, the reception time of the sample TCP response messages, and the sample TCP response messages The sample delivery bandwidth of TCP connections described in the length computation of corresponding message.
17. TCP agents according to claim 16, it is characterised in that the processing module is used for:
Acquisition strategy configuration information, the adjustment ratio of the tactful configuration information including the target bandwidth with The corresponding relation of type of service;
Corresponding type of service is connected according to the estimation bandwidth, the TCP and the strategy matches somebody with somebody confidence Breath determines the target bandwidth.
A kind of 18. TCP Clients, it is characterised in that including:
Receiver module, the target bandwidth for receiving TCP agent transmission, the target bandwidth is by the TCP Agency determines that the estimation bandwidth is by the TCP agent according to estimation bandwidth sample set according to estimation bandwidth It is determined that, the estimation bandwidth sample set is determined by the TCP agent according to sample delivery bandwidth, the sample This transmission bandwidth calculates the TCP agent by the TCP agent according to each sample TCP response messages And the TCP connections between the TCP Client are obtained, the sample TCP response messages are N number of TCP At least one of response message, N number of TCP response messages receive institute for the TCP Client The message of the TCP agent is fed back to after M message for stating TCP agent transmission;
Processing module, for setting token number rates of rise according to the target bandwidth, it is determined that according to institute Whether the number for stating the token of token numbers rate of rise acquisition reaches default value;
Sending module, if determining what is obtained according to the token numbers rate of rise for the processing module The number of token reaches default value, then send the message.
19. TCP Clients according to claim 18, it is characterised in that the processing module is used In:
Transmission timer is set and starts the transmission timer;
When transmission timer timing reaches preset time period, it is determined that increase according to the token numbers Whether the number of the token that speed is obtained reaches default value.
20. TCP Client according to claim 18 or 19, it is characterised in that the treatment Module is used for:
The depth capacity of token resource queues and the token resource queues, the token moneys are set Source queue is used to deposit the token obtained according to the token numbers rate of rise, and the depth capacity is used In the token obtained according to the token numbers rate of rise for indicating the token resource queues to deposit Maximum number.
CN201511024912.3A 2015-12-30 2015-12-30 Message sending method, TCP (Transmission control protocol) proxy and TCP client Active CN106936730B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201511024912.3A CN106936730B (en) 2015-12-30 2015-12-30 Message sending method, TCP (Transmission control protocol) proxy and TCP client
PCT/CN2016/111079 WO2017114231A1 (en) 2015-12-30 2016-12-20 Packet sending method, tcp proxy, and tcp client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511024912.3A CN106936730B (en) 2015-12-30 2015-12-30 Message sending method, TCP (Transmission control protocol) proxy and TCP client

Publications (2)

Publication Number Publication Date
CN106936730A true CN106936730A (en) 2017-07-07
CN106936730B CN106936730B (en) 2020-04-03

Family

ID=59225630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511024912.3A Active CN106936730B (en) 2015-12-30 2015-12-30 Message sending method, TCP (Transmission control protocol) proxy and TCP client

Country Status (2)

Country Link
CN (1) CN106936730B (en)
WO (1) WO2017114231A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855575A (en) * 2019-09-30 2020-02-28 华为技术有限公司 TCP message scheduling method and device and communication equipment
CN112685358A (en) * 2020-12-24 2021-04-20 电信科学技术第五研究所有限公司 DDR3 grouping read-write method based on FPGA
CN112910658A (en) * 2021-02-02 2021-06-04 刘玉 Data packet transmission method and device for providing TCP proxy service
CN113938258A (en) * 2020-06-29 2022-01-14 中兴通讯股份有限公司 Data transmission method, device and computer storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109245981B (en) * 2018-10-25 2021-06-22 浙江中控技术股份有限公司 Scheduling method and system for field bus communication
CN114173428B (en) * 2021-10-21 2022-08-05 北京连山科技股份有限公司 Method for improving data transmission speed of multilink equipment
CN114157727B (en) * 2021-12-10 2024-05-14 北京华环电子股份有限公司 Application method and device of TCP acceleration in OSU

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518285A (en) * 2003-01-16 2004-08-04 华为技术有限公司 Network bandwidth detecting method for implementing stream medium service
CN101300795A (en) * 2005-11-07 2008-11-05 英特尔公司 Efficient scheduling of dowlink packet data traffic in wireless data networks
CN101873634A (en) * 2010-06-18 2010-10-27 杭州华三通信技术有限公司 Method and device for scheduling bandwidth on WLAN basis
US20140269292A1 (en) * 2013-03-14 2014-09-18 Vivint, Inc. Dynamic adjustment of quality of service parameters

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075918B (en) * 2006-05-15 2010-05-12 中兴通讯股份有限公司 Method for inspecting network band width

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518285A (en) * 2003-01-16 2004-08-04 华为技术有限公司 Network bandwidth detecting method for implementing stream medium service
CN101300795A (en) * 2005-11-07 2008-11-05 英特尔公司 Efficient scheduling of dowlink packet data traffic in wireless data networks
CN101873634A (en) * 2010-06-18 2010-10-27 杭州华三通信技术有限公司 Method and device for scheduling bandwidth on WLAN basis
US20140269292A1 (en) * 2013-03-14 2014-09-18 Vivint, Inc. Dynamic adjustment of quality of service parameters

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855575A (en) * 2019-09-30 2020-02-28 华为技术有限公司 TCP message scheduling method and device and communication equipment
CN110855575B (en) * 2019-09-30 2022-05-06 荣耀终端有限公司 TCP message scheduling method and device and communication equipment
CN113938258A (en) * 2020-06-29 2022-01-14 中兴通讯股份有限公司 Data transmission method, device and computer storage medium
CN112685358A (en) * 2020-12-24 2021-04-20 电信科学技术第五研究所有限公司 DDR3 grouping read-write method based on FPGA
CN112910658A (en) * 2021-02-02 2021-06-04 刘玉 Data packet transmission method and device for providing TCP proxy service
CN112910658B (en) * 2021-02-02 2022-07-12 刘玉 Data packet transmission method and device for providing TCP proxy service

Also Published As

Publication number Publication date
CN106936730B (en) 2020-04-03
WO2017114231A1 (en) 2017-07-06

Similar Documents

Publication Publication Date Title
CN106936730A (en) A kind of file transmitting method, TCP agent and TCP Client
US11799793B2 (en) Adaptive private network with dynamic conduit process
CN107864084B (en) The transmission method and device of data packet
Paek et al. RCRT: rate-controlled reliable transport for wireless sensor networks
Joo et al. TCP/IP traffic dynamics and network performance: A lesson in workload modeling, flow control, and trace-driven simulations
JPH03174848A (en) Delay base rush evading method in computer network and device
CN101258713A (en) System and method of scheduling delivery of packets
CN106302230B (en) A kind of data transmission method and device
Li et al. Halfback: Running short flows quickly and safely
CN103312469B (en) Confirmation in multicast retransmission represents system of selection and device
CN108770065A (en) A kind of method, equipment and the system of control interface-free resources
Nguyen et al. Performance evaluation of TCP congestion control algorithms in data center networks
Zhang et al. Adaptive-acceleration data center TCP
CN109560897A (en) A kind of TCP repeating method and device
Abu et al. A markov model of CCN pending interest table occupancy with interest timeout and retries
CN104767591B (en) A kind of data transmission method for uplink and device
CN103595552B (en) Analysis method and analysis system for cluster storage network parallel load
CN104010010B (en) A kind of acquisition methods of Internet resources, device and caching system
Parvez et al. TCP NewReno: Slow-but-steady or impatient?
CN106603480A (en) Streaming media file transmission method and device
Rahimi et al. An improvement mechanism for low priority traffic TCP performance in Strict Priority Queueing
Luan Estimating TCP flow completion time distributions
Goyzueta et al. A deterministic loss model based analysis of CUBIC
Yaakob et al. Distributed collision control with the integration of packet size for congestion control in wireless sensor networks
JP6395085B2 (en) Network optimization method and network optimization device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant