Live video stream scheduling method and system based on big data

文档序号:1173040 发布日期:2020-09-18 浏览:8次 中文

阅读说明:本技术 基于大数据的直播视频流调度方法、系统 (Live video stream scheduling method and system based on big data ) 是由 郑琨 张晓卫 肖友能 侯卫华 张彪 于 2020-05-26 设计创作,主要内容包括:本发明提供一种基于大数据的直播视频流调度方法、系统,所述方法包括以下步骤:基于大数据处理模块接收播放器探针模块发送的心跳信息;基于大数据处理模块根据所述心跳信息计算各个CDN的实时带宽;基于大数据处理模块发送各个CDN的实时带宽至调度模块;基于大数据处理模块判断各个CDN的实时带宽是否超过预设带宽阈值;当CDN的实时带宽未超过预设带宽阈值时,继续将播放器的播放请求调度到原CDN;当CDN的实时带宽超过预设带宽阈值时,将播放器的播放请求调度到备用CDN。本发明的基于大数据的直播视频流调度方法、系统,用于通过大数据的实时统计精确计算CDN的实时带宽并实现CDN的调度,节约带宽计费成本,实现直播运营成本的降低。(The invention provides a live video stream scheduling method and system based on big data, wherein the method comprises the following steps: receiving heartbeat information sent by a player probe module based on a big data processing module; calculating real-time bandwidth of each CDN based on a big data processing module according to the heartbeat information; sending the real-time bandwidth of each CDN to a scheduling module based on a big data processing module; judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value or not based on a big data processing module; when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN; and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN. The live video stream scheduling method and system based on the big data are used for accurately calculating the real-time bandwidth of the CDN through real-time statistics of the big data and achieving scheduling of the CDN, so that bandwidth charging cost is saved, and live operation cost is reduced.)

1. A live video stream scheduling method based on big data is characterized by comprising the following steps:

receiving heartbeat information sent by a player probe module based on a big data processing module; calculating real-time bandwidth of each CDN based on a big data processing module according to the heartbeat information; sending the real-time bandwidth of each CDN to a scheduling module based on a big data processing module;

judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value or not based on the big data processing module;

when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN;

and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

2. The big-data-based live video stream scheduling method according to claim 1, wherein heartbeat information sent by a player probe module is received at the big-data-based processing module, and the heartbeat information includes: the method also comprises the following steps of before the user identification, the playing address and the time stamp:

monitoring whether the signal source fails or not according to a preset frequency based on a signal source monitoring module;

when the signal source fails, the signal source monitoring module sends a signal source identifier and a channel number which fail to a configuration management module;

judging whether a signal source corresponding to the signal source identifier with the fault is in use or not based on a configuration management module, selecting an available signal source as a main signal source to replace the signal source with the fault when the signal source is in use, and sending configuration information of the main signal source to a scheduling module;

and updating a configuration table according to the configuration information of the main signal source based on a scheduling module, and configuring the signal source for a user based on the configuration table.

3. The big-data-based live video stream scheduling method according to claim 1, wherein the heartbeat information includes: user identification, play address and timestamp.

4. The big-data-based live video stream scheduling method according to claim 3, wherein the calculating, by the big-data-based processing module, the real-time bandwidth of each CDN according to the heartbeat information includes:

calculating the number of independent users of each CDN within a preset time interval based on the user identification, the playing address and the timestamp;

and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate.

5. The big-data-based live video stream scheduling method according to claim 1, wherein the calculating, by the big-data-based processing module, the real-time bandwidth of each CDN according to the heartbeat information includes:

acquiring heartbeat information in real time through a message queue;

calculating to obtain the real-time bandwidth of each CDN by a real-time calculation engine based on the heartbeat information of the message queue;

and caching the real-time bandwidth of each CDN.

6. A live video stream scheduling system based on big data is characterized by comprising: the device comprises a player probe module, a big data processing module and a big data processing module;

the big data processing module is used for receiving heartbeat information sent by the player probe module; the big data processing module is used for calculating the real-time bandwidth of each CDN according to the heartbeat information; sending the real-time bandwidth of each CDN to a scheduling module based on a big data processing module;

the big data processing module is used for judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value;

when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN;

and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

