CN114501053B - Live stream acquisition method and device - Google Patents

Live stream acquisition method and device Download PDF

Info

Publication number
CN114501053B
CN114501053B CN202210116541.5A CN202210116541A CN114501053B CN 114501053 B CN114501053 B CN 114501053B CN 202210116541 A CN202210116541 A CN 202210116541A CN 114501053 B CN114501053 B CN 114501053B
Authority
CN
China
Prior art keywords
node
edge
stream
priority
live stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210116541.5A
Other languages
Chinese (zh)
Other versions
CN114501053A (en
Inventor
董晓宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202210116541.5A priority Critical patent/CN114501053B/en
Publication of CN114501053A publication Critical patent/CN114501053A/en
Application granted granted Critical
Publication of CN114501053B publication Critical patent/CN114501053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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
    • H04N21/2385Channel allocation; Bandwidth allocation
    • 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
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44213Monitoring of end-user related data
    • H04N21/44222Analytics of user selections, e.g. selection of programs or purchase activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/4508Management of client data or end-user data
    • H04N21/4532Management of client data or end-user data involving end-user characteristics, e.g. viewer profile, preferences

Abstract

The application provides a live stream acquisition method and a device, wherein the live stream acquisition method is applied to a stream information server, the stream information server comprises historical node information of each node in a content distribution network, and the method comprises the following steps: receiving a live broadcast stream acquisition request sent by a viewer terminal, wherein the live broadcast stream acquisition request carries a target live broadcast stream identifier; matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities; and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence. The edge node can be accurately scheduled, the convergence ratio of the source returning is greatly improved, and the source returning cost is effectively reduced.

Description

Live stream acquisition method and device
Technical Field
The application relates to the technical field of computers, in particular to a live stream acquisition method. The application also relates to a live stream acquisition device, a computing device and a computer readable storage medium.
Background
With the rapid development of computer technology and internet technology, live broadcast on a network social platform is becoming a popular real-time interaction form. Live broadcast is generally divided into uplink push stream and downlink distribution, wherein the main broadcast carries out uplink push stream, audience in a live broadcast room subscribes and watches the live broadcast stream, and then the live broadcast stream is distributed to audience end in downlink.
The existing live broadcast is usually realized through a content distribution network, when a viewer selects a live broadcast to be watched, the viewer firstly requests a background dispatching center service to distribute an access node, the dispatching center selects a plurality of nodes which are better in experience for a user to return to the user terminal, and when the user is connected with a certain node for a pause, the switching line can be selected. However, the method cannot clearly know the distribution condition of the current live stream in the distribution network, cannot accurately schedule nodes, and for a large-scale live broadcast platform, because the user base number, the push-pull stream number and the content distribution flow are large, the number of sources is large, invalid sources are easy to cause, and the bandwidth cost is increased.
Disclosure of Invention
In view of this, the embodiment of the application provides a live stream acquisition method. The application also relates to a live stream acquisition device, a computing device and a computer readable storage medium, so as to solve the technical defects of large number of sources and high broadband cost in the prior art.
According to a first aspect of an embodiment of the present application, there is provided a live stream obtaining method applied to a stream information server, where the stream information server includes historical node information of each node in a content distribution network, the method including:
receiving a live broadcast stream acquisition request sent by a viewer terminal, wherein the live broadcast stream acquisition request carries a target live broadcast stream identifier;
matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities;
and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence.
According to a second aspect of the embodiment of the present application, there is provided a live stream acquisition method, applied to a viewer, including:
acquiring a target live stream identifier, and generating a live stream acquisition request based on the target live stream identifier;
the live stream acquisition request is sent to a stream information server;
receiving a node sequence consisting of a plurality of edge nodes fed back by the stream information service end, wherein the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined by the stream information service end according to the target live broadcast stream identifier and historical node information of the plurality of edge nodes;
And acquiring the target live stream according to the access priority of each edge node in the node sequence.
According to a third aspect of an embodiment of the present application, there is provided a live stream obtaining apparatus applied to a stream information server, where the stream information server includes historical node information of each node in a content distribution network, the apparatus including:
the first receiving module is configured to receive a live stream acquisition request sent by a viewer terminal, wherein the live stream acquisition request carries a target live stream identifier;
the determining module is configured to match the target live stream identifier with historical node information of a plurality of edge nodes respectively, determine access priorities of the plurality of edge nodes according to matching results, and determine a node sequence formed by the plurality of edge nodes according to the access priorities;
and the first sending module is configured to feed back the node sequence to the audience terminal so that the audience terminal can acquire the target live stream according to the access priority of each edge node in the node sequence.
According to a fourth aspect of an embodiment of the present application, there is provided a live stream acquiring apparatus, applied to a viewer, including:
The first acquisition module is configured to acquire a target live stream identifier and generate a live stream acquisition request based on the target live stream identifier;
the second sending module is configured to send the live stream acquisition request to a stream information server;
the second receiving module is configured to receive a node sequence consisting of a plurality of edge nodes fed back by the stream information service end, wherein the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined by the stream information service end according to the target live broadcast stream identifier and historical node information of the plurality of edge nodes;
and the second acquisition module is configured to acquire the target live stream according to the access priority of each edge node in the node sequence.
According to a fifth aspect of embodiments of the present application, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the live stream acquisition method when executing the computer instructions.
According to a sixth aspect of embodiments of the present application, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the live stream acquisition method.
According to the live broadcast stream acquisition method provided by the application, a live broadcast stream acquisition request sent by a viewer terminal is received, and the live broadcast stream acquisition request carries a target live broadcast stream identifier; matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities; and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence. Based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
Drawings
Fig. 1 is a flowchart of a live stream acquisition method in the prior art provided in the present specification;
fig. 2 is a flowchart of a live stream acquisition method according to an embodiment of the present application;
fig. 3A is a process flow diagram of a live stream acquisition method according to an embodiment of the present application;
fig. 3B is a process flow diagram of another live stream acquisition method according to an embodiment of the present application;
fig. 4 is a flowchart of another live stream acquisition method according to an embodiment of the present application;
fig. 5 is a process flow diagram of a live stream acquisition method applied to live game according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a live stream acquiring device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another live stream acquiring apparatus according to an embodiment of the present application;
FIG. 8 is a block diagram of a computing device according to one embodiment of the application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application may be embodied in many other forms than those herein described, and those skilled in the art will readily appreciate that the present application may be similarly embodied without departing from the spirit or essential characteristics thereof, and therefore the present application is not limited to the specific embodiments disclosed below.
The terminology used in the one or more embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the application. As used in one or more embodiments of the application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of the application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present application will be explained.
Tree structure: that is, tree structure, is a data structure used to simulate a data set having Tree structure properties.
First kilometer: it means that the backbone network on the internet is very smooth, and only the network of the first kilometer or the last kilometer of the user to access the backbone network is very unstable, and most of the network problems are in the first kilometer or the last kilometer.
Live broadcast distribution: live broadcast is generally divided into uplink push stream and downlink distribution, and in general, live broadcast is pushed by a host broadcast, and viewers in other live broadcast rooms subscribe to view the channel stream, and distribution refers to how to distribute audio and video data pushed by the host broadcast, namely, live broadcast stream to the viewer end.
Then, a live stream acquisition method provided by the application is described.
With the rapid development of computer technology and internet technology, live broadcast on a network social platform is becoming a popular real-time interaction form. Live broadcast is generally divided into uplink push stream and downlink distribution, wherein the main broadcast carries out uplink push stream, audience in a live broadcast room subscribes and watches the live broadcast stream, and then the live broadcast stream is distributed to audience end in downlink.
The existing live broadcast is usually realized through a content distribution network, when a viewer selects a live broadcast to be watched, the viewer firstly requests a background dispatching center service to distribute an access node, the dispatching center selects a plurality of nodes which are better in experience for a user to return to the user terminal, and when the user is connected with a certain node for a pause, the switching line can be selected. Referring to fig. 1, fig. 1 shows a flowchart of a live stream acquisition method in the prior art provided in the present specification: the anchor pushes and pulls to the root node L0 of the source station in the live broadcasting room; the audience A enters a live broadcast room, and the scheduling server allocates four edge nodes for the audience A: l2-01, L2-02, L2-03 and L3-04, wherein the edge nodes L2-01 and L2-02 are connected with the secondary node L1-01, and the edge nodes L2-03 and L3-04 are connected with the secondary node L1-02; the audience A selects the edge node L2-01, and at the moment, as the edge node L2-01 has no live stream, the live stream is required to be pulled from the L1-01, and the live stream is not required to be pulled to the root node L0 by the L1-01; at this time, the second audience also enters the live broadcast room, and the scheduling server side also distributes four edge nodes for the second audience: l2-01, L2-02, L2-03 and L3-04, while the viewer B selects the edge node L2-03, at this time, the edge node L2-03 pulls the stream step by step towards the secondary node L1-02 and the root node L0 because the edge node L2-03 does not have the live stream.
However, the method cannot clearly know the distribution condition of the current live stream in the distribution network, cannot accurately schedule nodes, and for a large-scale live broadcast platform, because the user base number, the push-pull stream number and the content distribution flow are large, the number of sources is large, invalid sources are easy to cause, and the bandwidth cost is increased.
Therefore, the application provides a live broadcast acquisition method, which is characterized in that a live broadcast stream acquisition request sent by a viewer terminal is received, wherein the live broadcast stream acquisition request carries a target live broadcast stream identifier; matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities; and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence. Based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
In the present application, a live stream acquisition method is provided, and the present application relates to a live stream acquisition apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 2 shows a flowchart of a live stream obtaining method according to an embodiment of the present application, which is applied to a stream information server, where the stream information server includes historical node information of each node in a content distribution network, and specifically includes the following steps:
step 202: and receiving a live broadcast stream acquisition request sent by a viewer terminal, wherein the live broadcast stream acquisition request carries a target live broadcast stream identifier.
Specifically, the audience refers to a client corresponding to an audience watching live broadcast; the target live stream refers to a video stream or video content that a viewer needs to watch; the live stream acquisition request refers to a request for acquiring a target live stream; target live stream identification refers to identification characterizing a target live stream, such as a name, a label, a main cast name, etc. of the target live stream.
In practical application, when a viewer wants to watch a certain live broadcast, namely, a target live broadcast, the viewer responds to an instruction triggered by the operation of the viewer for watching the target live broadcast to acquire a target live broadcast stream corresponding to the target live broadcast, and the target live broadcast or a target live broadcast stream identifier corresponding to the target live broadcast stream needs to be acquired first: the target live broadcast stream identifier can be carried in an instruction triggered by the operation of watching the target live broadcast by the audience, or can be obtained by automatically identifying the instruction triggered by the operation of watching the target live broadcast by the audience. And further generating a live stream acquisition request carrying the target live stream identifier, and transmitting the live stream acquisition request to the stream information server, namely, the stream information server receives the live stream acquisition request carrying the target live stream identifier, which is transmitted by the audience terminal.
In addition, after the audience terminal generates the live stream acquisition request carrying the target live stream identifier, the live stream acquisition request can be sent to the scheduling server terminal, and then the scheduling server terminal forwards the live stream acquisition request to the stream information server terminal, that is, the stream information server terminal receives the live stream acquisition request carrying the target live stream identifier sent by the audience terminal.
In a possible implementation manner of the embodiment of the present disclosure, before receiving the live stream acquisition request, the streaming information server receives and stores the history node information sent by each edge node. That is, before receiving the live stream acquisition request sent by the viewer, the method further includes:
acquiring historical node information sent by each edge node;
and storing the history node information sent by each edge node.
Specifically, the edge node refers to a node constructed at the network edge side close to the user, provides storage, calculation, network and other resources, and sinks part of key service application to the access network edge, so that the width and delay loss caused by network transmission and multistage forwarding can be reduced; the history node information refers to the current information of the edge node reported by the edge node, such as live stream identification, connection number, network condition and the like corresponding to live streams existing in the edge node.
In practical application, each edge node can send some information of the current node, namely historical node information, to the stream information server once every preset time interval; each edge node can actively send current historical node information to the stream information server under the condition that some information of the current node changes. Namely, the stream information server acquires the history node information sent by each edge node. Then, the stream information server saves each history node information, and the stored invalid history node information, i.e. the history node information acquired before the history node information is acquired, can be deleted. Therefore, the real-time performance of the historical node information in the stream information server is effectively ensured, the correct node sequence can be returned based on the historical node information, the smooth acquisition of the target live stream is ensured, and the efficiency of acquiring the target live stream can be improved.
It should be noted that, not only the edge node will send the history node information to the stream information server, but each node in the pulling process will send the history node information to the stream information server, such as the secondary node, the root node, etc., and will send the history node information to the stream information server. In addition, the stream information server side generates an information tree according to the historical node information sent by each node, so that the node path of the audience side when watching live broadcast can be determined according to the information tree, and simultaneously, a stream information query interface is provided for the outside for the scheduling server side to query.
In addition, the information acquisition end, namely each edge node, the secondary node and the source node, reports each live stream on the current node to the stream information service end, and informs the stream information service end of the live streams in each node, namely history node information, and the history node information reported by each node in real time. And each node can send heartbeat packets to the stream information service end and keep heartbeat.
Illustratively, the streaming information server may receive the historical node information through an external interface, which may be as follows:
sercive StreamCenter{
rpc GetStream(StreamReq)returns(StreamTreeInfo)
}
the parameters of the request, i.e. the parameters of the live stream acquisition request, may be as follows:
message StreamReq{
string streamID=1[(gogoproto.jsontag)=’streamID’,(gogoproto.moretags)=’validate:”required”’];
}
step 204: and respectively matching the target live stream identifier with historical node information of a plurality of edge nodes, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities.
On the basis of receiving a live broadcast stream acquisition request carrying a target live broadcast stream identifier, further, matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively to obtain a matching result, determining access priorities of the plurality of edge nodes according to the matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities.
Specifically, the edge node refers to a node constructed at the network edge side close to the user, provides storage, calculation, network and other resources, and sinks part of key service application to the access network edge, so that the width and delay loss caused by network transmission and multistage forwarding can be reduced; the history node information refers to the current information of the edge node reported by the edge node, such as live stream identification, connection number, network condition and the like corresponding to live streams existing in the edge node. The access priority refers to a parameter of the corresponding priority level, and the node with higher access priority is accessed first and the node with lower access priority is accessed later; the node sequence refers to a sequence in which node access priorities are arranged.
In practical application, after receiving a live broadcast stream acquisition request carrying a target live broadcast stream identifier, a stream information server firstly extracts the target live broadcast stream identifier from the live broadcast stream acquisition request, then matches the target live broadcast stream identifier with historical node information of a plurality of edge nodes, and determines access priority of each edge node according to a matching result; or on the basis of matching the target live stream identification with the historical node information of the plurality of edge nodes, determining the access priority of each edge node based on the matching result and the access parameters in the historical node information. Further, according to the access priority of each edge node, the edge nodes are ordered according to the order from high to low of the access priority or according to the order from low to high of the access priority, and a node sequence is obtained. In order to improve the access efficiency of the target live stream, it is preferable to order the edge nodes in order of higher access priority.
For example, the target live stream identifier zb is zb, the stream information service end stores history node information of 5 edge nodes, the target live stream identifier zb is respectively matched with the history node information of 5 edge nodes, wherein the matching degree of the target live stream identifier zb and the history node information of a first edge node is fifty percent, the matching degree of the target live stream identifier zb and the history node information of a second edge node is ten percent, the matching degree of the target live stream identifier zb and the history node information of a third edge node is forty percent, the matching degree of the target live stream identifier zb and the history node information of a fourth edge node is hundred percent, the matching degree of the target live stream identifier zb and the history node information of a fifth edge node is zero, the higher the matching degree is, the higher the access priority of the fourth edge node is highest, the access priority of the first edge node is second high, the access priority of the third edge node is third high, the access priority of the second edge node is fourth high, the matching degree of the history node information of the fourth edge node is fifth edge node is high, the matching degree of the history node information of the target live stream identifier zb and the history node information of the fourth edge node is fifth edge node is zero, the higher access priority of the fourth edge node is the history node is the second edge node, and the access priority of the fourth edge node is the second edge node. A fourth edge node, a first edge node, a third edge node, a second edge node, and a fifth edge node.
It should be noted that, the history node information includes a lot of information, and is described by taking the history node information of a certain node as an example, the history node information may include a frame rate, a bit rate, a number of times, and an identifier of a back source node, for example, an ID, where the node receives an IP query address of a target live stream, an IP query address of a back source node, service quality data information, a current live stream state, whether the node is a push node, source information, service information, a total play number, a single protocol play number, reported node information, specific stream information, and so on. If the node is a push node, the identifier of the source returning node is the identifier of the node, and the IP query address of the source returning node is the user IP of the user; the service quality data information can be filled when no data exists, namely invalid data is cleaned up at the edge node; the source information is used for constructing a stream forwarding tree by the stream information server; the service information may include the number of users used by the streaming information server to decide the cold and hot streams.
In a possible implementation manner of the embodiment of the present disclosure, the access priority of the edge node may be determined based on whether a target live stream identifier exists in the history node information, that is, the target live stream identifier is respectively matched with the history node information of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined according to a matching result, where a specific implementation process may be as follows:
And aiming at any edge node in the plurality of edge nodes, if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a first priority.
Specifically, the first priority is the highest access priority.
In practical application, when determining the access priority of an edge node, for any edge node, checking whether a target live stream identifier is included in live stream identifiers included in history node information of the edge node, or directly checking whether the history node information of the edge node includes the target live stream identifier, that is, judging whether the edge node includes a target live stream, that is, whether the target live stream identifier is matched with the live stream identifier included in the history node information of the edge node, if the history node information of the edge node or the live stream identifier included in the history node information includes the target live stream identifier, it is indicated that the edge node includes a target live stream corresponding to the target live stream identifier, that is, whether the target live stream identifier is successfully matched with the live stream identifier included in the history node information of the edge node, that is, the viewer can directly acquire the target live stream in the edge node, so that the access priority of the edge node is determined to be the highest, that is, the first priority.
In addition, the history node information of the edge node or the live stream identifier included in the history node information may not have the target live stream identifier, and at this time, the access priority of the edge node may be determined to be lower than a first priority, that is, for any edge node in the plurality of edge nodes, if matching between the target live stream identifier and the live stream identifier included in the history node information of the edge node fails, the access priority of the edge node is determined to be a second priority, where the first priority is higher than the second priority.
In practical application, for any edge node, checking whether a target live stream identifier exists in live stream identifiers contained in the history node information of the edge node, or directly checking whether the history node information of the edge node contains the target live stream identifier, namely judging whether the edge node has the target live stream, namely judging whether the target live stream identifier is matched with the live stream identifier contained in the history node information of the edge node, if the history node information of the edge node or the live stream identifier contained in the history node information does not contain the target live stream identifier, indicating that the edge node does not have the target live stream corresponding to the target live stream identifier, namely that the target live stream identifier fails to be matched with the live stream identifier contained in the history node information of the edge node, namely that the target live stream cannot be directly acquired in the edge node, so that the access priority of the edge node is lower than the first priority, namely determining that the access priority of the edge node is a second priority lower than the first priority.
For example, there are 2 edge nodes, where the history node information of edge node 1 contains live streams identified by: a1, B1, and C1, the history node information of the edge node 2 includes live stream identification: a2, B2 and C2, assuming that the target live stream identifier is B2, the history node information of the edge node 1 does not contain the target live stream identifier, the history node information of the edge node 2 contains the target live stream identifier, the access priority of the edge node 2 is determined to be a first priority, and the access priority of the edge node 1 is determined to be a second priority.
Therefore, the access priority of the edge node is determined according to whether the history node information contains the target live stream identifier, so that the method is simple and quick, the speed of determining the access priority can be improved, and the accuracy of determining the access priority can be improved.
It should be noted that, there may be a plurality of edge nodes with the same access priority, at this time, the determining the sub-priority of the edge node with the same access priority according to the connection information in the history node information, that is, if the history node information further includes the connection information, further includes:
if the access priority is a plurality of edge nodes with appointed priority, determining the edge node with the access priority being the appointed priority as a target edge node, wherein the appointed priority is a first priority or a second priority;
And determining the sub-priority of each target edge node in the designated priority according to the connection information of each target edge node.
Specifically, the designated priority is a first priority or a second priority; connection information refers to information about the connection by the edge node, such as network speed, number of connections.
In practical application, if there are multiple edge nodes with access priority being the first priority, determining the multiple edge nodes with access priority being the first priority as target edge nodes, then determining the sub-priority of each target edge node in the first priority according to the connection information of each target edge node, that is, comparing the connection information of each target edge node, if the connection information is stronger, the sub-priority of the target edge node is higher, and if the connection information is weaker, the sub-priority of the target edge node is lower. Similarly, if there are a plurality of edge nodes with access priority being second priority, determining the plurality of edge nodes with access priority being second priority as target edge nodes, then determining the sub-priority of each target edge node in the second priority according to the connection information of each target edge node, that is, comparing the connection information of each target edge node, if the connection information is stronger, the sub-priority of the target edge node is higher, and if the connection information is weaker, the sub-priority of the target edge node is lower.
For example, there are 3 edge nodes with access priority of the first priority, namely edge nodes f1, f2 and f3, respectively, the connection information is network speed, and assuming that the network speed of the edge node f2 is higher than the network speed of the edge node f3, and the network speed of the edge node f3 is higher than the network speed of the edge node f1, the sub-priority of the edge node f2 is highest, and the sub-priority of the edge node f3 is lowest under the first priority.
And determining the sub-priorities of a plurality of edge nodes under the same access priority through the connection information of each edge node, thereby being beneficial to improving the efficiency of determining the node sequence and further improving the efficiency of acquiring the live stream.
In addition, when determining the access priorities of the plurality of edge nodes, the load problem of each edge node needs to be considered, that is, the access number of each edge node needs to be considered, at this time, if the access number in the history node information of the edge node is greater than a preset threshold value for any edge node, it is indicated that the access number of the edge node has reached an upper limit or the access number is sufficient, and the audience end that does not access the edge node cannot be allowed to access, and at this time, the access priority of the edge node may be determined as the lowest priority. That is, for any edge node, if the number of accesses in the history node information of the edge node is greater than a preset threshold, determining that the access priority of the edge node is determined to be the lowest priority.
Preferably, when the number of accesses is considered, whether the history node information contains the target live stream identifier or not may also need to be considered, and when the history node information of an edge node contains the target live stream identifier and the number of accesses is greater than a preset threshold, the access priority of the edge node may be determined to be the lowest priority. That is, when the history node information further includes the number of accesses, the matching the target live broadcast stream identifier with the history node information of the plurality of edge nodes, and determining the access priorities of the plurality of edge nodes according to the matching result, where the specific implementation process may be as follows:
if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the designated edge node, and the access number is larger than a preset threshold, determining that the access priority of the designated edge node is the lowest priority, wherein the designated edge node is any edge node.
Specifically, the number of accesses is the number of audience terminals accessed by the edge node, or the number of audience terminals accessing the edge node; the preset threshold is a preset value for measuring whether the number of accesses of the edge node is full.
In practical application, if the history node information of any edge node further includes the access number, and if the history node information of the edge node includes the target live stream identifier and the access number in the history node information of the edge node is greater than the preset threshold, it is indicated that the access number of the edge node has reached the upper limit or the access number is sufficient, and the audience that does not access the edge node cannot be allowed to access, because the history node information of the edge node includes the target live stream identifier, in order to avoid that the edge node is preferentially accessed, the access priority of the edge node may be determined as the lowest priority. Therefore, the edge nodes with the history node information containing the target live stream identification and the access number larger than the preset threshold value can be prevented from being preferentially accessed, and the efficiency of acquiring the target live stream is improved.
Step 206: and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence.
And further, the node sequence is sent to the audience terminal on the basis of determining the node sequence formed by the plurality of edge nodes according to the target live stream identification and the historical node information of the plurality of edge nodes, so that the audience terminal obtains the target live stream.
In practical application, after the stream information service end determines a node sequence formed by a plurality of edge nodes, the node sequence can be directly sent to the audience end; the node sequence may also be sent to the dispatch server first, and then forwarded to the viewer by the dispatch server. After receiving the node sequence, the audience terminal automatically acquires the target live stream from the edge node with the highest access priority according to the access priority of each edge node.
Referring to fig. 3A, fig. 3A shows a process flow chart of a live stream acquisition method according to an embodiment of the present application: the anchor pushes and pulls to the root node L0 of the source station in the live broadcasting room; the audience A enters a live broadcasting room, the stream information service end discovers that four edge nodes L2-01, L2-02, L2-03 and L3-04 do not have the main broadcasting stream based on historical node information, and the node sequence fed back by the audience A is as follows: edge nodes L2-01, L2-02, L2-03 and L3-04, wherein the edge nodes L2-01 and L2-02 are connected with the secondary node L1-01, and the edge nodes L2-03 and L3-04 are connected with the secondary node L1-02; the audience A selects the edge node L2-01, and at the moment, as the edge node L2-01 has no live stream, the live stream is required to be pulled from the L1-01, and the live stream is not required to be pulled to the root node L0 by the L1-01; at this time, the second audience also enters the live broadcast room, and because the edge node L2-01 has the live broadcast stream, the streaming information server side also allocates a main edge node for the second audience: l2-01 and three secondary edge nodes L2-02, L2-03 and L3-04, i.e., the returned node sequence is: edge nodes L2-01, L2-02, L2-03 and L3-04, and the viewer side where the viewer B is located automatically selects the edge node L2-01 for direct streaming. Therefore, the streaming information server returns a plurality of edge nodes according to the access priority of each edge node in a live broadcast acquisition request, so that the audience terminal can be determined to automatically select the edge node with the highest access priority, and a plurality of fine treatments can be performed on the schedule, thereby further reducing the cost and enhancing the efficiency. For example, viewers of the same live stream in the same region are all scheduled to the same edge node, so that the convergence ratio of the back source is greatly improved, and the back source cost is effectively reduced.
Referring to fig. 3B, fig. 3B is a process flow chart of another live stream acquisition method according to an embodiment of the present application: firstly, a host is pushed and pulled to a root node L0 of a source station in a live broadcasting room; then the root node L0, the secondary nodes L1-01 and L1-02 and the edge nodes L2-01, L2-02, L2-03 and L3-04 send the respective history node information to the stream information server; the audience A enters a live broadcasting room and sends a live broadcasting stream acquisition request to a scheduling server; the scheduling server requests the stream information server for specific information of the live stream, namely, the stream information server for forwarding the live stream acquisition request; the stream information service end discovers that the four edge nodes L2-01, L2-02, L2-03 and L3-04 do not have the main broadcast stream based on the history node information, feeds back a node sequence to the scheduling service end, and the fed-back node sequence is as follows: edge nodes L2-01, L2-02, L2-03 and L3-04, wherein the edge nodes L2-01 and L2-02 are connected with the secondary node L1-01, and the edge nodes L2-03 and L3-04 are connected with the secondary node L1-02; the scheduling server forwards the node sequence to the audience A, and the audience A selects an edge node L2-01, and at the moment, as the edge node L2-01 has no live stream, the live stream is required to be pulled from the L1-01, and the live stream is also not required to be pulled from the L1-01 to the root node L0; at this time, the root node L0, the secondary nodes L1-01 and L1-02, and the edge nodes L2-01, L2-02, L2-03 and L3-04 update the respective history node information and send the history node information to the stream information server. Then, the second audience also enters a live broadcasting room and sends a live broadcasting stream acquisition request to a scheduling server; a scheduling server forwards the stream information server of the live stream acquisition request; the stream information service end discovers that L2-01 in four edge nodes has the live stream based on historical node information, L2-02, L2-03 and L3-04 do not have the live stream, a node sequence is fed back to the scheduling service end, and the fed back node sequence is as follows: l2-01, L2-02, L2-03 and L3-04, the scheduling server forwards the node sequence to the audience B, and the audience B's audience terminal automatically selects an edge node L2-01 for the audience B to directly pull streams.
According to the live broadcast stream acquisition method provided by the application, a live broadcast stream acquisition request sent by a viewer terminal is received, and the live broadcast stream acquisition request carries a target live broadcast stream identifier; matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities; and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence. Based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
Fig. 4 shows a flowchart of another live stream acquisition method according to an embodiment of the present application, which is applied to a viewer, and specifically includes the following steps:
step 402: and acquiring a target live stream identifier, and generating a live stream acquisition request based on the target live stream identifier.
Specifically, the target live stream refers to a video stream or video content that needs to be watched by a viewer; the target live stream identifier refers to an identifier for representing the target live stream, such as the name, the label, the main broadcast name and the like of the target live stream; the live stream acquisition request refers to a request to acquire a target live stream.
In practical application, when a viewer wants to watch a certain live broadcast, namely, a target live broadcast, the viewer responds to an instruction triggered by the operation of the viewer for watching the target live broadcast to acquire a target live broadcast stream corresponding to the target live broadcast, and the target live broadcast or a target live broadcast stream identifier corresponding to the target live broadcast stream needs to be acquired first: the target live broadcast stream identifier can be carried in an instruction triggered by the operation of watching the target live broadcast by the audience, or can be obtained by automatically identifying the instruction triggered by the operation of watching the target live broadcast by the audience. And further generating a live stream acquisition request carrying the target live stream identifier.
Step 404: and sending the live stream acquisition request to a stream information server.
And further, the live stream acquisition request is sent to the stream information server on the basis of acquiring the target live stream identifier and generating the live stream acquisition request based on the target live stream identifier.
Specifically, the streaming information server refers to a server storing historical node information of each node of the distribution network, that is, the streaming information server includes the historical node information of each node in the content distribution network.
In practical application, after generating a live stream acquisition request carrying a target live stream identifier, the viewer terminal can directly send the live stream acquisition request to the stream information server terminal; the live stream acquisition request can be sent to the scheduling server first, and then the scheduling server forwards the live stream acquisition request to the stream information server.
Step 406: and receiving a node sequence consisting of a plurality of edge nodes fed back by the stream information server, wherein the node sequence is determined by the stream information server according to the access priorities of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined by the stream information server according to the target live broadcast stream identifier and the historical node information of the plurality of edge nodes.
On the basis of sending the live stream acquisition request to the stream information server, further, the node sequence fed back by the stream information server based on the live stream acquisition request is received.
Specifically, the edge node refers to a node constructed at the network edge side close to the user, provides storage, calculation, network and other resources, and sinks part of key service application to the access network edge, so that the width and delay loss caused by network transmission and multistage forwarding can be reduced; the history node information refers to the current information of the edge node reported by the edge node, such as live stream identification, connection number, network condition and the like corresponding to live streams existing in the edge node. The access priority refers to a parameter of the corresponding priority level, and the node with higher access priority is accessed first and the node with lower access priority is accessed later; the node sequence refers to a sequence in which node access priorities are arranged.
In practical application, after receiving a live broadcast stream acquisition request carrying a target live broadcast stream identifier, a stream information server firstly extracts the target live broadcast stream identifier from the live broadcast stream acquisition request, then matches the target live broadcast stream identifier with historical node information of a plurality of edge nodes, and determines access priority of each edge node according to a matching result; or on the basis of matching the target live stream identification with the historical node information of the plurality of edge nodes, determining the access priority of each edge node based on the matching result and the access parameters in the historical node information. Further, according to the access priority of each edge node, the edge nodes are ordered according to the order from high to low of the access priority or according to the order from low to high of the access priority, and a node sequence is obtained. In order to improve the access efficiency of the target live stream, it is preferable to order the edge nodes in order of higher access priority. Then, the stream information service end can directly send the node sequence to the audience end; the node sequence may also be sent to the dispatch server first, and then forwarded to the viewer by the dispatch server. That is, the audience receives the node sequence formed by the edge nodes fed back by the stream information service end.
Step 408: and acquiring the target live stream according to the access priority of each edge node in the node sequence.
And further, acquiring the target live stream according to the access priority of each edge node in the node sequence on the basis of the node sequence fed back by the receiving stream information service end based on the live stream acquisition request.
In practical application, after receiving the node sequence, the audience terminal automatically acquires the target live stream from the edge node with the highest access priority according to the access priority of each edge node.
In a possible implementation manner of the embodiment of the present disclosure, each edge node in the node sequence is ordered according to the order from high to low of access priority, and at this time, the viewer end will acquire the target live stream from the edge node with the highest priority in the node sequence. That is, the obtaining the target live stream according to the access priority of the edge node in the node sequence includes:
and acquiring the target live stream from the first edge node in the node sequence according to the access priority of each edge node.
Specifically, the first edge node in the node sequence is the node with the highest access priority.
In practical application, in order to improve the acquisition efficiency of the target live stream and improve the experience of the audience, the audience end acquires the target live stream from the edge node with the highest access priority, namely, acquires the target live stream from the first edge node in the node sequence under the condition that all edge nodes in the node sequence are ordered according to the order of the access priority from high to low.
When a user connects a certain edge node, the edge node can be selected to be switched, and one edge node is selected from the node sequence to be accessed. That is, after the target live stream is obtained according to the access priority of each edge node in the node sequence, the method further includes:
receiving a selection instruction aiming at a designated edge node, wherein the designated edge node is any edge node in the node sequence;
and acquiring the target live stream from the appointed edge node.
Specifically, the selection instruction is an instruction triggered based on an operation by the user or viewer to select a certain edge node from the node sequence.
In practical applications, the edge nodes accessed or connected by the viewer end may have problems, such as a phenomenon of live video blocking at network speed, etc., where the viewer end may display each edge node in the node sequence on the display interface, and the viewer selects one of the edge nodes to switch, that is, after the viewer selects one of the edge nodes and confirms, the viewer end will receive a selection instruction from the edge node selected by the viewer, that is, a designated edge node, and then the viewer end responds to the selection instruction, and acquires the target live stream from the designated edge node in the selection instruction. Therefore, when the current edge node is blocked, the switchable edge node is provided, so that the efficiency of acquiring the target live stream is improved, the target live stream can be smoothly played, and the viscosity of a user is improved.
The live broadcast stream acquisition method provided by the application acquires the target live broadcast stream identifier, and generates a live broadcast stream acquisition request based on the target live broadcast stream identifier; the live stream acquisition request is sent to a stream information server; receiving a node sequence consisting of a plurality of edge nodes fed back by the stream information service end, wherein the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined by the stream information service end according to the target live broadcast stream identifier and historical node information of the plurality of edge nodes; and acquiring the target live stream according to the access priority of each edge node in the node sequence. Based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
The foregoing is a schematic scheme of a live stream acquisition method applied to a viewer end in this embodiment. It should be noted that, the technical solution of the live stream obtaining method applied to the viewer side and the technical solution of the live stream obtaining method applied to the stream information service side belong to the same concept, and details of the technical solution of the live stream obtaining method applied to the viewer side, which are not described in detail, can be referred to the description of the technical solution of the live stream obtaining method applied to the stream information service side.
The method for acquiring the live stream is further described below with reference to fig. 5 by taking an application of the method for acquiring the live stream in live broadcasting of a game as an example. Fig. 5 shows a process flow chart of a live stream acquisition method applied to live game according to an embodiment of the present application, which specifically includes the following steps:
step 502: and the audience terminal acquires the target game live stream identification.
Step 504: the audience terminal generates a live stream acquisition request based on the target game live stream identification.
Step 506: and the audience terminal sends a live stream acquisition request to the stream information server terminal.
Optionally, before receiving the live stream acquisition request sent by the viewer, the streaming information server further includes:
Acquiring historical node information sent by each edge node;
and storing the history node information sent by each edge node.
Step 508: the stream information server determines that the access priority of the edge node is a first priority if the target game live stream identifier is successfully matched with the game live stream identifier contained in the history node information of the edge node aiming at any edge node in the plurality of edge nodes.
Step 510: and the stream information server determines that the access priority of the edge node is a second priority if the target game live stream identifier fails to match with the game live stream identifier contained in the history node information of the edge node aiming at any edge node in the plurality of edge nodes.
Wherein the first priority is higher than the second priority.
Step 512: if the access priority is a plurality of edge nodes with appointed priority, the stream information server determines that the edge node with the access priority being the appointed priority is a target edge node, and the appointed priority is a first priority or a second priority.
Step 514: and the stream information server determines the sub-priority of each target edge node in the designated priority according to the connection information in the history node information of each target edge node.
Step 516: if the target live stream identification is successfully matched with the game live stream identification contained in the history node information of the designated edge node, and the access quantity in the history node information is greater than a preset threshold value, the stream information server determines that the access priority of the designated edge node is the lowest priority, and the designated edge node is any edge node.
Step 518: and the stream information server determines a node sequence formed by a plurality of edge nodes according to the access priority of each edge node.
Step 520: the stream information service end transmits the node sequence to the audience end.
Step 522: and the audience terminal acquires the target game live stream according to the access priority of each edge node in the node sequence.
Optionally, obtaining the target game live stream according to the access priority of the edge node in the node sequence includes:
and acquiring the target game live stream from the first edge node in the node sequence according to the access priority of each edge node.
Optionally, after obtaining the target game live stream according to the access priority of each edge node in the node sequence, the method further includes:
receiving a selection instruction aiming at a designated edge node, wherein the designated edge node is any edge node in a node sequence;
And acquiring the target game live stream from the appointed edge node.
According to the live stream acquisition method provided by the application, based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
Corresponding to the method embodiment, the application also provides an embodiment of a live stream acquisition device applied to the stream information server, and fig. 6 shows a schematic structural diagram of the live stream acquisition device according to an embodiment of the application. As shown in fig. 6, the apparatus is applied to a streaming information server, where the streaming information server includes historical node information of each node in a content distribution network, and the apparatus includes:
a first receiving module 602, configured to receive a live stream acquisition request sent by a viewer end, where the live stream acquisition request carries a target live stream identifier;
A determining module 604, configured to match the target live stream identifier with historical node information of a plurality of edge nodes, determine access priorities of the plurality of edge nodes according to a matching result, and determine a node sequence formed by the plurality of edge nodes according to the access priorities;
and a first sending module 606, configured to feed back the node sequence to the viewer end, so that the viewer end obtains the target live stream according to the access priority of each edge node in the node sequence.
Optionally, the apparatus further comprises a storage module configured to:
acquiring historical node information sent by each edge node;
and storing the history node information sent by each edge node.
Optionally, the determining module 604 is further configured to:
and aiming at any edge node in the plurality of edge nodes, if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a first priority.
Optionally, the determining module 604 is further configured to:
and if the target live stream identification fails to be matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a second priority, wherein the first priority is higher than the second priority.
Optionally, the history node information further includes connection information;
optionally, the determining module 604 is further configured to:
if the access priority is a plurality of edge nodes with appointed priority, determining the edge node with the access priority being the appointed priority as a target edge node, wherein the appointed priority is a first priority or a second priority;
and determining the sub-priority of each target edge node in the designated priority according to the connection information of each target edge node.
Optionally, the history node information further includes an access number;
the determining module 604 is further configured to:
if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the designated edge node, and the access number is larger than a preset threshold, determining that the access priority of the designated edge node is the lowest priority, wherein the designated edge node is any edge node.
The live broadcast stream acquisition device provided by the application receives a live broadcast stream acquisition request sent by a viewer terminal, wherein the live broadcast stream acquisition request carries a target live broadcast stream identifier; matching the target live broadcast stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities; and feeding the node sequence back to the audience terminal so that the audience terminal acquires the target live stream according to the access priority of each edge node in the node sequence. Based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
The foregoing is a schematic solution of a live stream acquisition device applied to a stream information server in this embodiment. It should be noted that, the technical solution of the live stream acquiring device applied to the stream information service end and the technical solution of the live stream acquiring method applied to the stream information service end belong to the same concept, and details of the technical solution of the live stream acquiring device applied to the stream information service end, which are not described in detail, can be referred to the description of the technical solution of the live stream acquiring method applied to the stream information service end.
Corresponding to the above method embodiment, the present application further provides an embodiment of a live stream acquisition device applied to a viewer, and fig. 7 shows a schematic structural diagram of another live stream acquisition device according to an embodiment of the present application. As shown in fig. 7, the apparatus is applied to a viewer terminal, and includes:
a first obtaining module 702, configured to obtain a target live stream identifier, and generate a live stream obtaining request based on the target live stream identifier;
a second sending module 704, configured to send the live stream acquisition request to a stream information server;
a second receiving module 706, configured to receive a node sequence formed by a plurality of edge nodes fed back by the stream information service end, where the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined by the stream information service end according to the target live broadcast stream identifier and historical node information of the plurality of edge nodes;
A second obtaining module 708 is configured to obtain the target live stream according to the access priority of each edge node in the node sequence.
Optionally, the second obtaining module 708 is further configured to:
and acquiring the target live stream from the first edge node in the node sequence according to the access priority of each edge node.
Optionally, the apparatus further includes a third acquisition module configured to:
receiving a selection instruction aiming at a designated edge node, wherein the designated edge node is any edge node in the node sequence;
and acquiring the target live stream from the appointed edge node.
The live broadcast stream acquisition device acquires the target live broadcast stream identifier and generates a live broadcast stream acquisition request based on the target live broadcast stream identifier; the live stream acquisition request is sent to a stream information server; receiving a node sequence consisting of a plurality of edge nodes fed back by the stream information service end, wherein the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, and the access priorities of the plurality of edge nodes are determined by the stream information service end according to the target live broadcast stream identifier and historical node information of the plurality of edge nodes; and acquiring the target live stream according to the access priority of each edge node in the node sequence. Based on the history node information, the distribution condition of the target live stream in each edge node can be clarified, and the edge nodes can be accurately scheduled; based on the target live stream identification and the historical node information, the access priority of each edge node can be determined, so that the audience terminal can acquire the target live stream based on the access priority, and for a large-scale live broadcast platform, the convergence ratio of the back source can be greatly improved under the conditions of large audience base number, large push-pull stream number and large content distribution flow, and the back source cost is effectively reduced.
The foregoing is a schematic solution of a live stream acquisition apparatus applied to a viewer end in this embodiment. It should be noted that, the technical solution of the live stream acquiring device applied to the audience side and the technical solution of the live stream acquiring method applied to the audience side belong to the same concept, and details of the technical solution of the live stream acquiring device applied to the audience side, which are not described in detail, can be referred to the description of the technical solution of the live stream acquiring method applied to the audience side.
FIG. 8 illustrates a block diagram of a computing device 800 provided in accordance with an embodiment of the present application. The components of computing device 800 include, but are not limited to, memory 810 and processor 820. Processor 820 is coupled to memory 810 through bus 830 and database 850 is used to hold data.
Computing device 800 also includes access device 840, access device 840 enabling computing device 800 to communicate via one or more networks 860. Examples of such networks include public switched telephone networks (PSTN, public Switched Telephone Network), local Area Networks (LAN), wide area networks (WAN, wideAreaNetwork), personal area networks (PAN, personalAreaNetwork), or combinations of communication networks such as the internet. The access device 840 may include one or more of any type of network interface, wired or wireless, such as a network interface card (NIC, network Interface Controller), such as an IEEE802.11 wireless local area network (WLAN, wireless LocalAreaNetwork) wireless interface, a worldwide interoperability for microwave access (Wi-MAX, worldwide Interoperability forMicrowave Access) interface, an ethernet interface, a universal serial bus (USB, universal Serial Bus) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above-described components of computing device 800, as well as other components not shown in FIG. 8, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 8 is for exemplary purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 800 may be any type of stationary or mobile computing device including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 800 may also be a mobile or stationary server.
Wherein the processor 820 implements the steps of the live stream acquisition method when executing the computer instructions.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the live stream obtaining method belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the live stream obtaining method.
An embodiment of the application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the live stream acquisition method as described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the live stream obtaining method belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the live stream obtaining method.
The foregoing describes certain embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the application disclosed above are intended only to assist in the explanation of the application. Alternative embodiments are not intended to be exhaustive or to limit the application to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and the full scope and equivalents thereof.

Claims (11)

1. The live stream acquisition method is characterized by being applied to a stream information server, wherein the stream information server comprises historical node information of each node in a content distribution network, and the method comprises the following steps:
receiving a live broadcast stream acquisition request sent by a viewer terminal, wherein the live broadcast stream acquisition request carries a target live broadcast stream identifier;
matching the target live stream identifier with historical node information of a plurality of edge nodes respectively, determining access priorities of the plurality of edge nodes according to a matching result, and determining a node sequence formed by the plurality of edge nodes according to the access priorities, wherein the access priorities are used for indicating the access sequence of the corresponding edge nodes, and the node sequence refers to a sequence in which the node access priorities are arranged;
the node sequence is fed back to the audience terminal, so that the audience terminal firstly obtains the target live stream from the edge node with the highest access priority according to the access priority of each edge node in the node sequence, and when a katen appears, other edge nodes are switched from the node sequence;
the matching the target live stream identifier with the history node information of a plurality of edge nodes respectively, and determining the access priority of the plurality of edge nodes according to a matching result includes:
For any edge node in the plurality of edge nodes, if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a first priority;
and if the target live stream identification fails to be matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a second priority, wherein the first priority is higher than the second priority.
2. The method according to claim 1, further comprising, before receiving the live stream acquisition request sent by the viewer,:
acquiring historical node information sent by each edge node;
and storing the history node information sent by each edge node.
3. The method of claim 1, wherein the historical node information further comprises connection information, the method further comprising:
if the access priority is a plurality of edge nodes with appointed priority, determining the edge node with the access priority being the appointed priority as a target edge node, wherein the appointed priority is a first priority or a second priority;
And determining the sub-priority of each target edge node in the designated priority according to the connection information of each target edge node.
4. A method according to any of claims 1-3, wherein the history node information further comprises a number of accesses;
the step of matching the target live stream identifier with the historical node information of a plurality of edge nodes respectively, and determining the access priority of the plurality of edge nodes according to the matching result comprises the following steps:
if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the designated edge node, and the access number is larger than a preset threshold, determining that the access priority of the designated edge node is the lowest priority, wherein the designated edge node is any edge node.
5. The live stream acquisition method is characterized by being applied to a viewer end and comprising the following steps of:
acquiring a target live stream identifier, and generating a live stream acquisition request based on the target live stream identifier;
the live stream acquisition request is sent to a stream information server;
receiving a node sequence consisting of a plurality of edge nodes fed back by the stream information service end, wherein the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, if the live broadcast stream identification contained in the history node information of the edge nodes is successfully matched with the target live broadcast stream identification, the access priority of the edge nodes is a first priority, if the live broadcast stream identification contained in the history node information of the edge nodes is failed to be matched with the target live broadcast stream identification, the access priority of the edge nodes is a second priority, the access priority is used for indicating the access sequence of the corresponding edge nodes, and the node sequence refers to a sequence for arranging the access priorities of the nodes;
According to the access priority of each edge node in the node sequence, firstly acquiring the target live stream from the edge node with the highest access priority, and switching other edge nodes from the node sequence when a pause occurs.
6. The method of claim 5, wherein the obtaining the target live stream according to the access priority of the edge nodes in the sequence of nodes comprises:
and acquiring the target live stream from the first edge node in the node sequence according to the access priority of each edge node.
7. The method of claim 6, wherein after the target live stream is obtained according to the access priority of each edge node in the node sequence, further comprising:
receiving a selection instruction aiming at a designated edge node, wherein the designated edge node is any edge node in the node sequence;
and acquiring the target live stream from the appointed edge node.
8. A live stream obtaining device, which is applied to a stream information service end, wherein the stream information service end includes historical node information of each node in a content distribution network, and the device comprises:
The first receiving module is configured to receive a live stream acquisition request sent by a viewer terminal, wherein the live stream acquisition request carries a target live stream identifier;
the determining module is configured to match the target live stream identifier with historical node information of a plurality of edge nodes respectively, determine access priorities of the plurality of edge nodes according to matching results, and determine a node sequence composed of the plurality of edge nodes according to the access priorities, wherein the access priorities are used for indicating the access sequence of the corresponding edge nodes, and the node sequence refers to a sequence in which the node access priorities are arranged;
the first sending module is configured to feed back the node sequence to the audience terminal, so that the audience terminal firstly obtains the target live stream from the edge node with the highest access priority according to the access priority of each edge node in the node sequence, and switches other edge nodes from the node sequence when a pause occurs;
wherein the determination module is further configured to:
for any edge node in the plurality of edge nodes, if the target live stream identification is successfully matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a first priority;
And if the target live stream identification fails to be matched with the live stream identification contained in the history node information of the edge node, determining that the access priority of the edge node is a second priority, wherein the first priority is higher than the second priority.
9. A live stream acquisition device, which is applied to a viewer, comprising:
the first acquisition module is configured to acquire a target live stream identifier and generate a live stream acquisition request based on the target live stream identifier;
the second sending module is configured to send the live stream acquisition request to a stream information server;
the second receiving module is configured to receive a node sequence consisting of a plurality of edge nodes fed back by the stream information service end, wherein the node sequence is determined by the stream information service end according to access priorities of the plurality of edge nodes, if the live broadcast stream identification contained in the history node information of the edge nodes is successfully matched with the target live broadcast stream identification, the access priority of the edge nodes is a first priority, if the live broadcast stream identification contained in the history node information of the edge nodes is failed to be matched with the target live broadcast stream identification, the access priority of the edge nodes is a second priority, the access priority is used for indicating the access sequence of the corresponding edge nodes, and the node sequence refers to a sequence for arranging the node access priorities;
And the second acquisition module is configured to acquire the target live stream from the edge node with the highest access priority according to the access priority of each edge node in the node sequence, and switch other edge nodes from the node sequence when a pause occurs.
10. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the method of any one of claims 1-4 or 5-7.
11. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the method of any one of claims 1-4 or 5-7.
CN202210116541.5A 2022-02-07 2022-02-07 Live stream acquisition method and device Active CN114501053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210116541.5A CN114501053B (en) 2022-02-07 2022-02-07 Live stream acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210116541.5A CN114501053B (en) 2022-02-07 2022-02-07 Live stream acquisition method and device

Publications (2)

Publication Number Publication Date
CN114501053A CN114501053A (en) 2022-05-13
CN114501053B true CN114501053B (en) 2023-10-20

Family

ID=81479586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210116541.5A Active CN114501053B (en) 2022-02-07 2022-02-07 Live stream acquisition method and device

Country Status (1)

Country Link
CN (1) CN114501053B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022660B (en) * 2022-06-01 2024-03-19 上海哔哩哔哩科技有限公司 Parameter configuration method and system for content distribution network

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102726031A (en) * 2011-07-22 2012-10-10 华为技术有限公司 Content processing method, device and system
CN107801086A (en) * 2017-10-20 2018-03-13 广东省南方数字电视无线传播有限公司 The dispatching method and system of more caching servers
CN110446054A (en) * 2018-05-03 2019-11-12 腾讯科技(深圳)有限公司 A kind of live stream transmission method, device, relevant device and system
CN111263171A (en) * 2020-02-25 2020-06-09 北京达佳互联信息技术有限公司 Live streaming media data acquisition method and edge node area networking system
CN112087644A (en) * 2020-09-21 2020-12-15 北京金山云网络技术有限公司 Pull stream request processing method, device, system, electronic equipment and storage medium
WO2021004384A1 (en) * 2019-07-09 2021-01-14 阿里巴巴集团控股有限公司 Content delivery network, data processing method, apparatus and device, and storage medium
CN112511868A (en) * 2020-11-17 2021-03-16 创盛视联数码科技(北京)有限公司 Video playing method and device, electronic equipment and computer storage medium
CN113055693A (en) * 2021-04-20 2021-06-29 上海哔哩哔哩科技有限公司 Data processing method and device
WO2021135835A1 (en) * 2019-12-31 2021-07-08 北京金山云网络技术有限公司 Resource acquisition method and apparatus, and node device in cdn network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170142177A1 (en) * 2015-11-13 2017-05-18 Le Holdings (Beijing) Co., Ltd. Method and system for network dispatching
CN108712343A (en) * 2018-05-14 2018-10-26 网宿科技股份有限公司 Distribution method, system, fringe node and the central dispatching system of streaming media resource

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102726031A (en) * 2011-07-22 2012-10-10 华为技术有限公司 Content processing method, device and system
CN107801086A (en) * 2017-10-20 2018-03-13 广东省南方数字电视无线传播有限公司 The dispatching method and system of more caching servers
CN110446054A (en) * 2018-05-03 2019-11-12 腾讯科技(深圳)有限公司 A kind of live stream transmission method, device, relevant device and system
WO2021004384A1 (en) * 2019-07-09 2021-01-14 阿里巴巴集团控股有限公司 Content delivery network, data processing method, apparatus and device, and storage medium
WO2021135835A1 (en) * 2019-12-31 2021-07-08 北京金山云网络技术有限公司 Resource acquisition method and apparatus, and node device in cdn network
CN111263171A (en) * 2020-02-25 2020-06-09 北京达佳互联信息技术有限公司 Live streaming media data acquisition method and edge node area networking system
CN112087644A (en) * 2020-09-21 2020-12-15 北京金山云网络技术有限公司 Pull stream request processing method, device, system, electronic equipment and storage medium
CN112511868A (en) * 2020-11-17 2021-03-16 创盛视联数码科技(北京)有限公司 Video playing method and device, electronic equipment and computer storage medium
CN113055693A (en) * 2021-04-20 2021-06-29 上海哔哩哔哩科技有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN114501053A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN108737405B (en) Method, CCL server and system for guiding direct broadcasting video stream
US11356748B2 (en) Method, apparatus and system for slicing live streaming
US20210368239A1 (en) Distributing method, system, edge node, and central scheduling system for streaming media resource
TWI602415B (en) Method and apparatus for flexible caching of delivered media
CN108063769B (en) Method and device for realizing content service and content distribution network node
JP6472892B2 (en) Dynamic time window and cache mechanism in heterogeneous network transmission
CN114679604B (en) Resource processing method and device
CN108810657B (en) Method and system for setting video cover
CN113923470B (en) Live stream processing method and device
US10469627B2 (en) Rapid optimization of media stream bitrate
CN114760482B (en) Live broadcast source returning method and device
CN112738140A (en) Video stream transmission method, device, storage medium and equipment based on WebRTC
CN115209231B (en) Data transmission method, device, equipment and computer readable storage medium
CN113891175B (en) Live broadcast push flow method, device and system
CN113891114B (en) Transcoding task scheduling method and device
CN114501053B (en) Live stream acquisition method and device
CN110445723A (en) A kind of network data dispatching method and fringe node
CN107547517B (en) Audio and video program recording method, network equipment and computer device
US20210227005A1 (en) Multi-user instant messaging method, system, apparatus, and electronic device
US20230330545A1 (en) Method for displaying game picture, storage medium, and electronic device
CN110830821A (en) RTP (real-time transport protocol) stream transmission method and device based on slices, terminal and server
CN115002497B (en) Live broadcast source-returning scheduling method and system and source-returning server
CN114679598B (en) Live broadcast pushing method and device
CN114866790B (en) Live stream scheduling method and device
CN112788135B (en) Resource scheduling method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant