Machine room bandwidth acquisition method and device and computing equipment

By acquiring multiple bandwidth data of each CDN server in the CDN computer room and determining the acquisition strategy, the problem of difficulty in accurately obtaining the bandwidth of the CDN computer room in the prior art is solved, and the accurate collection and statistics of bandwidth data at the computer room level is achieved.

CN119996781APending Publication Date: 2025-05-13SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510134303.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately obtain the on-demand bandwidth and live broadcast bandwidth of CDN computer rooms, affecting bandwidth billing and CDN scheduling.

Method used

By obtaining multiple bandwidth data of each CDN server in the CDN computer room, determining the bandwidth acquisition strategy, obtaining effective on-demand bandwidth data and live broadcast bandwidth data, and counting these data to obtain bandwidth data at the computer room level.

Benefits of technology

It realizes accurate bandwidth data acquisition of CDN servers, ensures bandwidth data accuracy at the computer room level, and is suitable for face-to-point live broadcast and CDN servers with different characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996781A_ABST
    Figure CN119996781A_ABST
Patent Text Reader

Abstract

The invention discloses a machine room bandwidth acquisition method and device and computing equipment. The method comprises the following steps: acquiring various bandwidth data of each CDN server in a CDN machine room in a statistical period; determining a bandwidth acquisition strategy according to the types of the acquired multiple types of bandwidth data; based on the obtained various bandwidth data, obtaining effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to a bandwidth acquisition strategy; and respectively counting the effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN machine room to obtain machine room on-demand bandwidth data and machine room live broadcast bandwidth data. According to the mode, the type of the obtained bandwidth data of the CDN server is judged, and the bandwidth acquisition strategy adaptive to the actual bandwidth acquisition condition can be determined, so that the effective bandwidth data of the CDN server can be determined according to the obtained bandwidth data, and the accuracy of the calculated bandwidth data of the computer room level can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, computing equipment, computer storage medium and computer program product for collecting bandwidth in a computer room. Background Art

[0002] With the rapid development of Internet technology and the increasing diversification of user needs, video platforms are no longer limited to providing a single type of video service, but have gradually developed to provide both live and on-demand services. For video platforms, it is crucial to obtain the accurate on-demand bandwidth and live bandwidth of the CDN computer room, because bandwidth billing, CDN scheduling, etc. all rely on this data. Based on this, selecting the appropriate bandwidth collection method and obtaining the accurate on-demand bandwidth and live bandwidth of the computer room has become an urgent problem to be solved. Summary of the invention

[0003] In view of the above problems, the present application is proposed to provide a method, apparatus, computing device, computer storage medium and computer program product for collecting bandwidth of a computer room that overcomes the above problems or at least partially solves the above problems.

[0004] According to one aspect of the present application, a method for collecting bandwidth in a computer room is provided, comprising:

[0005] Obtain various bandwidth data of each CDN server in the CDN room during the statistical period;

[0006] Determine bandwidth collection strategies based on the types of bandwidth data obtained;

[0007] Based on the obtained various bandwidth data, the effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server are obtained according to the bandwidth collection strategy;

[0008] The effective on-demand bandwidth data and effective live broadcast bandwidth data of each CDN server in the CDN computer room are counted respectively to obtain the computer room on-demand bandwidth data and computer room live broadcast bandwidth data.

[0009] Optionally, obtaining multiple bandwidth data of each CDN server in the CDN computer room during a statistical period further includes:

[0010] Obtaining first bandwidth data of the CDN server based on network card traffic statistics;

[0011] Acquire second bandwidth data of the CDN server based on gateway traffic statistics, wherein the second bandwidth data includes: second on-demand bandwidth data and second live broadcast bandwidth data;

[0012] The third bandwidth data of the CDN server is obtained, wherein the third bandwidth data includes third on-demand bandwidth data and third live broadcast bandwidth data, and the third bandwidth data is obtained by counting network packets sent by the on-demand service and the live broadcast service in the CDN server.

[0013] Optionally, the network packet carries a service identifier; the third on-demand bandwidth data is determined by counting network packets carrying the service identifier corresponding to the on-demand service; the third live broadcast bandwidth data is determined by counting network packets carrying the service identifier corresponding to the live broadcast service.

[0014] Optionally, based on the acquired multiple bandwidth data, obtaining effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy further includes:

[0015] When the acquired bandwidth data includes the third bandwidth data, the third on-demand bandwidth data in the third bandwidth data is determined as the effective on-demand bandwidth data of the CDN server, and the third live broadcast bandwidth data in the third bandwidth data is determined as the effective live broadcast bandwidth data of the CDN server.