7. The big data based live video stream scheduling system according to claim 6, further comprising: the system comprises a signal source monitoring module and a configuration management module;

the signal source monitoring module is used for monitoring whether the signal source fails according to a preset frequency;

when the signal source fails, the signal source monitoring module sends a signal source identifier and a channel number which fail to a configuration management module;

the configuration management module is used for judging whether a signal source corresponding to the signal source identifier with the fault is in use, selecting an available signal source as a main signal source to replace the signal source with the fault when the signal source is in use, and sending configuration information of the main signal source to the scheduling module;

the scheduling module is used for updating a configuration table according to the configuration information of the main signal source and configuring the signal source for the user based on the configuration table.

8. The big data based live video stream scheduling system according to claim 6, wherein the heartbeat information comprises: user identification, play address and timestamp.

9. The big-data-based live video stream scheduling system according to claim 8, wherein the big-data processing module is configured to calculate real-time bandwidths of the CDNs according to the heartbeat information, and includes:

calculating the number of independent users of each CDN within a preset time interval based on the user identification, the playing address and the timestamp;

and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate.

10. The big-data-based live video stream scheduling system according to claim 6, wherein the big-data processing module is configured to calculate real-time bandwidths of the CDNs according to the heartbeat information;

acquiring heartbeat information in real time through a message queue;

calculating to obtain the real-time bandwidth of each CDN by a real-time calculation engine based on the heartbeat information of the message queue;

and caching the real-time bandwidth of each CDN.

Technical Field

The invention relates to the technical field of live video streaming, in particular to a live video streaming scheduling method and system based on big data.

Background

With the increasing proliferation of internet live broadcast streaming media, mainstream media represented by radio and television also transmit various live video streams on the internet. In order to ensure disaster recovery of a live broadcast system, a live broadcast streaming media service provider usually establishes two (i.e., primary and standby) signal sources, and switches the signal sources to a backup signal source when the primary signal source fails, so as to implement disaster recovery of the system. But this process is typically accomplished by the operation and maintenance personnel manually switching the source site address in the cdn (content Delivery network) configuration. Manual operation carries the risk of additional operator error, especially in a stressful environment where the failure needs to be resolved immediately. The invention provides a live video stream scheduling method based on big data to solve the problem.

CDN service providers typically have two charging policies: charging is according to the flow and the peak bandwidth respectively, and charging with a large charging preference is generally carried out according to the peak bandwidth. On the other hand, since the time periods during which the user watches live are approximately the same, the live video traffic usually fluctuates regularly at different time periods each day, for example, the working hours of a working day are usually low, 6 to 9 pm each day and holidays are peak. Under the condition, if the scheduling can be realized according to the actual flow of the CDN, the peak clipping and valley leveling of the flow is realized to ensure that the change of the bandwidth in different time periods is as smooth as possible, and the cost of the CDN flow is greatly reduced by adopting a bandwidth preferential charging mode. For the method of traffic scheduling in multiple CDNs, the traffic is generally scheduled according to historical fluctuation data, and firstly, the method is very inaccurate, and the traffic threshold value is often adjusted, so that the traffic scheduling effect is limited. If accurate traffic scheduling is to be realized, accurate grasp on traffic distribution data needs to be established.

It is therefore desirable to be able to solve the problem of how to implement scheduling for live video streams while saving bandwidth charging costs.

Disclosure of Invention

In view of the above disadvantages of the prior art, an object of the present invention is to provide a live video stream scheduling method and system based on big data, so as to solve the problem of how to implement scheduling on a live video stream while saving bandwidth charging cost in the prior art.

In order to achieve the above objects and other related objects, the present invention provides a live video stream scheduling method based on big data, including the following steps: receiving heartbeat information sent by a player probe module based on a big data processing module; calculating real-time bandwidth of each CDN based on a big data processing module according to the heartbeat information; sending the real-time bandwidth of each CDN to a scheduling module based on a big data processing module; judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value or not based on the big data processing module; when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN; and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

