WO2020155293A1 - 一种推流方法、系统及服务器 - Google Patents

一种推流方法、系统及服务器 Download PDF

Info

Publication number
WO2020155293A1
WO2020155293A1 PCT/CN2019/077230 CN2019077230W WO2020155293A1 WO 2020155293 A1 WO2020155293 A1 WO 2020155293A1 CN 2019077230 W CN2019077230 W CN 2019077230W WO 2020155293 A1 WO2020155293 A1 WO 2020155293A1
Authority
WO
WIPO (PCT)
Prior art keywords
push
channel
streaming
central node
request
Prior art date
Application number
PCT/CN2019/077230
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 网宿科技股份有限公司
Priority to EP19725834.6A priority Critical patent/EP3709664B1/en
Priority to US16/439,537 priority patent/US11102319B2/en
Publication of WO2020155293A1 publication Critical patent/WO2020155293A1/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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • This application relates to the field of Internet technology, in particular to a streaming method, system and server.
  • the current live broadcast technology adopted on the streaming media server mainly includes: the anchor uses the pusher to push the streaming media data to the edge node in the content delivery network (Content Delivery Network, CDN), and the edge node can forward the received streaming media data
  • the central node in the CDN After the central node receives the streaming media data, it creates a channel for the streaming media data, and the user client uses the streaming method to obtain the required streaming media data from the channel created by the CDN and perform Play.
  • the pusher When pushing the stream, the pusher usually uses the Real Time Messaging Protocol (RTMP) to push the stream.
  • RTMP Real Time Messaging Protocol
  • the format of Uniform Resource Locator (URL) is usually: rtmp://serveraddr:port/appName/appInstance, where rtmp is the initials of Real Time Messaging Protocol, and serveraddr is usually
  • the domain name or IP, port (ie port) of the streaming media server usually uses 1935
  • appName can represent the publishing point or application name of the streaming media service
  • appInstance can represent the stream name or the name of the streaming media application instance.
  • a URL using the RTMP protocol can uniquely identify a channel on a first-class media server, a pusher can use the URL of the RTMP protocol to provide streaming media data for a channel, and the player can use the URL of the RTMP protocol to access the URL. Corresponding channel to obtain streaming media data.
  • the CDN contains multiple central nodes and multiple edge nodes
  • multiple edge nodes may retweet to the central node separately.
  • a channel will be created for the push stream of the edge node that is accessed first, and the push stream request for later access will be rejected.
  • the rejected edge nodes may continue to try to push streams to the central node, resulting in CDN internal traffic consumption and server resource waste. Therefore, there is an urgent need for a streaming method to avoid waste of server resources.
  • the prior art has at least the following problems: Since the CDN contains multiple central nodes and multiple edge nodes, when the streaming media data of the same URL is pushed to multiple edge nodes at the same time, multiple edge nodes may Both will retweet to the central node respectively, and the central node will create a channel for the push stream of the edge node that is accessed first, and reject the push stream request for later access. After the rejected edge nodes are rejected, they may continue to try to push streams to the central node, resulting in CDN internal traffic consumption and server resource waste. Therefore, there is an urgent need for a streaming method to avoid waste of server resources.
  • the purpose of some embodiments of this application is to provide a streaming method, system and server, which can avoid CDN internal traffic consumption and server resource waste, and improve the resource utilization of the streaming server.
  • the embodiment of the present application provides a streaming method, including: a central node receives a streaming request reposted by an edge node, and judging whether the streaming request corresponds to an existing channel; when the judgment result is yes, the central node Send a reminder message to the edge node; or, when the judgment result is no, the central node requests to create a channel for the push streaming request, and receives streaming media data corresponding to the channel.
  • An embodiment of the present application also provides a streaming method, including: an edge node receives a streaming request sent by a streaming device; the edge node is one or more; the edge node determines a target center according to the streaming request Node, so that the push request in the one or more edge nodes corresponds to the same target central node; the edge node forwards the push request to the target central node.
  • the embodiment of the present application also provides a streaming system, including: at least one central node server and at least one edge node server; wherein, the edge node server is configured to receive a streaming request sent by a streaming device, according to the The push request determines the target central node server, and forwards the push request to the target central node server; the central node server includes the target central server, and is used to receive the push request sent by the edge node server , Judge whether the push request corresponds to an existing channel; when the judgment result is yes, the central node server is also used to send a reminder message to the edge node server; or, when the judgment result is no, the The central node server is also used to create a channel for the streaming request, and receive streaming media data corresponding to the channel.
  • the embodiment of the present application also provides a push streaming server.
  • the push streaming server is a central node server, and includes: a push streaming receiving unit for receiving a push streaming request reposted by an edge node; and a judging unit for judging the Whether the push request corresponds to an existing channel; the feedback or receiving unit is configured to send a reminder message to the edge node by the central node when the judgment result is yes; or, when the judgment result is no, the central node Create a channel for the streaming request, and receive streaming media data corresponding to the channel.
  • the embodiment of the present application also provides a push streaming server.
  • the push streaming server is an edge node server and includes: a receiving unit for receiving a streaming request sent by the pusher; a target central node determining unit for determining The push streaming request determines the target central node, so that one push streaming request corresponds to the same target central node; the retweeting unit is configured to forward the push streaming request to the target central node.
  • An embodiment of the present application also provides a management server, including a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the foregoing method for execution by the central node or the edge node is implemented.
  • the embodiment of the present application judges whether the corresponding channel already exists in the reasoning request by comparing whether the channel names are consistent.
  • the corresponding channel already exists by feeding back a reminder message, you can no longer receive the channel
  • Corresponding push request can avoid CDN internal traffic consumption and server resource waste.
  • the hash algorithm and channel name are used to determine the target central node of the edge node retweet, which can ensure the consistency of the central node corresponding to the same channel name.
  • the same channel name can also be reposted to the same center through different edge nodes. Nodes to ensure the uniqueness of a channel throughout the network. Therefore, the technical solution provided by the present application can avoid CDN internal traffic consumption and server resource waste, and improve streaming efficiency.
  • Fig. 1 is a flowchart of a streaming method using a CDN network according to an embodiment of the present application
  • Figure 2 is a flow chart of a streaming method with a central node as the main body according to an embodiment of the present application
  • Fig. 3 is a flowchart of a streaming method with edge nodes as the main body according to an embodiment of the present application
  • Fig. 4 is a schematic structural diagram of a streaming system according to an embodiment of the present application.
  • FIG. 5 is a block diagram of a streaming server as a central node in an embodiment of the present invention.
  • FIG. 6 is another module diagram of the push streaming server as the central node in the embodiment of the present invention.
  • FIG. 7 is a block diagram of a streaming server as an edge node in an embodiment of the present invention.
  • FIG. 8 is another module diagram of a streaming server as an edge node in an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a streaming server in an embodiment of the present invention.
  • Fig. 10 is a schematic structural diagram of a computer terminal in an embodiment of the present invention.
  • the CDN may include a central node and an edge node, and the central node may establish a communication connection with the edge node so as to perform data interaction with the edge node.
  • a central node can establish communication connections with multiple edge nodes.
  • the CDN may include multiple central nodes (only one central node is shown in FIG. 1).
  • the central node and the edge node may be servers. Please refer to FIG. 1.
  • the streaming method provided in this application may include the following steps.
  • S11 The pusher sends a push request to the edge node.
  • the streaming request sent by the streaming pusher may be transmitted using the RTMP protocol.
  • the URL of the streaming request using the RTMP protocol may include the publishing point (ie appName) and the stream name (ie appInstance).
  • the pusher may send the push request to an edge node.
  • One pusher can send the push request to one or more edge nodes.
  • S12 The edge node receives the push request sent by the pusher, and forwards the push request to the target central node.
  • the edge node may receive the push request sent by the pusher, and forward the push request to the target central node.
  • the multiple edge nodes may forward the received push request to the central node of the CDN.
  • the edge node forwarding the push request to the target central node may specifically include: determining a channel name corresponding to the push request according to the push request, and according to the channel name and The IPs of all central nodes determine the target central node, and send the push request to the target central node.
  • the channel may correspond to a channel name.
  • the channel name can be used to uniquely identify the channel.
  • the channel name may include: publishing point and stream name.
  • determining the target central node according to the channel name and the IPs of all central nodes includes: hashing the channel name as a key value, and determining the target center from the IPs of all central nodes The IP of the node.
  • the number of the target center nodes may be preset.
  • the target central node receives the streaming request sent by the edge node, and determines whether the streaming request corresponds to an existing channel.
  • the target central node After the target central node receives the push request sent by the edge node, it can determine whether the push request corresponds to an existing channel. That is, it is determined whether the current push request is a repeated push request.
  • the judging whether the channel corresponding to the push streaming request is an existing channel may specifically include: comparing the channel corresponding to the push streaming request with all the existing channels of the target central node, if If the same channel exists, the judgment result is yes; if the same channel does not exist, the judgment result is no.
  • the target central node sends a reminder message to the edge node; or, when the judgment result is no, the target central node requests to create a channel for the push streaming request, and receives and Streaming media data corresponding to this channel.
  • the target central node may send a reminder message to the edge node. That is, when the judgment result of judging whether the push request corresponds to an existing channel is yes, it means that the target central node has received the same push request from other edge nodes, and the push request currently received is a duplicate Push streaming request, then the target central node may send a reminder message to the edge node.
  • the reminder message may be a status code.
  • the status code can be used to indicate the type of error that occurs in the current push.
  • the status code may be the phrase "Orgin Exist", and the status code may indicate that the type of error occurring in the current push is: repeated push.
  • the target central node when the judgment result of determining whether the push request corresponds to an existing channel is no, creates a channel for the push, and receives streaming media data corresponding to the channel .
  • the target central node may also save the received streaming media data corresponding to the created channel.
  • the streaming media data may include audio data and/or video data.
  • the streaming method may further include: after the edge node receives the reminder message sent by the central node, it may send streaming failure information to the streaming pusher.
  • the push stream failure information may be the same as the reminder message, or may be different from the reminder message.
  • the push stream failure information may use the status code "Orgin Exist" of the reminder message, or may be a customized message "Request failed”.
  • the streaming method may further include: the edge node disconnects from the streaming device.
  • the streaming method may further include: refusing to receive the streaming request corresponding to the channel according to the push forbidden parameter.
  • the push forbidden parameter may be used to configure the edge node so that the edge node is prohibited from receiving push streaming requests corresponding to the channel within a certain period of time.
  • the banning parameters may include: banning channel name and banning time.
  • the push prohibition parameter can be preset.
  • the streaming request received by the target central node may also include priority information.
  • the priority information may be represented by a parameter (for example, Pri) in the URL of the streaming request using the RTMP protocol.
  • the priority information may be represented by one character. For example, numbers 1, 2, 3 can be used, or letters m, n, etc. can be used.
  • the priority can be determined according to the preset sequence of characters. For example, if the preset sequence of characters is m, n, p, q, the push request with priority information m has a higher priority than the push request with priority information p.
  • the value of the priority information may be generated based on an improved snowflake algorithm.
  • the target central node may create a channel for the push request, and receive the stream corresponding to the channel Media data. Further, the target central node may also save priority information corresponding to the created channel.
  • the priority information of the push streaming request is compared with the priority information of the existing channel.
  • the target center node may receive the streaming media data with higher priority in the priority information according to the comparison result, and save the priority information corresponding to the streaming media data.
  • the central node may also send a warning message with a lower priority to the edge node.
  • the reminder message with a lower priority may be a status code.
  • the status code can be used to indicate the type of error that occurs in the current push.
  • the status code used to indicate that the priority is lower may be the phrase "Priority Low”
  • the status code may indicate that the type of error that occurs in the current push is: the priority of the current push is lower than the priority of the original channel.
  • the new streaming media data can adopt higher priority information 2. Then , the new streaming media information can be pushed to the original channel again using the same stream name, and the streaming data covering the original channel can be updated, thereby ensuring the rapid replacement and smooth connection of content in a channel.
  • the embodiment of the present application also provides a streaming method, and the streaming method uses a central node as an execution subject.
  • the streaming method with a central node as the main body may include the following steps.
  • the central node receives the push request retweeted by the edge node, and judges whether the push request corresponds to an existing channel.
  • the streaming request may be transmitted using the RTMP protocol.
  • the URL of the streaming request using the RTMP protocol may include the publishing point (ie appName) and the stream name (ie appInstance).
  • a channel may correspond to a channel name.
  • the channel name can be used to uniquely identify the channel.
  • the channel name may include: a publishing point and a stream name (that is, appName and appInstance in the URL corresponding to the streaming media data).
  • determining whether the channel corresponding to the push streaming request is an existing channel may specifically include: comparing the channel name corresponding to the push streaming request with the channel names of all existing channels of the central node Yes, if the same channel exists, the judgment result is yes; if the same channel does not exist, the judgment result is no.
  • the reminder message may be a status code.
  • the status code can be used to indicate the type of error that occurs in the current push.
  • the status code may be the phrase "Orgin Exist", and the status code may indicate that the type of error occurring in the current push is: repeated push.
  • the central node may also save the received streaming media data corresponding to the created channel.
  • the streaming media data may include audio data and/or video data.
  • the streaming request received by the central node may also include priority information.
  • the priority information may be characters.
  • the priority information may be numbers 1, 2, 3, or may be letters m, n, and so on.
  • the priority order can be determined according to the preset order of characters. For example, if the preset sequence of characters is m, n, p, q, the push request with priority information m has a higher priority than the push request with priority information p.
  • the central node may create a channel for the push streaming request, and receive streaming media corresponding to the channel data. Further, the central node may also save priority information corresponding to the created channel.
  • the priority information of the push streaming request is compared with the priority information of the existing channel.
  • the central node may receive the streaming media data with higher priority in the priority information according to the comparison result, and save the priority information corresponding to the streaming media data.
  • An embodiment of the present application also provides a streaming method, and the streaming method uses an edge node as an execution subject.
  • the streaming method with edge nodes as the main body may include the following steps.
  • S31 The edge node receives the push request sent by the pusher.
  • the streaming request may be transmitted using the RTMP protocol.
  • the URL of the streaming request using the RTMP protocol may include the publishing point (ie appName) and the stream name (ie appInstance).
  • the channel may correspond to a channel name.
  • the channel name can be used to uniquely identify the channel.
  • the channel name may include: publishing point and stream name.
  • the edge node determines a target central node according to the streaming request.
  • the target central node is determined according to the push request, so that the push requests in the one or more edge nodes may correspond to the same target central node. Therefore, when any edge node in the CDN reposts the push streaming request, it can forward to the target central node corresponding to the push streaming request.
  • the edge node determines the target central node according to the push request, which may specifically include: hashing the channel name as a key value, and obtaining the Internet protocol addresses of all central nodes (Internet Protocol) Protocol Address, IP) determines the IP of the target central node.
  • IP Internet Protocol Protocol Address
  • the number of the target center nodes may be preset.
  • S33 The edge node forwards the push request to the target central node.
  • the method may further include: the edge node receiving a reminder message sent by the target central node.
  • the streaming method may further include: the edge node sending streaming failure information to the streaming pusher.
  • the push stream failure information may be the same as the reminder message, or may be different from the reminder message.
  • the streaming method may further include: the edge node disconnects from the streaming device.
  • the streaming method may further include: refusing to receive the streaming request corresponding to the channel according to the push forbidden parameter.
  • the push forbidden parameter may be used to configure the edge node so that the edge node is prohibited from receiving push streaming requests corresponding to the channel within a certain period of time.
  • the banning parameters may include: banning channel name and banning time.
  • the push prohibition parameter can be preset.
  • the embodiment of the present application also provides a streaming system.
  • the streaming system includes at least one central node server 41 (only one is shown in the figure) and at least one edge node server 42.
  • the edge node server 42 may be used to receive a push request sent by a pusher, determine a target central node server according to the push request, and forward the push request to the target central node server.
  • the central node server 41 may be used to receive the streaming request sent by the edge node server 42 and determine whether the streaming request corresponds to an existing channel. When the judgment result is yes, the central node server 41 is also used to send a reminder message to the edge node server 42; or when the judgment result is no, the central node server 41 is also used to push the stream Request to create a channel and receive streaming media data corresponding to the channel.
  • the edge node server 42 when the edge node server 42 receives a reminder message sent by the central node server 41, the edge node server 42 may also be used to send push failure information to the pusher.
  • edge node server 42 can also be used to disconnect the pusher.
  • the edge node server 42 may also be configured to refuse to receive the push request corresponding to the channel according to the push prohibition parameter.
  • the push prohibition parameter may be used to configure the edge node server 42 so that the edge node server 42 prohibits receiving the push request corresponding to the channel within a certain period of time.
  • the streaming request received by the central node server 41 may also include priority information. Then, the central node server 41 may also be used to compare the priority information of the push streaming request with the priority information of the existing channel when the judgment result of determining whether the push streaming request corresponds to an existing channel is yes. .
  • the priority information may be represented by a parameter (for example, Pri) in the URL of the streaming request using the RTMP protocol.
  • the central node server 41 may also be configured to receive streaming media data with a higher priority in the priority information according to the comparison result, and save priority information corresponding to the streaming media data.
  • the central node server 41 may also send a reminder message with a lower priority to the edge node server 42.
  • the reminder message with a lower priority may be a status code.
  • the status code can be used to indicate the type of error that occurs in the current push.
  • the embodiment of the present application also provides a streaming server, and the streaming server is a central node server.
  • the streaming server is a central node server.
  • the push server may include:
  • the push stream receiving unit 51 is configured to receive the push stream request retweeted by the edge node.
  • the judging unit 52 is configured to judge whether there is an existing channel corresponding to the streaming request.
  • the feedback or receiving unit 53 is configured to: when the judgment result is yes, the central node sends a reminder message to the edge node; or, when the judgment result is no, the central node requests to create a channel for the push stream , And receive the streaming media data corresponding to the channel.
  • the push server may further include:
  • the priority comparison unit 54 is configured to compare the data of the push request when the push request further includes priority information and the central node server judges whether the push request corresponds to an existing channel. Priority information and priority information of existing channels.
  • the storage unit 55 is configured to receive streaming media data with a higher priority in the priority information according to the comparison result of the priority comparison unit 54 and store priority information corresponding to the streaming media data.
  • the embodiment of the present application also provides a streaming server, and the streaming server is an edge node server.
  • the streaming server is an edge node server.
  • the push server may include:
  • the receiving unit 71 is configured to receive a streaming request sent by the streaming device.
  • the target central node determining unit 72 is configured to determine a target central node according to the push request, so that one push request corresponds to the same target central node.
  • the retweet unit 73 retweets the streaming request to the target central node.
  • the push streaming server may further include: a control connection unit 74 configured to disconnect the push streaming device. Further, the control connection unit is further configured to refuse to receive the push request corresponding to the channel according to the push prohibition parameter.
  • the present application also provides a streaming server, the streaming server includes a memory and a processor, the memory is used to store a computer program, when the computer program is executed by the processor, the above The push streaming method performed by the central node or edge node.
  • the computer terminal 10 may include one or more (only one is shown in the figure) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a processor for storing data
  • the memory 104 and the transmission module 106 for communication functions are only for illustration, and does not limit the structure of the above electronic device.
  • the computer terminal 10 may also include more or fewer components than those shown in FIG. 10, or have a different configuration from that shown in FIG.
  • the memory 104 may be used to store software programs and modules of application software.
  • the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the foregoing server deployment method may be stored as a computer program in the foregoing memory 104, and the memory 104 may be coupled with the processor 102, then when the processor 102 executes the computer in the memory 104
  • the program can implement the steps in the server deployment method described above.
  • the transmission device 106 is used to receive or send data via a network.
  • the above-mentioned specific examples of the network may include a wireless network provided by the communication provider of the computer terminal 10.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF radio frequency
  • the technical solution provided by this application judges whether the corresponding channel already exists in the reasoning request by comparing whether the channel names are consistent.
  • the hash algorithm and channel name are used to determine the target central node of the edge node retweet, which can ensure the consistency of the central node corresponding to the same channel name.
  • the same channel name can also be reposted to the same center through different edge nodes. Nodes to ensure the uniqueness of a channel throughout the network.
  • the use of the hash calculation method can ensure the load balance of the CDN, which improves the stability and high availability of the CDN in various application scenarios such as live broadcasting. Therefore, the technical solution provided by the present application can avoid CDN internal traffic consumption and server resource waste, and improve streaming efficiency.
  • the content processed or updated by the customer can be pushed again with the same stream name, and the stream data can overwrite the last push, realizing rapid content replacement and smooth connection, thereby meeting the customer's scenario needs , Improve user experience.
  • each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware.
  • the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic A disc, an optical disc, etc., include a number of instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请部分实施例提供了一种推流方法、系统及服务器,其中,所述推流方法包括:中心节点接收边缘节点转推的推流请求,判断所述推流请求是否对应存在已有频道;当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。采用本申请的实施例,能够避免CDN内部流量消耗以及服务器资源浪费,提高推流效率。

