WO2015180426A1 - 一种数据传输方法、装置及系统 - Google Patents

一种数据传输方法、装置及系统 Download PDF

Info

Publication number
WO2015180426A1
WO2015180426A1 PCT/CN2014/091382 CN2014091382W WO2015180426A1 WO 2015180426 A1 WO2015180426 A1 WO 2015180426A1 CN 2014091382 W CN2014091382 W CN 2014091382W WO 2015180426 A1 WO2015180426 A1 WO 2015180426A1
Authority
WO
WIPO (PCT)
Prior art keywords
quota
data
request
switch
data end
Prior art date
Application number
PCT/CN2014/091382
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 华为技术有限公司
Publication of WO2015180426A1 publication Critical patent/WO2015180426A1/zh

Links

Images

Definitions

  • the present invention relates to the field of communications, and in particular, to a data transmission method, apparatus, and system.
  • Data Center Ethernet also known as CEE (Converged Enhanced Ethernet).
  • CEE Converged Enhanced Ethernet
  • 802.1Qbb PFC Primary Flow Control Priority Based Traffic Control Standard
  • 802.1Qau QCN Quality of Service Notification End-to-End Congestion Management Standard
  • the PFC defines a priority flow control, specifically, dividing eight virtual channels on one physical link, and assigning a priority to each virtual channel, thereby making virtual priorities with different priorities. Channels can be used to transfer different data.
  • the receiving end may send an open frame/close frame on the virtual channel with a specific priority to continue/suppress the transmission of data on the virtual channel with a specific priority, thereby ensuring high priority data. transmission.
  • the foregoing QCN defines a congestion notification mechanism. Specifically, when congestion occurs in the network, the source of the congestion can notify the source of the source data end to reduce the transmission rate, thereby attempting to solve network congestion and attempting to implement data lossless transmission.
  • Embodiments of the present invention provide a data transmission method, apparatus, and system, which solve the problem that the prior art cannot guarantee lossless transmission of data.
  • the present invention provides a data transmission method, including:
  • the source data end sends a quota request, where the quota request is used to request the switch along the destination and the target data end to allocate a quota for the data to be sent to the target data end by the source data end, where the quota is used to cache the data,
  • the switch along the path includes all the switches that need to pass from the source data end to the target data end;
  • the source data end receives a quota response corresponding to the quota request, and the quota response is used to indicate whether the switch along the destination and the target data end allocate the quota for the data;
  • the source data end sends the data.
  • the method further includes:
  • the source data end resends the quota request.
  • the quota response is a quota grant or a quota rejection
  • the quota is used to indicate that the switch along the destination and the target data end allocates the quota for the data, and the quota rejection is used to represent that one switch or the target data end of the switch along the path is not
  • the data is allocated to the quota.
  • the data is a packet queue that is composed of multiple Ethernet packets, and the quota request includes an application quota amount.
  • the source data end resends the quota request, including:
  • the source data terminal subtracts the amount of the application quota required for the first Ethernet packet from the application quota amount in the quota request, to obtain the first application quota amount, where the first Ethernet packet is located in the The message at the end of the message queue;
  • the source data end resends the quota request, where the quota request includes the first application quota amount.
  • the second If the Ethernet packet is the packet at the beginning of the packet queue, the source data end resends the quota request, including:
  • the source data end resends the quota request one time after the source data end receives the quota rejection.
  • the data includes multiple Ethernet packets, and the quota request includes an application quota amount.
  • the source data end resends the quota request, including:
  • the source data end resends the quota request, where the quota request includes an application quota amount required by the multiple Ethernet packets.
  • the method further includes:
  • the source data end After the source data end does not receive the quota response, the source data end is after the first preset time, in the first preset time after the source data end sends the quota request. Resend the quota request.
  • the source data end is Send the data, including:
  • the source data end sends the data by the source data end within a second preset time after receiving the quota response.
  • the source data end sends Before the quota request, the method further includes:
  • the source data end receives a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request;
  • the source data end sends a quota request, including:
  • the source data end sends the quota request according to the trigger quota request.
  • the trigger quota request includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request further includes a valid time of the application quota amount, and is used to request the switch along the path and the target data end to reserve the validity time of the application quota amount.
  • the quota request is an emergency quota request, when the cached data in the source data end occupies the cache of the source data end is greater than a first preset threshold
  • the source data end sends a quota request, and the source data end receives a quota response corresponding to the quota request, including:
  • the source data end receives the quota response corresponding to the emergency quota request.
  • the present invention also provides a data transmission method, including:
  • the first switch receives a quota request, and the quota request is used to request a data distribution quota for the data source to be sent to the target data end by the source switch and the target data end, where the quota is used to cache the data, and the switch is used to cache the data. Included from the source data end to all the switches that need to pass through the target data end, the first switch is one of the switches along the path;
  • the first switch If there is an idle quota in the first switch, the first switch:
  • the method further includes:
  • the first switch If there is no idle quota in the first switch, the first switch replies with a first quota rejection corresponding to the quota request, and discards the quota request, where the first quota rejection is used to represent the first quota The switch does not allocate the quota for the data.
  • the quota response is a quota grant or a quota rejection, wherein
  • the quota is used to indicate that the switch along the destination and the target data end allocates the quota for the data, and the quota rejection is used to represent that one switch or the target data end of the switch along the path is not
  • the data is allocated to the quota.
  • the first switch is configured according to After the quota request allocates the quota to the data, the method further includes:
  • the first switch After the first preset time, the first switch checks whether the data is cached in the quota
  • the first switch reclaims the quota.
  • the first switch forwarding After the data the method further includes:
  • the first switch reclaims the quota.
  • the method further includes:
  • the first switch reclaims the quota.
  • the first switch receives Before the quota request, the method further includes:
  • the first switch receives a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request, where the trigger quota request includes an idle quota amount and a valid time of the trigger quota request;
  • the first switch forwards the trigger quota request.
  • the quota request includes an application quota amount and a valid time of the application quota amount, and is used for requesting the switch along the route and the target data end to reserve the application quota amount for the effective time of the application quota amount.
  • the first switch receives the quota request, including:
  • the first switch receives the emergency quota request, and the emergency quota request is sent by the source data end when the cached data of the source data end is larger than the first preset threshold.
  • the method further includes:
  • the first switch If there is no idle quota in the first switch, the first switch:
  • the quota is allocated for the data according to the emergency quota request
  • the method further includes:
  • the quota is allocated for the data according to the emergency quota request.
  • the first switch When the quota response indicates that the target data end does not allocate the quota for the data, and the first switch does not allocate the quota for the data, the first switch forwards the quota response, and Discard the emergency quota request.
  • the present invention also provides a data transmission method, including:
  • the target data end receives a quota request, and the quota request is used to request the data exchange quota that the source data end needs to send to the target data end, and the quota is used to cache the data.
  • the switch along the path includes all the switches that need to pass from the source data end to the target data end;
  • the target data end allocates the quota for the data according to the quota request, and replies with a quota grant corresponding to the quota request, and receives the data.
  • Quota allowance is used to characterize the en route The switch and the target data end allocate the quota for the data.
  • the method further includes:
  • the target data end replies with a quota rejection, and the quota rejection is used to indicate that the target data end does not allocate the quota for the data.
  • the target data end allocates the quota to the data according to the quota request.
  • the method also includes:
  • the target data end checks whether the data is cached in the quota
  • the target data end reclaims the quota.
  • the target data terminal receives After the data, the method further includes:
  • the target data end saves the data to local memory
  • the target data end recovers the quota.
  • the target data end receives Before the quota request, the method further includes:
  • the target data end sends a trigger quota request, and the trigger quota request is used to trigger the source data end to send the quota request.
  • the trigger quota request includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request includes an application quota amount and a valid time of the application quota amount, and is used for requesting the switch along the route and the target data end to reserve the application quota amount for the effective time of the application quota amount.
  • the target data end receives Quota requests, including:
  • the target data end receives the emergency quota request, and the emergency quota request is sent by the source data end when the buffered data in the source data end occupies the buffer of the source data end that is greater than a first preset threshold.
  • the present invention provides a data transmission apparatus, including:
  • a sending unit configured to send a quota request, where the quota request is used to request a switch and a destination data end to allocate a quota for data to be sent by the data transmission device to the target data end, where the quota is used to cache the data,
  • the switch along the path includes all switches that need to pass from the data transmission device to the target data end;
  • a receiving unit configured to receive a quota response corresponding to the quota request sent by the sending unit, where the quota response is used to indicate whether the switch along the destination and the target data end allocate the quota for the data;
  • the sending unit is further configured to: if the quota response received by the receiving unit indicates that the switch along the path and the target data end allocate the quota for the data, send the data.
  • the sending unit is further configured to resend the quota if the quota response received by the receiving unit indicates that one switch or the target data end of the switch along the switch does not allocate the quota for the data request.
  • the quota response received by the receiving unit is a quota grant or a quota rejection, where
  • the quota is permitted to be used to characterize the switch along the path and the target data end
  • the data allocates the quota, the quota rejection being used to characterize that one of the switches along the way or the target data end does not allocate the quota for the data.
  • the data transmission apparatus further includes a processing unit, where the data is a packet queue consisting of multiple Ethernet packets.
  • the quota request sent by the sending unit includes an application quota amount
  • the processing unit is configured to subtract the amount of the application quota required for the first Ethernet packet from the quota of the quota in the quota request, to obtain the first application quota, the first Ethernet packet. a packet located at the end of the message queue;
  • the sending unit is specifically configured to resend the quota request, where the quota request includes the first application quota amount.
  • the sending unit is specifically configured to: if the application quota quantity in the quota request is an application quota quantity required for the second Ethernet packet, the second Ethernet packet is a report located at the head of the message queue And resending the quota request within one time after the receiving unit receives the quota rejection.
  • the data includes multiple Ethernet packets, and the quota request sent by the sending unit includes an application quota amount.
  • the sending unit is specifically configured to resend the quota request, where the quota request includes an application quota amount required by the multiple Ethernet packets.
  • the sending unit is further configured to resend the first preset time after the receiving unit does not receive the quota response within a first preset time after sending the quota request. Quota request.
  • the sending unit is specifically configured to send the data in a second preset time after the receiving unit receives the quota response.
  • the receiving unit is further configured to: before the sending unit sends the quota request, receive a trigger quota request, where the trigger quota request is used to trigger the data transmission apparatus to send the quota request;
  • the sending unit is specifically configured to send the quota request according to the trigger quota request received by the receiving unit.
  • the trigger quota request received by the receiving unit includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request sent by the sending unit further includes a valid time of the application quota amount, and is used for requesting the switch along the destination and the target data end to reserve the effective time of the application quota amount .
  • the sending unit is configured to send an emergency quota request when the data buffered by the data transmission device occupies a cache of the data transmission device that is greater than a first preset threshold;
  • the receiving unit is specifically configured to receive the quota response corresponding to the emergency quota request sent by the sending unit.
  • the present invention further provides a data transmission apparatus, including:
  • a receiving unit configured to receive a quota request, and receive a quota response corresponding to the quota request, and receive data that the source data end needs to send to the target data end, where the quota request is used to request the data transmission device and the target data along the path
  • the data is divided into Allocating a quota, the quota is used for buffering the data, and the data transmission device along the path includes all data transmission devices that need to pass from the source data end to the target data end, and the data transmission device is the data along the way a data transmission device in the transmission device, wherein the quota response is used to characterize whether the data transmission device along the destination and the target data terminal allocate the quota for the data, the data being When the data transmission device and the target data end allocate the quota for the data, the source data end sends;
  • An allocating unit configured to allocate the quota to the data according to the quota request received by the receiving unit if there is an idle quota in the data transmission device;
  • the sending unit is configured to forward the quota request, forward the quota response, and forward the data.
  • the data transmission apparatus further includes a discarding unit
  • the sending unit is further configured to: if there is no idle quota in the data transmission device, reply to a first quota rejection corresponding to the quota request received by the receiving unit, where the first quota rejection is used to represent the The data transmission device does not allocate the quota for the data;
  • the discarding unit is configured to discard the quota request received by the receiving unit.
  • the quota response received by the receiving unit is a quota grant or a quota rejection, where
  • the quota is used to characterize the data transmission device along the destination and the target data end to allocate the quota for the data
  • the quota rejection is used to characterize a data transmission device or the data transmission device in the data transmission device
  • the target data end does not allocate the quota for the data.
  • the data transmission device further Including the processing unit
  • the processing unit is configured to check, after the first preset time, whether the data is cached in the quota, and if the allocation unit allocates the quota to the data according to the quota request. If the data is not cached in the quota, the quota is reclaimed.
  • the processing unit is further configured to recover the quota after the sending unit forwards the data.
  • the processing unit is further configured to: if the quota response received by the receiving unit is the quota rejection, recover the quota.
  • the receiving unit is further configured to: before receiving the quota request, receive a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request, where the trigger quota request includes an idle quota amount and a location Describe the effective time for triggering the quota request;
  • the sending unit is further configured to forward the trigger quota request received by the receiving unit.
  • the quota request received by the receiving unit includes an application quota amount and an effective time of the application quota amount, and is configured to request the data transmission device along the destination and the target data terminal to retain the application quota amount The effective time of the quota amount.
  • the receiving unit is specifically configured to receive an emergency quota request, where the emergency quota is requested And sending, by the source data end, when the cached data in the source data end occupies a buffer of the source data end that is greater than a first preset threshold.
  • the data transmission device further includes a processing unit
  • the processing unit is configured to record the emergency quota request received by the receiving unit if there is no idle quota in the data transmission device, and receive, by the receiving unit, corresponding to the emergency quota request Resolving the quota when the quota response indicates that the target data end does not allocate the quota for the data;
  • the sending unit is further configured to forward the emergency quota request received by the receiving unit, and when the quota response received by the receiving unit is characterized by the data transmission device along the path and the target data end being the data When the quota is allocated, forwarding the quota response and forwarding the data;
  • the receiving unit is further configured to receive the quota response and receive the data
  • the allocating unit is further configured to allocate the quota for the data according to the emergency quota request received by the receiving unit when an idle quota occurs in the data transmission device.
  • the data transmission apparatus further includes a discarding unit
  • the processing unit is further configured to: when the quota response received by the receiving unit represents all data transmission devices and the target data end that need to pass between the data transmission device and the target data terminal, the data is When the quota is allocated, and the data transmission device does not allocate the quota for the data, set a quota allocation identifier according to the quota response, and generate a quota permission, where the quota allocation identifier is used to identify the data transmission All switches and the target data end to pass between the device and the target data end allocate the quota for the data, the quota permitting to characterize the data transmission device, the data transmission device, and the All data transmission means and the target data end to pass between the target data ends allocate the quota for the data and the target data end allocates the quota for the data.
  • the discarding unit is configured to discard the quota response received by the receiving unit
  • the allocating unit is further configured to wait for the idle quota in the data transmission device to allocate the quota to the data according to the emergency quota request received by the receiving unit.
  • the receiving unit is further configured to receive the data
  • the sending unit is further configured to send the quota permission, and forward the data received by the receiving unit;
  • the sending unit is further configured to: when the quota response indicates that the target data end does not allocate the quota for the data, and the data transmission device does not allocate the quota for the data, forward the quota response,
  • the discarding unit is configured to discard the emergency quota request received by the receiving unit.
  • the present invention provides a data transmission apparatus, including:
  • a receiving unit configured to receive a quota request, and receive data that is sent by the source data end to the data transmission device, where the quota request is used to request a switch along the path and the data transmission device to allocate a quota for the data, where the quota is For buffering the data, the switch along the path includes all switches from the source data end to the data transmission device;
  • An allocating unit configured to allocate the quota to the data according to the quota request received by the receiving unit if there is an idle quota in the data transmission device;
  • a sending unit configured to reply to a quota grant corresponding to the quota request received by the receiving unit, where the quota is used to indicate that the switch along the path and the data transmission device allocate the quota for the data.
  • the sending unit is further configured to: if there is no idle quota in the data transmission device, reply a quota rejection, where the quota rejection is used to indicate that the data transmission device does not allocate the quota for the data.
  • the data transmission device further includes a processing unit
  • the processing unit is configured to: in the allocation unit, according to the quota request, After the data is allocated to the quota, after the first preset time, it is checked whether the data is cached in the quota, and if the data is not cached in the quota, the quota is recovered.
  • the processing unit is further configured to save the data to the local memory after the receiving unit receives the data, and recover the quota.
  • the sending unit is further configured to: before the receiving unit receives the quota request, send a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request.
  • the trigger quota request sent by the sending unit includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request received by the receiving unit includes an application quota amount and a valid time of the application quota amount, and is used to request the switch along the route and the data transmission device to reserve the application quota amount Effective time.
  • the receiving unit is configured to receive an emergency quota request, where the emergency quota request is sent by the source data end when the cached data in the source data end occupies a cache of the source data end that is greater than a first preset threshold.
  • the present invention provides a data transmission system, including:
  • a data transmission device according to the above fourth aspect, at least one data transmission device according to the above fifth aspect, and the data transmission device according to the above sixth aspect,
  • the data transmission device is the source data end
  • the data transmission device of the fifth aspect is the switch
  • the data transmission device of the sixth aspect is the target data end, the source data end. Data is transmitted through the switch with the target data end.
  • the present invention provides a data transmission method, apparatus, and system, by using a source data end to send a quota request, the quota request is used to request a switch along the destination and a destination data end to allocate a quota for data to be sent to the target data end by the source data end, the quota For buffering the data, the switch along the path includes all the switches that need to pass from the source data end to the target data end, and the source data end receives a quota response corresponding to the quota request, and the quota response is used to represent the switch along the way and Whether the target data end allocates a quota for the data, and if the quota response indicates that the switch along the path and the target data end allocates a quota for the data, the source data end sends the data.
  • the source data end since the source data end transmits the data to the target data end, the source data end may first apply for the data to the switch along the path switch and the target data end, and allocate quotas to the data along the switch and the target data end. After that, the source data end starts to transmit the data. Therefore, the data transmission method provided by the embodiment of the present invention solves the problem of network congestion, compared with the method of “congesting” and “managing” in the prior art. Guaranteed lossless transmission of data.
  • FIG. 1 is a flowchart 1 of a data transmission method according to an embodiment of the present invention.
  • FIG. 2 is a second flowchart of a data transmission method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart 3 of a data transmission method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a source data end sending quota request according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a target data end reply quota grant according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of data transmission from a source data end to a target data end according to an embodiment of the present invention schematic diagram
  • FIG. 7 is an interaction diagram 1 of a data transmission method according to an embodiment of the present invention.
  • FIG. 8 is an interaction diagram 2 of a data transmission method according to an embodiment of the present invention.
  • FIG. 9 is an interaction diagram 3 of a data transmission method according to an embodiment of the present invention.
  • FIG. 10 is an interaction diagram 4 of a data transmission method according to an embodiment of the present invention.
  • FIG. 11 is an interaction diagram 5 of a data transmission method according to an embodiment of the present invention.
  • FIG. 12 is an interaction diagram 6 of a data transmission method according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of a target data end sending a trigger quota request according to an embodiment of the present disclosure
  • FIG. 14 is an interaction diagram 7 of a data transmission method according to an embodiment of the present invention.
  • FIG. 15 is an interaction diagram 8 of a data transmission method according to an embodiment of the present invention.
  • FIG. 16 is a schematic diagram of a source data end sending an emergency quota request according to an embodiment of the present invention.
  • FIG. 17 is an interaction diagram 9 of a data transmission method according to an embodiment of the present invention.
  • FIG. 18 is an interaction diagram 10 of a data transmission method according to an embodiment of the present invention.
  • FIG. 19 is an interaction diagram 11 of a data transmission method according to an embodiment of the present invention.
  • FIG. 20 is an interaction diagram 12 of a data transmission method according to an embodiment of the present invention.
  • FIG. 21 is an interaction diagram 13 of a data transmission method according to an embodiment of the present invention.
  • FIG. 22 is an interaction diagram 14 of a data transmission method according to an embodiment of the present invention.
  • FIG. 23 is an interaction diagram 15 of a data transmission method according to an embodiment of the present invention.
  • FIG. 24 is an interaction diagram 16 of a data transmission method according to an embodiment of the present invention.
  • 25 is an interaction diagram 17 of a data transmission method according to an embodiment of the present invention.
  • FIG. 26 is a schematic structural diagram 1 of a data transmission device 1 according to an embodiment of the present invention.
  • FIG. 27 is a second schematic structural diagram of a data transmission apparatus 1 according to an embodiment of the present disclosure.
  • FIG. 28 is a schematic structural diagram 1 of a data transmission device 2 according to an embodiment of the present invention.
  • FIG. 29 is a schematic structural diagram of a data transmission device 2 according to an embodiment of the present invention. two;
  • FIG. 30 is a schematic structural diagram 3 of a data transmission device 2 according to an embodiment of the present disclosure.
  • FIG. 31 is a schematic structural diagram 4 of a data transmission device 2 according to an embodiment of the present disclosure.
  • FIG. 32 is a schematic structural diagram 5 of a data transmission apparatus 2 according to an embodiment of the present disclosure.
  • FIG. 33 is a schematic structural diagram 1 of a data transmission device 3 according to an embodiment of the present disclosure.
  • FIG. 34 is a schematic structural diagram 2 of a data transmission apparatus 3 according to an embodiment of the present disclosure.
  • FIG. 35 is a schematic structural diagram of a source data end according to an embodiment of the present disclosure.
  • FIG. 36 is a schematic structural diagram of a switch according to an embodiment of the present disclosure.
  • FIG. 37 is a schematic structural diagram of a target data end according to an embodiment of the present invention.
  • FIG. 38 is a block diagram of a data transmission system according to an embodiment of the present invention.
  • the embodiment of the present invention provides a data transmission method, which is related to the source data end side. As shown in FIG. 1 , the method may include:
  • the source data end sends a quota request, where the quota request is used to request a data distribution quota that the source data end needs to send to the target data end, and the quota is used to cache the data that the source data end needs to send to the target data end.
  • the switch along the way includes all the switches that need to pass from the source data end to the target data end.
  • the source data end may apply for quota for the data to the switch along the destination and the target data end, wherein the switch along the path may include all the switches that need to pass from the source data end to the target data end.
  • the source data end can send a quota request to the switch along the way, located in the source number.
  • the next-level switch of the terminal if the next-level switch has an idle quota, the next-level switch may allocate a quota for the data that the source data end needs to send to the target data end according to the quota request, and forward the quota request. After the quota is allocated by the other switches along the way, the quota request is forwarded to the target data end. After the target data end receives the quota request, if the target data end has an idle quota, the target data end may allocate a quota for the data. The quota allocated to the data by the switch and the target data end along the way can be used to cache the data.
  • each Ethernet packet includes a header and a payload.
  • the header part may include address information of the source data end, a port number of the switch to be passed, and address information of the target data end, and the payload part may include The data transferred.
  • the address information of the source data end may include an IP (Internet Protocol) protocol of the source data end, a MAC (Media Access Control, Media Access Control) address of the source data end, and the like;
  • the address information of the data side may include an IP address of the target data end, a MAC address of the target data end, and the like.
  • the source data end receives a quota response corresponding to the quota request, where the quota response is used to indicate whether the switch along the destination and the target data end allocate a quota for the data.
  • the target data end may reply the quota response corresponding to the quota request to the upper-level switch in the switch along the destination data end, and the upper-level switch forwards the quota response, and then passes through The forwarding of the other switches along the way until the quota response is forwarded to the source data end, that is, the source data end receives the quota response.
  • the quota response may be used to indicate whether the switch and the target data end are data allocation quotas that the source data end needs to send to the target data end, so that the source data end can determine whether the source data end needs to be sent to the target data end by using the quota response. data.
  • the quota response may be a quota grant or a quota rejection.
  • the quota grant can be used to represent the data distribution quota of the switch and the target data end to be sent to the target data end by the source data end.
  • Quota rejection can be used to characterize switches in the switch along the way A switch or target data end does not allocate a quota for data that the source data side needs to send to the target data end.
  • the target data end may allocate a quota for the data that the source data end needs to send to the target data end according to the quota request, and reply with the The quota request corresponding to the quota request is allowed; conversely, if there is no idle quota in the target data end, the target data end can directly reply to the quota rejection corresponding to the quota request.
  • the source data end sends the data that the source data end needs to send to the target data end.
  • the source data end After the source data end receives the quota response, if the source data end knows that the quota response indicates that the switch along the path and the target data end are both the source data end and the data to be sent to the target data end, the source data end can directly send the data.
  • the embodiment of the present invention provides a data transmission method, which is related to the switch side. As shown in FIG. 2, the method may include:
  • the first switch receives a quota request, where the quota request is used to request the switch and the target data end to allocate a quota for the data that the source data end needs to send to the target data end, where the quota is used to cache the data, and the switch includes the slave source data along the path. All switches that need to pass through to the target data end, where the first switch is a switch in the switch along the way.
  • the source data end may apply for quota for the data to the switch along the destination and the target data end, wherein the switch along the path may include all the switches that need to pass from the source data end to the target data end.
  • the source data end sends the quota request, and then forwards the switch to the first switch after the source data end of the switch, until the quota request is forwarded to the first switch, that is, the first switch receives the quota request, where the quota request
  • the data may be used to request the data exchange quota to be sent to the target data end by the source data end, and the quota may be used to cache the data that the source data end needs to send to the target data end, and the first switch is a switch in the switch along the path.
  • the first switch is based on the quota. Request to allocate a quota for this data and forward the quota request.
  • the first switch may allocate a quota for the data that the source data end needs to send to the target data end according to the quota request, and continue to forward the quota request to the switch along the path.
  • the second-level switch located in the first switch, and then the quota switch is forwarded through the other switches along the switch between the next-level switch and the target data end, and then the quota request is forwarded until the quota request is forwarded to the target data end.
  • the first switch receives the quota response corresponding to the quota request, and forwards the quota response, where the quota response is used to indicate whether the switch along the destination and the target data end allocate a quota for the data.
  • the target data end may reply the quota response corresponding to the quota request to the upper-level switch in the switch along the destination data end, and the upper-level switch forwards the quota response, and sequentially passes Forwarding from all switches between the upper-level switch and the first switch until the quota response is forwarded to the first switch, that is, the first-level switch receives the quota response, and forwards the quota response to the switch along the path, located at The upper-level switch of the first switch, and in turn, forwards the switch along the other switch between the upper-level switch and the source data end until the quota response is forwarded to the source data end.
  • the quota response may be used to indicate whether the switch along the path and the target data end are data allocation quotas that the source data end needs to send to the target data end.
  • the first switch receives the data and forwards the data.
  • the source data end After the first switch forwards the quota response, when the source data end receives the quota response, and learns that the quota response indicates that the switch along the path and the target data end allocates quotas to the source data end, the source data end can directly send the source data end. Data sent to the target data end, and then forwarded the data through the switch along the way until the data is forwarded to the first switch, that is, the first switch receives the data, and continues to forward the data until the data is forwarded to the target data end, Thereby the source data end completes the transmission of the data.
  • Embodiments of the present invention provide a data transmission method, which relates to a target data end side, such as As shown in FIG. 3, the method can include:
  • the target data end receives the quota request.
  • the source data end may apply for quota for the data to the switch along the destination and the target data end, wherein the switch along the path may include all the switches that need to pass from the source data end to the target data end.
  • the source data end sends a quota request, and then forwards the quota request after the quota is allocated by the switch along the way, until the quota request is forwarded to the target data end.
  • the quota request may be used to request a data distribution quota for the data source to be sent to the target data end by the source switch and the target data end, and the quota may be used for buffering data that the source data end needs to send to the target data end.
  • the target data end allocates a quota for the data that the source data end needs to send to the target data end according to the quota request, and replies with the quota permission corresponding to the quota request.
  • the target data end may allocate a quota to the data that the source data end needs to send to the target data end according to the received quota request, and respond to the quota request corresponding to the quota request.
  • the quota is allowed.
  • the target data end may reply the quota permission corresponding to the quota request to the upper-level switch in the switch along the destination data end, and the upper-level switch forwards the quota permission, and accordingly passes through the other switch along the route. Forward until the quota is forwarded to the source data. Therefore, the source data end can allocate the quota according to the quota permission to know that the data along the path and the target data end are both the source data end and the target data end, and the source data end can directly send the data.
  • the target data end receives the data.
  • the data is sequentially forwarded by the switch along the way until the data is forwarded to the target data end, so that the source data end completes the data transmission.
  • the embodiment of the present invention now uses a switch A as an example to further illustrate the embodiment of the present invention.
  • Data transmission side law Specifically, as shown in FIG. 4, before the source data end needs to transmit data to the target data end, the source data end may send a quota request to switch A. If switch A has an idle quota, switch A may send the source data end. The data is allocated to the target data end, and the quota request is forwarded to the target data end. As shown in FIG.
  • the target data end may be the data distribution that the source data end needs to send to the target data end. Quota, and reply to the quota grant to the switch, the switch then forwards the quota grant to the source data end, so that the source data end can know that the switch along the way and the target data end are the data that the source data end needs to send to the target data end according to the quota.
  • the quota is allocated, and as shown in FIG. 6, the source data end can start transmitting the data. Specifically, the source data end may send the data to the switch A, and the switch A forwards the data to the target data end, that is, the source data end completes the data transmission.
  • An embodiment of the present invention provides a data transmission method, where a quota request is sent by a source data end, and the quota request is used to request a switch along a destination and a target data end to allocate a quota for data to be sent to a target data end of the source data end, where the quota is used for Caching the data, the switch along the path includes all the switches that need to pass from the source data end to the target data end, and the source data end receives a quota response corresponding to the quota request, where the quota response is used to represent the switch along the path and the switch Whether the target data end allocates a quota for the data, and if the quota response indicates that the switch along the path and the target data end allocate a quota for the data, the source data end sends the data.
  • the source data end since the source data end transmits the data to the target data end, the source data end can apply for the data to the switch along the path and the target data end, and when the data is allocated to the data along the switch and the target data end.
  • the data data transmission method provided by the embodiment of the present invention solves the problem of network congestion, and the data transmission method provided by the embodiment of the present invention is compared with the method of “congesting” and “managing” in the prior art. Lossless transmission of data.
  • Embodiments of the present invention provide a data transmission method.
  • data center Ethernet when data is transmitted between a source data end and a target data end, all switches that pass through the switch along the path, that is, from the source data end to the target data end, may be used. The forwarding is implemented in turn.
  • the number of switches along the route may be one or more, which is clearly described for convenience.
  • the data transmission method provided by the embodiment of the present invention is exemplarily described by taking only one switch along the switch as an example.
  • An embodiment of the present invention provides a data transmission method. As shown in FIG. 7, the method may include:
  • the source data end sends a quota request to the switch, where the quota request is used to request the switch and the target data end to allocate a quota for the data that the source data end needs to send to the target data end, where the quota is used to cache the source data end to be sent to the target data end. data.
  • the source data end can send a quota request to the switch before the source data side needs to transmit data to the target data end.
  • the quota request is used to request the switch and the target data end to allocate a quota for the data that the source data end needs to send to the target data end, and the quota is used to cache the data.
  • the source data end may carry the foregoing quota request in a header of the Ethernet packet for transmission.
  • the source data end may carry the foregoing quota request in the header of an existing Ethernet packet, as shown in Table 1, in the header of an existing Ethernet packet.
  • Encapsulating the quota request this method can be implemented by extending the encapsulation format of the existing Ethernet packet and redefining a new type value, which can be used to indicate that the field entrained in the header is a quota request, and the data segment field For the data.
  • an Ethernet packet can be re-defined for the quota request, and the quota request is carried in the header of the Ethernet packet. For example, as shown in Table 2, an Ethernet is defined for the quota request.
  • the packet is enquembled in the header of the Ethernet packet.
  • This method can be implemented by extending the encapsulation format of the existing Ethernet packet and redefining a new type value.
  • the type value can be used to indicate The field entrained in the header is a quota request.
  • the above quota request may include: the amount of application quota and the amount of application quota Valid time, where the application quota is the amount of buffer that the source data terminal needs to apply for the data to be transmitted to the destination data end of the source data terminal to be transmitted to the switch and the target data terminal; the effective time for applying the quota amount is the source data end.
  • the time at which the requesting switch and the destination data end reserve the buffer amount for the data to be transmitted.
  • the data that needs to be sent to the target data end by the source data terminal may be a packet queue composed of multiple Ethernet packets. Specifically, reference may be made to the description of the above embodiment S101.
  • the switch may allocate a quota for the data according to the quota request, and forward the quota request to the target data end.
  • the switch After receiving the quota request sent by the source data end, if the switch has an idle quota, the switch can allocate a quota for the data that the source data end needs to send to the target data end according to the quota request, and forward the quota request to the target data end.
  • the switch allocates a quota to the data that the source data end needs to send to the target data end according to the quota of the application quota in the quota request, and allocates the quota allocated by the switch to the data according to the effective time of the application quota amount in the quota request.
  • the effective time to reserve the quota amount For example, if the quota is 200,000 bytes and the effective time for applying the quota is 1 second, the switch allocates 200,000 bytes for the data and reserves the quota of 200,000 bytes allocated by the switch for the data for 1 second.
  • the target data end may allocate a quota for the data according to the quota request, and reply the quota permission corresponding to the quota request to the switch.
  • the target data end may allocate a quota for the data according to the quota request, and reply the quota permission corresponding to the quota request to the switch, where Quota grants can be used to characterize the switch and the target data side to allocate quotas for the data.
  • the switch forwards the quota permission to the source data end.
  • the switch may forward the quota permission to the source data end.
  • the source data end sends the data to the switch.
  • the source data end After the source data end receives the quota permission forwarded by the switch, the source data end can learn that the switch and the target data end are all allocated data of the source data end to be sent to the target data end, so that the source data end can directly send the data. To the switch.
  • the switch forwards the data to the target data end.
  • the switch After the switch receives the data sent by the source data end, the switch can forward the data to the target data end, that is, the source data end completes the transmission of the data.
  • the switch may cache the data in a quota allocated by the switch for the data, and the switch may forward the data to the target data end, and the target data end The data is cached in the quota allocated to the data on the target data side and transferred to local memory.
  • the number of switches along the path may be multiple, and each of the multiple switches performs the same method as the switch described in this embodiment.
  • the embodiment of the present invention is only a description of the data transmission method provided by the embodiment of the present invention.
  • the number of switches along the path may be determined according to the actual situation of the network. The invention is not limited.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the switch If there is no idle quota in the switch, the switch replies to the source data end corresponding to the quota request, and discards the quota request.
  • the switch After the switch receives the quota request sent by the source data end, if there is no idle quota in the switch, the switch can reply the quota corresponding to the quota request to the source data end, and discard the quota request.
  • the quota rejection can be used to indicate that the switch does not allocate a quota for the source data side.
  • the source data end may refuse to know that the switch does not allocate a quota for the data that the source data end needs to send to the target data end according to the quota, so that the source data end may determine that the source data end cannot be sent. This data is sent to the target data side.
  • the data transmission method may further include:
  • the target data end replies to the quota corresponding to the quota request and rejects the switch to the switch.
  • the target data end After the target data end receives the quota request forwarded by the switch, if there is no idle quota in the target data end, the target data end may reply to the switch corresponding to the quota request to the switch, wherein the quota rejection may be used to represent that the target data end is not The source data side allocates quotas.
  • the target data end may carry the above quota rejection in the header of the Ethernet packet for transmission.
  • the transmission mode of the quota rejection is similar to the transmission mode of the quota request, and reference may be made to the description of the transmission mode of the quota request in S401.
  • the switch forwards the quota rejection to the source data end.
  • the switch After the switch receives the quota rejection replied by the target data end, the switch can forward the quota rejection to the source data end.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the switch retries the quota to the source data end or the switch forwards the target data reply to the source data end. After the source data end receives the quota rejection, the source data end can refuse to know that the switch or the target data end is not The source data end needs to send a data allocation quota to the target data end, so that the source data end can resend the quota request to re-subscribe the data to the switch and the target data end.
  • the data that needs to be sent to the target data end by the source data end is a packet queue that is composed of multiple Ethernet packets, where the source data end resending the quota request may specifically include:
  • the source data side subtracts the amount of the application quota required for the first Ethernet packet from the quota of the application in the quota request to obtain the first application quota amount, and carries the first application quota amount in the quota request, that is, the source
  • the quota request resent by the data side includes the first The amount of the quota is applied, where the first Ethernet packet is a packet located at the end of the packet queue.
  • the source data end may subtract the application quota amount required for the packet at the end of the packet queue from the application quota amount in the last request quota request, and Carrying the remaining quotas in the quota request and resending them to re-subscribe the data to the switch and the target data terminal until the remaining quota is the packet at the head of the packet queue, that is, the second Ethernet.
  • the amount of quota required for the network message may subtract the application quota amount required for the packet at the end of the packet queue from the application quota amount in the last request quota request, and Carrying the remaining quotas in the quota request and resending them to re-subscribe the data to the switch and the target data terminal until the remaining quota is the packet at the head of the packet queue, that is, the second Ethernet. The amount of quota required for the network message.
  • the application quota amount in the quota request sent by the source data end is the application quota amount required for the second Ethernet packet, that is, the minimum application quota amount
  • the source data end needs to resend the quota request.
  • the source data end can resend the quota request within a preset time after the source data end receives the quota rejection.
  • the source data end may be gradually reduced.
  • the source data end can gradually increase the amount of application quotas carried in the quota request sent each time.
  • the source data end resending the quota request may specifically include:
  • the source data end carries the quota of the application quota required for the multiple Ethernet packets in the quota request, and resends the quota request.
  • the preset time may be a preset fixed time, such as at least one RTT (Round Trip Time), or may be a preset unfixed time, such as On a fixed time basis, an expression is used to indicate the unfixed time, for example, the source data end fails for each application. Second, the source data side can increase the waiting for an RTT and then resend the quota request.
  • RTT Random Trip Time
  • the source data end resends the quota request within one preset time after receiving the quota rejection, which may be any of the following two situations:
  • the source data end fails once per application, that is, every time a quota rejection is received, the source data end may Wait for the above fixed time to resend the quota request.
  • the above fixed time may be at least one RTT.
  • the source data terminal when the amount of the application quota in the quota request sent by the source data terminal is the amount of the application quota required for the second Ethernet packet, if the source data terminal receives the quota rejection for the first time, the source data terminal needs to wait for at least After the RTT, the quota request is resent; if the source data end receives the quota rejection for the second time, the source data terminal still needs to wait for at least one RTT and then resend the quota request.
  • the source data end fails once per application, that is, every time a quota rejection is received, the source data end may Wait for the above unfixed time before resending the quota request. For example, if the source data end fails once every request, the source data end may increase waiting for an RTT before sending the quota request.
  • the foregoing fixed time may be at least one RTT, and an expression may be an integer multiple of the at least one RTT.
  • the source data terminal when the amount of the application quota in the quota request sent by the source data terminal is the amount of the application quota required for the second Ethernet packet, if the source data terminal receives the quota rejection for the first time, the source data terminal needs to wait for at least After the RTT, the quota request is resent; if the source data end receives the quota rejection for the second time, the source data end needs to wait for at least two RTTs and then resend the quota request.
  • the above-mentioned one fixed time and a certain fixed time are set as at least one RTT.
  • the above-mentioned one fixed time and some fixed time can be set to at least one RTT, or can be set according to actual needs.
  • the present invention is not limited to other different times.
  • the source data end may be in the After the first preset time, the quota request is resent.
  • the first preset time may be at least two RTTs.
  • the first preset time may be preferably set to at least two RTTs. Certainly, the first preset time may also be set to any other time that satisfies the requirement, and the invention is not limited.
  • the source data end may send the data that the source data end needs to send to the target data end within a second preset time after the source data end receives the quota permission.
  • the second preset time may be at least one RTT.
  • the second preset time may preferably be set to at least one RTT.
  • the second preset time may also be set to any other time that satisfies the requirement, and the invention is not limited.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the target data end sends a trigger quota request to the switch.
  • the target data end may send a trigger quota request to the switch, and the trigger quota request may be used to trigger the source data end to send the quota request.
  • the trigger quota request may include: an idle quota amount and a valid time of the trigger quota request.
  • the amount of the idle quota is the amount of the buffer that is not occupied by the data in the target data end; the effective time of the triggering the quota request is used to indicate how long the source data end can send the quota request after receiving the trigger quota request.
  • the quota request sent by the source data end after receiving the trigger quota request may be an “expedited reserve quota request”, configured to request the switch and the target data end to allocate and pre-send data to be sent to the target data end of the source data end. Leave a quota.
  • the switch can reply the quota corresponding to the "expedited reserve quota request" to the source data end, and discard the "expedited reserve quota request".
  • the effective time of the triggering quota request may be at least one RTT, and may be any other time that meets the actual demand, and may be set according to actual requirements, which is not limited by the present invention.
  • the target data terminal can entrain the above trigger quota request on the Ethernet.
  • the message is transmitted in the header of the message.
  • the transmission mode of the quota request is similar to the transmission mode of the quota request. For details, refer to the description of the transmission mode of the quota request in S401.
  • the switch forwards the trigger quota request to the source data end.
  • the switch After the switch receives the trigger quota request sent by the target data end, the switch can forward the trigger quota request to the source data end.
  • the source data end is triggered to send a quota request, that is, the source data end triggers the data request quota for the source data end to be transmitted to the target data end, and the switch and the target data end reserve quota for the data.
  • a data transmission method provided by an embodiment of the present invention is further described by taking a switch B as an example, and a source data terminal, a switch, and a target data terminal are included in the data center Ethernet. .
  • the target data end may send a trigger quota request to switch B, and after receiving the trigger quota request, switch B may forward the trigger quota request to The source data side sends a quota request to the trigger source data end.
  • the embodiment of the present invention further provides a data transmission method. As shown in FIG. 14, the method may include:
  • the source data end When the cached data in the source data occupies a cache of the source data end that is greater than the first preset domain value of the source data end buffer, the source data end sends an emergency quota request to the switch.
  • the emergency quota request includes: the effective application quota amount and the effective time of the emergency application quota amount.
  • the effective time of the emergency application quota and the effective time of the emergency application quota may refer to the description of the effective time of applying for the quota amount and the application quota amount in the above S401.
  • the source data end may also send the emergency quota request, where the high priority data may be cached in the source data end.
  • the highest priority data of all data is high priority data.
  • the switch If there is an idle quota in the switch, the switch according to the received emergency quota The request allocates a quota for the data that the source data side needs to send to the target data end, and forwards the emergency quota request to the target data end.
  • the switch After receiving the emergency quota request sent by the source data end, if the switch has an idle quota, the switch allocates a quota for the data that the source data end needs to send to the target data end according to the received emergency quota request, and forwards the emergency quota request to the switch. Target data side.
  • the method for the switch to allocate a quota for the data according to the emergency quota request may refer to the description in the S402, the switch allocates a quota for the data according to the quota request.
  • the target data end may allocate a quota for the data according to the emergency quota request, and reply the quota permission corresponding to the emergency quota request to the switch.
  • the target data end may allocate a quota for the data to be sent to the target data end by the source data end according to the emergency quota request, and reply with the emergency.
  • the quota corresponding to the quota request is granted to the switch, wherein the quota grant can be used to characterize the target data end to allocate a quota for the data.
  • the switch forwards the quota grant to the source data end.
  • the switch After the switch receives the quota permission replied by the target data end, the switch has already allocated a quota for the data that the source data end needs to send to the target data end, so the switch can forward the quota permission to the source data end.
  • the source data end sends the data to the switch.
  • the source data end After the source data end receives the quota permission forwarded by the switch, the source data end can learn that the switch and the target data end are all allocated data of the source data end to be sent to the target data end, so that the source data end can directly send the data. To the switch.
  • the switch forwards the data to the target data end.
  • the switch After the switch receives the data sent by the source data end, the switch can forward the data to the target data end, that is, the source data end completes the data transmission.
  • the switch after the switch receives the data sent by the source data, it exchanges The machine can cache the data in the quota allocated by the switch for the data, and the switch can forward the data to the target data end, and the target data end caches the data in the quota allocated by the target data end for the data, and This data is transferred to local memory.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the switch If there is no idle quota in the switch, the switch records the emergency quota request and forwards the emergency quota request to the target data end.
  • the switch After the switch receives the emergency quota request, if there is no idle quota in the switch, the switch records the received emergency quota request in the switch and forwards the emergency quota request to the target data terminal.
  • a data transmission method provided by an embodiment of the present invention is further described by taking a switch C as an example, and a source data terminal, a switch, and a target data terminal are included in the data center Ethernet. .
  • the switch C may first record the received emergency quota request in the switch C, and forward the An emergency quota request is sent to the target data terminal.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the target data end replies to the quota corresponding to the emergency quota request and rejects the switch to the switch.
  • the target data end After the target data end receives the emergency quota request forwarded by the switch, if there is no idle quota in the target data end, the target data end may reply to the switch corresponding to the quota request to the switch, wherein the quota rejection may be used to represent the target data end. Allocate quotas for the source data side.
  • the target data end may carry the above quota rejection in the header of the Ethernet packet for transmission.
  • the transmission mode of the quota rejection is similar to the transmission mode of the quota request, and reference may be made to the description of the transmission mode of the quota request in S401.
  • the switch After the switch receives the quota rejection from the target data end, it still does not exist in the switch. When there is an idle quota, the switch forwards the quota to the source data and discards the emergency quota request.
  • the target data end may wait for a certain time when there is no idle quota in the target data end. If, within a certain period of time, the idle quota appearing in the target data end can satisfy the quota required for the data, the target data end allocates a quota for the data; if after the certain time, the target data end is still not satisfied.
  • the idle quota of the quota required for the data the target data end can execute S508, that is, the reply quota is rejected to the switch, and then the switch rejects the quota to the source data end, so that the source data end cannot send the data.
  • the switch may reclaim the quota allocated for the data.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the switch When the switch receives the emergency quota request from the source data terminal and there is no idle quota in the switch, the switch can record the emergency quota request and forward the emergency quota request to the target data end. After the switch forwards the emergency quota request to the target data end, when an idle quota occurs in the switch, the switch may allocate a quota for the data that the source data end needs to send to the target data end according to the emergency quota request. The idle quota that appears in the switch can satisfy the quota required for the data.
  • the present invention does not limit the execution order of S510 and S503, that is, the present invention may first execute S503 and then execute S510; or may execute S510 first, and then execute.
  • S503; S503 and S510 may also be performed at the same time, and the invention is not limited.
  • the present invention may first execute S510, and then execute S508; S508 and S510, the invention is not limited.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the switch sets a quota allocation identifier according to the quota permission, and discards the quota permission.
  • the quota allocation identifier may be used to identify that the target data end allocates a quota for the data.
  • the switch can set the quota allocation identifier according to the quota permission, and discard the quota permission.
  • the quota allocation identifier can be used to identify that the target data end allocates a quota for the data.
  • the quota allocation identifier may be used to identify that all switches and target data ends that need to pass between the switch receiving the quota permission and the target data end allocate quotas for the data.
  • the switch After the target data end replies the quota to the switch, after the switch waits for the idle quota in the switch, the switch can allocate a quota for the data that the source data end needs to send to the target data end according to the emergency quota request.
  • the switch generates a quota permission, and sends the quota permission to the source data end.
  • the switch After the switch allocates a quota for the data, the switch can generate a quota grant and send the quota grant to the source data. Therefore, after the source data end receives the quota permission sent by the switch, it can be known that the switch and the target data end are all allocated data of the source data end to be sent to the target end, and the source data end can send the data.
  • the data transmission method provided by the embodiment of the present invention may further include:
  • the switch reclaims a quota allocated for the data.
  • the switch When an idle quota is generated on the switch, the switch allocates a quota to the data according to the emergency quota request, and the target data end replies to the switch corresponding to the emergency quota request to the switch. After the switch receives the quota rejection, the switch recycles the switch as The quota for this data allocation.
  • the switch allocates a quota for the data to be sent to the target data end by the source data end according to the received emergency quota request, and forwards the emergency quota request to After the target data end, S508 is performed, that is, if there is no idle quota in the target data end, and the target data end replies to the quota corresponding to the emergency quota request and refuses to the switch, after executing S508, the switch may perform the above S514, that is, the switch recycles. It is the quota allocated for this data.
  • the present invention does not limit the execution order of S509 and S514, that is, the present invention may first execute S509 and then execute S514; or S514 may be performed first, then S509 may be performed, and S509 and S514 may be simultaneously executed.
  • the data transmission method provided by the embodiment of the present invention may further include S515; and after the target data end allocates the quota for the data.
  • the data transmission method provided by the embodiment of the present invention may further include S516, specifically:
  • the switch checks whether the data is cached in the quota allocated for the data, and if the data is not cached in the quota, the switch reclaims the quota.
  • the switch After the switch allocates a quota to the data that needs to be sent to the target data end, after the switch waits for the first preset time, the switch can check whether the data is cached in the quota allocated for the data, if the switch checks the data for the data distribution. The data is not cached in the quota, and the switch reclaims the quota.
  • the target data end After the first preset time, the target data end checks whether the data is cached in the quota allocated for the data, and if the data is not cached in the quota, the target data end recovers the quota.
  • the target data end After the target data end allocates a quota to the data that needs to be sent to the target data end, the target data end waits for the first preset time, and the target data end can check whether the data is cached in the quota allocated for the data, if the target The data side checks that the data is not cached in the quota allocated for the data, and the target data side recycles the quota.
  • the data transmission method provided by the embodiment of the present invention may further include S515; and the target data end is data. After the quota is allocated, the data transmission method provided by the embodiment of the present invention may further include S516.
  • the data transmission method provided by the embodiment of the present invention may further include S517; after receiving the data on the target data end, the embodiment of the present invention provides The data transmission method may further include S518-S519, specifically:
  • the switch reclaims the quota allocated for the data.
  • the switch After the switch forwards the data to the target data end, the switch can reclaim the quota it has allocated for the data.
  • the target data end saves the data to the local memory.
  • the target data end After the target data end receives the data forwarded by the switch, the target data end can save the data to the local memory.
  • the target data end reclaims a quota allocated for the data.
  • the target data side After the target data side saves the data to the local memory, the target data side can reclaim the quota allocated for the data.
  • switches in the data center Ethernet respond to congestion by increasing the cache, and the data center Ethernet realizes no packet loss by limiting the network size and providing excessive network resources.
  • a congestion notification mechanism QCN is used to notify the source data end to reduce the data transmission rate and try to solve the network congestion.
  • QCN congestion notification mechanism
  • Data Center Ethernet is a network model that does its best to serve, so in the data center When data is transmitted over Ethernet, network congestion or packet loss may occur.
  • the embodiment of the present invention provides a data transmission method, that is, before the source data end transmits data to the target data end, the source switch and the target data end apply for quotas for the data, and only the data is available between the switch and the target data end. After the quota is allocated, the source data side starts transmitting the data. Therefore, the data transmission method provided by the embodiment of the present invention confirms the smoothness of the data transmission path before data transmission, and eliminates the occurrence of network congestion.
  • the problem of wasted cache traffic, insufficient bandwidth utilization, congestion and packet loss caused by network congestion problem in the prior art is solved, the cache in the switch along the path is saved, the network bandwidth is fully utilized, and the timeliness of the distributed service is ensured. And stability, and the data transmission method provided by the embodiment of the present invention does not need to provide network resources excessively, and is not limited by the network scale, and has a cost advantage.
  • An embodiment of the present invention provides a data transmission method, where a quota request is sent by a source data end, and the quota request is used to request a switch along a destination and a target data end to allocate a quota for data to be sent to a target data end of the source data end, where the quota is used for Caching the data, the switch along the path includes all the switches that need to pass from the source data end to the target data end, and the source data end receives a quota response corresponding to the quota request, where the quota response is used to represent the switch along the path and the switch Whether the target data end allocates a quota for the data, and if the quota response indicates that the switch along the path and the target data end allocate a quota for the data, the source data end sends the data.
  • the source data end since the source data end transmits the data to the target data end, the source data end can apply for the data to the switch along the path and the target data end, and when the data is allocated to the data along the switch and the target data end.
  • the data data transmission method provided by the embodiment of the present invention solves the problem of network congestion, and the data transmission method provided by the embodiment of the present invention is compared with the method of “congesting” and “managing” in the prior art. Lossless transmission of data.
  • an embodiment of the present invention provides a data transmission apparatus 1, which may include:
  • the sending unit 10 is configured to send a quota request, where the quota request is used to request the switch along the destination and the target data end to be sent to the target data by the data transmission device 1 a data distribution quota of the end, the quota is used to cache the data, the switch along the path includes all switches that need to pass from the data transmission device 1 to the target data terminal; and the receiving unit 11 is configured to receive and send the data.
  • a quota response corresponding to the quota request sent by the unit 10 where the quota response is used to indicate whether the switch along the destination and the target data end allocates the quota for the data; the sending unit 10 is further used to The quota response received by the receiving unit 11 indicates that the switch along the path and the target data end allocate the quota for the data, and then send the data.
  • the sending unit 10 is further configured to: if the quota response received by the receiving unit 11 indicates that one switch or the target data end of the switch along the path does not allocate the quota for the data, Resend the quota request.
  • the quota response received by the receiving unit 11 is a quota grant or a quota rejection, where
  • the quota is used to indicate that the switch along the destination and the target data end allocates the quota for the data, and the quota rejection is used to represent that one switch or the target data end of the switch along the path is not
  • the data is allocated to the quota.
  • the sending unit 10 is specifically configured to carry the quota request in a header of an Ethernet packet for transmission.
  • the data transmission apparatus 1 may further include a processing unit 12, where the data is a message queue composed of a plurality of Ethernet packets, and the quota request sent by the sending unit 10 includes Apply for quotas,
  • the processing unit 12 is configured to subtract the application quota amount required for the first Ethernet packet from the quota of the application quota in the quota request, to obtain a first application quota amount, and the first Ethernet packet.
  • the packet is a packet located at the end of the packet queue; and the sending unit 10 is configured to resend the quota request, where the quota request includes the first application quota amount.
  • the sending unit 10 is configured to: if the application quota quantity in the quota request is an application quota quantity required for the second Ethernet packet, where the second Ethernet packet is located in the packet The packet of the queue leader resends the quota request one time after the receiving unit 11 receives the quota rejection.
  • the data includes multiple Ethernet packets, and the quota request sent by the sending unit 10 includes an application quota amount.
  • the sending unit 10 is specifically configured to resend the quota request, where the quota request includes an application quota amount required by the multiple Ethernet packets.
  • the sending unit 10 is further configured to: in the first preset time after sending the quota request, if the receiving unit 11 does not receive the quota response, then the first preset After the time, the quota request is resent.
  • the sending unit 10 is specifically configured to send the data in a second preset time after the receiving unit 11 receives the quota response.
  • the receiving unit 11 is further configured to: before the sending unit 10 sends a quota request, receive a trigger quota request, where the trigger quota request is used to trigger the data transmission apparatus to send the quota request;
  • the sending unit 10 is specifically configured to send the quota request according to the trigger quota request received by the receiving unit 11.
  • the trigger quota request received by the receiving unit 11 includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request sent by the sending unit 10 further includes a valid time of the application quota amount, configured to request the switch along the destination and the target data end to retain the application quota amount.
  • the effective time of the quota amount is a valid time of the application quota amount.
  • the sending unit 10 is configured to: when the buffered data in the data transmission device occupies a cache of the data transmission device that is greater than a first preset threshold, send an emergency quota request; and the receiving unit 11 Specifically, the method is configured to receive the quota response corresponding to the emergency quota request sent by the sending unit 10.
  • the data transmission device 1 provided by the embodiment of the present invention may be a device that communicates through a switch, such as a mobile device, a computer, or the like.
  • Embodiments of the present invention provide a data transmission apparatus.
  • the data transmission apparatus Before a data transmission apparatus transmits data to a target data end, the data transmission apparatus may apply for a quota for the data to the switch and the target data end, and when the switch and the target data end are both along the way After the quota is assigned to the data, the data transmission device starts transmitting the data, so Compared with the method of “congesting” and “managing” when transmitting data in the technology, the data transmission device provided by the embodiment of the invention solves the problem of network congestion and ensures the lossless transmission of data.
  • an embodiment of the present invention provides a data transmission device 2, which may include:
  • the receiving unit 20 is configured to receive a quota request, and receive a quota response corresponding to the quota request, and receive data that the source data end needs to send to the target data end, where the quota request is used to request the data transmission device along the path and the target
  • the data end allocates a quota for the data, the quota is used to buffer the data, and the data transmission device along the path includes all data transmission devices that need to pass from the source data end to the target data end, and the data transmission
  • the device 2 is a data transmission device in the data transmission device along the way, and the quota response is used to indicate whether the data transmission device and the target data terminal along the way allocate the quota for the data, and the data is The quota response is sent by the source data end when the data transmission device and the target data end allocate the quota for the data; the allocation unit 21 is configured to be used in the data transmission device 2
  • the quota is allocated to the data according to the quota request received by the receiving unit 20
  • the data transmission device 2 may further include a discarding unit 23,
  • the sending unit 22 is further configured to: if the data transmission device 2 has no idle quota, return a first quota rejection corresponding to the quota request received by the receiving unit 20, where the first quota is rejected. Characterizing that the data transmission device 2 does not allocate the quota for the data; the discarding unit 23 is configured to discard the quota request received by the receiving unit 20.
  • the quota response received by the receiving unit 20 is a quota grant or a quota rejection, where
  • the quota grant is used to characterize the data transmission device along the destination and the target data end to allocate the quota for the data, and the quota is rejected for characterizing the data along the way A data transmission device or the target data terminal in the transmission device does not allocate the quota for the data.
  • the sending unit 22 is specifically configured to carry the first quota rejection entrainment in a header of an Ethernet packet for transmission.
  • the data transmission device 2 may further include a processing unit 24,
  • the processing unit 24 is configured to check whether the data is cached in the quota after the first preset time after the allocating unit 21 allocates the quota to the data according to the quota request, and If the data is not cached in the quota, the quota is reclaimed.
  • processing unit 24 is further configured to recover the quota after the sending unit 22 forwards the data.
  • the processing unit 24 is further configured to: if the quota response received by the receiving unit 22 is the quota rejection, recover the quota.
  • the receiving unit 20 is further configured to: before receiving the quota request, receive a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request, where the trigger quota request includes The idle quota amount and the valid time of the trigger quota request; the sending unit 22 is further configured to forward the trigger quota request received by the receiving unit 20.
  • the quota request received by the receiving unit 20 includes an application quota amount and an effective time of the application quota amount, and is configured to request the data transmission device along the destination and the target data terminal to apply the quota The amount of time that the amount of the application quota is retained.
  • the receiving unit 20 is configured to receive an emergency quota request, where the emergency quota request is that the cached data in the source data end occupies a buffer of the source data end that is greater than a first preset threshold, The source data is sent.
  • the data transmission device 2 may further include a processing unit 24,
  • the processing unit 24 is configured to: if there is no idle quota in the data transmission device 2, Recording, by the receiving unit 20, the emergency quota request, and when corresponding to the emergency quota request, the quota response received by the receiving unit 20 indicates that the target data terminal is not allocated to the data.
  • the quota is reclaimed; the sending unit 22 is further configured to forward the emergency quota request received by the receiving unit 20, and the quota response received by the receiving unit 20 represents the data along the way And when the transmitting device and the target data end allocate the quota for the data, forward the quota response, and forward the data; the receiving unit 20 is further configured to receive the quota response, and receive the data.
  • the allocating unit 21 is further configured to allocate the quota for the data according to the emergency quota request received by the receiving unit 20 when an idle quota occurs in the data transmission device.
  • the data transmission device 2 may further include a discarding unit 23,
  • the processing unit 24 is further configured to: when the quota response received by the receiving unit 20 represents all data transmission devices and the target data end that need to pass between the data transmission device 2 and the target data terminal, When the data is allocated to the quota, and the data transmission device 2 does not allocate the quota for the data, set a quota allocation identifier according to the quota response, and generate a quota permission, where the quota allocation identifier is used to identify All the switches and the target data end that need to pass between the data transmission device 2 and the target data end allocate the quota for the data, and the quota is permitted to be used to characterize the data transmission device 2, All data transmission means and the target data end to pass between the data transmission means 2 and the target data end allocate the quota for the data and the target data end to allocate the quota for the data.
  • a discarding unit 23 configured to discard the quota response received by the receiving unit 20, where the allocating unit 21 is further configured to wait for an idle quota to appear in the data transmission device 2 After the emergency quota request received by the receiving unit 20, the quota is allocated to the data, the receiving unit 20 is further configured to receive the data, and the sending unit 22 is further configured to send the The quota permitting, and forwarding the data received by the receiving unit 20; or the sending unit 22 is further configured to: when the quota response indicates that the target data end does not allocate the quota for the data, and The data transmission device 2 is not for the data distribution office When the quota is described, the quota response is forwarded, and the discarding unit 23 is configured to discard the emergency quota request received by the receiving unit 20.
  • the data transmission device 2 provided by the embodiment of the present invention may be a device such as a switch.
  • Embodiments of the present invention provide a data transmission apparatus.
  • the source data end Before a source data end transmits data to a target data end, the source data end may apply a quota to the data transmission device and the target data end along the way, and when the data transmission device and the data transmission device along the way After the target data end allocates the quota to the data, the source data end starts to transmit the data. Therefore, compared with the method of “congesting” and “managing” in the prior art, the method provided by the embodiment of the present invention provides The data transmission device solves the problem of network congestion and ensures the lossless transmission of data.
  • an embodiment of the present invention provides a data transmission device 3, which may include:
  • the receiving unit 30 is configured to receive a quota request, and receive data that is sent by the source data end to the data transmission device 3, where the quota request is used to request the switch along the path and the data transmission device 3 to allocate a quota for the data.
  • the quota is used to cache the data, and the switch along the path includes all the switches that need to pass from the source data end to the data transmission device 3; the allocation unit 31 is configured to be idle if the data transmission device 3 is idle.
  • the quota is used to allocate the quota to the data according to the quota request received by the receiving unit 30; the sending unit 32 is configured to reply to the quota grant corresponding to the quota request received by the receiving unit 30, A quota is permitted to characterize the switch along the way and the data transmission device 3 assigns the quota to the data.
  • the sending unit 32 is further configured to: if the data transmission device 3 has no idle quota, return a quota rejection, where the quota rejection is used to indicate that the data transmission device 3 is not allocated to the data. Quotation.
  • the sending unit 32 is specifically configured to carry the quota permission/the quota rejection in a header of an Ethernet packet for transmission.
  • the data transmission device 3 may further include a processing unit 33,
  • the processing unit 33 is configured to, according to the quota request, in the allocating unit 31 After the quota is allocated to the data, after the first preset time, it is checked whether the data is cached in the quota, and if the data is not cached in the quota, the quota is recovered.
  • processing unit 33 is further configured to: after the receiving unit 30 receives the data, save the data to local memory, and recover the quota.
  • the sending unit 32 is further configured to: before the receiving unit 30 receives the quota request, send a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request.
  • the trigger quota request sent by the sending unit 32 includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request received by the receiving unit 30 includes an application quota amount and an effective time of the application quota amount, and is used to request the switch and the data transmission device to retain the application quota amount The effective time of the application quota amount.
  • the receiving unit 30 is configured to receive an emergency quota request, where the emergency quota request is that the cached data in the source data end occupies a buffer of the source data end that is greater than a first preset threshold, The source data is sent.
  • the data transmission device 3 provided by the embodiment of the present invention may be a device that communicates through a switch, such as a mobile device, a computer, or the like.
  • An embodiment of the present invention provides a data transmission apparatus. Before a source data end transmits data to a data transmission apparatus, the source data end may apply for a quota for the data to the switch along the path and the data transmission apparatus, and when the switch and the data transmission along the path After the device allocates the quota to the data, the source data end starts to transmit the data. Therefore, the data transmission provided by the embodiment of the present invention is compared with the method of “congesting” and “managing” when transmitting data in the prior art. The device solves the problem of network congestion and ensures the lossless transmission of data.
  • an embodiment of the present invention provides a source data end, where the source data end may be a device that communicates through a switch, and the source data end may include a processor 13, a memory 14, a system bus 15, and a communication interface 16. .
  • Processor 13, memory 14 and The communication interfaces 16 are connected by the system bus 15 and complete communication with each other.
  • Processor 13 may be a single core or multi-core central processing unit, or may be a particular integrated circuit, or may be one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 14 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • the memory 14 is used to store execution instructions of the source data side. Specifically, the program code may be included in the execution instruction of the source data end.
  • Communication interface 16 is an interface circuit in which a system communicates with other systems.
  • the processor 13 may perform the method flow described in any one of FIG. 1 or FIG. 4 to FIG.
  • the processor 13 is configured to send, by using the system bus 15, a quota request from the communication interface 16, the quota request is used to request that the source switch and the target data end are sent to the target for the source data end a data allocation quota of the data end, the quota is used to cache the data, the switch along the path includes all switches that need to pass from the source data end to the target data end, and the processor 13 passes the system bus And receiving, from the communication interface 16, a quota response corresponding to the quota request, where the quota response is used to indicate whether the switch along the destination and the target data end allocate the quota for the data, and if The quota response received by the processor 13 characterizes that the switch along the destination and the target data end allocates the quota for the data, and the processor 13 transmits the information from the communication interface 16 through the system bus 15.
  • the processor 13 completes the software program of the above process, thereby causing the processor 13 to complete the above process by executing the above-described software program and calling the respective program codes described above.
  • the processor 13 is further configured to: if the received quota response indicates that one switch or the target data end of the switch along the path does not allocate the quota for the data, The system bus 15 resends the quota request from the communication interface 16.
  • the quota response received by the processor 13 is a quota grant or a quota rejection, where
  • the quota is used to indicate that the switch along the destination and the target data end allocates the quota for the data, and the quota rejection is used to represent that one switch or the target data end of the switch along the path is not
  • the data is allocated to the quota.
  • the processor 13 is specifically configured to carry the quota request in a header of an Ethernet packet for transmission.
  • the data is a packet queue consisting of multiple Ethernet packets, where the quota request includes an application quota amount, where the processor 13 is further used for an application from the quota request.
  • the amount of the application quota required by the first Ethernet packet is subtracted from the quota quantity to obtain the first application quota amount, and the first Ethernet packet is a packet located at the end of the packet queue;
  • the system bus 15 resends the quota request from the communication interface 16, and the quota request includes the first application quota amount.
  • the processor 13 is configured to: if the application quota quantity in the quota request is an application quota quantity required for the second Ethernet packet, where the second Ethernet packet is located in the packet.
  • the message of the queue leader resends the quota request from the communication interface 16 through the system bus 15 every time after receiving the quota rejection.
  • the data includes multiple Ethernet packets, where the quota request includes an application quota amount.
  • the processor 13 is specifically configured to resend the quota request from the communication interface 16 by using the system bus 15, where the quota request includes an application quota quantity required by the multiple Ethernet packets. .
  • the processor 13 is further configured to: in the first preset time after sending the quota request, if the processor 13 does not receive the quota response, then the first preset After the time, the quota request is resent from the communication interface 16 via the system bus 15.
  • the processor 13 is specifically configured to send, by using, the system bus 15 from the communication interface 16 within a second preset time after receiving the quota response.
  • the data is specifically configured to send, by using, the system bus 15 from the communication interface 16 within a second preset time after receiving the quota response.
  • the processor 13 is further configured to receive a trigger quota request from the communication interface 16 through the system bus 15 before sending the quota request, and pass the system bus according to the trigger quota request.
  • the request for the quota is sent from the communication interface 16, and the trigger quota request is used to trigger the source data end to send the quota request.
  • the trigger quota request received by the processor 13 includes an idle quota amount and a valid time of the trigger quota request.
  • the quota request sent by the processor 13 further includes a valid time of the application quota amount, configured to request the switch along the destination and the target data end to retain the application quota amount.
  • the effective time of the quota amount is a valid time of the application quota amount.
  • the processor 13 is configured to, when the cached data in the memory 14 occupies a cache of the memory 14 greater than a first preset threshold, from the communication interface 16 through the system bus 15 An emergency quota request is sent, and the quota response corresponding to the emergency quota request is received from the communication interface 16 through the system bus 15.
  • the source data end provided by the embodiment of the present invention may be a device that communicates through a switch, such as a mobile device, a computer, and the like.
  • the embodiment of the present invention provides a source data end. Before the source data end transmits data to the data transmission device, the source data end can apply for quotas for the data to the switch along the path and the data transmission device, and when the switch and the data transmission are along the way. After the device allocates the quota to the data, the source data end starts to transmit the data. Therefore, the source data provided by the embodiment of the present invention is compared with the method of “congesting” and “managing” when transmitting data in the prior art. The end solves the problem of network congestion and ensures the lossless transmission of data.
  • an embodiment of the present invention provides a switch, which may include a processor 25, a memory 26, a system bus 27, and a communication interface 28.
  • the processor 25, the memory 26 and the communication interface 28 are connected by the system bus 27 and communicate with each other.
  • the description of the processor 25 is the same as that of the processor 13 in the above embodiment.
  • the description of the memory 26 is the same as that of the memory 14 in the above embodiment.
  • the description of the communication interface 28 is the same as that of the communication interface 16 in the above embodiment.
  • the processor 25 can execute the method and the method described in any one of FIG. 2 or FIG. 4 to FIG.
  • the processor 25 is configured to receive a quota request from the communication interface 28 through the system bus 27, receive a quota response corresponding to the quota request, and receive data that the source data end needs to send to the target data end,
  • the quota request is used to request the switch along the destination and the target data end to allocate a quota for the data, the quota is used to cache the data, and the switch along the path includes the source data end to the target data end.
  • the switch is one of the switches along the way, and the quota response is used to indicate whether the switch along the destination and the target data end allocates the quota for the data, and the data is The quota response is sent by the source data end when the switch and the target data end allocate the quota for the data, and the processor 25 is configured to: if the switch has an idle quota And according to the processor 25, the quota request received from the communication interface 28 through the system bus 27 allocates the allocation to the data. , And the processor 25 for the system bus 27 via the communication interface 28 forwards the quota request, and forwarding the response from the quota, and forwarding the data.
  • the memory 26 is operative to store program code of the quota request, program code storing the quota response, program code storing the data, and a software program controlling the processor 25 to complete the process, thereby causing the
  • the processor 25 performs the above process by executing the above-described software program and calling the respective program codes described above.
  • the processor 25 is further configured to pass the system bus 27 if there is no idle quota in the switch. Responding from the communication interface 28 a first quota rejection corresponding to the quota request received by the processor 25, the first quota rejection being used to indicate that the switch does not allocate the quota for the data; The processor 25 is further configured to discard the quota request.
  • the processor 25 receives the quota response received by the system bus 27 and the communication interface 28 as a quota grant or a quota rejection, where
  • the quota is used to indicate that the switch along the destination and the target data end allocates the quota for the data, and the quota rejection is used to represent that one switch or the target data end of the switch along the path is not
  • the data is allocated to the quota.
  • the processor 25 is specifically configured to carry the first quota rejection in a header of an Ethernet packet for transmission.
  • the processor 25 is configured to check, after the first preset time, whether the data is cached in the quota after the quota is allocated according to the quota request, and if If the data is not cached in the quota, the quota is reclaimed.
  • the processor 25 is further configured to reclaim the quota after forwarding the data.
  • the processor 25 is further configured to: if the processor 25 passes the system bus 27, the quota response received from the communication interface 28 is the quota rejection, and the quota is reclaimed. .
  • the processor 25 is further configured to: before receiving the quota request, receive a trigger quota request, where the trigger quota request is used to trigger the source data end to send the quota request, where the trigger quota request includes The idle quota amount and the valid time of the trigger quota request; the processor 25 is further configured to forward the trigger quota request.
  • the processor 25, the quota request received includes an application quota amount and a valid time of the application quota amount, and is used to request the switch along the destination and the target data terminal to apply the quota amount The effective time to reserve the amount of the application quota.
  • the processor 25 is configured to receive an emergency quota request by using the system bus 27 and the communication interface 28, where the emergency quota request occupies the source data for data buffered in the source data end.
  • the source data end sends.
  • the processor 25 is configured to record the emergency quota request if there is no idle quota in the switch, and when the processor corresponds to the emergency quota request, the processor 25 receives the The processor 25 reclaims the quota when the quota response indicates that the target data end does not allocate the quota for the data; the processor 25 is further configured to use the system bus 27 from the communication interface 28 forwarding the received tight Urgent quota request, and when the received quota response indicates that the switch along the path and the target data end allocate the quota for the data, forward the quota response, and forward the data; the processor 25 And receiving, by the system bus 27 and the communication interface 28, the quota response, and receiving the data; the processor 25 is further configured to: when an idle quota occurs in the switch, according to the received The emergency quota request allocates the quota for the data.
  • the processor 25 is further configured to: when the processor 25 passes the system bus 27, the quota response received from the communication interface 28 to characterize the switch and the target data end When all the switches and the target data end that are to pass through allocate the quota for the data, and the switch does not allocate the quota for the data, set a quota allocation identifier according to the quota response, and generate a quota.
  • the quota allocation identifier is used to identify all switches and the target data end that need to pass between the switch and the target data end to allocate the quota for the data
  • the quota is used to identify the All the switches and the target data end that are to pass between the switch and the target data end allocate the quota for the data
  • the processor 25 is configured to discard the quota response, and the processing
  • the device 25 is further configured to wait for the emergency allocation received from the communication interface 28 through the system bus 27 after the idle quota is generated in the switch.
  • the processor 25 further for receiving the data via the system bus 27 and the communication interface 28, the processor 25, further for passing the system The bus 27 and the communication interface 28 send the quota permission and forward the data; or the processor 25 is further configured to: when the quota response indicates that the target data end is not allocated for the data And the processor 25 is configured to discard the received emergency quota request when the quota is not allocated by the switch to the data.
  • the embodiment of the present invention provides a switch. Before the source data end transmits data to the data transmission device, the source data end can apply for the data to the switch along the path and the data transmission device, and when the switch and the data transmission device are both along the way. After the quota is allocated for the data, the source data end starts to transmit the data, and therefore, it is transmitted with the prior art.
  • the switch provided by the embodiment of the present invention solves the problem of network congestion and ensures the lossless transmission of data.
  • an embodiment of the present invention provides a target data end, which may be a device that communicates through a switch, and the target data end may include a processor 34, a memory 35, a system bus 36, and a communication interface 37. .
  • the processor 34, the memory 35, and the communication interface 37 are connected by the system bus 36 and complete communication with each other.
  • the description of the processor 34 is the same as that of the processor 13 in the above embodiment.
  • the description of the memory 35 is the same as that of the memory 14 in the above embodiment.
  • the description of the communication interface 37 is the same as that of the communication interface 16 in the above embodiment.
  • the processor 34 may perform the method flow described in any one of FIG. 3 to FIG. 7 or any one of FIG. 9 or FIG. 11 to FIG.
  • the processor 34 is configured to receive a quota request from the communication interface 37 through the system bus 36, and receive data that the source data end needs to send to the switch, where the quota request is used to request a switch along the path and the target data end Allocating a quota for the data, the quota is used to cache the data, the switch along the path includes all switches that need to pass from the source data end to the target data end, and the processor 34 is used to And having the idle quota in the target data end, the quota is allocated to the data according to the received quota request, and the processor 34 is configured to reply from the communication interface 37 to the processing by using the system bus 36.
  • the quota request received by the device 34 corresponds to a quota grant, and the quota permission is used to characterize the switch along the destination and the target data end to allocate the quota for the data.
  • the memory 35 a program code for storing a quota request, a program code storing a quota grant, a program code storing the data, and a software program for controlling the processor 34 to complete the above steps, thereby causing the processor 34
  • the above steps are performed by executing the above software program and calling each of the above program codes.
  • the processor 34 is further configured to: when the target data end has no idle quota, return a quota rejection from the communication interface 37 through the system bus 36, where the quota rejection is used to represent the target data end.
  • the quota is not allocated for the data.
  • the processor 34 is specifically configured to carry the quota permission/the quota rejection in a header of an Ethernet packet for transmission.
  • the processor 34 is configured to check whether the data is cached in the quota after the first preset time after the quota is allocated according to the quota request, and if If the data is not cached in the quota, the quota is reclaimed.
  • the processor 34 is further configured to: after receiving the data, save the data to the memory 35, and recycle the quota.
  • the processor 34 is further configured to send a trigger quota request from the communication interface 37 by using the system bus 36, where the trigger quota request is used to trigger the source data end to send the quota. request.
  • the trigger quota request sent by the processor 34 includes an idle quota amount and a valid time of the trigger quota request.
  • the processor 34, the quota request received includes an application quota amount and a valid time of the application quota amount, and is used to request the switch along the destination and the target data terminal to apply the quota amount The effective time to reserve the amount of the application quota.
  • the processor 34 is configured to receive, by using the system bus 36, an emergency quota request from the communication interface 37, where the emergency quota request is that the cached data in the source data end occupies a cache larger than the source data end.
  • the first preset threshold is sent by the source data end.
  • the target data end provided by the embodiment of the present invention may be a device that communicates through a switch, such as a mobile device, a computer, and the like.
  • the embodiment of the present invention provides a target data end. Before the source data end transmits data to the data transmission device, the source data end can apply for quotas for the data to the switch along the path and the data transmission device, and when the switch and the data transmission are along the way. After the device allocates the quota to the data, the source data end starts to transmit the data. Therefore, compared with the method of “congesting” and “managing” in the prior art, the target data provided by the embodiment of the present invention is compared. The end solves the problem of network congestion and ensures the lossless transmission of data.
  • an embodiment of the present invention provides a data transmission system, which may include a source data end, at least one switch, and a target data end.
  • the number of switches may be One or more, wherein the method performed by each of the plurality of switches is the same as the method performed by the switch described in this embodiment, and therefore, for convenience, the data transmission system provided by the embodiment of the present invention is clearly described.
  • the data transmission system only one switch is taken as an example, and the data transmission system is exemplarily illustrated.
  • the number of specific switches may be determined according to actual conditions, and the present invention is not limited.
  • the source data end sends a quota request to the switch, and the quota request is used to request the switch and the target data end to allocate a quota for the data that the source data end needs to send to the target data end, where the quota is used. Cache the data, if there is an idle quota in the switch, the switch allocates a quota for the data, and forwards the quota request to the target data end, and after receiving the quota request, the target data end has an idle quota in the target data end. The target data end allocates a quota for the data, and replies to the quota permission corresponding to the quota request to the switch.
  • the switch After receiving the quota permission, the switch forwards the quota grant to the source data end, and the quota permits the switch to represent the switch and the target.
  • the data end allocates a quota for the data. Therefore, after the source data end receives the quota permission, the source data end can directly send the data to the switch, and the switch forwards the data to the target data end, that is, the data transmission is completed. .
  • the data transmission system provided by the embodiment of the present invention can also be applied to a scenario where multiple source data ends and multiple target data ends, and a method for transmitting data between a specific source data end and a target data end, and the foregoing embodiment
  • the method for transmitting data between the source data end and the target data end is similar, and will not be described here.
  • An embodiment of the present invention provides a data transmission system, where a quota request is sent to a switch by using a source data end, and the quota request is used to request a switch and a target data end to allocate a quota for data to be sent to a target data end of the source data end, where the quota is used. Cache the data, if there is an idle quota in the switch, the switch allocates a quota for the data, and forwards the quota request to the target data end, and after receiving the quota request, the target data end has an idle quota in the target data end. The target data end allocates a quota for the data, and replies to the quota permission corresponding to the quota request to the switch.
  • the switch After receiving the quota permission, the switch forwards the quota grant to the source data end, and the quota permits the switch to represent the switch and the target.
  • the data side allocates a quota for the data, so the source data side receives the quota permission. After that, the source data end can directly send the data to the switch, and the switch forwards the data to the target data end.
  • the source data end since the source data end transmits the data to the target data end, the source data end can apply for the data to the switch along the path and the target data end, and when the data is allocated to the data along the switch and the target data end.
  • the source data terminal only starts to transmit the data. Therefore, the data transmission system provided by the embodiment of the present invention solves the problem of network congestion, and is guaranteed to be compared with the method of “congesting” and “managing” in the prior art. Lossless transmission of data.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be in the form of hardware Implementation can also be implemented in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

