Bandwidth flow control method and apparatus, storage medium

By dynamically controlling client download traffic by predicting future bandwidth values, the problem of uneven bandwidth traffic and waste in existing technologies is solved, thereby improving bandwidth utilization and user experience.

CN116233028BActive Publication Date: 2026-01-30ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310260427.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2026-01-30
Estimated Expiration
2043-03-10

AI Technical Summary

Technical Problem

Existing technologies suffer from unevenness and waste in bandwidth traffic control, resulting in low utilization of bandwidth billing points and an inability to effectively utilize off-peak and peak bandwidth, thus affecting user experience.

Method used

By determining the billing bandwidth value at the current time point and the actual bandwidth value at historical sampling time points, the predicted bandwidth value at future sampling time points is predicted, and the client's download traffic is dynamically controlled to avoid bandwidth fluctuations and waste.

Benefits of technology

It enables dynamic control of bandwidth traffic, improves the utilization rate of billed bandwidth, reduces bandwidth traffic waste, and ensures uniformity of download traffic and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233028B_ABST
    Figure CN116233028B_ABST
Patent Text Reader

Abstract

This disclosure provides a bandwidth traffic control method, apparatus, and storage medium. The bandwidth traffic control method includes: determining the billable bandwidth value corresponding to the current time point; predicting the predicted bandwidth value for the next future sampling time point based on the actual bandwidth values ​​at historical sampling time points; and determining whether to respond to the client's download requests within the current time period based on the billable bandwidth value and the predicted bandwidth value at the current time point, thereby controlling the client's download traffic. The current time period is the time interval between the previous historical sampling time point and the next future sampling time point. The technical solution of this disclosure can reasonably control client downloads, making client download traffic more even within the billing cycle, achieving dynamic control of bandwidth traffic costs, and improving the utilization rate of billable bandwidth values.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of network services, and particularly relates to a bandwidth flow control method and device, and a storage medium. BACKGROUND

[0002] At present, more and more users choose to use cloud services, and there are many resources in the cloud, which can be distributed to the client through a content delivery network (CDN) to improve the response speed of the client request and reduce the waiting time of the client for resources.

[0003] When downloading resources through a CDN network, the common bandwidth flow cost control technology mainly has the following kinds: (1) pre-allocate bandwidth flow according to the needs of different clients, which can effectively and reasonably utilize bandwidth resources, but needs to estimate the bandwidth flow used by different clients, and once the allocation is unreasonable, it will cause poor user experience; (2) fuse CDN technology and introduce P2P (point-to-point) technology, and allocate a part of the bandwidth flow to the client, which can well distribute the bandwidth flow of the CDN node, but will occupy the uplink bandwidth of the client, consume the performance of the client and affect the use experience. SUMMARY

[0004] The present disclosure provides a bandwidth flow control method and device, and a storage medium.

[0005] In a first aspect, the present disclosure provides a bandwidth flow control method, comprising:

[0006] determining a charging bandwidth value corresponding to a current time point;

[0007] predicting a predicted bandwidth value of a next future sampling time point after the current time point according to an actual bandwidth value of a historical sampling time point, the historical sampling time point being a sampling time point before the current time point;

[0008] determining whether to respond to a download request of the client in a current time period according to the charging bandwidth value corresponding to the current time point and the predicted bandwidth value, so as to control the download flow of the client, the current time period being a time period between a previous historical sampling time point and the next future sampling time point of the current time point.

[0009] In a second aspect, the present disclosure provides a bandwidth flow control device, comprising:

[0010] a determination module configured to determine a charging bandwidth value corresponding to a current time point;

[0011] The prediction module is configured to predict a predicted bandwidth value of a next future sampling time point after the current time point according to an actual bandwidth value of a historical sampling time point, the historical sampling time point being a sampling time point before the current time point.

[0012] The control module is configured to determine whether to respond to a download request of the client in the current time period according to the predicted bandwidth value and a charging bandwidth value corresponding to the current time point, the current time period being a time period between the last historical sampling time point and the next future sampling time point of the current time point, so as to control the download traffic of the client.

[0013] In a third aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the method provided in any of the embodiments of the present disclosure is implemented.

[0014] The technical solution of the present disclosure is applied in a current charging period. When the predicted bandwidth value is less than or equal to the charging bandwidth value corresponding to the current time point, the charging bandwidth value of the current charging period will not be greater than the charging bandwidth value corresponding to the current time point. At this time, according to the predicted bandwidth value and the charging bandwidth value corresponding to the current time point, it can be determined to respond to the download request of the client in the current time period, so that the client can download as much as needed. As long as the download traffic of the client is within the control range, the charging bandwidth value of the current charging period will not be affected, thereby avoiding the waste of the charging bandwidth value. When the predicted bandwidth value is greater than the charging bandwidth value corresponding to the current time point, according to the predicted bandwidth value and the charging bandwidth value corresponding to the current time point, it can be determined to refuse the download request of the client in the current time period to control the download traffic of the client in the current time period, thereby reducing the download of the client and further reducing the actual bandwidth value of the next future sampling time point after the current time point, and reducing the influence on the charging bandwidth value of the current charging period. Therefore, the dynamic control of the bandwidth traffic cost is realized, and the utilization rate of the charging bandwidth value is improved.

[0015] The above summary is merely intended to provide a description of the disclosure, and is not intended to limit in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present disclosure will be readily apparent from the drawings and detailed description below. BRIEF DESCRIPTION OF DRAWINGS

[0016] In the drawings, like reference numerals refer to same or similar functionalities throughout the several views. The drawings are not necessarily to scale. It is to be understood that the drawings only depict several embodiments in accordance with the disclosure and should not be considered to be limiting thereof.

[0017] Figure 1A bandwidth-time relationship graph of a CDN server in a period of time;

[0018] Figure 2 A bandwidth-time relationship graph of a CDN server in another period of time;

[0019] Figure 3 A flowchart of a bandwidth flow control method in an embodiment of the present disclosure;

[0020] Figure 4 A schematic diagram of predicting a predicted bandwidth value of a next future sampling time point after a current time point in an embodiment;

[0021] Figure 5 A schematic diagram of predicting a predicted bandwidth value of a next future sampling time point after a current time point in an embodiment;

[0022] Figure 6 A schematic diagram of the values of safety factors in different time periods in an embodiment;

