WO2015161680A1 - 一种码流传输方法、装置、服务器和*** - Google Patents

一种码流传输方法、装置、服务器和*** Download PDF

Info

Publication number
WO2015161680A1
WO2015161680A1 PCT/CN2015/070214 CN2015070214W WO2015161680A1 WO 2015161680 A1 WO2015161680 A1 WO 2015161680A1 CN 2015070214 W CN2015070214 W CN 2015070214W WO 2015161680 A1 WO2015161680 A1 WO 2015161680A1
Authority
WO
WIPO (PCT)
Prior art keywords
code stream
encoder
sent
cdn
server
Prior art date
Application number
PCT/CN2015/070214
Other languages
English (en)
French (fr)
Inventor
陈斌
姜炎
平云娟
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015161680A1 publication Critical patent/WO2015161680A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a server, and a system for transmitting a code stream.
  • the code stream transmission method is generally that the encoder passes the code stream through the PUSH (push, active transmission) mode. It is sent to the content delivery network (CDN) central node, and then the CDN central node and the CDN edge node are relayed by PULL (pull, active acquisition), and the traditional code stream transmission method will cause at least the following two. Questions:
  • the IP address of the card at the central node of the CDN is subject to change, and the IP address of the new board is added due to the addition of a new CDN central node.
  • the encoder needs to be modified and adjusted. .
  • the encoder transmits the code stream directly to the CDN central node through the PUSH mode, so that the number of CDN central nodes is limited. If the number of CDN central nodes increases, the performance of the encoder push code stream will be compared. Great impact.
  • the embodiment of the present invention provides a method, a device, a server and a system for transmitting a code stream to solve at least the above problem.
  • An embodiment of the present invention provides a method for transmitting a code stream, including: receiving a code stream sent by an encoder and storing, confirming a download request sent by a CDN node, and sending the code stream sent by the encoder to The CDN node.
  • the code stream sent by the receiving encoder includes: a total index file, a sub-shard file, and a channel index file that are sent by the encoder in sequence; and the confirming the download request sent by the CDN node, including: sequentially confirming the The download total index file request, the download channel index file request, and the download sub-slice file request sent by the CDN node.
  • the method for transmitting the code stream further includes: receiving a delete sub-fragment file command periodically sent by the encoder, and deleting the sub-fragment file that exceeds a preset cache period.
  • the method further includes: counting the number of channels established by the encoder; and sending the alarm information to the network management when the number of the channels exceeds a preset upper threshold.
  • the method further includes: counting the number of the CDN nodes; and sending the alarm information to the network management when the number of the CDN nodes exceeds a preset upper threshold.
  • the method further includes: counting the number of channels established by the encoder; and sending the alarm information to the network management when the number of the channels exceeds a preset upper threshold.
  • the confirming the download request sent by the CDN node further includes: counting the number of the CDN nodes; and sending the alarm information to the network management when the number of the CDN nodes exceeds a preset upper threshold.
  • An embodiment of the present invention further provides a code stream transmission apparatus, including: a receiving module, configured to receive a code stream sent by an encoder; a storage module, configured to store a code stream sent by the encoder; and an acknowledgment module, configured to confirm a CDN node Sending a download request; the sending module is configured to send the code stream sent by the encoder to the CDN node.
  • the receiving module is configured to receive the code stream sent by the encoder in the following manner: the total index file, the sub-shard file, and the channel index file sent by the encoder in sequence; the confirmation module is set to be as follows The mode confirms the download request sent by the CDN node: sequentially confirming the download total index file request, the download channel index file request, and the download sub-fragment file request sent by the CDN node.
  • the foregoing code stream transmission apparatus further includes: a log management module, configured to receive the edit The coder periodically sends a delete sub-fragment file command, and deletes the sub-fragment file that exceeds the preset cache period.
  • a log management module configured to receive the edit The coder periodically sends a delete sub-fragment file command, and deletes the sub-fragment file that exceeds the preset cache period.
  • the foregoing code stream transmission apparatus further includes: a first detecting module, configured to count the number of channels established by the encoder; and an alarm module, configured to: when the number of the channels exceeds a preset upper threshold The NMS sends an alarm.
  • the foregoing code stream transmission device further includes: a second detecting module, configured to count the number of the CDN nodes; and an alarm module, configured to send to the network management when the number of the CDN nodes exceeds a preset upper threshold Alarm information.
  • the foregoing code stream transmission apparatus further includes: a first detecting module, configured to count the number of channels established by the encoder; and a second detecting module, configured to count the number of the CDN nodes;
  • the module is configured to send an alarm message to the network management when the number of the channels exceeds a preset upper threshold, and is further configured to send an alarm message to the network management when the number of the CDN nodes exceeds a preset upper threshold.
  • Embodiments of the present invention also provide a server, which may include a processor and a memory, the memory storing program instructions that, when executed, cause the server to perform the method described above.
  • An embodiment of the present invention provides a code stream transmission system, including an encoder, a CDN node, and at least one server; the encoder is configured to compile and send the original code stream to the server; the CDN node And sending a download request to the server, and acquiring a code stream sent by the server; the server is configured to receive a code stream sent by the encoder, confirm a download request sent by the CDN node, and send the code to the encoder. The code stream is sent to the CDN node.
  • the number of the servers is two, and a heartbeat line is connected between the two servers, and the main standby device is used to prevent a single point of failure.
  • Embodiments of the present invention also provide a computer readable storage medium storing program instructions that, when executed, cause the server to perform the method described above.
  • the code stream sent by the encoder is received, the download request sent by the CDN node is confirmed, and the code stream sent by the encoder is sent to the CDN node, so that the CDN node is later
  • the encoder does not need to be modified when the board IP address is changed or other CDN nodes are added. And when the number of CDN nodes increases, the performance of the encoder remains stable and is not affected by the number of CDN nodes.
  • FIG. 1 is a flowchart of a code stream transmission method according to an embodiment of the present invention.
  • FIG. 3 is a block diagram showing the structure of a code stream transmission apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing an optional structure of a code stream transmission apparatus according to an embodiment of the present invention.
  • FIG. 5 is a block diagram 2 of an optional structure of a code stream transmission apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a code stream transmission server according to an embodiment of the present invention.
  • FIG. 7 is a block diagram showing an optional structure of a code stream transmission system networking according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a code stream transmission method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps (S101 to S103):
  • the encoder receives the original code stream and sends it to the server, and the server stores the code stream sent by the encoder and stores the code stream locally, when the CDN node sends the code stream to the server.
  • the above server confirms the download request and sends the stored code stream to the CDN node.
  • the code stream sent by the encoder is received, the download request sent by the CDN node is confirmed, and the code stream sent by the encoder is sent to the CDN node, so that the IP address of the CDN node is changed or increased.
  • the encoder does not need to make any changes to other CDN nodes. And when the number of CDN nodes increases, the performance of the encoder remains stable and is not affected by the number of CDN nodes.
  • FIG. 2 is an optional flowchart of a code stream transmission method according to an embodiment of the present invention.
  • the code stream transmission method may include the following steps (S201 to S211). :
  • the encoder prepares a source code stream, performs coding and segmentation
  • the encoder uploads the total index file to the server.
  • the encoder uploads the sub-shard file to the server.
  • the encoder uploads the channel index file to the server.
  • the CDN node sends a request for downloading a total index file to the server.
  • the server sends the total index file sent by the encoder to the CDN node.
  • the CDN node sends a download channel index file request to the server.
  • the server sends the channel index file sent by the encoder to the CDN node.
  • the CDN node sends a download sub-slice file request to the server.
  • the server sends the sub-fragment file sent by the encoder to the CDN node.
  • the command to delete the sub-shard file sent by the encoder may be received, the cached period of the stored sub-shard file is set in advance, and the sub-fragment file exceeding the cache period is deleted. . This can periodically clear the cache to ensure sufficient code stream storage space.
  • the server can also set the storage policy by itself, and delete the stored code stream according to the policy.
  • the code stream sent by the encoder is received, and the number of channels established by the encoder is also counted, and an upper threshold is set. When the number of channels established by the encoder exceeds a set upper threshold. Send an alarm message and report the alarm information sent to the network to the network. tube. After the alarm is cleared, the information about the alarm is also reported to the NMS.
  • the number of channels established by the encoder is counted and an upper threshold is set. When the number of channels established by the encoder exceeds the upper threshold, the alarm information is sent to include the following steps:
  • a time is preset, such as 10 seconds, 20 seconds, 30 seconds, 40 seconds, etc., and the channel counter is decremented by 1 when the channel counter does not respond within the time.
  • the number of CDN nodes that send the download request may be counted and an upper threshold is set, and when the number of CDN nodes that send the download request exceeds the upper threshold.
  • the alarm information is sent, and the alarm information sent by the above is reported to the NMS. After the alarm is cleared, the information about the alarm is also reported to the NMS.
  • the number of the CDN nodes that send the download request is counted, and the upper threshold is set.
  • a time is preset, such as 10 seconds, 20 seconds, 30 seconds, 40 seconds, etc., and the user counter is decremented by 1 when the user counter does not respond within the time.
  • the code stream sent by the encoder is received, and the number of channels established by the encoder is counted and an upper threshold is set, and when the number of channels established by the encoder exceeds a set upper threshold, the identifier is sent.
  • the alarm information confirms the download request sent by the CDN node, and can also count the number of CDN nodes that send the download request and set an upper threshold, when sent.
  • the alarm information is sent when the number of the requested CDN nodes exceeds the upper threshold.
  • the alarm information sent is reported to the NMS. After the alarm is cleared, the information about the alarm is also reported to the NMS.
  • FIG. 3 is a structural block diagram of a code stream transmission apparatus according to an embodiment of the present invention.
  • the apparatus includes: a receiving module 301, a storage module 302, and a confirmation.
  • the module 303 and the sending module 304 wherein the receiving module 301 is configured to receive the code stream sent by the encoder, the storage module 302 is configured to store the code stream received by the receiving module, and store the code stream, and the confirmation module 303 is configured to receive And confirming the download request sent by the CDN node; the sending module 304 is configured to send the code stream sent by the encoder after the confirmation module 303 completes the confirmation to the CDN node.
  • the receiving module 301 receives the code stream sent by the encoder and stores it in the storage module 302.
  • the confirmation module 303 receives the download request sent by the CDN node and completes the confirmation, and the sending module 304 then prepares the encoder.
  • the sent code stream is sent to the CDN node, so that the encoder does not need to be directly connected to the CDN node, that is, the encoder does not need to fill in the IP address of the CDN node board, and the encoder does not need to be added when the CDN node is added or the board IP address changes occur. Making changes will not affect the performance of the encoder.
  • FIG. 4 is an optional structural block diagram of a code stream transmission apparatus according to an embodiment of the present invention.
  • the apparatus may further include: a log management module 305.
  • the storage space of the code stream storage device 302 is limited. In the actual working process, the storage module 302 is likely to accumulate a large number of redundant sub-shard files, and the log management module 305 is responsible for receiving the encoder periodically.
  • the sub-fragment file command is deleted, and the sub-fragment file stored in the storage module 302 is set to a cache period. After receiving the command to delete the sub-fragment file sent by the encoder, the sub-fragment file exceeding the cache period is deleted. To ensure that the storage module 302 has sufficient storage space.
  • FIG. 5 is a block diagram of an optional block diagram of a code stream transmission apparatus according to an embodiment of the present invention. As shown in FIG. 5, the apparatus may further include: a first detection module 307, The second detection module 308 and the alarm module 306.
  • the first detecting module 307 counts the number of channels established by the encoder, and sets an upper threshold. When the number of the channels exceeds the upper threshold, the alarm information is sent.
  • the second detecting module 308 sends the number of CDN nodes that send the download request. Counting and setting an upper threshold, the CDN nodes When the number exceeds the upper threshold, the alarm information is sent; the alarm module 306 collects the alarm information sent and reports the information to the network management system; when the number of channels or the number of CDN nodes exceeds the upper threshold, the first detection module 307 or the second The detection module 308 sends the alarm information, and the alarm module 306 collects the alarm information and reports it to the network management system. When the alarm is removed from the first detection module 307 or the second detection module 308, the alarm module 306 also reports the alarm elimination information to the network management system.
  • the number of channels established by the encoder is counted and an upper threshold is set, and when the number of channels established by the encoder exceeds the set upper threshold, an alarm message is sent, and the number of CDN nodes that send the download request is counted.
  • the upper threshold is set.
  • the first detecting module 307 sets a channel counter, and sets the channel counter to the upper limit of the counting; the second detecting module 308 sets a user counter, and sets the user counter to the upper limit of counting.
  • the first detecting module After receiving the channel establishment request sent by the encoder, the first detecting module detects whether the channel number exceeds the upper limit of the channel counter. After receiving the download request sent by the CDN node, the second detecting module detects whether the number of CDN nodes exceeds the user counter. The upper limit of the count.
  • S705 preset a time, such as 10 seconds, 20 seconds, 30 seconds, 40 seconds, etc., if the channel counter does not respond within the time, the channel counter is decremented by 1; a preset time, such as 10 seconds, 20 Seconds, 30 seconds, 40 seconds, etc., during which the user counter does not respond, the user counter is decremented by one.
  • first detection module and the second detection module do not have to be included in the device at the same time, and may include only the first detection module and the alarm module, or only the second detection module and the alarm module.
  • the foregoing embodiment can include a log management module at the same time.
  • FIG. 6 is a structural block diagram of a code stream transmission server according to an embodiment of the present invention.
  • the server may include a processor 405; Block 401, configured to receive a code stream sent after the encoder is programmed; the storage module 402 is configured to store the code stream received by the receiving module; the confirmation module 403 is configured to receive and confirm a download request sent by the CDN node; and the sending module 404 After the confirmation module 403 completes the confirmation, the code stream sent by the encoder is sent to the CDN node.
  • the server in the embodiment of the present invention may further include an alarm module, and may also include an alarm module and the first detection module and/or the second detection module.
  • the foregoing embodiment can include a log management module at the same time.
  • An embodiment of the present invention further provides a code stream transmission system, where the code stream transmission system includes an encoder, a CDN node, and a server, wherein the server may be set to one or two or more; the following is to set two servers as The details are explained.
  • the system includes a server 1 and a server 2, which are mutually standby and connected by a heartbeat line.
  • the encoder is connected to the server 1 and transmits the code stream to the server 1.
  • the server 1 is connected to the CDN node, receives and confirms the download request sent by the CDN node, and transmits the code stream to the CDN node.
  • the heartbeat detects the fault and reflects it to the backup machine, that is, the server 2, and the server 2 can immediately replace the server 1 to receive the code stream sent by the encoder, receive and confirm the download request sent by the CDN node and
  • the code stream is sent to the CDN node, which ensures the smooth operation of the network and the normal operation of the service.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • Each device/function module/function unit in the above embodiment is implemented in the form of a software function module. And when sold or used as a stand-alone product, it can be stored on a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the code stream sent by the encoder is received, the download request sent by the CDN node is confirmed, and the code stream sent by the encoder is sent to the CDN node, so that the IP address of the CDN node is changed or increased.
  • the encoder does not need to make any changes to other CDN nodes. And when the number of CDN nodes increases, the performance of the encoder remains stable and is not affected by the number of CDN nodes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种码流传输方法、装置、服务器和***,其中,所述码流传输方法包括:接收编码器发送的码流并存储,确认CDN节点发送的下载请求,将上述编码器发送的码流发送给上述CDN节点。