Description

一种推流方法、系统及服务器 技术领域
本申请涉及互联网技术领域,特别涉及一种推流方法、系统及服务器。
背景技术
随着互联网的高速发展,众多互联网直播平台和手机直播App兴起,网络直播技术也不断改进。
目前流媒体服务器上采用的直播技术主要包括:主播利用推流器推送流媒体数据至内容分发网络(Content Delivery Network,CDN)中的边缘节点,所述边缘节点可以将接收到的流媒体数据转发给CDN中的中心节点,中心节点接收所述流媒体数据后,为该流媒体数据创建一个频道,而用户客户端采用拉流方式从所述CDN创建的频道获取所需的流媒体数据并进行播放。
在推流时,推流器通常采用实时消息传输(Real Time Messaging Protocol,RTMP)协议进行推流。在RTMP协议中,统一资源定位符(Uniform Resource Locator,URL)的格式通常为:rtmp://serveraddr:port/appName/appInstance,其中,rtmp为Real Time Messaging Protocol的首字母简拼、serveraddr通常为流媒体服务器的域名或IP、port(即端口)通常使用1935、appName可以表示发布点或者应用流媒体服务的应用名称、appInstance可以表示流名称或流媒体应用实例的名称。可见,一个采用RTMP协议的URL可以唯一标识一流媒体服务器上的一个频道,一个推流器可以利用RTMP协议的URL为一个频道提供流媒体数据,而播放端可以利用RTMP协议的URL访问与该URL对应的频道以获 取流媒体数据。
由于CDN中包含多个中心节点和多个边缘节点,当同一个URL的流媒体数据在同一时间被推送到多个边缘节点时,多个边缘节点可能都会分别向中心节点进行转推,中心节点将为最先接入的边缘节点的推流创建一个频道,并拒绝后接入的推流请求。而被拒绝的边缘节点被拒绝后将可能不断向中心节点尝试推流,造成CDN内部流量消耗和服务器资源浪费。因此,目前亟需一种避免服务器资源浪费的推流方法。
发明人发现现有技术至少存在以下问题:由于CDN中包含多个中心节点和多个边缘节点,当同一个URL的流媒体数据在同一时间被推送到多个边缘节点时,多个边缘节点可能都会分别向中心节点进行转推,中心节点将为最先接入的边缘节点的推流创建一个频道,并拒绝后接入的推流请求。而被拒绝的边缘节点被拒绝后将可能不断向中心节点尝试推流,造成CDN内部流量消耗和服务器资源浪费。因此,目前亟需一种避免服务器资源浪费的推流方法。
发明内容
本申请部分实施例的目的在于提供一种推流方法、系统及服务器,能够避免CDN内部流量消耗以及服务器资源浪费,提高推流服务器的资源利用率。
本申请实施例提供了一种推流方法,包括:中心节点接收边缘节点转推的推流请求,判断所述推流请求是否对应存在已有频道;当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
本申请实施例还提供了一种推流方法,包括:边缘节点接收推流器发出 的推流请求;所述边缘节点为一个或多个;所述边缘节点根据所述推流请求确定目标中心节点,以使所述一个或多个边缘节点中的所述推流请求对应相同的目标中心节点;所述边缘节点将所述推流请求转推至所述目标中心节点。
本申请实施例还提供了一种推流系统,包括:至少一个中心节点服务器和至少一个边缘节点服务器;其中,所述边缘节点服务器,用于接收推流器发出的推流请求,根据所述推流请求确定目标中心节点服务器,将所述推流请求转推至目标中心节点服务器;所述中心节点服务器包括所述目标中心服务器,用于接收所述边缘节点服务器发出的所述推流请求,判断所述推流请求是否对应存在已有频道;当判断结果为是时,所述中心节点服务器还用于向所述边缘节点服务器发送提醒消息;或者,当判断结果为否时,所述中心节点服务器还用于为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
本申请实施例还提供了一种推流服务器,所述推流服务器为中心节点服务器,包括:推流接收单元,用于接收边缘节点转推的推流请求;判断单元,用于判断所述推流请求是否对应存在已有频道;反馈或接收单元,用于当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
本申请实施例还提供了一种推流服务器,所述推流服务器为边缘节点服务器,包括:接收单元,用于接收推流器发出的推流请求;目标中心节点确定单元,用于根据所述推流请求确定目标中心节点,以使一个所述推流请求对应相同的目标中心节点;转推单元,用于将所述推流请求转推至所述目标中心节点。
本申请实施例还提供了一种管理服务器,包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述中心节点或边缘节点执行的方法。
本申请实施例现对于现有技术而言,通过比较频道名是否一致,来判断推理请求是否已经存在对应的频道,当已经存在对应的频道时,通过反馈提醒消息,可以不再接收与该频道对应的推流请求,从而能够避免CDN内部流量消耗以及服务器资源浪费。同时,利用哈希算法和频道名确定边缘节点转推的目标中心节点,可以保证相同的频道名对应的中心节点的一致性,同一频道名在通过不同的边缘节点也可以转推至相同的中心节点,从而保证一个频道的全网唯一性。因此,本申请提供的技术方案,能够避免CDN内部流量消耗以及服务器资源浪费,提高推流效率。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。
图1是根据本申请实施例中的采用CDN网络的推流方法流程图;
图2是根据本申请实施例中的以中心节点为主体的推流方法流程图;
图3是根据本申请实施例中的以边缘节点为主体的推流方法流程图;
图4是根据本申请实施例中的推流系统的结构示意图;
图5是本发明实施例中作为中心节点的推流服务器的一种模块图;
图6是本发明实施例中作为中心节点的推流服务器的另一模块图;
图7是本发明实施例中作为边缘节点的推流服务器的一种模块图;
图8是本发明实施例中作为边缘节点的推流服务器的另一模块图;
图9是本发明实施例中推流服务器的结构示意图;
图10是本发明实施例中计算机终端的结构示意图。
具体实施例
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请部分实施例进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种推流方法,该方法可以应用于采用CDN的直播服务。请参阅图1,所述CDN中可以包括中心节点和边缘节点,所述中心节点可以与所述边缘节点建立通信连接从而可以与边缘节点进行数据交互。一个中心节点可以与多个边缘节点建立通信连接。所述CDN中可以包括多个中心节点(图1中仅示出1个中心节点)。所述中心节点与所述边缘节点可以为服务器。请参阅图1,本申请提供的推流方法可以包括以下步骤。
S11:推流器发送推流请求至边缘节点。
在一个实施例中,所述推流器发送的所述推流请求可以采用RTMP协议进行传输。所述采用RTMP协议的推流请求的URL中可以包括发布点(即appName)和流名称(即appInstance)。
在一个实施例中,所述推流器可以发送所述推流请求至边缘节点。一个推流器可以发送所述推流请求至一个或多个边缘节点。
S12:所述边缘节点接收所述推流器发出的推流请求,将所述推流请求转推至目标中心节点。
所述边缘节点可以接收所述推流器发出的推流请求,并将所述推流请求 转推至目标中心节点。
在一个实施例中,当多个边缘节点接收到的推流器发出的推流请求相同时,所述多个边缘节点可以分别将接收到的所述推流请求转推至CDN的中心节点。
在一个实施例中,所述边缘节点将所述推流请求转推至目标中心节点可以具体包括:根据所述推流请求确定与所述推流请求对应的频道名,根据所述频道名与所有中心节点的IP确定目标中心节点,向所述目标中心节点发送所述推流请求。
在一个实施例中,所述频道可以对应有频道名。所述频道名可以用于唯一标识所述频道。具体地,所述频道名可以包括:发布点和流名称。
在一个实施例中,根据所述频道名与所有中心节点的IP确定目标中心节点,包括:将所述频道名作为key值进行哈希运算,从所述所有中心节点的IP中确定出目标中心节点的IP。其中,所述目标中心节点的个数可以是预先设置的。通过上述方法确定目标中心节点,可以保证相同的频道名对应的中心节点的一致性,同一频道名在通过不同的边缘节点也可以转推至相同的中心节点,从而保证一个频道的全网唯一性。同时,利用哈希运算的方法可以保证CDN的负载均衡。
S13:所述目标中心节点接收所述边缘节点发出的所述推流请求,判断所述推流请求是否对应存在已有频道。
所述目标中心节点接收所述边缘节点发出的所述推流请求后,可以判断所述推流请求是否对应存在已有频道。即,判断当前的推流请求是否为重复的推流请求。
在一个实施例中,所述判断推流请求对应的频道是否为已经存在的频道具体可以包括:将所述推流请求对应的频道与所述目标中心节点已有的所有频道进行比对,若存在相同的频道,则判断结果为是;若不存在相同的频道,则判断结果为否。
S14:当判断结果为是时,所述目标中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述目标中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
在一个实施例中,当所述判断推流请求是否对应存在已有频道的判断结果为是时,所述目标中心节点可以向所述边缘节点发送提醒消息。即,当所述判断推流请求是否对应存在已有频道的判断结果为是时,表示所述目标中心节点已经接收了其他边缘节点的相同推流请求,当前接收到的推流请求为重复的推流请求,那么,所述目标中心节点可以向所述边缘节点发送提醒消息。
在一个实施例中,所述提醒消息可以为状态码。所述状态码可以用于表示当前推流发生的错误类型。具体地,所述状态码可以为短语“Orgin Exist”,该状态码可以表示当前推流发生的错误类型为:重复推流。
在一个实施例中,当所述判断推流请求是否对应存在已有频道的判断结果为否时,所述目标中心节点为所述推流创建一频道,并接收与该频道对应的流媒体数据。
在一个实施例中,所述目标中心节点还可以保存所述接收到的与创建的频道对应的流媒体数据。
在一个实施例中,所述流媒体数据可以包括音频数据和/或视频数据。
在另一个实施例中,所述推流方法还可以包括:所述边缘节点接收所述 中心节点发出的提醒消息后,可以向所述推流器发送推流失败信息。
其中,所述推流失败信息可以与所述提醒消息相同,也可以与所述提醒消息不同。例如,所述推流失败信息可以采用所述提醒消息的状态码“Orgin Exist”,也可以是自定义的消息“请求失败”。
在一个实施例中,所述推流方法还可以包括:所述边缘节点断开与所述推流器的连接。
在一个实施例中,所述推流方法还可以包括:根据禁推参数拒绝接收与所述频道对应的推流请求。所述禁推参数可以用于配置所述边缘节点,以使所述边缘节点在一定时间内禁止接收与所述频道对应的推流请求。
所述禁推参数可以包括:禁推频道名和禁推时间。所述禁推参数可以是预先设置的。
在另一个实施例中,所述目标中心节点接收到的推流请求还可以包括优先级信息。具体地,所述优先级信息可以在采用RTMP协议的推流请求的URL中采用参数(例如Pri)来表示。例如,包含了优先级信息的URL可以为“rtmp://serveraddr:port/appName/appInstance?wsPri=m”,其中,优先级信息为m。
在一个实施例中,所述优先级信息可以采用一个字符来表示。例如,可以采用数字1、2、3,或者,可以采用字母m、n等。所述优先级高低可以按照字符的预设顺序来确定。例如,字符的预设顺序为m、n、p、q,则优先级信息为m的推流请求比优先级信息为p的推流请求的优先级高。
在一个实施例中,所述优先级信息的取值可以基于改进的snowflake算法生成。
在该实施例中,当所述判断推流请求是否对应存在已有频道的判断结果为否时,所述目标中心节点可以为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。进一步地,所述目标中心节点还可以保存与该创建的频道对应的优先级信息。
或者,在该实施例中,当所述判断推流请求是否对应存在已有频道的判断结果为是时,比较所述推流请求的优先级信息与已有频道的优先级信息。所述目标中心节点可以根据比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
在一个实施例中,当所述推流请求的优先级低于已有频道的优先级时,所述中心节点还可以向所述边缘节点发送优先级较低的提醒消息。所述优先级较低的提醒消息可以为状态码。所述状态码可以用于表示当前推流发生的错误类型。具体地,用于表示优先级较低的状态码可以为短语“Priority Low”,该状态码可以表示当前推流发生的错误类型为:当前推流优先级低于原频道优先级。
例如,一个频道的优先级信息为1,当一个频道在直播过程中增加了语音流数据,或者切换了新的直播场景时,可以将新的流媒体数据采用较高的优先级信息2,那么,新的流媒体信息可以使用同一流名称再次推流至原频道,并更新覆盖原频道的流数据,进而可以保证一个频道内内容的快速替换和平滑衔接。
本申请实施例还提供一种推流方法,所述推流方法以中心节点为执行主体。请参阅图2,以中心节点为主体的推流方法可以包括以下步骤。
S21:中心节点接收边缘节点转推的推流请求,判断所述推流请求是否对 应存在已有频道。
在一个实施例中,所述推流请求可以采用RTMP协议进行传输。所述采用RTMP协议的推流请求的URL中可以包括发布点(即appName)和流名称(即appInstance)。
在一个实施例中,一个频道可以对应有频道名。所述频道名可以用于唯一标识所述频道。所述频道名可以包括:发布点和流名称(即流媒体数据对应URL中的appName和appInstance)。
在一个实施例中,所述判断推流请求对应的频道是否为已经存在的频道具体可以包括:将所述推流请求对应的频道名与所述中心节点已有的所有频道的频道名进行比对,若存在相同的频道,则判断结果为是;若不存在相同的频道,则判断结果为否。
S22:当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
在一个实施例中,所述提醒消息可以为状态码。所述状态码可以用于表示当前推流发生的错误类型。具体地,所述状态码可以为短语“Orgin Exist”,该状态码可以表示当前推流发生的错误类型为:重复推流。
在一个实施例中,所述中心节点还可以保存所述接收到的与创建的频道对应的流媒体数据。
在一个实施例中,所述流媒体数据可以包括音频数据和/或视频数据。
在另一个实施例中,所述中心节点接收到的推流请求还可以包括优先级信息。所述优先级信息可以为字符。例如,所述优先级信息可以为数字1、2、 3,或者,可以为字母m、n等。优先级高低顺序可以按照字符的预设顺序来确定。例如,字符的预设顺序为m、n、p、q,则优先级信息为m的推流请求比优先级信息为p的推流请求的优先级高。
在该实施例中,当所述判断推流请求是否对应存在已有频道的判断结果为否时,所述中心节点可以为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。进一步地,所述中心节点还可以保存与该创建的频道对应的优先级信息。
或者,在该实施例中,当所述判断推流请求是否对应存在已有频道的判断结果为是时,比较所述推流请求的优先级信息与已有频道的优先级信息。所述中心节点可以根据比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
本申请实施例还提供一种推流方法,所述推流方法以边缘节点为执行主体。请参阅图3,以边缘节点为主体的推流方法可以包括以下步骤。
S31:边缘节点接收推流器发出的推流请求。
在一个实施例中,所述推流请求可以采用RTMP协议进行传输。所述采用RTMP协议的推流请求的URL中可以包括发布点(即appName)和流名称(即appInstance)。
所述频道可以对应有频道名。所述频道名可以用于唯一标识所述频道。所述频道名可以包括:发布点和流名称。
所述边缘节点可以为一个或多个。
S32:所述边缘节点根据所述推流请求确定目标中心节点。
根据所述推流请求来确定目标中心节点,可以使所述一个或多个边缘节 点中的所述推流请求对应相同的目标中心节点。从而可以使得CDN中任一边缘节点转推所述推流请求时,都可以转推至于该推流请求对应的目标中心节点。
在一个实施例中,所述边缘节点根据所述推流请求确定目标中心节点,具体可以包括:将所述频道名作为key值进行哈希运算,从所述所有中心节点的互联网协议地址(Internet Protocol Address,IP)中确定出目标中心节点的IP。其中,所述目标中心节点的个数可以是预先设置的。
S33:所述边缘节点将所述推流请求转推至所述目标中心节点。
在一个实施例中,当所述目标中心节点判断出所述推流请求对应存在已有频道时,所述方法还可以包括:所述边缘节点接收所述目标中心节点发出的提醒消息。
进一步地,所述推流方法还可以包括:所述边缘节点向所述推流器发送推流失败信息。
其中,所述推流失败信息可以与所述提醒消息相同,也可以与所述提醒消息不同。
进一步地,所述推流方法还可以包括:所述边缘节点断开与所述推流器的连接。
在一个实施例中,所述推流方法还可以包括:根据禁推参数拒绝接收与所述频道对应的推流请求。所述禁推参数可以用于配置所述边缘节点,以使所述边缘节点在一定时间内禁止接收与所述频道对应的推流请求。
所述禁推参数可以包括:禁推频道名和禁推时间。所述禁推参数可以是预先设置的。
本申请实施例还提供一种推流系统。请参阅图4,所述推流系统包括至 少一个中心节点服务器41(图中仅示出1个)和至少一个边缘节点服务器42。
所述边缘节点服务器42,可以用于接收推流器发出的推流请求,根据所述推流请求确定目标中心节点服务器,将所述推流请求转推至目标中心节点服务器。
所述中心节点服务器41,可以用于接收所述边缘节点服务器42发出的所述推流请求,判断所述推流请求是否对应存在已有频道。当判断结果为是时,所述中心节点服务器41还用于向所述边缘节点服务器42发送提醒消息;或者,当判断结果为否时,所述中心节点服务器41还用于为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
在一个实施例中,当所述边缘节点服务器42接收到所述中心节点服务器41发出的提醒消息时,所述边缘节点服务器42还可以用于向所述推流器发送推流失败信息。
进一步地,所述边缘节点服务器42还可以用于断开与所述推流器的连接。
进一步地,所述边缘节点服务器42还可以用于根据禁推参数拒绝接收与所述频道对应的推流请求。所述禁推参数可以用于配置所述边缘节点服务器42,以使所述边缘节点服务器42在一定时间内禁止接收与所述频道对应的推流请求。
在一个实施例中,所述中心节点服务器41接收到的推流请求还可以包括优先级信息。那么,所述中心节点服务器41还可以用于当所述判断推流请求是否对应存在已有频道的判断结果为是时,比较所述推流请求的优先级信息与已有频道的优先级信息。所述优先级信息可以在采用RTMP协议的推流请求的URL中采用参数(例如Pri)来表示。
进一步地,所述中心节点服务器41还可以用于根据比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
在一个实施例中,当所述推流请求的优先级低于已有频道的优先级时,所述中心节点服务器41还可以向所述边缘节点服务器42发送优先级较低的提醒消息。所述优先级较低的提醒消息可以为状态码。所述状态码可以用于表示当前推流发生的错误类型。
本申请实施例还提供一种推流服务器,所述推流服务器为中心节点服务器。请参阅图5,所述推流服务器可以包括:
推流接收单元51,用于接收边缘节点转推的推流请求。
判断单元52,用于判断所述推流请求是否对应存在已有频道。
反馈或接收单元53,用于当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
请参阅图6,在一个实施例中,所述推流服务器还可以包括:
优先级比较单元54,用于当所述推流请求还包括优先级信息,且所述中心节点服务器判断推流请求是否对应存在已有频道的判断结果为是时,比较所述推流请求的优先级信息与已有频道的优先级信息。
存储单元55,用于根据所述优先级比较单元54的比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
本申请实施例还提供一种推流服务器,所述推流服务器为边缘节点服务器。请参阅图7,所述推流服务器可以包括:
接收单元71,用于接收推流器发出的推流请求。
目标中心节点确定单元72,用于根据所述推流请求确定目标中心节点,以使一个所述推流请求对应相同的目标中心节点。
转推单元73,将所述推流请求转推至所述目标中心节点。
参阅图8,在一个实施例中,所述推流服务器还可以包括:控制连接单元74,用于断开与所述推流器的连接。进一步地,所述控制连接单元还用于根据禁推参数拒绝接收与所述频道对应的推流请求。
参阅图9,本申请还提供一种推流服务器,所述推流服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述的中心节点或边缘节点执行的推流方法。
请参阅图10,在本申请中,上述实施例中的技术方案可以应用于如图10所示的计算机终端10上。计算机终端10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输模块106。本领域普通技术人员可以理解,图10所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,计算机终端10还可包括比图10中所示更多或者更少的组件,或者具有与图10所示不同的配置。
存储器104可用于存储应用软件的软件程序以及模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端10。上述网络的实例包括但不限于互联 网、企业内部网、局域网、移动通信网及其组合。
具体地,在本申请中,上述的服务器的部署方法可以作为计算机程序存储于上述的存储器104中,所述存储器104可以与处理器102耦合,那么当处理器102执行所述存储器104中的计算机程序时,便可以实现上述的服务器的部署方法中的各个步骤。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
由上可见,本申请提供的技术方案,通过比较频道名是否一致,来判断推理请求是否已经存在对应的频道,当已经存在对应的频道时,通过反馈提醒消息,可以不再接收与该频道对应的推流请求,从而能够避免CDN内部流量消耗以及服务器资源浪费。同时,利用哈希算法和频道名确定边缘节点转推的目标中心节点,可以保证相同的频道名对应的中心节点的一致性,同一频道名在通过不同的边缘节点也可以转推至相同的中心节点,从而保证一个频道的全网唯一性。同时,利用哈希运算的方法可以保证CDN的负载均衡,提升了各种应用场景下如直播时,CDN的稳定性和高可用。因此,本申请提供的技术方案,能够避免CDN内部流量消耗以及服务器资源浪费,提高推流效率。
进一步地,通过优先级信息,可以将客户处理或更新过的内容使用同一流名称再次推流,且流数据可以覆盖上次推流,实现内容的快速替换和平滑衔 接,从而满足客户的场景需求,提升用户体验。
通过以上的实施例的描述,本领域的技术人员可以清楚地了解到各实施例可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (20)

  1. 一种推流方法,包括:
    中心节点接收边缘节点转推的推流请求,判断所述推流请求是否对应存在已有频道;
    当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
  2. 如权利要求1所述的方法,其中,所述判断推流请求对应的频道是否为已经存在的频道具体包括:
    将所述推流请求对应的频道名与所述中心节点已有的所有频道的频道名进行比对;
    若存在相同的频道,则判断结果为是;或者,若不存在相同的频道,则判断结果为否。
  3. 如权利要求2所述的方法,其中,所述频道名用于唯一标识所述频道,所述频道名包括:发布点和流名称。
  4. 根据权利要求1所述的方法,其中,所述推流请求还包括优先级信息。
  5. 根据权利要求4所述的方法,其中,当判断结果为否时,所述方法还包括:中心节点保存与该创建的频道对应的优先级信息。
  6. 根据权利要求4所述的方法,其中,当判断结果为是时,所述方法还包括:比较所述推流请求的优先级信息与已有频道的优先级信息,所述中心节点根据比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
  7. 一种推流方法,其中,包括:
    边缘节点接收推流器发出的推流请求;所述边缘节点为一个或多个;
    所述边缘节点根据所述推流请求确定目标中心节点,以使所述一个或多个边缘节点中的所述推流请求对应相同的目标中心节点;
    所述边缘节点将所述推流请求转推至所述目标中心节点。
  8. 根据权利要求7所述的方法,其中,所述边缘节点根据所述推流请求确定目标中心节点,具体包括:将所述推流请求的频道名作为key值进行哈希运算,从所述所有中心节点的IP中确定出目标中心节点的IP。
  9. 根据权利要求7所述的方法,其中,当所述目标中心节点判断出所述推流请求对应存在已有频道时,所述方法还包括:所述边缘节点接收所述目标中心节点发出的提醒消息。
  10. 根据权利要求9所述的方法,其中,所述方法还包括:所述边缘节点向所述推流器发送推流失败信息。
  11. 根据权利要求9所述的方法,其中,所述方法还包括:所述边缘节点断开与所述推流器的连接;和/或,根据禁推参数拒绝接收与所述频道对应的推流请求。
  12. 根据权利要求11所述的方法,其中,所述禁推参数包括:禁推频道名和禁推时间。
  13. 一种推流系统,其中,包括至少一个中心节点服务器和至少一个边缘节点服务器;其中,
    所述边缘节点服务器,用于接收推流器发出的推流请求,根据所述推流请求确定目标中心节点服务器,将所述推流请求转推至目标中心节点服务器;
    所述中心节点服务器包括所述目标中心服务器,用于接收所述边缘节点服务器发出的所述推流请求,判断所述推流请求是否对应存在已有频道;当判断结果为是时,所述中心节点服务器还用于向所述边缘节点服务器发送提醒消息;或者,当判断结果为否时,所述中心节点服务器还用于为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
  14. 根据权利要求13所述的系统,其中,当所述边缘节点服务器接收到所述中心节点服务器发出的提醒消息时,所述边缘节点服务器还用于根据禁推参数拒绝接收与所述频道对应的推流请求。
  15. 根据权利要求13所述的系统,其中,当所述推流请求还包括优先级信息,且所述中心节点服务器判断推流请求是否对应存在已有频道的判断结果为是时,
    所述中心节点服务器还用于比较所述推流请求的优先级信息与已有频道的优先级信息,根据比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
  16. 一种推流服务器,其中,所述推流服务器为中心节点服务器,包括:
    推流接收单元,用于接收边缘节点转推的推流请求;
    判断单元,用于判断所述推流请求是否对应存在已有频道;
    反馈或接收单元,用于当判断结果为是时,所述中心节点向所述边缘节点发送提醒消息;或者,当判断结果为否时,所述中心节点为所述推流请求创建一频道,并接收与该频道对应的流媒体数据。
  17. 根据权利要求16所述的服务器,其中,还包括:
    优先级比较单元,用于当所述推流请求还包括优先级信息,且所述中心节点服务器判断推流请求是否对应存在已有频道的判断结果为是时,比较所述推流请求的优先级信息与已有频道的优先级信息。
    存储单元,用于根据所述优先级比较单元的比较结果接收优先级信息中优先级较高的流媒体数据,并保存与所述流媒体数据对应的优先级信息。
  18. 一种推流服务器,其中,所述推流服务器为边缘节点服务器,包括:
    接收单元,用于接收推流器发出的推流请求;
    目标中心节点确定单元,用于根据所述推流请求确定目标中心节点,以使一个所述推流请求对应相同的目标中心节点;
    转推单元,用于将所述推流请求转推至所述目标中心节点。
  19. 根据权利要求18所述的服务器,其中,还包括:控制连接单元,用于断开与所述推流器的连接;以及用于根据禁推参数拒绝接收与所述频道对应的推流请求。
  20. 一种服务器,其中,所述服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至6中任一权利要求或7至12中任一权利要求所述的方法。