[0016] Optionally, based on the acquired multiple bandwidth data, obtaining effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy further includes:

[0017] When the acquired bandwidth data does not include the third bandwidth data but includes the first bandwidth data, the first bandwidth data is split according to the bandwidth splitting ratio to obtain effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server.

[0018] Optionally, the bandwidth split ratio includes: a video-on-demand usage ratio and a live broadcast usage ratio; before the method is executed, it further includes:

[0019] Summarize the second on-demand bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total on-demand bandwidth data;

[0020] Summarize the second live broadcast bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total live broadcast bandwidth data;

[0021] Based on the total on-demand bandwidth data and the total live broadcast bandwidth data, the on-demand utilization rate and the live broadcast utilization rate are calculated respectively.

[0022] According to another aspect of the present application, a device for collecting bandwidth in a computer room is provided, comprising:

[0023] An acquisition module, adapted to acquire various bandwidth data of each CDN server in a CDN computer room during a statistical period;

[0024] The analysis module is adapted to determine a bandwidth acquisition strategy according to the types of the acquired bandwidth data; based on the acquired bandwidth data, obtain effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy;

[0025] The statistics module is suitable for respectively collecting statistics on the effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN computer room, and obtaining the computer room on-demand bandwidth data and the computer room live broadcast bandwidth data.

[0026] Optionally, the acquisition module is further adapted to:

[0027] Obtaining first bandwidth data of the CDN server based on network card traffic statistics;

[0028] Acquire second bandwidth data of the CDN server based on gateway traffic statistics, wherein the second bandwidth data includes: second on-demand bandwidth data and second live broadcast bandwidth data;

[0029] The third bandwidth data of the CDN server is obtained, wherein the third bandwidth data includes third on-demand bandwidth data and third live broadcast bandwidth data, and the third bandwidth data is obtained by counting network packets sent by the on-demand service and the live broadcast service in the CDN server.

[0030] Optionally, the network packet carries a service identifier; the third on-demand bandwidth data is determined by counting network packets carrying the service identifier corresponding to the on-demand service; the third live broadcast bandwidth data is determined by counting network packets carrying the service identifier corresponding to the live broadcast service.

[0031] Optionally, the analysis module is further adapted to: when the acquired bandwidth data includes third bandwidth data, determine the third on-demand bandwidth data in the third bandwidth data as the effective on-demand bandwidth data of the CDN server, and determine the third live broadcast bandwidth data in the third bandwidth data as the effective live broadcast bandwidth data of the CDN server.

[0032] Optionally, the analysis module is further adapted to: when the acquired bandwidth data does not include the third bandwidth data but includes the first bandwidth data, split the first bandwidth data according to the bandwidth splitting ratio to obtain effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server.

[0033] Optionally, the bandwidth split ratio includes: on-demand usage rate and live broadcast usage rate; the statistical module is further adapted to:

[0034] Summarize the second on-demand bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total on-demand bandwidth data;

[0035] Summarize the second live broadcast bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total live broadcast bandwidth data;

[0036] Based on the total on-demand bandwidth data and the total live broadcast bandwidth data, the on-demand utilization rate and the live broadcast utilization rate are calculated respectively.

[0037] According to another aspect of the present application, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0038] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned computer room bandwidth collection method.

[0039] According to another aspect of the present application, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned computer room bandwidth collection method.

[0040] According to another aspect of the present application, a computer program product is provided, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned computer room bandwidth collection method.

[0041] According to the computer room bandwidth collection method, device, computing device, computer storage medium and computer program product provided by the embodiment of the present application, multiple bandwidth data of the statistical period of each CDN server in the CDN computer room are obtained; according to the types of the multiple bandwidth data obtained, the bandwidth collection strategy is determined; based on the multiple bandwidth data obtained, the effective on-demand bandwidth data and effective live bandwidth data of the CDN server are obtained according to the bandwidth collection strategy; the effective on-demand bandwidth data and effective live bandwidth data of each CDN server in the CDN computer room are counted respectively to obtain the computer room on-demand bandwidth data and computer room live bandwidth data. Through the above method, bandwidth data is collected in multiple ways for each CDN server, and by judging the type of bandwidth data of the obtained CDN server, a bandwidth collection strategy that is adapted to the actual bandwidth collection situation can be determined, so as to determine the effective bandwidth data of the CDN server according to the obtained bandwidth data, and targeted mixed bandwidth collection is realized. When facing CDN servers with mixed point-to-point and live broadcast and different characteristics, accurate server bandwidth data can be obtained, thereby ensuring the accuracy of the bandwidth data at the computer room level calculated.

