[go: up one dir, main page]

WO2017181601A1 - Live broadcast streaming processing method, apparatus, electronic device and system - Google Patents

Live broadcast streaming processing method, apparatus, electronic device and system Download PDF

Info

Publication number
WO2017181601A1
WO2017181601A1 PCT/CN2016/100412 CN2016100412W WO2017181601A1 WO 2017181601 A1 WO2017181601 A1 WO 2017181601A1 CN 2016100412 W CN2016100412 W CN 2016100412W WO 2017181601 A1 WO2017181601 A1 WO 2017181601A1
Authority
WO
WIPO (PCT)
Prior art keywords
live stream
play request
identifier
live
total
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.)
Ceased
Application number
PCT/CN2016/100412
Other languages
French (fr)
Chinese (zh)
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.)
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeCloud Computing 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 Le Holdings Beijing Co Ltd, LeCloud Computing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017181601A1 publication Critical patent/WO2017181601A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • 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
    • 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/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server

Definitions

  • the present application relates to the field of multimedia information processing technologies, and in particular, to a method, an apparatus, an electronic device, and a system for processing a live stream.
  • the quality of the live stream can gradually meet the needs of users. More and more users also like to play live streams to get more real-time information. For example, watch live ball games, watch live variety shows, and more.
  • the network status is not good, for example, when the client is in a non-stop moving state and the network status is unstable, some live streaming play requests are inevitably unresponsive. Therefore, the number of interactions is not only a waste of network resources, but also communication failure due to network instability.
  • the embodiment of the present application provides a method, a device, an electronic device, and a system for processing a live stream, which are used to solve the problem that when the same client requests to play multiple live streams, the number of interactions is more wasteful of network resources, and also due to network instability. Problems that cause communication failures, etc.
  • an embodiment of the present application provides a method for processing a live stream, where the method includes:
  • the client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request;
  • the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request;
  • the embodiment of the present application provides a method for processing a live stream, where the method includes:
  • the server agent receives a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes each live stream. Play the requested live stream identifier;
  • Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback.
  • the embodiment of the present application provides a processing system for a live stream, where the system includes:
  • the client is configured to send a live stream request carrying the live stream identifier to the client proxy, and receive the live stream data broadcast sent by the client proxy;
  • the client agent is configured to receive a live stream play request that is sent by the client and carry the live stream play request, and store the request, and calculate the number of the live stream play request sent by the client stored in the preset duration, and determine whether the quantity is greater than or Equivalent to two; if yes, combining the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live stream of each live stream play request Identifying; sending the total live stream play request to a server proxy of the stream resource server; receiving the server sent by the server proxy The live stream data corresponding to each live stream identifier in the total live stream play request is sent to the client for playing;
  • a server agent configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes The live stream identifier of each live stream play request; the total live stream play request is decomposed, and the split live stream play request corresponding to each live stream identifier is obtained and sent to the stream resource server; and the stream resource server is received for each After the decomposition, the live stream is played back to the live stream data of the request; the received live stream data is sent to the client agent, so that the client agent sends each live stream data to the client to play;
  • the stream resource server is configured to receive the decomposed live stream play request sent by the server proxy, and return the corresponding live stream data.
  • the embodiment of the present application further provides a non-transitory computer storage medium, where computer executable instructions are stored, and the computer executable instructions are used to execute a processing method of any of the foregoing live streams of the present application.
  • an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory; wherein the memory stores a program executable by the at least one processor, where the instruction is The at least one processor executes to enable the at least one processor to perform the processing method of any of the above-described live streams of the present application.
  • the live broadcast stream play request in the preset time duration of the client is combined to generate a total live stream play request, so that when the client requests to play multiple live stream, the live stream play request transmitted through the network is only One (ie total live stream play request).
  • the number of live streaming play requests transmitted over the network can be reduced, thereby reducing the number of interactions and saving network resources.
  • the probability of transmitting a live stream play request is unsuccessful, and if there is a possibility that one of the plurality of live stream play requests fails to be transmitted, the live broadcast is performed in a plurality of live broadcasts.
  • the streaming play request is merged into one live stream play request to be transmitted in the network, and the network status is also prevented from being bad. As a result, some live stream play requests cannot be transmitted in the prior art, and communication failure occurs, thereby ensuring communication stability. .
  • FIG. 1 is an exemplary flowchart of a method for processing a live stream according to Embodiment 1 of the present application;
  • FIG. 2 is an exemplary flowchart of a method for processing a live stream according to Embodiment 2 of the present application
  • FIG. 3 is a schematic structural diagram of a device for processing a live stream according to Embodiment 3 of the present application;
  • FIG. 4 is a schematic structural diagram of a processing apparatus for a live stream according to Embodiment 4 of the present application;
  • FIG. 5 is a schematic structural diagram of a processing system of a live stream in Embodiment 5 of the present application.
  • FIG. 6 is a schematic structural diagram of hardware of a device for processing a live stream according to Embodiment 7 of the present application.
  • FIG. 1 is a schematic flowchart of a method for processing a live stream according to an embodiment of the present application, which is applicable to a client agent, and includes the following steps:
  • Step 101 The client agent receives the live stream play request that is sent by the client and carries the live stream identifier, and stores the request.
  • the stream resource server is configured to provide a live stream
  • the live stream identifier is, for example, a live stream ID (IDentity).
  • Step 102 Calculate the number of live stream play requests sent by the client stored in the preset duration, and determine whether the number is greater than or equal to two.
  • Step 103 If yes, merge the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live stream of each live stream play request. logo.
  • the live stream play request of the client stored in the preset duration is three, which are the live stream play request of the live stream 1, the live stream 2, and the live stream 3, respectively, and the client agent will store the three live broadcasts.
  • the stream play request is merged to generate a total live stream play request carrying the live stream identifiers of the live stream 1, the live stream 2, and the live stream 3.
  • step 102 if the result of the determination in step 102 is no (that is, the number of the live stream play request is less than 2), refer to the prior art processing, which is not described in this embodiment of the present application.
  • Step 104 Send the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream corresponding to each live stream identifier in the total live stream play request from the stream resource server.
  • Stream data Send the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream corresponding to each live stream identifier in the total live stream play request from the stream resource server.
  • Step 105 Receive live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and send the data to the client for playing.
  • a live broadcast stream play request in the client preset duration is combined to generate a total live stream play request, so that when the client requests to play multiple live streams, the live stream play request transmitted through the network There is only one (ie the total live stream play request).
  • the number of live streaming play requests transmitted over the network can be reduced, thereby reducing the number of interactions and saving network resources.
  • the probability of transmitting a live stream play request is unsuccessful, and if there is a possibility that one of the plurality of live stream play requests fails to be transmitted, the live broadcast is performed in a plurality of live broadcasts.
  • the streaming play request is merged into one live stream play request to be transmitted in the network, and the network status is also prevented from being bad. As a result, some live stream play requests cannot be transmitted in the prior art, and communication failure occurs, thereby ensuring communication stability. .
  • step 102 1), for step 102:
  • the number of the live stream play request sent by the client stored in the preset time length in the step 102 in the embodiment of the present application may specifically include the following. step:
  • Step A1 Start timing after receiving the first live stream play request, and set the number of live stream play requests to 1.
  • the first live stream play request refers to the first live broadcast sent by the client after the certain period of time, if the live stream play request sent by the client is not received within a certain period of time.
  • Stream play request For example, if it is 5 minutes in a certain period of time, if the live stream play request sent by the client is not received within 5 minutes, the first live stream play request received after 5 minutes is the first step A1. Live streaming play request.
  • the first live stream play request sent by the client after establishing a connection with the stream resource server is also counted as the first live stream play request in step A1.
  • Step A2 After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one.
  • the preset duration in order to process the live stream play request as soon as possible, in order to prevent the user from being aware of the slowness of obtaining the live stream, the preset duration may be 1 second in the embodiment of the present application.
  • the preset duration is required to be set, which is not limited by the embodiment of the present application.
  • step A1 to step A2 the first live stream play request is started, and the preset duration is determined.
  • the time advance may be further divided into one time period, and each time period is a preset time length. For example, after the client establishes a connection with the stream resource server, it is the start of the first preset duration, thereby determining each time period as a preset duration.
  • the live broadcast play request of the client may be stored in a preset duration, and the number of live streaming play requests is calculated without using an accumulated manner, and the client is counted in the preset duration. The number of live stream play requests sent.
  • step 103 1), for step 103:
  • Step 103 in the embodiment of the present application may specifically include the following steps:
  • Step B1 Insert a preset live stream identifier separator between the adjacent two live stream identifiers to generate total live stream identifier information.
  • the preset live stream identifier identifier may be “,” or “/”, etc., of course, the identifier that enables the server proxy to identify the preset live stream identifier separator is applicable to the present application. The embodiment does not limit this application.
  • Step B2 Generate a total live stream play request carrying the total live stream identifier information, so that the server proxy performs the following operations: acquiring each from the total live stream request according to the preset live stream identifier splitter The live stream identifier is generated, and the generated live stream play request for each live stream identifier is generated and sent to the stream resource server.
  • the server agent can identify each live stream identifier, and generate a split live stream play request for each live stream identifier to be sent to the stream resource server, so that the stream resource server can follow the existing The live stream play request processing without having to make changes to the streaming resource server.
  • the embodiments of the present application may also combine the following methods according to the following methods.
  • the live stream play request generates a total live stream play request.
  • the live stream play request splitter is added between the adjacent live stream play requests, which is equivalent to connecting the live stream play requests in series to generate a total live stream play request.
  • the server agent can decompose each live stream play request to the stream resource server according to the live stream play request splitter, and can achieve the same effect.
  • step 105
  • the server proxy may send the live stream data returned by the stream resource server for each of the decomposed live stream playback requests to the client proxy one by one, so that the proxy returned to the client is equivalent. How many responses are there in how many live streaming requests are played.
  • each live stream data returned by the stream resource server may be merged live stream data, so that only one merged live stream data needs to be transmitted through the network. It can be (ie, respond once) without having to transmit it once for each live stream.
  • the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header
  • the information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream;
  • Step 105 specifically comprising the following steps:
  • Step C1 Receive the merged live stream, and parse the merged live stream according to the header information, and obtain live stream data corresponding to each live stream identifier.
  • the location information includes a start location and an end location of each live stream.
  • the live stream data can be obtained according to the live stream identifier of the live stream and its corresponding location information.
  • Step C2 Send the live stream data corresponding to each live stream identifier obtained after parsing to the client for playing.
  • the live stream requested by the client may be of different code rate, and the amount of data required for the live stream with high code rate is naturally large.
  • the combined live stream consists of at least two data packets. Each data packet includes a limited amount of data.
  • the live stream of the code rate draft requires a large number of data packets. Therefore, in order to ensure smooth playback of the live stream with a high code rate, in the embodiment of the present application, the location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers, each live stream Identify the corresponding packet sequence number;
  • Step C1 may specifically include the following steps:
  • Step D1 Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers.
  • Step D2 If the same, for each live stream identifier, obtain each data packet corresponding to the live stream identifier according to the location information corresponding to the live stream identifier; and sort the obtained data packets according to the data packet sequence number to generate a live stream. data.
  • the location information corresponding to the live stream identifier is the location information of the live stream corresponding to the live stream identifier.
  • sequence of different data packets of the same live stream can be determined by the sequence number of the data packet, so that the client can correctly parse the data of each live stream without placing the data to be played back before the data to be played first.
  • the error information may be fed back to the server proxy to retransmit the data.
  • the number of live stream identifiers in the header information may also facilitate the client to determine how much live stream data needs to be decomposed, so that the client agent allocates storage space.
  • a plurality of live stream play requests of the client may be combined to obtain a total live stream play request to be transmitted in the network, or the live stream data of the plurality of live stream play requests may be merged into one merge. Live stream data is transmitted over the network.
  • the multiple transmissions and interactions originally required in the prior art can be completed with only one interaction, which can save network resources.
  • the probability of one-time interaction failure is low, the stability of communication can be ensured.
  • the embodiment of the present application further provides a method for processing a live stream, which is applicable to a server proxy.
  • FIG. 2 it is a schematic flowchart of the method, which may include the following steps:
  • Step 201 The server agent receives a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes The live stream identifier of each live stream play request.
  • the total live stream play request is generated by the client agent, and the method for generating the same is described in the embodiment, and details are not described herein again.
  • Step 202 Decompose the total live stream play request, obtain a decomposed live stream play request corresponding to each live stream identifier, and send the request to the stream resource server.
  • Step 203 Receive live stream data returned by the stream resource server for each split live stream play request.
  • Step 204 Send each received live stream data to the client agent, so that the client agent sends each live stream data to the client for playing.
  • the server agent receives a total live stream play request sent by the client agent and synthesized by at least two live stream play requests.
  • the client requests to play multiple live streams there is only one live stream play request transmitted through the network (ie, the total live stream play request).
  • the probability of transmitting a live stream play request is unsuccessful, and if there is a possibility that one of the plurality of live stream play requests fails to be transmitted, the live broadcast is performed in a plurality of live broadcasts.
  • the streaming play request is merged into one live stream play request to be transmitted in the network, and the network status is also prevented from being bad. As a result, some live stream play requests cannot be transmitted in the prior art, and communication failure occurs, thereby ensuring communication stability. .
  • each live stream data received in the step 204 of the embodiment of the present application may be sent to the client agent, which may specifically include the following steps:
  • Step F1 Combining the received live broadcast stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: The live stream identifier of each live stream, and the location information of each live stream in the merged live stream.
  • Step F2 Send the merged live stream data to the client agent.
  • the combined live stream data is sent to the client agent, so that the live stream data that needs to be sent once for each live stream request is sent together, thereby implementing multiple interactions, which can be completed only once, thereby further reducing interaction. frequency.
  • the live stream requested by the client may be of different code rate, and the amount of data required for the live stream with high code rate is naturally large.
  • the combined live stream consists of at least two data packets. Each data packet includes a limited amount of data.
  • the live stream of the code rate draft requires a large number of data packets. Therefore, in order to ensure high code rate
  • the live stream is smoothly played.
  • the location information is location information corresponding to each data packet
  • the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier. In this way, the client can correctly parse the live stream data of each live stream according to the header information.
  • the total live stream play request includes the total a live stream identifier information, where the total live stream identifier information includes a live stream identifier and a preset live stream identifier identifier for setting between two adjacent live stream identifiers;
  • step 202 the total live stream play request is decomposed, and the split live broadcast stream play request corresponding to each live stream identifier is obtained, which may include: according to the preset live stream identifier splitter, from the total live broadcast Each live stream identifier is obtained in the stream request, and a split live stream play request for each live stream identifier is generated.
  • the live stream play request of the client may further include a live stream play priority, and when the merged live stream is merged, the live stream data with a higher priority may be compared.
  • the other live stream data has more data, so that the live stream data with higher priority is preferentially transmitted to the client.
  • the priority may be a user-specified priority.
  • the received total broadcast broadcast request is performed, and the client agent combines the multiple live stream play requests of the client to obtain a total live stream.
  • the live stream data sent to the client is combined into the live stream data of the plurality of live stream play requests.
  • FIG. 3 is a schematic structural diagram of the device, where the device includes:
  • the live stream play request storage module 301 is configured to receive a live stream play request that is sent by the client and carry the live stream identifier and store the broadcast stream request;
  • the live stream play request quantity determining module 302 is configured to calculate the number of live stream play requests sent by the client stored in the preset duration, and determine whether the quantity is greater than or equal to two;
  • the live stream play request combining module 303 is configured to merge the live stream play requests of the client stored in the preset duration into one total live stream if the judgment result of the live stream play request quantity determining module is yes.
  • the request, the total live stream play request includes a live stream identifier of each live stream play request;
  • the total live stream play request sending module 304 sends the total live stream play request to the server agent of the stream resource server, so that the service agent obtains each of the total live stream play requests from the stream resource server.
  • the live stream data processing module 305 is configured to receive live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and send the data to the client for playing.
  • the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, where the merged live stream data includes header information and a live stream corresponding to each live stream identifier.
  • the live stream data processing module specifically includes:
  • a merged live stream parsing unit configured to receive the merged live stream, and parse the merged live stream according to the header information, to obtain live stream data corresponding to each live stream identifier
  • the live stream data sending unit is configured to send the live stream data corresponding to each live stream identifier obtained after parsing to the client for playing.
  • the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, where the header information further includes: a number of live stream identifiers, each live stream Identify the corresponding packet sequence number;
  • the live broadcast stream parsing unit is specifically configured to:
  • the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data.
  • the live stream play request merge module includes:
  • a splitter insertion unit configured to insert a preset live stream identifier separator between the adjacent two live stream identifiers to generate total live stream identifier information
  • a total live stream play request processing unit configured to generate the information carrying the total live stream identifier information And a total live stream play request, so that the server agent performs the following operations: acquiring, according to the preset live stream identifier splitter, each live stream identifier from the total live stream request, and generating an identifier for each live stream identifier
  • the live broadcast stream play request is sent to the stream resource server.
  • the live stream play request quantity determining module specifically includes:
  • a timing unit configured to start timing after receiving the first live stream play request, and set the number of live stream play requests to 1;
  • the calculating unit is configured to accumulate the number of the live stream play request by one after receiving a live stream play request sent by the client within a preset duration after the start of the timer.
  • FIG. 4 is a schematic structural diagram of the device, where the device includes:
  • the total live stream play request receiving module 401 is configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the The live stream play request includes a live stream identifier of each live stream play request;
  • the total live stream play request decomposition module 402 is configured to decompose the total live stream play request, obtain a decomposed live stream play request corresponding to each live stream identifier, and send the request to the stream resource server;
  • the live stream data obtaining module 403 is configured to receive live stream data returned by the stream resource server for each split live stream play request;
  • the live stream data processing module 404 is configured to send each received live stream data to the client agent, so that the client agent sends each live stream data to the client for playing.
  • the live stream data processing module specifically includes:
  • a merged live stream data generating unit configured to combine the received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier;
  • the header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream;
  • a combined live stream data generating unit sending unit configured to send the merged live stream data to the client agent.
  • the merged live stream is composed of at least two data packets
  • the location information is location information corresponding to each data packet
  • the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier.
  • the total live stream play request includes total live stream identifier information, where the total live stream identifier information includes a live stream identifier and a preset for setting between two adjacent live stream identifiers.
  • the total live stream play request splitting module is configured to: obtain, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generate a split live broadcast for each live stream identifier Stream play request.
  • FIG. 5 is a schematic structural diagram of the system, where the system includes:
  • the client 501 is configured to send a live stream request carrying a live stream identifier to the client proxy, and receive live broadcast stream data sent by the client proxy.
  • the client agent 502 is configured to receive a live stream play request that is sent by the client and carry the live stream play request, and store the live broadcast stream play request sent by the client in the preset duration, and determine whether the quantity is greater than Or equal to two; if yes, merge the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live broadcast of each live stream play request a stream identifier; the server agent that sends the total live stream play request to the stream resource server; and receives the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server agent, and sends the data to the station Client playback
  • the server agent 503 is configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request is The live stream identifier of each live stream play request is included; the total live stream play request is decomposed, and the split live stream play request corresponding to each live stream identifier is obtained and sent to the stream resource server; and the stream resource server is received Each of the decomposed live stream playback requests the live stream data returned by the request; the received live stream data is sent to the client agent, so that the client agent sends each live stream data to the client to play ;
  • the stream resource server 504 is configured to receive the decomposed live stream play request sent by the server proxy, and return the corresponding live stream data.
  • the sixth embodiment of the present application provides a non-transitory computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the live stream in the first embodiment and/or the second embodiment. Processing method.
  • non-transitory computer storage medium provided by the embodiment of the present application, wherein computer executable instructions are stored, and the computer executable instructions are set as:
  • the client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request;
  • the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request;
  • the non-transitory computer storage medium provided by the embodiment of the present application, wherein the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data
  • the merged live stream data includes the header information and the live stream data corresponding to the live stream identifiers.
  • the header information includes: a live stream identifier of each live stream, and each live stream in the merged live stream. location information;
  • the live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing.
  • the non-transitory computer storage medium provided by the embodiment of the present application, wherein the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet.
  • the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier;
  • the real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes:
  • the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data.
  • the non-transitory computer storage medium provided by the embodiment of the present application, wherein each live stream play request of the client stored in the preset duration is merged into one total live stream play
  • the request, the total live stream play request includes a live stream identifier of each live stream play request, and specifically includes:
  • Generating a total live stream play request that carries the total live stream identifier information so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server.
  • the non-transitory computer storage medium provided by the embodiment of the present application, wherein: calculating the number of the live stream play request sent by the client stored in the preset duration, specifically includes:
  • the number of the live stream play request is incremented by one.
  • the embodiment of the present application provides a non-transitory computer storage medium, wherein the server proxy receives a total live stream play request sent by a client agent, where the total live stream play request is from the same client.
  • the at least two live stream play requests sent by the terminal are merged, and the live stream play request includes a live stream identifier of each live stream play request;
  • Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback.
  • the embodiment of the present application provides a non-transitory computer storage medium, where the sending of each live stream data received to the client agent includes:
  • each received live stream data to generate merged live stream data
  • the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: each live stream Live stream identifier, location information of each live stream in the merged live stream;
  • the embodiment of the present application provides a non-transitory computer storage medium, where the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet.
  • the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier.
  • the embodiment of the present application provides a non-transitory computer storage medium, where the total live stream play request includes total live stream identifier information, and the total live stream identifier information includes a live stream.
  • the identifier and the preset live stream identifier separator used to set the identifier between the two adjacent live stream identifiers;
  • FIG. 6 is a schematic structural diagram of hardware of an electronic device for processing a live stream according to Embodiment 7 of the present application. As shown in FIG. 6, the device includes:
  • processors 610 and memory 620 one processor 610 is taken as an example in FIG.
  • the apparatus for performing the processing method of the live stream may further include: an input device 630 and an output device 640.
  • the processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 620 is a non-transitory computer readable storage medium, and can be used for storing a non-transitory software program, a non-transitory computer executable program, and a module, as in the processing method of the live stream in the embodiment of the present application.
  • Program instructions/modules for example, live stream play request storage module 301, live stream play request number judgment module 302, live stream play request merge module 303, total live stream play request sending module 304, and live stream data shown in FIG.
  • the processor 610 performs various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 620, that is, realizing the live broadcast in the first embodiment and/or the second embodiment.
  • the processing method of the stream is storing a non-transitory
  • the memory 620 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the processing device of the live stream, and the like.
  • memory 620 can include high speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • memory 620 can optionally include memory remotely located relative to processor 610, which can be connected to the processing device of the live stream over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 630 can receive the input numeric or character information and generate a key signal input related to user settings and function control of the processing device of the live stream.
  • the output device 640 can include a display device such as a display screen.
  • the one or more modules are stored in the memory 620, and when executed by the one or more processors 610, perform a processing method of the live stream in the first embodiment and/or the second embodiment.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication equipment This type of equipment is characterized by its mobile communication function and Sound and data communication are the main goals.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the embodiment of the present application provides an electronic device, where computer executable instructions are stored, and the computer executable instructions are set as:
  • the client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request;
  • the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request;
  • the embodiment of the present application provides an electronic device, where the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, and the merged live stream data is And including the header information and the live stream data corresponding to the live stream identifiers, where the header information includes: a live stream identifier of each live stream, and each live stream is in the And live location information in the stream;
  • the live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing.
  • the embodiment of the present application provides an electronic device, where the combined live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, where the header information is further Including: the number of live stream identifiers, and the sequence number of the data packet corresponding to each live stream identifier;
  • the real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes:
  • the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data.
  • the embodiment of the present application provides an electronic device, where each live stream play request of the client stored in the preset duration is merged into a total live stream play request, and the total live broadcast
  • the stream play request includes the live stream identifier of each live stream play request, and specifically includes:
  • Generating a total live stream play request that carries the total live stream identifier information so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server.
  • the embodiment of the present application provides an electronic device, where the number of the live stream play request sent by the client stored in the preset duration is calculated, which specifically includes:
  • the number of the live stream play request is incremented by one.
  • the embodiment of the present application provides an electronic device, where the server proxy receives a total live stream play request sent by the client agent, where the total live stream play request is sent by at least two by the same client.
  • the live stream play request is merged, and the live stream play request includes a live stream identifier of each live stream play request;
  • Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback.
  • the embodiment of the present application provides an electronic device, where sending each received live stream data to the client agent includes:
  • each received live stream data to generate merged live stream data
  • the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: each live stream Live stream identifier, location information of each live stream in the merged live stream;
  • the embodiment of the present application provides an electronic device, where the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, where the header information is The method further includes: a number of live stream identifiers, and a serial number of the data packet corresponding to each live stream identifier.
  • the embodiment of the present application provides an electronic device, where the total live stream play request includes total live stream identifier information, where the total live stream identifier information includes a live stream identifier and is used for setting a preset live stream identifier separator between two adjacent live stream identifiers;
  • the device embodiments described above are merely illustrative, wherein said as a separate component
  • the elements may or may not be physically separate, and the components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

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