[0023] Figure 7 A structural block diagram of a bandwidth flow control device in an embodiment of the present disclosure;

[0024] Figure 8 A block diagram of an electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In the following, only some exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present disclosure. Therefore, the drawings and the description are considered to be exemplary in nature rather than limiting.

[0026] For the convenience of understanding the technical solutions of the embodiments of the present disclosure, the related technologies of the embodiments of the present disclosure are described below, and the following related technologies can be combined with the technical solutions of the embodiments of the present disclosure in any way as optional solutions, which all belong to the protection scope of the embodiments of the present disclosure.

[0027] Some concepts involved in the present disclosure include CDN, CDN bandwidth flow, bandwidth billing point, peak bandwidth, and valley bandwidth.

[0028] CDN is the abbreviation of Content Delivery Network, which is the Chinese name of content distribution network.

[0029] CDN bandwidth flow: the bandwidth flow generated by downloading resources through the content distribution network, the CDN server calculates the bandwidth value, and the download amount of the client is calculated in terms of flow.

[0030] Bandwidth billing point: the CDN charges by traffic or bandwidth value, when using bandwidth value, usually uses the "95 bandwidth peak value billing" method. For example, in a billing period, such as a month, every 5 minutes, a bandwidth value of a CDN is collected, and a plurality of sampling time points are obtained; the plurality of bandwidth values are sorted from large to small, and the first 5% of the sampling time points are deducted, and the next sampling time point is the bandwidth billing point, and the bandwidth value corresponding to the bandwidth billing point is the billing bandwidth value, that is, the maximum bandwidth value in the remaining 95% of the sampling time points after deducting the first 5% of the sampling time points is the billing bandwidth value, and the billing bandwidth value can be called 95 value, and the "95 bandwidth peak value billing" method can be called 95 value billing. For example, there are 100 sampling time points, each corresponding to a CDN bandwidth value; the 100 bandwidth values are arranged in descending order, and the arrangement order of the 100 sampling time points is obtained, and the bandwidth values corresponding to the sampling time points decrease in turn; the first 5% of the sampling time points are the first 5 sampling time points, and the 6th sampling time point is the bandwidth billing point after deducting the first 5 sampling time points, and the bandwidth value corresponding to the 6th sampling time point is the billing bandwidth value.

[0031] Peak bandwidth point: after sorting a plurality of bandwidth values from large to small, a preset number of sampling time points at the front of the sorting are peak bandwidth points. In the "95 bandwidth peak value billing" rule, the first 5% of the sampling time points are peak bandwidth points. The bandwidth of the peak bandwidth point is the peak bandwidth.

[0032] Valley bandwidth point: after sorting a plurality of bandwidth values from large to small, a point with a bandwidth value less than a preset threshold in a preset number of sampling time points at the back of the sorting is a valley bandwidth point. In the "95 bandwidth peak value billing" rule, a point with a bandwidth value less than a preset threshold in the last 95% of the time points is a valley bandwidth point. The bandwidth of the valley bandwidth point is the valley bandwidth.

[0033] According to the above definition, it can be known that the peak bandwidth point and the valley bandwidth point belong to the free bandwidth point, and the client downloads resources from the CDN server at the peak bandwidth point and the valley bandwidth point, which does not affect the cost of the CDN server, and is beneficial to the CDN server to distribute more resources to the client at a lower cost.

[0034] Figure 1 A bandwidth value-time relationship diagram of a CDN server in a period of time, Figure 2 A bandwidth value-time relationship diagram of a CDN server in another period of time. In the related art, the client can download resources from the CDN server at any time, and the CDN server can obtain a bandwidth value every preset time, such as 5 minutes, so as to obtain a bandwidth value-time diagram of the CDN server.

[0035] In this article, the time point when the CDN server acquires the bandwidth value can be called a sampling time point. For example, the CDN server can regularly acquire the bandwidth value at a preset time interval. For example, in Figure 1 , the bandwidth value is acquired every 5 minutes, and the sampling time points can include 03 / 21 06:40, 03 / 21 13:20, and the like, Figure 2 , the sampling time points can include 02 / 27 08:00, 03 / 04 21:20, and the like. The time difference between two adjacent sampling time points can be called a sampling time interval. The sampling time interval can be set according to actual conditions. For example, the sampling time interval is 5 minutes.

[0036] Generally, the CDN server allows the client to download resources at any time. Therefore, when the client download state is active, the bandwidth value of the CDN server is high, for example, the time period corresponding to the M1 area in Figure 1 , and the time period corresponding to the M2 area in Figure 2 . When the client download state is not active, the bandwidth value of the CDN server is low, for example, the time period corresponding to the M3 area in Figure 1 . In this way, the CDN server bandwidth is not uniform, Figure 1 , the M3 area forms a bandwidth valley area, and the bandwidth value in the bandwidth valley area is much smaller than the expected target bandwidth value 250 Gbps; Figure 2 , the M2 area forms a bandwidth peak area, and the bandwidth value in the bandwidth peak area is much larger than the expected target bandwidth value 250 Gbps. In this way, it is difficult to control the bandwidth value of the CDN server, it is impossible to increase the download traffic of the client in the valley bandwidth when the bandwidth billing point is determined, it is impossible to effectively use the bandwidth billing point of "monthly settlement 95 bandwidth peak billing", and the bandwidth billing point is wasted, thereby reducing the utilization rate of the peak bandwidth and the valley bandwidth.

[0037] In related technologies, the bandwidth flow value is controlled by an upper limit based on the real-time acquired bandwidth flow value and a threshold. However, since the CDN bandwidth flow value has a lag, it cannot reflect the current CDN bandwidth in real time, and is often delayed by 15 minutes to 30 minutes. Therefore, the bandwidth is not uniform and the jitter is obvious in the bandwidth flow cost control mode, and the bandwidth resources are wasted.

[0038] To solve the above technical problems, the present disclosure provides a bandwidth flow control method. Figure 3 The flowchart of the bandwidth flow control method in an embodiment of the present disclosure is shown in Figure 3 . The bandwidth flow control method can be applied to a server, for example, a CDN server. The bandwidth flow control method can include steps S301-S303.

[0039] In step S301, a charging bandwidth value corresponding to a current time point is determined.