[0042] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0044] Figure 1 A flow chart of a method for collecting bandwidth of a computer room provided by an embodiment of the present application is shown;

[0045] Figure 2 A flow chart of a method for collecting bandwidth of a computer room provided by another embodiment of the present application is shown;

[0046] Figure 3 A schematic diagram showing a system architecture provided by an embodiment of the present application is shown;

[0047] Figure 4 A functional structure diagram of a device for collecting bandwidth in a computer room provided in an embodiment of the present application is shown;

[0048] Figure 5 A schematic diagram of the structure of a computing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0049] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0050] First, the terms involved in one or more embodiments of the present application are explained.

[0051] CDN: The full name is Content Delivery Network. It refers to a network that places node servers at various locations on the network and directs user requests to appropriate node servers based on comprehensive judgments such as traffic, node load, distance from the server to the user, and response time, thereby improving user access speed.

[0052] CDN server: The node server in the CDN network is called CDN server.

[0053] CDN computer room: The CDN computer room is composed of CDN servers. The network bandwidth of the servers in the same computer room will be counted through the computer room switch.

[0054] Video on Demand: A technology that plays videos according to user needs, transmitting the video content clicked or selected by the user to the user. It is called "Video on Demand" in English, so it is also called "VOD".

[0055] Live video streaming: Live video is transmitted to users via the network in a streaming manner.

[0056] VOD and live streaming: Both VOD and live streaming services can be run on one CDN server.

[0057] Running live broadcast only: On a CDN server, only the on-demand service or only the live broadcast service is run.

[0058] Figure 1 FIG. 1 is a flow chart showing a method for collecting bandwidth of a computer room provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0059] Step S110, obtaining various bandwidth data of each CDN server in the CDN room during a statistical period.

[0060] Bandwidth refers to the number of bits that can pass from one point in the network to another point in a unit of time, and is used to measure the ability of a communication line to transmit data. The bandwidth of a CDN server in the embodiment of the present application refers to the bandwidth of the CDN server to transmit video data (including live video data and on-demand video data) outward in a unit of time.

[0061] Each CDN server uses multiple methods to collect bandwidth data, and each method has its own advantages and disadvantages. The method of the embodiment of the present application is used to solve the problem of determining effective bandwidth data when there are at least two types of bandwidth data obtained. It is necessary to determine a suitable strategy to select the effective bandwidth data of the CDN server from the at least two types of bandwidth data. It is necessary to comprehensively consider the advantages and disadvantages of various methods and the actual bandwidth collection results to determine the corresponding bandwidth collection strategy in order to ensure that accurate effective bandwidth data is obtained. When only one type of bandwidth data is obtained, there is no need to make a selection, and the obtained bandwidth data is directly determined as the effective bandwidth data of the CDN server.

[0062] Step S120: determining a bandwidth collection strategy according to the types of the acquired bandwidth data.

[0063] When the types of bandwidth data obtained from the CDN server are inconsistent, the corresponding bandwidth acquisition strategies are also inconsistent. Based on the types of bandwidth data obtained from the CDN server, a bandwidth acquisition strategy adapted to the actual bandwidth acquisition situation of the CDN server is determined.

[0064] Step S130, based on the obtained multiple bandwidth data, obtain the effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy.

[0065] Based on the various bandwidth data obtained, the effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server are determined through the bandwidth collection strategy, and the determination of the effective on-demand live broadcast bandwidth data of the CDN server under hybrid collection is realized. The effective bandwidth data of the CDN server is used for the bandwidth data of the computer room.

[0066] Step S140, respectively collect statistics on the effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN room to obtain the room's on-demand bandwidth data and the room's live broadcast bandwidth data.

[0067] The effective on-demand bandwidth data of all CDN servers in the CDN computer room are accumulated to obtain the on-demand bandwidth data at the computer room level; the effective live broadcast bandwidth data of all CDN servers in the CDN computer room are accumulated to obtain the live broadcast bandwidth data at the computer room level.