Abstract

The embodiment of the present application provides a live broadcast streaming processing method, an apparatus, an electronic device and a system. In the embodiment of the present application, by combining live broadcast streaming play requests in a preset time duration at a client terminal, a general live broadcast streaming play request is generated, such that when a plurality of live broadcast streaming are requested to be played by the client terminal, only one live broadcast streaming play request is transmitted through network. In this way, it is possible to reduce the number of live broadcast streaming play requests transmitted through network, thereby reducing the number of interactions and saving network resources. In addition, in the prior art, the probability of transmission failure is low when one live broadcast streaming play request is transmitted, and the probability of transmission failure for one live broadcast streaming play request among a plurality of transmitted live streaming playback requests is higher. In the embodiment of the present application, a plurality of live broadcast streaming play requests are merged into one live broadcast streaming play request to be transmitted through the network, which can effectively avoid communication failures caused by transmission failure of some live broadcast streaming play requests in a bad network condition in the prior art, thereby ensuring stability of communications.

Description

直播流的处理方法、装置、电子设备及系统Live stream processing method, device, electronic device and system

本申请要求在2016年04月20日提交中国专利局、申请号为201610248833.9、发明名称为“直播流的处理方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201610248833.9, entitled "Processing Method, Apparatus and System for Live Streaming", filed on April 20, 2016, the entire contents of which are incorporated herein by reference. In the application.