[0040] The current time point can be a time after the start time of the current charging period. The current time point is between two adjacent sampling time points. In the current charging period, assuming that the current time point is the end time of the current charging period, the charging bandwidth value determined by using the charging rule is the charging bandwidth value corresponding to the current time point.

[0041] For example, the CDN is charged by using the "95 bandwidth peak charging" rule in the current charging period. The actual bandwidth values of all the sampling time points from the start time of the current charging period to the current time point are obtained, and the charging bandwidth values of the actual bandwidth values of the sampling time points are obtained according to the "95 bandwidth peak charging" rule. The charging bandwidth value is the charging bandwidth value corresponding to the current time point. For example, the charging period is one month, and the current time point can be a time after at least two days from the first day of each month. The actual bandwidth values of all the sampling time points in two days are used to calculate the charging bandwidth value by using the "95 bandwidth peak charging" rule, which is the charging bandwidth value corresponding to the current time point.

[0042] In step S302, a predicted bandwidth value of a next future sampling time point after the current time point is predicted according to the actual bandwidth values of the historical sampling time points.

[0043] The historical sampling time point can be a sampling time point before the current time point. The historical sampling time point can be a sampling time point before the current time point in the current charging period. For example, the current charging period is December, the current time point is December 4, 9:27, and the historical sampling time point can be a sampling time point before December 4, 9:27 in the charging period of December.

[0044] For example, the historical sampling time point can be a sampling time point before the corresponding time of the current time point in the last charging period. For example, the last charging period is November, the current time point is December 4, 9:27, and the historical sampling time point can be a sampling time point before November 4, 9:27 in the charging period of November.

[0045] The historical sampling time point is not limited to a time in the current charging period or the last charging period. The historical sampling time point can be any one or more sampling time points before the current time point, and the specific time of the historical sampling time point can be selected as needed, which is not limited herein.

[0046] The future sampling time point can be a sampling time point after the current time point. The next future sampling time point after the current time point is the closest future sampling time point to the current time point after the current time point. For example, the sampling interval is 5 minutes, the current time point is 9:27 on December 4, and the next future sampling time point after the current time point is 9:30 on December 4.

[0047] In step S303, whether to respond to the download request of the client in the current time period according to the charging bandwidth value corresponding to the current time point and the predicted bandwidth value is determined to control the download traffic of the client, and the current time period is a time period between the last historical sampling time point and the next future sampling time point of the current time point.

[0048] For example, the current time point is 9:27 on December 4, the last historical sampling time point of the current time point is 9:25 on December 4, and the next future sampling time point of the current time point is 9:30 on December 4. Then, the current time period is a time period between 9:25 on December 4 and 9:30 on December 4.

[0049] The technical scheme of the present disclosure is applied in the current charging period. When the predicted bandwidth value is less than or equal to the charging bandwidth value corresponding to the current time point, the charging bandwidth value of the current charging period will not be greater than the charging bandwidth value corresponding to the current time point. At this time, according to the charging bandwidth value corresponding to the current time point and the predicted bandwidth value, it can be determined to respond to the download request of the client in the current time period, so that the client can download as much as needed. As long as the download traffic of the client is within the control range, it will not affect the charging bandwidth value of the current charging period, avoiding waste of the charging bandwidth value. When the predicted bandwidth value is greater than the charging bandwidth value corresponding to the current time point, according to the charging bandwidth value corresponding to the current time point and the predicted bandwidth value, it can be determined to refuse the download request of the client in the current time period to control the download traffic of the client in the current time period, reduce the download of the client, and further reduce the actual bandwidth value of the next future sampling time point after the current time point, reduce the influence on the charging bandwidth value of the current charging period, thereby realizing dynamic control of the bandwidth traffic cost and improving the utilization rate of the charging bandwidth value.

[0050] In the technical scheme of the present disclosure, the predicted bandwidth value of the next future sampling time point after the current time point is predicted according to the actual bandwidth value of the historical sampling time point, the bandwidth value of the next future sampling time point can be obtained in advance, the hysteresis of real-time acquisition of the bandwidth traffic value is avoided, and the download traffic can be controlled in advance, and the current bandwidth situation can be reflected in real time.

[0051] According to the charging bandwidth value and the predicted bandwidth value corresponding to the current time point, the download traffic of the client in the current time period is controlled, so that the download traffic is more uniform, and the utilization rate of the bandwidth is improved. For example, when the charging bandwidth value corresponding to the current time point is greater than the predicted bandwidth value, the client can be allowed to download as much as possible in the current time period, which is beneficial to improve the utilization rate of the valley bandwidth; when the charging bandwidth value corresponding to the current time point is less than the predicted bandwidth value, the download traffic of the client in the current time period is controlled, and the download of the client is reduced, so that the download traffic of the client in the charging period is more uniform, and the download traffic jitter is avoided.

[0052] In an embodiment, determining the charging bandwidth value corresponding to the current time point comprises: obtaining actual bandwidth values of each historical sampling time point before the current time point in the current charging period, and the number of obtained actual bandwidth values is m; arranging the m actual bandwidth values in descending order; removing the m*k actual bandwidth values arranged at the front, and determining the maximum value of the remaining actual bandwidth values as the charging bandwidth value corresponding to the current time point, wherein k is a free coefficient.

[0053] For example, the charging period is 1 month, the current charging period is December, the sampling time interval is 5 minutes, and the current time point is December 3, 00:03. The actual bandwidth values of all sampling time points from December 1, 00:00 to December 3, 00:03 are obtained, and the number of obtained actual bandwidth values is 576; the free coefficient k is 5%, 576*5% = 28.8, and the number of peak bandwidth points is 30. After arranging the 576 actual bandwidth values in descending order, the first 30 actual bandwidth values are removed, and the maximum value of the remaining actual bandwidth values is the charging bandwidth value corresponding to the current time point.

[0054] Therefore, the technical scheme of the embodiment of the present disclosure can be applied to the "95 bandwidth peak charging" rule.

[0055] It can be understood that the technical scheme of the embodiment of the present disclosure is not limited to the "95 bandwidth peak charging" rule, and the value of the free coefficient k can be determined according to the actual situation.

[0056] In an embodiment, the historical sampling time point can be N sampling time points before the current time point in the current charging period. Such historical sampling time points are closer to the current time point, can better reflect the bandwidth value in the current time period, and improve the accuracy of the predicted bandwidth value.

[0057] In one embodiment, the predicted bandwidth value of the next future sampling time point after the current time point is predicted according to the actual bandwidth values of the historical sampling time points, including: determining a first reference value, the first reference value being an average of the actual bandwidth value of the Nth historical sampling time point before the current time point and the actual bandwidth value of the (N-1)th historical sampling time point; determining a second reference value, the second reference value being an average of the actual bandwidth value of the (N-1)th historical sampling time point before the current time point and the actual bandwidth value of the (N-2)th historical sampling time point; and predicting the predicted bandwidth value according to the first reference value, the second reference value, and the actual bandwidth values of the N-2 historical sampling time points before the current time point.

[0058] In the embodiment, the average of the actual bandwidth value of the Nth historical sampling time point before the current time point and the actual bandwidth value of the (N-1)th historical sampling time point is used as the first reference value, the average of the actual bandwidth value of the (N-1)th historical sampling time point before the current time point and the actual bandwidth value of the (N-2)th historical sampling time point is used as the second reference value, and the predicted bandwidth value is predicted according to the first reference value, the second reference value, and the actual bandwidth values of the N-2 historical sampling time points before the current time point. In this way, the N historical sampling time points closest to the current time point are used, which can further improve the accuracy of the predicted bandwidth value.

[0059] For example, the sampling time interval T is 5 minutes, i.e., every 5 minutes a sampling time point, the current time point is 12:26, the 1st historical sampling time point before the current time point is 12:25, the 2nd historical sampling time point before the current time point is 12:20, and so on, so that the (N-2)th historical sampling time point, the (N-1)th historical sampling time point, and the Nth historical sampling time point before the current time point can be obtained.

[0060] In the embodiment, the predicted bandwidth value is predicted according to the first reference value, the second reference value, and the actual bandwidth values of the N-2 historical sampling time points before the current time point. In other embodiments, a bandwidth prediction model can be used to predict the bandwidth value. For example, the actual bandwidth values of the historical sampling time points and the sample bandwidth values can be used to train the bandwidth prediction model to obtain a trained bandwidth prediction model. The actual bandwidth value of the historical sampling time point of the current time point is input into the trained bandwidth prediction model to obtain the predicted bandwidth value of the next future sampling time point after the current time point.

[0061] Exemplarily, according to the actual bandwidth values of the historical sampling time points, the predicted bandwidth value of the next future sampling time point after the current time point can be predicted in real time.

[0062] In one embodiment, when the first reference value is less than the second reference value, the predicted bandwidth value is predicted according to the first reference value, the second reference value, and actual bandwidth values corresponding to N-2 historical sampling time points before the current time point, and comprises: calculating a difference between the second reference value and the first reference value to obtain a first difference value; calculating a quotient of the first difference value and a sampling time interval T to obtain a first quotient value, the sampling time interval T being a time difference between two adjacent sampling time points; determining an estimated bandwidth value of a next future sampling time point after the current time point according to the first quotient value and the first reference value; and determining the predicted bandwidth value as a maximum value among the estimated bandwidth value, the actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point, and an actual bandwidth value corresponding to the current time point.

[0063] When the first reference value is less than the second reference value, it indicates that the bandwidth flow in the current time period has an upward trend. The first quotient value is a quotient of the first difference value and the sampling time interval T, and the first quotient value is an upward slope of the upward trend. According to the first quotient value, the first reference value, and the time length, the estimated bandwidth value of the next future sampling time point after the current time point can be determined.

[0064] When the "95 bandwidth peak charging" charging rule is used, the bandwidth value targeted is the bandwidth value of the sampling time point, but the server can obtain the actual bandwidth value of the current time point (non-sampling time point). In the embodiment of the present disclosure, when predicting the predicted bandwidth value of the next future sampling time point after the current time point, not only the estimated bandwidth value is used, but also the actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point and the actual bandwidth value corresponding to the current time point are used, which can avoid the inaccuracy of the predicted bandwidth value caused by using only the estimated bandwidth value; the actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point and the actual bandwidth value corresponding to the current time point are closer to the next future sampling time point after the current time point, which can further improve the accuracy of the predicted bandwidth value.

[0065] Figure 4 A schematic diagram for predicting the predicted bandwidth value of the next future sampling time point after the current time point in one embodiment. Exemplarily, N=5. Figure 4The actual bandwidth values of the current time point and five historical sampling time points before the current time point are shown, the actual bandwidth value A1 of the fifth historical sampling time point before the current time point is 120 GBps, the actual bandwidth value A2 of the fourth historical sampling time point before the current time point is 110 GBps, the actual bandwidth value A3 of the third historical sampling time point before the current time point is 130 GBps, the actual bandwidth value A4 of the second historical sampling time point before the current time point is 113 GBps, and the actual bandwidth value A5 of the first historical sampling time point before the current time point is 110 GBps.

[0066] The first reference value C1=(A1+A2) / 2=115, and the second reference value C2=(A2+A3) / 2=120. C1

[0067] According to the first quotient value and the first reference value, the estimated bandwidth value of the next future sampling time point after the current time point can be determined, which can include: calculating the product of the first quotient value and a preset time length, obtaining an increment value, the preset time length being (N-1)*T+T / 2; calculating the sum of the increment value and the first reference value, and obtaining the estimated bandwidth value.

[0068] The increment value is 22.5, which is the increase value of the estimated bandwidth value relative to C1, so that the estimated bandwidth value C3 of the next future sampling time point after the current time point is 115+22.5=137.5 GBps.

[0069] The actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point are A3, A4, and A5. The actual bandwidth value A0 corresponding to the current time point is obtained. Then, the predicted bandwidth value A6 of the next future sampling time point after the current time point is A6=MAX(C3, A3, A4, A5, A0). The obtained predicted bandwidth value A6 is 137.5 GBps.

[0070] In one embodiment, the predicted bandwidth value is predicted according to the first reference value, the second reference value, and the actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point, which includes: in the case that the first reference value is greater than the second reference value, the maximum value of the actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point and the actual bandwidth value corresponding to the current time point is determined as the predicted bandwidth value.