[0068] In summary, according to the computer room bandwidth collection method of the embodiment of the present application, multiple bandwidth data of the statistical period of each CDN server in the CDN computer room are obtained; according to the types of the multiple bandwidth data obtained, the bandwidth collection strategy is determined; based on the multiple bandwidth data obtained, the effective on-demand bandwidth data and the effective live bandwidth data of the CDN server are obtained according to the bandwidth collection strategy; the effective on-demand bandwidth data and the effective live bandwidth data of each CDN server in the CDN computer room are counted respectively to obtain the computer room on-demand bandwidth data and the computer room live bandwidth data. Through the above method, bandwidth data is collected in multiple ways for each CDN server, and by judging the type of the bandwidth data of the obtained CDN server, a bandwidth collection strategy that is adapted to the actual bandwidth collection situation can be determined, so as to determine the effective bandwidth data of the CDN server according to the obtained bandwidth data, and targeted hybrid bandwidth collection is realized. When facing CDN servers with mixed on-demand and live broadcast operations and different characteristics, accurate server bandwidth data can be obtained, thereby ensuring the accuracy of the calculated bandwidth data at the computer room level.

[0069] Figure 2 FIG. 2 is a flow chart showing a method for collecting bandwidth of a computer room provided by another embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0070] Step S210: Calculate the bandwidth splitting ratio according to the second bandwidth data of each CDN server in the CDN room during a preset period of time.

[0071] The second bandwidth data is obtained based on the statistics of gateway traffic, also called gateway bandwidth data, wherein the second bandwidth data includes: second on-demand bandwidth data and second live broadcast bandwidth data, and traffic refers to the total amount of data transmitted. By analyzing a large amount of gateway bandwidth data, it can be known that the ratio between the on-demand bandwidth and the live broadcast bandwidth at the computer room level determined according to the gateway bandwidth data is accurate. Therefore, the gateway bandwidth data of each CDN server can be aggregated, and the ratio between the on-demand bandwidth and the live broadcast bandwidth at the computer room level can be calculated to split the network card bandwidth data of the CDN server as an alternative bandwidth data.

[0072] The gateway is software running on the CDN server. All video traffic will be sent out from the gateway. The gateway can identify live video traffic and on-demand video traffic, and count the live video traffic that has been sent to obtain the live gateway traffic, and count the on-demand video traffic that has been sent to obtain the on-demand gateway traffic. For each CDN server, at the start time and end time of the preset time period, the gateway counts the live gateway traffic and on-demand gateway traffic, respectively. The second live bandwidth data and the second on-demand bandwidth data within the preset time period are calculated by dividing the difference between the gateway traffic at the end time and the gateway traffic at the start time by the length of the preset time period, that is, the gateway live bandwidth data and the gateway on-demand bandwidth data.

[0073] The second bandwidth data collected within the preset time period is used to calculate the bandwidth splitting ratio. In an optional manner, the preset time period may be evenly divided according to a certain time interval.

[0074] The bandwidth split ratio includes the on-demand usage rate and the live broadcast usage rate, and these two data can accurately reflect the ratio of the on-demand bandwidth and the live broadcast bandwidth of the entire CDN room. The specific implementation of step S210 is: summarizing the second on-demand bandwidth data of the preset time period of each CDN server in the CDN room to obtain the total on-demand bandwidth data; summarizing the second live broadcast bandwidth data of the preset time period of each CDN server in the CDN room to obtain the total live broadcast bandwidth data; and calculating the on-demand usage rate and the live broadcast usage rate respectively according to the total on-demand bandwidth data and the total live broadcast bandwidth data.

[0075] The sum of the gateway on-demand bandwidth data of all CDN servers in the CDN machine room during the preset period is calculated to obtain the total on-demand bandwidth data gate_total_vod_bw; the sum of the gateway live bandwidth data of all CDN servers in the CDN machine room during the preset period is calculated to obtain the total live bandwidth data gate_total_live_bw; then, the on-demand usage rate and the live usage rate are calculated based on the total on-demand bandwidth data and the total live bandwidth data. The calculation method is as follows:

[0076] VOD usage rate = gate_total_vod_bw / (gate_total_vod_bw+gate_total_live_bw);

[0077] Live broadcast usage rate = gate_total_live_bw / (gate_total_vod_bw+gate_total_live_bw).

[0078] After the on-demand usage rate and the live broadcast usage rate are calculated, the on-demand usage rate and the live broadcast usage rate are stored, and whenever a new on-demand usage rate and the live broadcast usage rate are calculated, the stored on-demand usage rate and the live broadcast usage rate are updated.

[0079] Step S220, obtaining various bandwidth data of each CDN server in the CDN room during a statistical period.