技术领域Technical field

本申请涉及多媒体信息处理技术领域,尤其涉及直播流的处理方法、装置、电子设备及系统。The present application relates to the field of multimedia information processing technologies, and in particular, to a method, an apparatus, an electronic device, and a system for processing a live stream.

背景技术Background technique

随着通信速度的提高,直播流的质量逐渐能够满足用户的需求。越来越多的用户也喜欢播放直播流获取实时性较高的信息。例如,观看直播的球赛,观看直播的综艺节目等。As the communication speed increases, the quality of the live stream can gradually meet the needs of users. More and more users also like to play live streams to get more real-time information. For example, watch live ball games, watch live variety shows, and more.

随着生活节奏的加快,一些用户为了节约时间,喜欢在同一客户端播放多个直播流,以便于同时了解多个直播流的信息。而现有技术中,则针对每个直播流客户端均会发送一个携带直播流标识的直播流播放请求,流资源服务器针对每个直播流请求都必须有响应。这样,若同一客户端播放请求10个直播流,则需要发送10个直播流播放请求,通信网络需要将这10个直播流播放请求一一发送给流资源服务器。流资源服务器需要针对每个直播流播放请求作出响应,并将响应结果通过网络传输给客户端。这样,当客户端请求播放多个直播流时,客户端和流资源服务器的交互次数会较多。对于网络状态不好的情况,例如客户端处于不停的移动状态,网络状态不稳定的情况下,难免有些直播流播放请求得不到响应。故此,交互次数较多不仅浪费网络资源,也会由于网络不稳定性,导致通信失败。As the pace of life accelerates, some users like to play multiple live streams on the same client in order to save time, so as to understand the information of multiple live streams at the same time. In the prior art, for each live stream client, a live stream play request carrying a live stream identifier is sent, and the stream resource server must respond to each live stream request. In this way, if the same client plays 10 live streams, it needs to send 10 live stream play requests, and the communication network needs to send the 10 live stream play requests to the stream resource server one by one. The streaming resource server needs to respond to each live stream play request and transmit the response result to the client over the network. In this way, when the client requests to play multiple live streams, the number of interactions between the client and the stream resource server will be more. In the case that the network status is not good, for example, when the client is in a non-stop moving state and the network status is unstable, some live streaming play requests are inevitably unresponsive. Therefore, the number of interactions is not only a waste of network resources, but also communication failure due to network instability.

发明内容Summary of the invention

本申请实施例提供直播流的处理方法、装置、电子设备及系统,用以解决目前由于同一客户端请求播放多个直播流时,交互次数较多浪费网络资源,也会由于网络不稳定性,导致通信失败等的问题。The embodiment of the present application provides a method, a device, an electronic device, and a system for processing a live stream, which are used to solve the problem that when the same client requests to play multiple live streams, the number of interactions is more wasteful of network resources, and also due to network instability. Problems that cause communication failures, etc.

本申请实施例提供的具体技术方案如下: The specific technical solutions provided by the embodiments of the present application are as follows:

第一方面,本申请实施例提供一种直播流的处理方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for processing a live stream, where the method includes:

客户端代理接收客户端发送的携带直播流标识的直播流播放请求并存储;The client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request;

计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;Calculating, by the preset duration, the number of live stream play requests sent by the client, and determining whether the quantity is greater than or equal to two;

若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;If yes, the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request;

将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;Sending the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server;

接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。And receiving the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and sending the data to the client for playing.

第二方面,本申请实施例提供一种直播流的处理方法,所述方法包括:In a second aspect, the embodiment of the present application provides a method for processing a live stream, where the method includes:

服务器代理接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;The server agent receives a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes each live stream. Play the requested live stream identifier;

将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;Decomposing the total live stream play request, obtaining a split live stream play request corresponding to each live stream identifier, and sending the request to the stream resource server;

接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;Receiving live stream data returned by the stream resource server for each split live stream play request;

将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback.

第三方面,本申请实施例提供一种直播流的处理系统,所述系统包括:In a third aspect, the embodiment of the present application provides a processing system for a live stream, where the system includes:

客户端,用于发送携带直播流标识的直播流请求给客户端代理,并接收客户端代理发送的直播流数据播放;The client is configured to send a live stream request carrying the live stream identifier to the client proxy, and receive the live stream data broadcast sent by the client proxy;

客户端代理,用于接收客户端发送的携带直播流标识的直播流播放请求并存储;计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;将所述总直播流播放请求发送给流资源服务器的服务器代理;接收所述服务器代理发送的所 述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放;The client agent is configured to receive a live stream play request that is sent by the client and carry the live stream play request, and store the request, and calculate the number of the live stream play request sent by the client stored in the preset duration, and determine whether the quantity is greater than or Equivalent to two; if yes, combining the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live stream of each live stream play request Identifying; sending the total live stream play request to a server proxy of the stream resource server; receiving the server sent by the server proxy The live stream data corresponding to each live stream identifier in the total live stream play request is sent to the client for playing;

服务器代理,用于接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放;a server agent, configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes The live stream identifier of each live stream play request; the total live stream play request is decomposed, and the split live stream play request corresponding to each live stream identifier is obtained and sent to the stream resource server; and the stream resource server is received for each After the decomposition, the live stream is played back to the live stream data of the request; the received live stream data is sent to the client agent, so that the client agent sends each live stream data to the client to play;

流资源服务器,用于接收服务器代理发送的分解后直播流播放请求,并返回相应的直播流数据。The stream resource server is configured to receive the decomposed live stream play request sent by the server proxy, and return the corresponding live stream data.

第四方面,本申请实施例还提供了一种非暂态性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本申请上述任一项直播流的处理方法。In a fourth aspect, the embodiment of the present application further provides a non-transitory computer storage medium, where computer executable instructions are stored, and the computer executable instructions are used to execute a processing method of any of the foregoing live streams of the present application.

第五方面,本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及存储器;其中,所述存储器存储有可被所述至少一个处理器执行的程序,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请上述任一项直播流的处理方法。In a fifth aspect, an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory; wherein the memory stores a program executable by the at least one processor, where the instruction is The at least one processor executes to enable the at least one processor to perform the processing method of any of the above-described live streams of the present application.

本申请实施例中,通过将客户端预设时长内的直播流播放请求合并生成一个总直播流播放请求,使得在客户端请求播放多个直播流时,通过网络传输的直播流播放请求仅有一个(即总直播流播放请求)。这样,能够减少通过网络传输直播流播放请求的数量,从而减少交互次数,节省网络资源。另外,现有技术中,传输一个直播流播放请求、传输失败的概率较低,若多个直播流播放请求中有一个传输失败的可能性则较高,本申请实施例中通过将多个直播流播放请求合并成一个直播流播放请求在网络中传输,也能够有效避免网络状态不好导致现有技术中有些直播流播放请求无法传输而导致通信失败的情况发生,从而能够保证通信的稳定性。In the embodiment of the present application, the live broadcast stream play request in the preset time duration of the client is combined to generate a total live stream play request, so that when the client requests to play multiple live stream, the live stream play request transmitted through the network is only One (ie total live stream play request). In this way, the number of live streaming play requests transmitted over the network can be reduced, thereby reducing the number of interactions and saving network resources. In addition, in the prior art, the probability of transmitting a live stream play request is unsuccessful, and if there is a possibility that one of the plurality of live stream play requests fails to be transmitted, the live broadcast is performed in a plurality of live broadcasts. The streaming play request is merged into one live stream play request to be transmitted in the network, and the network status is also prevented from being bad. As a result, some live stream play requests cannot be transmitted in the prior art, and communication failure occurs, thereby ensuring communication stability. .

附图说明DRAWINGS

图1为本申请实施例一中直播流的处理方法的示例性流程图;FIG. 1 is an exemplary flowchart of a method for processing a live stream according to Embodiment 1 of the present application;

图2为本申请实施例二中直播流的处理方法的示例性流程图; 2 is an exemplary flowchart of a method for processing a live stream according to Embodiment 2 of the present application;

图3为本申请实施例三中直播流的处理装置的结构示意图;3 is a schematic structural diagram of a device for processing a live stream according to Embodiment 3 of the present application;

图4为本申请实施例四中直播流的处理装置的结构示意图;4 is a schematic structural diagram of a processing apparatus for a live stream according to Embodiment 4 of the present application;

图5为本申请实施例五中直播流的处理系统的结构示意图;5 is a schematic structural diagram of a processing system of a live stream in Embodiment 5 of the present application;

图6是本申请实施例七提供的执行直播流的处理方法的设备的硬件结构示意图。FIG. 6 is a schematic structural diagram of hardware of a device for processing a live stream according to Embodiment 7 of the present application.

具体实施方式detailed description

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.

实施例一Embodiment 1

如图1所示为本申请实施例提供的直播流的处理方法的流程示意图,适用于客户端代理,包括以下步骤:FIG. 1 is a schematic flowchart of a method for processing a live stream according to an embodiment of the present application, which is applicable to a client agent, and includes the following steps:

步骤101:客户端代理接收客户端发送的携带直播流标识的直播流播放请求并存储。Step 101: The client agent receives the live stream play request that is sent by the client and carries the live stream identifier, and stores the request.

其中,在一个实施例中,流资源服务器用于提供直播流,直播流标识,例如是直播流ID(IDentity,标识号码)。In one embodiment, the stream resource server is configured to provide a live stream, and the live stream identifier is, for example, a live stream ID (IDentity).

步骤102:计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二。Step 102: Calculate the number of live stream play requests sent by the client stored in the preset duration, and determine whether the number is greater than or equal to two.

步骤103:若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识。Step 103: If yes, merge the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live stream of each live stream play request. Logo.

例如,预设时长内存储的客户端的直播流播放请求为3个,分别为请求直播流1、直播流2和直播流3的直播流播放请求,则客户端代理,将存储的这三个直播流播放请求进行合并,生成一个携带直播流1、直播流2和直播流3的直播流标识的总直播流播放请求。For example, the live stream play request of the client stored in the preset duration is three, which are the live stream play request of the live stream 1, the live stream 2, and the live stream 3, respectively, and the client agent will store the three live broadcasts. The stream play request is merged to generate a total live stream play request carrying the live stream identifiers of the live stream 1, the live stream 2, and the live stream 3.

其中,在一个实施例中,若步骤102的判断结果为否(即直播流播放请求的数量小于2),可以参照现有技术处理,本申请实施例对此不做赘述。 For example, in an embodiment, if the result of the determination in step 102 is no (that is, the number of the live stream play request is less than 2), refer to the prior art processing, which is not described in this embodiment of the present application.

步骤104:将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据。Step 104: Send the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream corresponding to each live stream identifier in the total live stream play request from the stream resource server. Stream data.

步骤105:接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。Step 105: Receive live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and send the data to the client for playing.

这样,本申请实施例中,通过将客户端预设时长内的直播流播放请求合并生成一个总直播流播放请求,使得在客户端请求播放多个直播流时,通过网络传输的直播流播放请求仅有一个(即总直播流播放请求)。这样,能够减少通过网络传输直播流播放请求的数量,从而减少交互次数,节省网络资源。另外,现有技术中,传输一个直播流播放请求、传输失败的概率较低,若多个直播流播放请求中有一个传输失败的可能性则较高,本申请实施例中通过将多个直播流播放请求合并成一个直播流播放请求在网络中传输,也能够有效避免网络状态不好导致现有技术中有些直播流播放请求无法传输而导致通信失败的情况发生,从而能够保证通信的稳定性。In this way, in the embodiment of the present application, a live broadcast stream play request in the client preset duration is combined to generate a total live stream play request, so that when the client requests to play multiple live streams, the live stream play request transmitted through the network There is only one (ie the total live stream play request). In this way, the number of live streaming play requests transmitted over the network can be reduced, thereby reducing the number of interactions and saving network resources. In addition, in the prior art, the probability of transmitting a live stream play request is unsuccessful, and if there is a possibility that one of the plurality of live stream play requests fails to be transmitted, the live broadcast is performed in a plurality of live broadcasts. The streaming play request is merged into one live stream play request to be transmitted in the network, and the network status is also prevented from being bad. As a result, some live stream play requests cannot be transmitted in the prior art, and communication failure occurs, thereby ensuring communication stability. .

为便于进一步理解,下面对本申请实施例提供的直播流的处理方法做进一步说明,包括:For further understanding, the following describes the processing method of the live stream provided by the embodiment of the present application, including:

1)、针对步骤102:1), for step 102:

其中,在一个实施例中,为便于计算直播流播放请求的数量,本申请实施例中步骤102中计算预设时长内存储的所述客户端发送的直播流播放请求的数量,可具体包括以下步骤:In one embodiment, in order to facilitate the calculation of the number of the live stream play request, the number of the live stream play request sent by the client stored in the preset time length in the step 102 in the embodiment of the present application may specifically include the following. step:

