WO2015161680A1 - Code stream transmission method, device, server and system - Google Patents

Code stream transmission method, device, server and system 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
French (fr)
Chinese (zh)
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/en

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)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A code stream transmission method, device, server and system. The code stream transmission method comprises: receiving a code stream sent by an encoder and storing same; confirming a download request sent by a CDN node; and sending the code stream sent by the encoder to the CDN node.

Description

一种码流传输方法、装置、服务器和系统Code stream transmission method, device, server and system 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种码流的传输方法、装置、服务器和系统。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.
背景技术Background technique
在交互式网络电视(Internet Protocol Television,简称IPTV)/网络电视机顶盒业务(Over The Top,简称OTT)系统内,码流的传输方法一般是编码器将码流通过PUSH(推送,主动发送)方式发送到内容分发网络(Content Delivery Network,CDN)中心节点,然后CDN中心节点与CDN边缘节点之间再通过PULL(拉取,主动获取)方式进行中继,传统码流传输方式会造成至少以下两个问题:In the Internet Protocol Television (IPTV)/Overview Network (OTT) system, 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:
1、在实际应用中,CDN中心节点的单板IP地址往往会有变动,也会因为增加新的CDN中心节点而导致增加新的单板IP地址,这时就需要对编码器进行改动和调整。1. In actual applications, 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. In this case, the encoder needs to be modified and adjusted. .
2、编码器将码流通过PUSH方式直接推送给CDN中心节点这一传输方式,使得CDN中心节点个数受到限制,如果CDN中心节点个数增加较多,编码器推送码流的性能会受到较大影响。2. 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.
针对相关技术中编码器随CDN节点变动而受影响的问题,目前尚未提出有效的解决方案。In view of the problem that the encoder in the related art is affected by the change of the CDN node, an effective solution has not been proposed yet.
发明内容Summary of the invention
针对相关技术中编码器随CDN节点变动而受影响的问题,本发明实施例提供了一种码流的传输方法、装置、服务器及系统,以至少解决上述问题。For the problem that the encoder is affected by the change of the CDN node in the related art, 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.
本发明实施例提供了一种码流的传输方法,包括:接收编码器发送的码流并存储,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给 所述CDN节点。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.
可选地,所述接收编码器发送的码流,包括:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;所述确认CDN节点发送的下载请求,包括:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。Optionally, 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.
可选地,上述码流的传输方法还包括:接收所述编码器定时发送的删除子分片文件命令,将超过预设缓存期的所述子分片文件删除。Optionally, 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.
可选地,所述接收编码器发送的码流之后,还包括:对所述编码器建立的频道个数进行计数;在所述频道个数超过预设上限阈值时,向网管发出告警信息。Optionally, after the receiving the code stream sent by the encoder, 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.
可选地,所述确认CDN节点发送的下载请求之后,还包括:对所述CDN节点个数进行计数;在所述CDN节点个数超过预设上限阈值时,向网管发出告警信息。Optionally, after the confirming the download request sent by the CDN node, 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.
可选地,所述接收编码器发送的码流之后,还包括:对所述编码器建立的频道个数进行计数;在所述频道个数超过预设上限阈值时,向网管发出告警信息。所述确认CDN节点发送的下载请求,还包括:对所述CDN节点个数进行计数;在所述CDN节点个数超过预设上限阈值时,向网管发出告警信息。Optionally, after the receiving the code stream sent by the encoder, 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.
本发明实施例还提供了一种码流传输装置,包括:接收模块,设置为接收编码器发送的码流;存储模块,用于存储编码器发送的码流;确认模块,设置为确认CDN节点发送的下载请求;发送模块,设置为将所述编码器发送的码流发送给所述CDN节点。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.
可选地,所述接收模块是设置为以如下方式接收编码器发送的码流:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;所述确认模块是设置为以如下方式确认所述CDN节点发送的下载请求:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。Optionally, 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.
可选地,上述码流传输装置还包括:日志管理模块,设置为接收所述编 码器定时发送的删除子分片文件命令,并将超过预设缓存期的所述子分片文件删除。Optionally, 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.
可选地,上述码流传输装置还包括:第一检测模块,设置为对所述编码器建立的频道个数进行计数;告警模块,设置为在所述频道个数超过预设上限阈值时向网管发出告警信息。Optionally, 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.
可选地,上述码流传输装置还包括:第二检测模块,设置为对所述CDN节点个数进行计数;告警模块,设置为在所述CDN节点个数超过预设上限阈值时向网管发出告警信息。Optionally, 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.
可选地,上述码流传输装置还包括:第一检测模块,设置为对所述编码器建立的频道个数进行计数;第二检测模块,设置为对所述CDN节点个数进行计数;告警模块,设置为在所述频道个数超过预设上限阈值时向网管发出告警信息,还设置为在所述CDN节点个数超过预设上限阈值时向网管发出告警信息。Optionally, 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.
本发明实施例提供了一种码流传输系统,包括编码器、CDN节点,还包括至少一个服务器;所述编码器,设置为对原始码流进行编制并发送给所述服务器;所述CDN节点,设置为于向所述服务器发送下载请求,并获取所述服务器发送的码流;所述服务器设置为接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点。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.
可选地,所述服务器个数为两个,两个服务器之间连接有心跳线,互为主备机,用来防止发生单点故障。Optionally, 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.
通过本发明实施例,接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点,使得以后CDN节点 单板IP地址有改动或者增加其他CDN节点时,编码器不需要做任何改动。并且当CDN节点个数增加较多时,编码器的工作性能依然保持稳定,不受CDN节点个数变化的影响。According to the embodiment of the present invention, 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.
附图概述BRIEF abstract
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的码流传输方法的流程图;1 is a flowchart of a code stream transmission method according to an embodiment of the present invention;
图2是根据本发明实施例的码流传输方法可选的流程图;2 is an optional flowchart of a code stream transmission method according to an embodiment of the present invention;
图3是根据本发明实施例的码流传输装置的结构框图;3 is a block diagram showing the structure of a code stream transmission apparatus according to an embodiment of the present invention;
图4是根据本发明实施例的码流传输装置可选的结构框图一;4 is a block diagram showing an optional structure of a code stream transmission apparatus according to an embodiment of the present invention;
图5是根据本发明实施例的码流传输装置可选的结构框图二;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是根据本发明实施例的码流传输服务器的结构框图;6 is a structural block diagram of a code stream transmission server according to an embodiment of the present invention;
图7是根据本发明实施例的码流传输系统组网方式可选的结构框图。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.
本发明的较佳实施方式Preferred embodiment of the invention
下文中将参考附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
本发明实施例提供了一种码流传输的方法,图1是根据本发明实施例的码流传输方法的流程图,如图1所示,该方法包括以下步骤(S101至S103):The embodiment of the present invention provides a method for code stream transmission. 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):
S101,接收编码器发送的码流并存储;S101. Receive a code stream sent by an encoder and store the code stream.
S102,确认CDN节点发送的下载请求;S102. Confirm a download request sent by the CDN node.
S103,将上述编码器发送的码流发送给上述CDN节点。S103. Send the code stream sent by the encoder to the CDN node.
在本实施例中,编码器接收原始码流并进行编制后发送给服务器,服务器接收到编码器发送的码流后在本地存储该码流,当CDN节点向服务器发送 下载请求时,上述服务器确认所述下载请求并将已存储的码流发送给CDN节点。In this embodiment, 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. When downloading the request, the above server confirms the download request and sends the stored code stream to the CDN node.
通过本发明实施例,接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点,使得以后CDN节点单板IP地址有改动或者增加其他CDN节点时,编码器不需要做任何改动。并且当CDN节点个数增加较多时,编码器的工作性能依然保持稳定,不受CDN节点个数变化的影响。According to the embodiment of the present invention, 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.
在本发明实施例的一个实施方式中,图2是根据本发明实施例的码流传输方法可选的流程图,如图2所示,上述码流传输方法可以包括以下步骤(S201至S211):In an embodiment of the present invention, FIG. 2 is an optional flowchart of a code stream transmission method according to an embodiment of the present invention. As shown in FIG. 2, the code stream transmission method may include the following steps (S201 to S211). :
S201,编码器编制原始码流,进行编码和分段;S201, the encoder prepares a source code stream, performs coding and segmentation;
S202,编码器将总索引文件上传到服务器;S202. The encoder uploads the total index file to the server.
S203,编码器将子分片文件上传到服务器;S203. The encoder uploads the sub-shard file to the server.
S204,编码器将通道索引文件上传到服务器;S204. The encoder uploads the channel index file to the server.
S205,CDN节点向服务器发送下载总索引文件请求;S205. The CDN node sends a request for downloading a total index file to the server.
S206,服务器将编码器发送的总索引文件发送给CDN节点;S206. The server sends the total index file sent by the encoder to the CDN node.
S207,CDN节点向服务器发送下载通道索引文件请求;S207. The CDN node sends a download channel index file request to the server.
S208,服务器将编码器发送的通道索引文件发送给CDN节点;S208. The server sends the channel index file sent by the encoder to the CDN node.
S209,CDN节点向服务器发送下载子分片文件请求;S209. The CDN node sends a download sub-slice file request to the server.
S210,服务器将编码器发送的子分片文件发送给CDN节点。S210. The server sends the sub-fragment file sent by the encoder to the CDN node.
在本发明实施例的一个实施方式中,还可以接收编码器定时发送的删除子分片文件命令,预先将存储的子分片文件设置缓存期,并将超过缓存期的上述子分片文件删除。这样可以定时清理缓存,保证足够的码流存储空间。另外,服务器也可以自己设定存储策略,依据策略删除存储的码流。In an embodiment of the present invention, 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. In addition, the server can also set the storage policy by itself, and delete the stored code stream according to the policy.
在本发明实施例的一个实施方式中,接收编码器发送的码流,还可以对编码器建立的频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息,同时将上述发出的告警信息上报给网 管。告警消除后,也会将告警消除的信息上报给网管。可选的,对编码器建立的频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息包括以下步骤:In an embodiment of the present invention, 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. Optionally, 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:
S501,设置一个频道计数器,并将频道计数器设置计数上限;S501, setting a channel counter, and setting a channel counter to an upper limit;
S502,收到编码器发送的建立频道请求后检测频道个数是否超过频道计数器的计数上限;S502. After receiving the channel establishment request sent by the encoder, detecting whether the number of channels exceeds a counting upper limit of the channel counter;
S503,若没有超过频道计数器的计数上限,则把频道计数器加1;S503, if the upper limit of the channel counter is not exceeded, the channel counter is incremented by one;
S504,若超过了频道计数器的计数上限,则拒绝编码器的请求并告警;S504. If the upper limit of the channel counter is exceeded, the encoder request is rejected and an alarm is sent;
S505,预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内频道计数器没有响应,则把频道计数器减1。S505, 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.
在本发明实施例的一个实施方式中,确认CDN节点发送的下载请求,还可以对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下载请求的CDN节点个数超过上限阈值时发出告警信息,同时将上述发出的告警信息上报给网管。告警消除后,也会将告警消除的信息上报给网管。可选的,对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下载请求的CDN节点个数超过上限阈值时发出告警信息包括以下步骤:In an embodiment of the present invention, when the download request sent by the CDN node is confirmed, 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. Optionally, the number of the CDN nodes that send the download request is counted, and the upper threshold is set. When the number of the CDN nodes that send the download request exceeds the upper threshold, sending the alarm information includes the following steps:
S601,设置一个用户计数器,并将用户计数器设置计数上限;S601, setting a user counter, and setting a user counter to an upper limit;
S602,收到CDN节点发送的下载请求后检测CDN节点个数是否超过用户计数器的计数上限;S602. After receiving the download request sent by the CDN node, detecting whether the number of CDN nodes exceeds the upper limit of the user counter;
S603,若没有超过用户计数器的计数上限,则把用户计数器加1;S603, if the upper limit of the user counter is not exceeded, the user counter is incremented by one;
S604,若超过了用户计数器的计数上限,则拒绝CDN节点的下载请求并告警;S604. If the upper limit of the user counter is exceeded, the download request of the CDN node is rejected and an alarm is sent;
S605,预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内用户计数器没有响应,则把用户计数器减1。S605, 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.
在本发明实施例的一个实施方式中,接收编码器发送的码流,还可以对编码器建立频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息,同时,确认CDN节点发送的下载请求,还可以对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下 载请求的CDN节点个数超过上限阈值时发出告警信息;同时,将上述发出的告警信息上报给网管。告警消除后,也会将告警消除的信息上报给网管。In an embodiment of the present invention, 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, at the same time, 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.
本发明实施例还提供了一种码流传输装置,图3是根据本发明实施例的码流传输装置的结构框图,如图3所示,该装置包括:接收模块301、存储模块302、确认模块303和发送模块304,其中,接收模块301设置为接收编码器编制后发送的码流;存储模块302,用于存储上述接收模块接收的码流;中进行存储;确认模块303,设置为接收并确认CDN节点发送的下载请求;发送模块304,设置为在确认模块303完成确认后将所述编码器编制后发送的码流发送给所述CDN节点。The embodiment of the present invention further provides a code stream transmission apparatus. FIG. 3 is a structural block diagram of a code stream transmission apparatus according to an embodiment of the present invention. As shown in FIG. 3, 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.
通过本发明实施例,接收模块301接收编码器编制后发送的码流,并在存储模块302中存储,确认模块303接收CDN节点发送的下载请求并完成确认,发送模块304随即将编码器编制后发送的码流发送给上述CDN节点,使得编码器不需要与CDN节点直接相连,即编码器不需要填写CDN节点单板IP地址,在CDN节点增加或发生单板IP地址变动时,编码器无需做出改动,也不会影响编码器工作性能。Through the embodiment of the present invention, 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.
在本发明实施例的一个实施方式中,图4是根据本发明实施例的码流传输装置可选的结构框图之一,如图4所示,上述装置还可以包括:日志管理模块305。上述码流传输装置存储模块302的存储空间是有限的,上述装置在实际工作过程中,存储模块302内很可能会积累大量多余的子分片文件,日志管理模块305负责接收编码器定时发送的删除子分片文件命令,将存储在存储模块302中的子分片文件设置缓存期,在接收到编码器定时发送的删除子分片文件命令后,将超过缓存期的上述子分片文件删除,以保证存储模块302有足够的存储空间。In an embodiment of the present invention, FIG. 4 is an optional structural block diagram of a code stream transmission apparatus according to an embodiment of the present invention. As shown in FIG. 4, 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.
在本发明实施例的一个实施方式中,图5是根据本发明实施例的码流传输装置可选的结构框图之二,如图5所示,上述装置还可以包括:第一检测模块307、第二检测模块308和告警模块306。In an embodiment of the present invention, 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.
第一检测模块307,对编码器建立的频道个数进行计数,并设置上限阈值,所述频道个数超过上限阈值时发出告警信息;第二检测模块308,对发送下载请求的CDN节点个数进行计数,并设置上限阈值,所述CDN节点个 数超过上限阈值时发出告警信息;告警模块306,收集上述发出的告警信息并上报给网管;当所述频道个数或CDN节点个数超过各自的上限阈值时,第一检测模块307或第二检测模块308发出告警信息,告警模块306即将告警信息收集并上报给网管,当第一检测模块307或第二检测模块308告警消除后,告警模块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.
可选的,对编码器建立的频道个数进行计数并设置上限阈值,当编码器建立的频道个数超过设置的上限阈值时发出告警信息,以及对发送下载请求的CDN节点个数进行计数并设置上限阈值,当发送下载请求的CDN节点个数超过上限阈值时发出告警信息包括以下步骤:Optionally, 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. When the number of CDN nodes that send the download request exceeds the upper threshold, sending the alarm information includes the following steps:
S701,第一检测模块307设置一个频道计数器,并将频道计数器设置计数上限;第二检测模块308设置一个用户计数器,并将用户计数器设置计数上限。S701, 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.
S702,收到编码器发送的建立频道请求后,第一检测模块检测频道数是否超过频道计数器的计数上限;收到CDN节点发送的下载请求后第二检测模块检测CDN节点个数是否超过用户计数器的计数上限。S702. 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.
S703,若没有超过频道计数器的计数上限,则把频道计数器加1;若没有超过用户计数器的计数上限,则把用户计数器加1。S703: if the upper limit of the channel counter is not exceeded, the channel counter is incremented by one; if the upper limit of the user counter is not exceeded, the user counter is incremented by one.
S704,若超过了频道计数器的计数上限,则拒绝编码器的请求并告警;若超过了用户计数器的计数上限,则拒绝CDN节点的下载请求并告警。S704. If the upper limit of the channel counter is exceeded, the request of the encoder is rejected and the alarm is sent; if the upper limit of the user counter is exceeded, the download request of the CDN node is rejected and the alarm is triggered.
S705,预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内频道计数器没有响应,则把频道计数器减1;预先设定一个时间,比如10秒、20秒、30秒、40秒等,在所述时间内用户计数器没有响应,则把用户计数器减1。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.
需要说明的是,第一检测模块和第二检测模块并不是必须同时包括在上述装置内,可以只包括第一检测模块和告警模块,也可以只包括第二检测模块和告警模块。当然上述实施例中均可以同时包括日志管理模块。It should be noted that the 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. Of course, the foregoing embodiment can include a log management module at the same time.
本发明实施例还提供了一种服务器,图6是根据本发明实施例的码流传输服务器的结构框图,如图6所示,该服务器可以包括处理器405;接收模 块401,设置为接收编码器编制后发送的码流;存储模块402,设置为存储上述接收模块接收的码流;确认模块403,设置为接收并确认CDN节点发送的下载请求;发送模块404,在确认模块403完成确认后将所述编码器编制后发送的码流发送给所述CDN节点。The embodiment of the present invention further provides a server. FIG. 6 is a structural block diagram of a code stream transmission server according to an embodiment of the present invention. As shown in FIG. 6, 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. Of course, the foregoing embodiment can include a log management module at the same time.
本发明实施例还提供了一种码流传输系统,该码流传输系统包括编码器、CDN节点、服务器,其中服务器可以设置为一个或者两个及两个以上;下述以设置两个服务器为例详细说明。如图7所示中该系统包括服务器1和服务器2,两者互为主备机,并通过心跳线相连。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. As shown in FIG. 7, the system includes a server 1 and a server 2, which are mutually standby and connected by a heartbeat line.
如图7所示,编码器与服务器1相连,并将码流发送给服务器1,服务器1与CDN节点相连,接收、确认CDN节点发送的下载请求并将码流发送给CDN节点。当服务器1发生故障不能正常工作时,心跳线检测到故障并反映给备份机即服务器2,服务器2可以立即替代服务器1接收编码器发送的码流,接收、确认CDN节点发送的下载请求并将码流发送给CDN节点,这样就能保证网络通畅和服务的正常运行。As shown in FIG. 7, 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. When the server 1 fails to work normally, 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.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Alternatively, 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.
工业实用性Industrial applicability
通过本发明实施例,接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点,使得以后CDN节点单板IP地址有改动或者增加其他CDN节点时,编码器不需要做任何改动。并且当CDN节点个数增加较多时,编码器的工作性能依然保持稳定,不受CDN节点个数变化的影响。 According to the embodiment of the present invention, 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.