[0071] When the first reference value is greater than the second reference value, it indicates that the bandwidth traffic in the current time period is decreasing. When predicting the predicted bandwidth value for the next future sampling time point after the current time point, not only are the actual bandwidth values ​​corresponding to the N-2 historical sampling time points before the current time point used, but also the actual bandwidth value corresponding to the current time point. The current time point is closer to the next sampling time point, which can further improve the accuracy of the predicted bandwidth value.

[0072] Figure 5 This is a schematic diagram illustrating the predicted bandwidth value for the next future sampling time point after the current time point in one embodiment. For example, N = 5. Figure 5 The actual bandwidth values ​​are shown for the current time point and the five historical sampling time points preceding the current time point. The actual bandwidth value B1 for the fifth historical sampling time point preceding the current time point is 130 GBps, the actual bandwidth value B2 for the fourth historical sampling time point preceding the current time point is 110 GBps, the actual bandwidth value B3 for the third historical sampling time point preceding the current time point is 120 GBps, the actual bandwidth value B4 for the second historical sampling time point preceding the current time point is 113 GBps, and the actual bandwidth value B5 for the first historical sampling time point preceding the current time point is 110 GBps.

[0073] The first reference value is C1 = (B1 + B2) / 2 = 120, and the second reference value is C2 = (A2 + A3) / 2 = 115. C1 > C2, indicating that the bandwidth traffic in the current time period is decreasing.

[0074] The actual bandwidth values ​​for the N-2 historical sampling time points prior to the current time point are B3, B4, and B5, respectively. The actual bandwidth value B0 corresponding to the current time point is obtained. Therefore, the predicted bandwidth value for the next future sampling time point after the current time point is B6 = MAX(B3, B4, B5, B0). The obtained predicted bandwidth value B6 is 120 GBps.

[0075] The technical solution of this disclosure determines the trend of bandwidth traffic in the current time period based on a first reference value and a second reference value. Under the upward trend and the downward trend, different methods are used to predict the predicted bandwidth value of the next future sampling time point after the current time point. The prediction method is simple and intuitive, and practice has proven that the obtained predicted bandwidth value is very close to the actual bandwidth value of the next future sampling time point after the current time point.

[0076] In one implementation, determining whether to respond to a client's download request within the current time period based on the billed bandwidth value and the predicted bandwidth value corresponding to the current time point includes: determining a download traffic threshold within the current time period based on the billed bandwidth value, the predicted bandwidth value, and a preset bandwidth threshold; and determining whether to respond to a client's download request within the current time period based on the download traffic threshold and the client's cumulative download traffic from the start of the current time period to the current time point.

[0077] The preset bandwidth threshold can be a manually set threshold, which can be set with reference to the billing bandwidth value of the previous billing cycle, or with reference to the affordable cost. For example, the preset bandwidth threshold can be set to 200GBps.

[0078] It's important to note that while CDN servers are billed based on bandwidth, client downloads are calculated in bandwidth. Determining a download bandwidth threshold for the current time period and using that threshold to decide whether to respond to client download requests within that period makes it easier to control client download activity.

[0079] In this embodiment, the download traffic threshold for the current time period is determined based on the billed bandwidth value, predicted bandwidth value, and preset bandwidth threshold corresponding to the current time point. This ensures that the determined download traffic threshold is related to the billed bandwidth value, predicted bandwidth value, and preset bandwidth threshold corresponding to the current time point. As a result, the client is controlled to download within the download traffic threshold range, which can reduce the impact of client downloads on the billed bandwidth value within the current billing cycle and better control costs.

[0080] In one implementation, the download traffic threshold for the current time period is determined based on the billed bandwidth value, the predicted bandwidth value, and the preset bandwidth threshold at the current time point. This includes: determining the maximum value between the billed bandwidth value and the bandwidth threshold at the current time point as the maximum bandwidth value for the current time period; calculating the difference between the maximum bandwidth value and the predicted bandwidth value to obtain the reserved bandwidth value; and determining the download traffic threshold based at least on the reserved bandwidth value and the duration of the current time period.

[0081] As time changes, the billing bandwidth value corresponding to the current time point within a billing cycle can dynamically change. Here, the maximum bandwidth value for the current time period is called the dynamic threshold. In the embodiment using 95-value billing, the dynamic threshold is MAX(95-value, preset bandwidth threshold).

[0082] Preset bandwidth thresholds are manually set and often reflect acceptable costs. However, if the billable bandwidth value at the current time exceeds the preset threshold, the billing will be based on the current time's billable bandwidth value. If the bandwidth threshold is still used to calculate the reserved bandwidth value in this case, it would waste the billable bandwidth. Therefore, using the maximum value between the current time's billable bandwidth value and the bandwidth threshold as the maximum bandwidth value for the current time period to determine the download traffic threshold can fully utilize the billable bandwidth value, increase the download traffic threshold, and avoid wasting the billable bandwidth.

[0083] In one embodiment, the download traffic threshold for the current time period can be determined based on the billed bandwidth value and the predicted bandwidth value at the current time point. Therefore, the billed bandwidth value at the current time point can be used as the maximum bandwidth value for the current time period. This allows for full utilization of the billed bandwidth value, increasing the download traffic threshold and avoiding waste of the billed bandwidth.

[0084] It is understandable that the predicted bandwidth value for the next future sampling time point after the current time point can reflect the real-time bandwidth value for that next future sampling time point. In other words, the predicted bandwidth value for the next future sampling time point reflects the client's real-time download traffic at that next future sampling time point. The content downloaded by the client in real-time is usually content that the client needs to use immediately. To avoid degrading the user experience, real-time download traffic is always allowed. Therefore, in this embodiment, the difference between the maximum bandwidth value and the predicted bandwidth value is calculated to obtain the reserved bandwidth value; based on the reserved bandwidth value, a download traffic threshold is determined. The download traffic threshold determined in this way will not affect the client's real-time download traffic, thus not affecting the client's real-time download and not causing a degradation in user experience.

[0085] It should be noted that the client will predict the user's usage preferences and pre-download relevant content based on those preferences, so that the response time can be reduced when the user uses the content.

[0086] In this embodiment, at least based on the reserved bandwidth value and the duration of the current time period, a download traffic threshold for the current time period is determined; based on the download traffic threshold for the current time period, it is determined whether to respond to the client's download requests within the current time period. This can be understood as determining whether to respond to the client's download requests within the current time period based on the download traffic threshold for the current time period, thereby controlling the client's pre-download traffic within the current time period.