本发明实施例提供一种数据传输方法、装置及系统,涉及通信领域,解决了现有技术无法保证数据无损传输的问题。该方法包括:源数据端发送配额请求,配额请求用于请求沿途交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额,配额用于缓存数据,沿途交换机包括从源数据端至目标数据端需经过的所有交换机;源数据端接收与配额请求对应的配额响应,配额响应用于表征沿途交换机和目标数据端是否为数据分配配额;若配额响应表征沿途交换机和目标数据端为数据分配配额,源数据端则发送数据。

Description

一种数据传输方法、装置及系统
本申请要求于2014年05月29日提交中国专利局、申请号为201410234515.8、发明名称为“一种数据传输方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域,尤其涉及一种数据传输方法、装置及系统。
背景技术
数据中心以太网,也称为CEE(Converged Enhanced Ethernet,融合增强型以太网)。目前,在CEE中,主要通过802.1Qbb PFC(Priority Flow Control基于优先次序的流量控制标准)协议和802.1Qau QCN(Quantized Congestion Notification端到端的拥塞管理标准)协议实现数据的传输。
现有技术中,上述PFC定义了一种优先级流控,具体为在一条物理链路上分8个虚拟通道,并为每个虚拟通道分别分配一个优先级,从而使得具有不同优先级的虚拟通道可用于传输不同的数据。当网络发生拥塞时,接收端可以在具有特定优先级的虚拟通道上发送打开帧/关闭帧,以继续/抑制该具有特定优先级的虚拟通道上数据的传输,从而保证高优先级的数据的传输。上述QCN定义了一种拥塞通告机制,具体为当发现网络中发生拥塞时,拥塞源可通告源数据端的发送源降低发送速率,从而试图解决网络拥塞,进而试图实现数据无损传输。
然而,若通过PFC传输数据,则当网络发生拥塞时,由于所有发送数据经过拥塞点的源数据端发送的数据均会被抑制传输,因此可能导致这些源数据端缓冲的部分数据溢出,从而无法保证数据无损传输;若通过QCN传输数据,则由于源数据端至被拥塞点之间存在滞后,因此可能导致拥塞点缓冲的部分数据溢出,从而无法保证 数据无损传输。
发明内容
本发明的实施例提供一种数据传输方法、装置及系统,解决了现有技术无法保证数据无损传输的问题。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,本发明提供一种数据传输方法,包括:
源数据端发送配额请求,所述配额请求用于请求沿途交换机和目标数据端为所述源数据端需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机;
所述源数据端接收与所述配额请求对应的配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;
若所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述源数据端则发送所述数据。
在第一方面的第一种可能的实现方式中,所述方法还包括:
若所述配额响应表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额,所述源数据端则重新发送所述配额请求。
结合前述的第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
结合第一方面的第一种可能的实现方式,在第三种可能的实现方式中,所述数据为由多个以太网报文组成的报文队列,所述配额请求中包括申请配额量,
其中,所述源数据端则重新发送所述配额请求,包括:
所述源数据端从所述配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,所述第一以太网报文为位于所述报文队列队尾的报文;
所述源数据端则重新发送所述配额请求,所述配额请求中包括所述第一申请配额量。
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,若所述配额请求中的申请配额量为第二以太网报文需要的申请配额量,所述第二以太网报文为位于所述报文队列队首的报文,则所述源数据端则重新发送所述配额请求,包括:
在所述源数据端每次接收到所述配额拒绝后的一个时间内,所述源数据端则重新发送所述配额请求。
结合第一方面的第一种可能的实现方式,在第五种可能的实现方式中,所述数据包括多个以太网报文,所述配额请求中包括申请配额量,
其中,所述源数据端则重新发送所述配额请求,包括:
所述源数据端则重新发送所述配额请求,所述配额请求中包括所述多个以太网报文需要的申请配额量。
在第一方面的第六种可能的实现方式中,所述方法还包括:
在所述源数据端发送所述配额请求后的第一预设时间内,若所述源数据端未接收到所述配额响应,所述源数据端则在所述第一预设时间后,重新发送所述配额请求。
结合前述的第一方面或第一方面的第一种可能的实现方式至第六种可能的实现方式中的任一种实现方式,在第七种可能的实现方式中,所述源数据端则发送所述数据,包括:
所述源数据端则在接收到所述配额响应后的第二预设时间内,所述源数据端发送所述数据。
结合前述的第一方面或第一方面的第二种可能的实现方式至第七种可能的实现方式中的任一种实现方式,在第八种可能的实现方式中,所述源数据端发送配额请求之前,所述方法还包括:
所述源数据端接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求;
其中,所述源数据端发送配额请求,包括:
所述源数据端根据所述触发配额请求,发送所述配额请求。
结合第一方面的第八种可能的实现方式,在第九种可能的实现方式中,
所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
结合第一方面的第三种可能的实现方式至第九种可能的实现方式中的任一种实现方式,在第十种可能的实现方式中,
所述配额请求中还包括所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
在第一方面的第十一种可能的实现方式中,当所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述配额请求为紧急配额请求,
其中,所述源数据端发送配额请求;所述源数据端接收与所述配额请求对应的配额响应,包括:
所述源数据端发送所述紧急配额请求;
所述源数据端接收与所述紧急配额请求对应的所述配额响应。
第二方面,本发明还提供一种数据传输方法,包括:
第一交换机接收配额请求,所述配额请求用于请求沿途交换机和目标数据端为源数据端需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机,所述第一交换机为所述沿途交换机中的一个交换机;
若所述第一交换机中有空闲配额,所述第一交换机则:
根据所述配额请求为所述数据分配所述配额,并转发所述配额请求;
接收与所述配额请求对应的配额响应,并转发所述配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;
接收所述数据,并转发所述数据,所述数据为当所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额时,所述源数据端发送的。
在第二方面的第一种可能的实现方式中,所述方法还包括:
若所述第一交换机中无空闲配额,所述第一交换机则回复与所述配额请求对应的第一配额拒绝,并丢弃所述配额请求,所述第一配额拒绝用于表征所述第一交换机未为所述数据分配所述配额。
结合前述的第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
结合前述的第二方面或第二方面的第一种可能的实现方式至第二种可能的实现方式中的任一种实现方式,在第三种可能的实现方式中,所述第一交换机根据所述配额请求为所述数据分配所述配额后,所述方法还包括:
在第一预设时间后,所述第一交换机检查所述配额中是否缓存有所述数据;
若所述配额中未缓存所述数据,所述第一交换机则回收所述配额。
结合前述的第二方面或第二方面的第一种可能的实现方式至第三种可能的实现方式中的任一种实现方式,在第四种可能的实现方式中,所述第一交换机转发所述数据之后,所述方法还包括:
所述第一交换机回收所述配额。
结合第二方面的第二种可能的实现方式至第四种可能的实现方 式中的任一种实现方式,在第五种可能的实现方式中,若所述配额响应为所述配额拒绝,则所述方法还包括:
所述第一交换机回收所述配额。
结合前述的第二方面或第二方面的第二种可能的实现方式至第五种可能的实现方式中的任一种实现方式,在第六种可能的实现方式中,所述第一交换机接收配额请求之前,所述方法还包括:
所述第一交换机接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求,所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间;
所述第一交换机转发所述触发配额请求。
结合前述的第二方面或第二方面的第一种可能的实现方式至第六种可能的实现方式中的任一种实现方式,在第七种可能的实现方式中,
所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
在第二方面的第八种可能的实现方式中,所述第一交换机接收配额请求,包括:
所述第一交换机接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
结合第二方面的第八种可能的实现方式,在第九种可能的实现方式中,所述方法还包括:
若所述第一交换机中无空闲配额,所述第一交换机则:
记录所述紧急配额请求,并转发所述紧急配额请求;
接收与所述紧急配额请求对应的所述配额响应;
当所述第一交换机中出现空闲配额时,根据所述紧急配额请求,为所述数据分配所述配额;
当所述配额响应表征所述沿途交换机和所述目标数据端为所述 数据分配所述配额时,转发所述配额响应,并接收所述数据,以及转发所述数据,或者,
当所述配额响应表征所述目标数据端未为所述数据分配所述配额时,转发所述配额响应,回收所述配额。
结合第二方面的第九种可能的实现方式,在第十种可能的实现方式中,所述方法还包括:
当所述配额响应表征所述第一交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,且所述第一交换机未为所述数据分配所述配额时,所述第一交换机,
根据所述配额响应,设置配额分配标识,并丢弃所述配额响应,所述配额分配标识用于标识所述第一交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,
等待所述第一交换机中出现空闲配额后,根据所述紧急配额请求,为所述数据分配所述配额,
生成配额准许,并发送所述配额准许,所述配额准许用于表征所述第一交换机、所述第一交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,
接收所述数据,并转发所述数据;或者,
当所述配额响应表征所述目标数据端未为所述数据分配所述配额,且所述第一交换机未为所述数据分配所述配额时,所述第一交换机转发所述配额响应,并丢弃所述紧急配额请求。
第三方面,本发明还提供一种数据传输方法,包括:
目标数据端接收配额请求,所述配额请求用于请求沿途交换机和所述目标数据端为源数据端需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机;
若所述目标数据端中有空闲配额,所述目标数据端则根据所述配额请求为所述数据分配所述配额,并回复与所述配额请求对应的配额准许,以及接收所述数据,所述配额准许用于表征所述沿途交 换机和所述目标数据端为所述数据分配所述配额。
在第三方面的第一种可能的实现方式中,所述方法还包括:
若所述目标数据端中无空闲配额,所述目标数据端则回复配额拒绝,所述配额拒绝用于表征所述目标数据端未为所述数据分配所述配额。
结合前述的第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述目标数据端根据所述配额请求为所述数据分配所述配额之后,所述方法还包括:
在第一预设时间后,所述目标数据端检查所述配额中是否缓存有所述数据;
若所述配额中未缓存所述数据,所述目标数据端则回收所述配额。
结合前述的第三方面或第三方面的第一种可能的实现方式至第二种可能的实现方式中的任一种实现方式,在第三种可能的实现方式中,所述目标数据端接收所述数据之后,所述方法还包括:
所述目标数据端保存所述数据至本地内存;
所述目标数据端回收所述配额。
结合前述的第三方面或第三方面的第二种可能的实现方式至第三种可能的实现方式中的任一种实现方式,在第四种可能的实现方式中,所述目标数据端接收配额请求之前,所述方法还包括:
所述目标数据端发送触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求。
结合第三方面的第四种可能的实现方式,在第五种可能的实现方式中,
所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
结合前述的第三方面或第三方面的第一种可能的实现方式至第五种可能的实现方式中的任一种实现方式,在第六种可能的实现方式中,
所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
结合前述的第三方面或第三方面的第一种可能的实现方式至第三种可能的实现方式中的任一种实现方式,在第七种可能的实现方式中,所述目标数据端接收配额请求,包括:
所述目标数据端接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
第四方面,本发明提供一种数据传输装置,包括:
发送单元,用于发送配额请求,所述配额请求用于请求沿途交换机和目标数据端为所述数据传输装置需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述数据传输装置至所述目标数据端需经过的所有交换机;
接收单元,用于接收与所述发送单元发送的所述配额请求对应的配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;
所述发送单元,还用于若所述接收单元接收的所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,则发送所述数据。
在第四方面的第一种可能的实现方式中,
所述发送单元,还用于若所述接收单元接收的所述配额响应表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额,则重新发送所述配额请求。
结合前述的第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述接收单元接收的所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途交换机和所述目标数据端为所 述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
结合第四方面的第一种可能的实现方式,在第三种可能的实现方式中,所述数据传输装置还包括处理单元,所述数据为由多个以太网报文组成的报文队列,所述发送单元发送的配额请求中包括申请配额量,
其中,所述处理单元,用于从所述配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,所述第一以太网报文为位于所述报文队列队尾的报文;
所述发送单元,具体用于重新发送所述配额请求,所述配额请求中包括所述第一申请配额量。
结合第四方面的第三种可能的实现方式,在第四种可能的实现方式中,
所述发送单元,具体用于若所述配额请求中的申请配额量为第二以太网报文需要的申请配额量,所述第二以太网报文为位于所述报文队列队首的报文,则在所述接收单元每次接收到所述配额拒绝后的一个时间内,重新发送所述配额请求。
结合第四方面的第一种可能的实现方式,在第五种可能的实现方式中,所述数据包括多个以太网报文,所述发送单元发送的所述配额请求中包括申请配额量,
其中,所述发送单元,具体用于重新发送所述配额请求,所述配额请求中包括所述多个以太网报文需要的申请配额量。
在第四方面的第六种可能的实现方式中,
所述发送单元,还用于在发送所述配额请求后的第一预设时间内,若所述接收单元未接收到所述配额响应,则在所述第一预设时间后,重新发送所述配额请求。
结合前述的第四方面或第四方面的第一种可能的实现方式至第六种可能的实现方式中的任一种实现方式,在第七种可能的实现方式中,
所述发送单元,具体用于在所述接收单元接收到所述配额响应后的第二预设时间内,发送所述数据。
结合前述的第四方面或第四方面的第二种可能的实现方式至第七种可能的实现方式中的任一种实现方式,在第八种可能的实现方式中,
所述接收单元,还用于在所述发送单元发送配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述数据传输装置发送所述配额请求;
其中,所述发送单元,具体用于根据所述接收单元接收的所述触发配额请求,发送所述配额请求。
结合第四方面的第八种可能的实现方式,在第九种可能的实现方式中,
所述接收单元接收的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
结合第四方面的第三种可能的实现方式至第九种可能的实现方式中的任一种实现方式,在第十种可能的实现方式中,
所述发送单元发送的所述配额请求中还包括所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
在第四方面的第十一种可能的实现方式中,
所述发送单元,具体用于当所述数据传输装置中缓存的数据占用所述数据传输装置的缓存大于第一预设阈值时,发送紧急配额请求;
所述接收单元,具体用于接收与所述发送单元发送的所述紧急配额请求对应的所述配额响应。
第五方面,本发明还提供一种数据传输装置,包括:
接收单元,用于接收配额请求,并接收与所述配额请求对应的配额响应,以及接收源数据端需发送至目标数据端的数据,所述配额请求用于请求沿途数据传输装置和所述目标数据端为所述数据分 配配额,所述配额用于缓存所述数据,所述沿途数据传输装置包括从所述源数据端至所述目标数据端需经过的所有数据传输装置,所述数据传输装置为所述沿途数据传输装置中的一个数据传输装置,所述配额响应用于表征所述沿途数据传输装置和所述目标数据端是否为所述数据分配所述配额,所述数据为当所述配额响应表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额时,所述源数据端发送的;
分配单元,用于若所述数据传输装置中有空闲配额,则根据所述接收单元接收的所述配额请求为所述数据分配所述配额;
所述发送单元,用于转发所述配额请求,并转发所述配额响应,以及转发所述数据。
在第五方面的第一种可能的实现方式中,所述数据传输装置还包括丢弃单元,
所述发送单元,还用于若所述数据传输装置中无空闲配额,则回复与所述接收单元接收的所述配额请求对应的第一配额拒绝,所述第一配额拒绝用于表征所述数据传输装置未为所述数据分配所述配额;
所述丢弃单元,用于丢弃所述接收单元接收的所述配额请求。
结合前述的第五方面或第五方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述接收单元接收的所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途数据传输装置中的一个数据传输装置或所述目标数据端未为所述数据分配所述配额。
结合前述的第五方面或第五方面的第一种可能的实现方式至第二种可能的实现方式中的任一种实现方式,在第三种可能的实现方式中,所述数据传输装置还包括处理单元,
所述处理单元,用于在所述分配单元根据所述配额请求为所述数据分配所述配额后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
结合第五方面的第三种可能的实现方式,在第四种可能的实现方式中,
所述处理单元,还用于在所述发送单元转发所述数据之后,回收所述配额。
结合第五方面的第三种可能的实现方式或第四种可能的实现方式,在第五种可能的实现方式中,
所述处理单元,还用于若所述接收单元接收的所述配额响应为所述配额拒绝,则回收所述配额。
结合前述的第五方面或第五方面的第二种可能的实现方式至第五种可能的实现方式中的任一种实现方式,在第六种可能的实现方式中,
所述接收单元,还用于在接收配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求,所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间;
所述发送单元,还用于转发所述接收单元接收的所述触发配额请求。
结合前述的第五方面或第五方面的第一种可能的实现方式至第六种可能的实现方式中的任一种实现方式,在第七种可能的实现方式中,
所述接收单元接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途数据传输装置和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
在第五方面的第八种可能的实现方式中,
所述接收单元,具体用于接收紧急配额请求,所述紧急配额请 求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
结合第五方面的第八种可能的实现方式,在第九种可能的实现方式中,所述数据传输装置还包括处理单元,
所述处理单元,用于若所述数据传输装置中无空闲配额,则记录所述接收单元接收的所述紧急配额请求,且当与所述紧急配额请求对应的,所述接收单元接收的所述配额响应表征所述目标数据端未为所述数据分配所述配额时,回收所述配额;
所述发送单元,还用于转发所述接收单元接收的所述紧急配额请求,且当所述接收单元接收的所述配额响应表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额时,转发所述配额响应,以及转发所述数据;
所述接收单元,还用于接收所述配额响应,并接收所述数据;
所述分配单元,还用于当所述数据传输装置中出现空闲配额时,根据所述接收单元接收的所述紧急配额请求,为所述数据分配所述配额。
结合第五方面的第九种可能的实现方式,在第十种可能的实现方式中,所述数据传输装置还包括丢弃单元,
所述处理单元,还用于当所述接收单元接收的所述配额响应表征所述数据传输装置与所述目标数据端之间需经过的所有数据传输装置和所述目标数据端为所述数据分配所述配额,且所述数据传输装置未为所述数据分配所述配额时,根据所述配额响应,设置配额分配标识,并生成配额准许,所述配额分配标识用于标识所述数据传输装置与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,所述配额准许用于表征所述数据传输装置、所述数据传输装置与所述目标数据端之间需经过的所有数据传输装置和所述目标数据端为所述数据分配所述配额和所述目标数据端为所述数据分配所述配额,
所述丢弃单元,用于丢弃所述接收单元接收的所述配额响应,
所述分配单元,还用于等待所述数据传输装置中出现空闲配额后,根据所述接收单元接收的所述紧急配额请求,为所述数据分配所述配额,
所述接收单元,还用于接收所述数据,
所述发送单元,还用于发送所述配额准许,并转发所述接收单元接收的所述数据;或者,
所述发送单元,还用于当所述配额响应表征所述目标数据端未为所述数据分配所述配额,且所述数据传输装置未为所述数据分配所述配额时,转发所述配额响应,
所述丢弃单元,用于丢弃所述接收单元接收的所述紧急配额请求。
第六方面,本发明还提供一种数据传输装置,包括:
接收单元,用于接收配额请求,并接收源数据端需发送至所述数据传输装置的数据,所述配额请求用于请求沿途交换机和所述数据传输装置为所述数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述数据传输装置需经过的所有交换机;
分配单元,用于若所述数据传输装置中有空闲配额,则根据所述接收单元接收的所述配额请求为所述数据分配所述配额;
发送单元,用于回复与所述接收单元接收的所述配额请求对应的配额准许,所述配额准许用于表征所述沿途交换机和所述数据传输装置为所述数据分配所述配额。
在第六方面的第一种可能的实现方式中,
所述发送单元,还用于若所述数据传输装置中无空闲配额,则回复配额拒绝,所述配额拒绝用于表征所述数据传输装置未为所述数据分配所述配额。
结合前述的第六方面或第六方面的第一种可能的实现方式,在第二种可能的实现方式中,所述数据传输装置还包括处理单元,
所述处理单元,用于在所述分配单元根据所述配额请求为所述 数据分配所述配额之后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
结合第六方面的第二种可能的实现方式,在第三种可能的实现方式中,
所述处理单元,还用于在所述接收单元接收所述数据之后,保存所述数据至本地内存,以及回收所述配额。
结合前述的第六方面或第六方面的第二种可能的实现方式至第三种可能的实现方式中的任一种实现方式,在第四种可能的实现方式中,
所述发送单元,还用于在所述接收单元接收配额请求之前,发送触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求。
结合第六方面的第四种可能的实现方式,在第五种可能的实现方式中,
所述发送单元发送的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
结合前述的第六方面或第六方面的第一种可能的实现方式至第五种可能的实现方式中的任一种实现方式,在第六种可能的实现方式中,
所述接收单元接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述数据传输装置将所述申请配额量保留所述申请配额量的有效时间。
结合前述的第六方面或第六方面的第一种可能的实现方式至第三种可能的实现方式中的任一种实现方式,在第七种可能的实现方式中,
所述接收单元,具体用于接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
第七方面,本发明提供一种数据传输系统,包括:
如上述第四方面所述的数据传输装置、至少一个如上述第五方面所述的数据传输装置,以及如上述第六方面所述的数据传输装置,
其中,上述第四方面所述的数据传输装置为源数据端,上述第五方面所述的数据传输装置为交换机,上述第六方面所述的数据传输装置为目标数据端,所述源数据端与所述目标数据端之间通过所述交换机传输数据。
本发明提供一种数据传输方法、装置及系统,通过源数据端发送配额请求,该配额请求用于请求沿途交换机和目标数据端为该源数据端需发送至目标数据端的数据分配配额,该配额用于缓存该数据,该沿途交换机包括从该源数据端至该目标数据端需经过的所有交换机,且该源数据端接收与该配额请求对应的配额响应,该配额响应用于表征沿途交换机和该目标数据端是否为该数据分配配额,以及若该配额响应表征沿途交换机和该目标数据端为该数据分配配额,该源数据端则发送该数据。通过该方案,由于源数据端在传输数据至目标数据端之前,源数据端可先向沿途交换机和目标数据端为该数据申请配额,并且当沿途交换机和目标数据端均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输方法解决了网络拥塞的问题,保证了数据的无损传输。
附图说明
图1为本发明实施例提供的一种数据传输方法的流程图一;
图2为本发明实施例提供的一种数据传输方法的流程图二;
图3为本发明实施例提供的一种数据传输方法的流程图三;
图4为本发明实施例提供的源数据端发送配额请求的示意图;
图5为本发明实施例提供的目标数据端回复配额准许的示意图;
图6为本发明实施例提供的源数据端传输数据至目标数据端的 示意图;
图7为本发明实施例提供的一种数据传输方法的交互图一;
图8为本发明实施例提供的一种数据传输方法的交互图二;
图9为本发明实施例提供的一种数据传输方法的交互图三;
图10为本发明实施例提供的一种数据传输方法的交互图四;
图11为本发明实施例提供的一种数据传输方法的交互图五;
图12为本发明实施例提供的一种数据传输方法的交互图六;
图13为本发明实施例提供的目标数据端发送触发配额请求的示意图;
图14为本发明实施例提供的一种数据传输方法的交互图七;
图15为本发明实施例提供的一种数据传输方法的交互图八;
图16为本发明实施例提供的源数据端发送紧急配额请求的示意图;
图17为本发明实施例提供的一种数据传输方法的交互图九;
图18为本发明实施例提供的一种数据传输方法的交互图十;
图19为本发明实施例提供的一种数据传输方法的交互图十一;
图20为本发明实施例提供的一种数据传输方法的交互图十二;
图21为本发明实施例提供的一种数据传输方法的交互图十三;
图22为本发明实施例提供的一种数据传输方法的交互图十四;
图23为本发明实施例提供的一种数据传输方法的交互图十五;
图24为本发明实施例提供的一种数据传输方法的交互图十六;
图25为本发明实施例提供的一种数据传输方法的交互图十七;
图26为本发明实施例提供的一种数据传输装置1的结构示意图一;
图27为本发明实施例提供的一种数据传输装置1的结构示意图二;
图28为本发明实施例提供的一种数据传输装置2的结构示意图一;
图29为本发明实施例提供的一种数据传输装置2的结构示意图 二;
图30为本发明实施例提供的一种数据传输装置2的结构示意图三;
图31为本发明实施例提供的一种数据传输装置2的结构示意图四;
图32为本发明实施例提供的一种数据传输装置2的结构示意图五;
图33为本发明实施例提供的一种数据传输装置3的结构示意图一;
图34为本发明实施例提供的一种数据传输装置3的结构示意图二;
图35为本发明实施例提供的源数据端的结构示意图;
图36为本发明实施例提供的交换机的结构示意图;
图37为本发明实施例提供的目标数据端结构示意图;
图38为本发明实施例提供的一种数据传输系统的框图。
具体实施方式
下面结合附图对本发明实施例提供的一种数据传输方法、装置及系统进行清楚、完整地描述。
实施例一
本发明实施例提供一种数据传输方法,涉及源数据端侧,如图1所示,该方法可以包括:
S101、源数据端发送配额请求,该配额请求用于请求沿途交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额,该配额用于缓存源数据端需发送至目标数据端的数据,沿途交换机包括从源数据端至目标数据端需经过的所有交换机。
源数据端需要传输数据至目标数据端之前,源数据端可提前向沿途交换机和目标数据端为该数据申请配额,其中,该沿途交换机可以包括从源数据端至目标数据端需经过的所有交换机。
具体的,源数据端可发送配额请求至沿途交换机中,位于源数 据端的下一级交换机,若该下一级交换机中有空闲配额,该下一级交换机则可根据该配额请求为该源数据端需发送至目标数据端的数据分配配额,并转发该配额请求,以及依次通过其他的沿途交换机分配配额后转发该配额请求到目标数据端,目标数据端接收到该配额请求后,若目标数据端有空闲配额,目标数据端则可为该数据分配配额。其中,沿途交换机和目标数据端为该数据分配的配额可用于缓存该数据。
进一步地,上述源数据端需发送至目标数据端的数据具体可以是由多个以太网报文组成的报文队列。具体的,每个以太网报文都包括报头和净荷两部分,报头部分可以包括源数据端的地址信息、需经过的交换机的端口号,以及目标数据端的地址信息等;净荷部分可以包括需传输的数据。其中,源数据端的地址信息可以包括源数据端的IP(Internet Protocol,网络之间互连的协议)地址、源数据端的MAC(Media Access Control,媒体访问控制子层协议)地址等;相应的,目标数据端的地址信息可以包括目标数据端的IP地址、目标数据端的MAC地址等。
S102、源数据端接收与配额请求对应的配额响应,配额响应用于表征沿途交换机和目标数据端是否为该数据分配配额。
目标数据端接收到配额请求后,目标数据端可回复与该配额请求对应的配额响应至沿途交换机中,位于目标数据端的上一级交换机,由该上一级交换机转发该配额响应,并依次经过其他的沿途交换机的转发,直到转发该配额响应至源数据端,即源数据端接收该配额响应。其中,该配额响应可用于表征沿途交换机和目标数据端是否为源数据端需发送至目标数据端的数据分配配额,从而源数据端可以通过该配额响应确定是否发送源数据端需发送至目标数据端的数据。
需要说明的是,该配额响应可为配额准许或配额拒绝。其中,配额准许可用于表征沿途交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额。配额拒绝可用于表征沿途交换机中的 一个交换机或目标数据端未为源数据端需发送至目标数据端的数据分配配额。
可以理解的是,目标数据端接收到配额请求后,若目标数据端中有空闲配额,目标数据端则可根据该配额请求为源数据端需发送至目标数据端的数据分配配额,并回复与该配额请求对应的配额准许;相反的,若目标数据端中无空闲配额,目标数据端则可直接回复与该配额请求对应的配额拒绝。
S103、若配额响应表征沿途交换机和目标数据端为该数据分配配额,源数据端则发送源数据端需发送至目标数据端的数据。
源数据端接收到配额响应之后,若源数据端获知该配额响应表征沿途交换机和目标数据端均为源数据端需发送至目标数据端的数据分配了配额,源数据端则可直接发送该数据。
本发明实施例提供一种数据传输方法,涉及交换机侧,如图2所示,该方法可以包括:
S201、第一交换机接收配额请求,该配额请求用于请求沿途交换机和目标数据端为源数据端需发送至目标数据端的该数据分配配额,该配额用于缓存该数据,沿途交换机包括从源数据端至目标数据端需经过的所有交换机,其中,第一交换机为沿途交换机中的一个交换机。
源数据端需要传输数据至目标数据端之前,源数据端可提前向沿途交换机和目标数据端为该数据申请配额,其中,该沿途交换机可以包括从源数据端至目标数据端需经过的所有交换机。
具体的,源数据端发送配额请求,并依次经过沿途交换机中源数据端后的各级交换机转发,直到将该配额请求转发至第一交换机,即第一交换机接收配额请求,其中,该配额请求可用于请求沿途交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额,该配额可用于缓存源数据端需发送至目标数据端的数据,第一交换机为沿途交换机中的一个交换机。
S202、若第一交换机中有空闲配额,第一交换机则根据该配额 请求为该数据分配配额,并转发该配额请求。
第一交换机接收到配额请求之后,若第一交换机中有空闲配额,第一交换机则可根据该配额请求为源数据端需发送至目标数据端的数据分配配额,并继续转发该配额请求至沿途交换机中,位于该第一交换机的下一级交换机,并依次经过该下一级交换机与目标数据端之间的其他的沿途交换机分配配额后转发该配额请求,直到将该配额请求转发至目标数据端。
S203、第一交换机接收与配额请求对应的配额响应,并转发该配额响应,该配额响应用于表征沿途交换机和目标数据端是否为该数据分配配额。
目标数据端接收到该配额请求后,目标数据端可回复与该配额请求对应的配额响应至沿途交换机中,位于目标数据端的上一级交换机,该上一级交换机转发该配额响应,并依次通过从该上一级交换机到第一交换机之间的所有交换机的转发,直到将该配额响应转发至第一交换机,即第一级交换机接收该配额响应,并转发该配额响应至沿途交换机中,位于第一交换机的上一级交换机,并依次通过该上一级交换机与源数据端之间的其他的沿途交换机的转发,直到将该配额响应转发至源数据端。其中,该配额响应可用于表征沿途交换机和目标数据端是否为源数据端需发送至所述目标数据端的数据分配配额。
S204、当该配额响应表征沿途交换机和目标数据端为该数据分配配额时,第一交换机接收该数据,并转发该数据。
第一交换机将该配额响应转发之后,当源数据端接收到该配额响应,并获知该配额响应表征沿途交换机和目标数据端为源数据端分配配额时,源数据端可直接发送源数据端需发送至目标数据端的数据,并依次经过沿途交换机转发该数据,直到将该数据转发至第一交换机,即第一交换机接收该数据,并继续转发该数据,直到将该数据转发至目标数据端,从而源数据端完成了该数据的传输。
本发明实施例提供一种数据传输方法,涉及目标数据端侧,如 图3所示,该方法可以包括:
S301、目标数据端接收配额请求。
源数据端需要传输数据至目标数据端之前,源数据端可提前向沿途交换机和目标数据端为该数据申请配额,其中,该沿途交换机可以包括从源数据端至目标数据端需经过的所有交换机。
具体的,源数据端发送配额请求,并依次经过沿途交换机分配配额后转发该配额请求,直到将该配额请求转发至目标数据端。其中,该配额请求可用于请求沿途交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额,该配额可用于缓存源数据端需发送至目标数据端的数据。
S302、若目标数据端中有空闲配额,目标数据端则根据配额请求为源数据端需发送至目标数据端的该数据分配配额,并回复与配额请求对应的配额准许。
目标数据端接收到配额请求之后,若目标数据端中有空闲配额,目标数据端则可根据收到的配额请求为源数据端需发送至目标数据端的数据分配配额,并回复与该配额请求对应的配额准许。
具体的,目标数据端可回复与该配额请求对应的配额准许至沿途交换机中,位于目标数据端的上一级交换机,由该上一级交换机转发该配额准许,并依此经过其他的沿途交换机的转发,直到转发该配额准许至源数据端。从而源数据端可根据该配额准许获知沿途交换机和目标数据端均为源数据端需传输至目标数据端的数据分配了配额,进而源数据端可直接发送该数据。
S303、目标数据端接收该数据。
源数据端发送源数据端需发送至目标数据端的数据之后,经过沿途交换机依次转发该数据,直到将该数据转发至目标数据端,从而源数据端完成该数据的传输。
示例性的,假设在数据中心以太网中包括源数据端、交换机、目标数据端,其中交换机可以有一个或多个,本发明实施例现在以一个交换机A为例来进一步说明本发明实施例提供的数据传输方 法。具体的,如图4所示,源数据端需要传输数据给目标数据端之前,源数据端可发送配额请求至交换机A,若交换机A中有空闲配额,交换机A则可为源数据端需发送至目标数据端的数据分配配额,并转发该配额请求至目标数据端,如图5所示,若目标数据端中有空闲配额,目标数据端则可为源数据端需发送至目标数据端的数据分配配额,并回复配额准许至交换机,由交换机再将该配额准许转发给源数据端,从而源数据端可根据该配额准许获知沿途交换机和目标数据端均为源数据端需发送至目标数据端的数据分配了配额,进而如图6所示,源数据端可开始传输该数据。具体的,源数据端可将该数据发送至交换机A,由该交换机A将该数据转发至目标数据端,即源数据端完成该数据的传输。
本发明实施例提供一种数据传输方法,通过源数据端发送配额请求,该配额请求用于请求沿途交换机和目标数据端为该源数据端需发送至目标数据端的数据分配配额,该配额用于缓存该数据,该沿途交换机包括从该源数据端至该目标数据端需经过的所有交换机,且该源数据端接收与该配额请求对应的配额响应,该配额响应用于表征该沿途交换机和该目标数据端是否为该数据分配配额,以及若该配额响应表征该沿途交换机和该目标数据端为该数据分配配额,该源数据端则发送该数据。通过该方案,由于源数据端在传输数据至目标数据端之前,源数据端可向沿途交换机和目标数据端为该数据申请配额,并且当沿途交换机和目标数据端均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输方法解决了网络拥塞的问题,保证了数据的无损传输。
实施例二
本发明实施例提供一种数据传输方法,在数据中心以太网中,源数据端和目标数据端之间传输数据时,可以通过沿途交换机,即从源数据端至目标数据端需经过的所有交换机的依次转发来实现。其中,沿途交换机的数量可以为一个或多个,为了方便清楚地描述 本发明实施例提供的数据传输方法,本实施例以沿途交换机只有一个交换机为例,示例性地说明该数据传输方法。
本发明实施例提供一种数据传输方法,如图7所示,该方法可以包括:
S401、源数据端发送配额请求至交换机,该配额请求用于请求交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额,该配额用于缓存源数据端需发送至目标数据端的数据。
源数据端需要传输数据至目标数据端之前,源数据端可发送配额请求至交换机。该配额请求用于请求交换机和目标数据端为源数据端需发送至目标数据端的数据分配配额,该配额用于缓存该数据。
可选的,源数据端可将上述配额请求夹带在以太网报文的报头中传输。具体的,源数据端可将上述配额请求夹带在现有的某个以太网报文的报头中传输,示例性的,如表1所示,在现有的某个以太网报文的报头中夹带该配额请求,这种方式可以通过扩展现有以太网报文的封装格式,并重新定义一个新的类型值实现,该类型值可用于指示报头中夹带的字段为配额请求,以及数据段字段为数据。或者,可重新为该配额请求定义一个以太网报文,并将该配额请求夹带在该以太网报文的报头中传输,示例性的,如表2所示,为该配额请求定义一个以太网报文,并在该以太网报文的报头中夹带该配额请求,这种方式可以通过扩展现有以太网报文的封装格式,并重新定义一个新的类型值实现,该类型值可用于指示报头中夹带的字段为配额请求。
表1
Figure PCTCN2014091382-appb-000001
表2
Figure PCTCN2014091382-appb-000002
特别的,上述配额请求中可以包括:申请配额量和申请配额量 的有效时间,其中,申请配额量为源数据端向交换机和目标数据端为其待传输的源数据端需发送至目标数据端的数据需申请的缓存量;申请配额量的有效时间为源数据端请求交换机和目标数据端为其待传输的该数据保留该缓存量的时间。
进一步地,上述源数据端需发送至目标数据端的数据具体可以是由多个以太网报文组成的报文队列。具体的,可以参照上述实施例S101的描述。
S402、若交换机中有空闲配额,交换机则可根据该配额请求为该数据分配配额,并转发该配额请求至目标数据端。
交换机接收源数据端发送的配额请求后,若交换机中有空闲配额,交换机可根据该配额请求为源数据端需发送至目标数据端的数据分配配额,并转发该配额请求至目标数据端。
具体的,交换机可根据该配额请求中的申请配额量为源数据端需发送至目标数据端的数据分配配额,并根据该配额请求中的申请配额量的有效时间,将交换机为该数据分配的配额保留申请配额量的有效时间。例如,申请配额量200,000字节,申请配额量的有效时间为1秒,则交换机为该数据分配的配额为200,000字节,并将交换机为该数据分配的200,000字节的配额保留1秒。
S403、若目标数据端中有空闲配额,目标数据端则可根据该配额请求为该数据分配配额,并回复与该配额请求对应的配额准许至交换机。
目标数据端接收交换机转发的配额请求后,若目标数据端中有空闲配额,目标数据端则可根据该配额请求为该数据分配配额,并回复与该配额请求对应的配额准许至交换机,其中,配额准许可用于表征交换机和目标数据端为该数据分配配额。
S404、交换机转发该配额准许至源数据端。
交换机接收到目标数据端回复的与配额请求对应的配额准许后,交换机可转发该配额准许至源数据端。
S405、源数据端发送该数据至交换机。
源数据端接收交换机转发的配额准许后,源数据端可根据该配额准许获知交换机和目标数据端均为源数据端需发送至目标数据端的数据分配了配额,从而源数据端可直接发送该数据至交换机。
S406、交换机转发该数据至目标数据端。
交换机接收源数据端发送的数据之后,交换机可转发该数据至目标数据端,即源数据端完成了该数据的传输。
需要说明的是,交换机接收到源数据端发送的数据之后,交换机可将该数据缓存在交换机为该数据分配的配额中,且该交换机可转发该数据至目标数据端,由目标数据端将该数据缓存在目标数据端为该数据分配的配额中,并将该数据传输至本地内存中。
进一步地,本发明实施例提供的数据传输方法中,沿途交换机的数量可以为多个,其中,该多个交换机中的每个交换机执行的方法均与本实施例中描述的交换机执行的方法相同,此处不再赘述,即本发明实施例仅是以沿途交换机的数量为一个示例性的说明本发明实施例提供的数据传输方法,具体的沿途交换机的数量可根据网络的实际情况来确定,本发明不作限制。
进一步地,如图8所示,在上述S401之后,本发明实施例提供的数据传输方法还可以包括:
S407、若交换机中无空闲配额,交换机则回复与该配额请求对应的配额拒绝至源数据端,并丢弃该配额请求。
交换机接收源数据端发送的配额请求之后,若交换机中无空闲配额,交换机则可回复与该配额请求对应的配额拒绝至源数据端,并丢弃该配额请求。其中,该配额拒绝可用于表征交换机未为源数据端分配配额。
进一步的,源数据端接收到交换机发送的该配额拒绝后,源数据端可根据该配额拒绝获知该交换机未为源数据端需发送至目标数据端的数据分配配额,从而源数据端可以确定无法发送该数据至目标数据端。
进一步地,如图9所示,在上述S402之后,本发明实施例提供 的数据传输方法还可以包括:
S408、若目标数据端中无空闲配额,目标数据端则回复与该配额请求对应的配额拒绝至交换机。
目标数据端接收交换机转发的配额请求之后,若目标数据端中无空闲配额,目标数据端则可回复与该配额请求对应的配额拒绝至交换机,其中,该配额拒绝可用于表征目标数据端未为源数据端分配配额。
其中,目标数据端可将上述配额拒绝夹带在以太网报文的报头中传输。具体的,配额拒绝的传输方式与配额请求的传输方式类似,可参照S401中配额请求的传输方式的描述。
S409、交换机将该配额拒绝转发至源数据端。
交换机接收目标数据端回复的配额拒绝之后,交换机可将该配额拒绝转发至源数据端。
进一步地,如图10所示,在上述S407之后,或如图11所示,在上述S408-S409之后,本发明实施例提供的数据传输方法还可以包括:
S410、源数据端接收到与该配额请求对应的配额拒绝后,源数据端重新发送该配额请求。
交换机回复配额拒绝至源数据端或交换机转发目标数据端回复的配额拒绝至源数据端,即源数据端接收到该配额拒绝后,源数据端可根据该配额拒绝获知交换机或目标数据端未为源数据端需发送至目标数据端的数据分配配额,从而源数据端可重新发送该配额请求,以重新向交换机和目标数据端为该数据申请配额。
一种可能的实现方式中,源数据端需发送至目标数据端的数据为由多个以太网报文组成的报文队列,其中,源数据端重新发送该配额请求具体可以包括:
源数据端从配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,并将第一申请配额量携带在配额请求中发送,即源数据端重新发送的配额请求中包括第一 申请配额量,其中,第一以太网报文为位于上述报文队列队尾的报文。
进一步地,源数据端每次接收到配额拒绝后,源数据端可从上一次发送的配额请求中的申请配额量中减去位于上述报文队列队尾的报文需要的申请配额量,并将剩下的配额量携带在配额请求中重新发送,以重新向交换机和目标数据端为该数据申请配额,直到剩下的配额量为位于该报文队列队首的报文,即第二以太网报文需要的配额量为止。
进一步地,上述的数据传输方法中,当源数据端发送的配额请求中的申请配额量为第二以太网报文需要的申请配额量,即最小申请配额量时,若源数据端接收到与其发送的配额请求对应的配额拒绝,源数据端则仍然需要重新发送配额请求,具体的,源数据端可在源数据端每次接收到配额拒绝后的一个预设时间内,重新发送配额请求。
可以理解的是,当以太网负荷较高时,源数据端的配额请求可能会被交换机或目标数据端拒绝,即源数据端可能会接收到配额拒绝,这种情况下,源数据端可逐步减少每次发送的配额请求中携带的申请配额量;相应的,当以太网负荷较低时,源数据端的配额请求会被交换机或目标数据端允许,即源数据端会接收到配额准许,这种情况下,源数据端可逐步增加每次发送的配额请求中携带的申请配额量。
另一种可能的实现方式中,源数据端重新发送该配额请求具体可以包括:
源数据端将该多个以太网报文需要的申请配额量携带在该配额请求,并重新发送该配额请求。
示例性的,本发明实施例中,上述一个预设时间可以为预设的一个固定时间,如至少一个RTT(Round Trip Time,往返时延);也可以为预设的一个不固定时间,如在某个固定时间的基础上,以某个表达式来指示该一个不固定时间,例如源数据端每申请失败一 次,源数据端可增加等待一个RTT后再重新发送该配额请求。
其中,源数据端在每次接收到配额拒绝后的一个预设时间内,重新发送该配额请求可以为以下两种情况中的任意一种:
(1)若源数据端发送的配额请求中的申请配额量为第二以太网报文需要的申请配额量,则源数据端每申请失败一次,即每接收到一次配额拒绝,源数据端可等待上述一个固定时间后再重新发送该配额请求。其中,上述一个固定时间可以为至少一个RTT。
举例来说,当源数据端发送的配额请求中的申请配额量为第二以太网报文需要的申请配额量时,若源数据端第一次接收到配额拒绝,源数据端则需要等待至少一个RTT后再重新发送该配额请求;若源数据端第二次接收到配额拒绝,源数据端仍需要等待至少一个RTT后再重新发送该配额请求。
(2)若源数据端发送的配额请求中的申请配额量为第二以太网报文需要的申请配额量,则源数据端每申请失败一次,即每接收到一次配额拒绝,源数据端可等待上述一个不固定时间后再重新发送该配额请求。例如,源数据端每申请失败一次,源数据端可增加等待一个RTT后再发送该配额请求。其中,上述某个固定时间可以为至少一个RTT,某个表达式可以为该至少一个RTT的整数倍。
举例来说,当源数据端发送的配额请求中的申请配额量为第二以太网报文需要的申请配额量时,若源数据端第一次接收到配额拒绝,源数据端则需要等待至少一个RTT后再重新发送该配额请求;若源数据端第二次接收到配额拒绝,源数据端则需要等待至少两个RTT后再重新发送该配额请求。
需要说明的是,上述一个固定时间和某个固定时间设置为至少一个RTT仅是示例性的说明,即上述一个固定时间和某个固定时间均可以设置为至少一个RTT,也可以根据实际需要设置为其他不同的时间,本发明不作限制。
可选的,若在源数据端发送配额请求后的第一预设时间内,该源数据端未接收到与该配额请求对应的配额响应,源数据端则可在 第一预设时间后,重新发送该配额请求。其中,该第一预设时间可以为至少两个RTT。
进一步地,上述第一预设时间优选的可以设置为至少两个RTT。当然,该第一预设时间也可以设置为其他任意满足要求的时间,本发明不作限制。
可选的,在源数据端接收到配额准许后的第二预设时间内,源数据端可发送源数据端需发送至目标数据端的数据。其中,该第二预设时间可以为至少一个RTT。
进一步地,上述第二预设时间优选的可以设置为至少一个RTT。当然,该第二预设时间也可以设置为其他任意满足要求的时间,本发明不作限制。
进一步地,如图12所示,在上述S401之前,本发明实施例提供的数据传输方法还可以包括:
S411、目标数据端发送触发配额请求至交换机。
当目标数据端中有空闲配额时,目标数据端可发送触发配额请求至交换机,该触发配额请求可用于触发源数据端发送配额请求。
特别的,上述触发配额请求中可以包括:空闲配额量和该触发配额请求的有效时间。其中,空闲配额量为目标数据端中未被数据占用的缓存量;触发配额请求的有效时间用于表示源数据端接收到该触发配额请求后多长时间内可以发送配额请求。
进一步地,源数据端在接收到触发配额请求后发送的配额请求可以为“加急保留配额请求”,用于请求交换机和目标数据端为该源数据端需发送至目标数据端的数据分配并预留配额。当然,若交换机中无空闲配额,交换机则可回复与该“加急保留配额请求”对应的配额拒绝至源数据端,并丢弃该“加急保留配额请求”。
进一步地,该触发配额请求的有效时间可以为至少一个RTT,还可以为其他任意满足实际需求的时间,具体的可以根据实际需求进行设置,本发明不作限制。
需要说明的,目标数据端可将上述触发配额请求夹带在以太网 报文的报头中传输。具体的,触发配额请求的传输方式与配额请求的传输方式类似,可参照S401中配额请求的传输方式的描述。
S412、交换机转发该触发配额请求至源数据端。
交换机接收目标数据端发送的触发配额请求后,交换机可转发该触发配额请求至源数据端。从而触发该源数据端发送配额请求,即触发该源数据端向交换机和目标数据端为源数据端需传输至目标数据端的数据申请配额,进而使得交换机和目标数据端为该数据预留配额。
示例性的,假设在数据中心以太网中包括源数据端、交换机、目标数据端,其中交换机可以有一个或多个,现在以一个交换机B为例来进一步说明本发明实施例提供的数据传输方法。具体的,如图13所示,当目标数据端中有空闲配额时,目标数据端可发送触发配额请求至交换机B,交换机B接收到该触发配额请求之后,交换机B可转发该触发配额请求至源数据端,以触发源数据端发送配额请求。
当源数据端发送的配额请求为紧急配额请求时,本发明实施例还提供一种数据传输方法,如图14所示,该方法可以包括:
S501、当源数据端中缓存的数据占用源数据端的缓存大于第一预设阈值时,源数据端发送紧急配额请求至交换机。
当源数据中缓存的数据占用源数据端的缓存大于该源数据端缓存量的第一预设域值时,源数据端则发送紧急配额请求至交换机。
特别的,紧急配额请求中包括:紧急申请配额量和紧急申请配额量的有效时间。具体的,该紧急申请配额量和该紧急申请配额量的有效时间,可以参照上述S401中,申请配额量和申请配额量的有效时间的描述。
可选的,在源数据端需发送至目标数据端的数据为高优先级数据时,源数据端也可以发送该紧急配额请求,其中,该高优先级数据可以为,该源数据端中缓存的所有数据中优先级最高的数据。
S502、若交换机中有空闲配额,交换机则根据收到的紧急配额 请求,为源数据端需发送至目标数据端的数据分配配额,并转发该紧急配额请求至目标数据端。
交换机接收源数据端发送的紧急配额请求之后,若交换机中有空闲配额,交换机则根据收到的紧急配额请求,为源数据端需发送至目标数据端的数据分配配额,并转发该紧急配额请求给目标数据端。
具体的,交换机根据该紧急配额请求为该数据分配配额的方法,可以参照上述S402中,交换机根据配额请求为该数据分配配额的描述。
S503、若目标数据端中有空闲配额,目标数据端则可根据该紧急配额请求为该数据分配配额,并回复与该紧急配额请求对应的配额准许至交换机。
目标数据端接收交换机转发的紧急配额请求后,若目标数据端中有空闲配额,目标数据端则可根据该紧急配额请求为源数据端需发送至目标数据端的数据分配配额,并回复与该紧急配额请求对应的配额准许至交换机,其中,配额准许可用于表征目标数据端为该数据分配配额。
S504、交换机转发该配额准许至源数据端。
交换机接收到目标数据端回复的配额准许后,由于交换机也已经为源数据端需发送至目标数据端的数据分配了配额,因此,该交换机可以转发该配额准许至源数据端。
S505、源数据端发送该数据至交换机。
源数据端接收交换机转发的配额准许后,源数据端可根据该配额准许获知交换机和目标数据端均为源数据端需发送至目标数据端的数据分配了配额,从而源数据端可直接发送该数据至交换机。
S506、交换机转发该数据至目标数据端。
交换机接收源数据端发送的数据之后,交换机可转发该数据至目标数据端,即源数据端完成该数据的传输。
需要说明的是,交换机接收到源数据端发送的数据之后,交换 机可将该数据缓存在交换机为该数据分配的配额中,且该交换机可转发该数据至目标数据端,由目标数据端将该数据缓存在目标数据端为该数据分配的配额中,并将该数据传输至本地内存中。
进一步地,如图15所示,在S501之后,本发明实施例提供的数据传输方法还可以包括:
S507、若交换机中无空闲配额,交换机则记录该紧急配额请求,并转发该紧急配额请求至目标数据端。
交换机接收紧急配额请求之后,若交换机中无空闲配额,交换机则记录收到的紧急配额请求在交换机中,并转发该紧急配额请求给目标数据端。
示例性的,假设在数据中心以太网中包括源数据端、交换机、目标数据端,其中交换机可以有一个或多个,现在以一个交换机C为例来进一步说明本发明实施例提供的数据传输方法。具体的,如图16所示,源数据端发送紧急配额请求至交换机C之后,若交换机C中无空闲配额,交换机C则可先在交换机C中记录收到的该紧急配额请求,并转发该紧急配额请求给目标数据端。
进一步的,如图17所示,在S502之后,本发明实施例提供的数据传输方法还可以包括:
S508、若目标数据端中无空闲配额,目标数据端则回复与该紧急配额请求对应的配额拒绝至交换机。
目标数据端接收交换机转发的紧急配额请求之后,若目标数据端中无空闲配额,目标数据端则可回复与该配额请求对应的配额拒绝至交换机,其中,该配额拒绝可用于表征目标数据端未为源数据端分配配额。
其中,目标数据端可将上述配额拒绝夹带在以太网报文的报头中传输。具体的,配额拒绝的传输方式与配额请求的传输方式类似,可参照S401中配额请求的传输方式的描述。
S509、交换机将该配额拒绝转发至源数据端。
交换机接收目标数据端回复的配额拒绝后,当交换机中仍然没 有空闲配额时,交换机则将该配额拒绝转发至源数据端,并丢弃该紧急配额请求。
需要说明的是,本发明实施例提供的数据传输方法中,目标数端接收到紧急配额请求后,当目标数据端中无空闲配额,目标数据端可等待某个时间。若在该某个时间内,目标数据端中出现的空闲配额可以满足该数据所需的配额,目标数据端则为该数据分配配额;若在该某个时间后,目标数据端中仍然无满足该数据所需的配额的空闲配额,目标数据端则可执行S508,即回复配额拒绝至交换机,再由交换机将该配额拒绝转发至源数据端,从而源数据端则不能发送该数据。
可选的,当源数据端发送配额请求或者紧急配额请求时,若交换机为该数据分配配额后,交换机接收到目标数据端发送的配额拒绝,交换机则可回收其为该数据分配的配额。
进一步的,如图18所示,在上述S507之后,本发明实施例提供的数据传输方法还可以包括:
S510、当交换机中出现空闲配额时,交换机根据该紧急配额请求,为该数据分配配额。
交换机收到源数据端发出的紧急配额请求,且交换机中无空闲配额时,交换机可记录该紧急配额请求,并转发该紧急配额请求至目标数据端。在交换机转发该紧急配额请求至目标数据端之后,当交换机中出现了空闲配额时,该交换机则可根据该紧急配额请求,为源数据端需发送给目标数据端的数据分配配额。其中,交换机中出现的空闲配额可以满足该数据所需的配额。
需要说明的是,在S507之后,当目标数据端中有空闲配额时,本发明不限制S510和S503的执行顺序,即本发明可以先执行S503,后执行S510;也可以先执行S510,后执行S503;还可以同时执行S503和S510,本发明不作限制。
进一步地,如图19所示,在S507之后,当目标数据端中无空闲配额时,本发明可以先执行S510,后执行S508;也可以同时执行 S508和S510,本发明不作限制。
进一步地,如图20所示,在S503之后,S505之前,本发明实施例提供的数据传输方法还可以包括:
S511、交换机根据该配额准许,设置配额分配标识,并丢弃该配额准许,其中,该配额分配标识可用于标识目标数据端为该数据分配了配额。
目标数据端回复配额准许至交换机之后,交换机可根据该配额准许,设置配额分配标识,并丢弃该配额准许,其中,该配额分配标识可用于标识目标数据端为该数据分配了配额。
特别的,若沿途交换机的数量有多个,则该配额分配标识可用于标识接收到该配额准许的交换机与目标数据端之间需经过的所有交换机和目标数据端为该数据分配了配额。
S512、交换机等待交换机中出现空闲配额后,根据该紧急配额请求,为该数据分配配额。
目标数据端回复配额准许至交换机后,交换机等待交换机中出现空闲配额后,交换机可根据该紧急配额请求为该源数据端需发送至目标数据端的数据分配配额。
S513、交换机生成配额准许,并发送该配额准许至源数据端。
交换机为该数据分配配额后,交换机可生成配额准许并发送该配额准许至源数据端。从而源数据端收交换机发送的该配额准许后,可获知交换机和目标数据端均为源数据端需发送至目标端的数据分配了配额,进而源数据端可以发送该数据。
需要说明的是,如图20所示,在S503之后,若交换机还未为该数据分配配额,交换机则需执行S511-S513,无需执行S504;相应的,如图18所示,若S503之后,交换机已经为该数据分配了配额,交换机则无需执行S511-S513,只需执行S504。
进一步的,如图21所示,若在S510之后执行S508,即在当该交换机中出现空闲配额时,交换机根据该紧急配额请求,为该数据分配配额之后,目标数据端回复与紧急配额请求对应的配额拒绝至 交换机,则本发明实施例提供的数据传输方法还可以包括:
S514、交换机回收为该数据分配的配额。
交换机中出现空闲配额时,该交换机根据该紧急配额请求,为该数据分配配额后,目标数据端回复与该紧急配额请求对应的配额拒绝至交换机,该交换机接收该配额拒绝后,该交换机回收为该数据分配的配额。
如图22所示,若在S502,即若交换机中有空闲配额,交换机则根据收到的紧急配额请求,为该源数据端需发送至目标数据端的数据分配配额,并转发该紧急配额请求至目标数据端之后,执行S508,即若目标数据端中无空闲配额,目标数据端则回复与该紧急配额请求对应的配额拒绝至交换机,则在执行S508之后,交换机可执行上述S514,即交换机回收其为该数据分配的配额。
进一步地,本发明不限制S509和S514的执行顺序,即本发明可以先执行S509,后执行S514;也可以先执行S514,后执行S509,还可以同时执行S509和S514。
进一步的,如图23所示,当源数据端发送配额请求时,在交换机为数据分配配额之后,本发明实施例提供的数据传输方法还可以包括S515;且在目标数据端为数据分配配额之后,本发明实施例提供的数据传输方法还可以包括S516,具体的:
S515、在第一预设时间后,交换机检查为该数据分配的配额中是否缓存有该数据,且若该配额中未缓存该数据,交换机则回收该配额。
交换机为源数据端需发送至目标数据端的数据分配配额之后,交换机等待第一预设时间后,交换机可检查其为该数据分配的配额中是否缓存有该数据,如果交换机检查其为该数据分配的配额中未缓存该数据,交换机则回收该配额。
S516、在第一预设时间后,目标数据端检查为该数据分配的配额中是否缓存有该数据,且若该配额中未缓存该数据,目标数据端则回收该配额。
目标数据端为源数据端需发送至目标数据端的数据分配配额之后,目标数据端等待第一预设时间后,目标数据端可检查其为该数据分配的配额中是否缓存有该数据,如果目标数据端检查其为该数据分配的配额中未缓存该数据,目标数据端则回收该配额。
可以理解的是,如图24所示,当源数据端发送紧急配额请求时,在交换机为数据分配配额之后,本发明实施例提供的数据传输方法还可以包括S515;且在目标数据端为数据分配配额之后,本发明实施例提供的数据传输方法还可以包括S516。
进一步的,如图25所示,在交换机转发该数据至目标数据端之后,本发明实施例提供的数据传输方法还可以包括S517;在目标数据端接收到该数据之后,本发明实施例提供的数据传输方法还可以包括S518-S519,具体的:
S517、交换机回收为该数据分配的配额。
交换机转发该数据至目标数据端之后,交换机可回收其为该数据分配的配额。
S518、目标数据端保存该数据至本地内存。
目标数据端接收交换机转发的该数据后,目标数据端可保存该数据至本地内存。
S519、目标数据端回收为该数据分配的配额。
目标数据端保存该数据至本地内存后,目标数据端可回收其为该数据分配的配额。
现有技术中,在数据传输时,数据中心以太网中的交换机通过增加缓存来应对拥塞,数据中心以太网通过限制网络规模以及过量提供网络资源来实现不丢包。当网络发生拥塞时,通过一种拥塞通告机制QCN,通告源数据端降低数据传输速率,试图解决网络拥塞,然而,通过QCN传输数据时,由于源数据端至被拥塞点之间存在滞后,因此可能导致拥塞点缓冲的部分数据溢出,从而无法保证数据无损传输。
数据中心以太网是一种尽力服务的网络模型,因此在数据中心 以太网中传输数据时,可能发生网络拥塞或丢包。本发明实施例提供一种数据传输方法,即源数据端在传输数据至目标数据端之前,向沿途交换机和目标数据端为该数据申请配额,并且只有在沿途交换机和目标数据端均为该数据分配了配额后,源数据端才开始传输该数据。因此,本发明实施例提供的数据传输方法在数据传输前,确认了数据传输路径的畅通,杜绝了网络拥塞问题的发生。从而,解决了现有技术中因为网络拥塞问题导致的浪费缓存流量,带宽利用不足,拥塞丢包的问题,节省了沿途交换机中的缓存,充分利用了网络带宽,保证了分布式业务的时效性和稳定性,并且本发明实施例提供的数据传输方法无需过量提供网络资源,且不受网络规模的限制,具有成本优势。
本发明实施例提供一种数据传输方法,通过源数据端发送配额请求,该配额请求用于请求沿途交换机和目标数据端为该源数据端需发送至目标数据端的数据分配配额,该配额用于缓存该数据,该沿途交换机包括从该源数据端至该目标数据端需经过的所有交换机,且该源数据端接收与该配额请求对应的配额响应,该配额响应用于表征该沿途交换机和该目标数据端是否为该数据分配配额,以及若该配额响应表征该沿途交换机和该目标数据端为该数据分配配额,该源数据端则发送该数据。通过该方案,由于源数据端在传输数据至目标数据端之前,源数据端可向沿途交换机和目标数据端为该数据申请配额,并且当沿途交换机和目标数据端均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输方法解决了网络拥塞的问题,保证了数据的无损传输。
实施例三
如图26所示,本发明实施例提供一种数据传输装置1,该数据传输装置1可以包括:
发送单元10,用于发送配额请求,所述配额请求用于请求沿途交换机和目标数据端为所述数据传输装置1需发送至所述目标数据 端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述数据传输装置1至所述目标数据端需经过的所有交换机;接收单元11,用于接收与所述发送单元10发送的所述配额请求对应的配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;所述发送单元10,还用于若所述接收单元11接收的所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,则发送所述数据。
进一步地,所述发送单元10,还用于若所述接收单元11接收的所述配额响应表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额,则重新发送所述配额请求。
可选的,所述接收单元11接收的所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
可选的,所述发送单元10,具体用于将所述配额请求夹带在以太网报文的报头中传输。
进一步地,如图27所示,所述数据传输装置1还可以包括处理单元12,所述数据为由多个以太网报文组成的报文队列,所述发送单元10发送的配额请求中包括申请配额量,
其中,所述处理单元12,用于从所述配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,所述第一以太网报文为位于所述报文队列队尾的报文;以及所述发送单元10,具体用于重新发送所述配额请求,所述配额请求中包括所述第一申请配额量。
可选的,所述发送单元10,具体用于若所述配额请求中的申请配额量为第二以太网报文需要的申请配额量,所述第二以太网报文为位于所述报文队列队首的报文,则在所述接收单元11每次接收到所述配额拒绝后的一个时间内,重新发送所述配额请求。
可选的,所述数据包括多个以太网报文,所述发送单元10发送的所述配额请求中包括申请配额量,
其中,所述发送单元10,具体用于重新发送所述配额请求,所述配额请求中包括所述多个以太网报文需要的申请配额量。
可选的,所述发送单元10,还用于在发送所述配额请求后的第一预设时间内,若所述接收单元11未接收到所述配额响应,则在所述第一预设时间后,重新发送所述配额请求。
可选的,所述发送单元10,具体用于在所述接收单元11接收到所述配额响应后的第二预设时间内,发送所述数据。
可选的,所述接收单元11,还用于在所述发送单元10发送配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述数据传输装置发送所述配额请求;
其中,所述发送单元10,具体用于根据所述接收单元11接收的所述触发配额请求,发送所述配额请求。
进一步地,所述接收单元11接收的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
可选的,所述发送单元10发送的所述配额请求中还包括所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
可选的,所述发送单元10,具体用于当所述数据传输装置中缓存的数据占用所述数据传输装置的缓存大于第一预设阈值时,发送紧急配额请求;以及所述接收单元11,具体用于接收与所述发送单元10发送的所述紧急配额请求对应的所述配额响应。
本发明实施例提供的数据传输装置1可以为通过交换机进行通信的设备,如手机、计算机等终端设备。
本发明实施例提供一种数据传输装置,由于数据传输装置在传输数据至目标数据端之前,数据传输装置可向沿途交换机和目标数据端为该数据申请配额,并且当沿途交换机和目标数据端均为该数据分配了配额后,数据传输装置才开始传输该数据,因此,与现有 技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输装置解决了网络拥塞的问题,保证了数据的无损传输。
如图28所示,本发明实施例提供一种数据传输装置2,该数据传输装置2可以包括:
接收单元20,用于接收配额请求,并接收与所述配额请求对应的配额响应,以及接收源数据端需发送至目标数据端的数据,所述配额请求用于请求沿途数据传输装置和所述目标数据端为所述数据分配配额,所述配额用于缓存所述数据,所述沿途数据传输装置包括从所述源数据端至所述目标数据端需经过的所有数据传输装置,所述数据传输装置2为所述沿途数据传输装置中的一个数据传输装置,所述配额响应用于表征所述沿途数据传输装置和所述目标数据端是否为所述数据分配所述配额,所述数据为当所述配额响应表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额时,所述源数据端发送的;分配单元21,用于若所述数据传输装置2中有空闲配额,则根据所述接收单元20接收的所述配额请求为所述数据分配所述配额;所述发送单元22,用于转发所述配额请求,并转发所述配额响应,以及转发所述数据。
进一步的,如图29所示,所述数据传输装置2还可以包括丢弃单元23,
所述发送单元22,还用于若所述数据传输装置2中无空闲配额,则回复与所述接收单元20接收的所述配额请求对应的第一配额拒绝,所述第一配额拒绝用于表征所述数据传输装置2未为所述数据分配所述配额;所述丢弃单元23,用于丢弃所述接收单元20接收的所述配额请求。
可选的,所述接收单元20接收的所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途数据 传输装置中的一个数据传输装置或所述目标数据端未为所述数据分配所述配额。
可选的,所述发送单元22,具体用于将所述第一配额拒绝夹带在以太网报文的报头中传输。
可选的,如图30所示,所述数据传输装置2还可以包括处理单元24,
所述处理单元24,用于在所述分配单元21根据所述配额请求为所述数据分配所述配额后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
进一步地,所述处理单元24,还用于在所述发送单元22转发所述数据之后,回收所述配额。
可选的,所述处理单元24,还用于若所述接收单元22接收的所述配额响应为所述配额拒绝,则回收所述配额。
可选的,所述接收单元20,还用于在接收配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求,所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间;所述发送单元22,还用于转发所述接收单元20接收的所述触发配额请求。
可选的,所述接收单元20接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途数据传输装置和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
可选的,所述接收单元20,具体用于接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
可选的,如图31所示,所述数据传输装置2还可以包括处理单元24,
所述处理单元24,用于若所述数据传输装置2中无空闲配额, 则记录所述接收单元20接收的所述紧急配额请求,且当与所述紧急配额请求对应的,所述接收单元20接收的所述配额响应表征所述目标数据端未为所述数据分配所述配额时,回收所述配额;所述发送单元22,还用于转发所述接收单元20接收的所述紧急配额请求,且当所述接收单元20接收的所述配额响应表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额时,转发所述配额响应,以及转发所述数据;所述接收单元20,还用于接收所述配额响应,并接收所述数据;所述分配单元21,还用于当所述数据传输装置中出现空闲配额时,根据所述接收单元20接收的所述紧急配额请求,为所述数据分配所述配额。
进一步地,如图32所示,所述数据传输装置2还可以包括丢弃单元23,
所述处理单元24,还用于当所述接收单元20接收的所述配额响应表征所述数据传输装置2与所述目标数据端之间需经过的所有数据传输装置和所述目标数据端为所述数据分配所述配额,且所述数据传输装置2未为所述数据分配所述配额时,根据所述配额响应,设置配额分配标识,并生成配额准许,所述配额分配标识用于标识所述数据传输装置2与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,所述配额准许用于表征所述数据传输装置2、所述数据传输装置2与所述目标数据端之间需经过的所有数据传输装置和所述目标数据端为所述数据分配所述配额和所述目标数据端为所述数据分配所述配额,所述丢弃单元23,用于丢弃所述接收单元20接收的所述配额响应,所述分配单元21,还用于等待所述数据传输装置2中出现空闲配额后,根据所述接收单元20接收的所述紧急配额请求,为所述数据分配所述配额,所述接收单元20,还用于接收所述数据,所述发送单元22,还用于发送所述配额准许,并转发所述接收单元20接收的所述数据;或者,所述发送单元22,还用于当所述配额响应表征所述目标数据端未为所述数据分配所述配额,且所述数据传输装置2未为所述数据分配所 述配额时,转发所述配额响应,所述丢弃单元23,用于丢弃所述接收单元20接收的所述紧急配额请求。
本发明实施例提供的数据传输装置2可以为交换机等设备。
本发明实施例提供一种数据传输装置,由于源数据端在传输数据至目标数据端之前,源数据端可向沿途数据传输装置和目标数据端为该数据申请配额,并且当沿途数据传输装置和目标数据端均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输装置解决了网络拥塞的问题,保证了数据的无损传输。
如图33所示,本发明实施例提供一种数据传输装置3,该数据传输装置3可以包括:
接收单元30,用于接收配额请求,并接收源数据端需发送至所述数据传输装置3的数据,所述配额请求用于请求沿途交换机和所述数据传输装置3为所述数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述数据传输装置3需经过的所有交换机;分配单元31,用于若所述数据传输装置3中有空闲配额,则根据所述接收单元30接收的所述配额请求为所述数据分配所述配额;发送单元32,用于回复与所述接收单元30接收的所述配额请求对应的配额准许,所述配额准许用于表征所述沿途交换机和所述数据传输装置3为所述数据分配所述配额。
可选的,所述发送单元32,还用于若所述数据传输装置3中无空闲配额,则回复配额拒绝,所述配额拒绝用于表征所述数据传输装置3未为所述数据分配所述配额。
进一步地,所述发送单元32,具体用于将所述配额准许/所述配额拒绝夹带在以太网报文的报头中传输。
进一步地,如图34所示,所述数据传输装置3还可以包括处理单元33,
所述处理单元33,用于在所述分配单元31根据所述配额请求 为所述数据分配所述配额之后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
进一步地,所述处理单元33,还用于在所述接收单元30接收所述数据之后,保存所述数据至本地内存,以及回收所述配额。
可选的,所述发送单元32,还用于在所述接收单元30接收配额请求之前,发送触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求。
进一步地,所述发送单元32发送的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
可选的,所述接收单元30接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述数据传输装置将所述申请配额量保留所述申请配额量的有效时间。
可选的,所述接收单元30,具体用于接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
本发明实施例提供的数据传输装置3可以为通过交换机进行通信的设备,如手机、计算机等终端设备。
本发明实施例提供一种数据传输装置,由于源数据端在传输数据至数据传输装置之前,源数据端可向沿途交换机和该数据传输装置为该数据申请配额,并且当沿途交换机和该数据传输装置均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输装置解决了网络拥塞的问题,保证了数据的无损传输。
实施例四
如图35所示,本发明实施例提供一种源数据端,该源数据端可以为通过交换机进行通信的设备,该源数据端可以包括处理器13、存储器14、系统总线15和通信接口16。处理器13、存储器14和 通信接口16之间通过系统总线15连接并完成相互间的通信。
处理器13可以为单核或多核中央处理单元,或者可以为特定集成电路,或者可以为被配置成实施本发明实施例的一个或多个集成电路。
存储器14可以为高速RAM存储器,也可以为非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
存储器14用于存储源数据端的执行指令。具体的,源数据端的执行指令中可以包括程序代码。
通信接口16为一个系统与其他系统进行通信的接口电路。
当源数据端运行时,所述处理器13可以执行图1或图4至图25任意之一所述的方法流程,具体包括:
所述处理器13,用于通过所述系统总线15,从所述通信接口16发送配额请求,所述配额请求用于请求沿途交换机和目标数据端为所述源数据端需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机,且所述处理器13通过所述系统总线15,从所述通信接口16接收与所述配额请求对应的配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额,以及若所述处理器13接收的所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述处理器13则通过所述系统总线15,从所述通信接口16发送所述数据;所述存储器14,用于存储所述数据的程序代码、所述配额请求的程序代码、所述配额响应的程序代码,以及控制所述处理器13完成上述过程的软件程序,从而使得所述处理器13通过执行上述软件程序并调用上述各个程序代码完成上述过程。
可选的,所述处理器13,还用于若接收到的所述配额响应表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额,则通过所述系统总线15,从所述通信接口16重新发送所述配额请求。
可选的,所述处理器13接收的所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
可选的,所述处理器13,具体用于将所述配额请求夹带在以太网报文的报头中传输。
可选的,所述数据为由多个以太网报文组成的报文队列,所述配额请求中包括申请配额量,其中,所述处理器13,还用于从所述配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,所述第一以太网报文为位于所述报文队列队尾的报文;并通过所述系统总线15,从所述通信接口16重新发送所述配额请求,所述配额请求中包括所述第一申请配额量。
可选的,所述处理器13,具体用于若所述配额请求中的申请配额量为第二以太网报文需要的申请配额量,所述第二以太网报文为位于所述报文队列队首的报文,则在每次接收到所述配额拒绝后的一个时间内,通过所述系统总线15,从所述通信接口16重新发送所述配额请求。
可选的,所述数据包括多个以太网报文,所述配额请求中包括申请配额量,
其中,所述处理器13,具体用于通过所述系统总线15,从所述通信接口16重新发送所述配额请求,所述配额请求中包括所述多个以太网报文需要的申请配额量。
可选的,所述处理器13,还用于在发送所述配额请求后的第一预设时间内,若所述处理器13未接收到所述配额响应,则在所述第一预设时间后,通过所述系统总线15,从所述通信接口16重新发送所述配额请求。
可选的,所述处理器13,具体用于在接收到所述配额响应后的第二预设时间内,通过所述系统总线15,从所述通信接口16发送 所述数据。
可选的,所述处理器13,还用于在发送配额请求之前,通过所述系统总线15,从所述通信接口16接收触发配额请求,并根据所述触发配额请求,通过所述系统总线15,从所述通信接口16发送所述配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求。
可选的,所述处理器13接收的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
可选的,所述处理器13发送的所述配额请求中还包括所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
可选的,所述处理器13,具体用于当所述存储器14中缓存的数据占用所述存储器14的缓存大于第一预设阈值时,通过所述系统总线15,从所述通信接口16发送紧急配额请求,并通过所述系统总线15,从所述通信接口16接收与所述紧急配额请求对应的所述配额响应。
本发明实施例提供的源数据端可以为通过交换机进行通信的设备,如手机、计算机等终端设备。
本发明实施例提供一种源数据端,由于源数据端在传输数据至数据传输装置之前,源数据端可向沿途交换机和该数据传输装置为该数据申请配额,并且当沿途交换机和该数据传输装置均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的源数据端解决了网络拥塞的问题,保证了数据的无损传输。
如图36所示,本发明实施例提供一种交换机,该交换机可以包括处理器25、存储器26、系统总线27和通信接口28。处理器25、存储器26和通信接口28之间通过系统总线27连接并完成相互间的通信。
处理器25的描述与上述实施例中处理器13的描述相同。
存储器26的描述与上述实施例中存储器14的描述相同。
通信接口28的描述与上述实施例中通信接口16的描述相同。
当交换机运行时,所述处理器25可以执行图2或图4至图25任意之一所述的方法流程,具体包括:
所述处理器25,用于通过所述系统总线27,从所述通信接口28接收配额请求,并接收与所述配额请求对应的配额响应,以及接收源数据端需发送至目标数据端的数据,所述配额请求用于请求沿途交换机和所述目标数据端为所述数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机,所述交换机为所述沿途交换机中的一个交换机,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额,所述数据为当所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额时,所述源数据端发送的,且所述处理器25,用于若所述交换机中有空闲配额,则根据所述处理器25,通过所述系统总线27,从所述通信接口28接收的所述配额请求为所述数据分配所述配额,以及所述处理器25,用于通过所述系统总线27,从所述通信接口28转发所述配额请求,并转发所述配额响应,以及转发所述数据。所述存储器26可用于存储所述配额请求的程序代码、存储所述配额响应的程序代码、存储所述数据的程序代码、以及控制所述处理器25完成上述过程的软件程序,从而使得所述处理器25通过执行上述软件程序并调用上述各个程序代码完成上述过程。
可选的,所述处理器25,还用于若所述交换机中无空闲配额,则通过所述系统总线27。从所述通信接口28回复与所述处理器25接收的所述配额请求对应的第一配额拒绝,所述第一配额拒绝用于表征所述交换机未为所述数据分配所述配额;所述处理器25,还用于丢弃所述配额请求。
可选的,所述处理器25,通过所述系统总线27和所述通信接口28接收的所述配额响应为配额准许或配额拒绝,其中,
所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
可选的,所述处理器25,具体用于将所述第一配额拒绝夹带在以太网报文的报头中传输。
可选的,所述处理器25,用于根据所述配额请求为所述数据分配所述配额后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
可选的,所述处理器25,还用于在转发所述数据之后,回收所述配额。
可选的,所述处理器25,还用于若所述处理器25,通过所述系统总线27,从所述通信接口28接收的所述配额响应为所述配额拒绝,则回收所述配额。
可选的,所述处理器25,还用于在接收配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求,所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间;所述处理器25,还用于转发所述触发配额请求。
可选的,所述处理器25,接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
可选的,所述处理器25,具体用于通过所述系统总线27和所述通信接口28接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
可选的,所述处理器25,用于若所述交换机中无空闲配额,则记录所述紧急配额请求,且当与所述紧急配额请求对应的,所述处理器25,接收的所述配额响应表征所述目标数据端未为所述数据分配所述配额时,所述处理器25回收所述配额;所述处理器25,还用于通过所述系统总线27,从所述通信接口28转发接收的所述紧 急配额请求,且当接收的所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额时,转发所述配额响应,以及转发所述数据;所述处理器25,还用于通过所述系统总线27和所述通信接口28接收所述配额响应,并接收所述数据;所述处理器25,还用于当所述交换机中出现空闲配额时,根据接收的所述紧急配额请求,为所述数据分配所述配额。
可选的,所述处理器25,还用于当所述处理器25,通过所述系统总线27,从所述通信接口28接收的所述配额响应表征所述交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,且所述交换机未为所述数据分配所述配额时,根据所述配额响应,设置配额分配标识,并生成配额准许,所述配额分配标识用于标识所述交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,所述配额准许用于表征所述交换机、所述交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,所述处理器25,用于丢弃所述配额响应,所述处理器25,还用于等待所述交换机中出现空闲配额后,根据所述处理器25,通过所述系统总线27,从所述通信接口28接收的所述紧急配额请求,为所述数据分配所述配额,所述处理器25,还用于通过所述系统总线27和所述通信接口28接收所述数据,所述处理器25,还用于通过所述系统总线27和所述通信接口28发送所述配额准许,并转发所述数据;或者,所述处理器25,还用于当所述配额响应表征所述目标数据端未为所述数据分配所述配额,且所述交换机未为所述数据分配所述配额时,转发所述配额响应,所述处理器25,用于丢弃所述接收的所述紧急配额请求。
本发明实施例提供一种交换机,由于源数据端在传输数据至数据传输装置之前,源数据端可向沿途交换机和该数据传输装置为该数据申请配额,并且当沿途交换机和该数据传输装置均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传 输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的交换机解决了网络拥塞的问题,保证了数据的无损传输。
如图37所示,本发明实施例提供一种目标数据端,该目标数据端可以为通过交换机进行通信的设备,该目标数据端可以包括处理器34、存储器35、系统总线36和通信接口37。处理器34、存储器35和通信接口37之间通过系统总线36连接并完成相互间的通信。
处理器34的描述与上述实施例中处理器13的描述相同。
存储器35的描述与上述实施例中存储器14的描述相同。
通信接口37的描述与上述实施例中通信接口16的描述相同。
当目标数据端运行时,处理器34可以执行图3至图7任意之一、图9或图11至图25任意之一所述的方法流程,具体包括:
所述处理器34,用于通过系统总线36,从通信接口37接收配额请求,并接收源数据端需发送至所述交换机的数据,所述配额请求用于请求沿途交换机和所述目标数据端为所述数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机,且所述处理器34,用于若所述目标数据端中有空闲配额,则根据接收的所述配额请求为所述数据分配所述配额,以及所述处理器34,用于通过系统总线36,从通信接口37回复与所述处理器34接收的所述配额请求对应的配额准许,所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额。所述存储器35,用于存储配额请求的程序代码、存储配额准许的程序代码、存储所述数据的程序代码,以及控制所述处理器34完成上述步骤的软件程序,从而使得所述处理器34通过执行上述软件程序并调用上述各个程序代码完成上述步骤。
可选的,所述处理器34,还用于若所述目标数据端中无空闲配额,则通过系统总线36,从通信接口37回复配额拒绝,所述配额拒绝用于表征所述目标数据端未为所述数据分配所述配额。
可选的,所述处理器34,具体用于将所述配额准许/所述配额拒绝夹带在以太网报文的报头中传输。
可选的,所述处理器34,用于在根据所述配额请求为所述数据分配所述配额之后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
可选的,所述处理器34,还用于在接收所述数据之后,保存所述数据至存储器35,以及回收所述配额。
可选的,所述处理器34,还用于在接收配额请求之前,通过系统总线36,从通信接口37发送触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求。
可选的,所述处理器34发送的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
可选的,所述处理器34,接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
可选的,所述处理器34,具体用于通过系统总线36,从通信接口37接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
本发明实施例提供的目标数据端可以为通过交换机进行通信的设备,如手机、计算机等终端设备。
本发明实施例提供一种目标数据端,由于源数据端在传输数据至数据传输装置之前,源数据端可向沿途交换机和该数据传输装置为该数据申请配额,并且当沿途交换机和该数据传输装置均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的目标数据端解决了网络拥塞的问题,保证了数据的无损传输。
实施例五
如图38所示,本发明实施例提供一种数据传输系统,该数据传输系统可以包括源数据端,至少一个交换机,目标数据端。
在本发明实施例提供的数据传输系统中,交换机的数量可以为 一个或多个,其中,该多个交换机中的每个交换机执行的方法均与本实施例中描述的交换机执行的方法相同,因此,为了方便清楚地描述本发明实施例提供的数据传输系统,本实施例以该数据传输系统中,只有一个交换机为例,示例性地说明该数据传输系统,具体的交换机的数量可根据实际情况来确定,本发明不作限制。
在本发明实施例提供的数据传输系统中,源数据端发送配额请求至交换机,该配额请求用于请求交换机和目标数据端为该源数据端需发送至目标数据端的数据分配配额,该配额用于缓存该数据,若该交换机中有空闲配额,该交换机则为该数据分配配额,并转发该配额请求至目标数据端,目标数据端接收到该配额请求之后,若目标数据端中有空闲配额,目标数据端则为该数据分配配额,并回复与该配额请求对应的配额准许至交换机,该交换机接收到该配额准许之后,转发该配额准许至源数据端,该配额准许表征交换机和该目标数据端为该数据分配了配额,因此源数据端收到该配额准许之后,源数据端则可直接发送该数据至交换机,由该交换机转发该数据至目标数据端,即完成了该数据的传输。
需要说明的是,本发明实施例提供的数据传输系统还可以应用于多个源数据端和多个目标数据端的场景,具体的源数据端和目标数据端之间传输数据的方法与上述实施例中所述的源数据端和目标数据端之间传输数据的方法类似,此处不再赘述。
本发明实施例提供一种数据传输系统,通过源数据端发送配额请求至交换机,该配额请求用于请求交换机和目标数据端为该源数据端需发送至目标数据端的数据分配配额,该配额用于缓存该数据,若该交换机中有空闲配额,该交换机则为该数据分配配额,并转发该配额请求至目标数据端,目标数据端接收到该配额请求之后,若目标数据端中有空闲配额,目标数据端则为该数据分配配额,并回复与该配额请求对应的配额准许至交换机,该交换机接收到该配额准许之后,转发该配额准许至源数据端,该配额准许表征交换机和该目标数据端为该数据分配了配额,因此源数据端收到该配额准许 之后,源数据端则可直接发送该数据至交换机,由该交换机转发该数据至目标数据端。通过该方案,由于源数据端在传输数据至目标数据端之前,源数据端可向沿途交换机和目标数据端为该数据申请配额,并且当沿途交换机和目标数据端均为该数据分配了配额后,源数据端才开始传输该数据,因此,与现有技术中传输数据时先“拥塞”后“管理”的方法相比,本发明实施例提供的数据传输系统解决了网络拥塞的问题,保证了数据的无损传输。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式 实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (47)

  1. 一种数据传输方法,其特征在于,包括:
    源数据端发送配额请求,所述配额请求用于请求沿途交换机和目标数据端为所述源数据端需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机;
    所述源数据端接收与所述配额请求对应的配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;
    若所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述源数据端则发送所述数据。
  2. 根据权利要求1所述的数据传输方法,其特征在于,所述方法还包括:
    若所述配额响应表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额,所述源数据端则重新发送所述配额请求。
  3. 根据权利要求1或2所述的数据传输方法,其特征在于,
    所述配额响应为配额准许或配额拒绝,其中,
    所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
  4. 根据权利要求2所述的数据传输方法,其特征在于,所述数据为由多个以太网报文组成的报文队列,所述配额请求中包括申请配额量,
    其中,所述源数据端则重新发送所述配额请求,包括:
    所述源数据端从所述配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,所述第一以太网报文为位于所述报文队列队尾的报文;
    所述源数据端则重新发送所述配额请求,所述配额请求中包括所 述第一申请配额量。
  5. 根据权利要求4所述的数据传输方法,其特征在于,若所述配额请求中的申请配额量为第二以太网报文需要的申请配额量,所述第二以太网报文为位于所述报文队列队首的报文,则所述源数据端则重新发送所述配额请求,包括:
    在所述源数据端每次接收到所述配额拒绝后的一个时间内,所述源数据端则重新发送所述配额请求。
  6. 根据权利要求2所述的数据传输方法,其特征在于,所述数据包括多个以太网报文,所述配额请求中包括申请配额量,
    其中,所述源数据端则重新发送所述配额请求,包括:
    所述源数据端则重新发送所述配额请求,所述配额请求中包括所述多个以太网报文需要的申请配额量。
  7. 根据权利要求1所述的数据传输方法,其特征在于,所述方法还包括:
    在所述源数据端发送所述配额请求后的第一预设时间内,若所述源数据端未接收到所述配额响应,所述源数据端则在所述第一预设时间后,重新发送所述配额请求。
  8. 根据权利要求1-7任一项所述的数据传输方法,其特征在于,所述源数据端则发送所述数据,包括:
    所述源数据端则在接收到所述配额响应后的第二预设时间内,所述源数据端发送所述数据。
  9. 根据权利要求1或3-8任一项所述的数据传输方法,其特征在于,所述源数据端发送配额请求之前,所述方法还包括:
    所述源数据端接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求;
    其中,所述源数据端发送配额请求,包括:
    所述源数据端根据所述触发配额请求,发送所述配额请求。
  10. 根据权利要求9所述的数据传输方法,其特征在于,
    所述触发配额请求中包括空闲配额量和所述触发配额请求的有 效时间。
  11. 根据权利要求4-10任一项所述的数据传输方法,其特征在于,
    所述配额请求中还包括所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
  12. 根据权利要求1所述的数据传输方法,其特征在于,当所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述配额请求为紧急配额请求,
    其中,所述源数据端发送配额请求;所述源数据端接收与所述配额请求对应的配额响应,包括:
    所述源数据端发送所述紧急配额请求;
    所述源数据端接收与所述紧急配额请求对应的所述配额响应。
  13. 一种数据传输方法,其特征在于,包括:
    第一交换机接收配额请求,所述配额请求用于请求沿途交换机和目标数据端为源数据端需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述源数据端至所述目标数据端需经过的所有交换机,所述第一交换机为所述沿途交换机中的一个交换机;
    若所述第一交换机中有空闲配额,所述第一交换机则:
    根据所述配额请求为所述数据分配所述配额,并转发所述配额请求;
    接收与所述配额请求对应的配额响应,并转发所述配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;
    接收所述数据,并转发所述数据,所述数据为当所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额时,所述源数据端发送的。
  14. 根据权利要求13所述的数据传输方法,其特征在于,所述 方法还包括:
    若所述第一交换机中无空闲配额,所述第一交换机则回复与所述配额请求对应的第一配额拒绝,并丢弃所述配额请求,所述第一配额拒绝用于表征所述第一交换机未为所述数据分配所述配额。
  15. 根据权利要求13或14所述的数据传输方法,其特征在于,
    所述配额响应为配额准许或配额拒绝,其中,
    所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额。
  16. 根据权利要求13-15任一项所述的数据传输方法,其特征在于,所述第一交换机根据所述配额请求为所述数据分配所述配额后,所述方法还包括:
    在第一预设时间后,所述第一交换机检查所述配额中是否缓存有所述数据;
    若所述配额中未缓存所述数据,所述第一交换机则回收所述配额。
  17. 根据权利要求13-16任一项所述的数据传输方法,其特征在于,所述第一交换机转发所述数据之后,所述方法还包括:
    所述第一交换机回收所述配额。
  18. 根据权利要求15-17任一项所述的数据传输方法,其特征在于,若所述配额响应为所述配额拒绝,则所述方法还包括:
    所述第一交换机回收所述配额。
  19. 根据权利要求13或15-18任一项所述的数据传输方法,其特征在于,所述第一交换机接收配额请求之前,所述方法还包括:
    所述第一交换机接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求,所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间;
    所述第一交换机转发所述触发配额请求。
  20. 根据权利要求13-19任一项所述的数据传输方法,其特征在 于,
    所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
  21. 根据权利要求13所述的数据传输方法,其特征在于,所述第一交换机接收配额请求,包括:
    所述第一交换机接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
  22. 根据权利要求21所述的数据传输方法,其特征在于,所述方法还包括:
    若所述第一交换机中无空闲配额,所述第一交换机则:
    记录所述紧急配额请求,并转发所述紧急配额请求;
    接收与所述紧急配额请求对应的所述配额响应;
    当所述第一交换机中出现空闲配额时,根据所述紧急配额请求,为所述数据分配所述配额;
    当所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额时,转发所述配额响应,并接收所述数据,以及转发所述数据,或者,
    当所述配额响应表征所述目标数据端未为所述数据分配所述配额时,转发所述配额响应,回收所述配额。
  23. 根据权利要求22所述的数据传输方法,其特征在于,所述方法还包括:
    当所述配额响应表征所述第一交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,且所述第一交换机未为所述数据分配所述配额时,所述第一交换机:
    根据所述配额响应,设置配额分配标识,并丢弃所述配额响应,所述配额分配标识用于标识所述第一交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,
    等待所述第一交换机中出现空闲配额后,根据所述紧急配额请求,为所述数据分配所述配额,
    生成配额准许,并发送所述配额准许,所述配额准许用于表征所述第一交换机、所述第一交换机与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,
    接收所述数据,并转发所述数据;或者,
    当所述配额响应表征所述目标数据端未为所述数据分配所述配额,且所述第一交换机未为所述数据分配所述配额时,所述第一交换机转发所述配额响应,并丢弃所述紧急配额请求。
  24. 一种数据传输装置,其特征在于,包括:
    发送单元,用于发送配额请求,所述配额请求用于请求沿途交换机和目标数据端为所述数据传输装置需发送至所述目标数据端的数据分配配额,所述配额用于缓存所述数据,所述沿途交换机包括从所述数据传输装置至所述目标数据端需经过的所有交换机;
    接收单元,用于接收与所述发送单元发送的所述配额请求对应的配额响应,所述配额响应用于表征所述沿途交换机和所述目标数据端是否为所述数据分配所述配额;
    所述发送单元,还用于若所述接收单元接收的所述配额响应表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,则发送所述数据。
  25. 根据权利要求24所述的数据传输装置,其特征在于,
    所述发送单元,还用于若所述接收单元接收的所述配额响应表征所述沿途交换机中的一个交换机或所述目标数据端未为所述数据分配所述配额,则重新发送所述配额请求。
  26. 根据权利要求24或25所述的数据传输装置,其特征在于,
    所述接收单元接收的所述配额响应为配额准许或配额拒绝,其中,
    所述配额准许用于表征所述沿途交换机和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途交换机中的一 个交换机或所述目标数据端未为所述数据分配所述配额。
  27. 根据权利要求25所述的数据传输装置,其特征在于,所述数据传输装置还包括处理单元,所述数据为由多个以太网报文组成的报文队列,所述发送单元发送的配额请求中包括申请配额量,
    其中,所述处理单元,用于从所述配额请求中的申请配额量中减去第一以太网报文需要的申请配额量,以得到第一申请配额量,所述第一以太网报文为位于所述报文队列队尾的报文;
    所述发送单元,具体用于重新发送所述配额请求,所述配额请求中包括所述第一申请配额量。
  28. 根据权利要求27所述的数据传输装置,其特征在于,
    所述发送单元,具体用于若所述配额请求中的申请配额量为第二以太网报文需要的申请配额量,所述第二以太网报文为位于所述报文队列队首的报文,则在所述接收单元每次接收到所述配额拒绝后的一个时间内,重新发送所述配额请求。
  29. 根据权利要求25所述的数据传输装置,其特征在于,所述数据包括多个以太网报文,所述发送单元发送的所述配额请求中包括申请配额量,
    其中,所述发送单元,具体用于重新发送所述配额请求,所述配额请求中包括所述多个以太网报文需要的申请配额量。
  30. 根据权利要求24所述的数据传输装置,其特征在于,
    所述发送单元,还用于在发送所述配额请求后的第一预设时间内,若所述接收单元未接收到所述配额响应,则在所述第一预设时间后,重新发送所述配额请求。
  31. 根据权利要求24-30任一项所述的数据传输装置,其特征在于,
    所述发送单元,具体用于在所述接收单元接收到所述配额响应后的第二预设时间内,发送所述数据。
  32. 根据权利要求24或26-31任一项所述的数据传输装置,其特征在于,
    所述接收单元,还用于在所述发送单元发送配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述数据传输装置发送所述配额请求;
    其中,所述发送单元,具体用于根据所述接收单元接收的所述触发配额请求,发送所述配额请求。
  33. 根据权利要求32所述的数据传输装置,其特征在于,
    所述接收单元接收的所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间。
  34. 根据权利要求27-33任一项所述的数据传输装置,其特征在于,
    所述发送单元发送的所述配额请求中还包括所述申请配额量的有效时间,用于请求所述沿途交换机和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
  35. 根据权利要求24所述的数据传输装置,其特征在于,
    所述发送单元,具体用于当所述数据传输装置中缓存的数据占用所述数据传输装置的缓存大于第一预设阈值时,发送紧急配额请求;
    所述接收单元,具体用于接收与所述发送单元发送的所述紧急配额请求对应的所述配额响应。
  36. 一种数据传输装置,其特征在于,包括:
    接收单元,用于接收配额请求,并接收与所述配额请求对应的配额响应,以及接收源数据端需发送至目标数据端的数据,所述配额请求用于请求沿途数据传输装置和所述目标数据端为所述数据分配配额,所述配额用于缓存所述数据,所述沿途数据传输装置包括从所述源数据端至所述目标数据端需经过的所有数据传输装置,所述数据传输装置为所述沿途数据传输装置中的一个数据传输装置,所述配额响应用于表征所述沿途数据传输装置和所述目标数据端是否为所述数据分配所述配额,所述数据为当所述配额响应表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额时,所述源数据端发送的;
    分配单元,用于若所述数据传输装置中有空闲配额,则根据所述接收单元接收的所述配额请求为所述数据分配所述配额;
    所述发送单元,用于转发所述配额请求,并转发所述配额响应,以及转发所述数据。
  37. 根据权利要求36所述的数据传输装置,其特征在于,所述数据传输装置还包括丢弃单元,
    所述发送单元,还用于若所述数据传输装置中无空闲配额,则回复与所述接收单元接收的所述配额请求对应的第一配额拒绝,所述第一配额拒绝用于表征所述数据传输装置未为所述数据分配所述配额;
    所述丢弃单元,用于丢弃所述接收单元接收的所述配额请求。
  38. 根据权利要求36或37所述的数据传输装置,其特征在于,
    所述接收单元接收的所述配额响应为配额准许或配额拒绝,其中,
    所述配额准许用于表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额,所述配额拒绝用于表征所述沿途数据传输装置中的一个数据传输装置或所述目标数据端未为所述数据分配所述配额。
  39. 根据权利要求36-38任一项所述的数据传输装置,其特征在于,所述数据传输装置还包括处理单元,
    所述处理单元,用于在所述分配单元根据所述配额请求为所述数据分配所述配额后,在第一预设时间后,检查所述配额中是否缓存有所述数据,以及若所述配额中未缓存所述数据,则回收所述配额。
  40. 根据权利要求39所述的数据传输装置,其特征在于,
    所述处理单元,还用于在所述发送单元转发所述数据之后,回收所述配额。
  41. 根据权利要求39或40所述的数据传输装置,其特征在于,
    所述处理单元,还用于若所述接收单元接收的所述配额响应为所述配额拒绝,则回收所述配额。
  42. 根据权利要求36或38-41任一项所述的数据传输装置,其 特征在于,
    所述接收单元,还用于在接收配额请求之前,接收触发配额请求,所述触发配额请求用于触发所述源数据端发送所述配额请求,所述触发配额请求中包括空闲配额量和所述触发配额请求的有效时间;
    所述发送单元,还用于转发所述接收单元接收的所述触发配额请求。
  43. 根据权利要求36-42任一项所述的数据传输装置,其特征在于,
    所述接收单元接收的所述配额请求中包括申请配额量和所述申请配额量的有效时间,用于请求所述沿途数据传输装置和所述目标数据端将所述申请配额量保留所述申请配额量的有效时间。
  44. 根据权利要求36所述的数据传输装置,其特征在于,
    所述接收单元,具体用于接收紧急配额请求,所述紧急配额请求为所述源数据端中缓存的数据占用所述源数据端的缓存大于第一预设阈值时,所述源数据端发送的。
  45. 根据权利要求44所述的数据传输装置,其特征在于,所述数据传输装置还包括处理单元,
    所述处理单元,用于若所述数据传输装置中无空闲配额,则记录所述接收单元接收的所述紧急配额请求,且当与所述紧急配额请求对应的,所述接收单元接收的所述配额响应表征所述目标数据端未为所述数据分配所述配额时,回收所述配额;
    所述发送单元,还用于转发所述接收单元接收的所述紧急配额请求,且当所述接收单元接收的所述配额响应表征所述沿途数据传输装置和所述目标数据端为所述数据分配所述配额时,转发所述配额响应,以及转发所述数据;
    所述接收单元,还用于接收所述配额响应,并接收所述数据;
    所述分配单元,还用于当所述数据传输装置中出现空闲配额时,根据所述接收单元接收的所述紧急配额请求,为所述数据分配所述配额。
  46. 根据权利要求45所述的数据传输装置,其特征在于,所述数据传输装置还包括丢弃单元,
    所述处理单元,还用于当所述接收单元接收的所述配额响应表征所述数据传输装置与所述目标数据端之间需经过的所有数据传输装置和所述目标数据端为所述数据分配所述配额,且所述数据传输装置未为所述数据分配所述配额时,根据所述配额响应,设置配额分配标识,并生成配额准许,所述配额分配标识用于标识所述数据传输装置与所述目标数据端之间需经过的所有交换机和所述目标数据端为所述数据分配所述配额,所述配额准许用于表征所述数据传输装置、所述数据传输装置与所述目标数据端之间需经过的所有数据传输装置和所述目标数据端为所述数据分配所述配额,
    所述丢弃单元,用于丢弃所述接收单元接收的所述配额响应,
    所述分配单元,还用于等待所述数据传输装置中出现空闲配额后,根据所述接收单元接收的所述紧急配额请求,为所述数据分配所述配额,
    所述接收单元,还用于接收所述数据,
    所述发送单元,还用于发送所述配额准许,并转发所述接收单元接收的所述数据;或者,
    所述发送单元,还用于当所述配额响应表征所述目标数据端未为所述数据分配所述配额,且所述数据传输装置未为所述数据分配所述配额时,转发所述配额响应,
    所述丢弃单元,用于丢弃所述接收单元接收的所述紧急配额请求。
  47. 一种数据传输系统,其特征在于,包括:
    如权利要求24-35任一项所述的数据传输装置、至少一个如权利要求36-46任一项所述的数据传输装置,以及目标数据端,
    其中,所述如权利要求24-35任一项所述的数据传输装置为源数据端,所述至少一个如权利要求36-46任一项所述的数据传输装置为交换机,所述源数据端与所述目标数据端之间通过所述交换机传输数 据。