PCT/CN2019/077230 2019-01-29 2019-03-06 一种推流方法、系统及服务器 WO2020155293A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19725834.6A EP3709664B1 (en) 2019-01-29 2019-03-06 Stream pushing method, system and server
US16/439,537 US11102319B2 (en) 2019-01-29 2019-06-12 Method, system and server for stream-pushing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910088038.1 2019-01-29
CN201910088038.1A CN109729397A (zh) 2019-01-29 2019-01-29 一种推流方法、系统及服务器

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/439,537 Continuation US11102319B2 (en) 2019-01-29 2019-06-12 Method, system and server for stream-pushing

Publications (1)

Publication Number Publication Date
WO2020155293A1 true WO2020155293A1 (zh) 2020-08-06

Family

ID=66301276

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077230 WO2020155293A1 (zh) 2019-01-29 2019-03-06 一种推流方法、系统及服务器

Country Status (3)

Country Link
EP (1) EP3709664B1 (zh)
CN (1) CN109729397A (zh)
WO (1) WO2020155293A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398659A (zh) * 2021-10-28 2022-04-26 上海哔哩哔哩科技有限公司 一种资源校验方法、装置、设备及存储介质
CN114827633A (zh) * 2022-06-17 2022-07-29 浙江华创视讯科技有限公司 一种媒体流容灾方法、装置和相关设备

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460866A (zh) * 2019-07-29 2019-11-15 网宿科技股份有限公司 推送流媒体数据的方法、系统和服务器
CN110753237B (zh) * 2019-11-05 2021-09-07 北京金和网络股份有限公司 节省流媒体服务器上行带宽流量的方法及装置
CN111586446A (zh) * 2020-04-13 2020-08-25 微梦创科网络科技(中国)有限公司 一种媒体流无缝切换方法、装置及系统
CN114222086B (zh) * 2021-10-15 2023-01-31 中兴通讯股份有限公司 音视频码流的调度方法、系统、介质及电子装置
CN114051146B (zh) * 2021-11-09 2024-07-30 上海哔哩哔哩科技有限公司 防止重复推流的方法和系统
CN114268799B (zh) * 2021-12-23 2023-05-23 杭州阿启视科技有限公司 一种流媒体传输方法、装置、电子设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141660A (zh) * 2015-07-24 2015-12-09 网宿科技股份有限公司 一种流媒体管理方法及系统
US20160182600A1 (en) * 2014-12-23 2016-06-23 Adobe Systems Incorporated Reducing requests for media segments in streaming of multimedia content
CN108055264A (zh) * 2017-12-13 2018-05-18 平安科技(深圳)有限公司 推流服务器的调度装置、方法及计算机可读存储介质
CN108574685A (zh) * 2017-03-14 2018-09-25 华为技术有限公司 一种流媒体推送方法、装置及系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4216599A1 (en) * 2013-06-11 2023-07-26 Seven Networks, LLC Offloading application traffic to a shared communication channel for signal optimization in a wireless network for traffic utilizing proprietary and non-proprietary protocols
CN105681387A (zh) * 2015-11-26 2016-06-15 乐视云计算有限公司 一种直播视频的上传方法、装置及系统
CN105721484B (zh) * 2016-03-04 2019-01-15 网宿科技股份有限公司 一种流媒体的转推方法、系统及具有该系统的服务器
CN106850581B (zh) * 2017-01-04 2020-06-23 网宿科技股份有限公司 互动直播流媒体数据的分发备份方法、系统及服务器
CN106803974B (zh) * 2017-03-01 2019-07-30 北京牡丹电子集团有限责任公司数字电视技术中心 直播视频流实时转发方法
CN108632305B (zh) * 2017-03-16 2021-05-25 杭州海康威视数字技术股份有限公司 云存储系统、媒体数据存储方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160182600A1 (en) * 2014-12-23 2016-06-23 Adobe Systems Incorporated Reducing requests for media segments in streaming of multimedia content
CN105141660A (zh) * 2015-07-24 2015-12-09 网宿科技股份有限公司 一种流媒体管理方法及系统
CN108574685A (zh) * 2017-03-14 2018-09-25 华为技术有限公司 一种流媒体推送方法、装置及系统
CN108055264A (zh) * 2017-12-13 2018-05-18 平安科技(深圳)有限公司 推流服务器的调度装置、方法及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3709664A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398659A (zh) * 2021-10-28 2022-04-26 上海哔哩哔哩科技有限公司 一种资源校验方法、装置、设备及存储介质
CN114827633A (zh) * 2022-06-17 2022-07-29 浙江华创视讯科技有限公司 一种媒体流容灾方法、装置和相关设备