In an embodiment of the present invention, the big data processing module receives heartbeat information sent by the player probe module, where the heartbeat information includes: the method also comprises the following steps of before the user identification, the playing address and the time stamp: monitoring whether the signal source fails or not according to a preset frequency based on a signal source monitoring module; when the signal source fails, the signal source monitoring module sends a signal source identifier and a channel number which fail to a configuration management module; judging whether a signal source corresponding to the signal source identifier with the fault is in use or not based on a configuration management module, selecting an available signal source as a main signal source to replace the signal source with the fault when the signal source is in use, and sending configuration information of the main signal source to a scheduling module; and updating a configuration table according to the configuration information of the main signal source based on a scheduling module, and configuring the signal source for a user based on the configuration table.

In an embodiment of the present invention, the heartbeat information includes: user identification, play address and timestamp.

In an embodiment of the present invention, the calculating, by the big-data-based processing module according to the heartbeat information, the real-time bandwidth of each CDN includes: calculating the number of independent users of each CDN within a preset time interval based on the user identification, the playing address and the timestamp; and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate.

In an embodiment of the present invention, the calculating, by the big-data-based processing module according to the heartbeat information, the real-time bandwidth of each CDN includes: acquiring heartbeat information in real time through a message queue; calculating to obtain the real-time bandwidth of each CDN by a real-time calculation engine based on the heartbeat information of the message queue; and caching the real-time bandwidth of each CDN.

In order to achieve the above object, the present invention further provides a live video stream scheduling system based on big data, including: the device comprises a player probe module, a big data processing module and a big data processing module; the big data processing module is used for receiving heartbeat information sent by the player probe module; the big data processing module is used for calculating the real-time bandwidth of each CDN according to the heartbeat information; sending the real-time bandwidth of each CDN to a scheduling module based on a big data processing module; the big data processing module is used for judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value; when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN; and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

In an embodiment of the present invention, the method further includes: the system comprises a signal source monitoring module and a configuration management module; the signal source monitoring module is used for monitoring whether the signal source fails according to a preset frequency; when the signal source fails, the signal source monitoring module sends a signal source identifier and a channel number which fail to a configuration management module; the configuration management module is used for judging whether a signal source corresponding to the signal source identifier with the fault is in use, selecting an available signal source as a main signal source to replace the signal source with the fault when the signal source is in use, and sending configuration information of the main signal source to the scheduling module; the scheduling module is used for updating a configuration table according to the configuration information of the main signal source and configuring the signal source for the user based on the configuration table.

In an embodiment of the present invention, the heartbeat information includes: user identification, play address and timestamp.

In an embodiment of the present invention, the calculating, by the big data processing module, the real-time bandwidth of each CDN according to the heartbeat information includes: calculating the number of independent users of each CDN within a preset time interval based on the user identification, the playing address and the timestamp; and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate.

In an embodiment of the present invention, the big data processing module is configured to calculate real-time bandwidth of each CDN according to the heartbeat information; acquiring heartbeat information in real time through a message queue; calculating to obtain the real-time bandwidth of each CDN by a real-time calculation engine based on the heartbeat information of the message queue; and caching the real-time bandwidth of each CDN.

As described above, the live video stream scheduling method and system based on big data of the present invention have the following beneficial effects: the method and the device are used for accurately calculating the real-time bandwidth of the CDN through real-time statistics of big data and realizing scheduling of the CDN, so that the bandwidth charging cost is saved, and the live broadcast operation cost is reduced.

Drawings

FIG. 1a is a flow chart illustrating a big data based live video stream scheduling method according to an embodiment of the present invention;

FIG. 1b is a flow chart illustrating a big data based live video stream scheduling method according to another embodiment of the present invention;

FIG. 2a is a schematic diagram illustrating an embodiment of a big data based live video stream scheduling system according to the present invention;

FIG. 2b is a schematic diagram illustrating an embodiment of a big-data-based live video stream scheduling system according to the present invention; .

Description of the element reference numerals

21 signal source monitoring module

22 configuration management module

23 scheduling module

24 big data processing module

25 Player probe module

Detailed Description

The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.

It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, so that the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, the type, quantity and proportion of the components in actual implementation can be changed freely, and the layout of the components can be more complicated.

According to the live video stream scheduling method and system based on the big data, the scheduling layer is established on the upper layer of the CDN, and the statistical analysis based on the big data technology is combined, so that accurate flow scheduling is realized.

As shown in fig. 1a, in an embodiment, the method for scheduling a live video stream based on big data of the present invention includes the following steps:

