CN109194542B - Method and device for counting internal consumption of live stream in CDN system - Google Patents

Method and device for counting internal consumption of live stream in CDN system Download PDF

Info

Publication number
CN109194542B
CN109194542B CN201810961458.1A CN201810961458A CN109194542B CN 109194542 B CN109194542 B CN 109194542B CN 201810961458 A CN201810961458 A CN 201810961458A CN 109194542 B CN109194542 B CN 109194542B
Authority
CN
China
Prior art keywords
target
cache server
cdn node
period
live
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810961458.1A
Other languages
Chinese (zh)
Other versions
CN109194542A (en
Inventor
刘玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201810961458.1A priority Critical patent/CN109194542B/en
Publication of CN109194542A publication Critical patent/CN109194542A/en
Application granted granted Critical
Publication of CN109194542B publication Critical patent/CN109194542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed

Abstract

The invention discloses a method and a device for counting the internal consumption of a live stream in a CDN system, and belongs to the technical field of content delivery networks. The method comprises the following steps: periodically determining a target cache server for currently transmitting a target live stream in a cache server contained in a target CDN node; and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the transmission rate of the target live broadcast stream on each target cache server in the current period. The invention can provide guidance for reducing internal consumption and saving cost for the CDN system.

Description

Method and device for counting internal consumption of live stream in CDN system
Technical Field
The invention relates to the technical field of content delivery networks, in particular to a live stream internal consumption statistical method and device in a CDN system.
Background
In the process of providing live broadcast service (audio/video) for a user, a cache server of a CDN node continuously acquires real-time data according to a URL (uniform resource locator) carried in a live stream, and then feeds back the acquired real-time data to the user.
If several live streams carry the same URL, it indicates that the data of the live streams are the same, and when multiple cache servers in the same CDN node respectively provide live services of the same data for a user, each cache server needs to acquire data according to the URL carried by the live stream, and in this process, the bandwidth occupied when multiple cache servers repeatedly acquire the data of the live stream may be referred to as internal consumption. In order to reduce the internal consumption and save the cost, the internal consumption of the live stream in the CDN system may be counted, and then the live service with the same data is processed according to the statistical result, or the bandwidth of the domain name to which the URL carried in the live stream belongs is configured. Therefore, there is a need for a comprehensive and accurate method for counting the internal consumption of a live stream in a CDN system, which provides guidance for reducing the internal consumption and saving the cost.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for counting live stream internal consumption in a CDN system. The technical scheme is as follows:
in a first aspect, a method for counting live stream internal consumption in a CDN system is provided, where the method includes:
periodically determining a target cache server for currently transmitting a target live stream in a cache server contained in a target CDN node;
and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the transmission rate of the target live broadcast stream on each target cache server in the current period.
Further, the periodically determining, in a cache server included in the target CDN node, a target cache server that currently transmits the target live stream, further includes:
periodically determining an IP address corresponding to a target CDN node according to a preset IP address-CDN node mapping table;
and determining a cache server contained in the target CDN node according to the IP address corresponding to the target CDN node.
Further, the periodically determining, in the cache servers included in the target CDN node, a target cache server that currently transmits the target live streaming includes:
the method comprises the steps of periodically collecting live streaming logs of each cache server in a target CDN node, wherein the live streaming logs record URLs corresponding to live streaming transmitted by the cache servers;
determining live broadcast transmission log data corresponding to the current period of each cache server in the live broadcast stream transmission log of each cache server;
and taking a cache server containing a target URL corresponding to the target live streaming in the live streaming transmission log data as a target cache server.
Further, the calculating, according to the transmission rate of the target live streaming on each target cache server in the current period, the internal consumption of the target CDN node for the target live streaming in the current period includes:
calculating the average transmission rate of the target live broadcast stream on each target cache server in the period according to the real-time transmission rate of the target live broadcast stream on each target cache server in the current period;
and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period.
Further, the calculating, according to an average transmission rate of the target live streaming on each target cache server in the period, an internal consumption of the target CDN node for the target live streaming in the period includes:
calculating the average transmission rate of the target CDN node to the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period and the number of the target cache servers;
subtracting the average transmission rate of the target CDN node to the target live broadcast stream in the period from the product of the average transmission rate of the target CDN node to the target live broadcast stream in the period and the number of the target cache servers to obtain the internal consumption of the target CDN node to the target live broadcast stream in the period.
Further, the method further comprises:
calculating the total internal consumption of the target CDN node in the period according to the internal consumption of the target CDN node for each live broadcast stream in the period;
and calculating the internal consumption of the CDN system in the period according to the total internal consumption of each CDN node in the CDN system in the period.
In a second aspect, an apparatus for metering consumption in a live stream in a CDN system is provided, where the apparatus includes:
the first screening module is used for periodically determining a target cache server for currently transmitting the target live streaming in cache servers contained in the target CDN node;
and the first calculation module is used for calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the transmission rate of the target live broadcast stream on each target cache server in the current period.
Further, the apparatus further includes:
the second screening module is used for periodically determining an IP address corresponding to the target CDN node according to a preset IP address-CDN node mapping table; and determining a cache server contained in the target CDN node according to the IP address corresponding to the target CDN node.
Further, the first screening module is specifically configured to:
the method comprises the steps of periodically collecting live streaming logs of each cache server in a target CDN node, wherein the live streaming logs record URLs corresponding to live streaming transmitted by the cache servers;
determining live broadcast transmission log data corresponding to the current period of each cache server in the live broadcast stream transmission log of each cache server;
and taking a cache server containing a target URL corresponding to the target live streaming in the live streaming transmission log data as a target cache server.
Further, the first calculating module is specifically configured to:
calculating the average transmission rate of the target live broadcast stream on each target cache server in the period according to the real-time transmission rate of the target live broadcast stream on each target cache server in the current period;
and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period.
Further, the first calculating module is specifically further configured to:
calculating the average transmission rate of the target CDN node to the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period and the number of the target cache servers;
subtracting the average transmission rate of the target CDN node to the target live broadcast stream in the period from the product of the average transmission rate of the target CDN node to the target live broadcast stream in the period and the number of the target cache servers to obtain the internal consumption of the target CDN node to the target live broadcast stream in the period.
Further, the apparatus further comprises:
the second calculation module is used for calculating the total internal consumption of the target CDN node in the period according to the internal consumption of the target CDN node for each live stream in the period; and calculating the internal consumption of the CDN system in the period according to the total internal consumption of each CDN node in the CDN system in the period.
In a third aspect, a server is provided, where the server includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the method for counting live stream internal consumption in the CDN system according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the storage medium, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by a processor to implement the method for metering live stream internal consumption in the CDN system according to the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a target cache server for transmitting the current target live stream is determined periodically in a cache server contained in a target CDN node; and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the transmission rate of the target live broadcast stream on each target cache server in the current period. Therefore, by counting the transmission rate of the target live streaming on each target cache server, the bandwidth occupied by all target cache servers in the target CDN node when the target live streaming is transmitted repeatedly in the CDN system, namely the internal consumption of the target CDN node on the target live streaming can be determined, so that guidance is provided for reducing the internal consumption of the CDN system and saving the cost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scene of live stream internal consumption statistics in a CDN system according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for counting the internal consumption of a live stream in a CDN system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for counting live stream internal consumption in a CDN system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for counting the internal consumption of a live stream in a CDN system, which can be applied to internal consumption counting equipment in the CDN system for providing live service. The internal consumption statistical device may be a server or other devices, and may include a processor, a memory, and a transceiver, where the processor may be configured to determine a target cache server and a transmission rate of a target live stream on the target cache server in the following procedures, and calculate processing of internal consumption of the target live stream by a target CDN node, and the memory may be configured to store data required in a processing procedure and data generated in the processing procedure, and the transceiver may be configured to receive and transmit related data in the processing procedure. The application scenario of this embodiment may be as shown in fig. 1: in a CDN system, a cache server usually adopts a layered architecture, a lower CDN node obtains required data from an upper CDN node according to a received user request, each CDN node may include at least one cache server, and different cache servers also need to obtain a live stream from the upper CDN node when transmitting the same live stream, so that for any CDN node in the CDN system, an internal consumption statistics device may periodically determine a cache server in the CDN node that transmits a target live stream, then determine a transmission rate at which each of the cache servers transmits the target live stream, perform statistics calculation on the transmission rate at which each of the cache servers transmits the target live stream, and obtain internal consumption of the target live stream by the CDN node in this period.
In the following, a detailed description will be given of a processing flow of live stream internal consumption statistics in the CDN system shown in fig. 2 with reference to a specific embodiment, where the content may be as follows:
step 201: and periodically determining a target cache server for currently transmitting the target live streaming in cache servers contained in the target CDN node.
In implementation, every preset period, the internal consumption statistics device selects a cache server transmitting a target live stream in a current period from all cache servers included in a target CDN node as a target cache server.
Optionally, the CDN system includes a large number of CDN nodes, each CDN node includes a plurality of cache servers, and when performing the internal consumption statistics, it needs to determine which cache servers are included in the CDN nodes first, and corresponding processing may be as follows: periodically determining an IP address corresponding to a target CDN node according to a preset IP address-CDN node mapping table; and determining a cache server contained in the target CDN node according to the IP address corresponding to the target CDN node.
In implementation, an IP address-CDN node mapping table is preset on the internal consumption statistics device, and may be as shown in table 1, where an IP address in the table is an IP address of each cache server in the CDN system, a CDN node is an identifier of the CDN node, the identifier of the CDN node may be a pure-number serial number or an identifier formed by numbers, letters, or other symbols alone or in combination, and the IP address-CDN node mapping table reflects a correspondence between the CDN node and an IP address, and in the same CDN system, one CDN node may correspond to one or more IP addresses, but one IP address may only uniquely correspond to one CDN node. When internal consumption statistics is performed, every preset period, the internal consumption statistics device determines an IP address corresponding to a target CDN node from an IP address-CDN node mapping table, and then determines cache servers corresponding to the IP addresses from all cache servers included in the CDN system, where the cache servers are cache servers included in the target CDN node.
Table 1IP address-CDN node mapping table
Figure BDA0001773903570000061
Figure BDA0001773903570000071
Optionally, the processing of the target cache server that currently transmits the target live stream is periodically determined in the cache servers included in the target CDN node, which may specifically be as follows: the method comprises the steps of periodically collecting live streaming logs of each cache server in a target CDN node; determining live broadcast transmission log data corresponding to the current period of each cache server in the live broadcast stream transmission log of each cache server; and taking a cache server containing a target URL corresponding to the target live stream in the live stream transmission log data as a target cache server. And the live stream transmission log records a URL corresponding to the live stream transmitted by the cache server.
In implementation, each cache server in the CDN system locally stores a live streaming log of the cache server in the cache server, and each time the cache server performs live streaming, the cache server records a URL corresponding to a live streaming that is transmitted this time in the live streaming log locally stored in the cache server, so that URLs corresponding to all live streaming that has been transmitted on the cache server are recorded in the live streaming log locally stored in each cache server. And at intervals of a preset period, the internal consumption statistical equipment respectively collects live stream transmission logs locally stored by each cache server in the target CDN node. Since URLs corresponding to all transmitted live streams of the cache server are recorded in a live stream transmission log locally stored by the cache server, and some of the live streams are not transmitted in a current period, the internal consumption statistical device also needs to screen live stream transmission log data corresponding to the current period of the cache server from the live stream transmission log of the cache server according to a specific time range of the current period, and then determines live stream transmission log data including a target URL corresponding to a target live stream from live stream transmission log data of all the cache servers of a target CDN node in the current period, and takes the cache server storing the live stream transmission log data as a target cache server.
Step 102: and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the transmission rate of the target live broadcast stream on each target cache server in the current period.
In implementation, after a target cache server in a target CDN node is determined, the internal consumption statistics device further obtains a transmission rate of a target live stream on each target cache server in a current period, and then calculates the transmission rate of the target live stream on each target cache server in the current period to obtain the internal consumption of the target CDN node for the target live stream in the current period.
Optionally, the processing of the internal consumption of the target CDN node on the target live streaming in the present period is calculated according to the transmission rate of the target live streaming on each target cache server in the present period, and specifically may be as follows: calculating the average transmission rate of the target live broadcast stream on each target cache server in the period according to the real-time transmission rate of the target live broadcast stream on each target cache server in the current period; and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period.
In implementation, in a live stream transmission log locally stored in the cache server, in addition to the URLs corresponding to all the live streams transmitted on the cache server, the real-time transmission rates corresponding to all the live streams transmitted on the cache server are also recorded. After a target cache server in the target CDN node is determined, the internal consumption statistical equipment obtains the real-time transmission rate of the target live stream from the live stream transmission log data of each target cache server in the current period. Generally, in the process of transmitting a live stream, a cache server records a current real-time transmission rate of the live stream at regular intervals, so that multiple real-time transmission rates of a target live stream may exist in live stream transmission log data of a target cache server in the current period, and at this time, an average value of the multiple real-time transmission rates in the same target cache server may be calculated as an average transmission rate of the target live stream on the target cache server in the current period. And then, calculating the average transmission rate of the target live streaming on each target cache server in the period to obtain the internal consumption of the target CDN node on the target live streaming in the period.
It should be noted that, for a plurality of real-time transmission rates of the target live broadcast on the target cache server, a maximum value (minimum value) of the plurality of real-time transmission rates may also be used as a maximum (minimum) transmission rate of the target live broadcast stream on the target cache server, and then, according to the maximum (minimum) transmission rate of the target live broadcast stream on each target cache server in the period, the internal consumption of the target CDN node for the target live broadcast stream in the period is calculated. In this way, the maximum (minimum) internal consumption of the target CDN node for the target live stream in this period can be obtained through calculation.
Optionally, because the internal consumption is a bandwidth occupied by multiple cache servers repeatedly acquiring the live stream, when calculating the internal consumption of the target live stream, the bandwidth occupied by the transmission rate when one target cache server acquires the target live stream needs to be removed first, and the total bandwidth occupied by the transmission when the remaining target cache servers acquire the target live stream is the internal consumption of the target live stream, so that according to the average transmission rate of the target live stream on each target cache server in the period, the processing of the target CDN node on the internal consumption of the target live stream in the period is calculated, which specifically may be as follows: calculating the average transmission rate of the target CDN node to the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period and the number of the target cache servers; and subtracting the average transmission rate of the target CDN node to the target live broadcast stream in the period from the product of the average transmission rate of the target CDN node to the target live broadcast stream in the period and the number of the target cache servers to obtain the internal consumption of the target CDN node to the target live broadcast stream in the period.
In implementation, after obtaining the average transmission rate of the target live streaming on each target cache server in the period, the internal consumption statistics device may continue to calculate the average transmission rate of the target live streaming between each target cache server in the period according to the number of the target cache servers, and use the calculation result as the average transmission rate of the target CDN node to the target live streaming in the period. In the CDN node, at least one target cache server is needed to transmit a target live stream, and bandwidths occupied by other target cache servers in the CDN node when repeatedly transmitting the target live stream are all internal consumptions, so that when the internal consumption time of the target CDN node for the target live stream in the period is calculated, the product of the average transmission rate of the target CDN node for the target live stream in the period and the number of target cache servers in the period may be calculated first, to obtain the total bandwidth occupied by the target live stream transmission in the target CDN node in the period, and then the bandwidth occupied by one target cache server when transmitting the target live stream (i.e., the average transmission rate of the target CDN node for the target live stream in the period) is subtracted, and the obtained result may be used as the internal consumption of the target CDN node for the target live stream in the period.
For example, as shown in table 2, in this period, CDN node 1000 has 2 target cache servers to transmit a target live stream (corresponding to a URL of a.com/1.flv), and average transmission rates of the target live stream on the 2 target cache servers are 0.8mbps and 1.2mbps, respectively. Calculating to obtain an average transmission rate of the CDN node 1000 for the target live streaming in the period as 1mbps, multiplying the average transmission rate of the CDN node 1000 for the target live streaming in the period by the number of target cache servers 2, and subtracting the average transmission rate of the CDN node 1000 for the target live streaming in the period as 1mbps, that is, 1 × 2-1, to obtain an internal consumption of the CDN node 1000 for the target live streaming in the period as 1 mbps.
Table 2 internal consumption table of CDN node for target live streaming
Figure BDA0001773903570000091
Figure BDA0001773903570000101
It should be noted that, similar to the calculation of the transmission rate of the target live streaming on the target cache server, after obtaining the average transmission rate of the target live streaming on each target cache server in the period, the internal consumption statistical device may also use the maximum value (minimum value) of the average transmission rates of the target live streaming on all the target cache servers as the maximum (minimum) transmission rate of the target CDN node for the target live streaming in the period, and then continue to calculate the maximum (minimum) internal consumption of the target CDN node for the target live streaming in the period according to the above method.
Optionally, in this period, a plurality of live broadcast streams may be transmitted on a cache server included in the target CDN node, where the live broadcast streams all have corresponding internal consumption, and meanwhile, the CDN system further includes a plurality of CDN nodes, and each CDN node also has corresponding internal consumption, so that the sum of the internal consumption of all live broadcast streams in each CDN node in this period and the sum of the internal consumption of all CDN nodes in the CDN system in this period may be calculated, and corresponding processing may be as follows: calculating the total internal consumption of the target CDN node in the period according to the internal consumption of the target CDN node for each live stream in the period; and calculating the internal consumption of the CDN system in the period according to the total internal consumption of each CDN node in the CDN system in the period.
In implementation, after obtaining the internal consumption of the target CDN node for the target live stream in the period, the internal consumption counting device may repeat step 101 and step 102, continue to calculate the internal consumption of the target CDN node for each live stream in the period, and then sum the internal consumption of the target CDN node for each live stream in the period to obtain the total internal consumption of the target CDN node in the period. And calculating to obtain the total internal consumption of each CDN node in the CDN system in the period according to the method, and then summing the total internal consumption of each CDN node in the period to serve as the internal consumption of the CDN system in the period.
It should be noted that, after the internal consumption of each live stream by the target CDN node in the present period is calculated, the domain name to which the live stream belongs may also be determined according to the URL corresponding to the live stream, and then the internal consumption of the target domain name by the target CDN node in the present period is further calculated, which may specifically refer to table 3. The internal consumption of each CDN node in the CDN system for the target domain name in the period may also be calculated according to the same method, and then the internal consumption of the CDN system for the target domain name in the period is further calculated.
TABLE 3 Internally consumption of CDN nodes for target Domain names
Figure BDA0001773903570000102
Figure BDA0001773903570000111
In the embodiment of the invention, a target cache server for transmitting the current target live stream is determined periodically in a cache server contained in a target CDN node; and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the transmission rate of the target live broadcast stream on each target cache server in the current period. Therefore, by counting the transmission rate of the target live broadcast stream on each target cache server, the bandwidth occupied by all target cache servers in the target CDN node when the target live broadcast stream is transmitted repeatedly, namely the internal consumption of the target CDN node for the target live broadcast stream, can be determined, so that the internal consumption of the CDN system is reduced, and guidance is provided for saving the cost.
Based on the same technical concept, an embodiment of the present invention further provides a device for counting live stream internal consumption in a CDN system, where as shown in fig. 3, the device includes:
the first screening module 301 is configured to periodically determine, in the cache servers included in the target CDN node, a target cache server that currently transmits the target live streaming.
A first calculating module 302, configured to calculate, according to a transmission rate of the target live streaming on each target cache server in a current period, an internal consumption of the target CDN node for the target live streaming in the current period.
Optionally, the apparatus further includes:
the second screening module 303 is configured to periodically determine an IP address corresponding to the target CDN node according to a preset IP address-CDN node mapping table; and determining a cache server contained in the target CDN node according to the IP address corresponding to the target CDN node.
Optionally, the first screening module 301 is specifically configured to:
the method comprises the steps of periodically collecting live streaming logs of each cache server in a target CDN node, wherein the live streaming logs record URLs corresponding to live streaming transmitted by the cache servers;
determining live broadcast transmission log data corresponding to the current period of each cache server in the live broadcast stream transmission log of each cache server;
and taking a cache server containing a target URL corresponding to the target live streaming in the live streaming transmission log data as a target cache server.
Optionally, the first calculating module 302 is specifically configured to:
calculating the average transmission rate of the target live broadcast stream on each target cache server in the period according to the real-time transmission rate of the target live broadcast stream on each target cache server in the current period;
and calculating the internal consumption of the target CDN node on the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period.
Optionally, the first calculating module 302 is further specifically configured to:
calculating the average transmission rate of the target CDN node to the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period and the number of the target cache servers;
subtracting the average transmission rate of the target CDN node to the target live broadcast stream in the period from the product of the average transmission rate of the target CDN node to the target live broadcast stream in the period and the number of the target cache servers to obtain the internal consumption of the target CDN node to the target live broadcast stream in the period.
Optionally, the apparatus further comprises:
a second calculating module 304, configured to calculate, according to the internal consumption of each live stream by the target CDN node in the present period, a total internal consumption of the target CDN node in the present period; and calculating the internal consumption of the CDN system in the period according to the total internal consumption of each CDN node in the CDN system in the period.
Based on the same technical concept, the embodiment of the invention also provides a server, which can generate larger difference due to different configurations or performances, and can comprise one or more processors and memories, wherein the memories can be transient storage or permanent storage. The memory may store at least one instruction, at least one program, a set of codes, or a set of instructions that are loaded and executed by the processor to implement the above-described method for live stream in-consumption statistics in a CDN system. The program stored on the memory may include one or more modules, each of which may include a series of instruction operations on a transcoding server.
Based on the same technical concept, an embodiment of the present invention further provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for counting the internal consumption of a live stream in the CDN system.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute the method according to the embodiments or some parts of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for counting the internal consumption of a live stream in a CDN system is characterized by comprising the following steps:
periodically determining a target cache server for currently transmitting a target live stream in a cache server contained in a target CDN node;
calculating the average transmission rate of the target live broadcast stream on each target cache server in the period according to the real-time transmission rate of the target live broadcast stream on each target cache server in the current period;
calculating the average transmission rate of the target CDN node to the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period and the number of the target cache servers;
subtracting the average transmission rate of the target CDN node to the target live broadcast stream in the period from the product of the average transmission rate of the target CDN node to the target live broadcast stream in the period and the number of the target cache servers to obtain the internal consumption of the target CDN node to the target live broadcast stream in the period.
2. The method of claim 1, wherein the periodically determining, among the cache servers included in the target CDN node, a target cache server currently transmitting the target live stream, further comprises:
periodically determining the IP address of a cache server corresponding to the target CDN node according to a preset IP address-CDN node mapping table;
and determining a cache server contained in the target CDN node according to the IP address of the cache server corresponding to the target CDN node.
3. The method of claim 1, wherein the periodically determining, among the cache servers included in the target CDN node, a target cache server currently transmitting the target live stream includes:
the method comprises the steps of periodically collecting live streaming logs of each cache server in a target CDN node, wherein the live streaming logs record URLs corresponding to live streaming transmitted by the cache servers;
determining live broadcast transmission log data corresponding to the current period of each cache server in the live broadcast stream transmission log of each cache server;
and taking a cache server containing a target URL corresponding to the target live streaming in the live streaming transmission log data as a target cache server.
4. The method of claim 1, further comprising:
calculating the total internal consumption of the target CDN node in the period according to the internal consumption of the target CDN node for each live broadcast stream in the period;
and calculating the internal consumption of the CDN system in the period according to the total internal consumption of each CDN node in the CDN system in the period.
5. An apparatus for counting internal consumption of live stream in a CDN system, the apparatus comprising:
the first screening module is used for periodically determining a target cache server for currently transmitting the target live streaming in cache servers contained in the target CDN node;
the first calculation module is used for calculating the average transmission rate of the target live broadcast stream on each target cache server in the period according to the real-time transmission rate of the target live broadcast stream on each target cache server in the current period; calculating the average transmission rate of the target CDN node to the target live broadcast stream in the period according to the average transmission rate of the target live broadcast stream on each target cache server in the period and the number of the target cache servers; subtracting the average transmission rate of the target CDN node to the target live broadcast stream in the period from the product of the average transmission rate of the target CDN node to the target live broadcast stream in the period and the number of the target cache servers to obtain the internal consumption of the target CDN node to the target live broadcast stream in the period.
6. The apparatus of claim 5, further comprising:
the second screening module is used for periodically determining the IP address of the cache server corresponding to the target CDN node according to a preset IP address-CDN node mapping table; and determining a cache server contained in the target CDN node according to the IP address of the cache server corresponding to the target CDN node.
7. The apparatus of claim 5, wherein the first screening module is specifically configured to:
the method comprises the steps of periodically collecting live streaming logs of each cache server in a target CDN node, wherein the live streaming logs record URLs corresponding to live streaming transmitted by the cache servers;
determining live broadcast transmission log data corresponding to the current period of each cache server in the live broadcast stream transmission log of each cache server;
and taking a cache server containing a target URL corresponding to the target live streaming in the live streaming transmission log data as a target cache server.
8. The apparatus of claim 5, further comprising:
the second calculation module is used for calculating the total internal consumption of the target CDN node in the period according to the internal consumption of the target CDN node for each live stream in the period; and calculating the internal consumption of the CDN system in the period according to the total internal consumption of each CDN node in the CDN system in the period.
9. A server comprising a processor and a memory, wherein the memory has stored therein a computer-executable program that, when executed by the processor, implements a method of live stream inleakage statistics in a CDN system according to any one of claims 1 to 4.
10. A computer-readable storage medium having stored thereon a computer-executable program, wherein the computer-executable program when executed by a processor implements the method for live stream inleakage statistics in a CDN system of any one of claims 1 to 4.
CN201810961458.1A 2018-08-22 2018-08-22 Method and device for counting internal consumption of live stream in CDN system Active CN109194542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810961458.1A CN109194542B (en) 2018-08-22 2018-08-22 Method and device for counting internal consumption of live stream in CDN system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810961458.1A CN109194542B (en) 2018-08-22 2018-08-22 Method and device for counting internal consumption of live stream in CDN system

Publications (2)

Publication Number Publication Date
CN109194542A CN109194542A (en) 2019-01-11
CN109194542B true CN109194542B (en) 2021-05-07

Family

ID=64919167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810961458.1A Active CN109194542B (en) 2018-08-22 2018-08-22 Method and device for counting internal consumption of live stream in CDN system

Country Status (1)

Country Link
CN (1) CN109194542B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713456A (en) * 2016-12-22 2017-05-24 上海帝联信息科技股份有限公司 Network bandwidth statistics method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130198341A1 (en) * 2012-01-31 2013-08-01 Electronics And Telecommunications Research Institute System and method for delivering segmented content
US10091675B2 (en) * 2012-12-13 2018-10-02 Huawei Technologies Co., Ltd. System and method for estimating an effective bandwidth
US9712408B2 (en) * 2014-03-17 2017-07-18 Telefonaktiebolaget L M Ericsson (Publ) Bandwidth management in a content distribution network
US9641578B2 (en) * 2015-04-02 2017-05-02 Arris Enterprises, Inc. Minimizing unicast bandwidth in an adaptive bit rate system
CN105897822B (en) * 2015-11-11 2019-07-26 法法汽车(中国)有限公司 A kind of content distributing network CDN node selection method and its device
CN108023812B (en) * 2016-10-31 2021-06-08 华为技术有限公司 Content distribution method and device of cloud computing system, computing node and system
CN107645386B (en) * 2017-09-25 2021-06-22 网宿科技股份有限公司 Method and device for acquiring data resources

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713456A (en) * 2016-12-22 2017-05-24 上海帝联信息科技股份有限公司 Network bandwidth statistics method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林智华,陈珊.基于P2P流媒体点播系统的研究.《福建金融管理干部学院学报》.2009, *

Also Published As

Publication number Publication date
CN109194542A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN107395683B (en) Method for selecting return path and server
US10116572B2 (en) Method, device, and system for acquiring streaming media data
CN101577631B (en) Method, system and network device for evaluating experience quality of user
CN105578211B (en) Live streaming based on unlimited service node accelerates network interim card optimization method and system
CN107277013B (en) Live broadcast system in peer-to-peer network and node management method
US8250232B2 (en) Intelligent content stream bandwidth determination
CN109756757A (en) Live data processing method and processing device, live broadcasting method and device and direct broadcast server
CN108810657B (en) Method and system for setting video cover
CN113055692A (en) Data processing method and device
EP3072258A1 (en) Fractional pre-delivery of content to user devices
CN109996094A (en) Video broadcasting method, apparatus and system
CN113891175B (en) Live broadcast push flow method, device and system
CN106789956B (en) A kind of P2P order method and system based on HLS
CN102761572A (en) Method and system for dynamically adjusting data flow
CN110445723A (en) A kind of network data dispatching method and fringe node
CN107920072B (en) Multimedia sharing method and system based on data characteristics
US20140282788A1 (en) System for controlling video distribution in response to a request on reduced video data traffic and a method therefor
CN110048906B (en) Method, system, device and server for judging node transmission quality
Li et al. Challenges, designs, and performances of large-scale open-P2SP content distribution
Choi et al. Analyzing and modeling workload characteristics in a multiservice IP network
US9813321B2 (en) Hybrid content delivery system
CN109194542B (en) Method and device for counting internal consumption of live stream in CDN system
CN104168174A (en) Method and apparatus for information transmission
CN101895406A (en) Method and system for providing direct broadcast service of mobile streaming media
CN113079062B (en) Resource adjusting method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant