Bandwidth cost analysis method, device and equipment of content distribution network and medium

By performing multi-dimensional analysis and tagging of CDN historical request logs, combined with time aggregation, the problem of CDN bandwidth cost not being able to be attributed in a refined manner has been solved, realizing refined cost breakdown and near real-time monitoring, and improving the accuracy and efficiency of cost analysis.

CN122027490APending Publication Date: 2026-05-12HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing CDN bandwidth cost analysis methods cannot provide refined cost attribution, cannot distinguish the cost contributions of different services under the same domain name, and lack the ability to differentiate experimental dimensions, resulting in large deviations in cost allocation and failing to meet the needs of enterprises for refined cost management.

Method used

By acquiring historical request logs from the content delivery network, performing multi-dimensional analysis and tagging, and combining time aggregation, a correlation is established between bandwidth aggregation data and cost information, enabling refined cost breakdown for any combination of business dimensions. Cost aggregation is performed with a 5-minute time granularity, supporting near real-time monitoring.

Benefits of technology

It enables refined analysis of bandwidth costs, avoids cost allocation deviations caused by multiple services carried by the domain name, reduces analysis costs, improves cost feedback speed, and meets near real-time monitoring requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122027490A_ABST
    Figure CN122027490A_ABST
Patent Text Reader

Abstract

The invention provides a bandwidth cost analysis method and device for a content distribution network, equipment and a medium, and relates to the technical field of network resource cost management. The method comprises the following steps: obtaining service labels of a plurality of historical request logs in each service dimension; performing time aggregation on the plurality of historical request logs to obtain a request log set corresponding to a plurality of historical time periods; aggregating historical request logs in the request log set corresponding to each historical time period according to each target service label under the target service dimension combination to obtain bandwidth aggregation data of the target service dimension combination in each historical time period; and determining the bandwidth cost of the content distribution network under the target service dimension combination according to the bandwidth aggregation data of the target service dimension combination in each historical time period and the cost information of each historical time period. According to the method and the device, the bandwidth aggregation data of the target service dimension combination and the cost information can be aggregated, and data support is provided for cost analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network resource cost management technology, and more specifically, to a method, apparatus, device, and medium for bandwidth cost analysis of a content delivery network. Background Technology

[0002] With the rapid development of internet technology, Content Delivery Networks (CDNs), as core infrastructure for improving network resource transmission efficiency and optimizing user access experience, have been widely used in various business scenarios such as video playback, file download, and webpage acceleration. At the same time, CDN bandwidth costs have become one of the core operating costs for internet companies. Accurate analysis and efficient management of CDN bandwidth costs directly affect a company's operational efficiency and market competitiveness.

[0003] Current CDN bandwidth costs are calculated using a coarse-grained cost accounting scheme based on domain names and billing. This type of scheme mainly relies on billing and simple traffic statistics reports provided by CDN service providers. By importing billing data into the internal financial system, macro-level indicators such as total cost and domain name cost ratio within a certain billing period can be calculated. When it is necessary to analyze specific business costs, domain names must be manually mapped to business lines to complete temporary cost aggregation.

[0004] However, since a single domain name usually carries multiple business lines or business scenarios, this approach cannot distinguish the cost contribution of different businesses under the same domain name, resulting in a large deviation in the cost allocation of business lines; and it lacks the ability to differentiate by experimental dimensions, cannot support cost breakdown by experimental group, and cannot assess the cost differences after different experimental schemes are fully rolled out.

[0005] In summary, existing technical solutions remain at the level of coarse-grained cost statistics, which cannot meet the needs of enterprises for refined cost attribution in CDN bandwidth cost management. Therefore, there is an urgent need for a CDN bandwidth cost quantitative analysis technical solution that can solve the above problems. Summary of the Invention

[0006] This application addresses the shortcomings of the prior art by providing a method, apparatus, device, and medium for bandwidth cost analysis of a content delivery network, in order to solve the problems existing in the prior art.

[0007] The technical solution adopted in the embodiments of this application is as follows: In a first aspect, embodiments of this application provide a method for analyzing the bandwidth cost of a content delivery network, including: Retrieve multiple historical request logs from the content delivery network; The historical request logs are analyzed from multiple business dimensions to obtain business tags for each historical request log in each business dimension. Time aggregation is performed on multiple historical request logs to obtain request log sets corresponding to multiple historical time periods; Based on the target business tags under the target business dimension combination, the historical request logs in the corresponding request log sets of each historical time period are aggregated to obtain the bandwidth aggregated data of the target business dimension combination in each historical time period. Obtain cost information of the content delivery network in each of the historical time periods; Based on the bandwidth aggregation data of the target service dimension combination in each of the historical time periods, and the cost information of each of the historical time periods, the bandwidth cost of the content delivery network under the target service dimension combination is determined.

[0008] In one embodiment, the multiple business dimensions include: business line dimensions and business scenario dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the request resource location information in multiple historical request logs, determine the business line label of the multiple historical request logs in the business line dimension and the business scenario label in the business scenario dimension.