Claims (14)

  1. 一种码流传输方法,包括:A code stream transmission method includes:
    接收编码器发送的码流并存储;Receiving a code stream sent by the encoder and storing it;
    确认内容分发网络(CDN)节点发送的下载请求;Confirming a download request sent by a content distribution network (CDN) node;
    根据所述下载请求,将对应的所述码流发送给所述CDN节点。And transmitting, according to the download request, the corresponding code stream to the CDN node.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述接收编码器发送的码流,包括:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;The code stream sent by the receiving encoder includes: a total index file, a sub-shard file, and a channel index file that are sequentially sent by the receiving encoder;
    所述确认CDN节点发送的下载请求,包括:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。The confirming the download request sent by the CDN node includes: sequentially confirming the download total index file request, the download channel index file request, and the download sub-slice file request sent by the CDN node.
  3. 根据权力要求2所述的方法,还包括:接收所述编码器定时发送的删除子分片文件命令,将超过预设缓存期的所述子分片文件删除。The method of claim 2, further comprising: receiving a delete sub-fragment file command sent by the encoder at a time, and deleting the sub-fragment file that exceeds a preset cache period.
  4. 根据权利要求1所述的方法,其中,所述接收编码器发送的码流之后,所述方法还包括:The method of claim 1, wherein after the receiving the code stream transmitted by the encoder, the method further comprises:
    对所述编码器建立的频道个数进行计数;Counting the number of channels established by the encoder;
    在所述频道个数超过预设上限阈值时,向网管发出告警信息。When the number of the channels exceeds the preset upper threshold, the alarm information is sent to the network management.
  5. 根据权利要求1或4所述的方法,其中,所述确认CDN节点发送的下载请求之后,所述方法还包括:The method according to claim 1 or 4, wherein after the confirming the download request sent by the CDN node, the method further comprises:
    对所述CDN节点个数进行计数;Counting the number of the CDN nodes;
    在所述CDN节点个数超过预设上限阈值时,向网管发出告警信息。When the number of the CDN nodes exceeds a preset upper threshold, the alarm information is sent to the network management.
  6. 一种码流传输装置,包括:A code stream transmission device comprising:
    接收模块,其设置为:接收编码器发送的码流;a receiving module, configured to: receive a code stream sent by the encoder;
    存储模块,其设置为:存储编码器发送的码流;a storage module, configured to: store a code stream sent by the encoder;
    确认模块,其设置为:确认内容分发网络(CDN)节点发送的下载请求;以及a confirmation module, configured to: confirm a download request sent by a content distribution network (CDN) node;
    发送模块,其设置为:将所述编码器发送的码流发送给所述CDN节点。 And a sending module, configured to: send the code stream sent by the encoder to the CDN node.
  7. 根据权利要求6所述的码流传输装置,其中,The code stream transmission device according to claim 6, wherein
    所述接收模块是设置为以如下方式接收编码器发送的码流:接收编码器依次发送的总索引文件、子分片文件、通道索引文件;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 receiving encoder in sequence;
    所述确认模块是设置为以如下方式确认所述CDN节点发送的下载请求:依次确认所述CDN节点发送的下载总索引文件请求、下载通道索引文件请求和下载子分片文件请求。The confirmation module is configured to confirm the download request sent by the CDN node in the following manner: sequentially confirm the download total index file request, the download channel index file request, and the download sub-slice file request sent by the CDN node.
  8. 根据权利要求7所述的码流传输装置,还包括:The code stream transmission apparatus according to claim 7, further comprising:
    日志管理模块,其设置为:接收所述编码器定时发送的删除子分片文件命令,并将超过预设缓存期的所述子分片文件删除。And a log management module, configured to: receive a delete sub-fragment file command sent by the encoder periodically, and delete the sub-fragment file that exceeds a preset cache period.
  9. 根据权利要求6所述的码流传输装置,还包括:The code stream transmission device according to claim 6, further comprising:
    第一检测模块,其设置为:对所述编码器建立的频道个数进行计数;以及a first detecting module, configured to: count the number of channels established by the encoder;
    告警模块,其设置为:在所述频道个数超过预设上限阈值时向网管发出告警信息。The alarm module is configured to send an alarm message to the network management when the number of the channels exceeds a preset upper threshold.
  10. 根据权利要求6所述的码流传输装置,还包括:The code stream transmission device according to claim 6, further comprising:
    第二检测模块,其设置为:对所述CDN节点个数进行计数;以及a second detecting module, configured to: count the number of the CDN nodes;
    告警模块,其设置为:在所述CDN节点个数超过预设上限阈值时向网管发出告警信息。The alarm module is configured to send an alarm message to the network management when the number of the CDN nodes exceeds a preset upper threshold.
  11. 一种服务器,包括:A server that includes:
    处理器和存储器;Processor and memory;
    所述存储器存储有程序指令,当该程序指令被执行时使得所述服务器可执行权利要求1-5任一项所述的方法。The memory stores program instructions that, when executed, cause the server to perform the method of any of claims 1-5.
  12. 一种码流传输系统,包括编码器、内容分发网络(CDN)节点,还包括至少一个服务器;A code stream transmission system comprising an encoder, a content distribution network (CDN) node, and at least one server;
    所述编码器设置为对原始码流进行编制并发送给所述服务器;The encoder is configured to program the original code stream and send to the server;
    所述CDN节点设置为向所述服务器发送下载请求,并获取所述服务器发送的码流; The CDN node is configured to send a download request to the server, and acquire a code stream sent by the server;
    所述服务器设置为接收编码器发送的码流,确认CDN节点发送的下载请求,将所述编码器发送的码流发送给所述CDN节点。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 stream sent by the encoder to the CDN node.
  13. 根据权利要求12所述的码流传输系统,其中:所述服务器个数为两个,两个服务器之间连接有心跳线,互为主备机。The code stream transmission system according to claim 12, wherein the number of the servers is two, and a heartbeat line is connected between the two servers, which are mutually active standby machines.
  14. 一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时使得所述服务器可执行权利要求1-5任一项所述的方法。 A computer readable storage medium storing program instructions that, when executed, cause the server to perform the method of any of claims 1-5.