step S11, receiving heartbeat information sent by a player probe module based on a big data processing module; calculating real-time bandwidth of each CDN based on a big data processing module according to the heartbeat information; and sending the real-time bandwidth of each CDN to the scheduling module based on the big data processing module.

Specifically, the player probe module collects heartbeat information based on an Android Library program. The heartbeat message is automatically sent to the big data acquisition program once every minute in the starting and playing states.

Specifically, the heartbeat information includes: user identification, play address and timestamp. The user identification refers to a unique identification for identifying the user identity. The playing address refers to an address of a live video stream currently being watched by the user. The timestamp refers to the real-time of acquiring the heartbeat information. The user uses the player to watch the live video stream.

Specifically, the calculating, by the big data processing module, the real-time bandwidth of each CDN according to the heartbeat information includes: calculating the number of independent users of each CDN within a preset time interval based on the user identification, the playing address and the timestamp; and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate. Because the number of users currently using the player can be counted based on the user identifier, the number of independent users of each CDN in a preset time interval can be calculated based on the timestamp. For example, if the preset time interval is 1 minute, the number of independent users of each CDN per minute may be calculated based on the user identifier, the play address, and the timestamp. The code rate required by each user is constant and is the average code rate, and the product of the number of independent users of each CDN and the average code rate is the real-time bandwidth of each CDN.

Specifically, the calculating, by the big data processing module, the real-time bandwidth of each CDN according to the heartbeat information includes: acquiring heartbeat information in real time through a message queue; calculating to obtain the real-time bandwidth of each CDN by a real-time calculation engine based on the heartbeat information of the message queue; and caching the real-time bandwidth of each CDN. Specifically, the heartbeat information is acquired in real time through a message queue (Kafka). And calculating the real-time bandwidth of each CDN by a real-time calculation engine (Spark) based on the heartbeat information of the message queue. A real-time computing engine (Spark) regularly pulls heartbeat information of a message queue (Kafka) from the message queue, and calculates the number of independent users of each CDN in a preset time interval based on user identification, a playing address and a timestamp; and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate. And caching the real-time bandwidth of each CDN to the Redis.

Step S12, determining whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold based on the scheduling module: when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN; and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

Specifically, CDN service providers typically have two charging policies: charging is according to the flow and the peak bandwidth respectively, and charging with a large charging preference is generally carried out according to the peak bandwidth. On the other hand, since the time periods during which the user watches live are approximately the same, the live video traffic usually fluctuates regularly at different time periods each day, for example, the working hours of a working day are usually low, 6 to 9 pm each day and holidays are peak. Under the condition, if the scheduling can be realized according to the actual flow of the CDN, the peak clipping and valley leveling of the flow is realized to ensure that the change of the bandwidth in different time periods is as smooth as possible, and the cost of the CDN flow is greatly reduced by adopting a bandwidth preferential charging mode. Namely, a mode of reducing the bandwidth peak value of each CDN has a large charging preferential. Since charging according to peak bandwidth is cheaper than charging according to traffic bandwidth, and the charge for peak bandwidth charging is determined by the peak value, reducing the peak value can reduce charging even further. Therefore, when the real-time bandwidth of the CDN does not exceed the preset bandwidth threshold, the playing request of the player continues to be scheduled to the original CDN; namely, the original CDN continues to accept the play request of the player without exceeding the preset bandwidth threshold. And when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN. So as to prevent the real-time bandwidth of the CDN from exceeding the preset bandwidth threshold, which increases the peak value of the bandwidth and increases the charging.

Specifically, the scheduling module is implemented by using a Spring Cloud Web program, and schedules the play request to the specified CDN through HTTP 302 response according to the live channel number requested by the user and the CDN real-time bandwidth data.

Specifically, receiving heartbeat information sent by a player probe module at the big data processing module, where the heartbeat information includes: the method also comprises the following steps of before the user identification, the playing address and the time stamp:

and monitoring whether the signal source fails or not according to a preset frequency based on the signal source monitoring module. Specifically, each signal source is provided with a signal source monitoring module, and the signal source monitoring module is configured to monitor whether the signal source fails according to a preset frequency, for example, the preset frequency is one minute, that is, the signal source monitoring module monitors whether the signal source fails every one minute. The fault comprises: whether the signal source cuts off the current or not, whether the fault such as screen blooming, current cutting-off and the like exists or not.