[0009] In one embodiment, the plurality of business dimensions further include: a client version dimension and a terminal type dimension; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the user agent information of multiple historical request logs, determine the client version label of the multiple historical request logs in the client version dimension and the terminal type label in the terminal type dimension.

[0010] In one embodiment, the plurality of business dimensions further include: experimental dimensions and custom dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the custom request fields of multiple historical request logs, determine the experiment tags and business tags of the multiple historical request logs in the experiment dimension and the custom dimension, respectively.

[0011] In one embodiment, if the plurality of business dimensions include: a terminal type dimension and an experiment dimension; the method further includes: Obtain the total bandwidth of the content delivery network during the historical time period, where the total bandwidth is the sum of the pre-allocated bandwidth for all terminal types during the historical time period; Obtain the pre-allocated bandwidth for the target terminal type from all terminal types; Based on the experimental labels under the experimental dimension and the target terminal type labels under the terminal type dimension, the request log sets corresponding to the historical time period are analyzed to obtain the bandwidth of each experimental group under the target terminal type. Based on the overall bandwidth of the historical time period, the bandwidth of the experimental group under the target terminal type, the pre-allocated bandwidth of the target terminal type, and the target push ratio, the overall bandwidth of the content delivery network for the experimental group under the historical time period is estimated.

[0012] In one embodiment, the step of analyzing the request log set corresponding to the historical time period based on the experiment label under the experiment dimension and the target terminal type label under the terminal type dimension to obtain the bandwidth of the experiment group under the target terminal type includes: Based on the experimental labels under the experimental dimension, the request log sets corresponding to the historical time periods are grouped to obtain request logs for multiple experimental groups. Based on the label of the target terminal type under the terminal type dimension and the request log of the experimental group, obtain the bandwidth of the experimental group under the target terminal type.

[0013] In one embodiment, the method further includes: Based on the bandwidth of the experimental group in multiple historical time periods within a preset observation period, the peak bandwidth of the experimental group is determined. The target experimental group is determined based on the peak bandwidth of the multiple experimental groups.

[0014] In one embodiment, determining the target experimental group based on the peak bandwidth of the plurality of experimental groups includes: Compare the peak bandwidth of the large disk in multiple experimental groups; The experimental group with the lowest peak bandwidth was identified as the target experimental group.

[0015] In one embodiment, the method further includes: The bandwidth differences between different experimental groups were determined based on the peak bandwidth of the large disk in multiple experimental groups. The bandwidth cost difference between different experimental groups was determined based on the bandwidth differences between the experimental groups.

[0016] In one embodiment, the method further includes: The bandwidth cost of the content delivery network under the target service dimension combination is stored in a preset database.

[0017] Secondly, embodiments of this application provide a bandwidth cost analysis device for a content delivery network, comprising: The first acquisition module is used to acquire multiple historical request logs from the content delivery network; The analysis module is used to analyze the historical request logs from multiple business dimensions to obtain the business tags of the historical request logs in each of the business dimensions. The first aggregation module is used to perform time aggregation on multiple historical request logs to obtain multiple request log sets corresponding to multiple historical time periods. The second aggregation module is used to aggregate the historical request logs in the request log set corresponding to each historical time period according to each target business tag under the target business dimension combination, so as to obtain the bandwidth aggregation data of the target business dimension combination in each historical time period. The second acquisition module is used to acquire cost information of the content delivery network in each of the historical time periods; The determination module is used to determine the bandwidth cost of the content delivery network under the target service dimension combination based on the bandwidth aggregation data of the target service tags in multiple historical time periods and the cost information of each historical time period.

[0018] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the bandwidth cost analysis method for the content delivery network described in any of the above embodiments.

[0019] Fourthly, embodiments of this application provide a readable storage medium storing program instructions, which, when executed by a processor, implement the bandwidth cost analysis method for the content delivery network described in any of the above embodiments.

[0020] The beneficial effects of this application are: it provides a method for analyzing the bandwidth cost of a content delivery network, which has the following technical advantages: 1. By aggregating bandwidth aggregation data and cost information based on target business dimensions, data support is provided for cost analysis.

[0021] 2. By establishing the association between historical request logs and multiple business dimensions through multi-dimensional tagging, we have achieved refined cost splitting for any combination of business dimensions, avoiding cost allocation deviations caused by multiple business carrying domains.

[0022] 3. By using a unified system for collecting, tagging, and aggregating historical request logs, the need for repeated derivation and modeling is eliminated, reducing analysis costs.

[0023] 4. Costs are aggregated using historical time periods (5 minutes) as the time granularity, which significantly improves the speed of cost feedback compared to daily / monthly billing reports and meets the needs of near real-time cost monitoring. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 One of the flowcharts illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment; Figure 2 A second schematic flowchart illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment; Figure 3 The third flowchart illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment; Figure 4 The fourth flowchart illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment; Figure 5 Fifth flowchart illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment; Figure 6 A flowchart illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment is shown in Figure 6. Figure 7 A schematic diagram of the bandwidth cost analysis device for a content delivery network provided in this application embodiment; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0027] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0028] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.

[0030] The following explains the terms that may be used in this application: A Content Delivery Network (CDN) is an intelligent virtual network built on top of the existing internet infrastructure by placing node servers throughout the network. It redirects user requests to the nearest service node in real time based on comprehensive information such as network traffic, the connectivity and load of each node, as well as the distance and response time to the user.

[0031] User Agent (UA): A type of identifier string in the HTTP request header used to characterize the type of client making the request and its attributes, typically including operating system type, browser type, application name and version, etc. By parsing the UA, it can be used to distinguish different terminals and channels such as Android, iOS, and PC.

[0032] Traffic tagging is the process of attaching business line tags, business scenario tags, client version tags, terminal type tags, experiment tags, and custom-dimensional business tags to each request log according to preset rules. Through traffic tagging, basic network requests can be transformed into structured data with business semantics, providing a foundation for subsequent cost statistics and analysis.

[0033] Overall bandwidth: The total bandwidth value obtained by summing the bandwidth of all terminals within a preset time window (e.g., 5 minutes). Overall bandwidth reflects the bandwidth usage of the entire network within that time window and is a fundamental reference quantity in the experimental push calculation.

[0034] Bandwidth billing: This is a billing method used by CDN service providers based on the peak bandwidth used by users within a specific time period. It typically uses a 95% billing or monthly peak billing, meaning the cost is calculated based on the peak bandwidth usage at a specific time each month or day.

[0035] This application provides a method for bandwidth cost analysis of a content delivery network. This method can be generated by any electronic device with computing and processing capabilities. The electronic device can be, for example, a terminal-facing computer device or a backend server.

[0036] The following examples, in conjunction with the accompanying drawings, provide specific illustrations of the bandwidth cost analysis method for the content delivery network provided in this application.

[0037] Figure 1 This is one of the flowcharts illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment, such as... Figure 1 As shown, the method of this application includes: S101. Obtain multiple historical request logs from the content delivery network.

[0038] Collect multiple historical request logs within a preset time range from CDN nodes, edge access layers, or unified log platforms of the content delivery network. Each log contains core information such as request timestamp, URL of the requested resource location information (including protocol, domain name, and path), request and response body size (bytes_sent, bytes_received), user agent information (including User-Agent (UA) and device type), client IP, geographic information, and custom request fields (including request parameters or request headers) carrying an experiment identifier (experiment_id).

[0039] Then, multiple historical request logs are preprocessed, including but not limited to time format normalization and time zone conversion, URL parsing and decomposition, field validation and abnormal data filtering, and the preprocessed logs are written to intermediate storage, such as log services or message queues.

[0040] S102. Analyze multiple historical request logs from multiple business dimensions to obtain business tags for each historical request log in each business dimension.

[0041] Multiple business dimensions can include, for example, business line dimensions and business scenario dimensions. Based on the request resource location information (such as domain name suffix, keyword information contained in the path) in multiple historical request logs, business line tags (such as "membership", "audio playback", "live broadcast", etc.) are determined for the business line dimension, and business scenario tags (such as "playback", "download", "APK installation package download", etc.) are determined for the business scenario dimension. Among them, the business line tag is used to indicate the product or business line to which it belongs, and the business scenario tag is used to indicate the specific business scenario.

[0042] Multiple business dimensions can also include, for example, client version dimension and terminal type dimension. The User-Agent field in the user agent information of multiple historical request logs is parsed to determine the client version label (client version number) of multiple historical request logs in the client version dimension, and the terminal type label ("Android", "iOS", "PC", "Mini Program", etc.) in the terminal type dimension.

[0043] Multiple business dimensions also include experiment dimensions and custom dimensions. Based on custom request fields (request parameters or request headers) from multiple historical request logs, the experiment identifier (experiment_id) is extracted as the experiment tag, and information such as activities, projects, gray-scale ranges, or special strategies are extracted as business tags for the custom dimensions. Among them, the experiment tag is used to distinguish different experiment groups.

[0044] After analysis and tagging by S102, each request log is accompanied by business line tags, business scenario tags, client version tags, terminal type tags, experiment tags, and custom dimension business tags, providing a data foundation for subsequent cost aggregation and experiment evaluation.

[0045] S103. Perform time aggregation on multiple historical request logs to obtain request log sets corresponding to multiple historical time periods.

[0046] The historical time range is divided into 5-minute intervals. All historical request logs falling within the same 5-minute window are grouped together to form multiple request log sets corresponding to different historical time periods.

[0047] S104. Based on the target business tags under the target business dimension combination, aggregate the historical request logs in the corresponding request log set for each historical time period to obtain the bandwidth aggregation data of the target business dimension combination in each historical time period.