[0080] In the method of the embodiment of the present application, three methods are used to collect bandwidth data on each CDN server. In theory, each CDN server has three types of bandwidth data. However, in actual applications, due to factors such as the performance characteristics of the CDN server and the actual business environment, it is not necessarily possible to obtain the three types of bandwidth data of the CDN server.

[0081] This step specifically includes: obtaining the first bandwidth data of the CDN server based on the network card traffic statistics, wherein the first bandwidth data is also called the network card bandwidth data. The network card is the Internet access hardware device of the CDN server. The CDN server can be connected to the Internet through the network card. The first bandwidth data is obtained through the network traffic statistics of the network card. The bandwidth data counted by the network traffic of the network card cannot distinguish between the on-demand bandwidth data and the live bandwidth data. In the case of only the first bandwidth data, other factors are needed to distinguish between the on-demand bandwidth data and the live bandwidth data. The advantage of this bandwidth collection method is that servers with different stability can collect the first bandwidth data, and the disadvantage is that it cannot distinguish between the on-demand bandwidth data and the live bandwidth data.

[0082] Specifically, the network traffic v1 and v2 of the CDN server network card are read at the start time point t1 and the end time point t2 of the statistical period, respectively, and the first bandwidth data Bv of the statistical period is (v2-v1) / (t2-t1).

[0083] This step also includes: obtaining the second bandwidth data of the CDN server based on the gateway traffic statistics, wherein the second bandwidth data includes: the second on-demand bandwidth data and the second live broadcast bandwidth data. The advantage of this bandwidth collection method is that it can distinguish between on-demand bandwidth data and live broadcast bandwidth data, but the disadvantage is that when the load is high and the traffic is large, individual CDN servers cannot collect bandwidth data or there is a delay.

[0084] Specifically, the on-demand type network traffic g11 and g12 of the gateway are read at the starting time point t1 and the ending time point t2 respectively, and the second on-demand bandwidth data Bg1 of the statistical period is (g12-g11) / (t2-t1); and, the live type network traffic g21 and g22 of the gateway are read at the starting time point t1 and the ending time point t2 respectively, and the second live bandwidth data Bg2 of the statistical period is (g22-g21) / (t2-t1).

[0085] Figure 3 A schematic diagram of the system architecture provided by the embodiment of the present application is shown. As shown in the figure, n node servers are set up in the CDN room, and each node server runs a live service and a video-on-demand service, wherein the video-on-demand service refers to one or more applications running on the CDN server of the video platform, serving video-on-demand; the live service refers to one or more applications running on the CDN server of the video platform, serving video live broadcast. The node server has a corresponding network card and gateway, so the corresponding bandwidth data can be calculated through the network card traffic and the gateway traffic.

[0086] This step also includes: obtaining third bandwidth data of the CDN server, wherein the third bandwidth data includes third on-demand bandwidth data and third live broadcast bandwidth data, and the third bandwidth data is obtained by counting network packets sent by the on-demand service and the live broadcast service in the CDN server.

[0087] Among them, the network packet is a protocol data packet generated by the operating system when the live service and the on-demand service respond to user requests. The protocol data packet is then returned to the user end through the gateway. The protocol data packet is the response data for the user request. The third on-demand bandwidth data is calculated based on the total size of the network packets sent by the on-demand service during the statistical period; the third live bandwidth data is calculated based on the total size of the network packets sent by the live service during the statistical period. The advantage of this bandwidth collection method is that it can distinguish between on-demand bandwidth data and live bandwidth data, and the accuracy is the highest. The disadvantage is that on non-dedicated and unstable CDN servers, there will be a problem that the service identifiers in the network packet are overwritten due to the consistency of the service identifiers of multiple business parties, which makes it impossible to collect bandwidth data.

[0088] In an optional manner, a network packet carries a service identifier for indicating the source of the network packet. Specifically, the network packet sent by the on-demand service carries the service identifier corresponding to the on-demand service, and the network packet sent by the live broadcast service carries the service identifier corresponding to the live broadcast service. Accordingly, the third on-demand bandwidth data is determined by counting the network packets carrying the service identifier corresponding to the on-demand service; the third live broadcast bandwidth data is determined by counting the network packets carrying the service identifier corresponding to the live broadcast service; the specific calculation method is: the sum of the sizes of the network packets carrying the service identifier corresponding to the on-demand service generated during the statistical period is divided by the duration of the statistical period to obtain the third on-demand bandwidth data; and the sum of the sizes of the network packets carrying the service identifier corresponding to the live broadcast service generated during the statistical period is divided by the duration of the statistical period to obtain the third live broadcast bandwidth data.