PCT/CN2015/070214 2014-04-24 2015-01-06 Code stream transmission method, device, server and system WO2015161680A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410169797.8 2014-04-24
CN201410169797.8A CN105007499B (en) 2014-04-24 2014-04-24 A kind of code stream transmission method, device and server

Publications (1)

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

Family

ID=54331710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/070214 WO2015161680A1 (en) 2014-04-24 2015-01-06 Code stream transmission method, device, server and system

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449237A (en) * 2019-08-12 2021-03-05 中兴通讯股份有限公司 Method, device and system for detecting video code stream

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534204A (en) * 2008-03-10 2009-09-16 中国网通集团宽带业务应用国家工程实验室有限公司 Streaming media information distribution system and method thereof and user end
CN101951412A (en) * 2010-10-15 2011-01-19 上海交通大学 Multi-sub-stream media transmission system based on HTTP protocol and transmission method thereof
CN102231749A (en) * 2011-08-12 2011-11-02 乐视网信息技术(北京)股份有限公司 System and method for transmitting live stream by utilizing content delivery network (CDN)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534204A (en) * 2008-03-10 2009-09-16 中国网通集团宽带业务应用国家工程实验室有限公司 Streaming media information distribution system and method thereof and user end
CN101951412A (en) * 2010-10-15 2011-01-19 上海交通大学 Multi-sub-stream media transmission system based on HTTP protocol and transmission method thereof
CN102231749A (en) * 2011-08-12 2011-11-02 乐视网信息技术(北京)股份有限公司 System and method for transmitting live stream by utilizing content delivery network (CDN)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449237A (en) * 2019-08-12 2021-03-05 中兴通讯股份有限公司 Method, device and system for detecting video code stream
CN112449237B (en) * 2019-08-12 2023-05-05 中兴通讯股份有限公司 Method, device and system for detecting video code stream

