WO2016095568A1 - 数据传输方法和装置 - Google Patents

数据传输方法和装置 Download PDF

Info

Publication number
WO2016095568A1
WO2016095568A1 PCT/CN2015/088794 CN2015088794W WO2016095568A1 WO 2016095568 A1 WO2016095568 A1 WO 2016095568A1 CN 2015088794 W CN2015088794 W CN 2015088794W WO 2016095568 A1 WO2016095568 A1 WO 2016095568A1
Authority
WO
WIPO (PCT)
Prior art keywords
response frequency
ack response
data transmission
congestion
tcp parameter
Prior art date
Application number
PCT/CN2015/088794
Other languages
English (en)
French (fr)
Inventor
李晋
李峰
黄一宏
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to KR1020177019590A priority Critical patent/KR102061772B1/ko
Priority to JP2017532653A priority patent/JP6644791B2/ja
Priority to EP15869079.2A priority patent/EP3226507B1/en
Publication of WO2016095568A1 publication Critical patent/WO2016095568A1/zh
Priority to US15/625,638 priority patent/US10560382B2/en

Links

Images

Classifications

    • 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/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • 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
    • 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
    • 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]
    • 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
    • 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/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • 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/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets
    • 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/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields

Definitions

  • the embodiments of the present invention relate to the field of computer technologies, and in particular, to a data transmission method and apparatus.
  • TCP Transmission Control Protocol
  • the protocol provides users with various modified parameters so that users can modify corresponding parameters for different network conditions. To improve data transmission efficiency.
  • the TCP parameter is modified by modifying the TCP parameter stored in the system file, saving the system file after modification, and executing the corresponding command to make the modification take effect.
  • each service corresponds to one TCP stream, that is, one user corresponds to multiple TCP streams.
  • the TCP parameter is modified on the user side, because the modified TCP parameter is a global parameter, after modifying a TCP parameter in a TCP stream corresponding to a certain user, the TCP parameter in all the TCP streams of the user is Was modified.
  • a TCP parameter in a user's TCP stream is modified by modifying the TCP parameter on the server side, the TCP parameter in all TCP streams of other users is also modified.
  • the TCP parameters in the corresponding TCP stream do not need to be modified. Therefore, the above-mentioned accuracy of modifying TCP parameters is not high.
  • the embodiment of the invention provides a data transmission method and device, which solves the problem that the prior art has low accuracy in modifying TCP parameters.
  • an embodiment of the present invention provides a data transmission method, including:
  • the data stream information includes at least one of the following information: the first device Information, information of the second device, service information, network status information;
  • the first device modifies the TCP parameter to obtain the modified TCP parameter.
  • the first device generates a modification result of the TCP parameter.
  • the method before the first device generates the modification result of the TCP parameter, the method further includes:
  • the device determines whether the modified TCP parameter meets a preset modification condition
  • the first device generates a modification result of the TCP parameter, including:
  • the first device receives a feedback message sent by the second device, and generates a modification result of the TCP parameter according to the feedback message.
  • the data transmission protocol negotiation request message is a data transmission protocol message;
  • the latter TCP parameter serves as an option for the data transfer protocol message.
  • the first device is configured to modify the TCP parameter, Obtain the modified TCP parameters, including:
  • the first device generates a first socket corresponding to the data stream
  • the first device modifies the TCP parameter by using a data transmission protocol modification interface corresponding to the first socket, and obtains the modified TCP parameter.
  • the data transmission protocol modifying the interface includes:
  • the TCP parameter includes any one of the following items or Multiple:
  • an embodiment of the present invention provides a first device, including:
  • a determining module configured to determine, according to the data stream information, whether the data transmission protocol TCP parameter in the data stream corresponding to the data stream information needs to be modified;
  • the data stream information includes at least one of the following information: the first device Information, information of the second device, service information, network status information;
  • a modifying module configured to determine that the TCP parameter needs to be modified, modify the TCP parameter, and obtain the modified TCP parameter
  • a generating module configured to generate a modification result of the TCP parameter.
  • the method further includes:
  • a sending module configured to send a data transmission protocol negotiation request message to the second terminal, where the data transmission protocol negotiation request message includes the modified TCP parameter, and the data transmission protocol negotiation request message is used to request the second
  • the terminal determines whether the modified TCP parameter meets a preset modification condition
  • a receiving module configured to receive a feedback message sent by the second terminal
  • the generating module is specifically configured to:
  • the data transmission protocol negotiation request message is a data transmission protocol packet;
  • the latter TCP parameter serves as an option for the data transfer protocol message.
  • the modifying module is specifically configured to:
  • Modifying by using a data transmission protocol modification interface corresponding to the first socket, the TCP parameter to obtain a modified TCP parameter.
  • the data transmission protocol modifies the interface, including:
  • the TCP parameter includes any one of the following items or Multiple:
  • an embodiment of the present invention provides a second device, including:
  • a receiving module configured to receive a data transmission protocol negotiation request message sent by the first device, where the data transmission protocol negotiation request message includes the modified TCP parameter of the first device;
  • a processing module configured to determine whether the modified TCP parameter meets a preset modification condition
  • the TCP parameter includes any one or more of the following items:
  • the data transmission method and apparatus of the embodiment of the present invention determines, by the first device, whether the data transmission protocol TCP parameter in the data stream corresponding to the data flow information needs to be modified according to the data flow information; the data flow information includes at least the following information.
  • An item information of the first device, information of the second device, service information, and network status information; if yes, the first device modifies the TCP parameter to obtain a modified TCP parameter;
  • a device generates a modification result of the TCP parameter, and implements a modification of a TCP parameter of a data transmission protocol corresponding to the data flow according to a data flow of different services of different users, and solves the problem that the modification accuracy of the TCP parameter in the prior art is not High problem.
  • FIG. 1 is a flowchart of an embodiment of a data transmission method according to the present invention.
  • FIG. 3 is a schematic diagram 1 of a packet format according to an embodiment of a data transmission method according to the present invention.
  • FIG. 4 is a schematic diagram 2 of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • FIG. 5 is a second schematic diagram of a packet format according to an embodiment of a data transmission method according to the present invention.
  • FIG. 6 is a schematic diagram 3 of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • FIG. 7 is a third schematic diagram of a packet format according to an embodiment of a data transmission method according to the present invention.
  • FIG. 8 is a schematic diagram of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • FIG. 9 is a schematic diagram 4 of a packet format according to an embodiment of a data transmission method according to the present invention.
  • FIG. 10 is a flowchart of still another embodiment of a data transmission method according to the present invention.
  • Figure 11 is a schematic structural view of Embodiment 1 of the first device of the present invention.
  • FIG. 12 is a schematic structural diagram of Embodiment 1 of a second device of the present invention.
  • FIG. 1 is a flowchart of an embodiment of a data transmission method according to the present invention.
  • the executor of the embodiment is a first device, and may be, for example, a sending end or a receiving end of the TCP, that is, a server or a client device.
  • this embodiment provides a data transmission method, including:
  • Step 101 The first device determines, according to the data flow information, whether the data transmission protocol TCP parameter in the data stream corresponding to the data flow needs to be modified; the data flow information includes at least one of the following information: the first device Information, information of the second device, business information, and network status information.
  • Step 102 If yes, the first device modifies the TCP parameter to obtain the modified TCP parameter.
  • Step 103 The first device generates a modification result of the TCP parameter.
  • the TCP parameters may be dynamically adjusted based on the TCP flow corresponding to the service, that is, the first device modifies the TCP parameters corresponding to the data flow, TCP parameters such as initial congestion window, congestion window during timeout retransmission, and congestion window during fast recovery.
  • the server may determine information of the server, at least one of information of the second device (ie, the client device of the user), service information, or network status information, network status information such as network bandwidth, and the like; information of the first device
  • information of the first device such as the transceiver capability of the device, the processing power of the CPU of the central processing unit, the size of the cache, and the storage space of the hard disk.
  • the information of the second device is similar to the foregoing, and the information of the second device may be the interface rate, the terminal type, and the like.
  • the information of the second device may be sent to the first device in advance, that is, the first device may be established when the TCP connection is established. Obtained when interacting with the second device.
  • the modification of the TCP parameter by the first device does not need to be negotiated with the second device, and the first device may be, for example, a sending end of the TCP data stream, and the second device is the receiving end; After the modification, the modified result of the modification is directly generated.
  • the invention can flexibly modify different TCP streams on the same physical server.
  • a webpage browsing application is generally a small object, and the initial congestion window setting can be equal to the object size, and a large file download can be slow.
  • the startup of the stride and the timeout retransmission and the congestion window after the fast recovery are increased, and the large-granular files can be downloaded more quickly.
  • the congestion control algorithm and all parameters of the TCP can be modified, applicable to a large number of services, users and networks, as well as changing business requirements, user requirements and network conditions.
  • the server can set the TCP stream based on different users.
  • Different congestion control algorithms for example, FTTH fiber users use the CUBIC algorithm to recover quickly when packet loss occurs.
  • the scenario of this algorithm is mainly for the current high-speed network; while 2G users use traditional congestion control algorithms in the network. When congestion causes packet loss, it does not continue to send a large number of packets, which causes the situation to deteriorate.
  • the scenario of this algorithm is mainly for the low-speed network in the past.
  • the TCP parameter corresponding to the data flow is modified by the first device, and the modification result of the data transmission protocol is generated, and the data transmission protocol corresponding to the data flow is implemented according to the data flow of different services of different users.
  • the modification of the TCP parameter solves the problem that the modification precision of the TCP parameter is not high in the prior art.
  • the method before the first device generates the modification result of the TCP parameter, the method further includes:
  • the device determines whether the modified TCP parameter meets a preset modification condition
  • the first device generates a modification result of the TCP parameter, including:
  • the first device receives a feedback message sent by the second device, and generates a modification result of the TCP parameter according to the feedback message.
  • the data transmission protocol negotiation request message is a data transmission protocol message; the modified TCP parameter is used as an option of the data transmission protocol message.
  • modifying the TCP parameter by the first device may require negotiating with the second device, such as a congestion control algorithm, an initial congestion window and a receiving window, a slow start ACK response frequency, and congestion avoidance. ACK response frequency, etc.
  • TCP Transmission Control Protocol
  • BIC Binary adds Transmission Control Protocol
  • CMBIC Binary Added Transmission Control Protocol
  • compound TCP Compound Transmission Control Protocol
  • users of the same server service may include both low-speed network users and high-speed network users
  • TCP parameters need to be adjusted based on different users to meet the needs of different users.
  • Different TCP parameters can be set. For example, Google test for search engine service, TCP Initial Congestion Window (InitCwnd) is set to 16, the delay is minimum, and Taobao is set to 7 service because the file size is different from Google. Experience the best.
  • the first device needs to negotiate with the second device after modifying the TCP parameter, and the second device determines whether the modified TCP parameter meets a preset condition, for example, whether the modified TCP parameter is in the second device.
  • the first device may be, for example, a sending end (such as a server) of the TCP data stream, and the second device is the receiving end (the client device); during the negotiation, the request message may be negotiated by sending a data transmission protocol.
  • the data transmission protocol negotiation request message includes the modified TCP parameter; after the second device determines, the feedback is sent, and the feedback message is sent; after receiving the feedback message, the first device generates a modification result, and if the preset condition is met, the message is generated. Modify the result of the successful modification, otherwise the modification result of the modification failure will be generated.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the first device generates a first socket corresponding to the data stream
  • the first device modifies the TCP parameter by using a data transmission protocol modification interface corresponding to the first socket, and obtains the modified TCP parameter.
  • the data transmission protocol modifies the interface, including:
  • the first device may modify the TCP parameter corresponding to the data stream by using the following method: the first device generates a first socket corresponding to the data stream, and is modified by using a data transmission protocol corresponding to the first socket.
  • the interface modifies the TCP parameters, and may also modify the TCP parameters by other means, such as a command line or a registry.
  • a general socket socket programming interface may be used, for example: int setsockopt(int s, int level, int optname, const void*
  • the function optval,, socklen_toptlen) modifies the parameters of the TCP, and can also modify the parameters of the TCP through the newly created API.
  • the TCP parameter includes any one or more of the following items:
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the initial congestion window.
  • the TCP initial congestion window needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information
  • the TCP parameter is initially congested.
  • a window the first device (such as the sender) invoking the data transmission protocol modification interface to modify the initial congestion window corresponding to the data stream to a more suitable first initial congestion window, where the first initial congestion window may be the first Device preset.
  • the specific first initial congestion window generally needs to combine the size of the file to be transmitted, the capability of the transmitting end, Determined by network bandwidth and other conditions.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the initial congestion window.
  • the sending end separately modifies the initial TCP congestion window, and does not need to negotiate with the receiving end.
  • the first device when the TCP parameter is a congestion window when the timeout is retransmitted, performs the modification on the TCP parameter to obtain the modified TCP parameter, including:
  • the data transmission protocol modification interface is configured to modify the congestion window of the timeout retransmission corresponding to the data flow, to obtain a congestion window when the first timeout retransmission is modified, and the congestion window of the first timeout retransmission Presupposed;
  • the modification result is generated, where the modification result indicates that the first device has completed the congestion window when the timeout is retransmitted. modify.
  • TCP believes that the main reason for network congestion is that it retransmits a segment.
  • TCP has a timer for each segment, called Retransmission Timeout (RTO).
  • RTO Retransmission Timeout
  • TCP will retransmit the segment.
  • RTO Retransmission Timeout
  • the possibility of congestion is large, and a segment may be lost somewhere in the network. Therefore, network congestion will modify the congestion window during timeout retransmission. After a timeout retransmission, it will enter a slow start.
  • the TCP parameter is a timeout weight when the congestion window of the TCP timeout retransmission needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the first device (such as the sending end) invokes the data transmission protocol modification interface to modify the congestion window when the timeout retransmission corresponding to the first service is modified to a more suitable congestion in the first timeout retransmission.
  • the window, the congestion window when the first timeout is retransmitted may be preset by the first device.
  • the congestion window of the specific first timeout retransmission is generally determined by combining the file size to be transmitted, the server capacity of the sender, and the network bandwidth.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion window when the timeout is retransmitted.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the data transmission protocol modification interface is configured to modify the congestion window of the fast recovery corresponding to the data flow, to obtain a congestion window of the first fast recovery, and the congestion window of the first fast recovery is preset. of;
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion window when the fast recovery is performed.
  • retransmission occurs after a timeout, but if the sender receives more than 3 duplicate ACKs, it should be aware that the data is lost and needs to be retransmitted.
  • This mechanism does not need to wait until the retransmission timer overflows, so it is called fast retransmission, and after fast retransmission, because it is not a slow start but a congestion avoidance algorithm, it is also called a fast recovery algorithm.
  • Fast retransmission and fast recovery are designed to quickly recover lost packets.
  • the content to be modified is fast recovery at the time when the congestion window of the TCP fast recovery needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the first device (such as the sending end) invokes the data transmission protocol modification interface to modify the congestion window of the fast recovery corresponding to the data flow to a more suitable congestion window for the first fast recovery
  • the congestion window at the time of the first quick recovery may be preset by the first device.
  • the specific congestion window of the first fast recovery generally needs to be determined in combination with the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion window at the time of the fast recovery.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the data transmission protocol modification interface is configured to modify the slow start threshold corresponding to the data flow to obtain a modified first slow start threshold, where the first slow start threshold is preset;
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed the modification of the slow start threshold.
  • the TCP parameter is slow at this time.
  • the first device (such as the sending end) invokes a data transmission protocol modification interface to modify the slow start threshold corresponding to the data flow to a more suitable first slow start threshold, where the first slow start threshold may be A device preset.
  • the specific first slow start threshold is generally determined by combining the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the modification result is generated, and the modified result indicates that the first device has completed the modification of the slow start threshold.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the data transmission protocol modification interface is configured to modify the slow start threshold of the timeout retransmission corresponding to the data flow, and obtain a slow start threshold of the modified first timeout retransmission, and the slow start threshold of the first timeout retransmission Presupposed;
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, where the modification result indicates that the first device has completed the slow start threshold of the timeout retransmission. modify.
  • the slow start threshold of the timeout retransmission of the TCP needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information
  • the content to be modified is the slow start threshold of the timeout retransmission
  • the first device (such as the sending end) invokes the data transmission protocol modification interface to modify the slow start threshold of the timeout retransmission corresponding to the data flow to a more suitable first timeout.
  • the slow start threshold of the retransmission, the slow start threshold of the first timeout retransmission may be preset by the first device.
  • the slow start threshold of the specific first timeout retransmission is generally determined by combining the file size to be transmitted, the server capacity of the sender, and the network bandwidth.
  • the modification result is generated, and the modification result indicates that the first device has completed the modification of the slow start threshold of the timeout retransmission.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the data transmission protocol modification interface is configured to modify the threshold of the fast recovery congestion window corresponding to the data flow, and obtain the threshold of the first fast recovery congestion window, where the threshold of the first fast recovery congestion window is Set
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the fast recovery congestion window threshold.
  • the modified content is a fast recovery congestion window threshold
  • the first device (such as the sending end) invokes a data transmission protocol modification interface to modify the fast recovery congestion window threshold corresponding to the data flow to a more suitable first fast recovery congestion.
  • the window threshold, the first fast recovery congestion window threshold may be preset by the first device.
  • the threshold of the first fast recovery congestion window is generally determined by combining the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the modification result is generated, and the repair is performed.
  • the result of the change indicates that the first device has completed the modification of the fast recovery congestion window threshold.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed the modification of the slow start stride.
  • the slow start stride is the amplitude of the congestion window that the sender increases at the slow start.
  • the congestion window is incremented by 1 each time an ACK of a message is received.
  • the congestion window is exponentially stepped. The increase is increased, but in the extended network, how to reduce the slow start time; and when the timeout is retransmitted, the sender will enter the slow start phase again, how to adapt to the dynamic change of the network, which requires slow start according to the actual situation.
  • the stride is modified.
  • the TCP parameter is a slow start stride when the slow start stride of the TCP needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the first device (such as the transmitting end) invokes a data transmission protocol modification interface to modify the slow start stride corresponding to the data stream to a more suitable first slow start stride, and the first slow start stride may be
  • the first device is preset.
  • the specific first slow start stride generally needs to be determined in combination with the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the modification result is generated, and the modified result indicates that the first device has completed the modification of the slow start stride.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion avoidance stride.
  • the congestion avoidance stride is the amplitude of the congestion window added by the transmitting end when the congestion is avoided.
  • the congestion window is added with 1/Cwnd, and the congestion window is added in each RTT period. 1, but in the extended network, how to reduce the length of congestion avoidance, which requires the congestion avoidance step to be modified according to the actual situation.
  • the first device (such as the sending end) invokes a data transmission protocol modification interface to modify the congestion avoidance stride corresponding to the data flow to a more suitable first congestion avoidance stride, and the first congestion avoidance stride may be
  • the first device is preset.
  • the specific first congestion avoidance stride generally needs to be determined in combination with the file size to be transmitted, the server capacity of the transmitting end, the network bandwidth, and the like.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion avoidance stride.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion avoidance stride.
  • the slow start ACK response frequency may not need to be negotiated with the second device, and is determined only by the first device, according to the first device information, the second device information, and the service information carried by the current data stream,
  • the TCP parameter is a slow start ACK response frequency
  • the first device (such as the sender) calls the data transmission protocol to modify the interface.
  • the slow start ACK response frequency corresponding to the data stream is modified to a more suitable first slow start ACK response frequency, and the first slow start ACK response frequency may be preset by the first device.
  • the specific first slow start ACK response frequency generally needs to be determined in combination with the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the slow start ACK response frequency.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the modification result indicates that the first device has completed modification of the congestion avoidance ACK response frequency.
  • the congestion avoidance ACK response frequency may not need to be negotiated with the second device, and is determined only by the first device, according to the first device information, the second device information, the service information carried by the current data stream,
  • the TCP parameter is the congestion avoidance ACK response frequency
  • the first device (such as the sender) invokes the data transmission protocol to modify the interface.
  • the congestion avoidance ACK response frequency corresponding to the first service is modified to a more suitable first congestion avoidance ACK response frequency, and the first congestion avoidance ACK response frequency may be preset by the first device.
  • the specific first congestion avoidance ACK response frequency generally needs to be determined in combination with the file size, the transmission end capability, the network bandwidth, and the like that need to be transmitted.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the congestion avoidance ACK response frequency.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the fast recovery ACK response frequency.
  • the fast recovery ACK response frequency does not need to be negotiated with the second device, and is determined only by the first device, according to the first device information, the second device information, the service information carried by the current data stream, and the network status information. At least one item confirms that the fast recovery ACK response frequency of the TCP needs to be modified.
  • the TCP parameter is a fast recovery ACK response frequency
  • the first device (such as the transmitting end) invokes a data transmission protocol modification interface to correspond the data stream.
  • the fast recovery ACK response frequency is modified to a more suitable first fast recovery ACK response frequency, and the first fast recovery ACK response frequency may be preset by the first device.
  • the specific first fast recovery ACK response frequency generally needs to be determined in combination with the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the fast recovery ACK response frequency.
  • the first device modifies the TCP parameter to obtain a modified TCP parameter.
  • the modification result of the first device generating the TCP parameter includes:
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the fast recovery ACK response frequency.
  • the normal transmission ACK response frequency may not need to be negotiated with the second device, and is determined only by the first device, according to the first device information, the second device information, the service information carried by the current data stream, and the network status information. At least one item confirms that the normal transmission ACK response frequency of the TCP needs to be modified.
  • the TCP parameter is a normal transmission ACK response frequency
  • the first device (such as the transmitting end) invokes a data transmission protocol modification interface to correspond the data stream.
  • the normal transmission ACK response frequency is modified to a more suitable first normal transmission ACK response frequency, and the first normal transmission ACK response frequency may be preset by the first device.
  • the specific first normal transmission ACK response frequency generally needs to be determined in combination with the file size, the transmission end capability, the network bandwidth, and the like that need to be transmitted.
  • the modification result is generated, and the modification result indicates that the first device has completed modification of the normal transmission ACK response frequency.
  • FIG. 2 is a schematic diagram 1 of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the first device sends a congestion control algorithm negotiation request message to the second device, where the congestion control algorithm negotiation request message includes the first congestion control algorithm, so that the second device determines the first congestion control algorithm. Whether the preset modification condition is met;
  • the receiving, by the first device, the feedback message sent by the second device, and generating the modification result of the data transmission protocol according to the feedback message includes:
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first congestion control algorithm meets a preset modification condition of the second device, if the feedback message If the first congestion control algorithm meets the preset modification condition of the second device, the first device generates a modification result indicating that the first congestion control algorithm is successfully modified;
  • the first device If the feedback message indicates that the first congestion control algorithm does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the modification of the first congestion control algorithm fails.
  • the content to be modified is a congestion control algorithm
  • the first device (such as the transmitting end) invokes a data transmission protocol modification interface to modify the congestion control algorithm corresponding to the data flow to a more suitable first congestion control algorithm, where the first congestion
  • the control algorithm may be that the first device selects from a plurality of preset congestion control algorithms.
  • SACK Selective Acknowledgement
  • BIC BIC
  • CUBIC compound TCP
  • HTCP High Speed Transmission Control Protoco
  • XX explicit traffic control protocol
  • the first device selects a suitable first congestion control algorithm, sends a congestion control algorithm negotiation request message to the second device, where the congestion control algorithm negotiation request message is information including the first congestion control algorithm, so that The second device determines whether the first congestion control algorithm satisfies the preset condition, that is, whether the second device supports the first congestion control algorithm; and the data transmission protocol negotiation request message is specifically a congestion control algorithm negotiation request message;
  • the first device Receiving, by the first device, a feedback message sent by the second device, where the feedback message includes a message that the first congestion control algorithm meets a preset condition of the second device, if the feedback message indicates the first congestion control algorithm If the second device preset condition is met, the first device generates a modification result indicating that the first congestion control algorithm is successfully modified;
  • the first device If the feedback message indicates that the first congestion control algorithm does not meet the second device preset condition, the first device generates a modification result indicating that the first congestion control algorithm fails to be modified.
  • the sender changes the congestion control algorithm.
  • the developer can also modify the congestion control algorithm at the receiving end, and then negotiate with the sender to inform the developer whether the modification is successful.
  • the specific packet format of the congestion control algorithm negotiation request message and the feedback message may be a packet format as shown in FIG. 3, and a congestion control algorithm option (Congestion Control Algorithm Option) may be added to the TCP packet, and may also be used as a TCP packet.
  • a congestion control algorithm option Congestion Control Algorithm Option
  • the official content in the book can be used as a fixed field to indicate the congestion control algorithm.
  • the contents of the congestion control algorithm options are shown in Table 1 below.
  • the value "xx" in the congestion control algorithm negotiation request message in the above table 1 may be some of the congestion control algorithms listed above, such as XCP, or other congestion control algorithms, and may not be 32 bits in length, which is not limited by the present invention;
  • the length and value of the feedback message can also be determined according to actual needs.
  • FIG. 4 is a schematic diagram 2 of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • FIG. 5 is a second schematic diagram of a packet format according to an embodiment of a data transmission method according to the present invention.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the receiving, by the first device, the feedback message sent by the second device, and generating the modification result of the TCP parameter according to the feedback message includes:
  • the first device receives the feedback message sent by the second device, where the feedback message includes a message that the first receiving window meets a preset modification condition of the second device, if the feedback message indicates The first receiving window meets a preset modification condition of the second device, and the first device generates a modification result indicating that the first initial congestion window and the first receiving window are successfully modified;
  • the first device If the feedback message indicates that the first receiving window does not meet the preset modification condition of the second device, the first device generates, that the first initial congestion window and the first receiving window are not modified. Modify the results.
  • slow start is a congestion control mechanism used by TCP, and slow start is also called exponential growth period.
  • the slow start adds a Congestion Window (Cwnd) to the sender's TCP.
  • Cwnd Congestion Window
  • Slow start means that each time the TCP sender's congestion window receives an acknowledgment, it will grow. The size of the window is the number of confirmed segments. This situation is maintained until either no segments are received or the window size reaches a predefined threshold. If a loss event occurs, TCP considers this to be a network congestion and will take steps to mitigate network congestion. Once a loss event occurs or a threshold is reached, TCP enters a linear growth phase. At this time, every time A segment of the Round Trip Time (RTT) window is incremented by one segment.
  • RTT Round Trip Time
  • the congestion window can be initialized to one segment (ie, the segment size advertised by the other end), that is, the initial congestion window is one segment.
  • the congestion window adds a segment (Cwnd is in bytes, but slow start increases in units of message size).
  • the sender takes the minimum value in the congestion window and the Receiver Window (Rwnd) as the upper transmission limit.
  • the congestion window is the flow control used by the sender, and the receive window is the flow control used by the receiver.
  • the initial congestion window can also be modified according to the actual situation.
  • the TCP parameter is In the initial congestion window and the receiving window, the first device (such as the transmitting end) invokes a data transmission protocol modification interface to modify the initial congestion window corresponding to the data stream to a more suitable first initial congestion window, the first initial congestion
  • the window can be preset by the first device.
  • the specific first initial congestion window is generally determined by combining the size of the file to be transmitted, the capability of the transmitting end, the bandwidth of the network, and the like.
  • the first device Receiving, by the first device, a feedback message sent by the second device, where the feedback message includes a message that the first receiving window meets a preset modification condition of the second device, if the feedback message indicates the first receiving window And satisfying the preset modification condition of the second device, the first device generating a modification result indicating that the first initial congestion window and the first receiving window are successfully modified;
  • the first device If the feedback message indicates that the first receiving window does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the first initial congestion window and the first receiving window modification fail.
  • the specific packet format of the receiving window negotiation request message and the feedback message may be a packet format as shown in FIG. 5, and an initial Cwnd Modify Option may be added to the TCP packet, which may also be used as a TCP packet.
  • the official content in the middle can be used as a fixed field to indicate the initial congestion window.
  • the contents of the initial congestion window modification option are shown in Table 2 below.
  • the value "xx" in the initial congestion window request message in the above table 2 may be an initial congestion window of any length that is actually required, and the message length may not be 32 bits, which is not limited by the present invention
  • the length and value of the feedback message can also be determined according to actual needs.
  • FIG. 6 is a schematic diagram 3 of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • FIG. 7 is a third schematic diagram of a message format according to an embodiment of a data transmission method according to the present invention.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the first device sends a slow start ACK response frequency negotiation request message to the second device, where the slow start ACK response frequency negotiation request message includes the first slow start ACK response frequency, so that the second device determines the location Determining whether the first slow start ACK response frequency meets a preset modification condition;
  • the receiving, by the first device, the feedback message sent by the second device, and generating the modification result of the TCP parameter according to the feedback message includes:
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first slow start ACK response frequency meets a preset modification condition of the second device, if The feedback message indicates that the first slow start ACK response frequency meets the preset modification condition of the second device, and the first device generates a modification result indicating that the first slow start ACK response frequency modification is successful;
  • the first device If the feedback message indicates that the first slow start ACK response frequency does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the first slow start ACK response frequency modification fails. .
  • the sender initially sends a segment and then waits for an ACK.
  • the congestion window is increased from 1 to 2, that is, two segments can be sent.
  • the congestion window is increased to 4. This is an exponential increase relationship.
  • the increase of the congestion window depends on the response frequency of the ACK.
  • the current receiving end sends an ACK every 2 packets received. When the ACK is lost or the number of received packets is small, The congestion window increases slowly, resulting in an increase in the slow start duration, so the slow start time can be reduced by modifying the ACK response frequency.
  • the first device (such as the transmitting end) confirms that the TCP slow start ACK response frequency needs to be modified.
  • the TCP parameter is a slow start ACK response frequency
  • the data transmission protocol modification interface is invoked to match the first device.
  • the slow start ACK response frequency corresponding to the current data stream is modified to the current slow start ACK response frequency, that is, the first slow start ACK response frequency, and the first slow start ACK response frequency is preset, specifically slow.
  • the start ACK response frequency is generally determined by the size of the file to be transmitted, the server capacity of the sender, and the bandwidth of the network.
  • the first device sends a slow start ACK response frequency negotiation request message to the second device (such as the receiving end), where the slow start ACK response frequency negotiation request message includes the first slow start ACK response frequency, so that the first
  • the second device determines whether the first slow start ACK response frequency meets the preset modification condition; the data transmission protocol negotiation request message is specifically a slow start ACK response frequency negotiation request message.
  • the first device receives the feedback message sent by the second device, where the feedback message includes a message that the first slow start ACK response frequency meets a preset modification condition of the second device, if the feedback message If the first slow start ACK response frequency meets the preset modification condition of the second device, the first device generates a modification result indicating that the first slow start ACK response frequency modification is successful;
  • the first device If the feedback message indicates that the first slow start ACK response frequency does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the first slow start ACK response frequency modification fails. .
  • the specific packet format of the slow start ACK response frequency negotiation request message and the feedback message is as shown in the packet format shown in FIG. 7, and the slow start ACK Frequency Option (Slow Start ACK Frequency Option) is added to the TCP packet.
  • the official content in the TCP message can be used as a fixed field to indicate the slow start ACK response frequency.
  • the contents of the slow start ACK response frequency option are shown in Table 3 below.
  • the value "xx" in the slow start ACK response frequency negotiation request message in the above table 3 may be any ACK response frequency that is actually needed, and the message length may also be determined according to actual needs, such as 32 bits, which is not limited by the present invention;
  • the length and value of the feedback message can also be determined according to actual needs.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the first device sends a congestion avoidance ACK response frequency negotiation request message to the second device, where the congestion avoidance ACK response frequency negotiation request message includes the first congestion avoidance ACK response frequency, so that the second device determines the location Determining whether the first congestion avoidance ACK response frequency meets a preset modification condition;
  • the receiving, by the first device, the feedback message sent by the second device, and generating the modification result of the TCP parameter according to the feedback message includes:
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first congestion avoidance ACK response frequency meets a preset modification condition of the second device, if The feedback message indicates that the first congestion avoidance ACK response frequency meets the preset modification condition of the second device, and the first device generates a modification result indicating that the first congestion avoidance ACK response frequency modification is successful;
  • the first device If the feedback message indicates that the first congestion avoidance ACK response frequency does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the first congestion avoidance ACK response frequency modification fails. .
  • Cwnd can grow up quickly to maximize the use of network bandwidth resources, but Cwnd can't continue to grow indefinitely, and certain restrictions are needed.
  • TCP uses a variable called Slow Start Threshold (SSThresh).
  • SSThresh Slow Start Threshold
  • the value of SSThresh is 65536 (also in bytes).
  • the main idea of congestion avoidance is that the addition increases, which means that the value of Cwnd no longer rises exponentially, and the addition increases.
  • the size of Cwnd is increased by 1.
  • the value of Cwnd starts to increase linearly with the RTT, so that the network congestion can be prevented from growing too fast, and the adjustment is slowly added to the network. The best value.
  • the speed at which the congestion window increases when congestion is avoided can be controlled by adjusting the congestion avoidance ACK response frequency.
  • the first device (such as the sending end) confirms that the congestion avoidance ACK response of the TCP needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the TCP parameter is a congestion avoidance ACK response frequency
  • the data transmission protocol modification interface is configured to modify the congestion avoidance ACK response frequency corresponding to the data flow to a current congestion avoidance ACK response frequency of the current service, that is, the first Congestion avoids ACK response frequency
  • the first congestion avoidance ACK response frequency is preset
  • the specific congestion avoidance ACK response frequency generally combines the file size to be transmitted, the transmission end capability, and the network bandwidth. Wait for the situation to determine.
  • the first device sends a congestion avoidance ACK response frequency negotiation request message to the second device (such as the receiving end), where the congestion avoidance ACK response frequency negotiation request message includes the first congestion avoidance ACK response frequency, so that the The second device determines whether the first congestion avoidance ACK response frequency meets a preset modification condition.
  • the data transmission protocol negotiation request message is specifically a congestion avoidance ACK response frequency negotiation request message.
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first congestion avoidance ACK response frequency meets a preset modification condition, if the feedback message indicates the first congestion
  • the first device generates a modification result indicating that the first congestion avoidance ACK response frequency is successfully modified, to prevent the ACK response frequency from satisfying the preset modification condition;
  • the first device If the feedback message indicates that the first congestion avoidance ACK response frequency does not meet the preset modification condition, the first device generates a modification result indicating that the first congestion avoidance ACK response frequency modification fails.
  • the specific packet format of the congestion avoidance ACK response frequency negotiation request message and the feedback message is similar to that of the slow start ACK response frequency negotiation request message and the feedback message, and details are not described herein again.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the first device sends a fast recovery ACK response frequency negotiation request message to the second device, where the fast recovery ACK response frequency negotiation request message includes the first fast recovery ACK response frequency, so that the second device determines the location Whether the first fast recovery ACK response frequency meets a preset modification condition;
  • the receiving, by the first device, the feedback message sent by the second device, and generating the modification result of the TCP parameter according to the feedback message includes:
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first fast recovery ACK response frequency meets a preset modification condition of the second device, if The feedback message indicates that the first fast recovery ACK response frequency meets the preset modification condition of the second device, and the first device generates a modification result indicating that the first fast recovery ACK response frequency is successfully modified;
  • the first device If the feedback message indicates that the first fast recovery ACK response frequency does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the first fast recovery ACK response frequency modification fails. .
  • TCP uses 3 identical ACKs to determine the loss of data packets. At this time, fast retransmission is performed. When fast retransmission is performed, SSThresh is reset, and the size of the congestion window is re-entered. The fast recovery algorithm is added on the basis of the above-mentioned fast retransmission algorithm. When three repeated ACKs are received, the last time TCP enters is not the congestion avoidance phase but the fast recovery phase. Fast retransmission and fast recovery algorithms are generally used at the same time.
  • the idea of fast recovery is the principle of “conservation of data packets”, that is, the number of data packets in the network at the same time is constant, and only when the “old” data packet leaves the network, can it send a “new” data to the network. Packet, if the sender receives a duplicate ACK, then according to the TCP ACK mechanism, it indicates that a packet has left the network, so Cwnd is incremented by 1. If this principle is strictly followed, then congestion will rarely occur in the network.
  • the speed of the congestion window can be increased by adjusting the fast recovery ACK response frequency.
  • the first device (such as the sending end) confirms that the fast recovery ACK response of the TCP needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the TCP parameter is a fast recovery ACK response frequency
  • the data transmission protocol modification interface is configured to modify the fast recovery ACK response frequency corresponding to the data flow to a fast recovery ACK response frequency suitable for the current service, that is, the first The ACK response frequency is quickly restored.
  • the first fast recovery ACK response frequency is preset.
  • the specific fast recovery ACK response frequency is generally determined by combining the file size, the sender capability, the network bandwidth, and the like that need to be transmitted.
  • the first device sends a fast recovery ACK response frequency negotiation request message to the second device (such as the receiving end), where the fast recovery ACK response frequency negotiation request message includes the first fast recovery ACK response frequency, so that the first
  • the second device determines whether the first fast recovery ACK response frequency meets the preset modification condition; the data transmission protocol negotiation request message is specifically a fast recovery ACK response frequency negotiation request message.
  • the first device receives the feedback message sent by the second device, where the feedback message includes a message that the first fast recovery ACK response frequency meets a preset modification condition, if the feedback message indicates the first The fast recovery ACK response frequency meets a preset modification condition, and the first device generates a modification result indicating that the first fast recovery ACK response frequency is successfully modified;
  • the first device If the feedback message indicates that the first fast recovery ACK response frequency does not meet the preset modification condition, the first device generates a modification result indicating that the first fast recovery ACK response frequency modification fails.
  • the first device modifies the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the first device sends a normal transmission ACK response frequency negotiation request message to the second device, where the normal transmission ACK response frequency negotiation request message includes the first normal transmission ACK response frequency, so that the second device determines the location Whether the first normal transmission ACK response frequency meets a preset modification condition;
  • the receiving, by the first device, the feedback message sent by the second device, and generating the modification result of the TCP parameter according to the feedback message includes:
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first normal transmission ACK response frequency meets a preset modification condition of the second device, if The feedback message indicates that the first normal transmission ACK response frequency meets the preset modification condition of the second device, and the first device generates a modification result indicating that the first normal transmission ACK response frequency is successfully modified;
  • the first device If the feedback message indicates that the first normal transmission ACK response frequency does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the first normal transmission ACK response frequency modification fails. .
  • TCP uses a variable size sliding window (ie, a send window) for flow control, and the unit size of the window is bytes.
  • the send window is negotiated by both parties when the connection is established, and is determined by the congestion window and the receive window.
  • the upper limit of the transmission window Min [Rwnd, Cwnd], and when Rwnd ⁇ Cwnd, it is the maximum value of the receiving capability of the receiving end to limit the transmission window.
  • Cwnd ⁇ Rwnd it is the maximum value of the congestion limit transmission window of the network.
  • the send window is 500 bytes, if the sender has sent 400 bytes of data, but only receives confirmation of the first 200 bytes of data, and the window size does not change. Since the send window is 500 bytes, 300 bytes can also be sent.
  • the sender receives the acknowledgment from the other party for the first 400 bytes of data, but the other party informs the sender that the receive window is reduced to 400 bytes.
  • the sender can now send up to 400 bytes of data.
  • Adjust the normal transmission ACK response frequency that is, adjust the frequency at which the receiving end sends ACK.
  • the receiving end responds with an ACK every time it receives 2 messages.
  • it can be modified to respond to an ACK every time a message is received. It is also possible to reduce the frequency of the ACK response during a large amount of data transmission, and thus the size of the transmission window can be adjusted.
  • the first device (such as the sending end) confirms that the normal transmission ACK response frequency of the TCP needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the TCP parameter is a normal transmission ACK response frequency
  • the data transmission protocol modification interface is invoked to modify the normal transmission ACK response frequency corresponding to the data stream to a normal transmission ACK response frequency suitable for the current service, that is, the first normal transmission ACK response frequency.
  • the first normal transmission ACK response frequency is preset, and the specific normal transmission ACK response frequency is generally determined by combining the file size to be transmitted, the server capacity of the transmitting end, the network bandwidth, and the like.
  • the first device sends a normal transmission ACK response frequency negotiation request message to the second device (such as the receiving end), where the normal transmission ACK response frequency negotiation request message includes the first normal transmission ACK response frequency, so that the first device
  • the second device determines whether the first normal transmission ACK response frequency meets a preset modification condition; the data transmission protocol negotiation request message is specifically a normal transmission ACK response frequency negotiation request message.
  • the first device receives the feedback message sent by the second device, where the feedback message includes whether the message of the first normal transmission ACK response frequency meets a preset modification condition, if the feedback message indicates the first normal If the transmission ACK response frequency meets the preset modification condition, the first device generates a modification result indicating that the first normal transmission ACK response frequency is successfully modified;
  • the first device If the feedback message indicates that the first normal transmission ACK response frequency does not satisfy the preset modification condition, the first device generates a modification result indicating that the first normal transmission ACK response frequency modification fails.
  • the specific packet format of the normal transmission ACK response frequency negotiation request message and the feedback message is similar to that of the slow start ACK response frequency negotiation request message and the feedback message, and details are not described herein again.
  • FIG. 8 is a schematic diagram of an implementation principle of an embodiment of a data transmission method according to the present invention.
  • FIG. 9 is a fourth schematic diagram of a message format according to an embodiment of a data transmission method according to the present invention.
  • the first device performs the modification on the TCP parameter to obtain the modified TCP parameter, including:
  • the sending, by the first device, the data transmission protocol negotiation request message to the second device includes:
  • the first device sends a maximum packet length negotiation request message to the second device, where the maximum packet length negotiation request message includes the first maximum packet length, so that the second device determines the first Whether the maximum packet length meets the preset modification condition;
  • the result of modifying the parameters includes:
  • the feedback message sent by the second device, where the feedback message includes a message that the first maximum packet length meets a preset modification condition of the second device, if the feedback The message indicates that the first maximum packet length meets the preset modification condition of the second device, and the first device generates a modification result indicating that the first maximum packet length is successfully modified;
  • the first device If the feedback message indicates that the first maximum packet length does not meet the preset modification condition of the second device, the first device generates a modification result indicating that the modification of the first maximum packet length fails.
  • the current TCP maximum packet length is strongly related to the Maximum Transmission Unit (MTU) of the link between the transmitting end and the receiving end, ignoring the MTU of the link in the intermediate network and the service requirement.
  • MTU Maximum Transmission Unit
  • MTU is the maximum datagram size (in bytes) that can pass over a layer of a communication protocol. If the MTU of the sender does not match the MTU of the receiver on the network, the packet loss rate is increased and the network speed is reduced.
  • the first device (such as the receiving end) confirms that the device needs to be modified according to at least one of the first device information, the second device information, the service information carried by the current data stream, and the network state information.
  • the maximum packet length of the TCP in which the TCP parameter is the maximum packet length, and the data transmission protocol modification interface is configured to modify the maximum packet length corresponding to the data flow to the maximum packet length suitable for the current service, that is,
  • the first maximum packet length, the first maximum packet length is preset, and the specific maximum packet length is generally determined by combining the capability of the receiving end of the transmitting end, the network bandwidth, and the like.
  • the first device sends a maximum packet length negotiation request message to the second device (the sending end), where the maximum packet length negotiation request message includes the first maximum packet length, so that the second device determines the location. Whether the first maximum packet length meets the preset modification condition; the data transmission protocol negotiation request message is specifically the maximum packet length negotiation request message.
  • the first device Receiving, by the first device, the feedback message sent by the second device, where the feedback message includes a message that the first maximum packet length meets a preset modification condition, if the feedback message indicates the first maximum report If the length of the text meets the preset modification condition, the first device generates a modification result indicating that the first maximum packet length is successfully modified;
  • the first device If the feedback message indicates that the first maximum packet length does not meet the preset modification condition, the first device generates a modification result indicating that the first maximum packet length modification fails.
  • the specific packet format of the maximum packet length negotiation request message and the feedback message is in the packet format shown in Figure 9.
  • the maximum packet length modification option (Max Packet Length Modify) is added to the TCP packet, which can also be used as a TCP packet.
  • the official content in the text can be used as a fixed field to indicate the maximum message length.
  • Maximum message The contents of the length modification option are shown in Table 4 below.
  • the value "xx" in the maximum packet length negotiation request message in the above table 4 may be any packet length that is actually required.
  • the length of the message may also be determined according to actual needs, for example, 32 bits, and the present invention is not limited;
  • the length and value of the feedback message can also be determined according to actual needs.
  • FIG. 10 is a flowchart of still another embodiment of a data transmission method according to the present invention.
  • the executor of the embodiment is a second device, and the second device may be a sending end or a receiving end of the TCP, that is, a server or a client device.
  • this embodiment provides a data transmission method, including:
  • Step 1001 The second device receives a data transmission protocol negotiation request message sent by the first device, where the data transmission protocol negotiation request message includes the modified TCP parameter of the first device.
  • Step 1002 The second device determines whether the modified TCP parameter meets a preset modification condition.
  • Step 1003 The second device generates a feedback message, and sends the feedback message to the first device.
  • the TCP parameter includes any one or more of the following items:
  • FIG. 11 is a schematic structural diagram of Embodiment 1 of the first device of the present invention.
  • the first device in this embodiment may include: a determining module 1101, a modifying module 1102, and a generating module 1103; wherein, the determining module 1101 is used by Determining, according to the data flow information, whether the data transmission protocol TCP parameter in the data stream corresponding to the data flow information needs to be modified; the data flow information includes at least one of the following information: information of the first device, and information of the second device Information, business information, network status information;
  • the modifying module 1102 is configured to determine that the TCP parameter needs to be modified, modify the TCP parameter, and obtain the modified TCP parameter.
  • the generating module 1103 is configured to generate a modification result of the TCP parameter.
  • the sending module 1104 is configured to send a data transmission protocol negotiation request message to the second device, where the data transmission protocol negotiation request message includes the modified TCP parameter, and the data transmission protocol negotiation request message is used to request the The second device determines whether the modified TCP parameter meets a preset modification condition;
  • the receiving module 1105 is configured to receive a feedback message sent by the second device, where the generating module 1103 is specifically configured to:
  • the data transmission protocol negotiation request message is a data transmission protocol message; the modified TCP parameter is used as an option of the data transmission protocol message.
  • Modifying by using a data transmission protocol modification interface corresponding to the first socket, the TCP parameter to obtain a modified TCP parameter.
  • the data transmission protocol modifies the interface, including:
  • the TCP parameter includes any one or more of the following items:
  • the first device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of Embodiment 1 of a second device of the present invention.
  • the second device in this embodiment may include: a receiving module 1201, a processing module 1202, and a sending module 1203.
  • the sending module 1203 is configured to generate a feedback message, and send the feedback message to the first device.
  • the sending module 1203 is further configured to send the information of the second device to the first device in advance, where the first device determines, according to the data flow information, whether the data transmission protocol TCP parameter in the data stream corresponding to the data flow information is Need to be modified.
  • the second device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 10, and the implementation principle and technical effects are similar, and details are not described herein again.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