Description

一种码流传输方法、装置、服务器和*** 技术领域
本发明涉及通信技术领域,尤其涉及一种码流的传输方法、装置、服务器和***。
背景技术
在交互式网络电视(Internet Protocol Television,简称IPTV)/网络电视机顶盒业务(Over The Top,简称OTT)***内,码流的传输方法一般是编码器将码流通过PUSH(推送,主动发送)方式发送到内容分发网络(Content Delivery Network,CDN)中心节点,然后CDN中心节点与CDN边缘节点之间再通过PULL(拉取,主动获取)方式进行中继,传统码流传输方式会造成至少以下两个问题:
1、在实际应用中,CDN中心节点的单板IP地址往往会有变动,也会因为增加新的CDN中心节点而导致增加新的单板IP地址,这时就需要对编码器进行改动和调整。
2、编码器将码流通过PUSH方式直接推送给CDN中心节点这一传输方式,使得CDN中心节点个数受到限制,如果CDN中心节点个数增加较多,编码器推送码流的性能会受到较大影响。
针对相关技术中编码器随CDN节点变动而受影响的问题,目前尚未提出有效的解决方案。
发明内容
针对相关技术中编码器随CDN节点变动而受影响的问题,本发明实施例提供了一种码流的传输方法、装置、服务器及***,以至少解决上述问题。
本发明实施例提供了一种码流的传输方法,包括:接收编码器发送的码流并存储,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给 所述CDN节点。
可选地,所述接收编码器发送的码流,包括:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;所述确认CDN节点发送的下载请求,包括:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。
可选地,上述码流的传输方法还包括:接收所述编码器定时发送的删除子分片文件命令,将超过预设缓存期的所述子分片文件删除。
可选地,所述接收编码器发送的码流之后,还包括:对所述编码器建立的频道个数进行计数;在所述频道个数超过预设上限阈值时,向网管发出告警信息。
可选地,所述确认CDN节点发送的下载请求之后,还包括:对所述CDN节点个数进行计数;在所述CDN节点个数超过预设上限阈值时,向网管发出告警信息。
可选地,所述接收编码器发送的码流之后,还包括:对所述编码器建立的频道个数进行计数;在所述频道个数超过预设上限阈值时,向网管发出告警信息。所述确认CDN节点发送的下载请求,还包括:对所述CDN节点个数进行计数;在所述CDN节点个数超过预设上限阈值时,向网管发出告警信息。
本发明实施例还提供了一种码流传输装置,包括:接收模块,设置为接收编码器发送的码流;存储模块,用于存储编码器发送的码流;确认模块,设置为确认CDN节点发送的下载请求;发送模块,设置为将所述编码器发送的码流发送给所述CDN节点。
可选地,所述接收模块是设置为以如下方式接收编码器发送的码流:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;所述确认模块是设置为以如下方式确认所述CDN节点发送的下载请求:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。
可选地,上述码流传输装置还包括:日志管理模块,设置为接收所述编 码器定时发送的删除子分片文件命令,并将超过预设缓存期的所述子分片文件删除。
可选地,上述码流传输装置还包括:第一检测模块,设置为对所述编码器建立的频道个数进行计数;告警模块,设置为在所述频道个数超过预设上限阈值时向网管发出告警信息。
可选地,上述码流传输装置还包括:第二检测模块,设置为对所述CDN节点个数进行计数;告警模块,设置为在所述CDN节点个数超过预设上限阈值时向网管发出告警信息。
可选地,上述码流传输装置还包括:第一检测模块,设置为对所述编码器建立的频道个数进行计数;第二检测模块,设置为对所述CDN节点个数进行计数;告警模块,设置为在所述频道个数超过预设上限阈值时向网管发出告警信息,还设置为在所述CDN节点个数超过预设上限阈值时向网管发出告警信息。
本发明实施例还提供了一种服务器,该服务器可以包括处理器和存储器,所述存储器存储有程序指令,当该程序指令被执行时使得所述服务器可执行前面所述的方法。
本发明实施例提供了一种码流传输***,包括编码器、CDN节点,还包括至少一个服务器;所述编码器,设置为对原始码流进行编制并发送给所述服务器;所述CDN节点,设置为于向所述服务器发送下载请求,并获取所述服务器发送的码流;所述服务器设置为接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点。
可选地,所述服务器个数为两个,两个服务器之间连接有心跳线,互为主备机,用来防止发生单点故障。
本发明实施例还提供一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时使得所述服务器可执行前面所述的方法。
通过本发明实施例,接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点,使得以后CDN节点 单板IP地址有改动或者增加其他CDN节点时,编码器不需要做任何改动。并且当CDN节点个数增加较多时,编码器的工作性能依然保持稳定,不受CDN节点个数变化的影响。
附图概述
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的码流传输方法的流程图;
图2是根据本发明实施例的码流传输方法可选的流程图;
图3是根据本发明实施例的码流传输装置的结构框图;
图4是根据本发明实施例的码流传输装置可选的结构框图一;
图5是根据本发明实施例的码流传输装置可选的结构框图二;
图6是根据本发明实施例的码流传输服务器的结构框图;
图7是根据本发明实施例的码流传输***组网方式可选的结构框图。
本发明的较佳实施方式
下文中将参考附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
本发明实施例提供了一种码流传输的方法,图1是根据本发明实施例的码流传输方法的流程图,如图1所示,该方法包括以下步骤(S101至S103):
S101,接收编码器发送的码流并存储;
S102,确认CDN节点发送的下载请求;
S103,将上述编码器发送的码流发送给上述CDN节点。
在本实施例中,编码器接收原始码流并进行编制后发送给服务器,服务器接收到编码器发送的码流后在本地存储该码流,当CDN节点向服务器发送 下载请求时,上述服务器确认所述下载请求并将已存储的码流发送给CDN节点。
通过本发明实施例,接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点,使得以后CDN节点单板IP地址有改动或者增加其他CDN节点时,编码器不需要做任何改动。并且当CDN节点个数增加较多时,编码器的工作性能依然保持稳定,不受CDN节点个数变化的影响。
在本发明实施例的一个实施方式中,图2是根据本发明实施例的码流传输方法可选的流程图,如图2所示,上述码流传输方法可以包括以下步骤(S201至S211):
S201,编码器编制原始码流,进行编码和分段;
S202,编码器将总索引文件上传到服务器;
S203,编码器将子分片文件上传到服务器;
S204,编码器将通道索引文件上传到服务器;
S205,CDN节点向服务器发送下载总索引文件请求;
S206,服务器将编码器发送的总索引文件发送给CDN节点;
S207,CDN节点向服务器发送下载通道索引文件请求;
S208,服务器将编码器发送的通道索引文件发送给CDN节点;
S209,CDN节点向服务器发送下载子分片文件请求;
S210,服务器将编码器发送的子分片文件发送给CDN节点。
在本发明实施例的一个实施方式中,还可以接收编码器定时发送的删除子分片文件命令,预先将存储的子分片文件设置缓存期,并将超过缓存期的上述子分片文件删除。这样可以定时清理缓存,保证足够的码流存储空间。另外,服务器也可以自己设定存储策略,依据策略删除存储的码流。
在本发明实施例的一个实施方式中,接收编码器发送的码流,还可以对编码器建立的频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息,同时将上述发出的告警信息上报给网 管。告警消除后,也会将告警消除的信息上报给网管。可选的,对编码器建立的频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息包括以下步骤:
S501,设置一个频道计数器,并将频道计数器设置计数上限;
S502,收到编码器发送的建立频道请求后检测频道个数是否超过频道计数器的计数上限;
S503,若没有超过频道计数器的计数上限,则把频道计数器加1;
S504,若超过了频道计数器的计数上限,则拒绝编码器的请求并告警;
S505,预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内频道计数器没有响应,则把频道计数器减1。
在本发明实施例的一个实施方式中,确认CDN节点发送的下载请求,还可以对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下载请求的CDN节点个数超过上限阈值时发出告警信息,同时将上述发出的告警信息上报给网管。告警消除后,也会将告警消除的信息上报给网管。可选的,对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下载请求的CDN节点个数超过上限阈值时发出告警信息包括以下步骤:
S601,设置一个用户计数器,并将用户计数器设置计数上限;
S602,收到CDN节点发送的下载请求后检测CDN节点个数是否超过用户计数器的计数上限;
S603,若没有超过用户计数器的计数上限,则把用户计数器加1;
S604,若超过了用户计数器的计数上限,则拒绝CDN节点的下载请求并告警;
S605,预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内用户计数器没有响应,则把用户计数器减1。
在本发明实施例的一个实施方式中,接收编码器发送的码流,还可以对编码器建立频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息,同时,确认CDN节点发送的下载请求,还可以对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下 载请求的CDN节点个数超过上限阈值时发出告警信息;同时,将上述发出的告警信息上报给网管。告警消除后,也会将告警消除的信息上报给网管。
本发明实施例还提供了一种码流传输装置,图3是根据本发明实施例的码流传输装置的结构框图,如图3所示,该装置包括:接收模块301、存储模块302、确认模块303和发送模块304,其中,接收模块301设置为接收编码器编制后发送的码流;存储模块302,用于存储上述接收模块接收的码流;中进行存储;确认模块303,设置为接收并确认CDN节点发送的下载请求;发送模块304,设置为在确认模块303完成确认后将所述编码器编制后发送的码流发送给所述CDN节点。
通过本发明实施例,接收模块301接收编码器编制后发送的码流,并在存储模块302中存储,确认模块303接收CDN节点发送的下载请求并完成确认,发送模块304随即将编码器编制后发送的码流发送给上述CDN节点,使得编码器不需要与CDN节点直接相连,即编码器不需要填写CDN节点单板IP地址,在CDN节点增加或发生单板IP地址变动时,编码器无需做出改动,也不会影响编码器工作性能。
在本发明实施例的一个实施方式中,图4是根据本发明实施例的码流传输装置可选的结构框图之一,如图4所示,上述装置还可以包括:日志管理模块305。上述码流传输装置存储模块302的存储空间是有限的,上述装置在实际工作过程中,存储模块302内很可能会积累大量多余的子分片文件,日志管理模块305负责接收编码器定时发送的删除子分片文件命令,将存储在存储模块302中的子分片文件设置缓存期,在接收到编码器定时发送的删除子分片文件命令后,将超过缓存期的上述子分片文件删除,以保证存储模块302有足够的存储空间。
在本发明实施例的一个实施方式中,图5是根据本发明实施例的码流传输装置可选的结构框图之二,如图5所示,上述装置还可以包括:第一检测模块307、第二检测模块308和告警模块306。
第一检测模块307,对编码器建立的频道个数进行计数,并设置上限阈值,所述频道个数超过上限阈值时发出告警信息;第二检测模块308,对发送下载请求的CDN节点个数进行计数,并设置上限阈值,所述CDN节点个 数超过上限阈值时发出告警信息;告警模块306,收集上述发出的告警信息并上报给网管;当所述频道个数或CDN节点个数超过各自的上限阈值时,第一检测模块307或第二检测模块308发出告警信息,告警模块306即将告警信息收集并上报给网管,当第一检测模块307或第二检测模块308告警消除后,告警模块306也会将告警消除的信息上报给网管。
可选的,对编码器建立的频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息,以及对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下载请求的CDN节点个数超过上限阈值时发出告警信息包括以下步骤:
S701,第一检测模块307设置一个频道计数器,并将频道计数器设置计数上限;第二检测模块308设置一个用户计数器,并将用户计数器设置计数上限。
S702,收到编码器发送的建立频道请求后,第一检测模块检测频道数是否超过频道计数器的计数上限;收到CDN节点发送的下载请求后第二检测模块检测CDN节点个数是否超过用户计数器的计数上限。
S703,若没有超过频道计数器的计数上限,则把频道计数器加1;若没有超过用户计数器的计数上限,则把用户计数器加1。
S704,若超过了频道计数器的计数上限,则拒绝编码器的请求并告警;若超过了用户计数器的计数上限,则拒绝CDN节点的下载请求并告警。
S705,预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内频道计数器没有响应,则把频道计数器减1;预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内用户计数器没有响应,则把用户计数器减1。
需要说明的是,第一检测模块和第二检测模块并不是必须同时包括在上述装置内,可以只包括第一检测模块和告警模块,也可以只包括第二检测模块和告警模块。当然上述实施例中均可以同时包括日志管理模块。
本发明实施例还提供了一种服务器,图6是根据本发明实施例的码流传输服务器的结构框图,如图6所示,该服务器可以包括处理器405;接收模 块401,设置为接收编码器编制后发送的码流;存储模块402,设置为存储上述接收模块接收的码流;确认模块403,设置为接收并确认CDN节点发送的下载请求;发送模块404,在确认模块403完成确认后将所述编码器编制后发送的码流发送给所述CDN节点。
本发明实施例中的服务器还可以包括告警模块,也可以包括告警模块与第一检测模块和/或第二检测模块。当然上述实施例中均可以同时包括日志管理模块。
本发明实施例还提供了一种码流传输***,该码流传输***包括编码器、CDN节点、服务器,其中服务器可以设置为一个或者两个及两个以上;下述以设置两个服务器为例详细说明。如图7所示中该***包括服务器1和服务器2,两者互为主备机,并通过心跳线相连。
如图7所示,编码器与服务器1相连,并将码流发送给服务器1,服务器1与CDN节点相连,接收、确认CDN节点发送的下载请求并将码流发送给CDN节点。当服务器1发生故障不能正常工作时,心跳线检测到故障并反映给备份机即服务器2,服务器2可以立即替代服务器1接收编码器发送的码流,接收、确认CDN节点发送的下载请求并将码流发送给CDN节点,这样就能保证网络通畅和服务的正常运行。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如***、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现 并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
通过本发明实施例,接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点,使得以后CDN节点单板IP地址有改动或者增加其他CDN节点时,编码器不需要做任何改动。并且当CDN节点个数增加较多时,编码器的工作性能依然保持稳定,不受CDN节点个数变化的影响。

