Resource recommendation method and apparatus
By predicting future user traffic and combining traffic and bandwidth billing, the optimal bandwidth is determined and recommended, solving the high cost problem caused by peak bandwidth billing in CDN technology, and achieving efficient resource utilization and cost minimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2023-01-06
- Publication Date
- 2026-04-21
AI Technical Summary
In existing CDN technologies, peak bandwidth billing methods result in high user costs and wasted resources, and fail to effectively utilize traffic attribute characteristics.
By predicting traffic values within a target time range based on users' historical traffic data, and combining traffic and bandwidth-based billing methods, the system determines recommended bandwidth that meets preset cost conditions and recommends it to users.
This minimizes user costs, reduces resource waste, optimizes CDN service billing methods, and lowers overall user expenses.
Smart Images

Figure CN116260666B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of Internet technology, and in particular to resource recommendation methods. Background Technology
[0002] With the booming development of the information content industry, video and streaming media have become important carriers of internet content. Compared with traditional text and image content, video content can convey more vivid information and also has a larger data volume. Therefore, CDN technology is needed to accelerate content distribution.
[0003] Currently, CDN technology typically uses peak bandwidth billing, meaning users can purchase different tiers of peak bandwidth from CDN operators to utilize the technology. However, the inherent traffic characteristics of streaming media services mean that peak bandwidth generally only exists within a fixed time period each day, while real-time traffic at other times is far below the peak bandwidth. This peak bandwidth billing method leads to higher costs for users, greater resource consumption, and resource waste. Therefore, an effective technical solution is urgently needed to address these issues. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a resource recommendation method. One or more embodiments of this specification also relate to a resource recommendation apparatus, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a resource recommendation method is provided, comprising: predicting traffic values within a target time range based on a user's historical traffic values; determining a recommended bandwidth that meets preset cost conditions when calculating costs using a combination of traffic and bandwidth billing based on the traffic values within the target time range; and recommending the recommended bandwidth to the user.
[0006] According to a second aspect of the embodiments of this specification, a resource recommendation apparatus is provided, comprising: a prediction module configured to predict traffic values within a target time range based on a user's historical traffic values; a determination module configured to determine, based on the traffic values within the target time range, a recommended bandwidth that meets preset cost conditions when cost is calculated using a combination of traffic and bandwidth billing; and a recommendation module configured to recommend the recommended bandwidth to the user.
[0007] According to a third aspect of the embodiments of this specification, a computing device is provided, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the steps of the resource recommendation method described above.
[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the resource recommendation method described above.
[0009] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the resource recommendation method described above.
[0010] One embodiment of this specification provides a resource recommendation method, which predicts traffic values within a target time range based on a user's historical traffic values; determines recommended bandwidth that meets preset cost conditions when calculating costs using a combination of traffic and bandwidth billing based on the traffic values within the target time range, wherein the preset cost conditions include conditions for traffic costs and bandwidth costs; and recommends the recommended bandwidth to the user.
[0011] The above method predicts a user's traffic within a target time range based on their historical traffic data. Furthermore, it calculates the recommended bandwidth that minimizes costs based on the predicted traffic within the target time range, using a combined traffic and bandwidth billing method. This recommended bandwidth is then recommended to the user, allowing them to purchase it from the CDN operator, thus minimizing user costs, reducing resource waste, and ultimately lowering overall costs. Attached Figure Description
[0012] Figure 1 This is a schematic diagram illustrating an application scenario of a resource recommendation method provided in one embodiment of this specification;
[0013] Figure 2 This is a flowchart illustrating a resource recommendation method provided in one embodiment of this specification;
[0014] Figure 3 A flowchart illustrating the determination of recommended bandwidth in a resource recommendation method according to an embodiment of this specification is shown;
[0015] Figure 4 A schematic diagram of the objective function in a resource recommendation method according to an embodiment of this specification is shown;
[0016] Figure 5 A schematic flowchart illustrating combined billing in a resource recommendation method according to an embodiment of this specification is shown;
[0017] Figure 6 A flowchart illustrating the processing procedure of a resource recommendation method provided in one embodiment of this specification is shown.
[0018] Figure 7 This is a schematic diagram of the structure of a resource recommendation device provided in one embodiment of this specification;
[0019] Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0020] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0021] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0022] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0023] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0024] CDN: Content Delivery Network. A CDN is a distributed content delivery network built on a data network. The functions of a CDN include using server clustering technology to overcome the limitations of single-machine systems in terms of output bandwidth and concurrency capabilities. This significantly increases the number of concurrent streams supported by the system and reduces or avoids the adverse effects of single points of failure. For example, a CDN can use streaming media server clusters to achieve streaming media transmission.
[0025] SPO: Smart Predict, then Optimize, is a structure for downstream optimization decision problems. It can directly utilize the structure of the optimization problem, namely its objective and constraints, to design predictive models.
[0026] Time series forecasting algorithms: As a quantitative forecasting algorithm, it can use past time series data for statistical analysis to predict the development trend of things. On the other hand, it fully considers the randomness caused by accidental factors. In order to eliminate the impact of random fluctuations, it uses historical data for statistical analysis and performs appropriate data processing to make trend predictions.
[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0028] This specification provides a resource recommendation method, and also relates to a resource recommendation device, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0029] See Figure 1 , Figure 1 The illustration shows an application scenario diagram of a resource recommendation method provided according to an embodiment of this specification.
[0030] Figure 1 This includes a client 102 and a server 104. The client 102 and server 104 are communicatively connected. The client 102 can be either a server or a client for an enterprise user, and it stores the user's historical traffic data. The server 104 can retrieve the historical traffic data recorded in the background of the client 102 after user authorization. Alternatively, users can upload their own historical traffic data via the client 102 as needed. After retrieving the user's historical traffic data, the server 104 executes the resource recommendation method to determine the recommended bandwidth.
[0031] In practice, server 104 responds to the user's recommendation request by obtaining the user's historical traffic value through client 102. After receiving the historical traffic value, server 104 can predict the traffic value that the user may consume within the target time range based on the historical traffic value, and determine the cost and minimum recommended bandwidth that meet the traffic cost and bandwidth cost requirements based on the traffic value. The recommended bandwidth is then sent to client 102, which can then display the recommended bandwidth to the user or directly send the recommended bandwidth to the CDN operator and purchase CDN services from the CDN operator according to the recommended bandwidth.
[0032] See Figure 2 , Figure 2 A flowchart of a resource recommendation method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0033] Step 202: Based on the user's historical traffic values, predict the traffic values within the target time range.
[0034] Specifically, the resource recommendation method provided in the embodiments of this specification can be applied to CDN billing in streaming media scenarios, or to traffic billing in telecommunications operation scenarios. The embodiments of this specification do not limit this application.
[0035] For ease of understanding, the embodiments in this specification all use the application of the resource recommendation method to CDN billing scenarios as an example for detailed description, but this does not affect the implementation of the resource recommendation method in other feasible scenarios.
[0036] In this context, "user" can be understood as the service provider for video and streaming media. For example, in a live streaming scenario, this could be a live streaming platform or an e-commerce platform. In the static image service provided by an e-commerce platform, browsing product images generates traffic by downloading static images, thus requiring the use of CDN technology. Historical traffic value can be understood as the traffic value consumed by a user within a historical time period. This historical traffic value can include traffic values corresponding to multiple time points within that period. For example, the traffic value consumed by a user on a certain day could be the traffic value consumed at preset time intervals. For instance, a time point could be determined at five-minute intervals; that is, if 1:00 is one time point, then 1:05 and 1:10 could be another. The target time range can be understood as a future time period that needs to be predicted, such as a future month or a future week. The traffic value within the target time range can be understood as the traffic value that needs to be predicted for a user within a future time period, such as the traffic value consumed by a user in a future month or a future day. Similarly, the data consumption of a user within a certain time period in the future can include the data consumption at multiple points in time within that time period, that is, the data consumption of the user at points in time with a preset time interval within that time period.
[0037] Based on this, we can predict the data consumption a user might consume at multiple points in the future, based on the data consumption values at multiple points in the historical time period.
[0038] In practical applications, prediction models or algorithms can be used to predict user traffic within a target time range. Since the traffic value within the target time range includes traffic values corresponding to multiple time points, time series prediction methods can be used to predict the user traffic within the target time range. The specific implementation method is as follows:
[0039] Based on the user's historical traffic values, a time series prediction algorithm is used to predict the user's trend and change values within a target time range;
[0040] Based on the trend value and the change value, predict the flow rate within the target time range.
[0041] Time series forecasting algorithms can be understood as regression forecasting methods, belonging to quantitative forecasting. Their basic principle is twofold: firstly, acknowledging the continuity of development, they use past time series data for statistical analysis to predict trends; secondly, they fully consider the randomness caused by accidental factors. To eliminate the impact of random fluctuations, they utilize historical data for statistical analysis and appropriately process the data to predict trends. A user's trend value within a target time range can be understood as the user's development trend within that range. The variable value can be understood as the user's consumer behavior within the target time range, such as browsing or purchasing behavior. For example, in an e-commerce platform scenario, the trend value can be understood as the platform's success and consumer confidence. The variable value represents consumers' periodic or non-periodic consumption behavior.
[0042] Based on this, time series forecasting methods can be used to predict the user's development trend and consumer access behavior within a target time range by using the user's traffic value at each point in time within a historical period, and then predict the user's traffic value within the target time range based on this development trend and consumer access behavior.
[0043] For example, based on the data from November of a certain e-commerce platform a year ago, we can determine a time point every 5 minutes and predict the development trend of the e-commerce platform and the consumption behavior of consumers on the e-commerce platform in November of the following year based on the traffic value corresponding to each time point. Based on the prediction results, we can calculate the traffic value corresponding to each time point in November of the following year, determined every 5 minutes.
[0044] In addition, the user's historical traffic value can be uploaded by the user to the server executing the resource recommendation method, or it can be automatically obtained by the server executing the resource recommendation method after authorization by the user. This specification does not limit the implementation of the embodiment.
[0045] In summary, predicting a user's traffic within a target time range based on their historical traffic data takes into account the user's historical situation, making the prediction results more accurate and further improving the accuracy of subsequent bandwidth recommendations based on the prediction results.
[0046] Step 204: Based on the traffic volume within the target time range, determine the recommended bandwidth that meets the preset cost conditions when calculating costs using a combination of traffic and bandwidth billing.
[0047] Specifically, after predicting the user's traffic volume within the target time range, the recommended bandwidth that meets the preset cost conditions can be determined when calculating costs using a combination of traffic and bandwidth billing.
[0048] The combined traffic and bandwidth billing method can be understood as a billing method that combines traffic-based billing with peak bandwidth billing.
[0049] Optionally, the preset cost conditions include conditions for traffic costs and bandwidth costs. The preset cost conditions can be understood as the minimum conditions for traffic costs and bandwidth costs.
[0050] Based on this, the recommended bandwidth that minimizes both traffic and bandwidth costs can be calculated, taking into account the traffic value at each point in time within the target time range and the cost calculation method that combines traffic and bandwidth billing.
[0051] In practical applications, the amount of data a user consumes in a target month can be predicted based on the user's historical minute-level data usage. See [link / reference]. Figure 3 , Figure 3 A flowchart illustrating the determination of recommended bandwidth in a resource recommendation method according to an embodiment of this specification is shown, specifically including the following steps.
[0052] Step 302: Obtain the user's minute-level traffic value within the historical time period.
[0053] Here, minute-level traffic values can be understood as traffic values at the minute level. For example, it could be the traffic value corresponding to a 5-minute interval, or it could be the traffic value corresponding to a 1-hour interval, or even a 1-day interval. Understandably, because there are more minute-level traffic values, the prediction results based on minute-level traffic values are more accurate.
[0054] Step 304: Predict user traffic in the target month.
[0055] Step 306: Calculate the recommended bandwidth based on the predicted traffic value.
[0056] The recommended bandwidth can be understood as the bandwidth that minimizes the sum of traffic cost and bandwidth cost. Accordingly, the recommended bandwidth is calculated based on the predicted traffic value, that is, based on the traffic value within the target time range, the recommended bandwidth that meets the preset cost conditions is determined when calculating costs using a combined traffic and bandwidth billing method.
[0057] In summary, by combining prediction and decision optimization algorithms, the advantages of both peak bandwidth billing and traffic billing methods are fully integrated, along with the user's own service traffic demand characteristics. This allows for the establishment of a traffic demand trend prediction and bandwidth resource level recommendation service. Through combined billing recommendations, while considering both overall cost and service traffic demand, the overall cost can be reduced while meeting service traffic demand.
[0058] Specifically, when determining the recommended bandwidth that meets the preset cost conditions, iterative processing can be performed based on traffic cost and bandwidth cost until the recommended bandwidth that minimizes both traffic cost and bandwidth cost is obtained. The specific implementation method is as follows:
[0059] Calculate the initial cost corresponding to the traffic value within the target time range, assuming the user uses the initial recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0060] If the initial cost is determined to be within a preset cost range, the initial recommended bandwidth is determined as the recommended bandwidth to be recommended to the user.
[0061] If it is determined that the initial cost does not reach the preset cost range, the updated recommended bandwidth corresponding to the current iteration process is determined based on the initial recommended bandwidth;
[0062] In the current iteration, the update cost corresponding to the traffic value within the target time range is calculated when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0063] The target cost is determined from the initial cost and the updated cost calculated during each iteration;
[0064] Determine whether the target cost converges to a minimum;
[0065] If so, the recommended bandwidth corresponding to the target cost is determined as the recommended bandwidth to be recommended to the user;
[0066] If not, based on the recommended bandwidth corresponding to the target cost, determine the updated recommended bandwidth for the next iteration, proceed to the next iteration, and return to the step of calculating the update cost corresponding to the traffic value within the target time range when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0067] The initial recommended bandwidth can be understood as the preset bandwidth actually purchased by the user. The preset cost range can be understood as the range of the sum of traffic cost and bandwidth cost set in advance. If the cost is within this preset cost range, it means that the cost is relatively small and acceptable to the user, and the recommended bandwidth corresponding to this cost can be recommended to the user.
[0068] Based on this, the initial cost that a user would incur within the predicted target time range when using the determined initial recommended bandwidth and employing a combined traffic and bandwidth billing method for cost calculation can be calculated. It is then determined whether this initial cost reaches a preset cost range. If so, the recommended bandwidth corresponding to this cost can be directly recommended to the user. If not, the updated recommended bandwidth corresponding to the current iteration needs to be determined based on the initial recommended bandwidth. Specifically, the update time point can be determined within the fluctuation range above and below the initial time point corresponding to the initial recommended bandwidth, and the updated recommended bandwidth corresponding to the update time point can be determined. The updated cost corresponding to the traffic value within the target time range is calculated again when the user uses the updated recommended bandwidth and employs a combined traffic and bandwidth billing method for cost calculation. The target cost with the minimum cost value is determined from the initial cost and the updated cost calculated in each iteration. It is then determined whether the target cost converges to the minimum. This process of multiple iterations aims to minimize the cost. If the target cost converges to the minimum, it indicates that the cost incurred by the user within the predicted target time range is minimized when using the recommended bandwidth corresponding to the target cost. Therefore, the recommended bandwidth corresponding to this target cost is determined as the recommended bandwidth to be recommended to the user. If the target cost has not converged to the minimum, it means that the recommended bandwidth corresponding to the target cost is not enough to minimize the cost of traffic consumption within the predicted target time range. In this case, it is necessary to redetermine and update the recommended bandwidth and continue to execute the step of calculating and updating the cost until the target cost with the minimum determined cost value converges to the minimum, thereby minimizing the cost of traffic consumption by users within the target time range.
[0069] It should be noted that after two iterations, the initial cost, the first update cost in the first iteration, and the second update cost in the second iteration are calculated. The initial cost corresponds to the initial recommended bandwidth, the first update cost corresponds to the recommended update bandwidth in the first iteration, and the second update cost corresponds to the second recommended bandwidth in the second iteration. Therefore, the target cost that minimizes the initial cost is determined from these three costs. Similarly, after three iterations, the target cost that minimizes the initial cost is determined from these four costs: the initial cost, the first update cost, the second update cost, and the third update cost.
[0070] In summary, by combining the costs calculated in each iteration, determining the target cost with the minimum cost value, and then judging whether the target cost converges to the minimum, the efficiency of determining the recommended bandwidth can be improved.
[0071] In practical applications, the traffic value within the target time range includes the traffic value corresponding to a specific time point within the target time range. For example, it could be the traffic value corresponding to a time point within the target time range at preset time intervals. Therefore, before calculating the initial cost, to facilitate the subsequent determination of the recommended bandwidth that meets the preset cost, a target function can be constructed, and this target function can be used to provide the traffic value corresponding to any time point within the target time range. The specific implementation method is as follows:
[0072] Using time points within the target time range as the horizontal axis and the corresponding flow rates within the target time range as the vertical axis, an objective function is constructed. The objective function is used to provide the flow rate corresponding to any time point within the target time range during the calculation of the initial cost or the update cost.
[0073] See Figure 4 , Figure 4 A schematic diagram of the objective function in a resource recommendation method provided according to an embodiment of this specification is shown. Figure 4 The curve in the figure represents the objective function. The horizontal axis of the objective function represents the time point within the target time range, and the vertical axis represents the flow rate value corresponding to the time point, that is, the predicted flow rate value that may be consumed at that time point.
[0074] In practical applications, a general SPO optimization structure can be used to construct the objective function and determine the recommended bandwidth. Alternatively, the general SPO optimization structure can be improved according to the specific implementation scenario, and the improved SPO optimization structure can be used to construct the objective function. The embodiments in this specification are not limited here.
[0075] In summary, by constructing an objective function based on traffic values within a target time range, a foundation can be provided for subsequently determining the recommended bandwidth that meets the preset cost. Furthermore, the predicted traffic values within the target time range can be visualized, enabling flexible and accurate cost calculation.
[0076] In specific implementation, the initial cost corresponding to the traffic value within the target time range is calculated when the user uses the initial recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing. This includes:
[0077] Determine the initial time point within the target time range and the corresponding traffic value at the initial time point, and use the traffic value as the initial recommended bandwidth;
[0078] Based on the initial time point and the initial recommended bandwidth corresponding to the initial time point, calculate the initial bandwidth cost and initial traffic cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth;
[0079] Calculate the initial cost based on the initial bandwidth cost and the initial traffic cost.
[0080] Specifically, it can be found Figure 4 In the objective function shown, an initial time point is determined, and the traffic value corresponding to that initial time point is determined according to the objective function. This traffic value is used as the initial recommended bandwidth. Figure 4 The line in the middle represents the intersection of the objective function and the objective function; the intersection point of the objective function and this line is the initial time point. The initial bandwidth cost and initial traffic cost are calculated for the traffic values within the target time range, assuming the user uses this initial bandwidth. The initial bandwidth cost corresponding to the traffic values within the target time range is... Figure 4 The straight line in the diagram corresponds to the A-bandwidth cost, which is the cost of the initial recommended bandwidth. The initial traffic cost corresponding to the traffic value within the target time range is... Figure 4 The area of the shaded region between the objective function and the straight line in the equation is the B-flow cost.
[0081] In summary, by calculating the initial cost based on the initial recommended bandwidth, this initial cost can be used for subsequent iterations until it is minimized, thereby achieving the recommendation of the recommended bandwidth resource level and ultimately minimizing the overall cost.
[0082] In specific implementation, the step of calculating the initial bandwidth cost and initial traffic cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth, based on the initial time point and the initial recommended bandwidth corresponding to the initial time point, includes:
[0083] Based on the initial recommended bandwidth and the price corresponding to the initial recommended bandwidth, calculate the initial bandwidth cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth;
[0084] Based on the initial time point, a target time point is determined that exceeds the traffic value corresponding to the initial time point within the target time range, and the initial traffic cost corresponding to the traffic value at the target time point is calculated when the user uses the initial recommended bandwidth.
[0085] Specifically, the price of the initial recommended bandwidth can be determined from the CDN operator's bandwidth tier pricing, thus determining the initial bandwidth cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth. Furthermore, based on the initial time point, the target time point exceeding the traffic value corresponding to the initial time point can be determined, such as... Figure 4 As shown, all time points above the straight line are the target time points, and the initial traffic cost is calculated based on the traffic value and traffic price corresponding to the target time point.
[0086] In summary, by calculating the initial traffic cost and the initial bandwidth cost separately, the initial cost, i.e. the total cost, can be calculated, providing a foundation for subsequent iterative processing.
[0087] In practice, if the initial cost has not converged to the minimum, the recommended bandwidth can be updated based on the initial recommended bandwidth. The specific implementation method is as follows:
[0088] Based on the initial time point corresponding to the initial recommended bandwidth, determine the update time point within the target time range and the traffic value corresponding to the update time point, and use the traffic value as the update recommended bandwidth.
[0089] Specifically, the update time point can be determined based on the initial time point corresponding to the peak bandwidth and the initial recommended bandwidth. The peak bandwidth refers to the maximum allowed instantaneous traffic. Figure 4 The peak position of the objective function corresponds to the peak bandwidth. Using this peak bandwidth, the update time point can be determined between the initial time point corresponding to the initial recommended bandwidth and the time point corresponding to the peak bandwidth.
[0090] Based on this, the update time point within the target time range can be determined between the time point corresponding to the peak bandwidth and the initial time point corresponding to the initial recommended bandwidth. The billing point of the update recommended bandwidth when the initial cost is minimized can be calculated using a preset function. This billing point is the update time point, and the traffic value corresponding to this update time point is determined and used as the update recommended bandwidth.
[0091] In practical applications, the preset function can be a function that calculates the value of a variable that makes the function take the minimum value. For example, it can be the argmin function, which is a commonly used mathematical function that can be used to calculate the minimum value.
[0092] Accordingly, when determining the recommended bandwidth for the next iteration based on the recommended bandwidth corresponding to the target cost, the update time point within the target time range and the traffic value corresponding to the update time point can be redefined based on the update time point corresponding to the updated recommended bandwidth and the time point corresponding to the peak bandwidth, and the traffic value can be used as the redefined recommended bandwidth.
[0093] In summary, by continuously determining and updating the recommended bandwidth based on the initial cost when the initial cost has not converged to the minimum, and iterating until the initial cost converges to the minimum, the recommended bandwidth with the minimum determined cost is achieved.
[0094] In specific implementation, the calculation, under the condition that the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing, includes the update cost corresponding to the traffic value within the target time range, which includes:
[0095] Based on the recommended update bandwidth and the price corresponding to the recommended update bandwidth, calculate the update bandwidth cost corresponding to the traffic value within the target time range when the user uses the recommended update bandwidth;
[0096] Based on the update time point, a target time point is determined that exceeds the traffic value corresponding to the update time point within the target time range, and the update traffic cost corresponding to the traffic value at the target time point is calculated when the user uses the update recommended bandwidth.
[0097] Calculate the update cost based on the update bandwidth cost and update traffic cost.
[0098] It should be noted that the method for calculating the update cost is similar to that for calculating the initial cost, and will not be repeated here.
[0099] Step 206: Recommend the recommended bandwidth to the user.
[0100] Specifically, after determining the recommended bandwidth that meets the preset cost conditions, the recommended bandwidth can be recommended to users, so that users can purchase CDN services from CDN operators according to the determined recommended bandwidth, thereby saving costs.
[0101] Furthermore, after determining the recommended bandwidth that meets the preset cost conditions, a recommended traffic value can also be determined based on the predicted traffic value within the target time range, and this recommended traffic value can be recommended to the user, allowing the user to purchase both bandwidth and traffic at the same time. The specific implementation method is as follows:
[0102] The recommended traffic value is determined based on the recommended bandwidth and the traffic value within the target time range;
[0103] The recommended traffic value is recommended to the user.
[0104] In summary, by determining the bandwidth and traffic required by users within a target time frame and recommending them accordingly, users can purchase the recommended bandwidth and traffic, maximizing their traffic needs while saving costs and ensuring a good user experience when peak bandwidth usage is reached.
[0105] In practical applications, after recommending the bandwidth to users, this bandwidth can also be provided to CDN operators. When users access the CDN and generate traffic, they will be billed according to this combined billing method. See also Figure 5 , Figure 5 A schematic flowchart illustrating combined billing in a resource recommendation method according to an embodiment of this specification is shown, with the specific steps as follows.
[0106] Step 502: Provide the CDN operator with a determined recommended bandwidth.
[0107] Step 504: When a user accesses the CDN, determine the traffic consumed by the user accessing the CDN.
[0108] Step 506: The CDN operator bills users for CDN access according to the combined billing rules.
[0109] Specifically, regarding bandwidth, billing is based on the recommended bandwidth price. For traffic, billing can be based on the user's real-time traffic consumption. When real-time traffic is below the recommended bandwidth, it is included in the bandwidth portion and billed according to the recommended bandwidth price; no further traffic billing is required. When real-time traffic exceeds the recommended bandwidth, the current traffic value needs to be calculated by subtracting the recommended bandwidth from the current bandwidth used, and traffic billing is based on the result.
[0110] In summary, the above method predicts a user's traffic within a target time range based on their historical traffic data. Furthermore, it calculates the recommended bandwidth that minimizes costs based on the predicted traffic within the target time range, using a combined traffic and bandwidth billing method. This recommended bandwidth is then recommended to the user, allowing them to purchase it from the CDN operator, thus minimizing user costs, reducing resource waste, and ultimately lowering overall costs.
[0111] The following is in conjunction with the appendix Figure 6 Taking the resource recommendation method provided in this specification as an example in CDN billing, the resource recommendation method will be further explained. Figure 6 The present specification illustrates a flowchart of a resource recommendation method according to an embodiment, which includes the following steps.
[0112] Step 602: Based on the user's historical traffic values, use a time series prediction algorithm to predict the trend and change values of the user within the target time range.
[0113] Specifically, when this resource recommendation method is applied to CDN billing for live streaming platforms, it can predict the development trend of the live streaming platform and consumer access behavior within a target time range based on the traffic value corresponding to each time point in the historical time period.
[0114] Step 604: Based on the trend value and the change value, predict the flow rate within the target time range.
[0115] Specifically, based on the predicted development trend of the live streaming platform within the target time range and consumer access behavior, the potential traffic consumption of the live streaming platform at each point in time within the target time range can be predicted.
[0116] Step 606: Construct an objective function with the time points within the target time range as the horizontal axis and the flow rate values corresponding to the time points within the target time range as the vertical axis.
[0117] Step 608: Based on the objective function, determine the initial time point within the target time range and the traffic value corresponding to the initial time point, and use the traffic value as the initial recommended bandwidth.
[0118] Specifically, based on the objective function, one of the time points within the target time range can be used as the initial time point, and the traffic value corresponding to that initial time point can be determined according to the objective function, and that traffic value can be used as the initial recommended bandwidth.
[0119] Step 610: Based on the initial time point and the initial recommended bandwidth corresponding to the initial time point, calculate the initial bandwidth cost and initial traffic cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth.
[0120] Specifically, based on the initial recommended bandwidth and the price corresponding to the initial recommended bandwidth, the initial bandwidth cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth can be calculated; and based on the initial time point, a target time point within the target time range that exceeds the traffic value corresponding to the initial time point can be determined, and the initial traffic cost corresponding to the traffic value at the target time point when the user uses the initial recommended bandwidth can be calculated.
[0121] Step 612: Calculate the initial cost based on the initial bandwidth cost and the initial traffic cost.
[0122] Specifically, the initial bandwidth cost and the initial traffic cost can be added together to obtain the initial cost.
[0123] Step 614: Determine whether the initial cost reaches the preset cost range. If yes, proceed to step 616; if no, proceed to step 618.
[0124] The preset cost range can be understood as the range of the sum of traffic cost and bandwidth cost set in advance. If the cost is within the preset cost range, the recommended bandwidth corresponding to that cost can be directly recommended to the user.
[0125] Step 616: Determine the initial recommended bandwidth as the recommended bandwidth to be recommended to the user.
[0126] Step 618: Determine the updated recommended bandwidth corresponding to the current iteration process based on the initial recommended bandwidth.
[0127] Specifically, based on the time point corresponding to the peak bandwidth and the initial time point corresponding to the initial recommended bandwidth, the update time point within the target time range can be determined between these two time points, and the traffic value corresponding to the update time point can be used as the update recommended bandwidth.
[0128] Step 620: In the current iteration, calculate the update cost corresponding to the traffic value within the target time range, assuming the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0129] Step 622: Determine the target cost that minimizes the initial cost and the updated cost calculated in each iteration.
[0130] Step 624: Determine whether the target cost has converged to the minimum. If yes, proceed to step 626; otherwise, proceed to step 628.
[0131] Step 626: Determine the recommended bandwidth corresponding to the target cost as the recommended bandwidth to be recommended to the user.
[0132] Specifically, the recommended bandwidth meets the preset cost conditions, that is, the sum of the traffic cost and bandwidth cost corresponding to the recommended bandwidth is the lowest.
[0133] Step 628: Based on the recommended bandwidth corresponding to the target cost, redetermine the updated recommended bandwidth and continue with step 620.
[0134] Step 630: Determine the recommended traffic value based on the recommended bandwidth and the traffic value within the target time range.
[0135] Step 632: Recommend the recommended bandwidth and the recommended traffic value to the user.
[0136] In summary, the above method predicts a user's traffic within a target time range based on their historical traffic data. Furthermore, it calculates the recommended bandwidth that minimizes costs based on the predicted traffic within the target time range, using a combined traffic and bandwidth billing method. This recommended bandwidth is then recommended to the user, allowing them to purchase it from the CDN operator, thus minimizing user costs, reducing resource waste, and ultimately lowering overall costs.
[0137] Corresponding to the above method embodiments, this specification also provides embodiments of a resource recommendation device. Figure 7 A schematic diagram of a resource recommendation device according to one embodiment of this specification is shown. Figure 7 As shown, the device includes:
[0138] The prediction module 702 is configured to predict traffic values within a target time range based on the user's historical traffic values;
[0139] The determination module 704 is configured to determine, based on the traffic value within the target time range, a recommended bandwidth that meets preset cost conditions when calculating costs using a combination of traffic and bandwidth billing.
[0140] The recommendation module 706 is configured to recommend the recommended bandwidth to the user.
[0141] In an optional embodiment, the determining module 704 is further configured to:
[0142] Calculate the initial cost corresponding to the traffic value within the target time range, assuming the user uses the initial recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0143] Determine whether the initial cost reaches the preset cost range;
[0144] If the initial cost is determined to be within a preset cost range, the initial recommended bandwidth is determined as the recommended bandwidth to be recommended to the user.
[0145] In an optional embodiment, the determining module 704 is further configured to:
[0146] If it is determined that the initial cost does not reach the preset cost range, the updated recommended bandwidth corresponding to the current iteration process is determined based on the initial recommended bandwidth;
[0147] In the current iteration, the update cost corresponding to the traffic value within the target time range is calculated when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0148] The target cost is determined from the initial cost and the updated cost calculated during each iteration;
[0149] Determine whether the target cost converges to a minimum;
[0150] If so, the recommended bandwidth corresponding to the target cost is determined as the recommended bandwidth to be recommended to the user;
[0151] If not, based on the recommended bandwidth corresponding to the target cost, determine the updated recommended bandwidth for the next iteration, proceed to the next iteration, and return to the step of calculating the update cost corresponding to the traffic value within the target time range when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing.
[0152] In an optional embodiment, the traffic value within the target time range includes the traffic value corresponding to a specific time point within the target time range; the device further includes a construction module configured to:
[0153] Using time points within the target time range as the horizontal axis and the corresponding flow rates within the target time range as the vertical axis, an objective function is constructed. The objective function is used to provide the flow rate corresponding to any time point within the target time range during the calculation of the initial cost or the update cost.
[0154] In an optional embodiment, the determining module 704 is further configured to:
[0155] Determine the initial time point within the target time range and the corresponding traffic value at the initial time point, and use the traffic value as the initial recommended bandwidth;
[0156] Based on the initial time point and the initial recommended bandwidth corresponding to the initial time point, calculate the initial bandwidth cost and initial traffic cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth;
[0157] Calculate the initial cost based on the initial bandwidth cost and the initial traffic cost.
[0158] In an optional embodiment, the determining module 704 is further configured to:
[0159] Based on the initial recommended bandwidth and the price corresponding to the initial recommended bandwidth, calculate the initial bandwidth cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth;
[0160] Based on the initial time point, a target time point is determined that exceeds the traffic value corresponding to the initial time point within the target time range, and the initial traffic cost corresponding to the traffic value at the target time point is calculated when the user uses the initial recommended bandwidth.
[0161] In an optional embodiment, the determining module 704 is further configured to:
[0162] Based on the initial time point corresponding to the initial recommended bandwidth, determine the update time point within the target time range and the traffic value corresponding to the update time point, and use the traffic value as the update recommended bandwidth.
[0163] In an optional embodiment, the determining module 704 is further configured to:
[0164] Based on the recommended update bandwidth and the price corresponding to the recommended update bandwidth, calculate the update bandwidth cost corresponding to the traffic value within the target time range when the user uses the recommended update bandwidth;
[0165] Based on the update time point, a target time point is determined that exceeds the traffic value corresponding to the update time point within the target time range, and the update traffic cost corresponding to the traffic value at the target time point is calculated when the user uses the update recommended bandwidth.
[0166] Calculate the update cost based on the update bandwidth cost and update traffic cost.
[0167] In an optional embodiment, the prediction module 702 is further configured to:
[0168] Based on the user's historical traffic values, a time series prediction algorithm is used to predict the user's trend and change values within a target time range;
[0169] Based on the trend value and the change value, predict the flow rate within the target time range.
[0170] In an optional embodiment, the determining module 704 is further configured to:
[0171] The recommended traffic value is determined based on the recommended bandwidth and the traffic value within the target time range;
[0172] The recommended traffic value is recommended to the user.
[0173] In summary, the aforementioned device predicts a user's traffic within a target time range based on their historical traffic data. Furthermore, based on the predicted traffic within the target time range, and considering cost calculations using a combined traffic and bandwidth billing method, it calculates the recommended bandwidth that minimizes costs. This recommended bandwidth is then recommended to the user, allowing them to purchase it from the CDN operator, thus minimizing user costs, reducing resource waste, and ultimately lowering overall costs.
[0174] The above is an illustrative scheme of a resource recommendation device according to this embodiment. It should be noted that the technical solution of this resource recommendation device and the technical solution of the resource recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the resource recommendation device, please refer to the description of the technical solution of the resource recommendation method described above.
[0175] Figure 8 A structural block diagram of a computing device 800 according to one embodiment of this specification is shown. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.
[0176] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0177] In one embodiment of this application, the aforementioned components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0178] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.
[0179] The processor 820 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the resource recommendation method described above.
[0180] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the resource recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the resource recommendation method described above.
[0181] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the resource recommendation method described above.
[0182] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the resource recommendation method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the resource recommendation method described above.
[0183] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the resource recommendation method described above.
[0184] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the resource recommendation method described above belong to the same concept. Details not described in detail in the technical solution of the computer program can be found in the description of the technical solution of the resource recommendation method described above.
[0185] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0186] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0187] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0188] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0189] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A resource recommendation method, comprising: Based on the user's historical traffic data, predict the traffic data within the target time range; Calculate the initial cost corresponding to the traffic value within the target time range, assuming the user uses the initial recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing. If the initial cost is determined to be within a preset cost range, the initial recommended bandwidth is determined as the recommended bandwidth to be recommended to the user; If it is determined that the initial cost does not reach the preset cost range, the updated recommended bandwidth corresponding to the current iteration process is determined based on the initial recommended bandwidth; In the current iteration, the update cost corresponding to the traffic value within the target time range is calculated when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing. The target cost is determined from the initial cost and the updated cost calculated during each iteration; Determine whether the target cost converges to a minimum; If so, the recommended bandwidth corresponding to the target cost is determined as the recommended bandwidth to be recommended to the user; If not, based on the recommended bandwidth corresponding to the target cost, determine the updated recommended bandwidth for the next iteration, proceed to the next iteration, and return to the step of calculating the update cost corresponding to the traffic value within the target time range when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing. The recommended bandwidth is recommended to the user.
2. The method according to claim 1, wherein the flow rate value within the target time range includes the flow rate value corresponding to a time point within the target time range; The calculation, assuming the user uses the initial recommended bandwidth and a combined traffic and bandwidth billing method for cost calculation, includes the following before the initial cost corresponding to the traffic value within the target time range: Using time points within the target time range as the horizontal axis and the corresponding flow rates within the target time range as the vertical axis, an objective function is constructed. The objective function is used to provide the flow rate corresponding to any time point within the target time range during the calculation of the initial cost or the update cost.
3. The method according to claim 1, wherein calculating the initial cost corresponding to the traffic value within the target time range, under the condition that the user uses the initial recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing, includes: Determine the initial time point within the target time range and the corresponding traffic value at the initial time point, and use the traffic value as the initial recommended bandwidth; Based on the initial time point and the initial recommended bandwidth corresponding to the initial time point, calculate the initial bandwidth cost and initial traffic cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth; Calculate the initial cost based on the initial bandwidth cost and the initial traffic cost.
4. The method according to claim 3, wherein calculating the initial bandwidth cost and initial traffic cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth, based on the initial time point and the initial recommended bandwidth corresponding to the initial time point, includes: Based on the initial recommended bandwidth and the price corresponding to the initial recommended bandwidth, calculate the initial bandwidth cost corresponding to the traffic value within the target time range when the user uses the initial recommended bandwidth; Based on the initial time point, a target time point is determined that exceeds the traffic value corresponding to the initial time point within the target time range, and the initial traffic cost corresponding to the traffic value at the target time point is calculated when the user uses the initial recommended bandwidth.
5. The method according to claim 1, wherein determining the update recommendation bandwidth corresponding to the current iteration process based on the initial recommended bandwidth includes: Based on the initial time point corresponding to the initial recommended bandwidth, determine the update time point within the target time range and the traffic value corresponding to the update time point, and use the traffic value as the update recommended bandwidth.
6. The method according to claim 5, wherein calculating the update cost corresponding to the traffic value within the target time range when the user uses the updated recommended bandwidth and the cost is calculated using a combination of traffic and bandwidth billing, includes: Based on the recommended update bandwidth and the price corresponding to the recommended update bandwidth, calculate the update bandwidth cost corresponding to the traffic value within the target time range when the user uses the recommended update bandwidth; Based on the update time point, determine the target time point within the target time range that exceeds the traffic value corresponding to the update time point, and calculate the update traffic cost corresponding to the traffic value at the target time point when the user uses the update recommended bandwidth. Calculate the update cost based on the update bandwidth cost and update traffic cost.
7. The method according to claim 1, wherein predicting traffic values within a target time range based on the user's historical traffic values comprises: Based on the user's historical traffic values, a time series prediction algorithm is used to predict the user's trend and change values within a target time range; Based on the trend value and the change value, predict the flow rate within the target time range.
8. The method according to claim 1, further comprising, after determining the initial recommended bandwidth as the recommended bandwidth to the user when the initial cost reaches a preset cost range: The recommended traffic value is determined based on the recommended bandwidth and the traffic value within the target time range; The recommended traffic value is recommended to the user.
9. The method according to claim 1, wherein the preset cost range includes a range for traffic cost and bandwidth cost.
10. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 9.
11. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 9.
12. A computer program product, wherein, Includes a computer program / instruction that, when executed in a computer, causes the computer to perform the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Content distribution network scheduling method, device and server and medium
CN112165691A
Cloud service lease optimization method and device, equipment and medium
CN112311590A