[0087] In one embodiment, the method of this disclosure may further include: obtaining the security factor corresponding to the current time point, and determining the download traffic threshold of the current time period based at least on the reserved bandwidth value and the duration of the current time period, including: calculating the product of the reserved bandwidth value, the duration of the current time period, and the security factor corresponding to the current time point as the download traffic threshold of the current time period.

[0088] It is understandable that client download demand is very low at different times of the day, such as 00:00-08:00, while it is very high between 08:00-12:00. To differentiate between these different download demands, this embodiment adjusts the product of the calculated reserved bandwidth value and the duration of the current time period using a security factor corresponding to the current time point. This ensures the security of download traffic thresholds at different times, appropriately reserving some bandwidth for real-time downloads during the current time period, and better controlling the actual traffic flow during that period.

[0089] For example, the download traffic threshold Q for the current time period is Q = (MAX(95 value, preset bandwidth threshold) - predicted bandwidth value) * T * β, where T can be the duration of the current time period (i.e., the sampling time interval), and β is the safety factor.

[0090] For example, the value of β can range from 0.6 to 1.0.

[0091] Figure 6 This is a schematic diagram illustrating the values ​​of the security factor at different time periods in one embodiment. For example, it can be set according to the historical data of the CDN server's bandwidth value, such as... Figure 6 As shown, the day is divided into three levels by time period. During the time periods of 00:00-08:00 and 21:00-24:00, the real-time download demand of the client is relatively low, and the download traffic threshold is relatively safer. Therefore, this time period is called the low-risk stage, and β can be set to 0.9.

[0092] Between 12:00 and 21:00, the client's download demand is moderate, and the download traffic threshold is relatively safe. This period is called the medium-risk phase, and β can be set to 0.8.

[0093] Between 08:00 and 12:00, the client's download demand is relatively high, and the download traffic threshold is relatively low in security. This period is called the high-risk phase, and β can be set to 0.6.

[0094] In one embodiment, when determining β, β can be dynamically set according to the peak and trough periods of the bandwidth value from the previous day. For example, the safety factor can be fluctuated by 0.1 based on the peak and trough periods of the previous day. Figure 6 In the 00:00-08:00 period, there is a trough in the bandwidth value. During the trough period, β can be set to 1.0. In the 12:00-21:00 period, there is a peak in the bandwidth value. During the peak period, β can be set to 0.7.

[0095] For example, during off-peak hours, β is set to 0.9. During this period, the client's real-time download demand is lower. Setting β to 1.0 improves the security of the download traffic threshold, fully utilizes the maximum bandwidth value during this period, increases the client's pre-download traffic, and allows the client to pre-download more traffic, solving the problem of low total download traffic during off-peak hours and improving the utilization rate of off-peak bandwidth.

[0096] During peak download periods, β is set to 0.7. During this time, client real-time download demands are high. Setting β to 0.7 reduces the security of the download traffic threshold, decreases the client's pre-download traffic, and helps meet more of the client's real-time download traffic, thus mitigating the further increase in total download traffic during periods of high download demand.

[0097] By setting different security levels for different time periods, the maximum bandwidth value of each time period is fully utilized to increase the total download traffic during off-peak periods and reduce the total download traffic during peak periods. This allows for control of the total download traffic during peak periods and an increase in the total download traffic during off-peak periods, ensuring that the total download traffic (including pre-download traffic and real-time download traffic) of the client remains balanced across different time periods. This is beneficial for stabilizing the bandwidth value of the CDN server and controlling costs.

[0098] It is understandable that the total download traffic of a client over a period of time includes pre-download traffic and real-time download traffic.

[0099] In one implementation, determining whether to respond to a client's download request within the current time period based on a download traffic threshold and the client's cumulative download traffic from the start of the current time period to the current time point includes: obtaining the client's cumulative download traffic from the start of the current time period to the current time point; for a target client that sent a pre-download request, if the difference between the download traffic threshold and the cumulative download traffic is greater than or equal to the pre-download traffic requested by the target client, then responding to the target client's pre-download request and enabling the target client to download the requested content; if the difference between the download traffic threshold and the cumulative download traffic is less than the pre-download traffic requested by the target client, then rejecting the target client's pre-download request.

[0100] For example, if there are 100 clients, then obtaining the cumulative download traffic of each client from the start of the current time period to the current time point should be understood as obtaining the cumulative download traffic of each of the 100 clients from the start of the current time period to the current time point, and summing the cumulative download traffic of the 100 clients as the cumulative download traffic. Here, the target client is the client that issued the pre-download request.

[0101] It should be noted that the target client can pre-download relevant content based on user preferences. When the target client initiates a pre-download, it sends a pre-download request to the CDN server. In related technologies, when the CDN server receives the pre-download request from the target client, if the CDN server has the relevant content stored on it, it will allow the target client to download it.

[0102] To control client download traffic, a CDN server needs to obtain the cumulative download traffic of all clients. The CDN server can obtain the cumulative download traffic of all clients from the start of the current time period to the current time point, and then use the download traffic threshold within the current time period to control the pre-download traffic of clients after the current time point.

[0103] When the CDN server receives a pre-download request from a target client, if the difference between the download traffic threshold and the cumulative download traffic is greater than or equal to the pre-download traffic requested by the target client, the CDN server responds to the pre-download request, allowing the target client to download the requested content. If the difference between the download traffic threshold and the cumulative download traffic is less than the pre-download traffic requested by the target client, the CDN server rejects the pre-download request, preventing the target client from pre-downloading. This allows for control over client pre-download requests, preventing the client's total download traffic within the current time period from exceeding the download traffic threshold for that time period, thus achieving control over client download traffic.

[0104] For example, if the difference between the download traffic threshold and the cumulative download traffic is less than the pre-download traffic requested by the target client, the CDN server rejects the target client's pre-download request. If the target client forcibly performs pre-download after receiving the stop pre-download instruction from the CDN server, the server will allow the client to download in order to prevent the 95% value of the current billing period from exceeding the billing bandwidth value corresponding to the current time point. This allows the client to perform as much real-time download and pre-download as possible within the current time period, thereby significantly increasing the bandwidth value for the current time period and meeting peak bandwidth requirements. Under the 95% billing method, peak bandwidth is free bandwidth, thus controlling costs and improving the utilization rate of peak bandwidth.