PCT/CN2014/091382 2014-05-29 2014-11-18 一种数据传输方法、装置及系统 WO2015180426A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410234515.8A CN104022961A (zh) 2014-05-29 2014-05-29 一种数据传输方法、装置及系统
CN201410234515.8 2014-05-29

Publications (1)

Publication Number Publication Date
WO2015180426A1 true WO2015180426A1 (zh) 2015-12-03

Family

ID=51439535

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/091382 WO2015180426A1 (zh) 2014-05-29 2014-11-18 一种数据传输方法、装置及系统

Country Status (2)

Country Link
CN (1) CN104022961A (zh)
WO (1) WO2015180426A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597075A (zh) * 2020-12-28 2021-04-02 海光信息技术股份有限公司 用于路由器的缓存分配方法、片上网络及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104022961A (zh) * 2014-05-29 2014-09-03 华为技术有限公司 一种数据传输方法、装置及系统
CN104917694A (zh) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 一种基于优先级的流量控制方法
CN113852589B (zh) * 2020-06-28 2023-10-24 华为技术有限公司 用于数据传输和数据接收的方法、设备和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030067942A1 (en) * 2000-11-27 2003-04-10 Peter Altenbernd Method for bandwidth reservation in data networks
CN102377662A (zh) * 2010-08-25 2012-03-14 北京中星微电子有限公司 一种视频监控中面向带宽适应的路由缓存协商方法和系统
CN102447736A (zh) * 2011-11-17 2012-05-09 华中科技大学 一种多方网络存储系统中用户配额管理和控制方法
CN103493449A (zh) * 2011-04-28 2014-01-01 微软公司 分组交换网络中的有效电路
CN104022961A (zh) * 2014-05-29 2014-09-03 华为技术有限公司 一种数据传输方法、装置及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005318073A (ja) * 2004-04-27 2005-11-10 Hitachi Ltd 通信装置、その動作プログラム、及び通信方法
KR20090047426A (ko) * 2009-04-16 2009-05-12 정영삼 통신 네트워크의 실시간 데이터 전송에서 피투피 전송과 실시간 데이터 서버를 동시에 이용하여 실시간 데이터를 전송하는 방법
JP5539161B2 (ja) * 2010-11-04 2014-07-02 株式会社Tbsテレビ データ伝送方式、及び、複数拠点データ配信方式
CN103840910A (zh) * 2012-11-22 2014-06-04 深圳市腾讯计算机系统有限公司 一种数据传输控制方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030067942A1 (en) * 2000-11-27 2003-04-10 Peter Altenbernd Method for bandwidth reservation in data networks
CN102377662A (zh) * 2010-08-25 2012-03-14 北京中星微电子有限公司 一种视频监控中面向带宽适应的路由缓存协商方法和系统
CN103493449A (zh) * 2011-04-28 2014-01-01 微软公司 分组交换网络中的有效电路
CN102447736A (zh) * 2011-11-17 2012-05-09 华中科技大学 一种多方网络存储系统中用户配额管理和控制方法
CN104022961A (zh) * 2014-05-29 2014-09-03 华为技术有限公司 一种数据传输方法、装置及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597075A (zh) * 2020-12-28 2021-04-02 海光信息技术股份有限公司 用于路由器的缓存分配方法、片上网络及电子设备
CN112597075B (zh) * 2020-12-28 2023-02-17 成都海光集成电路设计有限公司 用于路由器的缓存分配方法、片上网络及电子设备

