CN109168011B - Network video live broadcast transfer equipment, transfer control system, method and medium - Google Patents
Network video live broadcast transfer equipment, transfer control system, method and medium Download PDFInfo
- Publication number
- CN109168011B CN109168011B CN201811045984.XA CN201811045984A CN109168011B CN 109168011 B CN109168011 B CN 109168011B CN 201811045984 A CN201811045984 A CN 201811045984A CN 109168011 B CN109168011 B CN 109168011B
- Authority
- CN
- China
- Prior art keywords
- live broadcast
- live
- network card
- video
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012546 transfer Methods 0.000 title claims abstract description 97
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000004891 communication Methods 0.000 claims abstract description 380
- 238000010295 mobile communication Methods 0.000 claims abstract description 94
- 238000004458 analytical method Methods 0.000 claims description 26
- 238000013507 mapping Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 5
- 230000002159 abnormal effect Effects 0.000 abstract description 5
- 238000012545 processing Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 208000003028 Stuttering Diseases 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/65—Transmission of management data between client and server
- H04N21/658—Transmission by the client directed to the server
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开一种网络视频直播中转设备、网络视频直播中转控制系统、方法和计算机可读存储介质,该网络视频直播中转控制方法应用于网络视频直播中转设备中,该网络视频直播中转设备包括与视频直播设备及直播服务器通信连接的移动通信模块,移动通信模块包括至少二个分别支持不同移动通信系统的网卡通信子模块;该网络视频直播中转控制方法包括:接收视频直播设备发送的视频直播数据流;按照预定的直播中转模式,利用至少二个分别支持不同移动通信系统的网卡通信子模块将视频直播数据流中转发送给直播服务器。本发明解决了网络视频直播过程的卡顿、中断等异常问题。
The invention discloses a network video live broadcast relay device, a network video live broadcast relay control system, a method and a computer-readable storage medium. The network video live broadcast relay control method is applied to the network video live broadcast relay device. The network video live broadcast relay device includes and A mobile communication module that is communicatively connected between a video live broadcast device and a live broadcast server, the mobile communication module includes at least two network card communication sub-modules that respectively support different mobile communication systems; the network video live broadcast relay control method includes: receiving live video broadcast data sent by the live video broadcast device Stream; according to the predetermined live broadcast transfer mode, use at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server. The invention solves the abnormal problems such as jamming and interruption during the live broadcast of the network video.
Description
技术领域technical field
本发明涉及通信技术领域,特别涉及一种网络视频直播中转设备、网络视频直播中转控制系统、网络视频直播中转方法和计算机可读存储介质。The present invention relates to the field of communication technologies, and in particular, to a network video live broadcast relay device, a network video live broadcast relay control system, a network video live broadcast relay method and a computer-readable storage medium.
背景技术Background technique
网络视频直播是指人们可以通过网络收看到远端正在进行的现场音视频实况,比如赛事、会议、教学、手术等等。网络视频直播的核心思想是利用既有的局域网、城域网甚至是万维网络条件实现对音视频信号的实时传输,并且能够在远端实现流畅的收看。Online video live broadcast means that people can watch live audio and video live at the remote end through the network, such as competitions, conferences, teaching, operations and so on. The core idea of online video live broadcast is to use the existing local area network, metropolitan area network and even World Wide Network conditions to realize real-time transmission of audio and video signals, and to achieve smooth viewing at the remote end.
随着传统互联网和移动互联网的不断发展,网络视频直播逐渐进入了普通用户的日常工作和生活之中,成为了人们日常生活和工作的一个重要的娱乐渠道和工作渠道。With the continuous development of traditional Internet and mobile Internet, online video live broadcast has gradually entered the daily work and life of ordinary users, and has become an important entertainment and work channel for people's daily life and work.
然而,现有的网络视频直播,尤其是户外网络视频直播,经常需要在无Wi-Fi信号或者Wi-Fi信号较弱的场景下进行,这种情况下需要采用便携式移动通信设备(例如,手机、平板电脑等)或者装有用户身份识别模块(Subscriber Identification Module,SIM)卡并可接入移动互联网的视频设备,但是在这种无Wi-Fi信号或者Wi-Fi信号较弱的场景下进行网络视频直播容易受到网络环境复杂、信号不稳定等问题困扰,直播过程中经常出现卡顿、中断等异常情况。However, existing network video live broadcasts, especially outdoor network video live broadcasts, often need to be performed in scenarios where there is no Wi-Fi signal or a weak Wi-Fi signal. In this case, a portable mobile communication device (for example, a mobile phone , tablet computer, etc.) or a video device equipped with a Subscriber Identification Module (SIM) card and connected to the mobile Internet, but in this scenario where there is no Wi-Fi signal or the Wi-Fi signal is weak Online video live broadcasts are easily plagued by problems such as complex network environments and unstable signals. Abnormal situations such as freezes and interruptions often occur during the live broadcast process.
发明内容SUMMARY OF THE INVENTION
本发明提供一种网络视频直播中转设备、网络视频直播中转控制系统、网络视频直播中转方法和计算机可读存储介质,旨在解决由于网络环境复杂、信号不稳定造成网络视频直播过程的卡顿、中断等异常问题。The present invention provides a network video live broadcast relay device, a network video live broadcast relay control system, a network video live broadcast relay method, and a computer-readable storage medium, aiming to solve the problems caused by the complex network environment and unstable signals in the network video live broadcast process. Abnormal problems such as interruptions.
为实现上述目的,本发明提出的网络视频直播中转设备,包括存储器、处理器,以及与视频直播设备及直播服务器通信连接的移动通信模块,所述移动通信模块包括至少二个分别支持不同移动通信系统的网卡通信子模块,所述存储器上存储有可在所述处理器上运行的网络视频直播中转控制程序,所述网络视频直播中转控制程序被所述处理器执行时实现如下方法:In order to achieve the above-mentioned purpose, the network video live broadcast relay equipment proposed by the present invention includes a memory, a processor, and a mobile communication module connected to the live video broadcast equipment and the live broadcast server in communication, and the mobile communication module includes at least two The network card communication sub-module of the system, the memory stores a live network video live relay control program that can be run on the processor, and the network video live broadcast relay control program is executed by the processor. The following method is implemented:
接收视频直播设备发送的视频直播数据流;Receive the live video data stream sent by the live video device;
按照预定的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。According to a predetermined live broadcast transfer mode, the video live broadcast data stream is forwarded to the live broadcast server by using the at least two network card communication sub-modules that respectively support different mobile communication systems.
优选地,所述网络视频直播中转控制程序被所述处理器执行时,还实现如下方法:Preferably, when the online video live broadcast relay control program is executed by the processor, the following method is also implemented:
接收用户发出的进入一个直播中转模式的控制指令,切换到所述控制指令指示的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Receive a control command sent by the user to enter a live broadcast transfer mode, switch to the live broadcast transfer mode indicated by the control command, and use the at least two network card communication sub-modules that support different mobile communication systems respectively to transfer the live video data stream. Sent to the live server.
优选地,所述网络视频直播中转控制程序被所述处理器执行时,还实现如下方法:Preferably, when the online video live broadcast relay control program is executed by the processor, the following method is also implemented:
根据预先确定的直播中转模式与启动时间点的映射关系,在一个直播中转模式对应的启动时间点到达时,切换到该直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。According to the predetermined mapping relationship between the live relay mode and the start time point, when the start time point corresponding to a live broadcast relay mode arrives, switch to the live broadcast relay mode, and use the at least two network cards that support different mobile communication systems to communicate with each other. The sub-module forwards the live video data stream to the live server.
优选地,所述网络视频直播中转控制程序被所述处理器执行时,还实现如下方法:Preferably, when the online video live broadcast relay control program is executed by the processor, the following method is also implemented:
根据预先确定的模式切换分析规则,实时或者定时分析是否切换直播中转模式。According to the pre-determined mode switching analysis rules, real-time or timing analysis whether to switch the live relay mode.
优选地,所述模式切换分析规则包括:Preferably, the mode switching analysis rules include:
判断当前负载是否大于或等于预设的第一负载阈值,若是,则确认切换直播中转模式;或,Determine whether the current load is greater than or equal to the preset first load threshold, and if so, confirm to switch the live relay mode; or,
判断当前负载是否小于预设的第二负载阈值,若是,则确认切换直播中转模式;或,Determine whether the current load is less than the preset second load threshold, and if so, confirm to switch the live relay mode; or,
判断是否存在一个网卡通信子模块的信号强度高于第一预设信号强度阈值,若是,则确认切换直播中转模式;或,Determine whether there is a network card communication sub-module whose signal strength is higher than the first preset signal strength threshold, and if so, confirm to switch the live relay mode; or,
判断各个网卡通信子模块的信号强度,若各个网卡通信子模块的信号强度均低于第二预设信号强度阈值,则确认切换直播中转模式。The signal strength of each network card communication sub-module is judged, and if the signal strength of each network card communication sub-module is lower than the second preset signal strength threshold, it is confirmed to switch the live relay mode.
优选地,所述直播中转模式包括第一直播中转模式,所述利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器的步骤包括:Preferably, the live broadcast relay mode includes a first live broadcast relay mode, and the step of using the at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server includes:
实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数,并将侦测到的各个预设类型通信参数分别与预设阈值比较;Detecting the preset type communication parameters of each of the network card communication sub-modules in real time or regularly, and comparing the detected preset type communication parameters with preset thresholds respectively;
若当前启用的网卡通信子模块的预设类型通信参数小于或者等于所述预设阈值,且当前未启用的网卡通信子模块中存在预设类型通信参数大于所述预设阈值的网卡通信子模块,则将侦测到的预设类型通信参数最大的网卡通信子模块作为待启用的网卡通信子模块;If the preset type communication parameter of the currently enabled network card communication sub-module is less than or equal to the preset threshold, and there is a network card communication sub-module whose preset type communication parameter is greater than the preset threshold in the currently disabled network card communication sub-module , the network card communication sub-module with the largest detected preset type communication parameter is used as the network card communication sub-module to be enabled;
关闭当前启用的网卡通信子模块,并启用所述待启用的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Turn off the currently enabled network card communication sub-module, and enable the to-be-enabled network card communication sub-module to forward the live video data stream to the live server.
优选地,所述直播中转模式包括第二直播中转模式,所述利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器的步骤包括:Preferably, the live broadcast transfer mode includes a second live broadcast transfer mode, and the step of using the at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server includes:
实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数;Detecting the preset type communication parameters of each of the network card communication sub-modules in real time or regularly;
根据侦测到的各个所述网卡通信子模块的预设类型通信参数的参数值比值关系,确定各个所述网卡通信子模块对应的中转百分比;According to the detected parameter value ratio relationship of the preset type communication parameters of each of the network card communication sub-modules, determine the transfer percentage corresponding to each of the network card communication sub-modules;
将所述视频直播数据流分割成各个所述网卡通信子模块对应的中转百分比的子数据流;Splitting the live video data stream into sub-data streams of the percentage of transit corresponding to each of the network card communication sub-modules;
驱动各个所述网卡通信子模块分别将对应的子数据流中转发送给直播服务器。Each of the network card communication sub-modules is driven to forward the corresponding sub-data stream to the live server respectively.
本发明还提出一种网络视频直播中转控制系统,所述网络视频直播中转控制系统包括至少一个网络视频直播中转设备,与所述网络视频直播中转设备通信连接的至少一个直播服务器,及与所述网络视频直播中转设备通信连接的至少一个视频直播设备;The present invention also provides a network video live broadcast relay control system. The network video live broadcast relay control system includes at least one network video live broadcast relay device, at least one live broadcast server communicatively connected to the network video live broadcast relay device, and connected to the network video live broadcast relay device. At least one live video device connected to the network video live relay device;
其中,所述网络视频直播中转设备包括存储器、处理器,以及与视频直播设备及直播服务器通信连接的移动通信模块,所述移动通信模块包括至少二个分别支持不同移动通信系统的网卡通信子模块,所述存储器上存储有可在所述处理器上运行的网络视频直播中转控制程序,所述网络视频直播中转控制程序被所述处理器执行时实现如下方法:Wherein, the network video live broadcast relay device includes a memory, a processor, and a mobile communication module that is communicatively connected to the video live broadcast device and the live broadcast server, and the mobile communication module includes at least two network card communication sub-modules that respectively support different mobile communication systems , the memory stores a network video live broadcast relay control program that can be run on the processor, and the network video live broadcast relay control program is executed by the processor. The following method is implemented:
接收视频直播设备发送的视频直播数据流;Receive the live video data stream sent by the live video device;
按照预定的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。According to a predetermined live broadcast transfer mode, the video live broadcast data stream is forwarded to the live broadcast server by using the at least two network card communication sub-modules that respectively support different mobile communication systems.
本发明还提出一种网络视频直播中转控制方法,所述网络视频直播中转控制方法应用于网络视频直播中转设备中,所述网络视频直播中转设备包括与视频直播设备及直播服务器通信连接的移动通信模块,所述移动通信模块包括至少二个分别支持不同移动通信系统的网卡通信子模块;所述网络视频直播中转控制方法包括:The present invention also provides a method for relay control of online video live broadcast. The method for relay control of online video live broadcast is applied to a network video live broadcast relay device. The network video live broadcast relay device includes a mobile communication device that is communicatively connected to the video live broadcast device and the live broadcast server. module, the mobile communication module includes at least two network card communication sub-modules that respectively support different mobile communication systems; the network video live broadcast relay control method includes:
接收视频直播设备发送的视频直播数据流;Receive the live video data stream sent by the live video device;
按照预定的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。According to a predetermined live broadcast transfer mode, the video live broadcast data stream is forwarded to the live broadcast server by using the at least two network card communication sub-modules that respectively support different mobile communication systems.
优选地,所述网络视频直播中转控制方法还包括:Preferably, the network video live broadcast relay control method further includes:
接收用户发出的进入一个直播中转模式的控制指令,切换到所述控制指令指示的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Receive a control command sent by the user to enter a live broadcast transfer mode, switch to the live broadcast transfer mode indicated by the control command, and use the at least two network card communication sub-modules that support different mobile communication systems respectively to transfer the live video data stream. Sent to the live server.
优选地,所述网络视频直播中转控制方法还包括:Preferably, the network video live broadcast relay control method further includes:
根据预先确定的直播中转模式与启动时间点的映射关系,在一个直播中转模式对应的启动时间点到达时,切换到该直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。According to the predetermined mapping relationship between the live relay mode and the start time point, when the start time point corresponding to a live broadcast relay mode arrives, switch to the live broadcast relay mode, and use the at least two network cards that support different mobile communication systems to communicate with each other. The sub-module forwards the live video data stream to the live server.
优选地,所述网络视频直播中转控制方法还包括:Preferably, the network video live broadcast relay control method further includes:
根据预先确定的模式切换分析规则,实时或者定时分析是否切换直播中转模式。According to the pre-determined mode switching analysis rules, real-time or timing analysis whether to switch the live relay mode.
优选地,所述模式切换分析规则包括:Preferably, the mode switching analysis rules include:
判断当前负载是否大于或等于预设的第一负载阈值,若是,则确认切换直播中转模式;或,Determine whether the current load is greater than or equal to the preset first load threshold, and if so, confirm to switch the live relay mode; or,
判断当前负载是否小于预设的第二负载阈值,若是,则确认切换直播中转模式;或,Determine whether the current load is less than the preset second load threshold, and if so, confirm to switch the live relay mode; or,
判断是否存在一个网卡通信子模块的信号强度高于第一预设信号强度阈值,若是,则确认切换直播中转模式;或,Determine whether there is a network card communication sub-module whose signal strength is higher than the first preset signal strength threshold, and if so, confirm to switch the live relay mode; or,
判断各个网卡通信子模块的信号强度,若各个网卡通信子模块的信号强度均低于第二预设信号强度阈值,则确认切换直播中转模式。The signal strength of each network card communication sub-module is judged, and if the signal strength of each network card communication sub-module is lower than the second preset signal strength threshold, it is confirmed to switch the live relay mode.
优选地,所述直播中转模式包括第一直播中转模式,所述利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器的步骤包括:Preferably, the live broadcast relay mode includes a first live broadcast relay mode, and the step of using the at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server includes:
实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数,并将侦测到的各个预设类型通信参数分别与预设阈值比较;Detecting the preset type communication parameters of each of the network card communication sub-modules in real time or regularly, and comparing the detected preset type communication parameters with preset thresholds respectively;
若当前启用的网卡通信子模块的预设类型通信参数小于或者等于所述预设阈值,且当前未启用的网卡通信子模块中存在预设类型通信参数大于所述预设阈值的网卡通信子模块,则将侦测到的预设类型通信参数最大的网卡通信子模块作为待启用的网卡通信子模块;If the preset type communication parameter of the currently enabled network card communication sub-module is less than or equal to the preset threshold, and there is a network card communication sub-module whose preset type communication parameter is greater than the preset threshold in the currently disabled network card communication sub-module , the network card communication sub-module with the largest detected preset type communication parameter is used as the network card communication sub-module to be enabled;
关闭当前启用的网卡通信子模块,并启用所述待启用的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Turn off the currently enabled network card communication sub-module, and enable the to-be-enabled network card communication sub-module to forward the live video data stream to the live server.
优选地,所述直播中转模式包括第二直播中转模式,所述利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器的步骤包括:Preferably, the live broadcast transfer mode includes a second live broadcast transfer mode, and the step of using the at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server includes:
实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数;Detecting the preset type communication parameters of each of the network card communication sub-modules in real time or regularly;
根据侦测到的各个所述网卡通信子模块的预设类型通信参数的参数值比值关系,确定各个所述网卡通信子模块对应的中转百分比;According to the detected parameter value ratio relationship of the preset type communication parameters of each of the network card communication sub-modules, determine the transfer percentage corresponding to each of the network card communication sub-modules;
将所述视频直播数据流分割成各个所述网卡通信子模块对应的中转百分比的子数据流;Splitting the live video data stream into sub-data streams of the percentage of transit corresponding to each of the network card communication sub-modules;
驱动各个所述网卡通信子模块分别将对应的子数据流中转发送给直播服务器。Each of the network card communication sub-modules is driven to forward the corresponding sub-data stream to the live server respectively.
本发明还提出一种计算机可读存储介质,所述计算机可读存储介质存储有网络视频直播中转控制程序,所述网络视频直播中转控制程序可被至少一个处理器执行,以使所述至少一个处理器执行如下方法:The present invention also provides a computer-readable storage medium, where the computer-readable storage medium stores a network video live broadcast relay control program, and the network video live broadcast relay control program can be executed by at least one processor, so that the at least one live broadcast relay control program can be executed by the at least one processor. The processor executes the following methods:
接收视频直播设备发送的视频直播数据流;Receive the live video data stream sent by the live video device;
按照预定的直播中转模式,利用至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。According to a predetermined live broadcast transfer mode, at least two network card communication sub-modules that respectively support different mobile communication systems are used to forward the video live broadcast data stream to the live broadcast server.
本发明技术方案,在网络视频直播中转设备中设置直播中转模式,网络视频直播中转设备可根据接收到用户发送的进入一个直播中转模块的控制指令,或者在预设的启动时间点到达,或者经预设的模式切换分析规则分析确认的方式,进入该直播中转模式;在进入该直播中转模式后,利用所述至少二个分别支持不同的网卡通信子模块将接收到的视频直播数据流中转发送给通信连接的直播服务器。相较于现有技术而言,本方案在无Wi-Fi信号或Wi-Fi信号较弱的场景时,网络视频直播中转设备可采用一个或多个网卡通信子模块对直播设备发送来的视频直播数据流进行中转,以发送至直播服务器,保证直播服务器的稳定流畅的直播;在一个移动通信系统的网卡通信子模块信号较弱的场景时,可通过驱动一个或多个其他不同移动通信系统的网卡子模块将直播设备发送来的视频直播数据流中转发送给直播服务器,以保证直播服务器的稳定流畅的直播;因此,本方案使得网络视频直播在各个场景下,都能保持网络视频直播的稳定流畅性,解决了网络视频直播容易受到网络环境复杂、信号不稳定等情况造成直播出现卡顿、中断等问题。According to the technical solution of the present invention, a live broadcast relay mode is set in the network video live broadcast relay device, and the network video live broadcast relay device can arrive at a preset start time point according to receiving a control instruction sent by a user to enter a live broadcast relay module, or via The preset mode switching analysis rule is analyzed and confirmed to enter the live broadcast transfer mode; after entering the live broadcast transfer mode, use the at least two communication sub-modules that support different network cards to transfer the received live video data stream. Live server for communication connection. Compared with the prior art, in the scenario where there is no Wi-Fi signal or the Wi-Fi signal is weak, the network video live broadcast relay device can use one or more network card communication sub-modules to transmit the video sent by the live broadcast device. The live data stream is relayed to be sent to the live server to ensure the stable and smooth live broadcast of the live server; in a scenario where the signal of the network card communication sub-module of a mobile communication system is weak, it can be driven by one or more other different mobile communication systems. The network card sub-module of the network card forwards the live video data stream sent by the live broadcast device to the live broadcast server, so as to ensure the stable and smooth live broadcast of the live broadcast server; therefore, this solution enables the live broadcast of the network video to maintain the quality of the live broadcast of the network video in various scenarios. Stable and smooth, it solves the problem that live broadcast is prone to stutter and interruption caused by complex network environment and unstable signal conditions.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained according to the structures shown in these drawings without creative efforts.
图1为本发明网络视频直播中转控制方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a method for relaying control of online video live broadcasting according to the present invention;
图2为本发明网络视频直播中转控制方法第二实施例的流程示意图;FIG. 2 is a schematic flowchart of a second embodiment of a method for relay control of live web video according to the present invention;
图3为本发明网络视频直播中转控制方法第三实施例的流程示意图;FIG. 3 is a schematic flowchart of a third embodiment of a method for relay control of live online video according to the present invention;
图4为本发明网络视频直播中转控制方法第四实施例的流程示意图;FIG. 4 is a schematic flowchart of a fourth embodiment of a method for relay control of online video live broadcasting according to the present invention;
图5为本发明网络视频直播中转控制方法第五实施例的流程示意图;FIG. 5 is a schematic flowchart of a fifth embodiment of a method for relay control of online video live broadcasting according to the present invention;
图6为本发明网络视频直播中转控制方法第六实施例的流程示意图;FIG. 6 is a schematic flowchart of a sixth embodiment of a method for relay control of live web video according to the present invention;
图7为本发明网络视频直播中转控制程序一实施例的运行环境示意图;FIG. 7 is a schematic diagram of the running environment of an embodiment of a network video live broadcast relay control program according to the present invention;
图8为本发明网络视频直播中转控制程序一实施例的程序模块图;8 is a program module diagram of an embodiment of a network video live broadcast relay control program according to the present invention;
图9本发明网络视频直播中转控制程序二实施例的程序模块图;Fig. 9 is the program module diagram of the second embodiment of the network video live broadcast relay control program of the present invention;
图10本发明网络视频直播中转控制程序三实施例的程序模块图。FIG. 10 is a program module diagram of the third embodiment of the relay control program for live broadcast of network video according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
以下结合附图对本发明的原理和特征进行描述,所举实例只用于解释本发明,并非用于限定本发明的范围。The principles and features of the present invention will be described below with reference to the accompanying drawings. The examples are only used to explain the present invention, but not to limit the scope of the present invention.
本发明提出一种网络视频直播中转控制方法,该网络视频直播中转控制方法应用于网络视频直播中转设备中,该网络视频直播中转设备包括移动通信模块,该移动通信模块分别与视频直播设备和直播服务器通信连接;其中,移动通信模块是通过移动通信基站(移动通信基站指的是无线电台站的一种形式,是指在一定的无线电覆盖区中,通过移动通信交换中心,与移动通信设备之间进行信息传递的无线电收发信电台)与直播服务器通信连接的。该移动通信模块包括至少二个分别支持不同移动通信系统的网卡通信子模块(例如,所述移动通信模块可以包括支持第一移动通信运营商(例如,中国移动通信集团公司)运营的移动通信网络的网卡通信子模块(例如,4G网卡通信子模块,即支持第四代移动通信技术的网卡通信子模块),支持第二移动通信运营商(例如,中国联合网络通信集团有限公司)运营的移动通信网络的网卡通信子模块,支持第三移动通信运营商(例如,中国电信集团有限公司)运营的移动通信网络的网卡通信子模块)。网络视频直播中转设备与视频直播设备之间为短距离无线通信,比如通过Wi-Fi(即网络视频直播中转设备开热点给视频直播设备使用)、蓝牙、NFC、zigbee等方式通信,即所述移动通信模块中还包括有上述的至少一种近场通信方式对应的模块。The present invention provides a network video live broadcast relay control method. The network video live broadcast relay control method is applied to a network video live broadcast relay device. The network video live broadcast relay device includes a mobile communication module. The mobile communication module is respectively connected with the video live broadcast device and the live broadcast device. Server communication connection; among them, the mobile communication module is connected with the mobile communication equipment through the mobile communication base station (mobile communication base station refers to a form of radio station, which means that in a certain radio coverage area, through the mobile communication switching center) A radio transceiver station that transmits information between them) is communicatively connected to the live broadcast server. The mobile communication module includes at least two network card communication sub-modules that respectively support different mobile communication systems (for example, the mobile communication module may include a mobile communication network that supports the operation of a first mobile communication operator (for example, China Mobile Communications Corporation) The network card communication sub-module (for example, the 4G network card communication sub-module, that is, the network card communication sub-module that supports the fourth generation mobile communication technology), supports the mobile communication operated by the second mobile communication operator (for example, China United Network Communication Group Co., Ltd. The network card communication sub-module of the communication network supports the network card communication sub-module of the mobile communication network operated by a third mobile communication operator (for example, China Telecom Group Co., Ltd.). There is short-distance wireless communication between the network video live broadcast relay device and the video live broadcast device, such as communication through Wi-Fi (that is, the network video live broadcast relay device opens a hotspot for the video broadcast device to use), Bluetooth, NFC, zigbee, etc. The mobile communication module further includes a module corresponding to at least one of the above-mentioned near field communication methods.
如图1所示,图1为本发明网络视频直播中转控制方法第一实施例的流程示意图。As shown in FIG. 1 , FIG. 1 is a schematic flowchart of a first embodiment of a method for relay control of a live online video broadcast according to the present invention.
本实施例中,该网络视频直播中转控制方法包括:In this embodiment, the network video live broadcast relay control method includes:
步骤S10,网络视频直播中转设备接收视频直播设备发送的视频直播数据流。In step S10, the live video live relay device receives the live video data stream sent by the live video device.
步骤S20,网络视频直播中转设备按照预定的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Step S20, the network video live broadcast relay device forwards the live video data stream to the live broadcast server by using the at least two network card communication sub-modules that respectively support different mobile communication systems according to a predetermined live broadcast relay mode.
网络视频直播中转设备具有至少一种预定的直播中转模式,本实施例中,使网络视频直播中转设备在预定的直播中转模式下工作,按照该预定的直播中转模式,利用所述至少二个分别支持不同的网卡通信子模块将接收到的视频直播数据流中转发送给通信连接的直播服务器,可为按照该直播中转模式驱动一个或者多个网卡通信子模块工作,将接收到的视频直播数据流中转发送给通信连接的直播服务器。The network video live broadcast relay device has at least one predetermined live broadcast relay mode. In this embodiment, the network video live broadcast relay device is made to work in the predetermined live broadcast relay mode. According to the predetermined live broadcast relay mode, the at least two live broadcast relay modes are used. Support different network card communication sub-modules to forward the received live video data stream to the live server of the communication connection, which can drive one or more network card communication sub-modules to work according to the live relay mode, and transfer the received live video data stream. It is relayed to the live server of the communication connection.
如图2所示,图2为本发明网络视频直播中转控制方法第二实施例的流程示意图。As shown in FIG. 2 , FIG. 2 is a schematic flowchart of a second embodiment of a method for relaying control of live web video according to the present invention.
本实施例中,该网络视频直播中转控制方法还包括:In this embodiment, the network video live broadcast relay control method further includes:
步骤S30,网络视频直播中转设备接收用户发出的进入一个直播中转模式的控制指令,切换到所述控制指令指示的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Step S30, the network video live relay device receives the control instruction sent by the user to enter a live relay mode, switches to the live relay mode indicated by the control instruction, and utilizes the at least two network card communication sub-modules that support different mobile communication systems respectively. The live video data stream is forwarded to the live server.
当用户要网络直播视频中转设备进入某一个直播中转模式进行工作时,用户则向网络视频直播中转设备发送进入该直播中转模式的控制指令,网络视频直播中转设备接收到该控制指令后,则切换到该直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。When the user wants the network live video relay device to enter a certain live broadcast relay mode to work, the user sends a control command to enter the live broadcast relay mode to the network video live relay device. After the network video live relay device receives the control command, it switches to In the live broadcast transfer mode, the video live broadcast data stream is forwarded to the live broadcast server by using the at least two network card communication sub-modules that respectively support different mobile communication systems.
如图3所示,图3为本发明网络视频直播中转控制方法第三实施例的流程示意图。As shown in FIG. 3 , FIG. 3 is a schematic flowchart of a third embodiment of a method for relay control of live online video according to the present invention.
本实施例中,该网络视频直播中转控制方法还包括:In this embodiment, the network video live broadcast relay control method further includes:
步骤S40,根据预先确定的直播中转模式与启动时间点的映射关系,在一个直播中转模式对应的启动时间点到达时,切换到该直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。Step S40, according to the predetermined mapping relationship between the live broadcast relay mode and the start time point, when a start time point corresponding to a live broadcast relay mode arrives, switch to the live broadcast relay mode, and use the at least two to support different mobile communication systems respectively. The network card communication sub-module forwards the live video data stream to the live server.
网络视频直播中转设备中存有预先确定的直播中转模式与启动时间点的映射关系表(例如,第一启动时间点T1对应直播中转模式A,第二启动时间点T2对应直播中转模式B,第三启动时间点T3对应直播中转模式C)。当一个启动时间点到达时,网络视频直播中转设备通过查询直播中转模式与启动时间点的映射关系表,确定当前启动时间点对应的直播中转模式,网络视频直播中转设备切换到该确定的直播中转模块,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。The network video live broadcast relay device stores a predetermined mapping relationship table between the live broadcast relay mode and the start time point (for example, the first start time point T1 corresponds to the live broadcast relay mode A, the second start time point T2 corresponds to the live broadcast relay mode B, and the first start time point T2 corresponds to the live broadcast relay mode B. The third activation time point T3 corresponds to the live broadcast relay mode C). When a start time point arrives, the online video live broadcast relay device determines the live broadcast relay mode corresponding to the current start time point by querying the mapping relationship table between the live broadcast relay mode and the start time point, and the network video live broadcast relay device switches to the determined live broadcast relay. A module, using the at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server.
如图4所示,图4为本发明网络视频直播中转控制方法第四实施例的流程示意图。As shown in FIG. 4 , FIG. 4 is a schematic flowchart of a fourth embodiment of a method for relay control of live online video broadcasting according to the present invention.
本实施例中,该网络视频直播中转控制方法还包括:In this embodiment, the network video live broadcast relay control method further includes:
步骤S50,网络视频直播设备根据预先确定的模式切换分析规则,实时或者定时分析是否切换直播中转模式。Step S50, the network video live broadcast device analyzes whether to switch the live broadcast relay mode in real time or regularly according to a predetermined mode switching analysis rule.
网络视频直播中转设备中预先确定了一套模式切换分析规则,网络视频直播中转设备根据该模式切换分析规则实时或者定时分析是否要切换直播中转模式。A set of mode switching analysis rules is pre-determined in the network video live broadcast transfer device, and the network video live broadcast transfer device analyzes whether to switch the live broadcast transfer mode in real time or regularly according to the mode switch analysis rules.
本实施例中,所述模式切换分析规则可以为包括:In this embodiment, the mode switching analysis rule may include:
判断当前负载是否大于或等于预设负载阈值,若是,则确认切换直播中转模式;Determine whether the current load is greater than or equal to the preset load threshold, and if so, confirm to switch the live relay mode;
判断当前负载是否小于预设的第二负载阈值,若是,则确认切换直播中转模式;其中,第二负载阈值可小于第一负载阈值;Determine whether the current load is less than a preset second load threshold, and if so, confirm to switch the live relay mode; wherein, the second load threshold may be less than the first load threshold;
或,判断是否存在一个网卡通信子模块的信号强度高于第一预设信号强度阈值,若是,则确认切换直播中转模式;Or, determine whether there is a network card communication sub-module whose signal strength is higher than the first preset signal strength threshold, and if so, confirm to switch the live relay mode;
或,判断各个网卡通信子模块的信号强度,若各个网卡通信子模块的信号强度均低于第二预设信号强度阈值,则确认切换直播中转模式;其中,第二预设信号强度阈值可小于第一预设信号强度阈值。Or, judging the signal strength of each network card communication sub-module, if the signal strength of each network card communication sub-module is lower than the second preset signal strength threshold, then confirm to switch the live relay mode; wherein, the second preset signal strength threshold may be less than The first preset signal strength threshold.
负载可以为单位时间内需要转发的数据量,网络视频直播中转设备能够同时支持多个视频直播设备同时进行直播。The load can be the amount of data that needs to be forwarded per unit time, and the network video live broadcast relay device can support multiple video live broadcast devices to perform live broadcast at the same time.
网络视频直播中转设备若分析确认要切换直播中转模式,则切换到对应的直播中转模式。If the network video live broadcast relay device is confirmed to be switched to the live broadcast relay mode after analysis, it will switch to the corresponding live broadcast relay mode.
例如,网络视频直播中转设备可以设置默认的直播中转模式为常规模式(可以是后文描述的第一直播中转模式),在常规模式下,网络视频直播中转设备可选择信号较佳的一路进行数据转发,在分析确认当前使用的网卡通信子模块信号不佳时,网络视频直播中转设备则切换到信号更佳的网卡通信子模块进行转发。或者,例如,在当前负载较大(比如当前负载是否大于或等于预设的第一负载阈值)时,或各个网卡通信子模块的信号均不佳(比如各个网卡通信子模块的信号强度均低于第二预设信号强度阈值)时,任何一个网卡通信子模块的转发数据能力均不能满足当前数据转发要求,网络视频直播中转设备则切换到另一个直播中转模式(可以是后文描述的第二直播中转模式),切换到同时启用多个(例如2个、3个)网卡通信子模块共同进行数据转发,以满足当前数据转发要求,各个网卡通信子模块各自承担的数据转发量可以根据每个网卡通信子模块的信号强度(可通过通信参数值直观反映)动态分配,实现负载均衡。For example, the network video live broadcast relay device can set the default live broadcast relay mode to the normal mode (which can be the first live broadcast relay mode described later). In the normal mode, the network video live broadcast relay device can select a channel with better signals for data transmission For forwarding, when it is confirmed that the signal of the currently used network card communication sub-module is not good, the network video live broadcast relay device switches to the network card communication sub-module with better signal for forwarding. Or, for example, when the current load is relatively large (for example, whether the current load is greater than or equal to the preset first load threshold), or the signal of each network card communication sub-module is not good (for example, the signal strength of each network card communication sub-module is low At the second preset signal strength threshold), the data forwarding capability of any network card communication sub-module cannot meet the current data forwarding requirements, and the network video live broadcast relay device switches to another live broadcast relay mode (which can be described later. 2 live transfer mode), switch to enabling multiple (for example, 2, 3) network card communication sub-modules at the same time to forward data together to meet the current data forwarding requirements. The data forwarding amount undertaken by each network card communication sub-module can be based on each The signal strength of each network card communication sub-module (which can be directly reflected by the communication parameter value) is dynamically allocated to achieve load balancing.
需要说明的是,本发明的上述步骤S30、S40和S50没有先后顺序,属于并列步骤。It should be noted that, the above-mentioned steps S30, S40 and S50 of the present invention have no order, and belong to parallel steps.
本实施例技术方案,在网络视频直播中转设备中设置直播中转模式,网络视频直播中转设备可根据接收到用户发送的进入一个直播中转模块的控制指令,或者在预设的启动时间点到达,或者经预设的模式切换分析规则分析确认的方式,进入该直播中转模式;在进入该直播中转模式后,利用分别支持不同的网卡通信子模块将接收到的视频直播数据流中转发送给通信连接的直播服务器。相较于现有技术而言,本方案在无Wi-Fi信号或Wi-Fi信号较弱的场景时,网络视频直播中转设备可采用一个或多个网卡通信子模块对直播设备发送来的视频直播数据流进行中转,以发送至直播服务器,保证直播服务器的稳定流畅的直播;在一个移动通信系统的网卡通信子模块信号较弱的场景时,可通过驱动一个或多个其他不同移动通信系统的网卡子模块将直播设备发送来的视频直播数据流中转发送给直播服务器,以保证直播服务器的稳定流畅的直播;因此,本方案使得网络视频直播在各个场景下,都能保持网络视频直播的稳定流畅性,解决了网络视频直播容易受到网络环境复杂、信号不稳定等情况造成直播出现卡顿、中断等问题。In the technical solution of this embodiment, a live broadcast relay mode is set in the network video live broadcast relay device, and the network video live broadcast relay device can arrive at a preset start time point according to receiving a control instruction sent by a user to enter a live broadcast relay module, or After the preset mode switching analysis rules are analyzed and confirmed, enter the live broadcast transfer mode; after entering the live broadcast transfer mode, use the network card communication sub-modules that support different network cards to forward the received live video data stream to the communication connection. Live server. Compared with the prior art, in the scenario where there is no Wi-Fi signal or the Wi-Fi signal is weak, the network video live broadcast relay device can use one or more network card communication sub-modules to transmit the video sent by the live broadcast device. The live data stream is relayed to be sent to the live server to ensure the stable and smooth live broadcast of the live server; in a scenario where the signal of the network card communication sub-module of a mobile communication system is weak, it can be driven by one or more other different mobile communication systems. The network card sub-module of the network card forwards the live video data stream sent by the live broadcast device to the live broadcast server, so as to ensure the stable and smooth live broadcast of the live broadcast server; therefore, this solution enables the live broadcast of the network video to maintain the quality of the live broadcast of the network video in various scenarios. Stable and smooth, it solves the problems of live streaming that is susceptible to complex network environment and unstable signal, which causes the live streaming to be stuck and interrupted.
如图5所示,图5为本发明网络视频直播中转控制方法第五实施例的流程示意图。As shown in FIG. 5 , FIG. 5 is a schematic flowchart of a fifth embodiment of a method for relaying control of live online video broadcasting according to the present invention.
在本实施例的网络视频直播中转控制方法中,直播中转模式包括第一直播中转模式,所述利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器的步骤包括:In the method for relay control of online video live broadcast in this embodiment, the live broadcast relay mode includes a first live broadcast relay mode, and the live video data stream is relayed by using the at least two network card communication sub-modules that respectively support different mobile communication systems The steps to send to the live server include:
步骤S01,网络视频直播中转设备实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数,并将侦测到的各个预设类型通信参数分别与预设阈值比较。Step S01, the network video live relay device detects the preset type communication parameters of each of the network card communication sub-modules in real time or regularly, and compares the detected preset type communication parameters with preset thresholds respectively.
其中,所述预设类型通信参数可以为:通信信号强度、数据上传或者下载速度、往返时延(Round-Trip Time,RTT)及数据丢包率等反映网络质量的通信参数中的一种,或多种的结合;网卡通信子模块的预设类型通信参数越大,则该网卡通信子模块对视频直播数据流的中转处理更快、更稳定。网络视频直播中转设备中预先设置了预设类型通信参数的一个阈值(即预设阈值),该预设阈值为用来判断网卡通信子模块的网络质量的一个标准,网卡通信子模块的预设类型通信参数超过该预设阈值时,通过该网卡通信子模块对视频直播数据流的中转才可保证发送给直播服务器的视频直播数据流能够维持直播视频的稳定流畅播放,否则,则可能会使直播视频的播放出现卡顿、中断等异常情况。本实施例中,网络视频直播中转设备实时或定时侦测每个网卡通信子模块的预设类型通信参数,并且将侦测到的各个网卡通信子模块的预设类型通信参数分别与预设阈值比较,以确定当前启用的网卡通信子模块的预设类型通信参数与所述预设阈值的大小关系,以及当前未启用的各个网卡通信子模块的预设类型通信参数分别与所述预设阈值的大小关系,即确定当前启动的网卡通信子模块的网络质量和其余各个网卡通信子模块的网络质量。Wherein, the preset type of communication parameters may be: one of communication parameters reflecting network quality, such as communication signal strength, data upload or download speed, round-trip delay (Round-Trip Time, RTT), and data packet loss rate, etc., or a combination of several; the greater the preset type of communication parameter of the network card communication sub-module, the faster and more stable the network card communication sub-module performs the relay processing of the live video data stream. A threshold (ie, a preset threshold) of a preset type of communication parameter is preset in the network video live relay device, and the preset threshold is a standard used to judge the network quality of the network card communication sub-module. The preset value of the network card communication sub-module When the type communication parameter exceeds the preset threshold, the live video data stream can be relayed through the network card communication sub-module to ensure that the live video data stream sent to the live server can maintain the stable and smooth playback of the live video. The playback of the live video is stuck, interrupted, or other abnormal situations. In this embodiment, the network video live relay device detects the preset type communication parameters of each network card communication sub-module in real time or regularly, and compares the detected preset type communication parameters of each network card communication sub-module with the preset threshold value. Compare to determine the size relationship between the preset type communication parameters of the currently enabled network card communication sub-modules and the preset threshold, and the preset type communication parameters of the currently disabled network card communication sub-modules are respectively The preset threshold value The size relationship, that is, to determine the network quality of the currently activated network card communication sub-module and the network quality of the remaining network card communication sub-modules.
步骤S02,若网络视频直播中转设备确定当前启用的网卡通信子模块的预设类型通信参数小于或者等于预设阈值,且当前未启用的网卡通信子模块中存在预设类型通信参数大于所述预设阈值的网卡通信子模块,则将侦测到的预设类型通信参数最大的网卡通信子模块作为待启用的网卡通信子模块。Step S02, if the network video live relay device determines that the preset type communication parameter of the currently enabled network card communication sub-module is less than or equal to the preset threshold, and there is a preset type communication parameter in the currently disabled network card communication sub-module that is greater than the preset type communication parameter. If the network card communication sub-module with the threshold is set, the network card communication sub-module with the largest detected communication parameter of the preset type is used as the network card communication sub-module to be activated.
在网络视频直播中转设备将各个网卡通信子模块的预设类型通信参数分别与预设阈值比较得出的比较结果中,如果当前启用的网卡通信子模块的预设类型通信参数小于或等于预设阈值,并且当前未启用的网卡通信子模块中存在预设类型通信参数大于所述预设阈值的网卡通信子模块,则说明当前启用的网卡通信子模块的网络质量较差,对视频直播数据流的中转处理速度不足以使直播服务器维持直播视频的稳定流畅播放,且当前未启用的网卡通信子模块中存在网络质量更好,对视频直播数据流的中转处理速度可以使直播服务器直播流畅的网卡通信子模块;此时,网络视频直播中转设备则当前未启用的网卡通信子模块中筛选出侦测到的预设类型通信参数最大(即网络质量最好)的网卡通信子模块,将该筛选出的网卡通信子模块作为待启用的网卡通信子模块。In the comparison result obtained by comparing the preset type communication parameters of each network card communication sub-module with the preset threshold by the live network video live relay device, if the preset type communication parameter of the currently enabled network card communication sub-module is less than or equal to the preset type threshold, and there is a network card communication sub-module whose preset type communication parameter is greater than the preset threshold in the currently disabled network card communication sub-module, it means that the network quality of the currently enabled network card communication sub-module is poor, and the live video data stream The transfer processing speed is not enough for the live server to maintain the stable and smooth playback of live video, and there is a network card with better network quality in the currently disabled network card communication sub-module, and the transfer processing speed of the live video data stream can make the live server live broadcast smoothly. Communication sub-module; at this time, the network card communication sub-module with the largest detected preset type communication parameter (that is, the best network quality) is screened out from the network card communication sub-module that is currently not enabled by the network video live relay device, and the filter is selected. The outgoing network card communication sub-module is used as the network card communication sub-module to be enabled.
步骤S03,网络视频直播中转设备关闭当前启用的网卡通信子模块,并启用该待启用的网卡通信子模块将视频直播设备发送来的视频直播数据流中转发送给直播服务器。Step S03, the network video live relay device closes the currently enabled network card communication sub-module, and enables the to-be-enabled network card communication sub-module to forward the live video data stream sent by the live video device to the live server.
网络视频直播中转设备在确定了待启用的网卡通信子模块后,将当前启用的网卡通信子模块关闭,同时启动该待启用的网卡通信子模块,通过该启动的待启用网卡通信子模块对直播数据流进行中转处理,以将视频直播设备发送来的视频直播数据流转发给直播服务器。After determining the network card communication sub-module to be enabled, the network video live broadcast relay device closes the currently enabled network card communication sub-module, and simultaneously starts the network card communication sub-module to be enabled, and uses the enabled network card communication sub-module to be enabled. The data stream is relayed to forward the live video data stream sent by the live video device to the live server.
本实施例方案,在第一直播中转模式下,通过网络视频直播设备实时或定时侦测各个网卡通信子模块的预设类型通信参数,并将侦测到的各个预设类型通信参数分别与预设阈值比较,从而确定各个网卡通信子模块各自的当前网络质量是否满足保证直播服务器流畅直播的要求,在发现当前启用的网卡通信子模块的网络质量不满足维持直播服务器流畅直播的情况时,从未启用的网卡通信子模块中选取当前网络质量最佳的网卡通信子模块替换当前启用的网卡通信子模块,通过这种方式可以保证选择网络质量较佳的网卡通信子模块对视频直播数据流进行中转处理,从而保证直播服务器的流畅直播。In the solution of this embodiment, in the first live broadcast relay mode, the network video live broadcast equipment detects the preset type communication parameters of each network card communication sub-module in real time or regularly, and each detected preset type communication parameter is respectively associated with the preset type. Set a threshold comparison to determine whether the current network quality of each network card communication sub-module meets the requirements for ensuring smooth live broadcast of the live server. The network card communication sub-module with the best current network quality is selected from the non-enabled network card communication sub-module to replace the currently enabled network card communication sub-module. In this way, the network card communication sub-module with better network quality can be selected to perform live video streaming. Transit processing, so as to ensure the smooth live broadcast of the live server.
如图6示,图6为本发明网络视频直播中转控制方法第六实施例的流程示意图。As shown in FIG. 6 , FIG. 6 is a schematic flowchart of a sixth embodiment of a method for relay control of online video live broadcast according to the present invention.
在本实施例的网络视频直播中转控制方法中,所述直播中转模式包括第二直播中转模式,所述利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器的步骤包括:In the network video live broadcast relay control method of this embodiment, the live broadcast relay mode includes a second live broadcast relay mode, and the live video data is transmitted by using the at least two network card communication sub-modules that respectively support different mobile communication systems. The steps of forwarding the stream to the live server include:
步骤S11,网络视频直播中转设备实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数。Step S11 , the live network video live relay device detects the preset type communication parameters of each of the network card communication sub-modules in real time or regularly.
该预设类型通信参数可以为:通信信号强度、数据上传或者下载速度、往返时延(Round-Trip Time,RTT)以及数据丢包率等反映网络质量的通信参数中的一种,或多种的结合。The preset type of communication parameters may be: one or more of communication parameters reflecting network quality, such as communication signal strength, data upload or download speed, round-trip delay (Round-Trip Time, RTT), and data packet loss rate. combination.
步骤S12,网络视频直播中转设备根据侦测到的各个所述网卡通信子模块的预设类型通信参数的参数值比值关系,确定各个所述网卡通信子模块对应的中转百分比。Step S12, the network video live relay device determines the relay percentage corresponding to each of the network card communication sub-modules according to the detected parameter value ratio relationship of the preset type of communication parameters of each of the network card communication sub-modules.
例如,各个网卡通信子模块分别为X1、X2和X3,各个网卡通信子模块的预设类型通信参数的参数值分别为a1、a2、a3,则网络视频直播中转设备确定各个网卡通信子模块对应的中转百分比分别为a1/(a1+a2+a3)、a2/(a1+a2+a3)、a3/(a1+a2+a3)。For example, each network card communication sub-module is X1, X2 and X3 respectively, and the parameter values of the preset communication parameters of each network card communication sub-module are a1, a2, a3 respectively, then the network video live relay device determines that each network card communication sub-module corresponds to The transit percentages are a1/(a1+a2+a3), a2/(a1+a2+a3), a3/(a1+a2+a3).
步骤S13,网络视频直播中转设备将所述视频直播数据流分割成各个所述网卡通信子模块对应的中转百分比的子数据流。Step S13, the live video live relay device divides the live video data stream into sub-data streams with a percentage of relay corresponding to each of the network card communication sub-modules.
步骤S14,网络视频直播中转设备驱动各个所述网卡通信子模块分别将对应的子数据流中转发送给直播服务器。Step S14, the network video live broadcast relay device drives each of the network card communication sub-modules to forward the corresponding sub-data streams to the live broadcast server respectively.
例如,网络视频直播中转设备确定的各个网卡通信子模块(包括网卡通信西模块X1、X2和X3)对应的中转百分比分别为:网卡通信子模块X1对应的中转百分比为b1,网卡通信子模块X2对应的中转百分比为b2,网卡通信子模块X3对应的中转百分比为b3,则网络视频直播中转设备将视频直播设备发送来的视频直播数据流分割成百分比为b1的第一子数据流、百分比为b2的第一子数据流和百分比为b3的第三子数据流,b1、b2、b3的和为100%;网络视频直播中转设备驱动网卡通信子模块X1中转发送对应的第一子数据流给直播服务器,驱动网卡通信子模块X2中转发送对应的第二子数据流给直播服务器,以及驱动网卡通信子模块X3中转发送对应的第三子数据流给直播服务器。For example, the relay percentages corresponding to each network card communication sub-module (including network card communication west modules X1, X2 and X3) determined by the network video live relay device are: The corresponding relay percentage is b2, and the relay percentage corresponding to the network card communication sub-module X3 is b3. The network video live broadcast relay device divides the live video data stream sent by the video live broadcast device into the first sub-data stream with a percentage of b1, and the percentage is The first sub-data stream of b2 and the third sub-data stream whose percentage is b3, the sum of b1, b2, and b3 is 100%; the network video live broadcast relay device drives the network card communication sub-module X1 to relay and send the corresponding first sub-data stream to The live server drives the network card communication sub-module X2 to transmit the corresponding second sub-data stream to the live server, and drives the network card communication sub-module X3 to transmit the corresponding third sub-data stream to the live server.
本实施例中,在第二直播中转模式下,网络视频直播中转设备动态监控各个网卡通信子模块的预设类型通信参数,根据监控到的预设类型通信参数的参数值比值关系,确定各个网卡通信子模块对应的中转百分比,网络视频直播中转设备按照各个网卡通信子模块对应的中转百分比,对视频直播设备发送来的视频直播数据流进行分割,使每个网卡通信子模块中转发发送对应的子数据流给直播服务器。本实施例方案通过监控各个网卡通信子模块的网络质量,根据网络质量的情况均衡分配中转发送的子数据流大小,驱动多个网卡通信子模块共同协作转发视频直播数据流,与单独一个网卡通信子模块转发视频直播数据流,可以支持更高清的视频直播数据流,并且在多个网卡通信子模块的网络质量均不是很好时,可以更好的确保了直播服务器的直播流畅稳定。In this embodiment, in the second live broadcast relay mode, the network video live broadcast relay device dynamically monitors the preset type communication parameters of each network card communication sub-module, and determines each network card according to the monitored parameter value ratio relationship of the preset type communication parameters. The relay percentage corresponding to the communication sub-module, the network video live relay device divides the live video data stream sent by the video live device according to the relay percentage corresponding to each network card communication sub-module, so that each network card communication sub-module forwards and sends the corresponding data stream. The sub data stream is sent to the live server. The solution of this embodiment monitors the network quality of each network card communication sub-module, and evenly allocates the size of the sub-data stream sent by the relay according to the network quality, so as to drive multiple network card communication sub-modules to cooperate to forward the live video data stream and communicate with a single network card. The sub-module forwards the live video data stream, which can support a higher-definition live video data stream, and when the network quality of multiple network card communication sub-modules is not very good, it can better ensure the smooth and stable live broadcast of the live server.
结合第四至第六实施例可以发现,本发明方案中,网络直播中转设备可以根据当前各网卡通信子模块的网络质量情况以及负载的情况来灵活切换直播中转模式,可在第一直播中转模式和第二直播中转模式中选择更适合当前网络条件和负载的直播中转模式。With reference to the fourth to sixth embodiments, it can be found that in the solution of the present invention, the network live relay device can flexibly switch the live broadcast relay mode according to the current network quality and load of each network card communication sub-module, and can flexibly switch the live broadcast relay mode in the first live broadcast relay mode. and the second live transfer mode, select the live transfer mode that is more suitable for the current network conditions and load.
例如,在第一直播中转模式下,网络直播中转设备在分析得到当前负载大于或等于预设的第一负载阈值(第一负载阈值的具体数值可以设置为任何一个网卡通信子模块都难以单独承担的数值,并可根据各网卡通信子模块的信号强度动态调整)时,可以认为负载较大,单独一个网卡通信子模块难以承担负载,则可将直播中转模式切换为第二直播中转模式;For example, in the first live broadcast relay mode, the network live broadcast relay device analyzes and obtains that the current load is greater than or equal to the preset first load threshold (the specific value of the first load threshold can be set so that any network card communication sub-module cannot bear it alone). If the load is relatively large, and it is difficult for a single network card communication sub-module to bear the load, the live transfer mode can be switched to the second live transfer mode;
或者,在第二直播中转模式下,如果分析发现当前负载小于预设的第二负载阈值(可将第二负载阈值的具体数值设置为任何一个网卡通信子模块都能够单独承担的数值,并可根据各网卡通信子模块的信号强度动态调整),则可将直播中转模式切换为第一直播中转模式;Or, in the second live transfer mode, if the analysis finds that the current load is less than the preset second load threshold (the specific value of the second load threshold can be set to a value that any network card communication sub-module can bear alone, and can According to the dynamic adjustment of the signal strength of each network card communication sub-module), the live broadcast relay mode can be switched to the first live broadcast relay mode;
或者,在第二直播中转模式下,如果分析发现存在一个网卡通信子模块的信号强度高于第一预设信号强度阈值(第一预设信号强度阈值的具体数值,可以设置为能够完全承担当前负载,并可根据当前负载动态调整),则确认切换直播中转模式为第一直播中转模式;Or, in the second live transfer mode, if the analysis finds that there is a network card communication sub-module whose signal strength is higher than the first preset signal strength threshold (the specific value of the first preset signal strength threshold can be set to be able to fully bear the current load, and can be dynamically adjusted according to the current load), then confirm that the switch of the live broadcast relay mode is the first live broadcast relay mode;
或者,在第一直播中转模式下,如果分析发现各个网卡通信子模块的信号强度均低于第二预设信号强度阈值(第二预设信号强度阈值的具体数值,可以设置为不能承担当前负载,并可根据当前负载动态调整),则确认切换直播中转模式为第二直播中转模式。Or, in the first live transfer mode, if the analysis finds that the signal strength of each network card communication sub-module is lower than the second preset signal strength threshold (the specific value of the second preset signal strength threshold can be set to not be able to bear the current load. , and can be dynamically adjusted according to the current load), then confirm to switch the live broadcast relay mode to the second live broadcast relay mode.
此外,本发明还提出一种网络视频直播中转控制程序10。In addition, the present invention also provides a network video live broadcast relay control program 10 .
请参阅图7,是本发明网络视频直播中转控制程序10一实施例的运行环境示意图。Please refer to FIG. 7 , which is a schematic diagram of the running environment of an embodiment of the network video live broadcast relay control program 10 of the present invention.
在本实施例中,网络视频直播中转控制程序10安装并运行于网络视频直播中转设备1中。网络视频直播中转设备1可以是桌上型计算机、笔记本、掌上电脑及服务器等计算设备。该网络视频直播中转设备1可包括,但不仅限于,存储器11、处理器12及移动通信模块14,网络视频直播中转设备1利用移动通信模块14分别与视频直播设备及直播服务器通信连接,该移动通信模块14包括多个分别支持不同移动通信系统的网卡通信子模块(例如,所述移动通信模块可以包括支持第一移动通信运营商(例如,中国移动通信集团公司)运营的移动通信网络的网卡通信子模块(例如,4G网卡通信子模块,即支持第四代移动通信技术的网卡通信子模块),支持第二移动通信运营商(例如,中国联合网络通信集团有限公司)运营的移动通信网络的网卡通信子模块,支持第三移动通信运营商(例如,中国电信集团有限公司)运营的移动通信网络的网卡通信子模块)。图7仅示出了具有组件11-14的网络视频直播中转设备1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In this embodiment, the network video live broadcast relay control program 10 is installed and run in the network video live broadcast relay device 1 . The network video live broadcast relay device 1 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a server. The network video live broadcast relay device 1 may include, but is not limited to, a memory 11, a processor 12 and a
存储器11在一些实施例中可以是网络视频直播中转设备1的内部存储单元,例如该网络视频直播中转设备1的硬盘或内存。存储器11在另一些实施例中也可以是网络视频直播中转设备1的外部存储设备,例如网络视频直播中转设备1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括网络视频直播中转设备1的内部存储单元也包括外部存储设备。存储器11用于存储安装于网络视频直播中转设备1的应用软件及各类数据,例如网络视频直播中转控制程序10的程序代码等。存储器11还可以用于暂时地存储已经输出或者将要输出的数据。In some embodiments, the memory 11 may be an internal storage unit of the network video live broadcast relay device 1 , such as a hard disk or a memory of the network video live broadcast relay device 1 . In other embodiments, the memory 11 may also be an external storage device of the network video live broadcast relay device 1, such as a plug-in hard disk equipped on the network video live broadcast relay device 1, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the network video live broadcast relay device 1 and an external storage device. The memory 11 is used to store application software and various data installed in the live network video broadcast relay device 1 , such as program codes of the network video live broadcast relay control program 10 and the like. The memory 11 may also be used to temporarily store data that has been output or is to be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行网络视频直播中转控制程序10等。In some embodiments, the processor 12 may be a central processing unit (Central Processing Unit, CPU), a microprocessor or other data processing chips, for running program codes or processing data stored in the memory 11, for example, performing live web video Transit control program 10 and so on.
该网络视频直播中转设备1还可包括显示器13,显示器13在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及有机发光二极管(Organic Light-Emitting Diode,OLED)触摸器等。显示器13用于显示在网络视频直播中转设备1中处理的信息以及用于显示可视化的用户界面。网络视频直播中转设备1的部件11-13通过系统总线相互通信。The network video live relay device 1 may further include a display 13, which in some embodiments may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an organic light-emitting diode (Organic Light-Emitting Diode, OLED) touch device, and the like. The display 13 is used to display the information processed in the network video live broadcast relay device 1 and to display a visual user interface. The components 11-13 of the network video live broadcast relay device 1 communicate with each other through the system bus.
请参阅图8,是本发明网络视频直播中转控制程序10一实施例的程序模块图。在本实施例中,网络视频直播中转控制程序10可以被分割成一个或多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行,以完成本发明。例如,在图8中,网络视频直播中转控制程序10可以被分割成接收模块101和转发模块102。本发明所称的模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述网络视频直播中转控制程序10在网络视频直播中转设备1中的执行过程,其中:Please refer to FIG. 8 , which is a program module diagram of an embodiment of the relay control program 10 for live broadcast of network video according to the present invention. In this embodiment, the network video live broadcast relay control program 10 can be divided into one or more modules, one or more modules are stored in the memory 11, and are executed by one or more processors (in this embodiment, the processor 12) performed to complete the present invention. For example, in FIG. 8 , the network video live broadcast relay control program 10 can be divided into a receiving
接收模块101,用于接收视频直播设备发送的视频直播数据流。The receiving
转发模块102,用于按照预定的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。The
网络视频直播中转设备具有至少一种预定的直播中转模式,本实施例中,使网络视频直播中转设备在预定的直播中转模式下工作,按照该预定的直播中转模式,利用所述至少二个分别支持不同的网卡通信子模块将接收到的视频直播数据流中转发送给通信连接的直播服务器,可为按照该直播中转模式驱动一个或者多个网卡通信子模块工作,将接收到的视频直播数据流中转发送给通信连接的直播服务器。The network video live broadcast relay device has at least one predetermined live broadcast relay mode. In this embodiment, the network video live broadcast relay device is made to work in the predetermined live broadcast relay mode. According to the predetermined live broadcast relay mode, the at least two live broadcast relay modes are used. Support different network card communication sub-modules to forward the received live video data stream to the live server of the communication connection, which can drive one or more network card communication sub-modules to work according to the live relay mode, and transfer the received live video data stream. It is relayed to the live server of the communication connection.
进一步地,本实施例的网络视频直播中转控制程序10还包括第一切换模块103;Further, the network video live broadcast relay control program 10 in this embodiment further includes a
第一切换模块103,用于在接收倒用户发出的进入一个直播中转模式的控制指令时,切换到所述控制指令指示的直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。The
当用户要网络直播视频中转设备进入某一个直播中转模式进行工作时,用户则向网络视频直播中转设备发送进入该直播中转模式的控制指令,网络视频直播中转设备接收到该控制指令后,则切换到该直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。When the user wants the network live video relay device to enter a certain live broadcast relay mode to work, the user sends a control command to enter the live broadcast relay mode to the network video live relay device. After the network video live relay device receives the control command, it switches to In the live broadcast transfer mode, the video live broadcast data stream is forwarded to the live broadcast server by using the at least two network card communication sub-modules that respectively support different mobile communication systems.
进一步地,本实施例的网络视频直播中转控制程序10还包括第二切换模块104;Further, the network video live broadcast relay control program 10 in this embodiment further includes a
第二切换模块104,用于根据预先确定的直播中转模式与启动时间点的映射关系,在一个直播中转模式对应的启动时间点到达时,切换到该直播中转模式,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。The
网络视频直播中转设备中存有预先确定的直播中转模式与启动时间点的映射关系表(例如,第一启动时间点T1对应直播中转模式A,第二启动时间点T2对应直播中转模式B,第三启动时间点T3对应直播中转模式C)。当一个启动时间点到达时,网络视频直播中转设备通过查询直播中转模式与启动时间点的映射关系表,确定当前启动时间点对应的直播中转模式,网络视频直播中转设备切换到该确定的直播中转模块,利用所述至少二个分别支持不同移动通信系统的网卡通信子模块将所述视频直播数据流中转发送给直播服务器。The network video live broadcast relay device stores a predetermined mapping relationship table between the live broadcast relay mode and the start time point (for example, the first start time point T1 corresponds to the live broadcast relay mode A, the second start time point T2 corresponds to the live broadcast relay mode B, and the first start time point T2 corresponds to the live broadcast relay mode B. The third activation time point T3 corresponds to the live broadcast relay mode C). When a start time point arrives, the online video live broadcast relay device determines the live broadcast relay mode corresponding to the current start time point by querying the mapping relationship table between the live broadcast relay mode and the start time point, and the network video live broadcast relay device switches to the determined live broadcast relay. A module, using the at least two network card communication sub-modules that respectively support different mobile communication systems to forward the video live broadcast data stream to the live broadcast server.
进一步地,本实施例的网络视频直播中转控制程序10还包括分析模块105和第三切换模块106;其中,Further, the network video live broadcast relay control program 10 in this embodiment further includes an
分析模块105,用于根据预先确定的模式切换分析规则,实时或者定时分析是否切换直播中转模式。The
网络视频直播中转设备中预先确定了一套模式切换分析规则,网络视频直播中转设备根据该模式切换分析规则实时或者定时分析是否切换一个直播中转模式。A set of mode switching analysis rules is pre-determined in the network video live broadcast relay device, and the network video live broadcast relay device analyzes whether to switch a live broadcast relay mode in real time or regularly according to the mode switch analysis rules.
本实施例技术方案,在网络视频直播中转设备中设置直播中转模式,网络视频直播中转设备可根据接收到用户发送的进入一个直播中转模块的控制指令,或者在预设的启动时间点到达,或者经预设的模式切换分析规则分析确认的方式,进入该直播中转模式;在进入该直播中转模式后,利用分别支持不同的网卡通信子模块将接收到的视频直播数据流中转发送给通信连接的直播服务器。相较于现有技术而言,本方案在无Wi-Fi信号或Wi-Fi信号较弱的场景时,网络视频直播中转设备可采用一个或多个网卡通信子模块对直播设备发送来的视频直播数据流进行中转,以发送至直播服务器,保证直播服务器的稳定流畅的直播;在一个移动通信系统的网卡通信子模块信号较弱的场景时,可通过驱动一个或多个其他不同移动通信系统的网卡子模块将直播设备发送来的视频直播数据流中转发送给直播服务器,以保证直播服务器的稳定流畅的直播;因此,本方案使得网络视频直播在各个场景下,都能保持网络视频直播的稳定流畅性,解决了网络视频直播容易受到网络环境复杂、信号不稳定等情况造成直播出现卡顿、中断等问题。In the technical solution of this embodiment, a live broadcast relay mode is set in the network video live broadcast relay device, and the network video live broadcast relay device can arrive at a preset start time point according to receiving a control instruction sent by a user to enter a live broadcast relay module, or After the preset mode switching analysis rules are analyzed and confirmed, enter the live broadcast transfer mode; after entering the live broadcast transfer mode, use the network card communication sub-modules that support different network cards to forward the received live video data stream to the communication connection. Live server. Compared with the prior art, in the scenario where there is no Wi-Fi signal or the Wi-Fi signal is weak, the network video live broadcast relay device can use one or more network card communication sub-modules to transmit the video sent by the live broadcast device. The live data stream is relayed to be sent to the live server to ensure the stable and smooth live broadcast of the live server; in a scenario where the signal of the network card communication sub-module of a mobile communication system is weak, it can be driven by one or more other different mobile communication systems. The network card sub-module of the network card forwards the live video data stream sent by the live broadcast device to the live broadcast server, so as to ensure the stable and smooth live broadcast of the live broadcast server; therefore, this solution enables the live broadcast of the network video to maintain the quality of the live broadcast of the network video in various scenarios. Stable and smooth, it solves the problem that live broadcast is prone to stutter and interruption caused by complex network environment and unstable signal conditions.
参照图9,在本实施例的网络视频直播中转控制程序10中,所述转发模块102、第一切换模块103、第二切换模块104和第三切换模块106均包括比较子模块1001、确定子模块1002及切换子模块1003。9, in the network video live broadcast relay control program 10 of this embodiment, the
比较子模块1001,用于实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数,并将侦测到的各个预设类型通信参数分别与预设阈值比较。The comparison sub-module 1001 is used to detect the preset type communication parameters of each of the network card communication sub-modules in real time or regularly, and compare the detected preset type communication parameters with preset thresholds respectively.
其中,所述预设类型通信参数可以为:通信信号强度、数据上传或者下载速度、数据丢包率等反映网络质量的通信参数中的一种,或多种的结合;网卡通信子模块的预设类型通信参数越大,则该网卡通信子模块对视频直播数据流的中转处理更快、更稳定。网络视频直播中转设备中预先设置了预设类型通信参数的一个阈值(即预设阈值),该预设阈值为用来判断网卡通信子模块的网络质量的一个标准,网卡通信子模块的预设类型通信参数超过该预设阈值时,通过该网卡通信子模块对视频直播数据流的中转才可保证发送给直播服务器的视频直播数据流能够维持直播视频的稳定流畅播放,否则,则可能会使直播视频的播放出现卡顿、中断等异常情况。本实施例中,网络视频直播中转设备实时或定时侦测每个网卡通信子模块的预设类型通信参数,并且将侦测到的各个网卡通信子模块的预设类型通信参数分别与预设阈值比较,以确定当前启用的网卡通信子模块的预设类型通信参数与所述预设阈值的大小关系,以及当前未启用的各个网卡通信子模块的预设类型通信参数分别与所述预设阈值的大小关系,即确定当前启动的网卡通信子模块的网络质量和其余各个网卡通信子模块的网络质量。Wherein, the preset type of communication parameters may be: one or a combination of communication parameters reflecting network quality, such as communication signal strength, data upload or download speed, data packet loss rate, etc.; The larger the type communication parameter is, the faster and more stable the relay processing of the live video data stream is by the communication sub-module of the network card. A threshold (ie, a preset threshold) of a preset type of communication parameter is preset in the network video live relay device, and the preset threshold is a standard used to judge the network quality of the network card communication sub-module. The preset value of the network card communication sub-module When the type communication parameter exceeds the preset threshold, the live video data stream can be relayed through the network card communication sub-module to ensure that the live video data stream sent to the live server can maintain the stable and smooth playback of the live video. The playback of the live video is stuck, interrupted, or other abnormal situations. In this embodiment, the network video live relay device detects the preset type communication parameters of each network card communication sub-module in real time or regularly, and compares the detected preset type communication parameters of each network card communication sub-module with the preset threshold value. Compare to determine the size relationship between the preset type communication parameters of the currently enabled network card communication sub-modules and the preset threshold, and the preset type communication parameters of the currently disabled network card communication sub-modules are respectively The preset threshold value The size relationship, that is, to determine the network quality of the currently activated network card communication sub-module and the network quality of the remaining network card communication sub-modules.
确定子模块1002,用在确定当前启用的网卡通信子模块的预设类型通信参数小于或者等于预设阈值,且当前未启用的网卡通信子模块中存在预设类型通信参数大于所述预设阈值的网卡通信子模块时,将侦测到的预设类型通信参数最大的网卡通信子模块作为待启用的网卡通信子模块。The
在网络视频直播中转设备将各个网卡通信子模块的预设类型通信参数分别与预设阈值比较得出的比较结果中,如果当前启用的网卡通信子模块的预设类型通信参数小于或等于预设阈值,并且当前未启用的网卡通信子模块中存在预设类型通信参数大于所述预设阈值的网卡通信子模块,则说明当前启用的网卡通信子模块的网络质量较差,对视频直播数据流的中转处理速度不足以使直播服务器维持直播视频的稳定流畅播放,且当前未启用的网卡通信子模块中存在网络质量更好,对视频直播数据流的中转处理速度可以使直播服务器直播流畅的网卡通信子模块;此时,网络视频直播中转设备则当前未启用的网卡通信子模块中筛选出侦测到的预设类型通信参数最大(即网络质量最好)的网卡通信子模块,将该筛选出的网卡通信子模块作为待启用的网卡通信子模块。In the comparison result obtained by comparing the preset type communication parameters of each network card communication sub-module with the preset threshold by the live network video live relay device, if the preset type communication parameter of the currently enabled network card communication sub-module is less than or equal to the preset type threshold, and there is a network card communication sub-module whose preset type communication parameter is greater than the preset threshold in the currently disabled network card communication sub-module, it means that the network quality of the currently enabled network card communication sub-module is poor, and the live video data stream The transfer processing speed is not enough for the live server to maintain the stable and smooth playback of live video, and there is a network card with better network quality in the currently disabled network card communication sub-module, and the transfer processing speed of the live video data stream can make the live server live broadcast smoothly. Communication sub-module; at this time, the network card communication sub-module with the largest detected preset type communication parameter (that is, the best network quality) is screened out from the network card communication sub-module that is currently not enabled by the network video live relay device, and the filter is selected. The outgoing network card communication sub-module is used as the network card communication sub-module to be enabled.
切换子模块1003,用于关闭当前启用的网卡通信子模块,并启用该待启用的网卡通信子模块,将视频直播设备发送来的视频直播数据流中转发送给直播服务器。The switching sub-module 1003 is used to close the currently enabled network card communication sub-module, enable the network card communication sub-module to be enabled, and forward the live video data stream sent by the live video device to the live server.
网络视频直播中转设备在确定了待启用的网卡通信子模块后,将当前启用的网卡通信子模块关闭,同时启动该待启用的网卡通信子模块,通过该启动的待启用网卡通信子模块对直播数据流进行中转处理,以将视频直播设备发送来的视频直播数据流转发给直播服务器。After determining the network card communication sub-module to be enabled, the network video live broadcast relay device closes the currently enabled network card communication sub-module, and simultaneously starts the network card communication sub-module to be enabled, and uses the enabled network card communication sub-module to be enabled. The data stream is relayed to forward the live video data stream sent by the live video device to the live server.
本实施例方案,通过网络视频直播设备实时或定时侦测各个网卡通信子模块的预设类型通信参数,并将侦测到的各个预设类型通信参数分别与预设阈值比较,从而确定各个网卡通信子模块各自的当前网络质量是否满足保证直播服务器流畅直播的要求,在发现当前启用的网卡通信子模块的网络质量不满足维持直播服务器流畅直播的情况时,从未启用的网卡通信子模块中选取当前网络质量最佳的网卡通信子模块替换当前启用的网卡通信子模块,对视频直播数据流进行中转处理,从而保证直播服务器的流畅直播。In the solution of this embodiment, the preset type communication parameters of each network card communication sub-module are detected in real time or regularly by the network video live broadcast device, and each detected preset type communication parameter is compared with the preset threshold value, so as to determine each network card. Whether the current network quality of the communication sub-modules meets the requirements for ensuring smooth live broadcast of the live server. When it is found that the network quality of the currently enabled network card communication sub-module does not meet the requirements of maintaining smooth live broadcast of the live server, the network card communication sub-module that has not been enabled is not activated. The network card communication sub-module with the best current network quality is selected to replace the currently enabled network card communication sub-module, and the live video data stream is relayed to ensure the smooth live broadcast of the live server.
参照图10,在本实施例的网络视频直播中转控制程序10中,所述转发模块102、第一切换模块103、第二切换模块104和第三切换模块106均包括侦测子模块1004、计算子模块1005、分割子模块1006和驱动子模块1007。10 , in the network video live broadcast relay control program 10 of this embodiment, the
侦测子模块1005,用于实时或者定时侦测各个所述网卡通信子模块的预设类型通信参数。The
该预设类型通信参数可以为:通信信号强度、数据上传或者下载速度、RTT以及丢包率等反映网络质量的通信参数。The preset type of communication parameters may be: communication signal strength, data upload or download speed, RTT, packet loss rate, and other communication parameters that reflect network quality.
计算子模块1005,用于根据侦测到的各个所述网卡通信子模块的预设类型通信参数的参数值比值关系,确定各个所述网卡通信子模块对应的中转百分比。The
例如,各个网卡通信子模块分别为X1、X2和X3,各个网卡通信子模块的预设类型通信参数的参数值分别为a1、a2、a3,则网络视频直播中转设备确定各个网卡通信子模块对应的中转百分比分别为a1/(a1+a2+a3)、a2/(a1+a2+a3)、a3/(a1+a2+a3)。For example, each network card communication sub-module is X1, X2 and X3 respectively, and the parameter values of the preset communication parameters of each network card communication sub-module are a1, a2, a3 respectively, then the network video live relay device determines that each network card communication sub-module corresponds to The transit percentages are a1/(a1+a2+a3), a2/(a1+a2+a3), a3/(a1+a2+a3).
分割子模块1007,用于将所述视频直播数据流分割成各个所述网卡通信子模块对应的中转百分比的子数据流。The dividing sub-module 1007 is configured to divide the live video data stream into sub-data streams of the transit percentage corresponding to each of the network card communication sub-modules.
驱动子模块1007,用于驱动各个所述网卡通信子模块分别将对应的子数据流中转发送给直播服务器。The driving sub-module 1007 is configured to drive each of the network card communication sub-modules to forward the corresponding sub-data stream to the live server respectively.
例如,网络视频直播中转设备确定的各个网卡通信子模块(包括网卡通信西模块X1、X2和X3)对应的中转百分比分别为:网卡通信子模块X1对应的中转百分比为b1,网卡通信子模块X2对应的中转百分比为b2,网卡通信子模块X3对应的中转百分比为b3,则网络视频直播中转设备将视频直播设备发送来的视频直播数据流分割成百分比为b1的第一子数据流、百分比为b2的第一子数据流和百分比为b3的第三子数据流,b1、b2、b3的和为100%;网络视频直播中转设备驱动网卡通信子模块X1中转发送对应的第一子数据流给直播服务器,驱动网卡通信子模块X2中转发送对应的第二子数据流给直播服务器,以及驱动网卡通信子模块X3中转发送对应的第三子数据流给直播服务器。For example, the relay percentages corresponding to each network card communication sub-module (including network card communication west modules X1, X2 and X3) determined by the network video live relay device are: The corresponding relay percentage is b2, and the relay percentage corresponding to the network card communication sub-module X3 is b3. The network video live broadcast relay device divides the live video data stream sent by the video live broadcast device into the first sub-data stream with a percentage of b1, and the percentage is The first sub-data stream of b2 and the third sub-data stream whose percentage is b3, the sum of b1, b2, and b3 is 100%; the network video live broadcast relay device drives the network card communication sub-module X1 to relay and send the corresponding first sub-data stream to The live server drives the network card communication sub-module X2 to transmit the corresponding second sub-data stream to the live server, and drives the network card communication sub-module X3 to transmit the corresponding third sub-data stream to the live server.
本实施例中,网络视频直播中转设备动态监控各个网卡通信子模块的预设类型通信参数,根据监控到的预设类型通信参数的参数值比值关系,确定各个网卡通信子模块对应的中转百分比,网络视频直播中转设备按照各个网卡通信子模块对应的中转百分比,对视频直播设备发送来的视频直播数据流进行分割,使每个网卡通信子模块中转发发送对应的子数据流给直播服务器。本实施例方案通过监控各个网卡通信子模块的网络质量,根据网络质量的情况均衡分配中转发送的子数据流大小,可以更好的确保了直播服务器的直播流畅稳定。In this embodiment, the network video live relay device dynamically monitors the preset type communication parameters of each network card communication sub-module, and determines the relay percentage corresponding to each network card communication sub-module according to the parameter value ratio relationship of the monitored preset type communication parameters, The network video live broadcast relay device divides the live video data stream sent by the video live broadcast device according to the relay percentage corresponding to each network card communication sub-module, so that each network card communication sub-module forwards and sends the corresponding sub-data stream to the live broadcast server. The solution of this embodiment can better ensure the smooth and stable live broadcast of the live broadcast server by monitoring the network quality of each network card communication sub-module, and evenly distributing the size of the sub-data stream sent by the relay according to the network quality.
进一步地,本发明还提出一种网络视频直播中转控制系统,所述网络视频直播中转控制系统包括网络视频直播中转设备,与所述网络视频直播中转设备通信连接的至少一个直播服务器,及与所述网络视频直播中转设备通信连接的至少一个视频直播设备;其中,该网络视频直播中转设备可包括上述实施例的所有方案,具体结构参照上述实施例,在此不再赘述。Further, the present invention also proposes a network video live broadcast relay control system. The network video live broadcast relay control system includes a network video live broadcast relay device, at least one live broadcast server communicatively connected to the network video live broadcast relay device, and connected to the network video live broadcast relay device. At least one live video equipment is communicatively connected to the network video live broadcast relay device; wherein, the network video live broadcast relay equipment may include all the solutions in the above embodiments, and the specific structure refers to the above embodiments, which will not be repeated here.
进一步地,本发明还提出一种计算机可读存储介质,所述计算机可读存储介质存储有网络视频直播中转控制程序,所述网络视频直播中转控制程序可被至少一个处理器执行,以使所述至少一个处理器执行上述任一实施例中的网络视频直播中转控制方法。Further, the present invention also proposes a computer-readable storage medium, the computer-readable storage medium stores a network video live broadcast relay control program, and the network video live broadcast relay control program can be executed by at least one processor, so that all The at least one processor executes the network video live broadcast relay control method in any of the foregoing embodiments.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是在本发明的发明构思下,利用本发明说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本发明的专利保护范围内。The above descriptions are only the preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Under the inventive concept of the present invention, the equivalent structural transformations made by the contents of the description and drawings of the present invention, or the direct/indirect application Other related technical fields are included in the scope of patent protection of the present invention.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811045984.XA CN109168011B (en) | 2018-09-07 | 2018-09-07 | Network video live broadcast transfer equipment, transfer control system, method and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811045984.XA CN109168011B (en) | 2018-09-07 | 2018-09-07 | Network video live broadcast transfer equipment, transfer control system, method and medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109168011A CN109168011A (en) | 2019-01-08 |
| CN109168011B true CN109168011B (en) | 2022-04-01 |
Family
ID=64894376
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811045984.XA Active CN109168011B (en) | 2018-09-07 | 2018-09-07 | Network video live broadcast transfer equipment, transfer control system, method and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109168011B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112118222A (en) * | 2020-08-11 | 2020-12-22 | 深圳市欣博跃电子有限公司 | Data forwarding method and device, electronic equipment and storage medium |
| CN116137730B (en) * | 2021-11-18 | 2024-12-13 | 荣耀终端有限公司 | A network acceleration method, electronic device, chip system and storage medium |
| CN114466206B (en) * | 2022-01-04 | 2024-03-15 | 北京快乐茄信息技术有限公司 | Live broadcast data processing method and device, electronic equipment and storage medium |
| CN115834934B (en) * | 2022-11-24 | 2024-09-10 | 中国国家铁路集团有限公司 | Vehicle-mounted system load balancing method and device and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101184195A (en) * | 2007-12-25 | 2008-05-21 | 腾讯科技(深圳)有限公司 | Audio/video living broadcast system and method |
| CN102263959A (en) * | 2011-08-08 | 2011-11-30 | 中国电信股份有限公司 | Direct broadcast transfer method and system |
| WO2017036194A1 (en) * | 2015-08-28 | 2017-03-09 | 腾讯科技(深圳)有限公司 | Data transmission method and system and related device |
| CN106535238A (en) * | 2016-11-02 | 2017-03-22 | 青岛海信移动通信技术股份有限公司 | Link switching method and device |
| CN108347622A (en) * | 2018-03-06 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Multi-medium data method for pushing, device, storage medium and equipment |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107612566B (en) * | 2017-10-25 | 2024-03-19 | 浙江嘉科电子有限公司 | Three-network integration mobile network terminal |
-
2018
- 2018-09-07 CN CN201811045984.XA patent/CN109168011B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101184195A (en) * | 2007-12-25 | 2008-05-21 | 腾讯科技(深圳)有限公司 | Audio/video living broadcast system and method |
| CN102263959A (en) * | 2011-08-08 | 2011-11-30 | 中国电信股份有限公司 | Direct broadcast transfer method and system |
| WO2017036194A1 (en) * | 2015-08-28 | 2017-03-09 | 腾讯科技(深圳)有限公司 | Data transmission method and system and related device |
| CN106535238A (en) * | 2016-11-02 | 2017-03-22 | 青岛海信移动通信技术股份有限公司 | Link switching method and device |
| CN108347622A (en) * | 2018-03-06 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Multi-medium data method for pushing, device, storage medium and equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109168011A (en) | 2019-01-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109168011B (en) | Network video live broadcast transfer equipment, transfer control system, method and medium | |
| US11880629B2 (en) | Display control method and apparatus | |
| US10405238B2 (en) | Method and apparatus for managing buffer in wireless communication system | |
| CN109819476B (en) | Network optimization method, terminal and storage medium | |
| US9781595B2 (en) | Wireless communication device | |
| US20140119286A1 (en) | Soft handoffs in networks | |
| CN105681881A (en) | Multimedia data transmission method based on mobile terminal, and mobile terminal | |
| EP3076629A1 (en) | Method and device for media multiplexing negotiation | |
| US9479438B2 (en) | Link aggregation based on virtual interfaces of VLANs | |
| US20200314384A1 (en) | System and method of dynamic playback variation for multimedia communication | |
| US12348283B2 (en) | Wireless reliability for devices in motion | |
| US9491772B2 (en) | Methods and systems for placeshifting data with interference mitigation | |
| CN107682384A (en) | Virtual desktop multicast control method, terminal, proxy terminal and cloud desktop server | |
| CN107277780B (en) | Method and device for sending broadcast message, and mobile terminal | |
| US20110307574A1 (en) | Method and system for facilitating one-to-many data transmissions to a plurality of computing devices | |
| CN107247638B (en) | A data backup method, device and system | |
| CN104009934A (en) | Heterogeneous joint communication resource management scheduling machine | |
| CN109361746A (en) | A kind of document transmission method of Internet of Things, work board and readable storage medium storing program for executing | |
| KR102348492B1 (en) | Video transmission system and method for video transmission | |
| US10728911B2 (en) | Wireless communication device | |
| CN103974293A (en) | Network processing method and device | |
| CN114866106A (en) | Multi-module communication system and data processing method | |
| US9317248B2 (en) | Information processing device, subsystem, information processing method, and recording medium storing information processing program | |
| CN116233964A (en) | Method, system, electronic device and storage medium for improving image transmission efficiency | |
| WO2023207986A1 (en) | Call switching method and apparatus, and electronic 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 |