Specifically, the signal source monitoring module is deployed on all signal sources, and monitors whether the live code stream of the signal source has faults such as cut-off, screen splash, mosaic and the like in real time. And if the fault is detected, informing the configuration management module to replace the signal source.

And when the signal source fails, the signal source monitoring module sends the signal source identification and the channel number which fail to the configuration management module. Specifically, the signal source identifier is identification information for identifying the signal source, and the channel number is a channel number of a channel that the signal source can provide live broadcast.

And judging whether the signal source corresponding to the signal source identifier with the fault is in use or not based on a configuration management module, selecting an available signal source as a main signal source to replace the signal source with the fault when the signal source is in use, and sending configuration information of the main signal source to a scheduling module. Specifically, whether the signal source corresponding to the signal source identifier having the fault is in use means whether the signal source having the fault is in use for providing live broadcast for the player, and if the live broadcast is being provided, if the signal source having the fault is in use, an available signal source needs to be selected as a main signal source to replace the signal source having the fault. If live broadcast is not provided for the player, it is not required to be handled immediately now even if a failure occurs. Therefore, the signal source fault can be timely processed. Under the condition that a signal source of live broadcast video has a fault, the automatic and rapid switching of the signal source is realized, the live broadcast service is recovered as soon as possible, and the high reliability of a live broadcast system is realized.

Specifically, the configuration management module is implemented by a set of Spring Cloud Web programs, and is a set of network application programs for providing a parameter configuration operation interface for an operator. The configuration functions that are mainly implemented include: the method comprises the following steps of CDN manufacturer configuration, live channel library configuration, information source configuration, signal source and live channel correlation management, signal source automatic switching priority configuration, signal source manual switching, CDN flow distribution configuration, configuration information pushing and the like.

And updating a configuration table according to the configuration information of the main signal source based on a scheduling module, and configuring the signal source for a user based on the configuration table. The configuration information of the main signal source refers to the signal source identification and the channel number, so that the corresponding signal source can be configured for the user based on the request of the user. The updating of the configuration table according to the configuration information of the main signal source means that an available signal source is selected to replace a failed signal source to become the main signal source and is updated in the configuration table, so that when a request of a user is subsequently received, the corresponding signal source can be configured for the user according to the configuration table.

As shown in fig. 1b, in an embodiment, the method for scheduling a live video stream based on big data of the present invention includes the following steps:

specifically, step 1, monitoring a signal source according to a preset frequency based on a signal source monitoring module.

And 2, monitoring the signal source according to a preset frequency based on the signal source monitoring module and judging whether the signal source fails. And when the signal source has no fault, continuously monitoring the signal source according to a preset frequency and judging whether the signal source has the fault.

And 3, when the signal source fails, the signal source monitoring module sends the signal source identification and the channel number which fail to the configuration management module.

And 4, judging whether the signal source corresponding to the signal source identifier with the fault is in use based on a configuration management module.

And 5, when the signal source is in use, selecting an available signal source as a main signal source to replace the signal source with the fault.

And 6, sending the configuration information of the main signal source to a scheduling module.

And 7, updating a configuration table based on the scheduling module according to the configuration information of the main signal source, and configuring the signal source for the user based on the configuration table.

And 8, receiving heartbeat information sent by the player probe module based on the big data processing module.

And 9, carrying out duplicate removal statistics on users of all the CDNs based on the heartbeat information.

And step 10, calculating the number of independent users of each CDN in a preset time interval based on the heartbeat information.

And 11, calculating the real-time bandwidth of each CDN based on the big data processing module according to the heartbeat information.

And step 12, sending the real-time bandwidth of each CDN to a scheduling module based on the big data processing module.

And step 13, judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value based on the scheduling module.

And step 14, when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

And step 15, when the real-time bandwidth of the CDN does not exceed the preset bandwidth threshold, continuing to schedule the playing request of the player to the original CDN.

As shown in fig. 2a, in an embodiment, the system for scheduling live video stream based on big data of the present invention includes a player probe module, a big data processing module, and a big data processing module.