Also Published As

Publication number Publication date
CN109729397A (zh) 2019-05-07
EP3709664A1 (en) 2020-09-16
EP3709664A4 (en) 2020-09-16
EP3709664B1 (en) 2022-12-21

Similar Documents

Publication Publication Date Title
WO2020155293A1 (zh) 一种推流方法、系统及服务器
EP3595268B1 (en) Streaming media resource distribution method, system, edge node and central dispatching system
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
US11102319B2 (en) Method, system and server for stream-pushing
KR102132266B1 (ko) 데이터 스트리밍에 대한 보조의 노드 타입 기반 제어
CN107404512B (zh) 资源订阅方法、资源订阅装置和资源订阅系統
CN109067578B (zh) 一种组播快速切换的方法和装置
US8966107B2 (en) System and method of streaming data over a distributed infrastructure
US10455294B2 (en) Video distribution method and device
WO2011029315A1 (zh) 多媒体消息广播方法及系统
JP2015501488A (ja) ピアツーピアコンテンツ配信システムにおけるピアによって受信されたコンテンツの完全性の確認
EP3576371A1 (en) Method and system for transmitting streaming media resource
US9385877B2 (en) Multicast systems, methods, and computer program products
WO2023000936A1 (zh) 一种数据处理方法、网元设备以及可读存储介质
CN110768708B (zh) 一种基于通信卫星的组播方法、服务器和终端
KR102162851B1 (ko) 인기 있는 라이브 방송 비디오를 결정하는 방법 및 디바이스
JP2024099534A (ja) 間接通信のためのネットワークノード及びネットワークノードにおける方法
CN112217735A (zh) 信息同步方法与负载均衡系统
CN102857352B (zh) 基于叠加网的组播、广播方法及系统
WO2015149351A1 (zh) 监控服务器、解析服务器、请求设备及节点选择方法
CN113595912B (zh) 5GLAN中基于IPv6扩展报头的一对多通信方法及装置
US12126666B2 (en) Providing transparent multicast content via mobile telecommunication network
KR101524470B1 (ko) 분산 모바일 컨텐츠 전달 네트워크 시스템 및 상기 시스템을 이용한 컨텐츠 제공 방법
KR102288478B1 (ko) 분산 클라우드 인프라에서 서비스 가속화 방법 및 그 시스템
Tang et al. Experiences on peer to peer based live video steaming

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019725834

Country of ref document: EP

Effective date: 20190531

NENP Non-entry into the national phase

Ref country code: DE