Also Published As

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

Similar Documents

Publication Publication Date Title
CN106993054B (en) File distribution method, node and system
CN105634784B (en) Control data distributing method, apparatus and system
US20140089619A1 (en) Object replication framework for a distributed computing environment
CN104636437B (en) A kind of processing method and processing device of event notification method, monitor
US11341140B2 (en) Unique identification generation for records in a data streaming processing system
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
KR101179472B1 (en) File system and method for delivering contents in file system
WO2016127884A1 (en) Message pushing method and device
JP2012507797A (en) Scalable performance management system
CN110830283A (en) Fault detection method, device, equipment and system
CN110417612A (en) A kind of Network Traffic Monitoring System and method based on network element
CN104618221A (en) Decentralized message service system
WO2019218479A1 (en) Method and device for sending information
US9832255B2 (en) Event distribution method, control device, and processor on software-defined network
WO2019024910A1 (en) Storage resource recovery method, apparatus and system
JP6434021B2 (en) Manage data feeds
JP2019047254A (en) Information processing system, information processing device, and information processing program
CN108156040A (en) A kind of central control node in distribution cloud storage system
WO2023061060A1 (en) Audio and video code stream scheduling method, system, medium and electronic apparatus
WO2019231645A1 (en) Change notifications for object storage
JP2010213150A (en) Transmitter, file distribution system, file distribution control method and file distribution control program in system
WO2015161680A1 (en) Code stream transmission method, device, server and system
WO2016082485A1 (en) Code stream transmission method, device, server and system
WO2016101409A1 (en) Data switching method, device and system
WO2014032553A1 (en) Network resource management method and device, client and system

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