[0089] Step S230, determining a bandwidth acquisition strategy according to the types of the acquired multiple bandwidth data; based on the acquired multiple bandwidth data, obtaining effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy.

[0090] When the types of bandwidth data of the CDN server obtained are inconsistent, the corresponding bandwidth acquisition strategies are also inconsistent. Based on the types of bandwidth data of the CDN server obtained, a bandwidth acquisition strategy adapted to the actual bandwidth acquisition situation of the CDN server is determined.

[0091] It should be noted that the method of the embodiment of the present application focuses on the bandwidth collection strategy when there are at least two types of bandwidth data obtained. It is necessary to determine a suitable strategy to select the effective bandwidth data of the CDN server from the at least two types of bandwidth data for the bandwidth data at the computer room level. The rules followed by the bandwidth collection strategy are: the priority of the bandwidth data based on network packet statistics is higher than the priority of the split result of the network card bandwidth data, and the priority of the split result of the network card bandwidth data is higher than the priority of the gateway bandwidth data. When there is only one type of bandwidth data obtained, there is no need to make a selection, and the obtained bandwidth data is determined as the effective bandwidth data of the CDN server.

[0092] Specifically, when the acquired bandwidth data includes the third bandwidth data, the third on-demand bandwidth data in the third bandwidth data is determined as the effective on-demand bandwidth data of the CDN server, and the third live broadcast bandwidth data in the third bandwidth data is determined as the effective live broadcast bandwidth data of the CDN server.

[0093] Among them, the acquired bandwidth data includes the third bandwidth data in the following situations: first, the acquired bandwidth data includes the first bandwidth data, the second bandwidth data and the third bandwidth data at the same time; second, the acquired bandwidth data includes the first bandwidth data and the third bandwidth data; third, the acquired bandwidth data includes the second bandwidth data and the third bandwidth data. That is, the third bandwidth data has the highest priority, and as long as the acquired bandwidth data includes the third bandwidth data, the third bandwidth data will be used as the effective bandwidth data of the CDN server.

[0094] In addition, when the acquired bandwidth data includes the third bandwidth data, it is determined whether the third bandwidth data is valid. If valid, the effective on-demand bandwidth data and effective live bandwidth data of the CDN server are determined according to the third bandwidth data; if invalid, it is considered that the third bandwidth data has not been acquired. The validity of the third bandwidth data is determined as follows: if the CDN server has a on-demand service, the third on-demand bandwidth data must be greater than zero; if the CDN server has a live broadcast service, the third live broadcast bandwidth data must be greater than zero. Accordingly, if the CDN server has a on-demand service but the third on-demand bandwidth data is zero, or if the CDN server has a live broadcast service but the third live broadcast bandwidth data is zero, the third bandwidth data is determined to be invalid.

[0095] In the case that the acquired bandwidth data does not include the third bandwidth data but includes the first bandwidth data, the first bandwidth data is split according to the bandwidth splitting ratio to obtain the effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server. That is, the acquired bandwidth data only includes the second bandwidth data and the first bandwidth data. For this situation, the strategy of splitting the network card bandwidth data is adopted, and the first bandwidth data is split according to the stored bandwidth splitting ratio. The calculation method is: effective on-demand bandwidth data = first bandwidth data × on-demand usage rate, effective live broadcast bandwidth data = first bandwidth data × live broadcast usage rate. Since the bandwidth splitting ratio at the computer room level is accurate, and the network card bandwidth data of the CDN server is also accurate, the effective bandwidth data obtained by splitting the network card bandwidth data according to the bandwidth splitting ratio is also accurate.

[0096] Step S240, respectively collect statistics on the effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN machine room to obtain the machine room on-demand bandwidth data and the machine room live broadcast bandwidth data.

[0097] The effective on-demand bandwidth data of all servers in the CDN computer room are accumulated to obtain the on-demand bandwidth data at the computer room level; the effective live broadcast bandwidth data of all CDN servers in the CDN computer room are accumulated to obtain the live broadcast bandwidth data at the computer room level.