步骤A1:接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1。Step A1: Start timing after receiving the first live stream play request, and set the number of live stream play requests to 1.

其中,在一个实施例中,第一个直播流播放请求指若一定时间段内未接收到客户端发送的直播流播放请求,该一定时间段之后接收到的该客户端发送的第一个直播流播放请求。例如,一定时间段内为5分钟,则若5分钟内没有收到客户端发送的直播流播放请求,则在5分钟之后收到的第一个直播流播放请求即为步骤A1中的第一个直播流播放请求。In one embodiment, the first live stream play request refers to the first live broadcast sent by the client after the certain period of time, if the live stream play request sent by the client is not received within a certain period of time. Stream play request. For example, if it is 5 minutes in a certain period of time, if the live stream play request sent by the client is not received within 5 minutes, the first live stream play request received after 5 minutes is the first step A1. Live streaming play request.

当然,客户端与流资源服务器建立连接后发送的第一个直播流播放请求,也算作步骤A1中的第一个直播流播放请求。Of course, the first live stream play request sent by the client after establishing a connection with the stream resource server is also counted as the first live stream play request in step A1.

步骤A2:在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。 Step A2: After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one.

其中,在一个实施例中,为了尽快处理直播流播放请求,以避免用户感知获取直播流的速度慢,本申请实施例中,预设时长可以为1秒,当然具体实施时,用户可以根据实际需要设定预设时长,本申请实施例对此不做限定。In an embodiment, in order to process the live stream play request as soon as possible, in order to prevent the user from being aware of the slowness of obtaining the live stream, the preset duration may be 1 second in the embodiment of the present application. The preset duration is required to be set, which is not limited by the embodiment of the present application.

其中,在一个实施例中,上述步骤A1-步骤A2中是接收到第一个直播流播放请求开始计时,并确定预设时长。具体实施时,本申请实施例中,还可以将时间提前划分为一个个时间段,每个时间段为一个预设时长。例如,客户端与流资源服务器建立连接后为第一个预设时长的开始,从而确定出各个时间段作为预设时长。In one embodiment, in step A1 to step A2, the first live stream play request is started, and the preset duration is determined. In a specific implementation, in the embodiment of the present application, the time advance may be further divided into one time period, and each time period is a preset time length. For example, after the client establishes a connection with the stream resource server, it is the start of the first preset duration, thereby determining each time period as a preset duration.

其中,在一个实施例中,也可以以预设时长为单位存储客户端的直播流播放请求,不采用累加的方式计算直播流播放请求的数量,而在最后统计一下预设时长内所述客户端发送的直播流播放请求的数量。In one embodiment, the live broadcast play request of the client may be stored in a preset duration, and the number of live streaming play requests is calculated without using an accumulated manner, and the client is counted in the preset duration. The number of live stream play requests sent.

2)、针对步骤103:2), for step 103:

其中,在一个实施例中,为便于服务器代理能够识别总直播流播放请求是请求哪些直播流数据,且为了服务器代理从流资源服务器中获取客户端请求的各直播流数据时,不对流资源服务器进行修改,本申请实施例中步骤103可具体包括以下步骤:In one embodiment, in order to facilitate the server agent to identify which live stream data is requested for the total live stream play request, and for the server agent to obtain the live stream data requested by the client from the stream resource server, the stream server is not convected. The modification may be performed. Step 103 in the embodiment of the present application may specifically include the following steps:

步骤B1:在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息。Step B1: Insert a preset live stream identifier separator between the adjacent two live stream identifiers to generate total live stream identifier information.

其中,在一个实施例中,预设直播流标识分割符可以为“,”或者“/”等,当然,能够使得服务器代理能够识别为预设直播流标识分割符的分割符均适用于本申请实施例,本申请对此不做限定。In one embodiment, the preset live stream identifier identifier may be “,” or “/”, etc., of course, the identifier that enables the server proxy to identify the preset live stream identifier separator is applicable to the present application. The embodiment does not limit this application.

步骤B2:生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。Step B2: Generate a total live stream play request carrying the total live stream identifier information, so that the server proxy performs the following operations: acquiring each from the total live stream request according to the preset live stream identifier splitter The live stream identifier is generated, and the generated live stream play request for each live stream identifier is generated and sent to the stream resource server.

这样,通过预设直播流标识分割符,使得服务器代理能够识别各个直播流标识,从而生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器,使得流资源服务器可以按照现有的直播流播放请求处理,而无需对流资源服务器进行更改。In this way, by the preset live stream identifier, the server agent can identify each live stream identifier, and generate a split live stream play request for each live stream identifier to be sent to the stream resource server, so that the stream resource server can follow the existing The live stream play request processing without having to make changes to the streaming resource server.

其中,在一个实施例中,本申请实施例中还可以根据以下方法合并各 直播流播放请求生成总直播流播放请求,具体的:在相邻直播流播放请求之间添加直播流播放请求分割符,相当于将直播流播放请求串联起来生成总直播流播放请求。这样,服务器代理可以根据直播流播放请求分割符分解出各个直播流播放请求发送给流资源服务器,也能达到同样的效果。In an embodiment, the embodiments of the present application may also combine the following methods according to the following methods. The live stream play request generates a total live stream play request. Specifically, the live stream play request splitter is added between the adjacent live stream play requests, which is equivalent to connecting the live stream play requests in series to generate a total live stream play request. In this way, the server agent can decompose each live stream play request to the stream resource server according to the live stream play request splitter, and can achieve the same effect.

3)、针对步骤105:3), for step 105:

其中,在一个实施例中,本申请实施例中,服务器代理可以将流资源服务器针对每个分解后直播流播放请求返回的直播流数据逐一发送给客户端代理,这样,返回给客户端的代理相当于有多少个直播流播放请求,就有多少个响应。本申请实施例中,为便于进一步减少交互次数,提高传输的稳定性,流资源服务器返回的各个直播流数据可以为合并后的合并直播流数据,这样,通过网络只需要传输一个合并直播流数据即可(即做一次响应即可),而无需针对每个直播流传输一次。具体的:In an embodiment, in the embodiment of the present application, the server proxy may send the live stream data returned by the stream resource server for each of the decomposed live stream playback requests to the client proxy one by one, so that the proxy returned to the client is equivalent. How many responses are there in how many live streaming requests are played. In the embodiment of the present application, in order to further reduce the number of interactions and improve the stability of the transmission, each live stream data returned by the stream resource server may be merged live stream data, so that only one merged live stream data needs to be transmitted through the network. It can be (ie, respond once) without having to transmit it once for each live stream. specific:

所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;The live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header The information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream;

则步骤105,具体可包括以下步骤:Step 105, specifically comprising the following steps:

步骤C1:接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据。Step C1: Receive the merged live stream, and parse the merged live stream according to the header information, and obtain live stream data corresponding to each live stream identifier.

其中,在一个实施例中,位置信息包括每个直播流的起始位置和结束位置。这样,针对每个直播流,根据该直播流的直播流标识及其对应位置信息,便可以得到该直播流数据。Wherein, in one embodiment, the location information includes a start location and an end location of each live stream. In this way, for each live stream, the live stream data can be obtained according to the live stream identifier of the live stream and its corresponding location information.

步骤C2:将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。Step C2: Send the live stream data corresponding to each live stream identifier obtained after parsing to the client for playing.

其中,在一个实施例中,客户端请求的直播流可能是不同码率的,码率高的直播流所需要的数据量自然大。合并直播流由至少两个数据包组成,每个数据包包括的数据量有限,为了能够保证客户端顺畅播放码率高的直播流,码率稿的直播流所需要的数据包自然多。故此,为了保证码率高的直播流顺畅播放,本申请实施例中,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号; In one embodiment, the live stream requested by the client may be of different code rate, and the amount of data required for the live stream with high code rate is naturally large. The combined live stream consists of at least two data packets. Each data packet includes a limited amount of data. In order to ensure that the client smoothly broadcasts a live stream with a high code rate, the live stream of the code rate draft requires a large number of data packets. Therefore, in order to ensure smooth playback of the live stream with a high code rate, in the embodiment of the present application, the location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers, each live stream Identify the corresponding packet sequence number;

步骤C1可具体包括以下步骤:Step C1 may specifically include the following steps:

步骤D1:确认头信息中的直播流标识数量与直播流标识的总数是否相同。Step D1: Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers.

步骤D2:若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。Step D2: If the same, for each live stream identifier, obtain each data packet corresponding to the live stream identifier according to the location information corresponding to the live stream identifier; and sort the obtained data packets according to the data packet sequence number to generate a live stream. data.

其中,直播流标识对应的位置信息即直播流标识对应的直播流的位置信息。The location information corresponding to the live stream identifier is the location information of the live stream corresponding to the live stream identifier.

这样,通过数据包序号,便可以确定同一直播流的不同数据包的顺序,以便于客户端正确解析出每个直播流的数据,而不至于将后播放的数据放在先播放的数据前。In this way, the sequence of different data packets of the same live stream can be determined by the sequence number of the data packet, so that the client can correctly parse the data of each live stream without placing the data to be played back before the data to be played first.

其中,在一个实施例中,若不相同,则说明反馈的合并直播流数据有误,可以反馈错误信息给服务器代理,以便重传数据。In one embodiment, if they are not the same, it indicates that the combined live broadcast stream data is incorrect, and the error information may be fed back to the server proxy to retransmit the data.

其中,在一个实施例中,头信息中的直播流标识数量还可以便于客户端代确定需要分解出多少直播流数据,以便于客户端代理分配存储空间。In one embodiment, the number of live stream identifiers in the header information may also facilitate the client to determine how much live stream data needs to be decomposed, so that the client agent allocates storage space.

综上,本申请实施例中,可以将客户端的多个直播流播放请求合并后得到一个总直播流播放请求在网络中传输,也可以将多个直播流播放请求的直播流数据合并成一个合并直播流数据在网络中传输。实现,原本在现有技术中需要的多次传输和交互,只需要1次交互便可完成,能够节省网络资源。此外,由于1次交互失败的概率低,还能够保证通信的稳定性。In summary, in the embodiment of the present application, a plurality of live stream play requests of the client may be combined to obtain a total live stream play request to be transmitted in the network, or the live stream data of the plurality of live stream play requests may be merged into one merge. Live stream data is transmitted over the network. The multiple transmissions and interactions originally required in the prior art can be completed with only one interaction, which can save network resources. In addition, since the probability of one-time interaction failure is low, the stability of communication can be ensured.

实施例二Embodiment 2

基于相同的发明构思,本申请实施例还提供一种直播流的处理方法,适用于服务器代理。如图2所示,为该方法的流程示意图,可包括以下步骤:Based on the same inventive concept, the embodiment of the present application further provides a method for processing a live stream, which is applicable to a server proxy. As shown in FIG. 2, it is a schematic flowchart of the method, which may include the following steps:

步骤201:服务器代理接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识。Step 201: The server agent receives a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes The live stream identifier of each live stream play request.

其中,总直播流播放请求由客户端代理生成,其生成方法已在实施例中说明,在此不再赘述。The total live stream play request is generated by the client agent, and the method for generating the same is described in the embodiment, and details are not described herein again.

步骤202:将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器。 Step 202: Decompose the total live stream play request, obtain a decomposed live stream play request corresponding to each live stream identifier, and send the request to the stream resource server.

步骤203:接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据。Step 203: Receive live stream data returned by the stream resource server for each split live stream play request.

步骤204:将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Step 204: Send each received live stream data to the client agent, so that the client agent sends each live stream data to the client for playing.

这样,本申请实施例中,服务器代理接收的是客户端代理发送的由至少两个直播流播放请求合成的一个总直播流播放请求。使得在客户端请求播放多个直播流时,通过网络传输的直播流播放请求仅有一个(即总直播流播放请求)。这样,能够减少通过网络传输直播流播放请求的数量,从而减少交互次数,节省网络资源。另外,现有技术中,传输一个直播流播放请求、传输失败的概率较低,若多个直播流播放请求中有一个传输失败的可能性则较高,本申请实施例中通过将多个直播流播放请求合并成一个直播流播放请求在网络中传输,也能够有效避免网络状态不好导致现有技术中有些直播流播放请求无法传输而导致通信失败的情况发生,从而能够保证通信的稳定性。Thus, in the embodiment of the present application, the server agent receives a total live stream play request sent by the client agent and synthesized by at least two live stream play requests. When the client requests to play multiple live streams, there is only one live stream play request transmitted through the network (ie, the total live stream play request). In this way, the number of live streaming play requests transmitted over the network can be reduced, thereby reducing the number of interactions and saving network resources. In addition, in the prior art, the probability of transmitting a live stream play request is unsuccessful, and if there is a possibility that one of the plurality of live stream play requests fails to be transmitted, the live broadcast is performed in a plurality of live broadcasts. The streaming play request is merged into one live stream play request to be transmitted in the network, and the network status is also prevented from being bad. As a result, some live stream play requests cannot be transmitted in the prior art, and communication failure occurs, thereby ensuring communication stability. .

