CN-122001522-A - Data transmission method and device and computing equipment
Abstract
The embodiment of the application provides a data transmission method, a data transmission device and a computing device, relates to the technical field of computers, and can improve the sending efficiency of target data. The method is applied to transmission of target data between a sending device and a receiving device based on a plurality of links, the sum of rated rates of the links is an expected rate, the expected rate is the rate of completing transmission of the target data within a preset time period, the method comprises the steps of obtaining the actual rate of each link in the links in the process of transmitting the target data based on the links, increasing the rated rate of a first link in the links when the sum of the actual rates of the links is smaller than the expected rate, and decreasing the rated rate of a second link in the links, wherein the actual rate of the first link is equal to the rated rate of the first link, and the actual rate of the second link is smaller than the rated rate of the second link, and the sum of the rated rates after adjustment of the links is the expected rate.
Inventors
- JI ZHIGANG
- Fei Xincai
- WANG RUOYU
- JI CHAOYANG
- YANG GUODONG
- YANG YONGQIANG
Assignees
- 华为云计算技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241107
Claims (20)
- 1. A data transmission method is characterized in that target data is transmitted between a sending device and a receiving device based on a plurality of links, the sum of rated rates of the links is an expected rate, and the expected rate is the rate of completing the transmission of the target data within a preset duration, and the method comprises the following steps: Acquiring the actual rate of each link in a plurality of links in the process of transmitting target data based on the links; And under the condition that the sum of the actual rates of the links is smaller than the expected rate, increasing the rated rate of a first link in the links, and reducing the rated rate of a second link in the links, wherein the actual rate of the first link is equal to the rated rate of the first link, and the actual rate of the second link is smaller than the rated rate of the second link, and the sum of the rated rates after the links are adjusted is the expected rate.
- 2. The method of claim 1, wherein said increasing the nominal rate of a first link of said plurality of links comprises: And increasing the rated rate of the first links by a first value, wherein the first value corresponding to any one of the first links is greater than or equal to 0, the sum of the first values corresponding to all the first links is equal to the value of a first differential rate, and the first differential rate is the difference between the expected rate and the sum of the actual rates of the links.
- 3. The method of claim 2, wherein the first value corresponding to any one of the first links is an average value that equally distributes the first differential rate to all of the first links.
- 4. A method according to any of claims 1-3, wherein said reducing the nominal rate of a second link of said plurality of links comprises: And reducing the rated rate of the second links by a second value, wherein the second value corresponding to any one of the second links is larger than or equal to 1, the second value corresponding to one second link is inversely proportional to the difference value between the actual rate of the second link and the rated rate, the sum of the second values corresponding to all the second links is equal to the value of a first differential rate, and the first differential rate is the difference value between the expected rate and the sum of the actual rates of the links.
- 5. The method of claim 4, wherein the adjusted nominal Rate tp_rate_limit_after of the second link j satisfies the following expression: TP_Rate_Limit_After=TP_Rate_Limit_Before-W j ×(DDL_Rate-TPG_Rate) wherein TP_Rate_Limit_Beforeis the rated Rate of the second link j Before adjustment, DDL_Rate is the expected Rate, TPG_Rate is the sum of the actual rates of the multiple links, W j is the weight value of the reduction of the rated Rate of the second link j, and W j satisfies the following expression: W j =(1-(tp_rate j ÷∑tp_rate))÷(count(tp j )-1) Where tp_rate j is the actual rate of the second link j, Σtp_rate is the sum of the actual rates of all second links, and count (tp j ) is the number of all second links.
- 6. The method of any of claims 1-5, wherein in the absence of the first link in the plurality of links, the method further comprises: Deleting target links in the links, wherein the target links are the first N links with actual rates distributed from small to large in the links, and N is an integer greater than 0; Creating N alternative links, wherein the sum of the rated rates of the N alternative links is equal to the sum of the total rated rate of the N target links and a second differential rate, and the second differential rate is the difference between the total rated rate of all non-target links and the total actual rate of all non-target links, and the non-target links are links with actual rates greater than the actual rate of any one of the target links; And reducing the rated rate of each non-target link according to the second differential rate, wherein the difference between the actual rate and the rated rate of one non-target link is inversely proportional to the reduction of the rated rate of the one non-target link.
- 7. The method according to any one of claims 1-6, further comprising: Determining whether a failed link exists in the plurality of links; The increasing the rated rate of a first link of the plurality of links and decreasing the rated rate of a second link of the plurality of links includes: And in the case that the fault link does not exist in the links, increasing the rated rate of the first link in the links and reducing the rated rate of the second link in the links.
- 8. The method of claim 7, wherein in the event that the failed link exists among the plurality of links, the method comprises: And deleting the fault link and creating a healthy link, wherein the rated rate of the healthy link is the rated rate of the fault link.
- 9. The method according to any one of claims 1-8, further comprising: The expected rate is obtained.
- 10. The method of claim 9, wherein the obtaining the expected rate comprises: Acquiring the data volume of the target data and the preset duration; And determining the quotient of the data quantity of the target data and the preset duration as the expected rate.
- 11. The data transmission device is characterized in that target data is transmitted between a sending device and a receiving device based on a plurality of links, the sum of rated rates of the links is an expected rate, and the expected rate is the rate of completing the transmission of the target data within a preset duration; The receiving and transmitting module is used for acquiring the actual speed of each link in the plurality of links in the process of transmitting the target data based on the plurality of links; The adjusting module is configured to increase a rated rate of a first link in the plurality of links and decrease a rated rate of a second link in the plurality of links when a sum of actual rates of the plurality of links is less than the expected rate, where the sum of the rated rates after adjustment of the plurality of links is the expected rate.
- 12. The apparatus of claim 11, wherein the device comprises a plurality of sensors, The adjustment module is configured to increase the rated rate of the first link by a first value, where the first value corresponding to any one of the first links is greater than or equal to 0, and a sum of the first values corresponding to all the first links is equal to a value of a first differential rate, where the first differential rate is a difference between the expected rate and a sum of actual rates of the multiple links.
- 13. The apparatus of claim 12, wherein the first value corresponding to any one of the first links is an average value that equally distributes the first differential rate to all of the first links.
- 14. The device according to any one of claims 11-13, wherein, The adjustment module is configured to reduce the rated rate of the second link by a second value, where the second value corresponding to any one of the second links is greater than or equal to 1, the second value corresponding to one of the second links is inversely proportional to a difference between the actual rate of the one second link and the rated rate, and a sum of the second values corresponding to all of the second links is equal to a value of a first differential rate, where the first differential rate is a difference between the expected rate and a sum of the actual rates of the plurality of links.
- 15. The apparatus of claim 14, wherein the adjusted nominal Rate tp_rate_limit_after of the second link j satisfies the following expression: TP_Rate_Limit_After=TP_Rate_Limit_Before-W j ×(DDL_Rate-TPG_Rate) wherein TP_Rate_Limit_Beforeis the rated Rate of the second link j Before adjustment, DDL_Rate is the expected Rate, TPG_Rate is the sum of the actual rates of the multiple links, W j is the weight value of the reduction of the rated Rate of the second link j, and W j satisfies the following expression: W j =(1-(tp_rate j ÷∑tp_rate))÷(count(tp j )-1) Where tp_rate j is the actual rate of the second link j, Σtp_rate is the sum of the actual rates of all second links, and count (tp j ) is the number of all second links.
- 16. The device according to any one of claims 11-15, wherein, The adjusting module is configured to delete a target link of the plurality of links when the first link does not exist in the plurality of links, where the target link is a first N links with actual rates arranged from small to large in the plurality of links, and N is an integer greater than 0; The adjustment module is configured to create N alternative links, where the sum of the rated rates of the N alternative links is equal to the sum of the total rated rate of the N target links and a second differential rate, where the second differential rate is a difference between the total rated rate of all non-target links and the total actual rate of all non-target links, and the non-target links are links whose actual rates are greater than the actual rate of any of the target links; The adjusting module is configured to reduce the rated rate of each non-target link according to the second differential rate, where a difference between the actual rate and the rated rate of one non-target link is inversely proportional to the reduction of the rated rate of the one non-target link.
- 17. The apparatus according to any one of claims 11-16, wherein the data transmission apparatus further comprises a determination module; the determining module is used for determining whether a fault link exists in the links; The adjusting module is configured to increase the rated rate of the first link in the plurality of links and decrease the rated rate of the second link in the plurality of links when the failed link does not exist in the plurality of links.
- 18. The apparatus of claim 17, wherein the device comprises a plurality of sensors, The adjusting module is used for deleting the fault link and creating a healthy link under the condition that the fault link exists in the links, and the rated rate of the healthy link is the rated rate of the fault link.
- 19. The device according to any one of claims 11-18, wherein, The transceiver module is configured to obtain the expected rate.
- 20. The apparatus of claim 19, wherein the device comprises a plurality of sensors, The receiving and transmitting module is used for acquiring the data volume of the target data and the preset duration; the determining module is used for determining the quotient of the data volume of the target data and the preset duration as the expected speed.
Description
Data transmission method and device and computing equipment Technical Field The present invention relates to the field of computer technologies, and in particular, to a data transmission method, apparatus, and computing device. Background With the continuous development of computer technology, it has become one of the main ways to transmit data between devices. A common data transmission method includes that a transmitting end creates a transmission link between the transmitting end and a receiving end based on a transmission control protocol (transmission control protocol, TCP) or a user datagram protocol (user datagram protocol, UDP), and then the transmitting end transmits target data to be transmitted to the receiving end through the transmission link, so that the receiving end receives the target data. The transmission link is configured with a nominal rate to ensure that the target data can be sent to the receiving end within a preset duration. However, in a high concurrency scenario, when the actual rate of the target data transmitted by the transmission link cannot reach the rated rate of the link, the target data cannot be sent to the receiving end within a preset duration, and the sending efficiency of the target data is reduced. Disclosure of Invention The application provides a data transmission method, a data transmission device and a computing device, which can improve the sending efficiency of target data. In order to achieve the above purpose, the embodiment of the application adopts the following technical scheme: In a first aspect, an embodiment of the present application provides a data transmission method, where target data is transmitted between a transmitting device and a receiving device based on multiple links, where a sum of rated rates of the multiple links is an expected rate, where the expected rate is a rate at which transmission of the target data is completed within a preset duration, and the method includes acquiring an actual rate of each of the multiple links in a process of transmitting the target data based on the multiple links, increasing a rated rate of a first link of the multiple links when the sum of the actual rates of the multiple links is less than the expected rate, decreasing a rated rate of a second link of the multiple links, where the actual rate of the first link is equal to the rated rate of the first link, and the actual rate of the second link is less than the rated rate of the second link, where the sum of the rated rates of the multiple links after adjustment is the expected rate. The embodiment of the application provides a data transmission method, because the sum of the rated rates of the links after adjustment is the expected rate, the total transmission resources of the links are not changed, but the blocked second link reduces the occupation of the transmission resources by reducing the rated rate of the second link with smaller transmission rate, and the reduction of the rated rate of the second link is increased to the rated rate of the first link with higher transmission rate, so that the first link with higher transmission rate transmits more data at higher rate, thereby ensuring that the target data is transmitted within the preset duration, and the transmission efficiency of the target data is improved. In one possible implementation manner, the increasing the rated rate of the first link in the plurality of links includes increasing the rated rate of the first link by a first value, where the first value corresponding to any one of the first links is greater than or equal to 0, and the sum of the first values corresponding to all the first links is equal to the value of a first differential rate, where the first differential rate is a difference between the expected rate and the sum of the actual rates of the plurality of links. In the above embodiment, since the actual rates of all the first links reach their rated rates, the first differential rates are equally distributed as the increment to all the first links, that is, the first value corresponding to any one of the first links is the average value of the first differential rates equally distributed to all the first links, thereby improving the fairness guarantee of the first links. In one possible implementation, the first value corresponding to any one of the first links is an average value that assigns the first differential rate to all of the first links. In one possible implementation manner, the reducing the rated rate of the second links in the plurality of links includes reducing the rated rate of the second links by a second value, wherein the second value corresponding to any one of the second links is greater than or equal to 1, the second value corresponding to one of the second links is inversely proportional to the difference between the actual rate of the one second link and the rated rate, and the sum of the second values corresponding to all of the second links is equ