CN113891174A - Bandwidth statistical method and system for live video - Google Patents

Bandwidth statistical method and system for live video Download PDF

Info

Publication number
CN113891174A
CN113891174A CN202111136038.8A CN202111136038A CN113891174A CN 113891174 A CN113891174 A CN 113891174A CN 202111136038 A CN202111136038 A CN 202111136038A CN 113891174 A CN113891174 A CN 113891174A
Authority
CN
China
Prior art keywords
time
log
node
time node
bandwidth
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.)
Granted
Application number
CN202111136038.8A
Other languages
Chinese (zh)
Other versions
CN113891174B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202111136038.8A priority Critical patent/CN113891174B/en
Publication of CN113891174A publication Critical patent/CN113891174A/en
Application granted granted Critical
Publication of CN113891174B publication Critical patent/CN113891174B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/64738Monitoring network characteristics, e.g. bandwidth, congestion level
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests

Abstract

The embodiment of the application provides a bandwidth statistical method and a system for live video, wherein the method comprises the following steps: acquiring at least one log of a live video; calculating the mapping time length of each acquired log at a time node; according to the calculated time length, calculating the bandwidth mapped by at least one time node corresponding to each log in the time length; and mapping each log to the bandwidth of the same time node, and adding to obtain the bandwidth of the live video counted by the time node. According to the embodiment of the application, the logs do not need to be split, and the purposes of saving the storage space of the logs, accelerating the calculation speed and enhancing the readability of the logs are achieved.

Description

Bandwidth statistical method and system for live video
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a system for counting bandwidth of live video, computer equipment and a computer readable storage medium.
Background
Live video played by platforms provided by CDN (content delivery network) providers is typically charged according to bandwidth. The common CDN bandwidth charging method is divided into a 95 th value and a 4 th peak value. Regardless of the charging mode, the bandwidth statistics of the time granularity cannot be kept away.
Live video is a long-connection service, and often a long-time behavior is recorded in a log. In order to calculate the bandwidth of the log, the current method is to divide a log into a plurality of logs according to time granularity; counting the byte number in the time node in each split log, adding the byte number in each time node, and then dividing the sum by the time length of the time granularity to obtain the bandwidth value of all logs of the live video in each time node.
However, in the current bandwidth calculation method of the live video, since one log is split into a plurality of logs, the required log storage space is large, the calculation speed is slow, and the readability of the log after the log is split into the plurality of logs is complicated.
Disclosure of Invention
The embodiment of the application aims to provide a bandwidth statistical method, a system, computer equipment and a computer readable storage medium for live video, logs do not need to be split, and the purposes of saving log storage space, accelerating calculation speed and enhancing log readability are achieved.
One aspect of the present application provides a bandwidth statistics method for a live video, including:
acquiring at least one log of a live video;
calculating the mapping time length of each acquired log in at least one time node corresponding to the log;
calculating the bandwidth of each log mapped at the at least one time node according to the calculated time length;
and mapping each log to the bandwidth of the same time node, and adding to obtain the bandwidth of the live video counted by the time node.
Optionally, the calculating a time length of mapping of each obtained log at least one time node corresponding to the log specifically includes:
for the currently acquired log, determining at least one time node related to the log according to the starting timestamp and the ending timestamp of the log; and are
For each time node to which the log relates, the length of time that the log maps to that time node is calculated.
Optionally, the calculating the time length of the log mapped to the time node specifically includes:
for the time node meeting the first condition, the time length of the log mapped to the time node is equal to the sum of the time node and the set time granularity minus the starting timestamp of the log;
wherein, the time nodes meeting the first condition are: and the time node is greater than or equal to the difference between the start timestamp of the log and the set time granularity, is less than or equal to the start timestamp of the log, and is less than or equal to the difference between the end timestamp of the log and the set time granularity.
Optionally, the calculating the time length of the log mapped to the time node specifically includes:
for the time node meeting the second condition, the time length of the log mapped to the time node is equal to the set time granularity;
wherein, the time nodes meeting the second condition are: and the time node is greater than or equal to the starting timestamp of the log and less than or equal to the difference between the ending timestamp of the log and the set time granularity.
Optionally, the calculating the time length of the log mapped to the time node specifically includes:
for a time node satisfying a third condition, the length of time that the log is mapped to the time node is equal to the difference between the end timestamp of the log and the time node;
wherein, the time nodes meeting the third condition are: and the time node is greater than or equal to the starting time stamp of the log and less than or equal to the ending time stamp of the log.
Optionally, the calculating the time length of the log mapped to the time node specifically includes:
for a time node satisfying the fourth condition, the length of time that the log is mapped to the time node is equal to the difference between the end timestamp and the start timestamp of the log;
wherein, the time nodes meeting the fourth condition are: and the time node is greater than or equal to the difference between the end timestamp of the log and the set time granularity and is less than or equal to the start timestamp of the log.
Optionally, the determining at least one time node related to the log according to the start timestamp and the end timestamp of the log specifically includes:
and determining the time node which is larger than the difference between the starting time stamp of the log and the set time granularity and smaller than the ending time stamp of the log as the time node related to the log.
An aspect of the present embodiment provides a bandwidth statistics system for live video, including:
the log acquisition module is used for acquiring at least one log of the live video;
the time length mapping module is used for calculating the mapping time length of each acquired log at least one time node corresponding to the log;
the bandwidth mapping module is used for calculating the bandwidth mapped by each log at the at least one time node according to the calculated time length;
and the bandwidth counting module is used for mapping each log to the bandwidth of the same time node and adding the logs to obtain the bandwidth of the live video counted by the time node.
An aspect of the embodiments of the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the steps of the bandwidth statistics method for live video as described above.
An aspect of the embodiments of the present application further provides a computer-readable storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the bandwidth statistics method for live video as described above.
The bandwidth statistical method, the system, the equipment and the computer readable storage medium for the live video acquire logs of the live video; calculating the mapping time length of each acquired log at a time node; calculating the bandwidth of each log mapped at the time node according to the calculated time length; and mapping each log to the bandwidth of the same time node, and adding to obtain the bandwidth of the live video counted by the time node. The logs do not need to be split in the whole calculation process, and split sub-logs do not need to be stored respectively, so that the purposes of saving the storage space of the logs, accelerating the calculation speed and enhancing the readability of the logs are achieved.
Drawings
Fig. 1 schematically illustrates an application environment diagram of a bandwidth statistics method for live video according to an embodiment of the present application;
fig. 2 schematically shows a flowchart of a bandwidth statistics method for live video according to a first embodiment of the present application;
FIG. 3a is a flowchart illustrating sub-steps of a specific method for calculating the time length of the log mapped at the time node in step S202;
3b, 3c, 3d show schematic diagrams of time nodes involved in logs of three long time spans, respectively;
FIG. 4 is a flowchart illustrating sub-steps of a specific method for calculating the bandwidth of the log at the time node mapping in step S203;
fig. 5 schematically shows a block diagram of a bandwidth statistics system of a live video according to a second embodiment of the present application;
fig. 6 schematically shows a hardware architecture diagram of a computer device suitable for implementing a bandwidth statistics method for live video according to a third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present application and to distinguish each step, and therefore should not be construed as limiting the present application.
Fig. 1 schematically shows an environment application diagram according to an embodiment of the application. As shown in fig. 1:
the server 2 provided by the CDN service provider can be connected to a plurality of terminal apparatuses 6 via the network 4.
The server 2 may provide a content service for the terminal device 6. The content services may include content streaming services such as internet protocol video streaming services. Content streaming services may be configured to distribute content via various transmission techniques. The content service may be configured to provide content such as video, audio, text data, combinations thereof, and the like. The content may include content streams (e.g., video streams, audio streams, information streams), content files (e.g., video files, audio files, text files), and/or other data. For example, the server 2 may provide a playing service of a live video, and for the live video played by the server 2, bandwidth statistics may be performed by using the bandwidth statistics method for the live video in the embodiment of the present application.
The server 2 may be a device such as: rack-mounted servers, blade servers, tower servers, or rack servers (including independent servers or a server cluster composed of a plurality of servers), and the like.
The servers 2 may be located in a data center, such as a single site, or distributed in different geographic locations (e.g., at multiple sites). The server 2 may provide services via one or more networks 4. The network 4 includes various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network 4 may include physical links such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and the like. The network 4 may include wireless links such as cellular links, satellite links, Wi-Fi links, and the like.
The terminal device 6 may be configured to access the server 2. The terminal device 6 may comprise any type of terminal device 6, such as: mobile devices, tablet devices, laptop computers, smart devices (e.g., smart watches, smart glasses), virtual reality headsets, gaming devices, set-top boxes, digital streaming devices, robots, vehicle terminals, smart televisions, e-book readers, MP4 (moving picture experts group audio layer IV) players, and the like.
The terminal equipment 6 can run Windows system and Android (Android)TM) System, etc. operating system. The user can also install various application program installation packages according to the needs, so that application programs for realizing various specific functions can be obtained.
The following describes a bandwidth statistics scheme for live video by using various embodiments. The scheme may be implemented by a computer device 1300, and the computer device 1300 may be the server 2 or a computing node thereof.
Example one
Fig. 2 schematically shows a flowchart of a bandwidth statistics method for live video according to a first embodiment of the present application.
As shown in fig. 2, the bandwidth statistical method for live video may include the following steps S201 to S204, where:
step S201: and acquiring logs of the live video.
In this step, the computer device 1300 may obtain at least one log of a live video of a bandwidth to be counted, for the live video; that is, the number of the live videos of the bandwidth to be counted can be one or more; for example, the log of live video obtained by the computer device 1300 is a log of all live video played by the platform over a period of time (e.g., within a month).
Step S202: and calculating the mapping time length of each acquired log at the time node.
In this step, for the currently acquired log, the computer device 1300 determines, according to the start timestamp and the end timestamp of the log, at least one time node to which the log relates; and for each time node to which the log relates, calculating the length of time that the log maps to that time node.
A specific method for calculating the time length of mapping of each acquired log at least one time node corresponding to the log may be as shown in fig. 3a, and the flow includes the following sub-steps S301 to S307:
substep S301: for a currently acquired log, a start timestamp and an end timestamp of the log are determined.
In this sub-step, computer device 1300 determines, for a currently acquired log, a start time stamp and an end time stamp of the log.
In an exemplary embodiment, the computer device 1300 may retrieve the start _ time, end _ time fields from the currently retrieved log to determine the start timestamp and the end timestamp of the log.
Substep S302: and determining the time node involved by the log according to the starting time stamp and the ending time stamp of the log.
In this sub-step, the computer device 1300 will satisfy the time node (time _ node) of the following condition: time _ node > start _ time-t, and time _ node < end _ time, as the time nodes the log relates to, the set of these time nodes is denoted as set { time _ node }; wherein, t is the set time granularity, time _ node represents the time node, and start _ time and end _ time are the start timestamp and the end timestamp of the log respectively. That is, a time node that is greater than the difference between the start time stamp of the log and the set time granularity and less than the end time stamp of the log is determined as the time node involved in the log.
For example, the time granularity may be set to 5 minutes, and the time nodes spaced at the time granularity may be, in order: 00:00, 00:05, 00:10, 23:55, for convenience of calculation, the time node may be converted into a form of millisecond, where T is a time stamp of the day 00:00 of the log, for example, the date of the log is 2021-01-01, then T is 1609430400000 (time stamp of 2021-01-0100: 00), and the time nodes (time _ nodes) are respectively: t +0, T +300000, T + 600000.
In an exemplary embodiment, a schematic diagram of the time nodes involved in a long-span log is shown in FIG. 3 b. The time span of the log in FIG. 3b exceeds 3 time granularities; the time nodes related to the log determined by the computer device 1300 include 5 time nodes respectively marked with serial numbers 1-5.
A schematic diagram of the time nodes involved in the logging of another time span is shown in fig. 3 c. The time of the log in FIG. 3c spans one time node; the time nodes involved in the log as determined by computer device 1300 include 2 time nodes labeled with sequence numbers 1 and 2, respectively.
A schematic diagram of the time nodes involved in the logging of yet another time span is shown in fig. 3 d. The time span of the log in FIG. 3d is within one time granularity; the time node to which the log relates as determined by computer device 1300 includes 1 time node marked with sequence number 1.
Substep S303: judging the node type of each time node related to the log; if the node type of the time node is type A, executing the following substep S304, and calculating the time length of the time node mapped to the type A; if the node type of the time node is type B, performing the following substep S305, calculating the time length of the time node mapped to type B; if the node type of the time node is type C, executing the following substep S306, and calculating the time length of the time node mapped to the type C; if the node type of the time node is type D, the following sub-step S307 is performed to calculate the time length of the time node mapped to type D.
In this sub-step, the computer device 1300 determines, for a time node (time _ node) satisfying the first condition, that the node type of the time node is type a;
wherein the first condition is: time _ node > -start _ time-t, and time _ node < -start _ time, and time _ node < -end _ time-t;
that is, the time nodes satisfying the first condition are: and the time node is greater than or equal to the difference between the start timestamp of the log and the set time granularity, is less than or equal to the start timestamp of the log, and is less than or equal to the difference between the end timestamp of the log and the set time granularity.
The computer device 1300 determines, for a time node (time _ node) satisfying the second condition, that the node type of the time node is type B;
wherein the second condition is: time _ node > -start _ time, and time _ node < -end _ time-t;
that is, the time nodes satisfying the second condition are: a time node which is greater than or equal to the starting timestamp of the log and less than or equal to the difference between the ending timestamp of the log and the set time granularity;
the computer device 1300 determines, for a time node (time _ node) satisfying the third condition, that the node type of the time node is type C;
wherein the third condition is: time _ node > -start _ time, and time _ node < -end _ time;
that is, the time nodes satisfying the third condition are: and the time node is greater than or equal to the starting time stamp of the log and less than or equal to the ending time stamp of the log.
The computer device 1300 determines, for a time node (time _ node) satisfying the fourth condition, that the node type of the time node is type D;
wherein the fourth condition is: time _ node > -end _ time-t, and time _ node < -start _ time;
that is, the time nodes satisfying the fourth condition are: and the time node is greater than or equal to the difference between the end timestamp of the log and the set time granularity and is less than or equal to the start timestamp of the log.
In an exemplary embodiment, the computer device 1300 determines that the 1 st time node is type a, the 5 th time node is type C, and the other time nodes are type B for the time nodes involved in the log of the long time span as shown in fig. 3B;
in an exemplary embodiment, the computer device 1300 determines that the 1 st time node is type a and the 2 nd time node is type C for the time nodes involved in the log of a time span as shown in fig. 3C;
in an exemplary embodiment, the time node involved by the computer device 1300 for the log of yet another time span as shown in FIG. 3D is of type D.
Substep S304: calculating the time length of the time node mapped to the type A;
in this sub-step, computer device 1300 calculates the time length time _ length of the time node (time _ node) mapped to type a, time _ node + t-start _ time;
that is, the length of time that the log maps to the time node satisfying the first condition is equal to the sum of the time node and the set time granularity minus the start timestamp of the log.
Substep S305: calculating the time length of the time node mapped to the type B;
in this sub-step, computer device 1300 calculates the time length time _ length of the time node (time _ node) mapped to type B as t;
that is, the length of time that the log maps to the time node satisfying the second condition is equal to the set time granularity.
Substep S306: calculating the time length of the time node mapped to the type C;
in this sub-step, computer device 1300 calculates the length of time, time _ length, mapped to the time node of type C (time _ node), end _ time-time _ node;
that is, the length of time that the log is mapped to the time node satisfying the third condition is equal to the difference between the end timestamp of the log and the time node.
Substep S307: the length of time of the time node mapped to type D is calculated.
In this sub-step, computer device 1300 calculates the time length time _ length of the time node (time _ node) mapped to type D as end _ time-start _ time;
that is, the length of time that the log is mapped to the time node satisfying the fourth condition is equal to the difference between the end timestamp of the log and the time node.
Step S203: and calculating the bandwidth of each log mapped at the at least one time node according to the calculated time length.
In this step, for each time node related to the currently acquired log, the computer device 1300 may calculate the bandwidth mapped by the log at the time node according to the time length mapped by the log at the time node, the number of bytes transmitted in the log record, and the connection establishment duration, where a specific method flow is as shown in fig. 4, and includes the following sub-steps S401 to S402:
substep S401: for a time node involved by the log, calculating the data transmission size mapped by the log at the time node according to the time length mapped by the log at the time node.
In this sub-step, for a time node related to the log, the computer device 1300 calculates, according to the length of time that the log is mapped at the time node, the number of bytes transferred and the connection establishment duration recorded by the log, the size of data transfer that the log is mapped at the time node.
In an exemplary embodiment, the log calculated by the computer apparatus 1300 is mapped to a data transmission size of one time node, bytes _ send × time _ length/session _ time; the bytes _ send and the session _ time are two fields recorded in the log, and respectively represent the number of bytes transmitted (in bytes) and the connection duration (in milliseconds), and the time _ length is the length of time that the log is mapped to the time node.
Substep S402: and calculating the bandwidth of the log mapped at the time node according to the data transmission size of the log mapped at the time node.
In an exemplary embodiment, computer device 1300 may convert the size in bytes to a bandwidth value in Mbps: size _ mbps is size × 8/1024/1024/t/1000.
Step S204: and mapping each log to the bandwidth of the same time node, and adding to obtain the bandwidth of the live video counted by the time node.
Specifically, the computer device 1300 may map each log to the bandwidth of the same time node, and add up the bandwidth of the live video counted by the time node; therefore, the bandwidth values of all logs of the live video counted at each time node can be obtained; the whole calculation process does not need to split the logs, and the split sub-logs do not need to be stored respectively, so that the purposes of saving the storage space of the logs, accelerating the calculation speed and enhancing the readability of the logs are achieved.
Example two
Fig. 5 is a block diagram schematically illustrating a bandwidth statistics system for live video according to a second embodiment of the present application, which may be partitioned into one or more program modules, stored in a storage medium and executed by one or more processors to implement the second embodiment of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments of the present application.
As shown in fig. 5, an internal structure of the bandwidth statistics system for live video may include: a log obtaining module 501, a time length mapping module 502, a bandwidth mapping module 503 and a bandwidth statistics module 504, wherein:
the log obtaining module 501 is configured to obtain at least one log of a live video;
the time length mapping module 502 is configured to calculate a time length of mapping of each obtained log at least one time node corresponding to the log; specifically, for the currently acquired log, the time length mapping module 502 determines the time node related to the log according to the start timestamp and the end timestamp of the log; and for each time node to which the log relates, calculating the length of time that the log maps to that time node.
When calculating the time length of the log mapped to the time node, the time length mapping module 502 is configured to, for a time node time _ node satisfying the first condition, map the log to the time node with a time length of time _ length ═ time _ node + t-start _ time; for a time node time _ node satisfying the following second condition, the time length of the log mapped to the time node is t; for a time node time _ node satisfying a third condition that the time length of the log mapped to the time node is end _ time-time _ node; for a time node time _ node satisfying the fourth condition, the time length of the log mapped to the time node is time _ node > -end _ time-t, and time _ node < -start _ time;
wherein the first condition is: time _ node > -start _ time-t, and time _ node < -start _ time, and time _ node < -end _ time-t;
the second condition is: time _ node > -start _ time, and time _ node < -end _ time-t;
the third condition is: time _ node > -start _ time, and time _ node < -end _ time;
the fourth condition is that: time _ node > -end _ time-t, and time _ node < -start _ time;
the bandwidth mapping module 503 is configured to calculate a bandwidth mapped by each log at the at least one time node according to the calculated time length; specifically, for each time node related to the currently acquired log, the bandwidth mapping module 503 calculates the bandwidth mapped by the log at the time node according to the length of time mapped by the log at the time node, the number of bytes transmitted and the connection establishment duration recorded by the log.
The bandwidth counting module 504 is configured to map each log to the bandwidth of the same time node, and add the bandwidths to obtain the bandwidth of the live video counted by the time node.
The bandwidth counting system for the live video, provided by the embodiment of the application, can count the bandwidth value of the live video at each time node on the premise that the logs are not split and the split sub-logs are not respectively stored, so that the purposes of saving log storage space, accelerating calculation and enhancing log readability in the process of calculating the bandwidth value are achieved.
EXAMPLE III
Fig. 6 schematically shows a hardware architecture diagram of a computer device 1300 adapted to implement a bandwidth statistics method for live video according to a third embodiment of the present application. In this embodiment, the computer device 1300 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set in advance or stored. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown in fig. 6, computer device 1300 includes at least, but is not limited to: memory 1310, processor 1320, network interface 1330 may be communicatively linked to each other via a system bus. Wherein:
the memory 1310 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 1310 may be an internal storage module of the computer device 1300, such as a hard disk or memory of the computer device 1300. In other embodiments, the memory 1310 may also be an external storage device of the computer device 1300, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 1300. Of course, memory 1310 may also include both internal and external memory modules of computer device 1300. In this embodiment, the memory 1310 is generally used for storing program codes of various application software, such as bandwidth statistics of live video, and the like, and an operating system installed in the computer device 1300. In addition, the memory 1310 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 1320 may be, in some embodiments, a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip. The processor 1320 is generally configured to control the overall operation of the computer device 1300, such as performing control and processing related to data interaction or communication with the computer device 1300. In this embodiment, the processor 1320 is used to execute program codes stored in the memory 1310 or process data.
Network interface 1330 may comprise a wireless network interface or a wired network interface, with network interface 1330 typically being used to establish communication links between computer device 1300 and other computer devices. For example, the network interface 1330 is used to connect the computer device 1300 to an external terminal via a network, establish a data transmission channel and a communication link between the computer device 1300 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It should be noted that FIG. 6 only shows a computer device having components 1310 and 1330, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the overdraw test method based on color feature recognition stored in the memory 1310 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 1320) to complete the embodiment of the present application.
Example four
The embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the bandwidth statistics method for live video in the embodiments are implemented.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various types of application software installed in the computer device, for example, the program code of the bandwidth statistics method of the live video in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (11)