Also Published As

Publication number Publication date
CN104022961A (zh) 2014-09-03

Similar Documents

Publication Publication Date Title
KR101468833B1 (ko) 계층적 프로파일 스케줄링 및 쉐이핑
KR100875739B1 (ko) Ip 네트워크 시스템에서의 패킷 버퍼 관리 장치 및 방법
CN107534981B (zh) 资源重分配
JP5205519B2 (ja) 帯域幅割り当て方法及びルーティング装置
WO2018195728A1 (zh) 一种客户业务传输方法和装置
EP2685758A1 (en) Method, device and system for scheduling data flow
WO2018032991A1 (zh) 一种数据处理方法及装置
WO2015180426A1 (zh) 一种数据传输方法、装置及系统
US10911364B2 (en) Packet processing method and router
WO2019105317A1 (zh) 一种业务报文发送的方法、网络设备和系统
JP7487316B2 (ja) サービスレベル構成方法および装置
KR101426217B1 (ko) 예약된 스트림의 최대 레이턴시를 감소시키는 방법
CN114079638A (zh) 多协议混合网络的数据传输方法、装置和存储介质
CN109995664B (zh) 一种发送数据流的方法、设备和系统
JP2020072336A (ja) パケット転送装置、方法、及びプログラム
JP2024514643A (ja) パケット転送方法、装置、およびシステム、並びにコンピュータ可読記憶媒体
JP2017511991A5 (zh)
CN112838992A (zh) 报文调度方法及网络设备
JP2016046669A (ja) パケット処理装置、プログラム及び方法
JPH1132083A (ja) 交換網および交換装置
JP6211257B2 (ja) 通信システム
CN109327402B (zh) 拥塞管理方法及装置
WO2022237860A1 (zh) 报文处理方法、资源分配方法以及相关设备
WO2020143509A1 (zh) 传输数据的方法和网络设备
CN114363434A (zh) 一种视频帧发送方法和网络设备

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: 14893598

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14893598

Country of ref document: EP

Kind code of ref document: A1