95 charging bandwidth prediction method and device of CDN, storage medium and equipment
By calculating the 95 billing bandwidth baseline value and predicted bandwidth data of CDN, the problem that CDN95 billing bandwidth cannot be estimated in advance is solved, accurate prediction and early warning is achieved, bandwidth and cost overruns are avoided, and cost management is provided.
Patent Information
- Application Number
- CN202411228310.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-12
AI Technical Summary
The 95 billing bandwidth of the existing CDN cannot be estimated in advance, resulting in easy bandwidth and cost overruns. The existing prediction methods rely on manual real-time viewing of the bandwidth value as of the current time, and cannot accurately predict whether the 95 billing bandwidth at the end of the month exceeds the planned baseline value.
By obtaining the monthly cost of CDN bandwidth, calculate the bandwidth baseline value of the 95 billing plan, and judge the number and total number of exceeding the baseline value based on the generated bandwidth data value, predict the probability that the 95 billing bandwidth exceeds the planned baseline value, and promptly Send an early warning signal.
Accurate prediction of CDN95 billing bandwidth is achieved, bandwidth and cost overruns are avoided, and data support for reasonable cost control is provided.
Smart Images

Figure CN118944989A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a CDN 95 billing bandwidth prediction method, apparatus, storage medium, and device. Background Art
[0002] A Content Delivery Network (CDN) is a distributed network consisting of at least a central node server and a cluster of edge node servers distributed across different regions. Its primary purpose is to speed up content loading by caching content on servers closer to users, effectively resolving Internet network congestion and improving website responsiveness and availability. This improves user experience and reduces the load on origin servers.
[0003] Currently, the most commonly used billing method in the CDN market is 95% peak billing. This billing method can effectively accommodate abnormally high CDN traffic peaks. Therefore, most business scenarios now use CDN services, such as application distribution and audio and video streaming, and all adopt 95% peak billing. However, with the increasing use of CDNs in various business scenarios, cost control has become a key concern for all business parties. If this billing method is still used, there is a problem: the final CDN 95% billing bandwidth cannot be estimated each month. Usually, the 95% billing bandwidth for the month can only be roughly estimated at the end of the one-month rolling billing window. This makes it impossible to provide early warning of the CDN 95% bandwidth, which can easily lead to bandwidth overspending. Therefore, it is necessary to effectively predict the CDN 95% billing bandwidth to reduce costs. However, the current prediction method usually relies solely on manually checking the 95% bandwidth value as of the current time in real time at the CDN vendor's management backend. This prediction method only shows the 95% bandwidth value as of the current time. When abnormal traffic spikes occur, it is impossible to accurately predict whether the 95% billed bandwidth for this month will exceed the planned bandwidth baseline value, which may lead to bandwidth and cost overruns. Summary of the Invention
[0004] The main purpose of the embodiments of the present application is to provide a CDN 95% billing bandwidth prediction method, apparatus, storage medium and device, which can accurately predict the possibility of the CDN 95% billing bandwidth exceeding the planned bandwidth baseline value in the current month based on the generated bandwidth data, and then can timely issue an early warning of CDN bandwidth billing, thereby providing effective data support for the reasonable management and control of CDN costs.
[0005] This embodiment of the present application provides a CDN 95% billing bandwidth prediction method, including:
[0006] Obtain the monthly cost of CDN bandwidth, and calculate the bandwidth baseline value of the CDN 95 billing plan based on the monthly cost of CDN bandwidth;
[0007] Get the bandwidth data value generated for each period in the preset period of the month;
[0008] Determining the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values; wherein M is an integer not less than 0;
[0009] Calculate the total number N of bandwidth data values expected to be collected in the month according to the preset period; N is an integer not less than M;
[0010] According to the values of the quantity M and the total quantity N, a probability result of the CDN 95 billing bandwidth exceeding the planned bandwidth baseline value in the current month is predicted.
[0011] In one possible implementation, the monthly cost of obtaining CDN bandwidth includes:
[0012] Obtain the annual budget amount for the CDN service and calculate the difference between the annual budget amount and the current amount spent;
[0013] The ratio of the difference to the total number of months remaining in the year is calculated as the monthly cost of CDN bandwidth.
[0014] In one possible implementation, calculating the bandwidth baseline value of the CDN 95 billing plan based on the monthly cost of the CDN bandwidth includes:
[0015] Calculate the ratio of the monthly cost of the CDN bandwidth to the unit price of CDN bandwidth as the bandwidth baseline value for the CDN 95 billing plan.
[0016] In one possible implementation, the preset period is 5 minutes; and obtaining the generated bandwidth data value corresponding to each period in the preset period of the month includes:
[0017] Calculate the average bandwidth value every 5 minutes in the month as the bandwidth data value generated in the corresponding period.
[0018] In a possible implementation, after obtaining the generated bandwidth data value corresponding to each period in the preset period of the month, the method further includes:
[0019] The bandwidth data value generated for each period is stored in the local database periodically;
[0020] The determining of the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values includes:
[0021] The generated bandwidth data values corresponding to each period are obtained from the database, and the number M of bandwidth data values exceeding the planned bandwidth baseline value is determined therefrom.
[0022] In a possible implementation, after predicting the probability of the CDN 95% billing bandwidth exceeding the planned bandwidth baseline value in the current month based on the values of the quantity M and the total quantity N, the method further includes:
[0023] When it is determined that the probability result is higher than a preset probability threshold, an early warning signal of the CDN's 95% billing bandwidth prediction is issued.
[0024] In a possible implementation, the preset probability threshold is 60%.
[0025] The embodiment of the present application further provides a CDN 95 billing bandwidth prediction device, including:
[0026] The first calculation unit is configured to obtain a monthly cost of CDN bandwidth and calculate a bandwidth baseline value of a 95% billing plan of the CDN based on the monthly cost of CDN bandwidth;
[0027] An acquisition unit, configured to acquire bandwidth data values generated corresponding to each period in a preset period of the current month;
[0028] a determining unit, configured to determine a number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values; wherein M is an integer not less than 0;
[0029] A second calculation unit is configured to calculate a total number N of bandwidth data values expected to be collected in the current month according to the preset period; wherein N is an integer not less than M;
[0030] The prediction unit is used to predict the probability result of the CDN 95 billing bandwidth exceeding the planned bandwidth baseline value in the current month based on the values of the quantity M and the total quantity N.
[0031] In a possible implementation, the first computing unit includes:
[0032] A first calculation subunit is configured to obtain an annual budget amount for the CDN service and calculate a difference between the annual budget amount and a currently spent amount;
[0033] The second calculation subunit is configured to calculate a ratio of the difference to the total number of remaining months in the current year as the monthly cost of the CDN bandwidth.
[0034] In one possible implementation, the first computing unit is specifically configured to:
[0035] Calculate the ratio of the monthly cost of the CDN bandwidth to the unit price of CDN bandwidth as the bandwidth baseline value for the CDN 95 billing plan.
[0036] In a possible implementation, the preset period is 5 minutes; and the acquiring unit is specifically configured to:
[0037] Calculate the average bandwidth value every 5 minutes in the month as the bandwidth data value generated in the corresponding period.
[0038] In a possible implementation, the apparatus further includes:
[0039] The storage unit is used to store the bandwidth data value generated corresponding to each cycle in a local database according to the cycle;
[0040] The judgment unit is specifically used for:
[0041] The generated bandwidth data values corresponding to each period are obtained from the database, and the number M of bandwidth data values exceeding the planned bandwidth baseline value is determined therefrom.
[0042] In a possible implementation, the apparatus further includes:
[0043] The early warning unit is configured to issue an early warning signal of the CDN 95 billing bandwidth prediction when it is determined that the probability result is higher than a preset probability threshold.
[0044] In a possible implementation, the preset probability threshold is 60%.
[0045] The embodiment of the present application also provides a CDN 95 billing bandwidth prediction device, including: a processor, a memory, and a system bus;
[0046] The processor and the memory are connected via the system bus;
[0047] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementations of the above-mentioned 95 billing bandwidth prediction method for CDN.
[0048] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device executes any one of the implementations of the above-mentioned CDN 95 billing bandwidth prediction method.
[0049] An embodiment of the present application further provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the implementations of the CDN 95 billing bandwidth prediction method.
[0050] The embodiments of the present application provide a CDN 95% billing bandwidth prediction method, apparatus, storage medium, and device. The method first obtains the monthly cost of CDN bandwidth and, based on the monthly cost of CDN bandwidth, calculates the bandwidth baseline value of the CDN 95% billing plan. The method then obtains the generated bandwidth data values corresponding to each period within a preset period of the month. The method then determines the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values, where M is an integer not less than 0. The method then calculates the total number N of bandwidth data values expected to be collected within the preset period, where N is an integer not less than M. The method then predicts the probability that the CDN 95% billing bandwidth for the current month will exceed the planned bandwidth baseline value based on the values of the number M and the total number N.
[0051] It can be seen that since this application can more accurately predict the possibility of the CDN's 95 billing bandwidth exceeding the planned bandwidth baseline value in the current month based on the monthly cost of CDN bandwidth and the bandwidth data value generated in the current month, it is convenient for subsequent timely early warning of CDN bandwidth billing, thereby providing effective data support for the reasonable management and control of CDN costs, and avoiding the occurrence of bandwidth and cost overspending. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 A flowchart of a CDN 95 billing bandwidth prediction method provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of the composition of a CDN 95 billing bandwidth prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] With the development of Internet technology, more and more companies are using CDN in different business scenarios. By caching content on servers closer to users, it helps speed up the loading of content for users, improves the response speed and availability of websites when users visit them, thereby improving user experience and reducing the load on the original server.
[0056] Currently, the most common billing method used in the CDN market is 95% peak billing, which refers to charging based on the CDN's 95% peak bandwidth. 95% peak bandwidth refers to sorting all bandwidth data points (i.e., the average bandwidth value within each 5-minute period) for a calendar month in reverse order, excluding the top 5% of data points, and using the remaining 95% of bandwidth data points as the monthly billing bandwidth. While this billing method can effectively accommodate abnormally high CDN peaks, it also presents a problem: it's impossible to estimate the final 95% billing bandwidth for the CDN each month. Typically, a rough estimate of the 95% billing bandwidth for the month can only be obtained at the end of the one-month rolling billing window. This makes it impossible to provide early warning of the CDN's 95% bandwidth and easily leads to bandwidth overruns. If bandwidth overruns occur, analysis is often limited to post-mortem analysis.
[0057] Therefore, effective prediction of CDN's 95% billable bandwidth is necessary to reduce CDN usage costs. However, current prediction methods typically rely solely on manually checking the current 95% bandwidth value in real time on the CDN vendor's management backend. This prediction method only provides the current 95% bandwidth value. When abnormal traffic spikes occur, it is impossible to accurately predict whether the final 95% billable bandwidth for the month will exceed the planned bandwidth baseline, potentially leading to bandwidth and cost overruns.
[0058] For example, assuming the CDN bandwidth budget requirement is that the billing bandwidth cannot exceed 10Gbps, when there is a burst of bandwidth traffic as high as 100Gbps, the existing 95 peak billing method cannot accurately determine whether the final 95 billing bandwidth for the month will exceed 10Gbps in this case, and thus cannot be used to generate overspending alarms. Often, the cause of bandwidth overspending can only be analyzed after the fact, which means that cost reduction intervention cannot be carried out in advance at the appropriate time.
[0059] To address the above-mentioned drawbacks, this application provides a CDN 95% billing bandwidth prediction method. The method first obtains the monthly cost of CDN bandwidth and, based on this monthly cost, calculates the bandwidth baseline value for the CDN's 95% billing plan. The method then obtains the bandwidth data values generated for each period within a preset period for the current month. The method then determines the number M of bandwidth data values generated that exceed the planned bandwidth baseline value, where M is an integer not less than 0. The method then calculates the total number N of bandwidth data values expected to be collected for the current month, where N is an integer not less than M. Based on the values of the number M and the total number N, the probability that the CDN's 95% billing bandwidth for the current month will exceed the planned bandwidth baseline value can be predicted.
[0060] It can be seen that since this application can more accurately predict the possibility of the CDN's 95 billing bandwidth exceeding the planned bandwidth baseline value in the current month based on the monthly cost of CDN bandwidth and the bandwidth data value generated in the current month, it is convenient for subsequent timely early warning of CDN bandwidth billing, thereby providing effective data support for the reasonable management and control of CDN costs, and avoiding the occurrence of bandwidth and cost overspending.
[0061] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0062] First embodiment
[0063] See also Figure 1 , is a flow chart of a CDN 95 billing bandwidth prediction method provided in this embodiment, the method comprising the following steps:
[0064] S101: Obtain the monthly cost of CDN bandwidth, and calculate the bandwidth baseline value of the CDN 95 billing plan based on the monthly cost of CDN bandwidth.
[0065] In this embodiment, in order to accurately predict the possibility of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value for the current month, this embodiment proposes a method for predicting the likelihood of the CDN's 95% peak bandwidth exceeding the budget for the current month based on existing bandwidth data. The method first obtains the monthly bandwidth cost of the CDN, and then calculates the bandwidth baseline value of the CDN's 95% billing plan based on the monthly CDN bandwidth cost, which is used to execute the subsequent step S103.
[0066] Specifically, to accurately calculate the bandwidth baseline value for the CDN 95% billing plan, one optional implementation method is to first obtain the annual budget amount for the CDN service, calculate the difference between the annual budget amount and the current amount spent, and then calculate the ratio of this difference to the total number of months remaining in the year as the monthly CDN bandwidth cost. The specific calculation formula is as follows:
[0067] S 成本 =(S 预算 -S 已用 ) / K(1)
[0068] Among them, S 预算Indicates the annual budget amount for using a CDN provided by a certain vendor, that is, the total budget amount planned to be spent on the CDN vendor this year; S 已用 Indicates the current year's cumulative expenditure, that is, the total amount of fees actually spent on CDN vendors as of the current month; K represents the total number of months remaining in the year, specifically the difference between 12 and the current number of months; S 成本 Indicates the monthly cost of CDN bandwidth, that is, the maximum amount that can be spent on CDN bandwidth in the following months (i.e., the baseline amount).
[0069] For example: Assume that the bandwidth unit price of CDN provided by CDN manufacturer is 10 yuan / Mbps, and when Company A uses the CDN provided by this manufacturer, the total budget amount S planned to be spent on the manufacturer this year is 预算 1,228,800 yuan, and the amount spent as of July is S 已用 If it is RMB 800,000, then the budget amount for this year can be calculated as S 预算 and the current amount spent S 已用 The difference is: S 预算 -S 已用 =1228800-800000=428800 yuan, that is, the total CDN cost (i.e. the total amount of money paid to the CDN vendor in the next 5 months) in the next 5 months (i.e. August to December) cannot exceed 428800 yuan. Then, using the above formula (1), we can calculate the average monthly budget: S 成本 =(S 预算 -S 已用 ) / K=428800 / 5=85760 yuan, that is, the monthly cost of CDN bandwidth for the next month is S 成本 It is 85,760 yuan, that is, the maximum amount that can be spent on CDN bandwidth in the next month (i.e. the baseline amount) is 85,760 yuan.
[0070] Furthermore, after obtaining the monthly cost S of CDN bandwidth 成本 Finally, in order to avoid overspending on monthly CDN bandwidth costs, it is necessary to ensure that the monthly CDN bandwidth expenditure does not exceed the monthly CDN bandwidth cost S 成本 On this basis, the monthly cost S of CDN bandwidth can be calculated 成本 The ratio of the CDN bandwidth unit price to the CDN vendor's CDN bandwidth price is used as the bandwidth baseline value for the CDN 95 billing plan, representing the monthly CDN bandwidth control baseline. The specific calculation formula is as follows:
[0071] B=S 成本 / B UP (2)
[0072] Among them, S 成本 represents the monthly cost of CDN bandwidth, that is, the maximum amount of CDN bandwidth cost that can be spent in the following months (i.e., the baseline amount). The specific value can be calculated using the above formula (1); B UP The unit price of CDN bandwidth provided by the CDN vendor can be the CDN billing amount per Mbps. The specific value is not limited. Different CDN vendors may charge different fees. You can choose according to the actual situation. For example, you can set it to 10 yuan / Mbps or any other value between 7-15 yuan / Mbps. B represents the bandwidth baseline value of the CDN 95 billing plan, which is the maximum budget value for monthly CDN bandwidth usage.
[0073] For example: Based on the above example, it is still assumed that the CDN bandwidth unit price provided by the CDN manufacturer is B UP It is 10 yuan / Mbps, and when Company A uses the CDN provided by this manufacturer, the average monthly budget is calculated to be: 成本 =(S 预算 -S 已用 ) / K=428800 / 5=85760 yuan, that is, the monthly CDN bandwidth cost needs to be controlled below 85760 yuan. Then, using the above formula (2), the bandwidth baseline value B of the CDN 95 billing plan can be calculated as: B=S 成本 / B UP =85760 / 10=8576Mbps, which means the maximum budget for CDN bandwidth in the next month is 8576Mbps.
[0074] S102: Obtain the generated bandwidth data value corresponding to each period in the preset period of the month.
[0075] In this embodiment, to accurately predict the likelihood that the CDN's 95% billing bandwidth for the current month will exceed the planned bandwidth baseline value, not only is it necessary to calculate the CDN's 95% billing plan's bandwidth baseline value in step S101, but it is also necessary to obtain the bandwidth data values generated for each period within the preset period of the current month. The specific value of the preset period is not limited and can be set based on actual conditions and experience. For example, to ensure alignment with the CDN vendor's billing bandwidth data granularity, the preset period can be set to 5 minutes. In this way, the average bandwidth value for each 5-minute period of the current month can be calculated as the bandwidth data value generated for the corresponding period. Similarly, the bandwidth data value generated for each 5-minute period of the current month can be gradually obtained. The bandwidth data value generated for each period is then pulled into a database for persistent storage according to the CDN vendor's granularity. The specific storage method is not limited. One optional implementation method is to store the bandwidth data values generated for each period in a local database on a periodic basis for execution of the subsequent step S103.
[0076] Specifically, a CDN vendor's billing method is 95% peak billing in the future. This involves sorting all bandwidth data points every 5 minutes of a calendar month in reverse order, excluding the 5% of data points with the highest bandwidth, and using the bandwidth value of the remaining 95%-ranked bandwidth data point as the billing bandwidth for that month. The data granularity here is 5 minutes, so bandwidth data can be stored in the database on a 5-minute cycle, ensuring consistency in the calculated data. The CDN vendor then provides an interface for obtaining bandwidth, so that consumers using the CDN it provides can call the vendor's interface to obtain the actual bandwidth data values according to the value acquisition cycle (here, 5 minutes) and store them in the local database, providing a basis for calculation in the next step S103.
[0077] S103: Determine the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values; wherein M is an integer not less than 0.
[0078] In this embodiment, the generated bandwidth data value corresponding to each period (e.g., every 5 minutes) in the preset period of the month is obtained through step S102. After the generated bandwidth data value corresponding to each period (e.g., every 5 minutes) is obtained from the local database, the number M of bandwidth data values that exceed the planned bandwidth baseline value B can be further determined (the specific value is not limited, it only needs to be an integer greater than 0) to execute the subsequent step S105.
[0079] S104: Calculate the total number N of bandwidth data values expected to be collected in the current month according to a preset period; wherein N is an integer not less than M.
[0080] In this embodiment, in order to accurately predict the possibility that the 95% billable bandwidth of the CDN for the current month will exceed the planned bandwidth baseline value, it is necessary not only to determine the number M of bandwidth data values that exceed the planned bandwidth baseline value B among the generated bandwidth data values in step S103, but also to calculate the total number N of bandwidth data values expected to be collected for the current month based on a preset period (e.g., every 5 minutes) (the specific value is not limited, it only needs to be an integer not less than M). This is used to execute the subsequent step S105 to calculate the probability result that the 95% billable bandwidth of the CDN for the current month will exceed the planned bandwidth baseline value.
[0081] S105: Based on the values of the quantity M and the total quantity N, a probability result of the CDN 95 billing bandwidth exceeding the planned bandwidth baseline value for the current month is predicted.
[0082] In this embodiment, after determining the number M of bandwidth data values that exceed the planned bandwidth baseline value B among the generated bandwidth data values in step S103, and calculating the total number N of bandwidth data values expected to be collected in the current month in step S104, the probability of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value B in the current month can be further predicted based on the values of the number M and the total number N. This is used to indicate the probability that the bandwidth baseline value B of the CDN's 95% billing plan may be exceeded so as to enable timely warning processing to avoid bandwidth and cost overruns.
[0083] The specific calculation formula for predicting the probability that the CDN's 95% billed bandwidth for the current month will exceed the planned bandwidth baseline value based on the values of quantity M and total quantity N is as follows:
[0084] P=M / (N*5%) (3)
[0085] Where M represents the number of generated bandwidth data values that exceed the planned bandwidth baseline value; N represents the total number of bandwidth data values expected to be collected for the current month, calculated based on the preset period. The specific value may vary depending on the preset period value. For example, if the preset period is 5 minutes (i.e., the data granularity is 5 minutes), it can be calculated that 1 hour contains 12 periods, corresponding to 12 collected bandwidth data values. Based on the 24-hour day, the value of N can be deduced as: N = 12 * 24 * the number of days in the current month. P represents the predicted probability that the CDN's 95% billing bandwidth for the current month will exceed the planned bandwidth baseline value. A larger value of P indicates a greater likelihood of exceeding the CDN's 95% billing plan bandwidth baseline value B, and vice versa.
[0086] For example: Based on the above example, assume that the calculated bandwidth baseline value B for the CDN's 95 billing plan is 8576 Mbps. As of now, the number M of bandwidth data values exceeding 8576 Mbps generated in the database is 100. The current month is July, and July has 31 days. Taking the preset cycle of 5 minutes as one cycle (i.e., the data granularity is 5 minutes) as an example, the total number N of bandwidth data values expected to be collected in 31 days is: 12*24*31=8928. According to the 95 billing method, 5% of the total number N can be used to accommodate high-bandwidth data points and not be included in billing, that is, 8928*5%=446.4. These 446.4 bandwidth data values are not included in billing and can be defined here as the 5% peak shaving space. The ratio of the number of bandwidth data values (M) exceeding the bandwidth baseline value (B) of the CDN's 95% billing plan to the size of the 5% peak-shaving headroom is the CDN's 5% peak-shaving headroom utilization rate, or the predicted probability P of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value for the current month. Substituting this into the above formula (3), the calculated value of P is: 100 / 446.4 = 22.4%. In other words, as of this month, there is a 22.4% probability of exceeding the CDN's 95% billing plan's bandwidth baseline value of 8576 Mbps.
[0087] It should be noted that when the above-mentioned predicted probability result P of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value for the current month is obtained, it can quantify in real time how likely it is that the 95% bandwidth for this month will exceed the bandwidth baseline value B of the CDN's 95% billing plan. This is because the essence of the 95% bandwidth billing method is to use 5% of the bandwidth space to accommodate peak bandwidth (i.e., bandwidth that exceeds the bandwidth baseline value B of the CDN's 95% billing plan) for free. In other words, if the 5% bandwidth space is exhausted, it can be determined that the 95% bandwidth used in the current month will definitely exceed the bandwidth baseline value B of the CDN's 95% billing plan.
[0088] On this basis, an optional implementation method is to issue a warning signal of the CDN's 95% billing bandwidth forecast when it is determined that the probability result P of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value in the current month is higher than a preset probability threshold (the specific value is not limited and can be set according to actual conditions and experience, such as 60%), to remind consumers using the CDN to pay attention to the CDN's usage expenses and intervene in time to avoid bandwidth and cost overspending.
[0089] The present application does not limit the specific method of issuing the warning signal or the content included. For example, when the value of P is detected to be greater than a preset probability threshold of 60%, a warning signal such as an alarm voice or light can be issued through a pre-set alarm, or a warning prompt SMS, MMS, instant messaging software message or push message in the form of text and / or pictures can be sent to the mobile phone of a pre-set staff member to remind them that the probability of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value for the current month has exceeded the preset probability threshold and that corresponding solutions and processing measures need to be taken in a timely manner; or, a pre-set staff member can automatically dial an intelligent voice phone to remind them that the probability of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value for the current month has exceeded the preset probability threshold and that corresponding solutions and processing measures need to be taken in a timely manner; or, an email can be sent to a mailbox reserved by a pre-set staff member to inform them that the probability of the CDN's 95% billing bandwidth exceeding the planned bandwidth baseline value for the current month has exceeded the preset probability threshold and that corresponding solutions and processing measures need to be taken in a timely manner.
[0090] In this way, by executing the above steps S101-S105, it is possible to accurately predict the probability that the 95 billing bandwidth of the CDN this month will exceed the planned loan baseline value based on the generated bandwidth data, thereby greatly improving the accuracy of CDN bandwidth billing warnings and the appropriate timing for intervention analysis and cost reduction actions, providing very good data support for the reasonable management and control of CDN costs.
[0091] In summary, this embodiment provides a CDN 95% billing bandwidth prediction method. The method first obtains the monthly CDN bandwidth cost and, based on this monthly CDN bandwidth cost, calculates the bandwidth baseline value for the CDN 95% billing plan. The method then obtains the bandwidth data values generated for each period within a preset period for the current month. The method then determines the number M of bandwidth data values generated that exceed the planned bandwidth baseline value, where M is an integer not less than 0. The method then calculates the total number N of bandwidth data values expected to be collected for the current month, where N is an integer not less than M, based on the preset period. Furthermore, the method predicts the probability that the CDN 95% billing bandwidth for the current month will exceed the planned bandwidth baseline value based on the number M and the total number N.
[0092] It can be seen that since this application can more accurately predict the possibility of the CDN's 95 billing bandwidth exceeding the planned bandwidth baseline value in the current month based on the monthly cost of CDN bandwidth and the bandwidth data value generated in the current month, it is convenient for subsequent timely early warning of CDN bandwidth billing, thereby providing effective data support for the reasonable management and control of CDN costs, and avoiding the occurrence of bandwidth and cost overspending.
[0093] Second embodiment
[0094] This embodiment will introduce a CDN 95 billing bandwidth prediction device. For related content, please refer to the above method embodiment.
[0095] See also Figure 2 , is a schematic diagram of the composition of a CDN 95 billing bandwidth prediction device provided in this embodiment, the device 200 includes:
[0096] The first calculation unit 201 is configured to obtain the monthly cost of CDN bandwidth and calculate the bandwidth baseline value of the CDN 95 billing plan based on the monthly cost of CDN bandwidth;
[0097] An acquiring unit 202 is configured to acquire bandwidth data values generated corresponding to each period in a preset period of the current month;
[0098] The determining unit 203 is configured to determine the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values; wherein M is an integer not less than 0;
[0099] The second calculation unit 204 is configured to calculate a total number N of bandwidth data values expected to be collected in the current month according to the preset period; wherein N is an integer not less than M;
[0100] The prediction unit 205 is configured to predict the probability that the 95% billing bandwidth of the CDN in the current month exceeds the planned bandwidth baseline value based on the values of the quantity M and the total quantity N.
[0101] In one implementation of this embodiment, the first calculation unit 201 includes:
[0102] A first calculation subunit is configured to obtain an annual budget amount for the CDN service and calculate a difference between the annual budget amount and a currently spent amount;
[0103] The second calculation subunit is configured to calculate a ratio of the difference to the total number of remaining months in the current year as the monthly cost of the CDN bandwidth.
[0104] In one implementation of this embodiment, the first calculating unit 201 is specifically configured to:
[0105] Calculate the ratio of the monthly cost of the CDN bandwidth to the unit price of CDN bandwidth as the bandwidth baseline value for the CDN 95 billing plan.
[0106] In one implementation of this embodiment, the preset period is 5 minutes; the acquiring unit 202 is specifically configured to:
[0107] Calculate the average bandwidth value every 5 minutes in the month as the bandwidth data value generated in the corresponding period.
[0108] In one implementation of this embodiment, the apparatus further includes:
[0109] The storage unit is used to store the bandwidth data value generated corresponding to each cycle in a local database according to the cycle;
[0110] The judging unit 203 is specifically configured to:
[0111] The generated bandwidth data values corresponding to each period are obtained from the database, and the number M of bandwidth data values exceeding the planned bandwidth baseline value is determined therefrom.
[0112] In one implementation of this embodiment, the apparatus further includes:
[0113] The early warning unit is configured to issue an early warning signal of the CDN 95 billing bandwidth prediction when it is determined that the probability result is higher than a preset probability threshold.
[0114] In an implementation of this embodiment, the preset probability threshold is 60%.
[0115] Furthermore, the embodiment of the present application also provides a CDN 95 billing bandwidth prediction device, comprising: a processor, a memory, and a system bus;
[0116] The processor and the memory are connected via the system bus;
[0117] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementation methods of the above-mentioned CDN 95 billing bandwidth prediction method.
[0118] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device executes any one of the implementation methods of the above-mentioned CDN 95 billing bandwidth prediction method.
[0119] Furthermore, an embodiment of the present application also provides a computer program product, which, when running on a terminal device, enables the terminal device to execute any one of the implementation methods of the above-mentioned CDN 95 billing bandwidth prediction method.
[0120] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in each embodiment of the present application or certain parts of the embodiments.
[0121] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the methods.
[0122] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0123] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A CDN 95 billing bandwidth prediction method, It is characterized in that include: Obtain the monthly cost of CDN bandwidth, and calculate the bandwidth baseline value of the CDN 95 billing plan based on the monthly cost of CDN bandwidth; Obtain the bandwidth data value generated for each period in the preset period of the month; Determine the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values; wherein M is an integer not less than 0; Calculating the total number N of bandwidth data values expected to be collected in the month according to the preset period; N is an integer not less than M; According to the values of the quantity M and the total quantity N, a probability result of 95% of the billed bandwidth of the CDN in the current month exceeding the planned bandwidth baseline value is predicted.
2. The method according to claim 1, It is characterized in that The monthly cost of obtaining CDN bandwidth includes: Obtain the annual budget amount of the CDN service, and calculate the difference between the annual budget amount and the current amount spent; The ratio of the difference to the total number of months remaining in the year is calculated as the monthly cost of CDN bandwidth.
3. The method according to claim 1, It is characterized in that The calculating of the bandwidth baseline value of the 95% billing plan of the CDN according to the monthly cost of the CDN bandwidth includes: The ratio of the monthly cost of the CDN bandwidth to the unit price of the CDN bandwidth is calculated as the bandwidth baseline value of the CDN 95 billing plan.
4. The method according to claim 1, It is characterized in that The preset period is 5 minutes as one period; the obtaining of the bandwidth data value corresponding to each period in the preset period of the month includes: Calculate the average bandwidth value every 5 minutes in the month as the bandwidth data value generated in the corresponding period.
5. The method according to claim 1, It is characterized in that After obtaining the generated bandwidth data value corresponding to each period in the preset period of the month, the method further includes: The bandwidth data value generated corresponding to each period is stored in the local database periodically; The determining the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values includes: The generated bandwidth data values corresponding to each period are obtained from the database, and the number M of bandwidth data values exceeding the planned bandwidth baseline value is determined therefrom.
6. The method according to any one of claims 1 to 5, It is characterized in that After predicting the probability result that the 95% billing bandwidth of the CDN in the current month exceeds the planned bandwidth baseline value according to the values of the quantity M and the total quantity N, the method further includes: When it is determined that the probability result is higher than a preset probability threshold, an early warning signal of the CDN 95 billing bandwidth prediction is issued.
7. The method according to claim 6, It is characterized in that The preset probability threshold is 60%.
8. A CDN 95 billing bandwidth prediction device, It is characterized in that include: The first calculation unit is used to obtain the monthly cost of CDN bandwidth, and calculate the bandwidth baseline value of the 95 billing plan of the CDN according to the monthly cost of the CDN bandwidth; An acquisition unit, used to acquire the bandwidth data value generated corresponding to each period in the preset period of the month; A determining unit, configured to determine the number M of bandwidth data values that exceed the planned bandwidth baseline value among the generated bandwidth data values; The M is an integer not less than 0; A second calculation unit, used to calculate the total number N of bandwidth data values expected to be collected in the month according to the preset period; Said N is an integer not less than M; The prediction unit is used to predict the probability result that the 95% billing bandwidth of the CDN in the current month exceeds the planned bandwidth baseline value according to the values of the quantity M and the total quantity N.
9. A CDN 95 billing bandwidth prediction device, It is characterized in that include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
High-voltage cable partial discharge on-line monitoring alarm method, device and system
CN105676077A
Method and device for managing and controlling traffic, electronic equipment and readable storage medium
CN114095443A
CDN node bandwidth planning method and device and storage medium
CN114915559A
CDN node bandwidth guiding method and device, electronic equipment and storage medium
CN117061367A