1. A bandwidth statistical method of a live video is characterized by comprising the following steps:
acquiring at least one log of a live video;
calculating the mapping time length of each acquired log in at least one time node corresponding to the log;
calculating the bandwidth of each log mapped at the at least one time node according to the calculated time length;
and mapping each log to the bandwidth of the same time node, and adding to obtain the bandwidth of the live video counted by the time node.
2. The method according to claim 1, wherein the calculating a time length of mapping of each obtained log at least one time node corresponding to the log specifically includes:
for the currently acquired log, determining at least one time node related to the log according to the starting timestamp and the ending timestamp of the log; and are
For each time node to which the log relates, the length of time that the log maps to that time node is calculated.
3. The method of claim 2, wherein the calculating the length of time that the log is mapped to the time node specifically comprises:
for the time node meeting the first condition, the time length of the log mapped to the time node is equal to the sum of the time node and the set time granularity minus the starting timestamp of the log;
wherein, the time nodes meeting the first condition are: and the time node is greater than or equal to the difference between the start timestamp of the log and the set time granularity, is less than or equal to the start timestamp of the log, and is less than or equal to the difference between the end timestamp of the log and the set time granularity.
4. The method of claim 2, wherein the calculating the length of time that the log is mapped to the time node specifically comprises:
for the time node meeting the second condition, the time length of the log mapped to the time node is equal to the set time granularity;
wherein, the time nodes meeting the second condition are: and the time node is greater than or equal to the starting timestamp of the log and less than or equal to the difference between the ending timestamp of the log and the set time granularity.
5. The method of claim 2, wherein the calculating the length of time that the log is mapped to the time node specifically comprises:
for a time node satisfying a third condition, the length of time that the log is mapped to the time node is equal to the difference between the end timestamp of the log and the time node;
wherein, the time nodes meeting the third condition are: and the time node is greater than or equal to the starting time stamp of the log and less than or equal to the ending time stamp of the log.
6. The method of claim 2, wherein the calculating the length of time that the log is mapped to the time node specifically comprises:
for a time node satisfying the fourth condition, the length of time that the log is mapped to the time node is equal to the difference between the end timestamp and the start timestamp of the log;
wherein, the time nodes meeting the fourth condition are: and the time node is greater than or equal to the difference between the end timestamp of the log and the set time granularity and is less than or equal to the start timestamp of the log.
7. The method according to any one of claims 1 to 6, wherein the calculating the bandwidth mapped by each log at the at least one time node according to the calculated time length specifically comprises:
and for each time node related to the currently acquired log, calculating the bandwidth mapped by the log at the time node according to the time length mapped by the log at the time node, the transmission byte number and the connection duration recorded by the log.
8. The method according to any one of claims 2 to 6, wherein determining at least one time node to which the log relates based on the start timestamp and the end timestamp of the log comprises:
and determining the time node which is larger than the difference between the starting time stamp of the log and the set time granularity and smaller than the ending time stamp of the log as the time node related to the log.
9. A system for bandwidth statistics of live video, comprising:
the log acquisition module is used for acquiring at least one log of the live video;
the time length mapping module is used for calculating the mapping time length of each acquired log at least one time node corresponding to the log;
the bandwidth mapping module is used for calculating the bandwidth mapped by each log at the at least one time node according to the calculated time length;
and the bandwidth counting module is used for mapping each log to the bandwidth of the same time node and adding the logs to obtain the bandwidth of the live video counted by the time node.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor when executing the computer program is adapted to implement the steps of the bandwidth statistics method of live video of any of claims 1 to 8.
11. A computer-readable storage medium, having stored thereon a computer program which is executable by at least one processor to cause the at least one processor to perform the steps of the method for bandwidth statistics of live video according to any one of claims 1 to 8.
CN202111136038.8A 2021-09-27 2021-09-27 Bandwidth statistics method and system for live video Active CN113891174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111136038.8A CN113891174B (en) 2021-09-27 2021-09-27 Bandwidth statistics method and system for live video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111136038.8A CN113891174B (en) 2021-09-27 2021-09-27 Bandwidth statistics method and system for live video