[0048] The target business dimension combination can be selected as needed, such as "business line tag - business scenario tag - client version tag - terminal type tag - experiment tag - custom dimension business tag", etc. The logs in each request log set are filtered according to the business tag corresponding to the target business dimension combination. The number of requests and the total traffic size within each 5-minute time period are aggregated and calculated (as shown in the number of bytes below). The estimated bandwidth value is obtained by "total traffic ÷ time window length (5 minutes)" to form the bandwidth aggregation data of the target business dimension combination.

[0049] S105. Obtain cost information of the content delivery network in various historical time periods.

[0050] Obtain CDN cost information for each 5-minute historical time period from the financial or settlement system. This cost information may include the total CDN cost within that time period, or the unit cost per domain, region, or line.

[0051] S106. Based on the bandwidth aggregation data of the target service dimension combination in each historical time period and the cost information of each historical time period, determine the bandwidth cost of the content delivery network under the target service dimension combination.

[0052] The CDN total cost for the corresponding time period is allocated based on the proportion of bandwidth combined according to the target business dimension to the total bandwidth of the entire network during that time period. If a detailed cost unit price is obtained, the cost is calculated directly by multiplying the bandwidth aggregation data by the corresponding unit price. Finally, the bandwidth cost of the target business dimension combination in each historical time period is obtained, and the total bandwidth cost of the combination is formed by summing them up.

[0053] After the calculation is completed, the bandwidth cost under the target business dimension combination is stored in a preset analytical database (such as a columnar storage database) for subsequent querying.

[0054] In summary, this embodiment provides a bandwidth cost analysis method for content delivery networks. By aggregating bandwidth aggregation data and cost information of target business dimensions, it provides data support for cost analysis. Through multi-dimensional tagging, it establishes the association between historical request logs and multiple business dimensions, realizing refined cost breakdown of arbitrary business dimension combinations and avoiding cost amortization deviations caused by multiple services carried by domain names.

[0055] Furthermore, by using a unified system for collecting, tagging, and aggregating historical request logs, there is no need for repeated derivation and modeling, which reduces analysis costs. It also uses historical time periods (5 minutes) as the time granularity for cost aggregation, which significantly improves the cost feedback speed compared to daily / monthly billing reports, meeting the needs of near real-time cost monitoring.

[0056] Figure 2The second flowchart illustrates the bandwidth cost analysis method for a content delivery network provided in this application embodiment. Figure 2 As shown, if multiple business dimensions include terminal type dimension and experiment dimension, the method of this application further includes: S201. Obtain the total bandwidth of the content delivery network over a historical period.

[0057] For each 5-minute historical time period, the sum of the pre-allocated bandwidth for all terminal types (Android, iOS, PC, etc.) within the time period is calculated as the total bandwidth (BW_total) for that historical time period. In other words, the total bandwidth is the sum of the pre-allocated bandwidth for all terminal types within the historical time period.

[0058] S202. Obtain the pre-allocated bandwidth of the target terminal type from all terminal types.

[0059] Specify the target terminal type (e.g., Android) according to business needs, and extract the pre-allocated bandwidth (BW_target) for that target terminal type within the corresponding 5-minute historical time period.

[0060] S203. Based on the experimental labels under the experimental dimension and the target terminal type labels under the terminal type dimension, analyze the request log sets corresponding to the historical time period to obtain the bandwidth of each experimental group under the target terminal type.

[0061] Based on the experiment identifier (experiment_id) in the historical request logs and the target terminal type label under the terminal type dimension, the request log set corresponding to the 5-minute historical time period is analyzed to obtain the bandwidth of each experimental group under the target terminal type (such as the bandwidth BW_A,current of experimental group A and the bandwidth BW_B,current of experimental group B).

[0062] S204. Based on the overall bandwidth of the historical time period, the bandwidth of the experimental group under the target terminal type, the pre-allocated bandwidth of the target terminal type, and the target push ratio, estimate the overall bandwidth of the content delivery network for the experimental group under the historical time period.

[0063] Let p be the final target bandwidth allocation ratio of the experiment (i.e., the p-th proportion of the overall bandwidth of the target terminal type that is planned to be allocated to a certain experimental group within the target terminal type). The following formula is used to calculate it: The bandwidth of the experimental group after full push is calculated as follows: Total bandwidth of the experimental group (BW_total) - Pre-allocated bandwidth of the target terminal type (BW_target) + Current bandwidth of the experimental group under the target terminal type × Target full push ratio (p). For example, the bandwidth of experimental group A after full push is BW_A,full = BW_total - BW_target + BW_A,current × p. Similarly, for experimental group B, we can obtain BW_B,full = BW_total - BW_target + BW_B,current × p.

[0064] This embodiment is based on the full push formula, which can estimate the overall bandwidth after full rollout during the small-volume deployment phase of the experiment, solving the pain point of not being able to quantify the cost of full rollout in the experiment; in addition, by combining the overall bandwidth of the market, the bandwidth of the target end and the rollout ratio for calculation, the interference of non-target end traffic is eliminated, making the bandwidth calculation of the experimental group more in line with the actual full rollout scenario.