本发明实施例提供一种数据传输方法和装置,本发明数据传输方法,包括:第一设备根据数据流信息判断数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;数据流信息包括以下信息中的至少一项:第一设备的信息、第二设备的信息、业务信息、网络状态信息;若是,则对TCP参数进行修改,获得修改后的TCP参数;所述第一设备生成TCP参数的修改结果。本发明实现了根据不同用户的不同业务的数据流来对与该数据流对应的TCP参数修改。

Description

数据传输方法和装置
本申请要求于2014年12月19日提交中国专利局、申请号为201410799680.8、发明名称为“数据传输方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及计算机技术领域,尤其涉及一种数据传输方法和装置。
背景技术
TCP(Transmission Control Protocol,传输控制协议)是一种面向连接的、可靠的、基于字节流的传输层通信协议,该协议为用户提供多种修改参数以便用户针对不同的网络状况修改对应的参数,以提高数据传输效率。
现有技术中修改TCP参数的方式为:通过对系统文件中存储的TCP参数进行修改,修改后保存该系统文件,并执行相应的命令使修改生效。
但是,在执行上述过程时,发明人发现现有技术存在如下问题:由于一个用户可以对应多种业务,每种业务对应一个TCP流,即一个用户对应多个TCP流。如果在用户侧修改TCP参数的话,因为上述修改的TCP参数为全局参数,对某个用户对应的TCP流中的某一TCP参数进行修改后,该用户的所有的TCP流中的该TCP参数都被修改了。如果在服务器侧修改TCP参数的话,修改某一用户的TCP流中的某一TCP参数,则其他用户的所有TCP流中的该TCP参数也被修改。但是对于服务器的某些用户或某些业务来说,其对应的TCP流中的该TCP参数并不需要被修改。因此上述对TCP参数修改的精度不高。
发明内容
本发明实施例提供一种数据传输方法和装置,解决了现有技术对TCP参数修改的精度不高的问题。
第一方面,本发明实施例提供一种数据传输方法,包括:
第一设备根据数据流信息判断所述数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的 信息、第二设备的信息、业务信息、网络状态信息;
若是,则所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数;
所述第一设备生成所述TCP参数的修改结果。
结合第一方面,在第一方面的第一种可能的实现方式中,所述第一设备生成所述TCP参数的修改结果之前,还包括:
所述第一设备将数据传输协议协商请求消息发送至第二设备,所述数据传输协议协商请求消息包括所述修改后的TCP参数;所述数据传输协议协商请求消息用于请求所述第二设备判断所述修改后的TCP参数是否满足预设修改条件;
所述第一设备生成所述TCP参数的修改结果,包括:
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果。
结合第一方面、或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述数据传输协议协商请求消息为数据传输协议报文;所述修改后的TCP参数作为所述数据传输协议报文的选项。
结合第一方面、或第一方面的第一至第二任一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
所述第一设备生成所述数据流对应的第一套接字;
所述第一设备通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,获得修改后的TCP参数。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述数据传输协议修改接口,包括:
通用套接字socket编程接口和新建应用程序接口API。
结合第一方面、或第一方面的第一至第四任一种可能的实现方式,在第一方面的第五种可能的实现方式中,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
第二方面,本发明实施例提供一种第一设备,包括:
判断模块,用于根据数据流信息判断所述数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息;
修改模块,用于所述判断模块判断出需要修改所述TCP参数,对所述TCP参数进行修改,获得修改后的TCP参数;
生成模块,用于生成所述TCP参数的修改结果。
结合第二方面,在第二方面的第一种可能的实现方式中,还包括:
发送模块,用于将数据传输协议协商请求消息发送至第二终端,所述数据传输协议协商请求消息包括所述修改后的TCP参数;所述数据传输协议协商请求消息用于请求所述第二终端判断所述修改后的TCP参数是否满足预设修改条件;
接收模块,用于接收第二终端发送的反馈消息;
所述生成模块,具体用于:
根据所述反馈消息生成所述TCP参数的修改结果。
结合第二方面、或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述数据传输协议协商请求消息为数据传输协议报文;所述修改后的TCP参数作为所述数据传输协议报文的选项。
结合第二方面、或第二方面的第一至第二任一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述修改模块,具体用于:
生成所述数据流对应的第一套接字;
通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,获得修改后的TCP参数。
结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述数据传输协议修改接口,包括:
通用套接字socket编程接口和新建应用程序接口API。
结合第二方面、或第二方面的第一至第四任一种可能的实现方式,在第三方面的第五种可能的实现方式中,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
第三方面,本发明实施例提供一种第二设备,包括:
接收模块,用于接收第一设备发送的数据传输协议协商请求消息,所述数据传输协议协商请求消息包括所述第一设备修改后的TCP参数;
处理模块,用于判断所述修改后的TCP参数是否满足预设修改条件;
发送模块,用于生成反馈消息,并向所述第一设备发送所述反馈消息。
结合第三方面,在第三方面的第一种可能的实现方式中,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
本发明实施例数据传输方法和装置,通过第一设备根据数据流信息判断所述数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息;若是,则所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数;所述第一设备生成所述TCP参数的修改结果,实现了根据不同用户的不同业务的数据流来对与该数据流对应的数据传输协议TCP参数的修改,解决了现有技术中对TCP参数修改精度不高的问题。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明数据传输方法一实施例的流程图;
图2为本发明数据传输方法一实施例的实现原理图一;
图3为本发明数据传输方法一实施例的报文格式示意图一;
图4为本发明数据传输方法一实施例的实现原理图二;
图5为本发明数据传输方法一实施例的报文格式示意图二;
图6为本发明数据传输方法一实施例的实现原理图三;
图7为本发明数据传输方法一实施例的报文格式示意图三;
图8为本发明数据传输方法一实施例的实现原理图四;
图9为本发明数据传输方法一实施例的报文格式示意图四;
图10为本发明数据传输方法又一实施例的流程图;
图11为本发明第一设备实施例一的结构示意图;
图12为本发明第二设备实施例一的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明数据传输方法一实施例的流程图。本实施例的执行主体为第一设备,例如可以为TCP的发送端、或接收端,即可以是服务器或客户端设备。如图1所示,本实施例提供数据传输方法,包括:
步骤101、第一设备根据数据流信息判断所述数据流对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息。
步骤102、若是,则所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数。
步骤103、所述第一设备生成所述TCP参数的修改结果。
具体来说,本发明实施例中为了满足不同的业务需求和动态变化的网络,可以基于业务对应的TCP流来动态的调整TCP的参数,即第一设备对数据流对应的TCP参数进行修改,TCP参数如初始拥塞窗口、超时重传时的拥塞窗口、快速恢复时的拥塞窗口等。
首先,根据数据流信息判断TCP参数是否修改,具体可以根据以下信息中的至少一项进行判断:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息,如第一设备为服务器时,可以判断该服务器的信息、第二设备(即用户的客户端设备)的信息、业务信息或网络状态信息中的至少一项,网络状态信息如网络带宽等;第一设备的信息如该设备的收发能力、中央处理器CPU的处理能力、缓存大小、硬盘的存储空 间大小等,第二设备的信息与上述类似,如还可以有接口速率、终端类型等;第二设备的信息可以是预先发送给第一设备的,即可以是在建立TCP连接时第一设备与第二设备进行交互时获取到的。
在本实施例中第一设备对所述TCP参数进行修改可以不需要与第二设备进行协商,第一设备例如可以是TCP数据流的发送端,此时第二设备为接收端;第一设备修改后,直接生成修改成功的修改结果。
本发明可以针对同一物理服务器上的不同TCP流进行灵活的修改,例如:网页浏览类应用,普遍都是小对象,可以把初始拥塞窗口设置与对象大小相当,而大的文件下载,可以把慢启动步幅以及超时重传以及快速恢复后的拥塞窗口调大,可以更快的下载大颗粒的文件。
通过本发明的方法把TCP彻底开放了,可以修改拥塞控制算法,以及TCP的所有参数,适用于众多的业务、用户和网络,以及不断变化的业务需求、用户需求和网络状况。例如:当同一物理服务器即服务第二代移动通信系统(Second Generation,简称2G)用户又服务光纤到户(Fiber To The Home,简称FTTH)光纤用户时,服务器可以基于不同的用户的TCP流设置不同的拥塞控制算法,例如:FTTH光纤用户使用CUBIC算法,当丢包发生时可以快速的恢复,这种算法的场景主要是面向当前的高速网络;而2G用户使用传统的拥塞控制算法,网络中拥塞产生丢包时,不会继续发送大量的包导致情况恶化,这种算法的场景主要是面向过去的低速网络。
本实施例,通过第一设备对数据流对应的TCP参数进行修改,生成所述数据传输协议的修改结果,实现了根据不同用户的不同业务的数据流来对与该数据流对应的数据传输协议TCP参数的修改,解决了现有技术中对TCP参数修改精度不高的问题。
本发明方法另一实施例中,在图1所示实施例的基础上,所述第一设备生成所述TCP参数的修改结果之前,还包括:
所述第一设备将数据传输协议协商请求消息发送至第二设备,所述数据传输协议协商请求消息包括所述修改后的TCP参数;所述数据传输协议协商请求消息用于请求所述第二设备判断所述修改后的TCP参数是否满足预设修改条件;
所述第一设备生成所述TCP参数的修改结果,包括:
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果。
可选地,所述数据传输协议协商请求消息为数据传输协议报文;所述修改后的TCP参数作为所述数据传输协议报文的选项。
具体来说,在本实施例中第一设备对所述TCP参数进行修改可以需要与第二设备进行协商,TCP参数如拥塞控制算法、初始拥塞窗口和接收窗口、慢启动ACK响应频率、拥塞避免ACK响应频率等。
例如:传统的拥塞控制算法都是基于低速网络来设计的,而二进制增加传输控制协议(BIC)、用于快速长距离网络的二进制增加的传输控制协议(CUBIC)、复合传输控制协议(compound TCP)都是基于高速网络来设计的,由于同一服务器服务的用户可能同时包括低速网络用户和高速网络用户,因此需基于不同用户来对TCP参数进行调整,满足不同用户的需求;另外针对不同的业务,可以设置不同的TCP参数,例如谷歌测试针对搜索引擎业务,TCP初始拥塞窗口(Initial Congestion Window,简称InitCwnd)设为16,延迟最小,而淘宝由于文件大小与谷歌不同,TCP InitCwnd设为7业务体验最佳。
第一设备对所述TCP参数进行修改后需要与第二设备进行协商,第二设备判断修改后的TCP参数是否满足预设条件,预设条件例如是修改后的TCP参数是否在第二设备所允许的范围内,第一设备例如可以是TCP数据流的发送端(如服务器),此时第二设备为接收端(客户端设备);协商时可以通过发送数据传输协议协商请求消息,所述数据传输协议协商请求消息中包括对所述修改后的TCP参数;第二设备判断后,进行反馈,发送反馈消息;第一设备接收到反馈消息之后,生成修改结果,若满足预设条件则生成修改成功的修改结果,否则生成修改失败的修改结果。
本发明方法另一实施例中,在图1所示实施例的基础上,步骤101中,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
所述第一设备生成所述数据流对应的第一套接字;
所述第一设备通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,获得修改后的TCP参数。
可选地,所述数据传输协议修改接口,包括:
通用套接字socket编程接口和新建应用程序接口API。
具体来说,第一设备对数据流对应的TCP参数进行修改可通过以下方法实现:第一设备生成数据流对应的第一套接字,通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,还可以通过其他方式如命令行或注册表实现对所述TCP参数进行修改。
通过所述第一套接字对应的数据传输协议修改接口修改方式中,可以采用通用的套接字socket编程接口,例如:int setsockopt(int s,int level,int optname,const void* optval,,socklen_toptlen)的函数来修改TCP的参数,还可以通过新建的应用程序接口API来修改TCP的参数。
可选地,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
下面采用具体的实施例,对图1所示方法实施例的技术方案进行详细说明。
可选地,当所述TCP参数为初始拥塞窗口时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述初始拥塞窗口进行修改,获得修改后的第一初始拥塞窗口,所述第一初始拥塞窗口是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一初始拥塞窗口后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述初始拥塞窗口的修改。
具体来说,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP初始拥塞窗口时,此时所述TCP参数为初始拥塞窗口,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述初始拥塞窗口修改为更适合的第一初始拥塞窗口,所述第一初始拥塞窗口可以是第一设备预设的。具体的第一初始拥塞窗口一般需结合需要传输的文件大小,发送端能力、 网络带宽等情况而确定。
第一设备选择合适的第一初始拥塞窗口后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述初始拥塞窗口的修改。
本实施例中是发送端单独修改TCP初始拥塞窗口,不需要与接收端进行协商。
可选地,当所述TCP参数为超时重传时的拥塞窗口时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述超时重传时的拥塞窗口进行修改,获得修改后的第一超时重传时的拥塞窗口,所述第一超时重传时的拥塞窗口是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一超时重传时的拥塞窗口后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述超时重传时的拥塞窗口的修改。
具体来说,TCP认为网络拥塞的主要依据是它重传了一个报文段。TCP对每一个报文段都有一个定时器,称为重传定时器(Retransmission Timeout,简称RTO),当RTO超时且还没有得到数据确认,那么TCP就会对该报文段进行重传,当发生超时时,那么出现拥塞的可能性就很大,某个报文段可能在网络中某处丢失,因此发生网络拥塞会对超时重传时的拥塞窗口进行修改。超时重传后会进入慢启动。
根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP超时重传时的拥塞窗口时,此时所述TCP参数为超时重传时的拥塞窗口,第一设备(如发送端)调用数据传输协议修改接口将所述第一业务对应的所述超时重传时的拥塞窗口修改为更适合的第一超时重传时的拥塞窗口,所述第一超时重传时的拥塞窗口可以是第一设备预设的。具体的第一超时重传时的拥塞窗口一般需结合需要传输的文件大小,发送端服务器能力、网络带宽等情况而确定。
第一设备选择合适的第一超时重传时的拥塞窗口后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述超时重传时的拥塞窗口的修改。
可选地,当所述TCP参数为快速恢复时的拥塞窗口时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述快速恢复时的拥塞窗口进行修改,获得修改后的第一快速恢复时的拥塞窗口,所述第一快速恢复时的拥塞窗口是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一快速恢复时的拥塞窗口后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述快速恢复时的拥塞窗口的修改。
具体来说,一般来说,重传发生在超时之后,但是如果发送端接收到3个以上的重复ACK,就应该意识到数据丢了,需要重新传递。这个机制不需要等到重传定时器溢出,所以叫做快速重传,而快速重传以后,因为走的不是慢启动而是拥塞避免算法,所以又叫做快速恢复算法。快速重传和快速恢复旨在:快速恢复丢失的数据包。
根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP快速恢复时的拥塞窗口时,此时所述待修改内容为快速恢复时的拥塞窗口,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述快速恢复时的拥塞窗口修改为更适合的第一快速恢复时的拥塞窗口,所述第一快速恢复时的拥塞窗口可以是第一设备预设的。具体的第一快速恢复时的拥塞窗口一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一快速恢复时的拥塞窗口后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述快速恢复时的拥塞窗口的修改。
可选地,当所述TCP参数为慢启动阈值时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述慢启动阈值进行修改,获得修改后的第一慢启动阈值,所述第一慢启动阈值是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一慢启动阈值后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述慢启动阈值的修改。
具体来说,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的慢启动阈值时,此时所述TCP参数为慢启动阈值,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述慢启动阈值修改为更适合的第一慢启动阈值,所述第一慢启动阈值可以是第一设备预设的。具体的第一慢启动阈值一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一慢启动阈值后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述慢启动阈值的修改。
可选地,当所述TCP参数为超时重传的慢启动阈值时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述超时重传的慢启动阈值进行修改,获得修改后的第一超时重传的慢启动阈值,所述第一超时重传的慢启动阈值是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一超时重传的慢启动阈值后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述超时重传的慢启动阈值的修改。
具体来说,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的超时重传的慢启动阈值时,此时所述待修改内容为超时重传的慢启动阈值,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述超时重传的慢启动阈值修改为更适合的第一超时重传的慢启动阈值,所述第一超时重传的慢启动阈值可以是第一设备预设的。具体的第一超时重传的慢启动阈值一般需结合需要传输的文件大小,发送端服务器能力、网络带宽等情况而确定。
第一设备选择合适的第一超时重传的慢启动阈值后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述超时重传的慢启动阈值的修改。
可选地,当所述TCP参数为快速恢复的拥塞窗口阈值时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述快速恢复的拥塞窗口阈值进行修改,获得修改后的为第一快速恢复的拥塞窗口阈值,所述第一快速恢复的拥塞窗口阈值是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一快速恢复的拥塞窗口阈值后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述快速恢复的拥塞窗口阈值的修改。
具体来说,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的快速恢复的拥塞窗口阈值时,此时所述待修改内容为快速恢复的拥塞窗口阈值,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述快速恢复的拥塞窗口阈值修改为更适合的第一快速恢复的拥塞窗口阈值,所述第一快速恢复的拥塞窗口阈值可以是第一设备预设的。具体的第一快速恢复的拥塞窗口阈值一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一快速恢复的拥塞窗口阈值后,生成所述修改结果,所述修 改结果表示所述第一设备已经完成对所述快速恢复的拥塞窗口阈值的修改。
可选地,当所述TCP参数为慢启动步幅时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述慢启动步幅进行修改,获得修改后的第一慢启动步幅,所述第一慢启动步幅是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一慢启动步幅后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述慢启动步幅的修改。
具体来说,慢启动步幅是发送端在慢启动时增加拥塞窗口的幅度,当前每次收到一个报文的ACK后,拥塞窗口加1,每个RTT时间段内,拥塞窗口以指数步幅增加,但是当时延大的网络中,如何减少慢启动时长;以及当超时重传时,发送端会再次进入慢启动阶段,如何适应网络的动态变化状况,这就需要根据实际情况对慢启动步幅进行修改。
根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的慢启动步幅时,此时所述TCP参数为慢启动步幅,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述慢启动步幅修改为更适合的第一慢启动步幅,所述第一慢启动步幅可以是第一设备预设的。具体的第一慢启动步幅一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一慢启动步幅后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述慢启动步幅的修改。
可选地,当所述TCP参数为拥塞避免步幅时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述拥塞避免步幅进行修改,获得修改后的第一拥塞避免步幅,所述第一拥塞避免步幅是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一拥塞避免步幅后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述拥塞避免步幅的修改。
具体来说,拥塞避免步幅是发送端在拥塞避免时增加拥塞窗口的幅度,当前每次收到一个报文的ACK后,拥塞窗口加1/Cwnd,每个RTT时间段内,拥塞窗口加1,但是当时延大的网络中,如何减少拥塞避免的时长,这就需要根据实际情况对拥塞避免步幅进行修改。
根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的拥塞避免步幅时,此时所述TCP参数为拥塞避免步幅,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述拥塞避免步幅修改为更适合的第一拥塞避免步幅,所述第一拥塞避免步幅可以是第一设备预设的。具体的第一拥塞避免步幅一般需结合需要传输的文件大小,发送端服务器能力、网络带宽等情况而确定。
第一设备选择合适的第一拥塞避免步幅后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述拥塞避免步幅的修改。
可选地,当所述TCP参数为慢启动ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述慢启动ACK响应频率进行修改,获得修改后的第一慢启动ACK响应频率,所述第一慢启动ACK响应频率是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一慢启动ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述拥塞避免步幅的修改。
具体来说,在本实施例中,慢启动ACK响应频率可以不需要跟第二设备协商,仅由第一设备决定,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的慢启动ACK响应频率时,此时所述TCP参数为慢启动ACK响应频率,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述慢启动ACK响应频率修改为更适合的第一慢启动ACK响应频率,所述第一慢启动ACK响应频率可以是第一设备预设的。具体的第一慢启动ACK响应频率一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一慢启动ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述慢启动ACK响应频率的修改。
可选地,当所述TCP参数为拥塞避免ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述拥塞避免ACK响应频率进行修改,获得修改后的第一拥塞避免ACK响应频率,所述第一拥塞避免ACK响应频率是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一拥塞避免ACK响应频率后,生成所述修改结果, 所述修改结果表示所述第一设备已经完成对所述拥塞避免ACK响应频率的修改。
具体来说,在本实施例中,拥塞避免ACK响应频率可以不需要跟第二设备协商,仅由第一设备决定,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的拥塞避免ACK响应频率时,此时所述TCP参数为拥塞避免ACK响应频率,第一设备(如发送端)调用数据传输协议修改接口将所述第一业务对应的所述拥塞避免ACK响应频率修改为更适合的第一拥塞避免ACK响应频率,所述第一拥塞避免ACK响应频率可以是第一设备预设的。具体的第一拥塞避免ACK响应频率一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一拥塞避免ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述拥塞避免ACK响应频率的修改。
可选地,当所述TCP参数为快速恢复ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述快速恢复ACK响应频率进行修改,获得修改后的第一快速恢复ACK响应频率,所述第一快速恢复ACK响应频率是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一快速恢复ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述快速恢复ACK响应频率的修改。
在本实施例中,快速恢复ACK响应频率可以不需要跟第二设备协商,仅由第一设备决定,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的快速恢复ACK响应频率时,此时所述TCP参数为快速恢复ACK响应频率,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述快速恢复ACK响应频率修改为更适合的第一快速恢复ACK响应频率,所述第一快速恢复ACK响应频率可以是第一设备预设的。具体的第一快速恢复ACK响应频率一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一快速恢复ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述快速恢复ACK响应频率的修改。
可选地,当所述TCP参数为正常传输ACK响应频率时,当所述TCP参数为正常传输ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述正常传输ACK响应频率进行修改,获得修改后的第一正常传输ACK响应频率,所述第一正常传输ACK响应频率是预设的;
所述第一设备生成所述TCP参数的修改结果包括:
当所述第一设备获得修改后的第一正常传输ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述快速恢复ACK响应频率的修改。
在本实施例中,正常传输ACK响应频率可以不需要跟第二设备协商,仅由第一设备决定,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的正常传输ACK响应频率时,此时所述TCP参数为正常传输ACK响应频率,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述正常传输ACK响应频率修改为更适合的第一正常传输ACK响应频率,所述第一正常传输ACK响应频率可以是第一设备预设的。具体的第一正常传输ACK响应频率一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一正常传输ACK响应频率后,生成所述修改结果,所述修改结果表示所述第一设备已经完成对所述正常传输ACK响应频率的修改。
图2为本发明数据传输方法一实施例的实现原理图一。
图3为本发明数据传输方法一实施例的报文格式示意图一。
可选地,当所述TCP参数为拥塞控制算法时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述拥塞控制算法进行修改,获得修改后的第一拥塞控制算法,所述第一拥塞控制算法是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送拥塞控制算法协商请求消息,所述拥塞控制算法协商请求消息包括所述第一拥塞控制算法,以便所述第二设备判断所述第一拥塞控制算法是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述数据传输协议的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一拥塞控制算法是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一拥塞控制算法满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一拥塞控制算法修改成功的修改结果;
若所述反馈消息表示所述第一拥塞控制算法不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一拥塞控制算法修改失败的修改结果。
具体来说,如图2所示,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改拥塞控制算法时,此时所述待修改内容为拥塞控制算法,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述拥塞控制算法修改为更适合的第一拥塞控制算法,所述第一拥塞控制算法可以是第一设备从预设的多种拥塞控制算法中选择的。
拥塞控制算法有多种,针对不同的网络,包括卫星、拨号上网等低速网络,也包括现在的高速互联网,同时也针对不同的业务,例如搜索引擎等小对象和文件下载等大的对象,具体包括:选择性应答(Selective Acknowledgement,简称SACK)、BIC、CUBIC、compound TCP、高速传输控制协议(High Speed Transmission Control Protoco,简称HSTCP)、显式流量控制协议(eXplicit Control Protocol,简称XCP)等算法。
第一设备选择合适的第一拥塞控制算法后,向所述第二设备发送拥塞控制算法协商请求消息,所述拥塞控制算法协商请求消息为包括所述第一拥塞控制算法的信息,以便所述第二设备判断所述第一拥塞控制算法是否满足预设条件,即第二设备是否支持该第一拥塞控制算法;此时数据传输协议协商请求消息具体为拥塞控制算法协商请求消息;
第一设备接收所述第二设备发送的反馈消息,所述反馈消息包括所述第一拥塞控制算法是否满足第二设备预设条件的消息,若所述反馈消息表示所述第一拥塞控制算法满足第二设备预设条件,则所述第一设备生成表示所述第一拥塞控制算法修改成功的修改结果;
若所述反馈消息表示所述第一拥塞控制算法不满足第二设备预设条件,则所述第一设备生成表示所述第一拥塞控制算法修改失败的修改结果。
图2中为发送端修改拥塞控制算法,开发者也可以在接收端修改拥塞控制算法,然后与发送端协商,把最终是否修改成功的消息告诉开发者。
拥塞控制算法协商请求消息和反馈消息的具体报文格式可以为如图3所示的报文格式,在TCP报文中增加拥塞控制算法选项(Congestion Control Algorithm Option),当然也可以作为TCP报文中的正式内容,即可以作为固定的一个字段用来指示拥塞控制算法。拥塞控制算法选项的内容如下表1中所示。
表1
拥塞控制算法选项 长度
拥塞控制算法协商请求消息 32比特 xx
反馈消息 xx xx
上表1中拥塞控制算法协商请求消息中的值“xx”可以为上述列出的一些拥塞控制算法,如XCP,或其他拥塞控制算法,长度也可以不为32比特,本发明并不限定;
反馈消息的长度以及值也可以根据实际需要确定。
图4为本发明数据传输方法一实施例的实现原理图二。
图5为本发明数据传输方法一实施例的报文格式示意图二。
可选地,当所述TCP参数为初始拥塞窗口和接收窗口时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述初始拥塞窗口进行修改,获得修改后的第一初始拥塞窗口,所述第一初始拥塞窗口是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送初始拥塞窗口请求消息,所述初始拥塞窗口请求消息包括第一初始拥塞窗口,以便所述第二设备判断将与所述第一初始拥塞窗口对应的接收窗口修改为第一接收窗口是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一接收窗口是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一接收窗口满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一初始拥塞窗口和所述第一接收窗口修改成功的修改结果;
若所述反馈消息表示所述第一接收窗口不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一初始拥塞窗口和所述第一接收窗口修改失败的修改结果。
具体来说,慢启动是TCP使用的一种拥塞控制机制,慢启动也叫做指数增长期。为了避免拥塞,慢启动为发送方的TCP增加了拥塞窗口(Congestion Window,简称Cwnd)。慢启动是指每次TCP发送端的拥塞窗口收到确认时都会增长。窗口增加的大小就是已确认报文段的数目。这种情况一直保持到要么没有收到一些段,要么窗口大小到达预先定义的阈值。如果发生丢失事件,TCP就认为这是网络阻塞,就会采取措施减轻网络拥挤。一旦发生丢失事件或者到达阈值,TCP就会进入线性增长阶段。这时,每经 过一个时间间隔(Round Trip Time,简称RTT)窗口增长一个报文段。
例如,当与另一个网络的主机建立TCP连接时,拥塞窗口可以被初始化为1个报文段(即另一端通告的报文段大小),即初始拥塞窗口为1个报文段。每收到一个ACK,拥塞窗口就增加一个报文段(Cwnd以字节为单位,但是慢启动以报文段大小为单位进行增加)。发送端取拥塞窗口与接收窗口(Receiver Window,简称Rwnd)中的最小值作为发送上限。拥塞窗口是发送方使用的流量控制,而接收窗口则是接收端使用的流量控制。初始拥塞窗口还可以根据实际情况进行修改。
如图4所示,根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP初始拥塞窗口时,此时所述TCP参数为初始拥塞窗口和接收窗口,第一设备(如发送端)调用数据传输协议修改接口将所述数据流对应的所述初始拥塞窗口修改为更适合的第一初始拥塞窗口,所述第一初始拥塞窗口可以是第一设备预设的。具体的第一初始拥塞窗口一般需结合需要传输的文件大小,发送端能力、网络带宽等情况而确定。
第一设备选择合适的第一初始拥塞窗口后,向所述第二设备(如接收端)发送初始拥塞窗口请求消息,所述初始拥塞窗口请求消息包括第一接收初始拥塞窗口,以便所述第二设备判断将与所述第一初始拥塞窗口对应的接收窗口修改为第一接收窗口是否满足预设条件,第一初始拥塞窗口可以是第一设备预设的,所述第一接收窗口与所述第一初始拥塞窗口是对应的,所述第一接收窗口大小可以与第一初始拥塞窗口相同,也可以不同,针对小文件,可以设置相同。此时数据传输协议协商请求消息具体为接收窗口协商请求消息。
第一设备接收所述第二设备发送的反馈消息,所述反馈消息包括所述第一接收窗口是否满足第二设备的预设修改条件的消息,若所述反馈消息表示所述第一接收窗口满足第二设备的预设修改条件,则所述第一设备生成表示所述第一初始拥塞窗口和第一接收窗口修改成功的修改结果;
若所述反馈消息表示所述第一接收窗口不满足第二设备的预设修改条件,则所述第一设备生成表示所述第一初始拥塞窗口和第一接收窗口修改失败的修改结果。
接收窗口协商请求消息和反馈消息的具体报文格式可以为如图5所示的报文格式,在TCP报文中增加初始拥塞窗口修改选项(Initial Cwnd Modify Option),当然也可以作为TCP报文中的正式内容,即可以作为固定的一个字段用来指示初始拥塞窗口。初始拥塞窗口修改选项的内容如下表2中所示。
表2
接收窗口修改选项 长度
初始拥塞窗口请求消息 32bit xx
反馈消息 32bit xx
上表2中初始拥塞窗口请求消息中的值“xx”可以为实际需要的任意长度的初始拥塞窗口,消息长度也可以不为32比特,本发明并不限定;
反馈消息的长度以及值也可以根据实际需要确定。
图6为本发明数据传输方法一实施例的实现原理图三。
图7为本发明数据传输方法一实施例的报文格式示意图三。
可选地,当所述TCP参数为慢启动ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述慢启动ACK响应频率进行修改,获得修改后的第一慢启动ACK响应频率,所述第一慢启动ACK响应频率是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送慢启动ACK响应频率协商请求消息,所述慢启动ACK响应频率协商请求消息包括所述第一慢启动ACK响应频率,以便所述第二设备判断所述第一慢启动ACK响应频率是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一慢启动ACK响应频率是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一慢启动ACK响应频率满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一慢启动ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一慢启动ACK响应频率不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一慢启动ACK响应频率修改失败的修改结果。
具体来说,慢启动时,例如初始时,发送方开始时发送一个报文段,然后等待ACK。当收到该ACK时,拥塞窗口从1增加为2,即可以发送两个报文段。当收到这两个报文段的ACK时,拥塞窗口就增加为4。这是一种指数增加的关系,拥塞窗口的增加依赖于ACK的响应频率,当前接收端每收到2个报文,就会发送1个ACK,当ACK丢失或者收到的报文数量少时,拥塞窗口增加变慢,导致慢启动时长增加,因此可以通过修改ACK响应频率来减少慢启动时长。
如图6所示,第一设备(如发送端)确认需要修改TCP慢启动ACK响应频率,此时所述TCP参数为慢启动ACK响应频率,调用数据传输协议修改接口将所述第一设备对应的数据流对应的所述慢启动ACK响应频率修改为当前业务合适的慢启动ACK响应频率,即第一慢启动ACK响应频率,所述第一慢启动ACK响应频率是预设的,具体的慢启动ACK响应频率一般结合需要传输的文件大小,发送端服务器能力、网络带宽等情况来确定。
第一设备向所述第二设备(如接收端)发送慢启动ACK响应频率协商请求消息,所述慢启动ACK响应频率协商请求消息为包括所述第一慢启动ACK响应频率,以便所述第二设备判断所述第一慢启动ACK响应频率是否满足预设修改条件;此时数据传输协议协商请求消息具体为慢启动ACK响应频率协商请求消息。
第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一慢启动ACK响应频率是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一慢启动ACK响应频率满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一慢启动ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一慢启动ACK响应频率不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一慢启动ACK响应频率修改失败的修改结果。
慢启动ACK响应频率协商请求消息和反馈消息的具体报文格式如图7所示的报文格式,在TCP报文中增加慢启动ACK响应频率选项(Slow Start ACK Frequency Option),当然也可以作为TCP报文中的正式内容,即可以作为固定的一个字段用来指示慢启动ACK响应频率。慢启动ACK响应频率选项的内容如下表3中所示。
表3
慢启动ACK响应频率选项 长度
慢启动ACK响应频率协商请求消息 xx xx
反馈消息 xx xx
上表3中慢启动ACK响应频率协商请求消息中的值“xx”可以为实际需要的任意ACK响应频率,消息长度也可以根据实际需要确定,如为32比特,本发明并不限定;
反馈消息的长度以及值也可以根据实际需要确定。
可选地,当所述TCP参数为拥塞避免ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述拥塞避免ACK响应频率进行修改,获得修改后的第一拥塞避免ACK响应频率,所述第一拥塞避免ACK响应频率是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送拥塞避免ACK响应频率协商请求消息,所述拥塞避免ACK响应频率协商请求消息包括所述第一拥塞避免ACK响应频率,以便所述第二设备判断所述第一拥塞避免ACK响应频率是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一拥塞避免ACK响应频率是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一拥塞避免ACK响应频率满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一拥塞避免ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一拥塞避免ACK响应频率不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一拥塞避免ACK响应频率修改失败的修改结果。
具体来说,从慢启动可以看到,Cwnd可以很快的增长上来,从而最大程度利用网络带宽资源,但是Cwnd不能一直这样无限增长下去,一定需要某个限制。TCP使用了一个叫慢启动阈值(Slow Start Threshold,SSThresh)的变量,当Cwnd超过该值后,慢启动过程结束,进入拥塞避免阶段。对于大多数TCP实现来说,SSThresh的值是65536(同样以字节计算)。拥塞避免的主要思想是加法增大,也就是说Cwnd的值不再指数级往上升,开始加法增加。此时当窗口中所有的报文段都被确认时,Cwnd的大小加1,Cwnd的值就随着RTT开始线性增加,这样就可以避免增长过快导致网络拥塞,慢慢的增加调整到网络的最佳值。
可以通过调整拥塞避免ACK响应频率来控制拥塞避免时拥塞窗口增加的速度。
本实施例中,第一设备(如发送端)根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的拥塞避免ACK响应频率,此时所述TCP参数为拥塞避免ACK响应频率,调用数据传输协议修改接口将所述数据流对应的所述拥塞避免ACK响应频率修改为当前业务合适的拥塞避免ACK响应频率,即第一拥塞避免ACK响应频率,所述第一拥塞避免ACK响应频率是预设的,具体的拥塞避免ACK响应频率一般结合需要传输的文件大小,发送端能力、网络带宽 等情况来确定。
第一设备向所述第二设备(如接收端)发送拥塞避免ACK响应频率协商请求消息,所述拥塞避免ACK响应频率协商请求消息为包括所述第一拥塞避免ACK响应频率,以便所述第二设备判断所述第一拥塞避免ACK响应频率是否满足预设修改条件;此时所述数据传输协议协商请求消息具体为拥塞避免ACK响应频率协商请求消息。
第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一拥塞避免ACK响应频率是否满足预设修改条件的消息,若所述反馈消息表示所述第一拥塞避免ACK响应频率满足预设修改条件,则所述第一设备生成表示所述第一拥塞避免ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一拥塞避免ACK响应频率不满足预设修改条件,则所述第一设备生成表示所述第一拥塞避免ACK响应频率修改失败的修改结果。
拥塞避免ACK响应频率协商请求消息和反馈消息的具体报文格式与慢启动ACK响应频率协商请求消息和反馈消息的类似,此处不再赘述。
可选地,当所述TCP参数为快速恢复ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述快速恢复ACK响应频率进行修改,获得修改后的第一快速恢复ACK响应频率,所述第一快速恢复ACK响应频率是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送快速恢复ACK响应频率协商请求消息,所述快速恢复ACK响应频率协商请求消息包括所述第一快速恢复ACK响应频率,以便所述第二设备判断所述第一快速恢复ACK响应频率是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一快速恢复ACK响应频率是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一快速恢复ACK响应频率满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一快速恢复ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一快速恢复ACK响应频率不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一快速恢复ACK响应频率修改失败的修改结果。
具体来说,TCP中还会有一种快速重传的情况:就是当收到3个相同的ACK的情况下。TCP利用3个相同的ACK来判定数据包的丢失,此时进行快速重传,快速重传时会重新设置SSThresh,以及拥塞窗口的大小,并重新进入拥塞避免阶段。快速恢复算法是在上述的快速重传算法基础上添加的,当收到3个重复ACK时,此时TCP最后进入的不是拥塞避免阶段,而是快速恢复阶段。快速重传和快速恢复算法一般同时使用。快速恢复的思想是“数据包守恒”原则,即同一个时刻在网络中的数据包数量是恒定的,只有当“老”数据包离开了网络后,才能向网络中发送一个“新”的数据包,如果发送方收到一个重复的ACK,那么根据TCP的ACK机制就表明有一个数据包离开了网络,于是Cwnd加1。如果能够严格按照该原则那么网络中就很少会发生拥塞。
快速恢复时,也会重新设置SSThresh,以及拥塞窗口的大小,当该恢复过程结束后,会再次进入拥塞避免状态。
快速恢复过程中可以通过调整快速恢复ACK响应频率来控制拥塞窗口增加的速度。
本实施例中,第一设备(如发送端)根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的快速恢复ACK响应频率,此时所述TCP参数为快速恢复ACK响应频率,调用数据传输协议修改接口将所述数据流对应的所述快速恢复ACK响应频率修改为当前业务合适的快速恢复ACK响应频率,即第一快速恢复ACK响应频率,所述第一快速恢复ACK响应频率是预设的,具体的快速恢复ACK响应频率一般结合需要传输的文件大小,发送端能力、网络带宽等情况来确定。
第一设备向所述第二设备(如接收端)发送快速恢复ACK响应频率协商请求消息,所述快速恢复ACK响应频率协商请求消息为包括所述第一快速恢复ACK响应频率,以便所述第二设备判断所述第一快速恢复ACK响应频率是否满足预设修改条件;此时所述数据传输协议协商请求消息具体为快速恢复ACK响应频率协商请求消息。
第一种设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一快速恢复ACK响应频率是否满足预设修改条件的消息,若所述反馈消息表示所述第一快速恢复ACK响应频率满足预设修改条件,则所述第一设备生成表示所述第一快速恢复ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一快速恢复ACK响应频率不满足预设修改条件,则所述第一设备生成表示所述第一快速恢复ACK响应频率修改失败的修改结果。
快速恢复ACK响应频率协商请求消息和反馈消息的具体报文格式与慢启动ACK响 应频率协商请求消息和反馈消息的类似,此处不再赘述。
可选地,当所述TCP参数为正常传输ACK响应频率时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述正常传输ACK响应频率进行修改,获得修改后的第一正常传输ACK响应频率,所述第一正常传输ACK响应频率是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送正常传输ACK响应频率协商请求消息,所述正常传输ACK响应频率协商请求消息包括所述第一正常传输ACK响应频率,以便所述第二设备判断所述第一正常传输ACK响应频率是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一正常传输ACK响应频率是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一正常传输ACK响应频率满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一正常传输ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一正常传输ACK响应频率不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一正常传输ACK响应频率修改失败的修改结果。
具体来说,TCP采用大小可变的滑动窗口(即发送窗口)进行流量控制,窗口大小的单位是字节。
发送窗口在连接建立时由双方商定,由拥塞窗口和接收窗口共同决定。发送窗口的上限值=Min[Rwnd,Cwnd],当Rwnd<Cwnd时,是接收端的接收能力限制发送窗口的最大值。当Cwnd<Rwnd时,则是网络的拥塞限制发送窗口的最大值。
若发送窗口为500字节,如果发送端已发送了400字节的数据,但只收到对前200字节数据的确认,同时窗口大小不变。由于发送窗口为500字节,因此还可发送300字节。
如果发送端收到了对方对前400字节数据的确认,但对方通知发送端接收窗口减小到400字节。现在发送端最多还可发送400字节的数据。
调整正常传输ACK响应频率,也即调整接收端发送ACK的频率,一般情况下接收端每收到2个报文就回应一个ACK,当然可以修改为每收到一个报文就回应一个ACK, 也可以在大量数据传输时减少ACK响应的频率,进而可以调整发送窗口的大小。
第一设备(如发送端)根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的正常传输ACK响应频率,此时所述TCP参数为正常传输ACK响应频率,调用数据传输协议修改接口将所述数据流对应的所述正常传输ACK响应频率修改为当前业务合适的正常传输ACK响应频率,即第一正常传输ACK响应频率,所述第一正常传输ACK响应频率是预设的,具体的正常传输ACK响应频率一般结合需要传输的文件大小,发送端服务器能力、网络带宽等情况来确定。
第一设备向所述第二设备(如接收端)发送正常传输ACK响应频率协商请求消息,所述正常传输ACK响应频率协商请求消息为包括所述第一正常传输ACK响应频率,以便所述第二设备判断所述第一正常传输ACK响应频率是否满足预设修改条件;此时所述数据传输协议协商请求消息具体为正常传输ACK响应频率协商请求消息。
第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一正常传输ACK响应频率的消息是否满足预设修改条件,若所述反馈消息表示所述第一正常传输ACK响应频率满足预设修改条件,则所述第一设备生成表示所述第一正常传输ACK响应频率修改成功的修改结果;
若所述反馈消息表示所述第一正常传输ACK响应频率不满足预设修改条件,则所述第一设备生成表示所述第一正常传输ACK响应频率修改失败的修改结果。
正常传输ACK响应频率协商请求消息和反馈消息的具体报文格式与慢启动ACK响应频率协商请求消息和反馈消息的类似,此处不再赘述。
图8为本发明数据传输方法一实施例的实现原理图七。
图9为本发明数据传输方法一实施例的报文格式示意图四。
可选地,当所述TCP参数为最大报文长度时,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
调用数据传输协议修改接口将所述数据流对应的所述最大报文长度进行修改,获得修改后的第一最大报文长度,所述第一最大报文长度是预设的;
所述第一设备将数据传输协议协商请求消息发送至第二设备包括:
所述第一设备向所述第二设备发送最大报文长度协商请求消息,所述最大报文长度协商请求消息包括所述第一最大报文长度,以便所述第二设备判断所述第一最大报文长度是否满足预设修改条件;
所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP 参数的修改结果包括:
所述第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一最大报文长度是否满足所述第二设备的预设修改条件的消息,若所述反馈消息表示所述第一最大报文长度满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一最大报文长度修改成功的修改结果;
若所述反馈消息表示所述第一最大报文长度不满足所述第二设备的预设修改条件,则所述第一设备生成表示所述第一最大报文长度修改失败的修改结果。
具体来说,当前TCP最大报文长度与发送端和接收端的链路的最大传输单元(Maximum Transmission Unit,简称MTU)强相关,忽略了中间网络中链路的MTU以及业务的需求。
MTU是指一种通信协议的某一层上面所能通过的最大数据报大小(以字节为单位)。如果发送端的MTU比网接收端的MTU不匹配,会增加丢包率,降低网络速度。
本实施例中,如图8所示,第一设备(如接收端)根据第一设备信息、第二设备信息、当前数据流承载的业务信息、网络状态信息中的至少一项确认出需要修改TCP的最大报文长度,此时所述TCP参数为最大报文长度,调用数据传输协议修改接口将所述数据流对应的所述最大报文长度修改为当前业务合适的最大报文长度,即第一最大报文长度,所述第一最大报文长度是预设的,具体的最大报文长度一般结合发送端接收端能力、网络带宽等情况来确定。
第一设备向所述第二设备(发送端)发送最大报文长度协商请求消息,所述最大报文长度协商请求消息为包括所述第一最大报文长度,以便所述第二设备判断所述第一最大报文长度是否满足预设修改条件;此时所述数据传输协议协商请求消息具体为最大报文长度协商请求消息。
第一设备接收所述第二设备发送的所述反馈消息,所述反馈消息包括所述第一最大报文长度是否满足预设修改条件的消息,若所述反馈消息表示所述第一最大报文长度满足预设修改条件,则所述第一设备生成表示所述第一最大报文长度修改成功的修改结果;
若所述反馈消息表示所述第一最大报文长度不满足预设修改条件,则所述第一设备生成表示所述第一最大报文长度修改失败的修改结果。
最大报文长度协商请求消息和反馈消息的具体报文格式如图9所示的报文格式,在TCP报文中增加最大报文长度修改选项(Max Packet Length Modify),当然也可以作为TCP报文中的正式内容,即可以作为固定的一个字段用来指示最大报文长度。最大报文 长度修改选项的内容如下表4中所示。
表4
最大报文长度修改选项 长度
最大报文长度协商请求消息 xx xx
反馈消息 xx xx
上表4中最大报文长度协商请求消息中的值“xx”可以为实际需要的任意报文长度,消息长度也可以根据实际需要确定,如为32比特,本发明并不限定;
反馈消息的长度以及值也可以根据实际需要确定。
本实施例,技术效果与上述实施例类似,此处不再赘述。
图10为本发明数据传输方法又一实施例的流程图。本实施例的执行主体为第二设备,第二设备可以为TCP的发送端、或接收端,即可以是服务器或客户端设备。如图10所示,本实施例提供数据传输方法,包括:
步骤1001、第二设备接收第一设备发送的数据传输协议协商请求消息,所述数据传输协议协商请求消息包括所述第一设备修改后的TCP参数。
步骤1002、所述第二设备判断所述修改后的TCP参数是否满足预设修改条件。
步骤1003、所述第二设备生成反馈消息,并向所述第一设备发送所述反馈消息。
可选地,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
本实施例,与图1所示实施例的实现原理及技术效果类似,此处不再赘述。
图11为本发明第一设备实施例一的结构示意图,如图11所示,本实施例的第一设备可以包括:判断模块1101、修改模块1102和生成模块1103;其中,判断模块1101,用于根据数据流信息判断数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息;
修改模块1102,用于所述判断模块判断出需要修改所述TCP参数,对所述TCP参数进行修改,获得修改后的TCP参数;
生成模块1103,用于生成所述TCP参数的修改结果。
可选地,还包括:
发送模块1104,用于将数据传输协议协商请求消息发送至第二设备,所述数据传输协议协商请求消息包括所述修改后的TCP参数;所述数据传输协议协商请求消息用于请求所述第二设备判断所述修改后的TCP参数是否满足预设修改条件;
接收模块1105,用于接收第二设备发送的反馈消息;所述生成模块1103,具体用于:
根据所述反馈消息生成所述TCP参数的修改结果。
可选地,所述数据传输协议协商请求消息为数据传输协议报文;所述修改后的TCP参数作为所述数据传输协议报文的选项。
可选地,所述修改模块1102,具体用于:
生成所述数据流对应的第一套接字;
通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,获得修改后的TCP参数。
可选地,所述数据传输协议修改接口,包括:
通用套接字socket编程接口和新建应用程序接口API。
可选地,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
本实施例的第一设备,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图12为本发明第二设备实施例一的结构示意图,如图12所示,本实施例的第二设备可以包括:接收模块1201、处理模块1202和发送模块1203;其中,接收模块1201,用于接收第一设备发送的数据传输协议协商请求消息,所述数据传输协议协商请求消息包括所述第一设备修改后的TCP参数;处理模块1202,用于判断所述修改后的TCP参数是否满足预设修改条件;发送模块1203,用于生成反馈消息,并向所述第一设备发送所述反馈消息。
可选地,发送模块1203还可以用于将第二设备的信息预先发送给第一设备,用于第一设备在根据数据流信息判断数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改。
可选地,所述TCP参数包括以下项目中的任意一项或多项:
初始拥塞窗口;
超时重传时的拥塞窗口;
快速恢复时的拥塞窗口;
慢启动阈值;
超时重传的慢启动阈值;
快速恢复的拥塞窗口阈值;
慢启动步幅;
拥塞避免步幅;
拥塞控制算法;
接收窗口;
慢启动ACK响应频率;
拥塞避免ACK响应频率;
快速恢复ACK响应频率;
正常传输ACK响应频率;
最大报文长度。
本实施例的第二设备,可以用于执行图10所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (14)

  1. 一种数据传输方法,其特征在于,包括:
    第一设备根据数据流信息判断所述数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息;
    若是,则所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数;
    所述第一设备生成所述TCP参数的修改结果。
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备生成所述TCP参数的修改结果之前,还包括:
    所述第一设备将数据传输协议协商请求消息发送至第二设备,所述数据传输协议协商请求消息包括所述修改后的TCP参数;所述数据传输协议协商请求消息用于请求所述第二设备判断所述修改后的TCP参数是否满足预设修改条件;
    所述第一设备生成所述TCP参数的修改结果,包括:
    所述第一设备接收第二设备发送的反馈消息,并根据所述反馈消息生成所述TCP参数的修改结果。
  3. 根据权利要求2所述的方法,其特征在于,所述数据传输协议协商请求消息为数据传输协议报文;所述修改后的TCP参数作为所述数据传输协议报文的选项。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述第一设备对所述TCP参数进行修改,获得修改后的TCP参数,包括:
    所述第一设备生成所述数据流对应的第一套接字;
    所述第一设备通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,获得修改后的TCP参数。
  5. 根据权利要求4所述的方法,其特征在于,所述数据传输协议修改接口,包括:
    通用套接字socket编程接口和新建应用程序接口API。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述TCP参数包括以下项目中的任意一项或多项:
    初始拥塞窗口;
    超时重传时的拥塞窗口;
    快速恢复时的拥塞窗口;
    慢启动阈值;
    超时重传的慢启动阈值;
    快速恢复的拥塞窗口阈值;
    慢启动步幅;
    拥塞避免步幅;
    拥塞控制算法;
    接收窗口;
    慢启动ACK响应频率;
    拥塞避免ACK响应频率;
    快速恢复ACK响应频率;
    正常传输ACK响应频率;
    最大报文长度。
  7. 一种第一设备,其特征在于,包括:
    判断模块,用于根据数据流信息判断所述数据流信息对应的数据流中的数据传输协议TCP参数是否需要修改;所述数据流信息包括以下信息中的至少一项:所述第一设备的信息、第二设备的信息、业务信息、网络状态信息;
    修改模块,用于所述判断模块判断出需要修改所述TCP参数,对所述TCP参数进行修改,获得修改后的TCP参数;
    生成模块,用于生成所述TCP参数的修改结果。
  8. 根据权利要求7所述的第一设备,其特征在于,还包括:
    发送模块,用于将数据传输协议协商请求消息发送至第二终端,所述数据传输协议协商请求消息包括所述修改后的TCP参数;所述数据传输协议协商请求消息用于请求所述第二终端判断所述修改后的TCP参数是否满足预设修改条件;
    接收模块,用于接收第二终端发送的反馈消息;
    所述生成模块,具体用于:
    根据所述反馈消息生成所述TCP参数的修改结果。
  9. 根据权利要求8所述的第一设备,其特征在于,所述数据传输协议协商请求消息为数据传输协议报文;所述修改后的TCP参数作为所述数据传输协议报文的选项。
  10. 根据权利要求7至9任一项所述的第一设备,其特征在于,所述修改模块,具体用于:
    生成所述数据流对应的第一套接字;
    通过所述第一套接字对应的数据传输协议修改接口对所述TCP参数进行修改,获 得修改后的TCP参数。
  11. 根据权利要求10所述的第一设备,其特征在于,所述数据传输协议修改接口,包括:
    通用套接字socket编程接口和新建应用程序接口API。
  12. 根据权利要求9至11任一项所述的第一设备,其特征在于,所述TCP参数包括以下项目中的任意一项:
    初始拥塞窗口;
    超时重传时的拥塞窗口;
    快速恢复时的拥塞窗口;
    慢启动阈值;
    超时重传的慢启动阈值;
    快速恢复的拥塞窗口阈值;
    慢启动步幅;
    拥塞避免步幅;
    拥塞控制算法;
    接收窗口;
    慢启动ACK响应频率;
    拥塞避免ACK响应频率;
    快速恢复ACK响应频率;
    正常传输ACK响应频率;
    最大报文长度。
  13. 一种第二设备,其特征在于,包括:
    接收模块,用于接收第一设备发送的数据传输协议协商请求消息,所述数据传输协议协商请求消息包括所述第一设备修改后的TCP参数;
    处理模块,用于判断所述修改后的TCP参数是否满足预设修改条件;
    发送模块,用于生成反馈消息,并向所述第一设备发送所述反馈消息。
  14. 根据权利要求13所述的第二设备,其特征在于,所述TCP参数包括以下项目中的任意一项或多项:
    初始拥塞窗口;
    超时重传时的拥塞窗口;
    快速恢复时的拥塞窗口;
    慢启动阈值;
    超时重传的慢启动阈值;
    快速恢复的拥塞窗口阈值;
    慢启动步幅;
    拥塞避免步幅;
    拥塞控制算法;
    接收窗口;
    慢启动ACK响应频率;
    拥塞避免ACK响应频率;
    快速恢复ACK响应频率;
    正常传输ACK响应频率;
    最大报文长度。