The big data processing module is used for receiving heartbeat information sent by the player probe module; the big data processing module is used for calculating the real-time bandwidth of each CDN according to the heartbeat information; sending the real-time bandwidth of each CDN to a scheduling module based on a big data processing module; the big data processing module is used for judging whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold value; when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN; and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

Specifically, the method further comprises the following steps: the system comprises a signal source monitoring module and a configuration management module; the signal source monitoring module is used for monitoring whether the signal source fails according to a preset frequency; when the signal source fails, the signal source monitoring module sends a signal source identifier and a channel number which fail to a configuration management module; the configuration management module is used for judging whether a signal source corresponding to the signal source identifier with the fault is in use, selecting an available signal source as a main signal source to replace the signal source with the fault when the signal source is in use, and sending configuration information of the main signal source to the scheduling module; the scheduling module is used for updating a configuration table according to the configuration information of the main signal source and configuring the signal source for the user based on the configuration table.

Specifically, the heartbeat information includes: user identification, play address and timestamp.

Specifically, the calculating, by the big data processing module, the real-time bandwidth of each CDN according to the heartbeat information includes: calculating the number of independent users of each CDN within a preset time interval based on the user identification, the playing address and the timestamp; and calculating to obtain the real-time bandwidth of each CDN based on the independent user number and the average code rate.

Specifically, the big data processing module is configured to calculate real-time bandwidth of each CDN according to the heartbeat information; acquiring heartbeat information in real time through a message queue; calculating to obtain the real-time bandwidth of each CDN by a real-time calculation engine based on the heartbeat information of the message queue; and caching the real-time bandwidth of each CDN.

As shown in fig. 2b, in an embodiment, the system for scheduling live video stream based on big data of the present invention includes: a player probe module 25, a big data processing module 24, a scheduling module 23, a signal source monitoring module 21 and a configuration management module 22. A signal source detection module is arranged in each signal source station, and the signal source monitoring module 21 monitors whether a signal source of the signal source station is in fault according to a preset frequency. When the signal source fails, the signal source monitoring module 21 sends the failed signal source identifier and channel number to the configuration management module 22. The configuration management module 22 determines whether the signal source corresponding to the failed signal source identifier is in use, and when the signal source is in use, selects an available signal source as a main signal source instead of the failed signal source, and sends the configuration information of the main signal source to the scheduling module 23. The configuration management module 22 provides a configuration operation interface for an operator, and pushes configuration information to the scheduling module 23. The main functions include: the method comprises the following functions of CDN manufacturer configuration, live channel library configuration, information source configuration, signal source and live channel correlation management, signal source automatic switching priority configuration, signal source manual switching, CDN flow distribution configuration and the like. And the scheduling module 23 of the scheduling server updates the configuration table according to the configuration information of the main signal source, and configures the signal source for the user based on the configuration table. Receiving heartbeat information sent by a player probe module 25 of the player based on the big data processing module 24; calculating the real-time bandwidth of each CDN according to the heartbeat information based on the big data processing module 24; and sending the real-time bandwidth of each CDN to a scheduling module 23 of the scheduling server based on the big data processing module 24. Based on the big data processing module 24, it is determined whether the real-time bandwidth of each CDN exceeds a preset bandwidth threshold: when the real-time bandwidth of the CDN does not exceed a preset bandwidth threshold, continuously scheduling the playing request of the player to the original CDN; and when the real-time bandwidth of the CDN exceeds a preset bandwidth threshold, scheduling the playing request of the player to the standby CDN.

It should be noted that the structures and principles of the player probe module 25, the big data processing module 24, the scheduling module 23, the signal source monitoring module 21, and the configuration management module 22 correspond to the steps in the live video stream scheduling method based on big data one to one, and therefore, the description is omitted here.

It should be noted that the division of the modules of the above system is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the x module may be a processing element that is set up separately, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the x module may be called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.

For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Specific Integrated circuits (ASICs), or one or more Microprocessors (MPUs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

In an embodiment of the present invention, the present invention further includes a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any of the above live video stream scheduling methods based on big data.

Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.

In summary, the live video stream scheduling method and system based on big data of the present invention are used to establish a scheduling layer on the upper layer of the CDN network, and implement accurate traffic scheduling in combination with statistical analysis based on big data technology. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.

The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:连麦时长确定方法、装置、服务器、终端及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类