[0065] Figure 3 The third flowchart illustrates the bandwidth cost analysis method for a content delivery network provided in this application embodiment. Figure 3 As shown in S203, based on the experimental labels under the experimental dimension and the target terminal type labels under the terminal type dimension, the request log set corresponding to the historical time period is analyzed to obtain the bandwidth of the experimental group under the target terminal type, including: S301. Based on the experiment tags under the experiment dimension, group the request log sets corresponding to the historical time periods to obtain request logs for multiple experiment groups.

[0066] The 5-minute request log set is split according to the experiment identifier (experiment_id) in the log, and the logs corresponding to the same experiment identifier are grouped together to form request logs of multiple experiment groups such as Experiment Group A and Experiment Group B.

[0067] S302. Based on the target terminal type label under the terminal type dimension and the request logs of the experimental group, obtain the bandwidth of the experimental group under the target terminal type.

[0068] From the request logs of each experimental group, logs with target terminal type tags are filtered out, and the total traffic of this part of the logs is aggregated and calculated. The current bandwidth of each experimental group under the target terminal type is estimated by "total traffic ÷ 5 minutes" (e.g., bandwidth BW_A,current of experimental group A, bandwidth BW_B,current of experimental group B).

[0069] Figure 4 The fourth flowchart illustrates the bandwidth cost analysis method for a content delivery network provided in this application embodiment. Figure 4 As shown, the method of this application further includes: S401. Determine the peak bandwidth of the experimental group based on the bandwidth of the experimental group in multiple historical time periods within the preset observation period.

[0070] Set a preset observation period (e.g., 1 day or 1 week), collect the full-screen bandwidth of each experimental group for all 5-minute historical time periods within that period, and select the maximum bandwidth value of each experimental group as the peak screen bandwidth of the corresponding experimental group (e.g., BW_A,full^peak, BW_B,full^peak). If it is necessary to reduce the impact of short-term jitter, the average bandwidth of several time windows near the peak can be taken as the peak value.

[0071] S402. Determine the target experimental group based on the peak bandwidth of multiple experimental groups.

[0072] Figure 5 The fifth flowchart illustrates the bandwidth cost analysis method for a content delivery network provided in this application embodiment. Figure 5 As shown, S402 specifically includes: S501. Compare the peak bandwidth of the large disk in multiple experimental groups.

[0073] The peak bandwidth values ​​of each experimental group (such as BW_A,full^peak and BW_B,full^peak) are compared numerically to clarify the relationship between the magnitudes of each peak.

[0074] S502. Determine the experimental group with the lowest peak bandwidth as the target experimental group.

[0075] The experimental group with the smallest peak bandwidth was selected. This experimental group is the optimal solution with the lowest bandwidth usage on the entire disk under the target push ratio, and it is determined as the target experimental group.

[0076] Figure 6 The sixth flowchart illustrating the bandwidth cost analysis method for a content delivery network provided in this application embodiment is as follows: Figure 6 As shown, the method of this application further includes: S601. Determine the bandwidth differences between different experimental groups based on the peak bandwidth of multiple experimental groups.

[0077] Select any two experimental groups (such as experimental group A and experimental group B) and calculate the difference between their peak bandwidth values: ΔBW_peak = peak bandwidth value of experimental group A (BW_A, full^peak) - peak bandwidth value of experimental group B (BW_B, full^peak).

[0078] A positive value for ΔBW_peak indicates that the peak value of experimental group A is higher, while a negative value indicates that the peak value of experimental group A is lower.

[0079] S602. Determine the bandwidth cost difference between different experimental groups based on the bandwidth differences between the different experimental groups.

[0080] Obtain the CDN bandwidth unit price or the corresponding cost model, multiply the bandwidth difference (ΔBW_peak) by the unit price, and obtain the cost difference between different experimental groups after full rollout. If ΔBW_peak is positive, it means that the cost of experimental group A after full rollout is higher than that of experimental group B, and the difference is the additional cost; if it is negative, it is the cost saving amount, realizing a quantitative assessment of the cost impact of different experimental schemes.

[0081] The following will continue to explain the apparatus, device and medium for performing the bandwidth cost analysis method of the content delivery network provided in any of the above embodiments of this application. The specific implementation process and the resulting technical effects are the same as those in the corresponding method embodiments. For the sake of brevity, the parts not mentioned in the following embodiments can be referred to the corresponding content in the method embodiments.

[0082] Figure 7 A schematic diagram of the bandwidth cost analysis device for a content delivery network provided in this application embodiment is shown below. Figure 7 As shown, this application also provides a bandwidth cost analysis device for a content delivery network, comprising: The first acquisition module 10 is used to acquire multiple historical request logs from the content delivery network.

[0083] The analysis module 20 is used to analyze the historical request logs from multiple business dimensions to obtain the business tags of the historical request logs in each of the business dimensions.

[0084] The first aggregation module 30 is used to aggregate multiple historical request logs by time to obtain multiple request log sets corresponding to historical time periods.