为便于进一步理解,下面对本申请实施例提供的直播流的处理方法做进一步说明,包括:For further understanding, the following describes the processing method of the live stream provided by the embodiment of the present application, including:

本申请实施例中,为便于进一步减少交互次数,本申请实施例中步骤204中将接收的每个直播流数据发送给所述客户端代理,可具体包括以下步骤:In the embodiment of the present application, in order to facilitate the further reduction of the number of interactions, each live stream data received in the step 204 of the embodiment of the present application may be sent to the client agent, which may specifically include the following steps:

步骤F1:将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息。Step F1: Combining the received live broadcast stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: The live stream identifier of each live stream, and the location information of each live stream in the merged live stream.

步骤F2:将所述合并直播流数据发送给所述客户端代理。Step F2: Send the merged live stream data to the client agent.

这样,将合并直播流数据发送给客户端代理,从而实现原本需要针对每个直播流请求发送一次的直播流数据,一起发送,从而实现多次交互,只需要一次即可完成,从而进一步减少交互次数。In this way, the combined live stream data is sent to the client agent, so that the live stream data that needs to be sent once for each live stream request is sent together, thereby implementing multiple interactions, which can be completed only once, thereby further reducing interaction. frequency.

其中,在一个实施例中,客户端请求的直播流可能是不同码率的,码率高的直播流所需要的数据量自然大。合并直播流由至少两个数据包组成,每个数据包包括的数据量有限,为了能够保证客户端顺畅播放码率高的直播流,码率稿的直播流所需要的数据包自然多。故此,为了保证码率高的 直播流顺畅播放,本申请实施例中,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。这样,便于客户端根据头信息正确解析出每个直播流的直播流数据。In one embodiment, the live stream requested by the client may be of different code rate, and the amount of data required for the live stream with high code rate is naturally large. The combined live stream consists of at least two data packets. Each data packet includes a limited amount of data. In order to ensure that the client smoothly broadcasts a live stream with a high code rate, the live stream of the code rate draft requires a large number of data packets. Therefore, in order to ensure high code rate The live stream is smoothly played. In the embodiment of the present application, the location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier. In this way, the client can correctly parse the live stream data of each live stream according to the header information.

其中,在一个实施例中,为了使流资源服务器还能够按照现有的处理方式处理直播流播放请求,而无需改造流资源服务器,本申请实施例中,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;In an embodiment, in order to enable the stream resource server to process the live stream play request according to the existing processing manner, without modifying the stream resource server, in the embodiment of the present application, the total live stream play request includes the total a live stream identifier information, where the total live stream identifier information includes a live stream identifier and a preset live stream identifier identifier for setting between two adjacent live stream identifiers;

步骤202中将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,可具体包括:根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。In step 202, the total live stream play request is decomposed, and the split live broadcast stream play request corresponding to each live stream identifier is obtained, which may include: according to the preset live stream identifier splitter, from the total live broadcast Each live stream identifier is obtained in the stream request, and a split live stream play request for each live stream identifier is generated.

其中,在一个实施例中,为了便于满足个性化需求,客户端的直播流播放请求中还可以包括直播流播放优先级,而合并生成合并直播流时,可以使优先级高的直播流数据相较其他直播流数据多一些,从而实现优先级高的直播流数据优先传输给客户端。其中,优先级可以是用户指定的优先级。In one embodiment, in order to facilitate the personalization requirement, the live stream play request of the client may further include a live stream play priority, and when the merged live stream is merged, the live stream data with a higher priority may be compared. The other live stream data has more data, so that the live stream data with higher priority is preferentially transmitted to the client. The priority may be a user-specified priority.

综上,本申请实施例中,接收的总直播了播放请求,为客户端代理将客户端的多个直播流播放请求合并后得到一个总直播流播放。向客户端发送的直播流数据,为多个直播流播放请求的直播流数据合并成一个合并直播流数据。这样,只需要一次交互既可以实现现有技术中多次交互的作用,减少了交互数量,节约网络资源。此外,由于1次交互失败的概率低,还能够保证通信的稳定性。In summary, in the embodiment of the present application, the received total broadcast broadcast request is performed, and the client agent combines the multiple live stream play requests of the client to obtain a total live stream. The live stream data sent to the client is combined into the live stream data of the plurality of live stream play requests. In this way, only one interaction is required to implement multiple interactions in the prior art, reducing the number of interactions and saving network resources. In addition, since the probability of one-time interaction failure is low, the stability of communication can be ensured.

实施例三Embodiment 3

基于相同的发明构思,本申请实施例还提供一种直播流的处理装置,如图3所示,为该装置的结构示意图,所述装置包括:Based on the same inventive concept, the embodiment of the present application further provides a processing device for a live stream, as shown in FIG. 3, which is a schematic structural diagram of the device, where the device includes:

直播流播放请求存储模块301,用于接收客户端发送的携带直播流标识的直播流播放请求并存储;The live stream play request storage module 301 is configured to receive a live stream play request that is sent by the client and carry the live stream identifier and store the broadcast stream request;

直播流播放请求数量判断模块302,用于计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二; The live stream play request quantity determining module 302 is configured to calculate the number of live stream play requests sent by the client stored in the preset duration, and determine whether the quantity is greater than or equal to two;

直播流播放请求合并模块303,用于若直播流播放请求数量判断模块的判断结果为是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;The live stream play request combining module 303 is configured to merge the live stream play requests of the client stored in the preset duration into one total live stream if the judgment result of the live stream play request quantity determining module is yes. The request, the total live stream play request includes a live stream identifier of each live stream play request;

总直播流播放请求发送模块304,将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;The total live stream play request sending module 304 sends the total live stream play request to the server agent of the stream resource server, so that the service agent obtains each of the total live stream play requests from the stream resource server. Live stream data corresponding to the live stream identifier;

直播流数据处理模块305,用于接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。The live stream data processing module 305 is configured to receive live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and send the data to the client for playing.

其中,在一个实施例中,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;In one embodiment, the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, where the merged live stream data includes header information and a live stream corresponding to each live stream identifier. Flow data; wherein the header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream;

直播流数据处理模块,具体包括:The live stream data processing module specifically includes:

合并直播流解析单元,用于接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;a merged live stream parsing unit, configured to receive the merged live stream, and parse the merged live stream according to the header information, to obtain live stream data corresponding to each live stream identifier;

直播流数据发送单元,用于将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。The live stream data sending unit is configured to send the live stream data corresponding to each live stream identifier obtained after parsing to the client for playing.

其中,在一个实施例中,合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;In one embodiment, the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, where the header information further includes: a number of live stream identifiers, each live stream Identify the corresponding packet sequence number;

合并直播流解析单元,具体用于:The live broadcast stream parsing unit is specifically configured to:

确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers;

若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data.

其中,在一个实施例中,直播流播放请求合并模块,具体包括:In one embodiment, the live stream play request merge module includes:

分割符插入单元,用于在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;a splitter insertion unit, configured to insert a preset live stream identifier separator between the adjacent two live stream identifiers to generate total live stream identifier information;

总直播流播放请求处理单元,用于生成携带所述总直播流标识信息的 总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。a total live stream play request processing unit, configured to generate the information carrying the total live stream identifier information And a total live stream play request, so that the server agent performs the following operations: acquiring, according to the preset live stream identifier splitter, each live stream identifier from the total live stream request, and generating an identifier for each live stream identifier The live broadcast stream play request is sent to the stream resource server.

其中,在一个实施例中,直播流播放请求数量判断模块,具体包括:In one embodiment, the live stream play request quantity determining module specifically includes:

计时单元,用于接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1;a timing unit, configured to start timing after receiving the first live stream play request, and set the number of live stream play requests to 1;

计算单元,用于在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。The calculating unit is configured to accumulate the number of the live stream play request by one after receiving a live stream play request sent by the client within a preset duration after the start of the timer.

实施例四Embodiment 4

基于相同的发明构思,本申请实施例还提供一种直播流的处理装置,如图4所示,为该装置的结构示意图,所述装置包括:Based on the same inventive concept, the embodiment of the present application further provides a processing device for a live stream, as shown in FIG. 4, which is a schematic structural diagram of the device, where the device includes:

总直播流播放请求接收模块401,用于接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;The total live stream play request receiving module 401 is configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the The live stream play request includes a live stream identifier of each live stream play request;

总直播流播放请求分解模块402,用于将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;The total live stream play request decomposition module 402 is configured to decompose the total live stream play request, obtain a decomposed live stream play request corresponding to each live stream identifier, and send the request to the stream resource server;

直播流数据获取模块403,用于接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;The live stream data obtaining module 403 is configured to receive live stream data returned by the stream resource server for each split live stream play request;

直播流数据处理模块404,用于将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。The live stream data processing module 404 is configured to send each received live stream data to the client agent, so that the client agent sends each live stream data to the client for playing.

其中,在一个实施例中,直播流数据处理模块,具体包括:In one embodiment, the live stream data processing module specifically includes:

合并直播流数据生成单元,用于将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;a merged live stream data generating unit, configured to combine the received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; The header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream;

合并直播流数据生成单元发送单元,用于将所述合并直播流数据发送给所述客户端代理。And a combined live stream data generating unit sending unit, configured to send the merged live stream data to the client agent.

其中,在一个实施例中,所述合并直播流由至少两个数据包组成,所 述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。Wherein, in one embodiment, the merged live stream is composed of at least two data packets, The location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier.

其中,在一个实施例中,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;In an embodiment, the total live stream play request includes total live stream identifier information, where the total live stream identifier information includes a live stream identifier and a preset for setting between two adjacent live stream identifiers. Set the live stream identifier separator;

总直播流播放请求分解模块,具体用于:根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。The total live stream play request splitting module is configured to: obtain, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generate a split live broadcast for each live stream identifier Stream play request.

实施例五Embodiment 5

基于相同的发明构思,本申请实施例还提供一种直播流请求的处理系统,如图5所示,为该系统的结构示意图,所述系统包括:Based on the same inventive concept, the embodiment of the present application further provides a processing system for a live stream request, as shown in FIG. 5, which is a schematic structural diagram of the system, where the system includes:

客户端501,用于发送携带直播流标识的直播流请求给客户端代理,并接收客户端代理发送的直播流数据播放;The client 501 is configured to send a live stream request carrying a live stream identifier to the client proxy, and receive live broadcast stream data sent by the client proxy.

客户端代理502,用于接收客户端发送的携带直播流标识的直播流播放请求并存储;计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;将所述总直播流播放请求发送给流资源服务器的服务器代理;接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放;The client agent 502 is configured to receive a live stream play request that is sent by the client and carry the live stream play request, and store the live broadcast stream play request sent by the client in the preset duration, and determine whether the quantity is greater than Or equal to two; if yes, merge the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live broadcast of each live stream play request a stream identifier; the server agent that sends the total live stream play request to the stream resource server; and receives the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server agent, and sends the data to the station Client playback

服务器代理503,用于接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放;The server agent 503 is configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request is The live stream identifier of each live stream play request is included; the total live stream play request is decomposed, and the split live stream play request corresponding to each live stream identifier is obtained and sent to the stream resource server; and the stream resource server is received Each of the decomposed live stream playback requests the live stream data returned by the request; the received live stream data is sent to the client agent, so that the client agent sends each live stream data to the client to play ;

流资源服务器504,用于接收服务器代理发送的分解后直播流播放请求,并返回相应的直播流数据。 The stream resource server 504 is configured to receive the decomposed live stream play request sent by the server proxy, and return the corresponding live stream data.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the apparatus in the above embodiments, the specific manner in which the respective modules perform the operations has been described in detail in the embodiment relating to the method, and will not be explained in detail herein.

实施例六Embodiment 6

本申请实施例六提供了一种非暂态性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述实施例一和/或实施例二中的直播流的处理方法。The sixth embodiment of the present application provides a non-transitory computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the live stream in the first embodiment and/or the second embodiment. Processing method.

在一种可能的实施方式中,本申请实施例提供的非暂态性计算机存储介质,其中,存储有计算机可执行指令,所述计算机可执行指令设置为:In a possible implementation, the non-transitory computer storage medium provided by the embodiment of the present application, wherein computer executable instructions are stored, and the computer executable instructions are set as:

客户端代理接收客户端发送的携带直播流标识的直播流播放请求并存储;The client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request;

计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;Calculating, by the preset duration, the number of live stream play requests sent by the client, and determining whether the quantity is greater than or equal to two;

若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;If yes, the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request;

将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;Sending the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server;

接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。And receiving the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and sending the data to the client for playing.

在一种可能的实施方式中,本申请实施例提供的非暂态性计算机存储介质,其中,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;In a possible implementation, the non-transitory computer storage medium provided by the embodiment of the present application, wherein the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, The merged live stream data includes the header information and the live stream data corresponding to the live stream identifiers. The header information includes: a live stream identifier of each live stream, and each live stream in the merged live stream. location information;

接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放,具体包括:And receiving the live stream data corresponding to the live stream identifiers in the total live stream play request sent by the server proxy, and sending the data to the client for playing, specifically:

接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;Receiving the merged live stream, and parsing the merged live stream according to the header information, and obtaining live stream data corresponding to each live stream identifier;

将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。 The live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing.