Claims (14)

  1. 一种码流传输方法,包括:
    接收编码器发送的码流并存储;
    确认内容分发网络(CDN)节点发送的下载请求;
    根据所述下载请求,将对应的所述码流发送给所述CDN节点。
  2. 根据权利要求1所述的方法,其中,
    所述接收编码器发送的码流,包括:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;
    所述确认CDN节点发送的下载请求,包括:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。
  3. 根据权力要求2所述的方法,还包括:接收所述编码器定时发送的删除子分片文件命令,将超过预设缓存期的所述子分片文件删除。
  4. 根据权利要求1所述的方法,其中,所述接收编码器发送的码流之后,所述方法还包括:
    对所述编码器建立的频道个数进行计数;
    在所述频道个数超过预设上限阈值时,向网管发出告警信息。
  5. 根据权利要求1或4所述的方法,其中,所述确认CDN节点发送的下载请求之后,所述方法还包括:
    对所述CDN节点个数进行计数;
    在所述CDN节点个数超过预设上限阈值时,向网管发出告警信息。
  6. 一种码流传输装置,包括:
    接收模块,其设置为:接收编码器发送的码流;
    存储模块,其设置为:存储编码器发送的码流;
    确认模块,其设置为:确认内容分发网络(CDN)节点发送的下载请求;以及
    发送模块,其设置为:将所述编码器发送的码流发送给所述CDN节点。
  7. 根据权利要求6所述的码流传输装置,其中,
    所述接收模块是设置为以如下方式接收编码器发送的码流:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;
    所述确认模块是设置为以如下方式确认所述CDN节点发送的下载请求:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。
  8. 根据权利要求7所述的码流传输装置,还包括:
    日志管理模块,其设置为:接收所述编码器定时发送的删除子分片文件命令,并将超过预设缓存期的所述子分片文件删除。
  9. 根据权利要求6所述的码流传输装置,还包括:
    第一检测模块,其设置为:对所述编码器建立的频道个数进行计数;以及
    告警模块,其设置为:在所述频道个数超过预设上限阈值时向网管发出告警信息。
  10. 根据权利要求6所述的码流传输装置,还包括:
    第二检测模块,其设置为:对所述CDN节点个数进行计数;以及
    告警模块,其设置为:在所述CDN节点个数超过预设上限阈值时向网管发出告警信息。
  11. 一种服务器,包括:
    处理器和存储器;
    所述存储器存储有程序指令,当该程序指令被执行时使得所述服务器可执行权利要求1-5任一项所述的方法。
  12. 一种码流传输***,包括编码器、内容分发网络(CDN)节点,还包括至少一个服务器;
    所述编码器设置为对原始码流进行编制并发送给所述服务器;
    所述CDN节点设置为向所述服务器发送下载请求,并获取所述服务器发送的码流;
    所述服务器设置为接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点。
  13. 根据权利要求12所述的码流传输***,其中:所述服务器个数为两个,两个服务器之间连接有心跳线,互为主备机。
  14. 一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时使得所述服务器可执行权利要求1-5任一项所述的方法。