[0085] The second aggregation module 40 is used to aggregate the historical request logs in the request log set corresponding to each historical time period according to each target service tag under the target service dimension combination, so as to obtain the bandwidth aggregation data of the target service dimension combination in each historical time period.

[0086] The second acquisition module 50 is used to acquire cost information of the content delivery network in each of the historical time periods.

[0087] The determining module 60 is used to determine the bandwidth cost of the content delivery network under the target service dimension combination based on the bandwidth aggregation data of the target service tags in multiple historical time periods and the cost information of each historical time period.

[0088] Optionally, the multiple business dimensions include: business line dimension and business scenario dimension; the analysis module 20 is further configured to determine the business line label of the multiple historical request logs in the business line dimension and the business scenario label in the business scenario dimension based on the request resource location information in the multiple historical request logs.

[0089] Optionally, the multiple business dimensions also include: client version dimension and terminal type dimension; the analysis module 20 is further configured to determine the client version label of the multiple historical request logs in the client version dimension and the terminal type label in the terminal type dimension based on the user agent information of the multiple historical request logs.

[0090] Optionally, the multiple business dimensions also include: experimental dimensions and custom dimensions; the analysis module 20 is further configured to determine the experimental tags of the multiple historical request logs in the experimental dimension and the business tags in the custom dimension based on the custom request fields of the multiple historical request logs.

[0091] Optionally, if the multiple business dimensions include: terminal type dimension and experiment dimension, the acquisition module 10 is further configured to acquire the overall bandwidth of the content delivery network during the historical time period, wherein the overall bandwidth is the sum of the pre-allocated bandwidths of all terminal types during the historical time period; and acquire the pre-allocated bandwidth of the target terminal type among all terminal types.

[0092] Analysis module 20 is also used to analyze the request log set corresponding to the historical time period based on the experiment label under the experiment dimension and the target terminal type label under the terminal type dimension, to obtain the bandwidth of each experimental group under the target terminal type; and to estimate the overall bandwidth of the content delivery network for the experimental group under the historical time period based on the overall bandwidth of the historical time period, the bandwidth of the experimental group under the target terminal type, the pre-allocated bandwidth of the target terminal type, and the target push ratio.

[0093] Optionally, the analysis module 20 is further configured to group the request log set corresponding to the historical time period according to the experiment label under the experiment dimension to obtain the request logs of multiple experiment groups; and to obtain the bandwidth of the experiment group under the target terminal type according to the target terminal type label under the terminal type dimension and the request logs of the experiment group.

[0094] Optionally, the analysis module 20 is further configured to determine the peak bandwidth of the experimental group based on the bandwidth of the experimental group in multiple historical time periods within a preset observation period; and to determine the target experimental group based on the peak bandwidth of the experimental groups.

[0095] Optionally, the analysis module 20 is also used to compare the peak bandwidth of multiple experimental groups and determine the experimental group with the lowest peak bandwidth as the target experimental group.

[0096] Optionally, the analysis module 20 is also used to determine the bandwidth difference between different experimental groups based on the peak bandwidth of the multiple experimental groups; and to determine the bandwidth cost difference between different experimental groups based on the bandwidth difference.

[0097] Optionally, the device further includes a storage module for storing the bandwidth cost of the content delivery network under the target service dimension combination in a preset database.

[0098] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0099] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0100] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 8 As shown, this application also provides an electronic device, including a processor 100, a storage medium 200, and a bus 300. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions. The method of execution includes: Retrieve multiple historical request logs from the content delivery network; The historical request logs are analyzed from multiple business dimensions to obtain business tags for each historical request log in each business dimension. Time aggregation is performed on multiple historical request logs to obtain request log sets corresponding to multiple historical time periods; Based on the target business tags under the target business dimension combination, the historical request logs in the corresponding request log sets of each historical time period are aggregated to obtain the bandwidth aggregated data of the target business dimension combination in each historical time period. Obtain cost information of the content delivery network in each of the historical time periods; Based on the bandwidth aggregation data of the target service dimension combination in each of the historical time periods, and the cost information of each of the historical time periods, the bandwidth cost of the content delivery network under the target service dimension combination is determined.

[0101] Optionally, the multiple business dimensions include: business line dimensions and business scenario dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the request resource location information in multiple historical request logs, determine the business line label of the multiple historical request logs in the business line dimension and the business scenario label in the business scenario dimension.

[0102] Optionally, the multiple business dimensions also include: client version dimension and terminal type dimension; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the user agent information of multiple historical request logs, determine the client version label of the multiple historical request logs in the client version dimension and the terminal type label in the terminal type dimension.

[0103] Optionally, the multiple business dimensions also include: experimental dimensions and custom dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the custom request fields of multiple historical request logs, determine the experiment tags and business tags of the multiple historical request logs in the experiment dimension and the custom dimension, respectively.