Publications (2)

Publication Number Publication Date
CN113891174A true CN113891174A (en) 2022-01-04
CN113891174B CN113891174B (en) 2023-09-29

Family

ID=79007041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111136038.8A Active CN113891174B (en) 2021-09-27 2021-09-27 Bandwidth statistics method and system for live video

Country Status (1)

Country Link
CN (1) CN113891174B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215816A1 (en) * 2012-08-14 2015-07-30 Ahmed Abou-Elkheir System and method for efficient use of network bandwidth based on user profiles and other data
CN106302020A (en) * 2016-08-18 2017-01-04 上海帝联信息科技股份有限公司 Network bandwidth statistical method and device
CN108111844A (en) * 2017-12-27 2018-06-01 北京奇艺世纪科技有限公司 A kind of monitoring method of Video service quality, apparatus and system
CN110569222A (en) * 2019-08-23 2019-12-13 浙江大搜车软件技术有限公司 link tracking method and device, computer equipment and readable storage medium
US20200042424A1 (en) * 2018-08-03 2020-02-06 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus and system for processing log data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215816A1 (en) * 2012-08-14 2015-07-30 Ahmed Abou-Elkheir System and method for efficient use of network bandwidth based on user profiles and other data
CN106302020A (en) * 2016-08-18 2017-01-04 上海帝联信息科技股份有限公司 Network bandwidth statistical method and device
CN108111844A (en) * 2017-12-27 2018-06-01 北京奇艺世纪科技有限公司 A kind of monitoring method of Video service quality, apparatus and system
US20200042424A1 (en) * 2018-08-03 2020-02-06 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus and system for processing log data
CN110569222A (en) * 2019-08-23 2019-12-13 浙江大搜车软件技术有限公司 link tracking method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN113891174B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN111031376B (en) Bullet screen processing method and system based on WeChat applet
CN111490947B (en) Data packet sending method, data packet receiving method, system, equipment and medium
CN112836152B (en) Page rendering method, system, computer device and computer readable storage medium
CN111510789A (en) Video playing method, system, computer equipment and computer readable storage medium
CN112714365B (en) Video playing method and system
CN113115120A (en) Video slicing method and device, electronic equipment and storage medium
CN113891174B (en) Bandwidth statistics method and system for live video
CN111510790B (en) Video request method, system, computer device and computer readable storage medium
US20230106217A1 (en) Web-end video playing method and apparatus, and computer device
US20140215035A1 (en) Distribution of application components among devices
CN115412777A (en) Streaming media data transmission method, device and system
CN108200061B (en) Video file processing method, application server and computer readable storage medium
CN114610331A (en) Software installation method and system
CN113132324B (en) Sample identification method and system
CN114710692B (en) Multimedia file processing method and device
CN115190338B (en) Video preloading method and system
CN108810078B (en) Node selection method, terminal device and computer readable storage medium
CN115022278B (en) CDN processing method and system
CN112749398B (en) Data transmission channel control method and system
CN117743721A (en) Data processing method and device
CN115827915A (en) Bullet screen input recommendation method and system based on bullet screen heat degree
CN115190334A (en) State communication method, device, control equipment and readable storage medium
CN117729246A (en) Message processing method and system
CN116932318A (en) Method, apparatus and computer readable medium for data processing and transmission
CN117750052A (en) Resource source-returning scheduling method and device

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