[0105] It should be noted that the download traffic threshold for the current time period is used to control the client's download traffic during that time period. When the time reaches the next future sampling time point, the download traffic threshold for the next time period needs to be re-determined using the method of this embodiment to control the client's download status and download traffic during the next time period.

[0106] For example, a rate limiter can be added to the CDN server. The maximum capacity of the rate limiter can be the download traffic threshold for the current time period. When the time reaches the next future sampling time point, for example, in an embodiment with a sampling interval of 5 minutes, the next future sampling time point is, for example, 11:05. Then, when the time reaches 11:05, the CDN server clears the rate limiter and resets the maximum traffic of the rate limiter using the method of this embodiment. The download traffic threshold for the next time period is set as the maximum traffic of the rate limiter, so as to control the client's download traffic in the next time period using the rate limiter.

[0107] The technical solution of this disclosure uses the predicted bandwidth value of the next future sampling time point after the current time point, combined with a dynamic threshold, to control the download traffic of the client, effectively avoiding the waste of bandwidth billing points caused by uneven bandwidth, and improving the utilization rate of CDN peak bandwidth and off-peak bandwidth.

[0108] The technical solutions of this disclosure can be applied to CDN servers; they can also be applied to scenarios with numerous cloud resources requiring large-scale distribution; and they can be applied to scenarios where client download volumes are high and releases cause concentrated downloads, allowing the server to control bandwidth traffic. By adopting the technical solutions of this disclosure, client download traffic can be controlled, effectively avoiding the waste of bandwidth billing points caused by uneven bandwidth distribution, and improving the utilization rate of peak and off-peak bandwidth.

[0109] This disclosure also provides a bandwidth flow control device. Figure 7 This is a structural block diagram of a bandwidth flow control device in one embodiment of the present disclosure, as shown below. Figure 7 As shown, the bandwidth flow control device includes a determination module 701, a prediction module 702, and a control module 703.

[0110] The determination module 701 is used to determine the billing bandwidth value corresponding to the current time point.

[0111] The prediction module 702 is used to predict the predicted bandwidth value of the next future sampling time point after the current time point based on the actual bandwidth value of the historical sampling time points, wherein the historical sampling time points are the sampling time points before the current time point.

[0112] The control module 703 is used to determine whether to respond to the client's download request in the current time period based on the billed bandwidth value and the predicted bandwidth value corresponding to the current time point, so as to control the client's download traffic. The current time period is the time period between the previous historical sampling time point and the next future sampling time point.

[0113] In one embodiment, the prediction module 702 includes: a first determining submodule, configured to determine a first reference value, the first reference value being the average of the actual bandwidth value of the Nth historical sampling time point before the current time point and the actual bandwidth value of the (N-1)th historical sampling time point, where N is a natural number greater than or equal to 5; a second determining submodule, configured to determine a second reference value, the second reference value being the average of the actual bandwidth value of the (N-1)th historical sampling time point before the current time point and the actual bandwidth value of the (N-2)th historical sampling time point; and a prediction submodule, configured to predict a predicted bandwidth value based on the first reference value, the second reference value, and the actual bandwidth values ​​corresponding to the N-2 historical sampling time points before the current time point, wherein the N-2 historical sampling time points are the historical sampling time points before the current time point and closest to the current time point.

[0114] In one embodiment, when the first reference value is less than the second reference value, the prediction submodule is used to: calculate the difference between the second reference value and the first reference value to obtain a first difference; calculate the quotient of the first difference and the sampling time interval T to obtain a first quotient value, where the sampling time interval T is the time difference between two adjacent sampling time points; determine the estimated bandwidth value of the next future sampling time point after the current time point based on the first quotient value and the first reference value; and determine the maximum value among the estimated bandwidth value, the actual bandwidth values ​​corresponding to the N-2 historical sampling time points before the current time point, and the actual bandwidth value corresponding to the current time point as the predicted bandwidth value.

[0115] In one embodiment, the prediction submodule is further configured to: calculate the product of the first quotient and the preset duration to obtain the incremental value, wherein the preset duration is (N-1)*T+T / 2; and calculate the sum of the incremental value and the first reference value to obtain the estimated bandwidth value.

[0116] In one embodiment, the prediction submodule is further configured to: if the first reference value is greater than the second reference value, determine the maximum value among the actual bandwidth values ​​corresponding to the N-2 historical sampling time points before the current time point and the actual bandwidth value corresponding to the current time point as the predicted bandwidth value.

[0117] In one embodiment, the control module 703 is configured to: determine the download traffic threshold within the current time period based on the billing bandwidth value, the predicted bandwidth value, and the preset bandwidth threshold corresponding to the current time point; and determine whether to respond to the client's download request within the current time period based on the download traffic threshold and the client's cumulative download traffic from the start of the current time period to the current time point.

[0118] In one embodiment, the control module 703 is further configured to: determine the maximum value between the billing bandwidth value and the bandwidth threshold corresponding to the current time point as the maximum bandwidth value for the current time period; calculate the difference between the maximum bandwidth value and the predicted bandwidth value to obtain the reserved bandwidth value; and determine the download traffic threshold for the current time period based at least on the reserved bandwidth value and the duration of the current time period.

[0119] In one embodiment, the control module 703 is further configured to: obtain the security factor corresponding to the current time point; and calculate the product of the reserved bandwidth value, the duration of the current time period, and the security factor corresponding to the current time point as the download traffic threshold for the current time period.

[0120] In one embodiment, the control module 703 is further configured to: obtain the cumulative download traffic of the client from the start of the current time period to the current time point; for the target client that sent the pre-download request, if the difference between the download traffic threshold and the cumulative download traffic is greater than or equal to the pre-download traffic requested by the target client, then in response to the pre-download request of the target client, enable the target client to download the requested content; if the difference between the download traffic threshold and the cumulative download traffic is less than the pre-download traffic requested by the target client, then reject the pre-download request of the target client; wherein, the target client is the client that sent the pre-download request.

[0121] Figure 8 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. For example... Figure 8 As shown, the electronic device includes a memory 810 and a processor 820. The memory 810 stores a computer program that can run on the processor 820. When the processor 820 executes the computer program, it implements the method described in the above embodiments. The number of memories 810 and processors 820 can be one or more.

[0122] The electronic device also includes:

[0123] The communication interface 830 is used to communicate with external devices and exchange and transmit data.

[0124] If the memory 810, processor 820, and communication interface 830 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0125] Optionally, in a specific implementation, if the memory 810, processor 820, and communication interface 830 are integrated on a single chip, then the memory 810, processor 820, and communication interface 830 can communicate with each other through an internal interface.

[0126] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods provided in this disclosure.

[0127] This disclosure also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device on which the chip is installed to perform the methods provided in this disclosure.

[0128] This disclosure also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.

[0129] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.

[0130] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Sync Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0131] In the above embodiments, implementation can be achieved, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0132] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0133] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.

[0134] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.

[0135] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0136] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.

[0137] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.

[0138] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this disclosure, and these should all be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A bandwidth flow control method, characterized by, The method comprises the following steps: determining a charging bandwidth value corresponding to a current time point, the charging bandwidth value being a bandwidth value corresponding to a bandwidth charging point; predicting a predicted bandwidth value of a next future sampling time point after the current time point according to actual bandwidth values of historical sampling time points before the current time point; determining whether to respond to a download request of a client in a current time period according to the charging bandwidth value corresponding to the current time point and the predicted bandwidth value, so as to control the download flow of the client, the current time period being a time period between a last historical sampling time point and a next future sampling time point of the current time point.

2. The method of claim 1, wherein, The method comprises the following steps: determining a first reference value, the first reference value being an average value of an actual bandwidth value of an Nth historical sampling time point before the current time point and an actual bandwidth value of an (N-1)th historical sampling time point, wherein N is a natural number greater than or equal to 5; determining a second reference value, the second reference value being an average value of the actual bandwidth value of the (N-1)th historical sampling time point and an actual bandwidth value of an (N-2)th historical sampling time point before the current time point; predicting the predicted bandwidth value according to the first reference value, the second reference value, and actual bandwidth values corresponding to N-2 historical sampling time points before the current time point, the N-2 historical sampling time points being the historical sampling time points before the current time point and closest to the current time point.

3. The method of claim 2, wherein, In the case that the first reference value is less than the second reference value, the method comprises the following steps: calculating a difference between the second reference value and the first reference value to obtain a first difference value; calculating a quotient of the first difference value and a sampling time interval T to obtain a first quotient value, the sampling time interval T being a time difference between adjacent two sampling time points; determining an estimated bandwidth value of the next future sampling time point after the current time point according to the first quotient value and the first reference value; determining the predicted bandwidth value as a maximum value of the estimated bandwidth value, the actual bandwidth values corresponding to the N-2 historical sampling time points before the current time point, and an actual bandwidth value corresponding to the current time point.

4. The method of claim 3, wherein, The method comprises the following steps: calculating a product of the first quotient value and a preset time length to obtain an increment value, the preset time length being (N-1)*T+T / 2; calculating a sum of the increment value and the first reference value to obtain the estimated bandwidth value.

5. The method of claim 2, wherein, The method comprises the following steps: In a case where the first reference value is greater than the second reference value, a maximum value of actual bandwidth values corresponding to N-2 historical sampling time points before the current time point, and the actual bandwidth value corresponding to the current time point is determined as the predicted bandwidth value.

6. The method according to any one of claims 1-5, characterized in that, According to the billing bandwidth value corresponding to the current time point and the predicted bandwidth value, it is determined whether to respond to a download request of a client in a current time period, including: According to the billing bandwidth value corresponding to the current time point, the predicted bandwidth value and a preset bandwidth threshold, a download traffic threshold in the current time period is determined. According to the download traffic threshold and the cumulative download traffic of the client from the time start of the current time period to the current time point, it is determined whether to respond to the download request of the client in the current time period.

7. The method of claim 6, wherein, According to the billing bandwidth value corresponding to the current time point, the predicted bandwidth value and a preset bandwidth threshold, a download traffic threshold in the current time period is determined, including: A maximum value of the billing bandwidth value corresponding to the current time point and the bandwidth threshold is determined as a maximum bandwidth value of the current time period. The difference between the maximum bandwidth value and the predicted bandwidth value is calculated to obtain a reserved bandwidth value. According to at least the reserved bandwidth value and the duration of the current time period, a download traffic threshold of the current time period is determined.

8. The method of claim 7, wherein, The method further includes: A safety factor corresponding to the current time point is obtained. According to at least the reserved bandwidth value and the duration of the current time period, a download traffic threshold of the current time period is determined, including: The product of the reserved bandwidth value, the duration of the current time period and the safety factor corresponding to the current time point is calculated as the download traffic threshold of the current time period.

9. The method of claim 6, wherein, According to the download traffic threshold and the cumulative download traffic of the client from the time start of the current time period to the current time point, it is determined whether to respond to the download request of the client in the current time period, including: The cumulative download traffic of the client from the time start of the current time period to the current time point is obtained. For a target client in the client that sends a pre-download request, if the difference between the download traffic threshold and the cumulative download traffic is greater than or equal to the pre-download traffic requested by the target client, the pre-download request of the target client is responded to, so that the target client downloads the requested content. If the difference between the download traffic threshold and the cumulative download traffic is less than the pre-download traffic requested by the target client, the pre-download request of the target client is rejected.

10. A bandwidth flow control apparatus, characterized by, It includes: A determination module is configured to determine a billing bandwidth value corresponding to a current time point, the billing bandwidth value being a bandwidth value corresponding to a bandwidth billing point; A prediction module is configured to predict a predicted bandwidth value of a next future sampling time point after the current time point according to actual bandwidth values of historical sampling time points, the historical sampling time points being sampling time points before the current time point; A control module is configured to determine whether to respond to a download request of the client in a current time period according to the predicted bandwidth value and the corresponding charging bandwidth value of the current time point, so as to control the download traffic of the client, wherein the current time period is a time period between a previous historical sampling time point and a next future sampling time point of the current time point. 11.A computer readable storage medium, having stored therein a computer program, which, when executed by a processor, implements the method of any one of claims 1-9.

Citation Information

Patent Citations

  • Bandwidth demand emergency identifying method and device

    CN109450672A

  • Video preloading method and device

    CN112672186A