PCT/CN2015/088794 2014-12-19 2015-09-01 数据传输方法和装置 WO2016095568A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020177019590A KR102061772B1 (ko) 2014-12-19 2015-09-01 데이터 전송 방법 및 장치
JP2017532653A JP6644791B2 (ja) 2014-12-19 2015-09-01 データ伝送方法及び装置
EP15869079.2A EP3226507B1 (en) 2014-12-19 2015-09-01 Data transmission method and apparatus
US15/625,638 US10560382B2 (en) 2014-12-19 2017-06-16 Data transmission method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410799680.8A CN105763474B (zh) 2014-12-19 2014-12-19 数据传输方法和装置
CN201410799680.8 2014-12-19

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/625,638 Continuation US10560382B2 (en) 2014-12-19 2017-06-16 Data transmission method and apparatus

Publications (1)

Publication Number Publication Date
WO2016095568A1 true WO2016095568A1 (zh) 2016-06-23

Family

ID=56125840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088794 WO2016095568A1 (zh) 2014-12-19 2015-09-01 数据传输方法和装置

Country Status (6)

Country Link
US (1) US10560382B2 (zh)
EP (1) EP3226507B1 (zh)
JP (1) JP6644791B2 (zh)
KR (1) KR102061772B1 (zh)
CN (1) CN105763474B (zh)
WO (1) WO2016095568A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11871265B2 (en) 2018-01-18 2024-01-09 Samsung Electronics Co., Ltd Method and an electronic device for dynamically controlling TCP congestion window

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10165530B2 (en) * 2016-03-22 2018-12-25 Christoph RULAND Verification of time information transmitted by time signals or time telegrams
US10848602B2 (en) * 2016-07-08 2020-11-24 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for implementing congestion control negotiation
CN106385376B (zh) * 2016-08-31 2019-06-07 孙广路 一种基于连续化模型的网络拥塞控制方法
US10419354B2 (en) * 2017-01-27 2019-09-17 Verizon Patent And Licensing Inc. Congestion avoidance over a transmission control protocol (TCP) flow that involves one or more devices using active queue management (AQM), based on one or more TCP state conditions
CN110912831B (zh) * 2018-09-17 2023-04-18 中兴通讯股份有限公司 Tcp传输方法、装置及存储介质
US11122019B2 (en) * 2019-09-13 2021-09-14 Oracle International Corporation Systems and methods for client collaborated migration of live TLS connection
CN112866133B (zh) * 2019-11-26 2023-07-28 华为技术有限公司 用于获取共用最大分段大小mss的方法及装置
US11438272B2 (en) * 2019-12-31 2022-09-06 Opanga Networks, Inc. System and method for mobility tracking
CN111817886B (zh) * 2020-06-29 2023-12-26 新华三信息安全技术有限公司 一种获取管理对象数据的方法及设备
CN113873571A (zh) * 2020-06-30 2021-12-31 华为技术有限公司 一种拥塞控制方法及相应设备
CN112822230B (zh) * 2020-12-28 2022-03-25 南京大学 一种基于概率的发送端初始速率设置方法和系统
CN115150307B (zh) * 2022-06-30 2023-12-22 珠海天融信网络安全技术有限公司 采集频率安全检测的方法、装置、存储介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764184A (zh) * 2005-10-20 2006-04-26 中兴通讯股份有限公司 一种实时流媒体通讯传输系统和方法
US20070226375A1 (en) * 2006-03-23 2007-09-27 Chu Hsiao-Keng J Plug-in architecture for a network stack in an operating system
CN102404187A (zh) * 2010-09-13 2012-04-04 华为技术有限公司 拥塞控制方法和系统以及网络设备
CN103647759A (zh) * 2013-11-26 2014-03-19 华为技术有限公司 一种mss的协商方法及装置