在一种可能的实施方式中,本申请实施例提供的非暂态性计算机存储介质,其中,合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;In a possible implementation, the non-transitory computer storage medium provided by the embodiment of the present application, wherein the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet. The header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier;

根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据,具体包括:The real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes:

确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers;

若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data.

在一种可能的实施方式中,本申请实施例提供的非暂态性计算机存储介质,其中,将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识,具体包括:In a possible implementation manner, the non-transitory computer storage medium provided by the embodiment of the present application, wherein each live stream play request of the client stored in the preset duration is merged into one total live stream play The request, the total live stream play request includes a live stream identifier of each live stream play request, and specifically includes:

在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;Inserting a preset live stream identifier separator between two adjacent live stream identifiers to generate total live stream identifier information;

生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。Generating a total live stream play request that carries the total live stream identifier information, so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server.

在一种可能的实施方式中,本申请实施例提供的非暂态性计算机存储介质,其中,计算预设时长内存储的所述客户端发送的直播流播放请求的数量,具体包括:In a possible implementation manner, the non-transitory computer storage medium provided by the embodiment of the present application, wherein: calculating the number of the live stream play request sent by the client stored in the preset duration, specifically includes:

接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1;并,After receiving the first live stream play request, start timing, and set the number of live stream play requests to 1; and,

在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one.

此外,在一种可能的实施方式中,本申请实施例提供非暂态性计算机存储介质,其中,服务器代理接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识; In addition, in a possible implementation, the embodiment of the present application provides a non-transitory computer storage medium, wherein the server proxy receives a total live stream play request sent by a client agent, where the total live stream play request is from the same client. The at least two live stream play requests sent by the terminal are merged, and the live stream play request includes a live stream identifier of each live stream play request;

将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;Decomposing the total live stream play request, obtaining a split live stream play request corresponding to each live stream identifier, and sending the request to the stream resource server;

接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;Receiving live stream data returned by the stream resource server for each split live stream play request;

将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback.

在一种可能的实施方式中,本申请实施例提供非暂态性计算机存储介质,其中,将接收的每个直播流数据发送给所述客户端代理,具体包括:In a possible implementation, the embodiment of the present application provides a non-transitory computer storage medium, where the sending of each live stream data received to the client agent includes:

将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;Combining each received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: each live stream Live stream identifier, location information of each live stream in the merged live stream;

将所述合并直播流数据发送给所述客户端代理。Transmitting the merged live stream data to the client agent.

在一种可能的实施方式中,本申请实施例提供非暂态性计算机存储介质,其中所述合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。In a possible implementation, the embodiment of the present application provides a non-transitory computer storage medium, where the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet. The header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier.

在一种可能的实施方式中,本申请实施例提供非暂态性计算机存储介质,其中,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;In a possible implementation, the embodiment of the present application provides a non-transitory computer storage medium, where the total live stream play request includes total live stream identifier information, and the total live stream identifier information includes a live stream. The identifier and the preset live stream identifier separator used to set the identifier between the two adjacent live stream identifiers;

将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,具体包括:Decomposing the total live stream play request, and obtaining a split live stream play request corresponding to each live stream identifier, specifically:

根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。And obtaining, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generating a split live stream play request for each live stream identifier.

实施例七Example 7

图6是本申请实施例七提供的执行直播流的处理方法的电子设备的硬件结构示意图,如图6所示,该设备包括:FIG. 6 is a schematic structural diagram of hardware of an electronic device for processing a live stream according to Embodiment 7 of the present application. As shown in FIG. 6, the device includes:

一个或多个处理器610以及存储器620,图6中以一个处理器610为例。One or more processors 610 and memory 620, one processor 610 is taken as an example in FIG.

执行直播流的处理方法的设备还可以包括:输入装置630和输出装置640。 The apparatus for performing the processing method of the live stream may further include: an input device 630 and an output device 640.

处理器610、存储器620、输入装置630和输出装置640可以通过总线或者其他方式连接,图6中以通过总线连接为例。The processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, as exemplified by a bus connection in FIG.

存储器620作为一种非暂态性计算机可读存储介质,可用于存储非暂态性软件程序、非暂态性计算机可执行程序以及模块,如本申请实施例中的直播流的处理方法对应的程序指令/模块(例如,附图3所示的直播流播放请求存储模块301、直播流播放请求数量判断模块302、直播流播放请求合并模块303、总直播流播放请求发送模块304和直播流数据处理模块305;和/或,附图4中所示的总直播流播放请求接收模块401、总直播流播放请求分解模块402、直播流数据获取模块403、直播流数据处理模块404)。处理器610通过运行存储在存储器620中的非暂态性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例一和/或实施例二中的直播流的处理方法。The memory 620 is a non-transitory computer readable storage medium, and can be used for storing a non-transitory software program, a non-transitory computer executable program, and a module, as in the processing method of the live stream in the embodiment of the present application. Program instructions/modules (for example, live stream play request storage module 301, live stream play request number judgment module 302, live stream play request merge module 303, total live stream play request sending module 304, and live stream data shown in FIG. The processing module 305; and/or the total live stream play request receiving module 401, the total live stream play request splitting module 402, the live stream data obtaining module 403, and the live stream data processing module 404) shown in FIG. The processor 610 performs various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 620, that is, realizing the live broadcast in the first embodiment and/or the second embodiment. The processing method of the stream.

存储器620可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据直播流的处理装置的使用所创建的数据等。此外,存储器620可以包括高速随机存取存储器,还可以包括非暂态性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态性固态存储器件。在一些实施例中,存储器620可选包括相对于处理器610远程设置的存储器,这些远程存储器可以通过网络连接至直播流的处理装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 620 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the processing device of the live stream, and the like. Moreover, memory 620 can include high speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 620 can optionally include memory remotely located relative to processor 610, which can be connected to the processing device of the live stream over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

输入装置630可接收输入的数字或字符信息,以及产生与直播流的处理处理装置的用户设置以及功能控制有关的键信号输入。输出装置640可包括显示屏等显示设备。The input device 630 can receive the input numeric or character information and generate a key signal input related to user settings and function control of the processing device of the live stream. The output device 640 can include a display device such as a display screen.

所述一个或者多个模块存储在所述存储器620中,当被所述一个或者多个处理器610执行时,执行上述方法实施例一和/或实施例二中的直播流的处理方法。The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, perform a processing method of the live stream in the first embodiment and/or the second embodiment.

上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above products can perform the methods provided by the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present application.

本申请实施例的电子设备以多种形式存在,包括但不限于:The electronic device of the embodiment of the present application exists in various forms, including but not limited to:

(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话 音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication equipment: This type of equipment is characterized by its mobile communication function and Sound and data communication are the main goals. Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.

(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.

(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。(3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.

(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(4) Server: A device that provides computing services. The server consists of a processor, a hard disk, a memory, a system bus, etc. The server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.

(5)其他具有数据交互功能的电子装置。(5) Other electronic devices with data interaction functions.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,存储有计算机可执行指令,所述计算机可执行指令设置为:In a possible implementation, the embodiment of the present application provides an electronic device, where computer executable instructions are stored, and the computer executable instructions are set as:

客户端代理接收客户端发送的携带直播流标识的直播流播放请求并存储;The client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request;

计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;Calculating, by the preset duration, the number of live stream play requests sent by the client, and determining whether the quantity is greater than or equal to two;

若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;If yes, the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request;

将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;Sending the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server;

接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。And receiving the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and sending the data to the client for playing.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合 并直播流中的位置信息;In a possible implementation, the embodiment of the present application provides an electronic device, where the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, and the merged live stream data is And including the header information and the live stream data corresponding to the live stream identifiers, where the header information includes: a live stream identifier of each live stream, and each live stream is in the And live location information in the stream;

接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放,具体包括:And receiving the live stream data corresponding to the live stream identifiers in the total live stream play request sent by the server proxy, and sending the data to the client for playing, specifically:

接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;Receiving the merged live stream, and parsing the merged live stream according to the header information, and obtaining live stream data corresponding to each live stream identifier;

将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。The live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;In a possible implementation, the embodiment of the present application provides an electronic device, where the combined live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, where the header information is further Including: the number of live stream identifiers, and the sequence number of the data packet corresponding to each live stream identifier;

根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据,具体包括:The real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes:

确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers;

若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识,具体包括:In a possible implementation manner, the embodiment of the present application provides an electronic device, where each live stream play request of the client stored in the preset duration is merged into a total live stream play request, and the total live broadcast The stream play request includes the live stream identifier of each live stream play request, and specifically includes:

在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;Inserting a preset live stream identifier separator between two adjacent live stream identifiers to generate total live stream identifier information;

生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。Generating a total live stream play request that carries the total live stream identifier information, so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,计算预设时长内存储的所述客户端发送的直播流播放请求的数量,具体包括:In a possible implementation, the embodiment of the present application provides an electronic device, where the number of the live stream play request sent by the client stored in the preset duration is calculated, which specifically includes:

接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1;并, After receiving the first live stream play request, start timing, and set the number of live stream play requests to 1; and,

在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one.

此外,在一种可能的实施方式中,本申请实施例提供电子设备,其中,服务器代理接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;In addition, in a possible implementation, the embodiment of the present application provides an electronic device, where the server proxy receives a total live stream play request sent by the client agent, where the total live stream play request is sent by at least two by the same client. The live stream play request is merged, and the live stream play request includes a live stream identifier of each live stream play request;

将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;Decomposing the total live stream play request, obtaining a split live stream play request corresponding to each live stream identifier, and sending the request to the stream resource server;

接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;Receiving live stream data returned by the stream resource server for each split live stream play request;

将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,将接收的每个直播流数据发送给所述客户端代理,具体包括:In a possible implementation, the embodiment of the present application provides an electronic device, where sending each received live stream data to the client agent includes:

将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;Combining each received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: each live stream Live stream identifier, location information of each live stream in the merged live stream;

将所述合并直播流数据发送给所述客户端代理。Transmitting the merged live stream data to the client agent.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,所述合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。In a possible implementation, the embodiment of the present application provides an electronic device, where the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, where the header information is The method further includes: a number of live stream identifiers, and a serial number of the data packet corresponding to each live stream identifier.

在一种可能的实施方式中,本申请实施例提供电子设备,其中,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;In a possible implementation, the embodiment of the present application provides an electronic device, where the total live stream play request includes total live stream identifier information, where the total live stream identifier information includes a live stream identifier and is used for setting a preset live stream identifier separator between two adjacent live stream identifiers;

将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,具体包括:Decomposing the total live stream play request, and obtaining a split live stream play request corresponding to each live stream identifier, specifically:

根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。And obtaining, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generating a split live stream play request for each live stream identifier.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说 明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein said as a separate component The elements may or may not be physically separate, and the components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above-described technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as ROM/RAM, magnetic Discs, optical discs, etc., include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.

最后应说明的是:以上实施例仅用以说明本申请实施例的技术方案,而非对其限制;尽管参照前述实施例对本申请实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请实施例各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to explain the technical solutions of the embodiments of the present application, and are not limited thereto; although the embodiments of the present application are described in detail with reference to the foregoing embodiments, those skilled in the art should understand The technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present application. The spirit and scope of the programme.

Claims (39)

一种直播流的处理方法,应用于电子设备,其特征在于,所述方法包括:A method for processing a live stream, which is applied to an electronic device, wherein the method includes: 客户端代理接收客户端发送的携带直播流标识的直播流播放请求并存储;The client agent receives the live stream play request sent by the client and carries the live stream identifier, and stores the request; 计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;Calculating, by the preset duration, the number of live stream play requests sent by the client, and determining whether the quantity is greater than or equal to two; 若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;If yes, the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request; 将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;Sending the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server; 接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。And receiving the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and sending the data to the client for playing. 根据权利要求1所述的方法,其特征在于,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;The method according to claim 1, wherein the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, and the merged live stream data includes header information and live broadcasts. The live stream data corresponding to the stream identifier, where the header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream; 接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放,具体包括:And receiving the live stream data corresponding to the live stream identifiers in the total live stream play request sent by the server proxy, and sending the data to the client for playing, specifically: 接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;Receiving the merged live stream, and parsing the merged live stream according to the header information, and obtaining live stream data corresponding to each live stream identifier; 将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。The live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing. 根据权利要求2所述的方法,其特征在于,合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;The method according to claim 2, wherein the merged live stream is composed of at least two data packets, the location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers. , the serial number of the data packet corresponding to each live stream identifier; 根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据,具体包括: The real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes: 确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers; 若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data. 根据权利要求1所述的方法,其特征在于,将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识,具体包括:The method according to claim 1, wherein each live stream play request of the client stored in the preset duration is merged into a total live stream play request, and the total live stream play request includes each The live stream identifier of the live stream play request, including: 在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;Inserting a preset live stream identifier separator between two adjacent live stream identifiers to generate total live stream identifier information; 生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。Generating a total live stream play request that carries the total live stream identifier information, so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server. 根据权利要求1-4中任一所述的方法,其特征在于,计算预设时长内存储的所述客户端发送的直播流播放请求的数量,具体包括:The method according to any one of claims 1-4, wherein calculating the number of live stream play requests sent by the client stored in the preset duration includes: 接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1;并,After receiving the first live stream play request, start timing, and set the number of live stream play requests to 1; and, 在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one. 一种直播流的处理方法,其特征在于,所述方法包括:A method for processing a live stream, the method comprising: 服务器代理接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;The server agent receives a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes each live stream. Play the requested live stream identifier; 将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;Decomposing the total live stream play request, obtaining a split live stream play request corresponding to each live stream identifier, and sending the request to the stream resource server; 接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;Receiving live stream data returned by the stream resource server for each split live stream play request; 将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback. 根据权利要求6所述的方法,其特征在于,将接收的每个直播流数据发送给所述客户端代理,具体包括:The method according to claim 6, wherein the sending the received live stream data to the client agent comprises: 将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直 播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;Combining each received live stream data to generate combined live stream data, the merged straight The broadcast data includes the header information and the live stream data corresponding to the live stream identifiers. The header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream. ; 将所述合并直播流数据发送给所述客户端代理。Transmitting the merged live stream data to the client agent. 根据权利要求7所述的方法,其特征在于,所述合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。The method according to claim 7, wherein the merged live stream is composed of at least two data packets, the location information is location information corresponding to each data packet, and the header information further includes: a live stream Number of identifiers, the number of the packet corresponding to each live stream identifier. 根据权利要求6-8中任一所述的方法,其特征在于,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;The method according to any one of claims 6-8, wherein the total live stream play request includes total live stream identifier information, and the total live stream identifier information includes a live stream identifier and is used for setting a preset live stream identifier separator between two adjacent live stream identifiers; 将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,具体包括:Decomposing the total live stream play request, and obtaining a split live stream play request corresponding to each live stream identifier, specifically: 根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。And obtaining, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generating a split live stream play request for each live stream identifier. 一种非暂态性计算机存储介质,其特征在于,存储有计算机可执行指令,所述计算机可执行指令设置为:A non-transitory computer storage medium characterized by storing computer executable instructions, the computer executable instructions being set to: 接收客户端发送的携带直播流标识的直播流播放请求并存储;Receiving a live stream play request sent by the client and carrying the live stream identifier, and storing the request; 计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;Calculating, by the preset duration, the number of live stream play requests sent by the client, and determining whether the quantity is greater than or equal to two; 若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;If yes, the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request; 将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;Sending the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server; 接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。And receiving the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and sending the data to the client for playing. 根据权利要求10所述的非暂态性计算机存储介质,其特征在于,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在 所述合并直播流中的位置信息;The non-transitory computer storage medium according to claim 10, wherein the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, and the merged live stream data is The live stream data corresponding to the header information and the live stream identifiers are included, where the header information includes: a live stream identifier of each live stream, and each live stream is in the Combining the location information in the live stream; 接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放,具体包括:And receiving the live stream data corresponding to the live stream identifiers in the total live stream play request sent by the server proxy, and sending the data to the client for playing, specifically: 接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;Receiving the merged live stream, and parsing the merged live stream according to the header information, and obtaining live stream data corresponding to each live stream identifier; 将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。The live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing. 根据权利要求11所述的非暂态性计算机存储介质,其特征在于,合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;The non-transitory computer storage medium according to claim 11, wherein the merged live stream is composed of at least two data packets, the location information is location information corresponding to each data packet, and the header information is further Including: the number of live stream identifiers, and the sequence number of the data packet corresponding to each live stream identifier; 根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据,具体包括:The real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes: 确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers; 若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data. 根据权利要求10所述的非暂态性计算机存储介质,其特征在于,将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识,具体包括:The non-transitory computer storage medium according to claim 10, wherein each live stream play request of the client stored in the preset duration is merged into a total live stream play request, and the total live broadcast The stream play request includes the live stream identifier of each live stream play request, and specifically includes: 在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;Inserting a preset live stream identifier separator between two adjacent live stream identifiers to generate total live stream identifier information; 生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。Generating a total live stream play request that carries the total live stream identifier information, so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server. 根据权利要求10-13中任一所述的非暂态性计算机存储介质,其特征在于,计算预设时长内存储的所述客户端发送的直播流播放请求的数量,具体包括:The non-transitory computer storage medium according to any one of claims 10-13, wherein the calculating the number of the live stream play request sent by the client stored in the preset duration includes: 接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的 数量为1;并,Start timing after receiving the first live stream play request, and set the live stream play request The number is 1; and, 在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one. 一种电子设备,其特征在于,包括:An electronic device, comprising: 至少一个处理器;以及,At least one processor; and, 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: 接收客户端发送的携带直播流标识的直播流播放请求并存储;Receiving a live stream play request sent by the client and carrying the live stream identifier, and storing the request; 计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;Calculating, by the preset duration, the number of live stream play requests sent by the client, and determining whether the quantity is greater than or equal to two; 若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;If yes, the live broadcast stream play request of the client stored in the preset duration is merged into a total live stream play request, where the total live stream play request includes a live stream identifier of each live stream play request; 将所述总直播流播放请求发送给流资源服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;Sending the total live stream play request to the server agent of the stream resource server, so that the service agent obtains the live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server; 接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。And receiving the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and sending the data to the client for playing. 根据权利要求15所述的电子设备,其特征在于,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;The electronic device according to claim 15, wherein the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, and the merged live stream data includes header information and each The live stream identifier corresponds to the live stream data, where the header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream; 接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放,具体包括:And receiving the live stream data corresponding to the live stream identifiers in the total live stream play request sent by the server proxy, and sending the data to the client for playing, specifically: 接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;Receiving the merged live stream, and parsing the merged live stream according to the header information, and obtaining live stream data corresponding to each live stream identifier; 将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。The live stream data corresponding to each live stream identifier obtained after parsing is sent to the client for playing. 根据权利要求16所述的电子设备,其特征在于,合并直播流由至 少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;The electronic device according to claim 16, wherein the merged live stream is The second location is composed of two data packets, where the location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers, and a data packet sequence number corresponding to each live stream identifier; 根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据,具体包括:The real-time stream data corresponding to each live stream identifier is obtained by parsing the merged live stream according to the header information, and specifically includes: 确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers; 若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data. 根据权利要求15所述的电子设备,其特征在于,将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识,具体包括:The electronic device according to claim 15, wherein each live stream play request of the client stored in the preset duration is merged into a total live stream play request, and the total live stream play request is included The live stream identifier of each live stream play request, including: 在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;Inserting a preset live stream identifier separator between two adjacent live stream identifiers to generate total live stream identifier information; 生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。Generating a total live stream play request that carries the total live stream identifier information, so that the server proxy performs the following operations: acquiring each live stream identifier from the total live stream request according to the preset live stream identifier splitter And generating a decomposed live stream play request for each live stream identifier to send to the stream resource server. 根据权利要求15-18中任一所述的电子设备,其特征在于,计算预设时长内存储的所述客户端发送的直播流播放请求的数量,具体包括:The electronic device according to any one of claims 15 to 18, wherein the calculating the number of live stream play requests sent by the client stored in the preset duration includes: 接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1;并,After receiving the first live stream play request, start timing, and set the number of live stream play requests to 1; and, 在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。After receiving a live stream play request sent by the client within a preset duration after the start of the timer, the number of the live stream play request is incremented by one. 一种非暂态性计算机存储介质,其特征在于,存储有计算机可执行指令,所述计算机可执行指令设置为:A non-transitory computer storage medium characterized by storing computer executable instructions, the computer executable instructions being set to: 接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;Receiving a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes each live stream play request Live stream identification; 将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;Decomposing the total live stream play request, obtaining a split live stream play request corresponding to each live stream identifier, and sending the request to the stream resource server; 接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据; Receiving live stream data returned by the stream resource server for each split live stream play request; 将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback. 根据权利要求20所述的非暂态性计算机存储介质,其特征在于,将接收的每个直播流数据发送给所述客户端代理,具体包括:The non-transitory computer storage medium according to claim 20, wherein the sending the received live stream data to the client agent comprises: 将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;Combining each received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: each live stream Live stream identifier, location information of each live stream in the merged live stream; 将所述合并直播流数据发送给所述客户端代理。Transmitting the merged live stream data to the client agent. 根据权利要求21所述的非暂态性计算机存储介质,其特征在于,所述合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。The non-transitory computer storage medium according to claim 21, wherein the merged live stream is composed of at least two data packets, and the location information is location information corresponding to each data packet, the header information. The method further includes: a number of live stream identifiers, and a serial number of the data packet corresponding to each live stream identifier. 根据权利要求20-22中任一所述的非暂态性计算机存储介质,其特征在于,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;The non-transitory computer storage medium according to any one of claims 20 to 22, wherein the total live stream playback request includes total live stream identification information, and the total live stream identification information includes a live stream. The identifier and the preset live stream identifier separator used to set the identifier between the two adjacent live stream identifiers; 将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,具体包括:Decomposing the total live stream play request, and obtaining a split live stream play request corresponding to each live stream identifier, specifically: 根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。And obtaining, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generating a split live stream play request for each live stream identifier. 一种电子设备,其特征在于,包括:An electronic device, comprising: 至少一个处理器;以及,At least one processor; and, 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: 接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;Receiving a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes each live stream play request Live stream identification; 将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器; Decomposing the total live stream play request, obtaining a split live stream play request corresponding to each live stream identifier, and sending the request to the stream resource server; 接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;Receiving live stream data returned by the stream resource server for each split live stream play request; 将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。Each received live stream data is sent to the client agent to cause the client agent to send each live stream data to the client for playback. 根据权利要求24所述的电子设备,其特征在于,将接收的每个直播流数据发送给所述客户端代理,具体包括:The electronic device according to claim 24, wherein the sending the received live stream data to the client agent comprises: 将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;Combining each received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; wherein the header information includes: each live stream Live stream identifier, location information of each live stream in the merged live stream; 将所述合并直播流数据发送给所述客户端代理。Transmitting the merged live stream data to the client agent. 根据权利要求25所述的电子设备,其特征在于,所述合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。The electronic device according to claim 25, wherein the merged live stream is composed of at least two data packets, the location information is location information corresponding to each data packet, and the header information further includes: a live broadcast. Number of stream identifiers, the number of packets corresponding to each live stream identifier. 根据权利要求24-26中任一所述的电子设备,其特征在于,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符;The electronic device according to any one of claims 24 to 26, wherein the total live stream play request includes total live stream identifier information, and the total live stream identifier information includes a live stream identifier and is used for setting a preset live stream identifier separator between two adjacent live stream identifiers; 将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,具体包括:Decomposing the total live stream play request, and obtaining a split live stream play request corresponding to each live stream identifier, specifically: 根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。And obtaining, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generating a split live stream play request for each live stream identifier. 一种直播流的处理装置,其特征在于,所述装置包括:A processing device for a live stream, characterized in that the device comprises: 直播流播放请求存储模块,用于接收客户端发送的携带直播流标识的直播流播放请求并存储;The live stream play request storage module is configured to receive a live stream play request that is sent by the client and carry the live stream identifier, and store the request; 直播流播放请求数量判断模块,用于计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;The live stream play request quantity determining module is configured to calculate the number of live stream play requests sent by the client stored in the preset duration, and determine whether the quantity is greater than or equal to two; 直播流播放请求合并模块,用于若直播流播放请求数量判断模块的判断结果为是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;The live stream play request merge module is configured to merge the live stream play requests of the client stored in the preset duration into one total live stream play request if the result of the live stream play request quantity determining module is yes The total live stream play request includes a live stream identifier of each live stream play request; 总直播流播放请求发送模块,将所述总直播流播放请求发送给流资源 服务器的服务器代理,以使所述服务代理从所述流资源服务器中获取所述总直播流播放请求中的各直播流标识对应的直播流数据;The total live stream play request sending module sends the total live stream play request to the stream resource a server proxy of the server, so that the service proxy obtains live stream data corresponding to each live stream identifier in the total live stream play request from the stream resource server; 直播流数据处理模块,用于接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放。The live stream data processing module is configured to receive the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server proxy, and send the data to the client for playing. 根据权利要求28所述的装置,其特征在于,所述总直播流播放请求中的各直播流标识对应的直播流数据为合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;The device according to claim 28, wherein the live stream data corresponding to each live stream identifier in the total live stream play request is merged live stream data, and the merged live stream data includes header information and each live stream. The live stream data corresponding to the stream identifier, where the header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream; 直播流数据处理模块,具体包括:The live stream data processing module specifically includes: 合并直播流解析单元,用于接收所述合并直播流,并根据所述头信息解析所述合并直播流,获得每个直播流标识对应的直播流数据;a merged live stream parsing unit, configured to receive the merged live stream, and parse the merged live stream according to the header information, to obtain live stream data corresponding to each live stream identifier; 直播流数据发送单元,用于将解析后获得的每个直播流标识对应的直播流数据发送所述客户端播放。The live stream data sending unit is configured to send the live stream data corresponding to each live stream identifier obtained after parsing to the client for playing. 根据权利要求29所述的装置,其特征在于,合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号;The device according to claim 29, wherein the merged live stream is composed of at least two data packets, the location information is location information corresponding to each data packet, and the header information further includes: a number of live stream identifiers. , the serial number of the data packet corresponding to each live stream identifier; 合并直播流解析单元,具体用于:The live broadcast stream parsing unit is specifically configured to: 确认头信息中的直播流标识数量与直播流标识的总数是否相同;Confirm whether the number of live stream identifiers in the header information is the same as the total number of live stream identifiers; 若相同,针对每个直播流标识,根据该直播流标识对应的位置信息得到该直播流标识对应的各数据包;并根据数据包序号,对得到的各数据包进行排序生成直播流数据。If the information is the same, the data packet corresponding to the live stream identifier is obtained according to the location information corresponding to the live stream identifier for each live stream identifier; and the obtained data packets are sorted according to the data packet sequence number to generate live stream data. 根据权利要求28所述的装置,其特征在于,直播流播放请求合并模块,具体包括:The apparatus according to claim 28, wherein the live stream play request merge module comprises: 分割符插入单元,用于在相邻两直播流标识之间插入一个预设直播流标识分割符,生成总直播流标识信息;a splitter insertion unit, configured to insert a preset live stream identifier separator between the adjacent two live stream identifiers to generate total live stream identifier information; 总直播流播放请求处理单元,用于生成携带所述总直播流标识信息的总直播流播放请求,以使所述服务器代理执行以下操作:根据所述预设直播流标识分割符从所述总直播流请求中获取每个直播流标识,生成针对每个直播流标识的分解后直播流播放请求发送给流资源服务器。a total live stream play request processing unit, configured to generate a total live stream play request carrying the total live stream identifier information, so that the server agent performs the following operations: according to the preset live stream identifier, the splitter is from the total Each live stream identifier is obtained in the live stream request, and the generated live stream play request for each live stream identifier is generated and sent to the stream resource server. 根据权利要求28-31所述的装置,其特征在于,直播流播放请求 数量判断模块,具体包括:Apparatus according to claims 28-31, characterized in that the live stream play request The quantity judgment module specifically includes: 计时单元,用于接收到第一个直播流播放请求后开始计时,并设置直播流播放请求的数量为1;a timing unit, configured to start timing after receiving the first live stream play request, and set the number of live stream play requests to 1; 计算单元,用于在开始计时后的预设时长内每接收到一个所述客户端发送的直播流播放请求后,将所述直播流播放请求的数量累加1。The calculating unit is configured to accumulate the number of the live stream play request by one after receiving a live stream play request sent by the client within a preset duration after the start of the timer. 一种直播流的处理装置,其特征在于,所述装还在包括:A processing device for a live stream, characterized in that the device further comprises: 总直播流播放请求接收模块,用于接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;The total live stream play request receiving module is configured to receive a total live stream play request sent by the client agent, where the total live stream play request is formed by combining at least two live stream play requests sent by the same client, and the live broadcast The stream play request includes a live stream identifier of each live stream play request; 总直播流播放请求分解模块,用于将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;a total live stream play request splitting module, configured to decompose the total live stream play request, obtain a decomposed live stream play request corresponding to each live stream identifier, and send the request to the stream resource server; 直播流数据获取模块,用于接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;a live stream data obtaining module, configured to receive live stream data returned by the stream resource server for each split live stream play request; 直播流数据处理模块,用于将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放。The live stream data processing module is configured to send each received live stream data to the client agent, so that the client agent sends each live stream data to the client for playing. 根据权利要求33所述的装置,其特征在于,直播流数据处理模块,具体包括:The device according to claim 33, wherein the live stream data processing module comprises: 合并直播流数据生成单元,用于将接收的每个直播流数据进行合并生成合并直播流数据,所述合并直播流数据中包括头信息和各直播流标识对应的直播流数据;其中,所述头信息中包括:每个直播流的直播流标识、每个直播流在所述合并直播流中的位置信息;a merged live stream data generating unit, configured to combine the received live stream data to generate merged live stream data, where the merged live stream data includes header information and live stream data corresponding to each live stream identifier; The header information includes: a live stream identifier of each live stream, and location information of each live stream in the merged live stream; 合并直播流数据生成单元发送单元,用于将所述合并直播流数据发送给所述客户端代理。And a combined live stream data generating unit sending unit, configured to send the merged live stream data to the client agent. 根据权利要求34所述的装置,其特征在于,所述合并直播流由至少两个数据包组成,所述位置信息为每个数据包对应的位置信息,所述头信息中还包括:直播流标识数量,每个直播流标识对应的数据包序号。The device according to claim 34, wherein the merged live stream is composed of at least two data packets, the location information is location information corresponding to each data packet, and the header information further includes: a live stream Number of identifiers, the number of the packet corresponding to each live stream identifier. 根据权利要求33-35所述的装置,其特征在于,所述总直播流播放请求中包括总直播流标识信息,所述总直播流标识信息中包括直播流标识和用于设置在相邻两直播流标识之间的预设直播流标识分割符; The device according to any one of claims 33 to 35, wherein the total live stream play request includes total live stream identifier information, and the total live stream identifier information includes a live stream identifier and is used for setting in two adjacent streams. a preset live stream identifier separator between live stream identifiers; 总直播流播放请求分解模块,具体用于:根据所述预设直播流标识分割符,从所述总直播流请求中获取每个直播流标识,并生成针对每个直播流标识的分解后直播流播放请求。The total live stream play request splitting module is configured to: obtain, according to the preset live stream identifier, a live stream identifier from the total live stream request, and generate a split live broadcast for each live stream identifier Stream play request. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-5所述的方法。A computer program product, comprising: a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer performs the method of claims 1-5. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求6-9所述的方法。A computer program product, comprising: a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer performs the method of claims 6-9. 一种直播流请求的处理系统,其特征在于,所述系统包括:A processing system for a live stream request, wherein the system comprises: 客户端,用于发送携带直播流标识的直播流请求给客户端代理,并接收客户端代理发送的直播流数据播放;The client is configured to send a live stream request carrying the live stream identifier to the client proxy, and receive the live stream data broadcast sent by the client proxy; 客户端代理,用于接收客户端发送的携带直播流标识的直播流播放请求并存储;计算预设时长内存储的所述客户端发送的直播流播放请求的数量,并判断该数量是否大于或等于二;若是,则将所述预设时长内存储的所述客户端的各直播流播放请求合并成一个总直播流播放请求,所述总直播流播放请求中包括各直播流播放请求的直播流标识;将所述总直播流播放请求发送给流资源服务器的服务器代理;接收所述服务器代理发送的所述总直播流播放请求中的各直播流标识对应的直播流数据,并发送给所述客户端播放;The client agent is configured to receive a live stream play request that is sent by the client and carry the live stream play request, and store the request, and calculate the number of the live stream play request sent by the client stored in the preset duration, and determine whether the quantity is greater than or Equivalent to two; if yes, combining the live stream play requests of the client stored in the preset duration into one total live stream play request, where the total live stream play request includes a live stream of each live stream play request And the server agent that sends the total live stream play request to the stream resource server, and receives the live stream data corresponding to each live stream identifier in the total live stream play request sent by the server agent, and sends the data to the Client playback; 服务器代理,用于接收客户端代理发送的总直播流播放请求,所述总直播流播放请求由同一客户端发送的至少两个直播流播放请求合并而成,且所述直播流播放请求中包括各直播流播放请求的直播流标识;将所述总直播流播放请求进行分解,获得与每个直播流标识对应的分解后直播流播放请求,并发送给流资源服务器;接收流资源服务器针对每个分解后直播流播放请求返回的直播流数据;将接收的每个直播流数据发送给所述客户端代理,以使所述客户端代理将每个直播流数据发送给所述客户端播放;a server agent, configured to receive a total live stream play request sent by the client agent, where the total live stream play request is merged by at least two live stream play requests sent by the same client, and the live stream play request includes The live stream identifier of each live stream play request; the total live stream play request is decomposed, and the split live stream play request corresponding to each live stream identifier is obtained and sent to the stream resource server; and the stream resource server is received for each After the decomposition, the live stream is played back to the live stream data of the request; the received live stream data is sent to the client agent, so that the client agent sends each live stream data to the client to play; 流资源服务器,用于接收服务器代理发送的分解后直播流播放请求,并返回相应的直播流数据。 The stream resource server is configured to receive the decomposed live stream play request sent by the server proxy, and return the corresponding live stream data.
PCT/CN2016/100412 2016-04-20 2016-09-27 Live broadcast streaming processing method, apparatus, electronic device and system Ceased WO2017181601A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610248833.9 2016-04-20
CN201610248833.9A CN105847386A (en) 2016-04-20 2016-04-20 Live broadcasting stream processing method, device and system

Publications (1)

Publication Number Publication Date
WO2017181601A1 true WO2017181601A1 (en) 2017-10-26

Family

ID=56589723

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100412 Ceased WO2017181601A1 (en) 2016-04-20 2016-09-27 Live broadcast streaming processing method, apparatus, electronic device and system

Country Status (2)

Country Link
CN (1) CN105847386A (en)
WO (1) WO2017181601A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112752123A (en) * 2020-12-28 2021-05-04 上海哔哩哔哩科技有限公司 Network quality evaluation method and device
CN114760357A (en) * 2022-03-23 2022-07-15 北京字节跳动网络技术有限公司 Request processing method and device, computer equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847386A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 Live broadcasting stream processing method, device and system
CN105933728A (en) * 2016-04-20 2016-09-07 乐视控股(北京)有限公司 Playing request method, device, and system
CN109525568B (en) * 2018-11-02 2021-02-12 广州酷狗计算机科技有限公司 Song on-demand method and device
CN110351569B (en) * 2019-06-25 2021-02-02 腾讯科技(深圳)有限公司 Live content processing method, device, equipment and medium
CN113364637A (en) * 2021-08-09 2021-09-07 中建电子商务有限责任公司 Network communication optimization method and system based on batch packing scheduling
CN114466201B (en) * 2022-02-21 2024-03-19 上海哔哩哔哩科技有限公司 Live stream processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008018866A1 (en) * 2006-08-09 2008-02-14 Pulse Communications, Llc Interactive television system and method
CN102904918A (en) * 2011-07-28 2013-01-30 腾讯科技(北京)有限公司 Method and system for processing display of network media information
US20130297817A1 (en) * 2011-01-19 2013-11-07 Electronics And Telecommunications Research Institute Method and apparatus for transmitting media content via a single port or multiple ports
CN105847386A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 Live broadcasting stream processing method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008018866A1 (en) * 2006-08-09 2008-02-14 Pulse Communications, Llc Interactive television system and method
US20130297817A1 (en) * 2011-01-19 2013-11-07 Electronics And Telecommunications Research Institute Method and apparatus for transmitting media content via a single port or multiple ports
CN102904918A (en) * 2011-07-28 2013-01-30 腾讯科技(北京)有限公司 Method and system for processing display of network media information
CN105847386A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 Live broadcasting stream processing method, device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112752123A (en) * 2020-12-28 2021-05-04 上海哔哩哔哩科技有限公司 Network quality evaluation method and device
CN112752123B (en) * 2020-12-28 2022-03-25 上海哔哩哔哩科技有限公司 Network quality evaluation method and device
CN114760357A (en) * 2022-03-23 2022-07-15 北京字节跳动网络技术有限公司 Request processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN105847386A (en) 2016-08-10

Similar Documents

Publication Publication Date Title
WO2017181601A1 (en) Live broadcast streaming processing method, apparatus, electronic device and system
US9467650B2 (en) Method and apparatus for transmitting media stream in video conference
US9686329B2 (en) Method and apparatus for displaying webcast rooms
CN111836074B (en) Live wheat-connecting method and device, electronic equipment and storage medium
CN111050185B (en) Live broadcast room wheat-connected video mixing method, storage medium, electronic equipment and system
CN107911361B (en) Voice management method and device supporting multiple sessions, terminal equipment and storage medium
WO2014183427A1 (en) Method and apparatus for displaying webcast rooms
US11563992B2 (en) Video playback quality detection method and apparatus
CN108452525B (en) Method and system for monitoring chat information in game
WO2013044705A1 (en) Online video playing method and video playing server
CN111294664A (en) Audio and video data transmission method, electronic equipment and storage medium
CN106488270B (en) Live broadcast room switching method and device
US11540028B2 (en) Information presenting method, terminal device, server and system
WO2021012665A1 (en) Interactive audio and video playing method and apparatus
US20170171585A1 (en) Method and Electronic Device for Recording Live Streaming Media
US20240022614A1 (en) Information interaction method and apparatus
WO2017181602A1 (en) On-demand playback method, device, electronic equipment and system
WO2025092375A1 (en) Interaction data processing method and apparatus
CN110418176B (en) Barrage information processing method and device, server and storage medium
WO2017185618A1 (en) Method and device for implementing civilian commentary
CN117319696A (en) Live video playing control method and device
CN108076381B (en) Video display method, video forwarding equipment and system
CN118803312A (en) Video playback method, system and electronic device
CN115767123B (en) Cloud game live broadcasting method, device, computing equipment and computer storage medium
CN114615512A (en) Game event live broadcasting system and game event live broadcasting method

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16899186

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16899186

Country of ref document: EP

Kind code of ref document: A1