PCT/CN2015/070214 2014-04-24 2015-01-06 一种码流传输方法、装置、服务器和*** WO2015161680A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410169797.8 2014-04-24
CN201410169797.8A CN105007499B (zh) 2014-04-24 2014-04-24 一种码流传输方法、装置和服务器

Publications (1)

Publication Number Publication Date
WO2015161680A1 true WO2015161680A1 (zh) 2015-10-29

Family

ID=54331710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/070214 WO2015161680A1 (zh) 2014-04-24 2015-01-06 一种码流传输方法、装置、服务器和***

Country Status (2)

Country Link
CN (1) CN105007499B (zh)
WO (1) WO2015161680A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449237A (zh) * 2019-08-12 2021-03-05 中兴通讯股份有限公司 一种检测视频码流的方法、装置及***

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534204A (zh) * 2008-03-10 2009-09-16 ***集团宽带业务应用国家工程实验室有限公司 流媒体信息分发***和方法及客户端
CN101951412A (zh) * 2010-10-15 2011-01-19 上海交通大学 基于http协议的多子流流媒体传输***及其传输方法
CN102231749A (zh) * 2011-08-12 2011-11-02 乐视网信息技术(北京)股份有限公司 一种利用cdn网络传输直播流的***和方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534204A (zh) * 2008-03-10 2009-09-16 ***集团宽带业务应用国家工程实验室有限公司 流媒体信息分发***和方法及客户端
CN101951412A (zh) * 2010-10-15 2011-01-19 上海交通大学 基于http协议的多子流流媒体传输***及其传输方法
CN102231749A (zh) * 2011-08-12 2011-11-02 乐视网信息技术(北京)股份有限公司 一种利用cdn网络传输直播流的***和方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449237A (zh) * 2019-08-12 2021-03-05 中兴通讯股份有限公司 一种检测视频码流的方法、装置及***
CN112449237B (zh) * 2019-08-12 2023-05-05 中兴通讯股份有限公司 一种检测视频码流的方法、装置及***