[0104] Optionally, if the multiple business dimensions include: a terminal type dimension and an experiment dimension; the method further includes: Obtain the total bandwidth of the content delivery network during the historical time period, where the total bandwidth is the sum of the pre-allocated bandwidth for all terminal types during the historical time period; Obtain the pre-allocated bandwidth for the target terminal type from all terminal types; Based on the experimental labels under the experimental dimension and the target terminal type labels under the terminal type dimension, the request log sets corresponding to the historical time period are analyzed to obtain the bandwidth of each experimental group under the target terminal type. Based on the overall bandwidth of the historical time period, the bandwidth of the experimental group under the target terminal type, the pre-allocated bandwidth of the target terminal type, and the target push ratio, the overall bandwidth of the content delivery network for the experimental group under the historical time period is estimated.

[0105] Optionally, the step of analyzing the request log set corresponding to the historical time period based on the experiment label under the experiment dimension and the target terminal type label under the terminal type dimension to obtain the bandwidth of the experiment group under the target terminal type includes: Based on the experimental labels under the experimental dimension, the request log sets corresponding to the historical time periods are grouped to obtain request logs for multiple experimental groups. Based on the label of the target terminal type under the terminal type dimension and the request log of the experimental group, obtain the bandwidth of the experimental group under the target terminal type.

[0106] Optionally, the method further includes: Based on the bandwidth of the experimental group in multiple historical time periods within a preset observation period, the peak bandwidth of the experimental group is determined. The target experimental group is determined based on the peak bandwidth of the multiple experimental groups.

[0107] Optionally, determining the target experimental group based on the peak bandwidth of the multiple experimental groups includes: Compare the peak bandwidth of the large disk in multiple experimental groups; The experimental group with the lowest peak bandwidth was identified as the target experimental group.

[0108] Optionally, the method further includes: The bandwidth differences between different experimental groups were determined based on the peak bandwidth of the large disk in multiple experimental groups. The bandwidth cost difference between different experimental groups was determined based on the bandwidth differences between the experimental groups.

[0109] Optionally, the method further includes: The bandwidth cost of the content delivery network under the target service dimension combination is stored in a preset database.

[0110] This application also provides a readable storage medium storing program instructions, which, when executed by a processor, implement a method comprising: Retrieve multiple historical request logs from the content delivery network; The historical request logs are analyzed from multiple business dimensions to obtain business tags for each historical request log in each business dimension. Time aggregation is performed on multiple historical request logs to obtain request log sets corresponding to multiple historical time periods; Based on the target business tags under the target business dimension combination, the historical request logs in the corresponding request log sets of each historical time period are aggregated to obtain the bandwidth aggregated data of the target business dimension combination in each historical time period. Obtain cost information of the content delivery network in each of the historical time periods; Based on the bandwidth aggregation data of the target service dimension combination in each of the historical time periods, and the cost information of each of the historical time periods, the bandwidth cost of the content delivery network under the target service dimension combination is determined.

[0111] Optionally, the multiple business dimensions include: business line dimensions and business scenario dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the request resource location information in multiple historical request logs, determine the business line label of the multiple historical request logs in the business line dimension and the business scenario label in the business scenario dimension.

[0112] Optionally, the multiple business dimensions also include: client version dimension and terminal type dimension; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the user agent information of multiple historical request logs, determine the client version label of the multiple historical request logs in the client version dimension and the terminal type label in the terminal type dimension.

[0113] Optionally, the multiple business dimensions also include: experimental dimensions and custom dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the custom request fields of multiple historical request logs, determine the experiment tags and business tags of the multiple historical request logs in the experiment dimension and the custom dimension, respectively.

[0114] Optionally, if the multiple business dimensions include: a terminal type dimension and an experiment dimension; the method further includes: Obtain the total bandwidth of the content delivery network during the historical time period, where the total bandwidth is the sum of the pre-allocated bandwidth for all terminal types during the historical time period; Obtain the pre-allocated bandwidth for the target terminal type from all terminal types; Based on the experimental labels under the experimental dimension and the target terminal type labels under the terminal type dimension, the request log sets corresponding to the historical time period are analyzed to obtain the bandwidth of each experimental group under the target terminal type. Based on the overall bandwidth of the historical time period, the bandwidth of the experimental group under the target terminal type, the pre-allocated bandwidth of the target terminal type, and the target push ratio, the overall bandwidth of the content delivery network for the experimental group under the historical time period is estimated.

[0115] Optionally, the step of analyzing the request log set corresponding to the historical time period based on the experiment label under the experiment dimension and the target terminal type label under the terminal type dimension to obtain the bandwidth of the experiment group under the target terminal type includes: Based on the experimental labels under the experimental dimension, the request log sets corresponding to the historical time periods are grouped to obtain request logs for multiple experimental groups. Based on the label of the target terminal type under the terminal type dimension and the request log of the experimental group, obtain the bandwidth of the experimental group under the target terminal type.

[0116] Optionally, the method further includes: Based on the bandwidth of the experimental group in multiple historical time periods within a preset observation period, the peak bandwidth of the experimental group is determined. The target experimental group is determined based on the peak bandwidth of the multiple experimental groups.