[0098] In summary, according to the computer room bandwidth collection method provided by this embodiment, an accurate bandwidth collection method based on network packets is provided, and the network packets sent by the on-demand service and the live broadcast service are counted respectively, so as to obtain accurate on-demand bandwidth data and live broadcast bandwidth data of the CDN server; further, by utilizing the characteristics that the network card bandwidth data is stable and accurate, and the ratio between the on-demand bandwidth and the live broadcast bandwidth at the computer room level counted based on the gateway bandwidth data is accurate, when it is impossible to directly collect accurate on-demand bandwidth data and live broadcast bandwidth data, the network card bandwidth data is split proportionally, so as to obtain accurate on-demand bandwidth data and live broadcast bandwidth data of the CDN server; further, a hybrid bandwidth algorithm is provided, which adopts multiple methods to collect bandwidth data for each CDN server, and then selects a bandwidth collection strategy according to the actual acquisition situation, so as to determine the effective bandwidth data of the CDN server. In the face of complex and diverse CDN servers and business scenarios, accurate computer room on-demand bandwidth data and computer room live broadcast bandwidth data can be obtained based on the aggregation of bandwidth data collected in multiple methods.

[0099] Figure 4 A functional structure diagram of a computer room bandwidth acquisition device provided in an embodiment of the present application is shown.

[0100] like Figure 4 As shown, the device comprises:

[0101] The acquisition module 41 is adapted to acquire various bandwidth data of each CDN server in the CDN room during a statistical period;

[0102] The analysis module 42 is adapted to determine a bandwidth acquisition strategy according to the types of the acquired bandwidth data; based on the acquired bandwidth data, obtain effective on-demand bandwidth data and effective live bandwidth data of the CDN server according to the bandwidth acquisition strategy;

[0103] The statistics module 43 is adapted to collect statistics on the effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN machine room, and obtain the machine room on-demand bandwidth data and the machine room live broadcast bandwidth data.

[0104] In an optional manner, the acquisition module 41 is further adapted to:

[0105] Obtaining first bandwidth data of the CDN server based on network card traffic statistics;

[0106] Acquire second bandwidth data of the CDN server based on gateway traffic statistics, wherein the second bandwidth data includes: second on-demand bandwidth data and second live broadcast bandwidth data;

[0107] The third bandwidth data of the CDN server is obtained, wherein the third bandwidth data includes third on-demand bandwidth data and third live broadcast bandwidth data, and the third bandwidth data is obtained by counting network packets sent by the on-demand service and the live broadcast service in the CDN server.

[0108] In an optional manner, the network packet carries a service identifier; the third on-demand bandwidth data is determined by counting the network packets carrying the service identifier corresponding to the on-demand service; the third live broadcast bandwidth data is determined by counting the network packets carrying the service identifier corresponding to the live broadcast service.

[0109] In an optional manner, the analysis module 42 is further adapted to: when the acquired bandwidth data includes third bandwidth data, determine the third on-demand bandwidth data in the third bandwidth data as the effective on-demand bandwidth data of the CDN server, and determine the third live broadcast bandwidth data in the third bandwidth data as the effective live broadcast bandwidth data of the CDN server.

[0110] In an optional manner, the analysis module 42 is further adapted to: when the acquired bandwidth data does not include the third bandwidth data but includes the first bandwidth data, split the first bandwidth data according to the bandwidth splitting ratio to obtain effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server.

[0111] In an optional manner, the bandwidth split ratio includes: on-demand usage rate and live broadcast usage rate; the statistical module 43 is further adapted to:

[0112] Summarize the second on-demand bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total on-demand bandwidth data;

[0113] Summarize the second live broadcast bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total live broadcast bandwidth data;

[0114] Based on the total on-demand bandwidth data and the total live broadcast bandwidth data, the on-demand utilization rate and the live broadcast utilization rate are calculated respectively.

[0115] In summary, according to the computer room bandwidth collection device provided by this embodiment, bandwidth data is collected for each CDN server in multiple ways, and by judging the type of bandwidth data of the CDN server obtained, a bandwidth collection strategy adapted to the actual bandwidth collection situation can be determined, so as to determine the effective bandwidth data of the CDN server according to the obtained bandwidth data, thereby realizing targeted hybrid bandwidth collection. When faced with CDN servers with mixed point-to-point live broadcasting and different characteristics, accurate server bandwidth data can be obtained, thereby ensuring the accuracy of the calculated bandwidth data at the computer room level.

[0116] An embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction or computer program, which can enable a processor to perform operations corresponding to the computer room bandwidth collection method in any of the above method embodiments.

[0117] An embodiment of the present application provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to perform operations corresponding to the computer room bandwidth collection method in any of the above method embodiments.

[0118] Figure 5 A schematic diagram of the structure of an embodiment of a computing device of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.

[0119] like Figure 5 As shown, the computing device may include: a processor (processor) 502 , a communications interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .

[0120] The processor 502, the communication interface 504, and the memory 506 communicate with each other via the communication bus 508. The communication interface 504 is used to communicate with other devices such as a client or other server network elements. The processor 502 is used to execute the program 510, which can specifically execute the relevant steps in the above-mentioned embodiment of the method for collecting bandwidth of a computer room for computing devices.

[0121] Specifically, the program 510 may include program codes, which include computer operation instructions.

[0122] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0123] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0124] The program 510 can be specifically used to enable the processor 502 to execute the direct room bandwidth collection method in any of the above-mentioned method embodiments. The specific implementation of each step in the program 510 can refer to the corresponding descriptions in the corresponding steps and units in the room bandwidth collection embodiment, which will not be repeated here. The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0125] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present application described here, and the above description of specific languages ​​is to disclose the best mode of implementation of the present application.

[0126] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0127] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present application.

[0128] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0129] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0130] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components according to the embodiments of the present application. The application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0131] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A method for collecting bandwidth in a computer room, comprising: Obtain various bandwidth data of each CDN server in the CDN room during the statistical period; Determine bandwidth collection strategies based on the types of bandwidth data obtained; Based on the obtained multiple bandwidth data, obtaining effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy; The effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN computer room are respectively counted to obtain the computer room on-demand bandwidth data and the computer room live broadcast bandwidth data.

2. The method according to claim 1, wherein: The obtaining of multiple bandwidth data of each CDN server in the CDN room during a statistical period further includes: Obtaining first bandwidth data of the CDN server based on network card traffic statistics; Acquire second bandwidth data of the CDN server based on gateway traffic statistics, wherein the second bandwidth data includes: second on-demand bandwidth data and second live broadcast bandwidth data; The third bandwidth data of the CDN server is obtained, wherein the third bandwidth data includes third on-demand bandwidth data and third live broadcast bandwidth data, and the third bandwidth data is obtained by counting network packets sent by the on-demand service and the live broadcast service in the CDN server.

3. The method according to claim 2, wherein: The network packet carries a service identifier; the third on-demand bandwidth data is determined by counting network packets carrying the service identifier corresponding to the on-demand service; the third live broadcast bandwidth data is determined by counting network packets carrying the service identifier corresponding to the live broadcast service.

4. The method according to claim 2, wherein: The step of obtaining the effective on-demand bandwidth data and the effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy based on the obtained multiple bandwidth data further includes: When the acquired bandwidth data includes the third bandwidth data, the third on-demand bandwidth data in the third bandwidth data is determined as the effective on-demand bandwidth data of the CDN server, and the third live broadcast bandwidth data in the third bandwidth data is determined as the effective live broadcast bandwidth data of the CDN server.

5. The method according to claim 2, wherein: The step of obtaining the effective on-demand bandwidth data and the effective live broadcast bandwidth data of the CDN server according to the bandwidth acquisition strategy based on the obtained multiple bandwidth data further includes: In a case where the acquired bandwidth data does not include the third bandwidth data but includes the first bandwidth data, the first bandwidth data is split according to the bandwidth splitting ratio to obtain effective on-demand bandwidth data and effective live broadcast bandwidth data of the CDN server.

6. The method according to claim 5, wherein: The bandwidth split ratio includes: on-demand usage rate and live broadcast usage rate; before the method is executed, it further includes: Summarize the second on-demand bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total on-demand bandwidth data; Summarize the second live broadcast bandwidth data of each CDN server in the CDN room during a preset period of time to obtain total live broadcast bandwidth data; The on-demand usage rate and the live broadcast usage rate are calculated respectively according to the total on-demand bandwidth data and the total live broadcast bandwidth data.

7. A bandwidth acquisition device for a computer room, comprising: An acquisition module, adapted to acquire various bandwidth data of each CDN server in a CDN computer room during a statistical period; The analysis module is adapted to determine a bandwidth acquisition strategy according to the types of the acquired multiple bandwidth data; based on the acquired multiple bandwidth data, obtain the effective on-demand bandwidth data and the effective live bandwidth data of the CDN server according to the bandwidth acquisition strategy; The statistical module is suitable for respectively collecting statistics on the effective on-demand bandwidth data and the effective live broadcast bandwidth data of each CDN server in the CDN computer room to obtain the computer room on-demand bandwidth data and the computer room live broadcast bandwidth data.

8. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the computer room bandwidth collection method according to any one of claims 1-6.

9. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute an operation corresponding to the computer room bandwidth collection method according to any one of claims 1 to 6.

10. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the computer room bandwidth collection method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Bandwidth acquisition method and device, computing equipment, storage medium and product

    CN119865641A