Also Published As

Publication number Publication date
CN105007499B (zh) 2019-06-21
CN105007499A (zh) 2015-10-28

Similar Documents

Publication Publication Date Title
CN106993054B (zh) 文件分发方法、节点及***
CN105634784B (zh) 控制数据分发方法、装置及***
US20140089619A1 (en) Object replication framework for a distributed computing environment
CN104636437B (zh) 一种事件通知方法、***的处理方法及装置
KR101179472B1 (ko) 파일관리 시스템 및 파일관리시스템의 컨텐츠 제공 방법
WO2016127884A1 (zh) 消息推送方法及装置
US20140188801A1 (en) Method and system for intelligent load balancing
CN105472002A (zh) 基于集群节点间即时拷贝的会话同步方法
JP2012507797A (ja) 拡張可能なパフォーマンス管理システム
CN110830283A (zh) 故障检测方法、装置、设备和***
US20200057768A1 (en) Unique identification generation for records in a data streaming processing system
CN104618221A (zh) 一种去中心化的消息服务***
WO2019218479A1 (zh) 一种信息的发送方法及设备
US9832255B2 (en) Event distribution method, control device, and processor on software-defined network
WO2019024910A1 (zh) 存储资源回收方法、装置及***
JP6434021B2 (ja) データフィードの管理
KR101768365B1 (ko) M2M/IoT 시스템의 구독-통지에서 통지 실패 관리 방법 및 시스템
CN108156040A (zh) 一种分布式云存储***中的中央控制节点
WO2023061060A1 (zh) 音视频码流的调度方法、***、介质及电子装置
EP3803616A1 (en) Change notifications for object storage
JP2010213150A (ja) 送信装置、大容量ファイル配信システム、同システムにおけるファィル再送制御方法、再送制御プログラム
WO2015161680A1 (zh) 一种码流传输方法、装置、服务器和***
WO2016082485A1 (zh) 一种码流传输方法、装置、服务器和***
WO2016101409A1 (zh) 数据倒换的方法、设备及***
WO2014032553A1 (zh) 一种网络资源管理方法、装置、客户端及***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15782606

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15782606

Country of ref document: EP

Kind code of ref document: A1