[0117] Optionally, determining the target experimental group based on the peak bandwidth of the multiple experimental groups includes: Compare the peak bandwidth of the large disk in multiple experimental groups; The experimental group with the lowest peak bandwidth was identified as the target experimental group.

[0118] Optionally, the method further includes: The bandwidth differences between different experimental groups were determined based on the peak bandwidth of the large disk in multiple experimental groups. The bandwidth cost difference between different experimental groups was determined based on the bandwidth differences between the experimental groups.

[0119] Optionally, the method further includes: The bandwidth cost of the content delivery network under the target service dimension combination is stored in a preset database.

[0120] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0122] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0123] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0124] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for analyzing bandwidth costs in a content delivery network, characterized in that, include: Retrieve multiple historical request logs from the content delivery network; The historical request logs are analyzed from multiple business dimensions to obtain business tags for each historical request log in each business dimension. Time aggregation is performed on multiple historical request logs to obtain request log sets corresponding to multiple historical time periods; Based on the target business tags under the target business dimension combination, the historical request logs in the corresponding request log sets of each historical time period are aggregated to obtain the bandwidth aggregated data of the target business dimension combination in each historical time period. Obtain cost information of the content delivery network in each of the historical time periods; Based on the bandwidth aggregation data of the target service dimension combination in each of the historical time periods, and the cost information of each of the historical time periods, the bandwidth cost of the content delivery network under the target service dimension combination is determined.

2. The method according to claim 1, characterized in that, The aforementioned business dimensions include: business line dimensions and business scenario dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the request resource location information in multiple historical request logs, determine the business line label of the multiple historical request logs in the business line dimension and the business scenario label in the business scenario dimension.

3. The method according to claim 1, characterized in that, The aforementioned business dimensions also include: client version dimension and terminal type dimension; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the user agent information of multiple historical request logs, determine the client version label of the multiple historical request logs in the client version dimension and the terminal type label in the terminal type dimension.

4. The method according to claim 1, characterized in that, The aforementioned business dimensions also include: experimental dimensions and custom dimensions; The analysis of multiple historical request logs across multiple business dimensions yields business tags for each historical request log in each business dimension, including: Based on the custom request fields of multiple historical request logs, determine the experiment tags and business tags of the multiple historical request logs in the experiment dimension and the custom dimension, respectively.

5. The method according to claim 1, characterized in that, If the multiple business dimensions include: terminal type dimension and experiment dimension; the method further includes: Obtain the total bandwidth of the content delivery network during the historical time period, where the total bandwidth is the sum of the pre-allocated bandwidth for all terminal types during the historical time period; Obtain the pre-allocated bandwidth for the target terminal type from all terminal types; Based on the experimental labels under the experimental dimension and the target terminal type labels under the terminal type dimension, the request log sets corresponding to the historical time period are analyzed to obtain the bandwidth of each experimental group under the target terminal type. Based on the overall bandwidth of the historical time period, the bandwidth of the experimental group under the target terminal type, the pre-allocated bandwidth of the target terminal type, and the target push ratio, the overall bandwidth of the content delivery network for the experimental group under the historical time period is estimated.

6. The method according to claim 5, characterized in that, The step involves analyzing the request log set corresponding to the historical time period based on the experiment label under the experiment dimension and the target terminal type label under the terminal type dimension to obtain the bandwidth of the experiment group under the target terminal type, including: Based on the experimental labels under the experimental dimension, the request log sets corresponding to the historical time periods are grouped to obtain request logs for multiple experimental groups. Based on the label of the target terminal type under the terminal type dimension and the request log of the experimental group, obtain the bandwidth of the experimental group under the target terminal type.

7. The method according to claim 5, characterized in that, The method further includes: Based on the bandwidth of the experimental group in multiple historical time periods within a preset observation period, the peak bandwidth of the experimental group is determined. The target experimental group is determined based on the peak bandwidth of the multiple experimental groups.

8. A bandwidth cost analysis device for a content delivery network, characterized in that, include: The first acquisition module is used to acquire multiple historical request logs from the content delivery network; The analysis module is used to analyze the historical request logs from multiple business dimensions to obtain the business tags of the historical request logs in each of the business dimensions. The first aggregation module is used to perform time aggregation on multiple historical request logs to obtain multiple request log sets corresponding to multiple historical time periods. The second aggregation module is used to aggregate the historical request logs in the request log set corresponding to each historical time period according to each target business tag under the target business dimension combination, so as to obtain the bandwidth aggregation data of the target business dimension combination in each historical time period. The second acquisition module is used to acquire cost information of the content delivery network in each of the historical time periods; The determination module is used to determine the bandwidth cost of the content delivery network under the target service dimension combination based on the bandwidth aggregation data of the target service tags in multiple historical time periods and the cost information of each historical time period.

9. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the bandwidth cost analysis method for the content delivery network according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores program instructions that, when executed by a processor, implement the bandwidth cost analysis method for the content delivery network as described in any one of claims 1 to 7.