Family Cites Families (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09214547A (ja) * 1996-01-30 1997-08-15 Nec Eng Ltd パケット通信方式及びそのウィンドウサイズ変更方式
US6381215B1 (en) * 1998-06-29 2002-04-30 Microsoft Corporation Method and computer program product for efficiently and reliably sending small data messages from a sending system to a large number of receiving systems
JP2001189754A (ja) * 1999-12-28 2001-07-10 Toshiba Corp QoS提供方式、ルータ装置、QoSサーバ、ユーザ端末及びQoS提供方法
JP4126928B2 (ja) * 2002-02-28 2008-07-30 日本電気株式会社 プロキシサーバ及びプロキシ制御プログラム
US7310682B2 (en) * 2004-01-08 2007-12-18 Lsi Corporation Systems and methods for improving network performance
US7478160B2 (en) * 2004-04-30 2009-01-13 International Business Machines Corporation Method and apparatus for transparent negotiations
WO2006045345A2 (en) * 2004-10-29 2006-05-04 Ntt Docomo, Inc. Method and apparatus for switching between different protocol implementations
US20070226347A1 (en) * 2006-03-23 2007-09-27 Chu Hsiao-Keng J Method and apparatus for dynamically changing the TCP behavior of a network connection
CN101102157B (zh) * 2006-07-03 2011-06-22 华为技术有限公司 发送终端和数据发送方法
US8418016B2 (en) * 2006-10-05 2013-04-09 Ntt Docomo, Inc. Communication system, communication device, and communication method
JP2008118281A (ja) * 2006-11-01 2008-05-22 Fujitsu Ltd 通信装置
KR100846344B1 (ko) * 2007-01-05 2008-07-15 삼성전자주식회사 이동통신 시스템에서 전송 제어 프로토콜의 전송 지연을줄이기 위한 장치 및 방법
CN101146124B (zh) * 2007-08-30 2012-02-08 中兴通讯股份有限公司 基于服务质量的分组数据协议配置参数的选择装置和方法
JP2009152953A (ja) * 2007-12-21 2009-07-09 Nec Corp ゲートウェイ装置およびパケット転送方法
JP4969483B2 (ja) * 2008-02-22 2012-07-04 三菱電機株式会社 無線通信装置及び無線通信方法及びプログラム
JP5014281B2 (ja) 2008-07-30 2012-08-29 パナソニック株式会社 Tcp送信制御装置及びtcp送信制御方法
WO2010082091A2 (en) * 2009-01-16 2010-07-22 Mainline Net Holdings Limited Maximizing bandwidth utilization in networks with high latencies and packet drops using transmission control protocol
CN101662842B (zh) * 2009-10-09 2012-01-11 天津大学 一种应用于无线自组织网络的tcp参数调节方法
US8873385B2 (en) * 2010-12-07 2014-10-28 Microsoft Corporation Incast congestion control in a network
EP2530898B1 (en) * 2011-06-03 2014-02-12 Alcatel Lucent Method and apparatus for mitigating buffering delay at a network edge
JP5923376B2 (ja) * 2012-04-27 2016-05-24 株式会社日立製作所 Tcp中継装置
US9300766B2 (en) * 2012-07-31 2016-03-29 At&T Intellectual Property I, L.P. Method and apparatus for initiating and maintaining sessions between endpoints
JP2014057149A (ja) * 2012-09-11 2014-03-27 Toshiba Corp 通信装置、中継装置および通信方法
US8711690B2 (en) * 2012-10-03 2014-04-29 LiveQoS Inc. System and method for a TCP mapper
KR101419437B1 (ko) 2012-11-15 2014-07-14 (주)씨디네트웍스 데이터 가속 알고리즘을 선택하여 콘텐츠를 제공하는 방법 및 장치
CN103079232A (zh) * 2013-01-16 2013-05-01 大唐移动通信设备有限公司 一种确定报文的最大容量的方法及装置
US20140281018A1 (en) * 2013-03-13 2014-09-18 Futurewei Technologies, Inc. Dynamic Optimization of TCP Connections
JP6015509B2 (ja) * 2013-03-19 2016-10-26 富士通株式会社 パケット解析プログラム、パケット解析方法、パケット解析装置、およびパケット解析システム
US20140355623A1 (en) * 2013-06-03 2014-12-04 Futurewei Technologies, Inc. Transmission Control Protocol (TCP) Connection Control Parameter In-Band Signaling
US9716667B2 (en) * 2014-08-29 2017-07-25 Intel IP Corporation Communication terminal and method for controlling a data transmission

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764184A (zh) * 2005-10-20 2006-04-26 中兴通讯股份有限公司 一种实时流媒体通讯传输系统和方法
US20070226375A1 (en) * 2006-03-23 2007-09-27 Chu Hsiao-Keng J Plug-in architecture for a network stack in an operating system
CN102404187A (zh) * 2010-09-13 2012-04-04 华为技术有限公司 拥塞控制方法和系统以及网络设备
CN103647759A (zh) * 2013-11-26 2014-03-19 华为技术有限公司 一种mss的协商方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3226507A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11871265B2 (en) 2018-01-18 2024-01-09 Samsung Electronics Co., Ltd Method and an electronic device for dynamically controlling TCP congestion window

Also Published As

Publication number Publication date
JP2018500827A (ja) 2018-01-11
CN105763474B (zh) 2019-10-25
CN105763474A (zh) 2016-07-13
KR20170097129A (ko) 2017-08-25
JP6644791B2 (ja) 2020-02-12
US20170289041A1 (en) 2017-10-05
EP3226507B1 (en) 2020-02-05
US10560382B2 (en) 2020-02-11
KR102061772B1 (ko) 2020-01-02
EP3226507A4 (en) 2017-10-25
EP3226507A1 (en) 2017-10-04

Similar Documents

Publication Publication Date Title
WO2016095568A1 (zh) 数据传输方法和装置
US11477130B2 (en) Transmission control method and apparatus
JP6526825B2 (ja) 伝送制御プロトコルtcpデータパケットを送信する方法及び装置、並びにシステム
US10715282B2 (en) Method and related device for improving TCP transmission efficiency using delayed ACK
JP5020076B2 (ja) 低頻度ackのシステムに適した高性能tcp
WO2015143984A1 (zh) 一种传输控制方法、装置及系统
CN109412946B (zh) 一种确定回源路径的方法、装置、服务器及可读存储介质
US11743192B2 (en) Managing transmission control protocol (TCP) traffic
WO2017092609A1 (zh) 具有分等级配置的加速策略的网络传输加速方法和系统
Abdelmoniem et al. Reconciling mice and elephants in data center networks
CN112583874A (zh) 异构网络的报文转发方法及装置
CN104683259A (zh) Tcp拥塞控制方法及装置
CN106789229A (zh) 一种面向工业sdn的中间件、系统及其实现方法
WO2017107148A1 (zh) 一种数据传输方法及网络侧设备
JP4229807B2 (ja) データ転送方法とtcpプロキシ装置およびそれを用いたネットワークシステム
CN104580171B (zh) Tcp协议的传输方法、装置和系统
CN106100797B (zh) 一种基于ltp异步加速重传策略的深空文件传输方法
KR101231793B1 (ko) Tcp 세션 최적화 방법 및 네트워크 노드
Zhang et al. Research on TCP Congestion Control Mechanisms
Kumar Modified TCP for time critical applications
Petrov et al. Novel Slow Start Algorithm
Van Beijnum et al. OmTCP: increasing performance in server farms
Chen et al. An enhanced TCP for satellite network with intermittent connectivity and random losses
Wan et al. Research on TCP Optimization Key Technology of Web Application Acceleration

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15869079

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017532653

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2015869079

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20177019590

Country of ref document: KR

Kind code of ref document: A