CN114466201A - Live stream processing method and device - Google Patents

Live stream processing method and device Download PDF

Info

Publication number
CN114466201A
CN114466201A CN202210158777.5A CN202210158777A CN114466201A CN 114466201 A CN114466201 A CN 114466201A CN 202210158777 A CN202210158777 A CN 202210158777A CN 114466201 A CN114466201 A CN 114466201A
Authority
CN
China
Prior art keywords
stream
live
recorded
target
broadcast
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.)
Granted
Application number
CN202210158777.5A
Other languages
Chinese (zh)
Other versions
CN114466201B (en
Inventor
孙袁袁
孟令强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202210158777.5A priority Critical patent/CN114466201B/en
Publication of CN114466201A publication Critical patent/CN114466201A/en
Application granted granted Critical
Publication of CN114466201B publication Critical patent/CN114466201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server
    • 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/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving MPEG packets from an IP network
    • 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/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Abstract

The application provides a live stream processing method and a live stream processing device, wherein the live stream processing method comprises the following steps: receiving a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; and generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server.

Description

Live stream processing method and device
Technical Field
The application relates to the technical field of internet, in particular to a live stream processing method. The application also relates to a live stream processing device, a live stream processing system, a computing device and a computer readable storage medium.
Background
With the continuous development of the live broadcast technology, more and more users can watch live broadcast through different platforms, and some users who do not watch the live broadcast can watch live broadcast playback through the live broadcast platform; for example, when a large-scale game is watched, a game producer can store live broadcast content to the local in real time during live broadcast, and after the live broadcast of the game is finished, local recorded broadcast files can be used as input sources to be pushed to a live broadcast room.
However, the above method needs to rely on highly configured devices to record live broadcasts, and the recording needs to consume a large amount of memory, and the devices of ordinary live broadcasts and anchor broadcasters cannot support and can not realize stream pushing; in addition, the anchor can download the live files recorded by the live platform, but when the live files are large, the time for downloading the live files is long, and a user watching the live room after the downloading may leave the live room already.
Therefore, how to implement seamless switching display of live content and recorded content in a live broadcast room becomes a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of this, the present application provides a live stream processing method. The application also relates to a live stream processing device, a live stream processing system, a computing device and a computer readable storage medium, which are used for solving the problems that the replay of recorded and broadcast files in the prior art needs to consume more time and the watching experience of a user is influenced.
According to a first aspect of the embodiments of the present application, a live stream processing method is provided, which is applied to a push stream server, and includes:
receiving a recorded broadcast stream pushing request, wherein the recorded broadcast stream pushing request comprises a client identifier and a recorded file identifier;
acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream;
and determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client.
According to a second aspect of the embodiments of the present application, there is provided a live stream processing method applied to a platform server, including:
receiving a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier;
determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier;
and generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server.
According to a third aspect of the embodiments of the present application, a live stream processing method is provided, which is applied to a target client, and includes:
receiving a live broadcast request, wherein the live broadcast request comprises a live broadcast room identifier;
determining a target live broadcast room based on the live broadcast room identification, and acquiring a live broadcast stream and a recorded broadcast stream of the target live broadcast room;
and displaying the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
According to a fourth aspect of the embodiments of the present application, there is provided a live stream processing apparatus, applied to a push stream server, including:
the device comprises a streaming request receiving module, a streaming request receiving module and a streaming server, wherein the streaming request receiving module is configured to receive a recorded streaming request, and the recorded streaming request comprises a client identifier and a recorded file identifier;
the generating module is configured to acquire a target recording file based on the recording file identifier and generate a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream;
and the stream pushing module is configured to determine a target client according to the client identifier and push the recorded broadcast stream to the target client.
According to a fifth aspect of the embodiments of the present application, there is provided a live stream processing apparatus, applied to a platform server, including:
the playback request receiving module is configured to receive a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier;
the determining module is configured to determine a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier;
and the sending module is configured to generate a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and send the recorded broadcast stream pushing request to a pushing server.
According to a sixth aspect of the embodiments of the present application, there is provided a live stream processing apparatus, applied to a target client, including:
the system comprises a playing request receiving module, a live broadcasting receiving module and a live broadcasting receiving module, wherein the live broadcasting request comprises a live broadcasting room identifier;
the acquisition module is configured to determine a target live broadcast room based on the live broadcast room identification and acquire a live broadcast stream and a recorded broadcast stream of the target live broadcast room;
and the display module is configured to display the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
According to a seventh aspect of the embodiments of the present application, a live stream processing system is provided, including an anchor client, a push stream server, a platform server, and a target client, where:
the platform server is configured to receive a recorded broadcast playback request sent by the anchor client, wherein the recorded broadcast playback request comprises a live broadcast room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; generating a recorded broadcast stream pushing request according to the recording file identification and the client identification, and sending the recorded broadcast stream pushing request to the pushing server;
the streaming server is configured to receive a recorded broadcast streaming request, wherein the recorded broadcast streaming request comprises a client identifier and a recorded file identifier; acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream; determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client;
the target client is configured to display the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
According to an eighth aspect of embodiments of the present application, there is provided a computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the live stream processing method when executing the computer instructions.
According to a ninth aspect of embodiments of the present application, there is provided a computer-readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the live stream processing method.
The live stream processing method receives a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; and generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server.
According to the embodiment of the application, the recorded broadcast playback request is received, and the recorded file identifier and the client identifier are determined based on the recorded broadcast playback request, so that the recorded broadcast stream plug flow request is generated based on the recorded file identifier and the client identifier; the stream pushing server can acquire the recorded broadcast file of the recorded broadcast stream and determine which clients the recorded broadcast stream is pushed to according to the recorded broadcast stream pushing request carrying the recorded file identifier and the client identifier, so that the generation and display efficiency of the subsequent recorded broadcast stream is improved, the time consumed by the playback of the recorded file is reduced, the seamless display of the live broadcast stream and the recorded broadcast stream at the clients is facilitated, and the display efficiency of the recorded broadcast stream and the watching experience of a user are improved.
Drawings
Fig. 1 is a flowchart of a live stream processing method according to a first embodiment of the present application;
fig. 2 is a flowchart of a live stream processing method according to a second embodiment of the present application;
fig. 3 is a flowchart of a live stream processing method according to a third embodiment of the present application;
fig. 4 is a processing flowchart of a live stream processing method applied to a live broadcast room G according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a live broadcast processing system according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a live stream processing apparatus according to a first embodiment of the present application;
fig. 7 is a schematic structural diagram of a live stream processing apparatus according to a second embodiment of the present application;
fig. 8 is a schematic structural diagram of a live stream processing apparatus according to a third embodiment of the present application;
fig. 9 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application is intended to encompass any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present application relate are explained.
Live streaming: the transmission of live audio-video data can be transmitted as a stable and continuous stream over a network to viewers for viewing.
Live broadcasting and stream pulling: the live streaming refers to a process of pulling the live streaming from a source station specified by a user through a live streaming cloud platform.
A broadcasting guide platform: a director switching station is a device for combining multiple television signal clips. When the video is produced on site, the video signals of a plurality of cameras are all sent to the site, and the video signals are edited instantly. And a plurality of input sources and one output are realized, and the output can be seamlessly switched at the operating console.
In the existing live broadcasting system, for a large-scale event, after the event is finished, because part of users do not have time to watch the live broadcasting, a producer of the large-scale event often stores the real-time content to the local during the live broadcasting, after the activity is finished, through professional equipment such as a broadcasting guide table, after the real-time stream is finished, the seamless switching is immediately carried out, and a local recorded and broadcast file is taken as an input source and is pushed to a live broadcasting room.
For ordinary live broadcasting, when a live event is finished, if a user wants to play the content that is just live in a live form, there are two general methods: 1. and live broadcasting and recording are carried out during live broadcasting, and after the live broadcasting is finished, the recorded file is taken as an input source and pushed to a live broadcasting room. 2. And waiting for the live broadcast platform to output the recorded and broadcast file list. Generally, each live broadcast platform needs to record live broadcast content of each main broadcast, and after the live broadcast is finished, recorded broadcast files can be inquired, and then the files are downloaded to the local for streaming.
However, the above-mentioned process has the following problems:
1. for a large-scale competition party, professional equipment is used for supporting and switching recorded and broadcast files and real-time stream input, but for a common main broadcast, the large-scale equipment is expensive and has higher cost.
2. The anchor broadcasts live and records, the performance requirement and the memory requirement on computer equipment are higher, and the recording of a mobile terminal cannot be supported; if the device performance is poor, the push streaming is easy to be blocked, and the live broadcasting experience is influenced. The live broadcast with longer time can cause larger memory consumption, and has higher requirement on the storage of the computer; due to the limitation of the equipment, live broadcasting of the mobile terminal only supports real-time live broadcasting, and push stream files cannot be selected.
3. The anchor acquires the recording file list from the live broadcast platform, the speed is too slow, the time of black screen pictures in a live broadcast room is long, and the user is easy to lose. The recorded files of the live broadcast platform are generally used for auditing or subsequent viewing, and are not required for timeliness. The file is recorded in 30 minutes in the normal file recording segment time, and after the live broadcast is finished at a certain time point, the file is uploaded to the live broadcast platform only after the last 30 minutes of the recorded segment content is finished, so that the time is long. When the live broadcast platform can inquire the recorded broadcast files, the anchor downloads each fragment to a local computer, and the recorded broadcast files are ready due to the network limitation of the anchor, and when the recorded broadcast files are displayed as an input source again, a long time is passed, and at the moment, the user leaves the live broadcast room.
According to the live stream processing method, the recording time of the segments for recording live content is shortened, the information state of the live stream is dynamically detected, the recorded and broadcast stream is automatically shielded, the retry strategy of the player is matched, the requirement of playback of the common anchor live stream is met, and the time consumed by replay of the recorded and broadcast file is reduced.
In the present application, a live stream processing method is provided, and the present application relates to a live stream processing apparatus, a live stream processing system, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 1 shows a flowchart of a live stream processing method according to a first embodiment of the present application, which is applied to a platform server, and specifically includes the following steps:
step 102: and receiving a recorded broadcast playback request. Wherein, the recording and playing playback request comprises a live broadcast room identifier.
Specifically, the recording and playing playback request refers to a request for displaying a recording file corresponding to the live content in the target live broadcasting room, that is, a request for playing live playback in the target live broadcasting room; the recording and playing playback request comprises a live broadcast room identifier, so that a recording file corresponding to a target live broadcast room can be determined based on the live broadcast room identifier in the following process.
In practical application, a recorded broadcast playback button can be set at an anchor client, and after the anchor clicks the recorded broadcast playback button, a platform server receives a recorded broadcast playback request, for example, an anchor A broadcasts in a live broadcast room S, and the anchor A can click the recorded broadcast playback button in the live broadcast process; after the recorded broadcast playback button is clicked, if the anchor A stops live broadcast in the live broadcast room S and the live broadcast room S is not closed, namely the client player can not pull the live broadcast stream, the player pulls the recorded broadcast stream corresponding to the live broadcast room S.
Further, before receiving the recorded playback request, the method further comprises:
receiving a live broadcast recording request, wherein the live broadcast recording request comprises a live broadcast room identifier;
determining a target live broadcast room based on the live broadcast room identification, and acquiring a live broadcast stream of the target live broadcast room;
under the condition that the recording time period of the target live broadcast is less than or equal to a preset recording time period, recording the live broadcast stream based on the recording time period to obtain at least one recording file;
and under the condition that the recording time period of the target live broadcast is greater than a preset recording time period, recording the live broadcast stream based on the preset recording time period to obtain at least one recording file.
Specifically, before receiving a recording and playing playback request, the platform server receives a live broadcast recording request, namely a request for recording live broadcast content of a target live broadcast room; the live broadcast recording request comprises a live broadcast room identifier, and live broadcast contents in which live broadcast room can be recorded can be determined based on the live broadcast room identifier; after determining that live broadcast recording is performed on a target live broadcast room, determining a recording time period and a preset time period of the target live broadcast room, wherein the recording time period is a time period for recording a video of the target live broadcast room, for example, recording the content of the target live broadcast room into a recording file every 5 minutes, the preset time period is a preset time period, when the recording time period exceeds the preset time period, recording the content of the target live broadcast room in the preset time period, and when the recording time period is less than or equal to the preset time period, recording the content of the target live broadcast room in the recording time period, so that a recording file with a smaller file size is obtained, and the recording file can be efficiently downloaded and recorded in a subsequent time.
The platform server stores the generated recording file, and downloads the recording file when the streaming server generates a recording and broadcasting stream; because the recording file is small, the downloading efficiency can be improved through concurrent downloading, and the generation of the recorded broadcast stream and the subsequent display efficiency of the recorded broadcast stream are further improved.
In practical application, in order to enhance user experience, a user can watch live content in a target live broadcast room in time, and a platform server needs to schedule a live stream based on a state of the live stream, which specifically includes:
receiving a live stream push request, and determining a target live stream based on the live stream push request;
and under the condition that the first priority of the target live stream is higher than the second priority of the recorded broadcast stream corresponding to the recorded broadcast stream push stream request, sending the live stream push stream request to a push stream server, wherein the live stream push stream request comprises a live broadcast room identifier.
The live stream push stream request is a request pointing to a client side where a user watching a target live broadcast room is located to push a live stream; the target live broadcast stream is a live broadcast stream generated based on live broadcast content of the target live broadcast room; the first priority is a scheduling priority identifier for identifying that the live broadcast stream or the recorded broadcast stream is different from the second priority; the second priority is a scheduling priority identifier for identifying that the live broadcast stream or the recorded broadcast stream is different from the first priority; the priority identification of the target live broadcast stream can enable the platform server to perform priority scheduling on the live broadcast stream, namely, under the condition that the recorded broadcast stream is played in the target live broadcast room, if the platform server receives the live broadcast stream aiming at the target live broadcast room, the live broadcast stream is preferentially scheduled, so that a user watching the target live broadcast room can preferentially watch the live broadcast content.
Specifically, under the condition that the first priority is set to be higher than the second priority, after the platform server which is scheduling the recorded broadcast stream of the second priority identifies the live broadcast stream of the target live broadcast room, the live broadcast stream push request of the first priority is sent to the push stream server, so that the push stream server subsequently pushes the live broadcast stream to the client, and the switching between the live broadcast stream display and the recorded broadcast stream display is completed.
The live broadcast stream and the recorded broadcast stream are scheduled through the platform server based on the priority sequence, so that the live broadcast stream or the recorded broadcast stream with higher priority is pushed to the client, and the watching experience of a user is improved.
In practical application, the platform server receives a recorded broadcast playback request, where the recorded broadcast playback request may be triggered by an anchor, and specifically includes:
and responding to a click command of the anchor to the recorded broadcast playback button, and generating a recorded broadcast playback request, wherein the submission time of the click command is before the preset live broadcast end time.
The click instruction of the recorded broadcast playback button refers to a click instruction generated by clicking the recorded broadcast playback button in the live broadcast client by the anchor; the recorded broadcast playback request refers to a request for playing recorded broadcast stream in a target live broadcast room; the submission time of the click command refers to the time point when the platform server processes the click command; the preset live broadcast end time refers to a time point when the target live broadcast room finishes displaying live broadcast content, and the time point can be a preset time point, for example, a preset 3-point live broadcast end time; the anchor will also actually click on the point in time when the live is finished, e.g., the anchor is ready to be played down at 2 points, then the recorded playback button is clicked before 2 points, i.e., before the play down.
Specifically, the live broadcast client generates a click instruction based on the click operation of the anchor on the recorded broadcast playback button, and forwards the click instruction to the platform server; after receiving the click command, the platform server generates a recorded broadcast playback request based on the click command; the submission time of the click command is before the preset live broadcast end time, namely the anchor is triggered to generate the click command before downloading, and the click command is sent to the platform server, so that the platform server can generate a corresponding recorded broadcast playback request conveniently; the platform server can generate the recorded and broadcast playback request in advance before the live stream is played by the anchor, namely before the live stream content stops being pushed, so that the subsequent push stream server generates the recorded and broadcast stream based on the recorded and broadcast playback request to generate the recorded and broadcast stream in advance and push the recorded and broadcast stream to the client, and therefore a user at the client cannot feel pause in switching between the live stream and the recorded and broadcast stream, and the watching experience of the user is improved.
Step 104: and determining a recording file identifier and a client identifier corresponding to the target live broadcast room based on the live broadcast room identifier.
Specifically, after a target live broadcast room is determined according to a live broadcast room identifier, a recording file identifier corresponding to the target live broadcast room is obtained, for example, a storage address of a recording file in a platform server, and a client identifier corresponding to a user watching the target live broadcast room is obtained, and for example, a client identifier a of a client where a user a is located and a client identifier B of a client where a user B is located are determined if a user a and a user B are watching live broadcast in the live broadcast room.
Step 106: and generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server.
Specifically, a recorded stream push stream request is generated based on a recording file identifier and a client identifier; and sending the recorded broadcast stream pushing request to a stream pushing server so that the server pushes the recorded broadcast stream to a target client based on the recorded broadcast stream pushing request.
The method for processing the live stream applied to the platform server receives a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; and generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server.
The platform server receives the recorded broadcast playback request, and determines a recorded file identifier and a client identifier based on the recorded broadcast playback request so as to generate a recorded broadcast stream plug flow request based on the recorded file identifier and the client identifier; the stream pushing server can determine the recorded broadcast file for generating the recorded broadcast stream and the client to which the recorded broadcast stream is pushed according to the recorded broadcast stream pushing request carrying the recording file identifier and the client identifier, so that the generation efficiency of subsequent recorded broadcast streams is improved, and the display efficiency of the recorded broadcast streams is improved.
Fig. 2 shows a flowchart of a live stream processing method provided in a second embodiment of the present application, which is applied to a push stream server, and specifically includes the following steps:
step 202: and receiving a recorded broadcast stream pushing request. The recorded and broadcast stream pushing request comprises a client identifier and a recorded file identifier.
When the current live broadcast platform receives a live broadcast watching request, namely the platform server receives the live broadcast watching request, a live broadcast stream push stream request can be generated based on the live broadcast watching request and sent to the push stream server; after receiving the live stream push request, the push stream server determines the live stream based on the live stream push stream request and pushes the live stream to the corresponding client, so that the live content is displayed at the target client.
However, after the anchor in the live broadcast room stops live broadcast, the target live broadcast room is closed while the anchor is being played, that is, the audience cannot continue to watch in the live broadcast room; and after closing the target live broadcast room, if the main broadcast needs to be played again, the live broadcast room needs to be created again. In order to improve user experience, under the condition that a target live broadcast room does not pull a live broadcast stream, namely a main broadcast stops live broadcast, the target live broadcast room is not closed, recorded contents corresponding to the live broadcast stream are directly displayed by the target live broadcast room, namely a recorded broadcast stream push stream request is sent to a push stream server by a platform server, and therefore audiences can continuously watch live broadcast playback in the live broadcast room.
The recorded broadcast stream pushing request refers to a request for pushing the recorded broadcast stream to a client or a CDN node; the recorded and broadcast stream is a data stream obtained by pushing stream based on a recorded file; the recorded broadcast stream pushing request comprises a client identifier and a recorded file identifier; the client identifier refers to a field which can uniquely represent a target client, such as a client name, a client number, a client address and the like; the recording file identifier refers to a field which can uniquely represent a target recording file, such as a recording file address, a recording file ID number and the like; the recording file refers to a file obtained by recording live content, and is stored in a platform server, such as a video file in an mp4 format, and the like.
In practical application, the stream pushing server can receive stream pushing requests, including live stream pushing requests and recorded stream pushing requests; after receiving the streaming request, the streaming server may determine a live stream or an recorded stream based on a data stream identifier in the streaming request, and then determine a target client or a CDN node based on a client identifier or a CDN node identifier in the streaming request; and the live broadcast stream or the recorded broadcast stream is pushed to a target client or a CDN node by the stream pushing server.
Specifically, the platform server receives a live broadcast playback request sent by a client, and then determines a record file identifier corresponding to a target live broadcast room and a client identifier of the client where a user watching the target live broadcast room is located based on a live broadcast room identifier in the live broadcast playback request; generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server; and the stream pushing server receives a recorded stream pushing request which is sent by the platform server and contains the client identification and the recorded file identification, so that a target client of the stream pushing is determined based on the client identification, and a recorded file for generating the recorded stream is determined based on the recorded file identification.
For example, the streaming server a receives a recorded streaming request, where the recorded streaming request includes a client identifier s and a recording file identifier n.
By receiving the recorded broadcast stream pushing request, the recorded broadcast file for generating the recorded broadcast stream is determined based on the recording file identifier in the recorded broadcast stream pushing request, and the target client is determined based on the client identifier, so that the recorded broadcast stream is pushed to the corresponding target client in the subsequent process.
Before receiving the recorded streaming request, the streaming server may receive a live broadcast request, which specifically includes:
receiving a live broadcast request, wherein the live broadcast request comprises a live stream identifier and a client identifier;
determining a live stream based on the live stream identifier, and determining a target client according to the client identifier;
and pushing the live stream to the target client.
The live broadcasting request refers to a request for broadcasting in a target live broadcasting room by a main broadcasting; the live broadcast starting request comprises a live broadcast stream identifier and a client identifier, a live broadcast stream generated by a main broadcast in a target live broadcast room is determined based on the live broadcast stream identifier, and a target client for receiving the live broadcast stream is determined according to the client identifier; after the live stream is acquired, the live stream is pushed to the client, so that the target client can display the live stream.
Specifically, under the condition that the streaming server pushes the live stream to the target client, the recorded broadcast stream pushing request can be received, and the recorded broadcast stream is pushed to the target client based on the recorded broadcast stream pushing request.
Live streaming and recorded broadcast streaming are pushed to the target client side simultaneously, so that the subsequent target client side can display the live streaming or recorded broadcast streaming, the time for loading the live streaming or recorded broadcast streaming is reduced, and the watching experience of a user is improved.
Step 204: and acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream.
After receiving the recorded broadcast stream pushing request, analyzing the recorded broadcast stream pushing request to obtain a recorded file identifier; acquiring a target recording file based on the recording file identifier; and generating a recorded broadcast stream based on the acquired target recording file.
In practical application, the method for acquiring the target recording file based on the recording file identifier comprises the following steps:
determining a recording file set based on the recording file identification, wherein the recording file set is stored in a platform server;
and downloading each recording file in the recording file set.
Specifically, the storage position of a recording file set in a platform server can be determined according to a recording file identifier, wherein the recording file set comprises at least one recording file; determining a recording file set in a platform server, and downloading each recording file in the recording file set; the method comprises the steps that a recording file set in a platform server is obtained by recording live broadcast contents of a target live broadcast room; in order to improve the downloading efficiency of the recorded files and further improve the generation efficiency of the recorded broadcast stream, the scheme of the application can record the live broadcast content based on a preset recording rule, specifically, the live broadcast content can be recorded into a plurality of recorded files in a short time, for example, the recorded files are usually 30 minutes, and the preset recording rule can be a recorded file recorded for 3 minutes; by shortening the time for recording the file, the time for downloading the recorded file from the platform server is shortened, and the efficiency for subsequently inquiring the recorded file and generating the recorded and broadcast stream based on the recorded file is further improved.
For example, the recording file address m is a storage address of the recording file set in the platform server, the recording file set stored in the platform server is determined based on the recording file address m, and each recording file in the recording file set is downloaded from the platform server.
The recording file set is determined through the recording file identification, and each recording file in the recording file set is downloaded from the platform server, so that the recorded broadcast stream can be generated based on the downloaded recording file, and the generation and stream pushing efficiency of the recorded broadcast stream is improved.
After the stream pushing server downloads the target recording file, the recorded broadcast stream needs to be generated according to the target recording file, and the method specifically includes:
and converting the target recording file into a recorded broadcast stream based on a preset file conversion rule.
The preset file conversion rule is a rule for converting a target recording file into a recorded broadcast stream, and the specific file conversion rule is not specifically limited in the application and can realize a mode of converting the recording file into the recorded broadcast stream.
And converting the target recording file into a recorded broadcast stream based on a preset file conversion rule so as to subsequently push the recorded broadcast stream to the corresponding target client.
Step 206: and determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client.
The target client is a client corresponding to a user watching a target live broadcast room, and after the target client is determined according to the client identification, the recorded broadcast stream is pushed to the target client, so that the user watching the target live broadcast room can watch live broadcast playback through the target live broadcast room.
In practical application, after the streaming of the recorded broadcast stream to the target client, the method further includes:
receiving a recorded broadcast stream disconnection task;
and stopping pushing the recorded broadcast stream to the target client based on the recorded broadcast stream disconnection task.
Specifically, the stream pushing server can push live stream and recorded stream to the target client at the same time; when the anchor has set the target live broadcast room to play the live broadcast stream, the stream pushing of the recorded broadcast stream can be cut off, that is, after receiving the recorded broadcast stream cut-off task, the stream pushing of the recorded broadcast stream to the target client is stopped.
In practical application, the priority of a live stream and a recorded broadcast stream can be set, and under the condition of simultaneously receiving a live stream push stream and a recorded broadcast stream push stream, a client can preferentially display the live stream, for example, under the condition of displaying the recorded broadcast stream in a target live broadcasting room, the push stream of the live stream is received again, and the displayed recorded broadcast stream can be switched into the live stream for displaying; in the process of displaying the live broadcast stream, the platform server can issue a recorded broadcast stream disconnection task to the stream pushing server.
Further, in order to realize the preferential display of the live stream, the live stream may be preferentially displayed after being received again, specifically:
under the condition that the stream pushing server only pushes the stream recorded broadcast stream to the target client, the platform server sends a live stream pushing request to the stream pushing server after receiving the live broadcast continuous broadcast request; the stream pushing server pushes the live stream to the target client based on the live stream pushing request; at this time, the target client only acquires the playing address of the live stream, but not the address of the recorded and broadcast stream, so that the recorded and broadcast stream is shielded, namely, the live stream is only displayed.
The live stream processing method applied to the stream pushing server receives a recorded broadcast stream pushing request, wherein the recorded broadcast stream pushing request comprises a client identifier and a recorded file identifier; acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream; and determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client.
By receiving the recorded broadcast stream pushing request, a target recording file is conveniently obtained according to the recording file identifier, and a recorded broadcast stream is generated based on the target recording file; and determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client, so that the playing requirement of the direct broadcast playback is met, and the time consumed by the playback of the recorded file is reduced.
Fig. 3 is a flowchart illustrating a live stream processing method according to a third embodiment of the present application, which is applied to a target client, and specifically includes the following steps:
step 302: and receiving a live broadcast request. And the live broadcast request comprises a live broadcast room identifier.
Specifically, the live broadcast request refers to a request for playing live broadcast content in a target live broadcast room, where the live broadcast content includes live broadcast content or live broadcast playback content; the live broadcast request comprises a live broadcast room identifier, and a target live broadcast room for playing live broadcast content can be determined based on the live broadcast room identifier.
For example, the client a receives a live broadcast request generated based on a user clicking a live broadcast room cover, and the live broadcast request includes a live broadcast room identifier.
Step 304: and determining a target live broadcast room based on the live broadcast room identification, and acquiring a live broadcast stream and a recorded broadcast stream of the target live broadcast room.
Specifically, a target live broadcast room is determined in a live broadcast room list of a platform server according to a live broadcast room identifier; under the condition that the target live broadcast room simultaneously corresponds to the live broadcast stream and the recorded broadcast stream, the target client can acquire the live broadcast stream and the recorded broadcast stream of the target live broadcast room.
Step 306: and displaying the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
Specifically, when a live stream and a recorded stream exist in the target live broadcast room at the same time, the live stream or the recorded stream can be preferentially displayed according to the priority preset for the live stream and the recorded stream.
In practical application, the live broadcast room usually gives priority to displaying live broadcast content, so that the priority of a live broadcast stream can be set to be higher than that of a recorded broadcast stream, and a client of a watching target live broadcast room can display the live broadcast content in time when an anchor broadcast is live broadcast in the live broadcast room.
Further, in order to reduce the perception of the user when switching between the live stream and the recorded stream and improve the user experience, further setting can be performed on the player of the target client, including shortening the pull stream retry time and shortening the pre-loading pull stream retry time.
Specifically, the method for shortening the pull stream retry time may include:
under the condition of receiving a pull stream retry request, determining a current retry time threshold and a preset retry time threshold;
under the condition that the current retry time threshold is larger than the preset retry time threshold, performing pull flow retry based on the preset retry time threshold;
and under the condition that the current retry time threshold is less than or equal to the preset retry time threshold, performing pull flow retry based on the current retry time threshold.
The stream pulling retry request is a request for pulling other stream data for player display under the condition that the player cannot pull stream data corresponding to the content played by the current player; the preset retry time threshold is a preset retry time threshold; the current retry time threshold refers to a retry time threshold currently used by the client player; the retry time threshold is a time length of waiting for the player to pull other stream data before playing the stream data after the player does not pull the stream data played by the current player, for example, the player pulls the live stream a to display, and when the player does not pull the live stream a, the player waits for 5 seconds and then pulls other displayable stream data.
Specifically, in order to reduce the screen blacking time generated by stream switching and improve the user experience, according to the scheme of the application, after the current retry time threshold is determined, the current retry time threshold is compared with a preset retry time threshold, and a party with a smaller retry time threshold is selected as the retry time threshold to perform pull stream retry, so that the pull stream retry time is shortened as much as possible.
For example, when the current player is set to pull a live stream for 5 seconds, the standby address is switched to pull the stream, and the user can perceive a black screen for 5 seconds, that is, the black screen is displayed when the live stream is not pulled; at this moment, the stream pulling time of the client player can be shortened, for example, 5 seconds is modified into 500ms, so that the black screen time of a live broadcast room is shortened, and the watching experience of a user is improved.
Specifically, the method for shortening the time for restarting the preloaded pull flow may include:
receiving a preloading pull stream retry request;
and acquiring a recorded broadcast stream based on the loading pull stream retry request, and preloading the recorded broadcast stream.
The preloading stream pulling retry request refers to pulling other stream data for playing and preloading if the player does not pull the content of the stream data currently used for preloading in the process of playing and preloading.
Specifically, the live stream can be preloaded when the live stream is played; pulling the recorded broadcast stream of the push stream for preloading under the condition that the live stream cannot be used for preloading after the live stream is not pulled; in order to improve the efficiency of preloading, ensure that recorded broadcast streams can be seamlessly displayed after the live broadcast streams are finished, and shorten the time for switching the pull streams under the condition of preloading, thereby realizing the seamless display of the contents in the live broadcast room.
For example, the current player is set to preload the playing content for 3 seconds, that is, when the user watches the content for 47 seconds, the live content for 50 seconds is already loaded; if the player can load the recorded and broadcast stream according to the standby address after the player lasts for 500ms under the condition that the live stream is not loaded in the 50 th second, when the user watches the 50 th second, the content of the recorded and broadcast stream is preloaded, so that the user watching the live content cannot perceive the switching of the stream.
The live stream processing method applied to the target client side preferentially displays the live stream under the condition that the target live broadcast room simultaneously corresponds to the live stream and the recorded broadcast stream, namely if the live stream is received in the recorded broadcast stream playing process, the live stream can be directly switched to the live stream for displaying, so that a user can watch the latest live content in the target live broadcast room, and the watching experience of the user is improved.
The following describes the live stream processing method further by taking an application of the live stream processing method provided by the present application in the live broadcast room G as an example, with reference to fig. 4. Fig. 4 shows a processing flow chart of a live stream processing method applied to a live broadcast room G according to an embodiment of the present application, which specifically includes the following steps:
step 402: the platform server receives a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier.
Specifically, in this embodiment, the client that watches the live broadcast room G currently displays the live broadcast stream corresponding to the live broadcast room G; the platform server can receive a recorded broadcast playback request sent by the client.
Step 404: and the platform server determines a recording file identifier and a client identifier corresponding to the live broadcast room G according to the live broadcast room identifier.
Step 406: and the platform server generates a recorded stream pushing request based on the recording file identifier and the client identifier.
Step 408: and the platform server sends the recorded broadcast stream pushing request to a pushing server.
Step 410: and the stream pushing server downloads the recording file in the platform server based on the recording file identifier in the recording and broadcasting stream pushing request.
Step 412: and the stream pushing server converts the recorded file into a live stream based on a preset file conversion rule.
Step 414: and the stream pushing server determines a target client based on the client identifier and pushes the recorded and broadcast stream to the target client.
Step 416: and after the target client does not pull the live stream, pulling the recorded broadcast stream and displaying the recorded broadcast stream.
Specifically, the target client may display the pulled live stream or recorded stream; under the condition that the live stream and the recorded stream exist at the same time, the live stream can be displayed under the condition that the priority of the live stream is higher than that of the recorded stream.
In the live stream processing method applied to the live broadcast room G in this embodiment, after the platform server receives the recorded broadcast playback request, the recorded broadcast stream push request is generated based on the recorded broadcast playback request, and the recorded broadcast stream push request is sent to the push stream server, so that the push stream server pushes the recorded broadcast stream to the target client.
Corresponding to the above method embodiment, the present application further provides an embodiment of a live streaming processing system, and fig. 5 shows a schematic structural diagram of a live streaming processing system provided in an embodiment of the present application. As shown in fig. 5, the system includes a platform server 502, a push flow server 504, and a target client 506:
the platform server 502 is configured to receive a recorded broadcast playback request sent by the anchor client, where the recorded broadcast playback request includes a live broadcast room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; generating a recorded broadcast stream pushing request according to the recording file identification and the client identification, and sending the recorded broadcast stream pushing request to the pushing server;
the streaming server 504 is configured to receive a recorded streaming request, where the recorded streaming request includes a client identifier and a recorded file identifier; acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream; determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client;
the target client 506 is configured to display the live stream in the case that the live stream and the recorded stream exist in the target live broadcast room.
According to the live stream processing system, a platform server receives a recorded broadcast playback request sent by a main broadcast client, wherein the recorded broadcast playback request comprises a live broadcast room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; generating a recorded broadcast stream pushing request according to the recording file identification and the client identification, and sending the recorded broadcast stream pushing request to the pushing server; the streaming server receives a recorded broadcast streaming request, wherein the recorded broadcast streaming request comprises a client identifier and a recorded file identifier; acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream; determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client; and the target client displays the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room. By receiving the recorded broadcast playback request, the streaming server downloads the recorded broadcast file stored by the platform server, and generates the recorded broadcast stream based on the recorded broadcast file to the client, so that the client can watch the recorded broadcast playback in the target live broadcast room.
Corresponding to the foregoing method embodiment, the present application further provides an embodiment of a live stream processing apparatus, and fig. 6 shows a schematic structural diagram of a live stream processing apparatus provided in a first embodiment of the present application. As shown in fig. 6, the apparatus includes:
a playback request receiving module 602, configured to receive a recorded broadcast playback request, where the recorded broadcast playback request includes a live broadcast room identifier;
a determining module 604, configured to determine, based on the live broadcast room identifier, a recording file identifier and a client identifier corresponding to a target live broadcast room;
a sending module 606, configured to generate a recorded streaming request according to the recording file identifier and the client identifier, and send the recorded streaming request to a streaming server.
Optionally, the apparatus further comprises a receiving sub-module configured to:
receiving a live broadcast recording request, wherein the live broadcast recording request comprises a live broadcast room identifier;
determining a target live broadcast room based on the live broadcast room identification, and acquiring a live broadcast stream of the target live broadcast room;
under the condition that the recording time period of the target live broadcast is less than or equal to a preset recording time period, recording the live broadcast stream based on the recording time period to obtain at least one recording file;
and under the condition that the recording time period of the target live broadcast is greater than a preset recording time period, recording the live broadcast stream based on the preset recording time period to obtain at least one recording file.
Optionally, the apparatus further comprises a sending submodule configured to:
receiving a live stream push request, and determining a target live stream based on the live stream push request;
and under the condition that the first priority of the target live stream is higher than the second priority of the recorded broadcast stream corresponding to the recorded broadcast stream push stream request, sending the live stream push stream request to a push stream server, wherein the live stream push stream request comprises a live broadcast room identifier.
Optionally, the apparatus further comprises a response module configured to:
and responding to a click command of the anchor to the recorded broadcast playback button, and generating a recorded broadcast playback request, wherein the submission time of the click command is before the preset live broadcast end time.
The application is applied to a live stream processing device of a platform server, and comprises a playback request receiving module, a recording and playing playback module and a recording and playing module, wherein the recording and playing playback request comprises a live broadcasting room identifier; the determining module is used for determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; and the sending module generates a recorded broadcast stream pushing request according to the recording file identifier and the client identifier and sends the recorded broadcast stream pushing request to a pushing server.
The method comprises the steps that a recorded broadcast playback request is received, and a recorded file identifier and a client identifier are determined based on the recorded broadcast playback request, so that a recorded broadcast stream push stream request is generated based on the recorded file identifier and the client identifier; the recorded broadcast stream pushing request carrying the recorded file identifier and the client identifier can enable the pushing server to determine recorded broadcast files for generating recorded broadcast streams and to push the recorded broadcast streams to which clients, so that the generation efficiency of subsequent recorded broadcast streams is improved, the display efficiency of the recorded broadcast streams is improved, the time consumed by playback of the recorded files is reduced, and seamless display of the live broadcast streams and the recorded broadcast streams at the clients is facilitated.
Corresponding to the above method embodiment, the present application further provides an embodiment of a live stream processing apparatus, and fig. 7 shows a schematic structural diagram of a live stream processing apparatus provided in a second embodiment of the present application. As shown in fig. 7, the apparatus includes:
a streaming request receiving module 702, configured to receive a recorded streaming request, where the recorded streaming request includes a client identifier and a recording file identifier;
a generating module 704 configured to obtain a target recording file based on the recording file identifier, and generate a recorded broadcast stream according to the target recording file, where the target recording file is obtained based on a live broadcast stream;
and the streaming module 706 is configured to determine a target client according to the client identifier, and to forward the recorded broadcast stream to the target client.
Optionally, the generating module 704 is further configured to:
determining a recording file set based on the recording file identification, wherein the recording file set is stored in a platform server;
and downloading each recording file in the recording file set.
Optionally, the generating module 704 is further configured to:
and converting the target recording file into a recorded broadcast stream based on a preset file conversion rule.
Optionally, the apparatus further comprises a receiving sub-module configured to:
receiving a recorded broadcast stream disconnection task;
and stopping pushing the recorded broadcast stream to the target client based on the recorded broadcast stream disconnection task.
Optionally, the apparatus further comprises a receiving sub-module configured to:
receiving a live broadcast request, wherein the live broadcast request comprises a live stream identifier and a client identifier;
determining a live stream based on the live stream identifier, and determining a target client according to the client identifier;
and pushing the live stream to the target client.
The live stream processing device is applied to a push stream server, and the push stream request receiving module receives a recorded broadcast stream push stream request, wherein the recorded broadcast stream push stream request comprises a client identifier and a recorded file identifier; the generating module is used for acquiring a target recording file based on the recording file identification and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream; and the stream pushing module is used for determining a target client according to the client identifier and pushing the recorded broadcast stream to the target client.
By receiving the recorded broadcast stream pushing request, a target recording file is conveniently obtained according to the recording file identifier, and a recorded broadcast stream is generated based on the target recording file; and determining a target client according to the client identifier, and pushing the recorded and broadcast stream to the target client, so that the playing requirement of the target client on live broadcast playback is met, and the time consumed by playback of the recorded file is reduced.
Corresponding to the foregoing method embodiment, the present application further provides an embodiment of a live stream processing apparatus, and fig. 8 shows a schematic structural diagram of a live stream processing apparatus provided in a third embodiment of the present application. As shown in fig. 8, the apparatus includes:
a play request receiving module 802 configured to receive a live play request, where the live play request includes a live room identifier;
an obtaining module 804, configured to determine a target live broadcast room based on the live broadcast room identifier, and obtain a live broadcast stream and a recorded broadcast stream of the target live broadcast room;
a presentation module 806 configured to present the live stream in a case where there are a live stream and a recorded stream in the target live broadcast room.
Optionally, the apparatus further comprises a determination submodule configured to:
under the condition of receiving a pull stream retry request, determining a current retry time threshold and a preset retry time threshold;
under the condition that the current retry time threshold is larger than the preset retry time threshold, performing pull flow retry based on the preset retry time threshold;
and under the condition that the current retry time threshold is less than or equal to the preset retry time threshold, performing pull flow retry based on the current retry time threshold.
Optionally, the apparatus further comprises a preload module configured to:
receiving a preloading pull stream retry request;
and acquiring a recorded broadcast stream based on the loading pull stream retry request, and preloading the recorded broadcast stream.
The application is applied to a live stream processing device of a target client, and comprises a play request receiving module, a live play request receiving module and a live play request receiving module, wherein the live play request comprises a live room identifier; the acquisition module is used for determining a target live broadcast room based on the live broadcast room identification and acquiring live broadcast streams and recorded broadcast streams of the target live broadcast room; and the display module is used for displaying the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
Through corresponding under the condition of live stream and recorded broadcast stream simultaneously in the live room of target, show the live stream preferentially, if receive the live stream in recorded broadcast stream broadcast process promptly, then can directly switch over to the live stream and show, make the user can watch newest live content in the live room of target, promote user's the experience of watching.
The above is a schematic scheme of a live stream processing apparatus of the present embodiment. It should be noted that the technical solution of the live stream processing apparatus and the technical solution of the live stream processing method belong to the same concept, and details that are not described in detail in the technical solution of the live stream processing apparatus can be referred to the description of the technical solution of the live stream processing method.
Fig. 9 illustrates a block diagram of a computing device 900 according to an embodiment of the present application. Components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is coupled to the memory 910 via a bus 930, and a database 950 is used to store data.
Computing device 900 also includes access device 940, access device 940 enabling computing device 900 to communicate via one or more networks 960. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 940 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present application, the above-described components of computing device 900 and other components not shown in FIG. 9 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 9 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 900 may also be a mobile or stationary server.
Wherein, the processor 920 implements the steps of the live stream processing method when executing the computer instructions.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the live stream processing method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can all be referred to in the description of the technical solution of the live stream processing method.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and the computer instructions, when executed by a processor, implement the steps of the live stream processing method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above live stream processing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above live stream processing method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (18)

1. A live stream processing method is applied to a platform server and comprises the following steps:
receiving a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier;
determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier;
and generating a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and sending the recorded broadcast stream pushing request to a pushing server.
2. The live stream processing method of claim 1, further comprising, before receiving the recorded playback request:
receiving a live broadcast recording request, wherein the live broadcast recording request comprises a live broadcast room identifier;
determining a target live broadcast room based on the live broadcast room identification, and acquiring a live broadcast stream of the target live broadcast room;
under the condition that the recording time period of the target live broadcast is less than or equal to a preset recording time period, recording the live broadcast stream based on the recording time period to obtain at least one recording file;
and under the condition that the recording time period of the target live broadcast is greater than a preset recording time period, recording the live broadcast stream based on the preset recording time period to obtain at least one recording file.
3. The live stream processing method according to claim 1, further comprising:
receiving a live streaming push request, and determining a target live streaming based on the live streaming push request;
and under the condition that the first priority of the target live stream is higher than the second priority of the recorded broadcast stream corresponding to the recorded broadcast stream push request, sending the live stream push request to a push stream server, wherein the live stream push request comprises a live broadcasting room identifier.
4. The live stream processing method according to claim 1, further comprising:
and responding to a click command of the anchor to the recorded broadcast playback button, and generating a recorded broadcast playback request, wherein the submission time of the click command is before the preset live broadcast end time.
5. A live stream processing method is applied to a push stream server and comprises the following steps:
receiving a recorded broadcast stream pushing request, wherein the recorded broadcast stream pushing request comprises a client identifier and a recorded file identifier;
acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream;
and determining a target client according to the client identifier, and pushing the recorded and broadcast stream to the target client.
6. The live stream processing method of claim 5, wherein obtaining a target recording file based on the recording file identifier comprises:
determining a recording file set based on the recording file identification, wherein the recording file set is stored in a platform server;
and downloading each recording file in the recording file set.
7. The live stream processing method of claim 5, wherein generating a recorded stream from the target recording file comprises:
and converting the target recording file into a recorded broadcast stream based on a preset file conversion rule.
8. The live stream processing method of claim 5, wherein after the streaming the recorded stream to the target client, further comprising:
receiving a recorded broadcast stream disconnection task;
and stopping pushing the recorded broadcast stream to the target client based on the recorded broadcast stream disconnection task.
9. The live stream processing method of claim 5, further comprising, before receiving the recorded stream push request:
receiving a live broadcast request, wherein the live broadcast request comprises a live stream identifier and a client identifier;
determining a live stream based on the live stream identifier, and determining a target client according to the client identifier;
and pushing the live stream to the target client.
10. A live stream processing method is applied to a target client and comprises the following steps:
receiving a live broadcast request, wherein the live broadcast request comprises a live broadcast room identifier;
determining a target live broadcasting room based on the live broadcasting room identification, and acquiring a live broadcasting stream and a recorded broadcasting stream of the target live broadcasting room;
and displaying the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
11. The live-stream processing method of claim 10, further comprising:
under the condition of receiving a pull stream retry request, determining a current retry time threshold and a preset retry time threshold;
under the condition that the current retry time threshold is larger than the preset retry time threshold, performing pull flow retry based on the preset retry time threshold;
and under the condition that the current retry time threshold is less than or equal to the preset retry time threshold, performing pull flow retry based on the current retry time threshold.
12. The live-stream processing method of claim 10, further comprising:
receiving a preloading pull stream retry request;
and acquiring a recorded broadcast stream based on the loading pull stream retry request, and preloading the recorded broadcast stream.
13. A live stream processing system is characterized in that the live stream processing system comprises an anchor client, a push stream server, a platform server and a target client, wherein:
the platform server is configured to receive a recorded broadcast playback request sent by the anchor client, wherein the recorded broadcast playback request comprises a live broadcast room identifier; determining a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier; generating a recorded broadcast stream pushing request according to the recording file identification and the client identification, and sending the recorded broadcast stream pushing request to the pushing server;
the streaming server is configured to receive a recorded broadcast streaming request, wherein the recorded broadcast streaming request comprises a client identifier and a recorded file identifier; acquiring a target recording file based on the recording file identification, and generating a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream; determining a target client according to the client identifier, and pushing the recorded broadcast stream to the target client;
the target client is configured to display the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
14. A live stream processing device applied to a platform server includes:
the playback request receiving module is configured to receive a recorded broadcast playback request, wherein the recorded broadcast playback request comprises a live broadcast room identifier;
the determining module is configured to determine a recording file identifier and a client identifier corresponding to a target live broadcast room based on the live broadcast room identifier;
and the sending module is configured to generate a recorded broadcast stream pushing request according to the recording file identifier and the client identifier, and send the recorded broadcast stream pushing request to a pushing server.
15. A live stream processing device applied to a push stream server includes:
the device comprises a streaming request receiving module, a streaming request receiving module and a streaming processing module, wherein the streaming request receiving module is configured to receive a recorded streaming request, and the recorded streaming request comprises a client identifier and a recorded file identifier;
the generating module is configured to acquire a target recording file based on the recording file identifier and generate a recorded broadcast stream according to the target recording file, wherein the target recording file is acquired based on a live broadcast stream;
and the stream pushing module is configured to determine a target client according to the client identifier and push the recorded broadcast stream to the target client.
16. A live stream processing device applied to a target client comprises:
the system comprises a playing request receiving module, a live broadcasting receiving module and a live broadcasting receiving module, wherein the live broadcasting request comprises a live broadcasting room identifier;
the acquisition module is configured to determine a target live broadcast room based on the live broadcast room identification and acquire a live broadcast stream and a recorded broadcast stream of the target live broadcast room;
and the display module is configured to display the live broadcast stream under the condition that the live broadcast stream and the recorded broadcast stream exist in the target live broadcast room.
17. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-5 or 6-9 or 10-12 when executing the computer instructions.
18. A computer readable storage medium storing computer instructions, characterized in that the computer instructions, when executed by a processor, implement the steps of the method of any one of claims 1-5 or 6-9 or 10-12.
CN202210158777.5A 2022-02-21 2022-02-21 Live stream processing method and device Active CN114466201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210158777.5A CN114466201B (en) 2022-02-21 2022-02-21 Live stream processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210158777.5A CN114466201B (en) 2022-02-21 2022-02-21 Live stream processing method and device

Publications (2)

Publication Number Publication Date
CN114466201A true CN114466201A (en) 2022-05-10
CN114466201B CN114466201B (en) 2024-03-19

Family

ID=81415312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210158777.5A Active CN114466201B (en) 2022-02-21 2022-02-21 Live stream processing method and device

Country Status (1)

Country Link
CN (1) CN114466201B (en)

Citations (10)

* 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
WO2017124800A1 (en) * 2016-01-21 2017-07-27 杭州海康威视数字技术股份有限公司 Pre-event video recording method and device
CN108377396A (en) * 2018-02-13 2018-08-07 北京潘达互娱科技有限公司 A kind of live streaming method for recording, device and equipment
CN109769126A (en) * 2018-12-10 2019-05-17 视联动力信息技术股份有限公司 A kind of method and apparatus of the view of the real-time playback in internet networking video recording
CN111031373A (en) * 2019-12-23 2020-04-17 北京百度网讯科技有限公司 Video playing method and device, electronic equipment and computer readable storage medium
CN111182358A (en) * 2019-12-30 2020-05-19 腾讯科技(深圳)有限公司 Video processing method, video playing method, device, equipment and storage medium
CN111954077A (en) * 2020-08-24 2020-11-17 上海连尚网络科技有限公司 Video stream processing method and device for live broadcast
WO2021163878A1 (en) * 2020-02-18 2021-08-26 深圳市欢太科技有限公司 Screen recording method and apparatus, and computer readable storage medium
CN113630618A (en) * 2021-08-06 2021-11-09 上海哔哩哔哩科技有限公司 Video processing method, device and system
CN113873288A (en) * 2021-12-02 2021-12-31 北京微吼时代科技有限公司 Method and device for generating playback in live broadcast process

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017124800A1 (en) * 2016-01-21 2017-07-27 杭州海康威视数字技术股份有限公司 Pre-event video recording method and device
CN105847386A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 Live broadcasting stream processing method, device and system
CN108377396A (en) * 2018-02-13 2018-08-07 北京潘达互娱科技有限公司 A kind of live streaming method for recording, device and equipment
CN109769126A (en) * 2018-12-10 2019-05-17 视联动力信息技术股份有限公司 A kind of method and apparatus of the view of the real-time playback in internet networking video recording
CN111031373A (en) * 2019-12-23 2020-04-17 北京百度网讯科技有限公司 Video playing method and device, electronic equipment and computer readable storage medium
CN111182358A (en) * 2019-12-30 2020-05-19 腾讯科技(深圳)有限公司 Video processing method, video playing method, device, equipment and storage medium
WO2021163878A1 (en) * 2020-02-18 2021-08-26 深圳市欢太科技有限公司 Screen recording method and apparatus, and computer readable storage medium
CN111954077A (en) * 2020-08-24 2020-11-17 上海连尚网络科技有限公司 Video stream processing method and device for live broadcast
CN113630618A (en) * 2021-08-06 2021-11-09 上海哔哩哔哩科技有限公司 Video processing method, device and system
CN113873288A (en) * 2021-12-02 2021-12-31 北京微吼时代科技有限公司 Method and device for generating playback in live broadcast process

Also Published As

Publication number Publication date
CN114466201B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN108391179B (en) Live broadcast data processing method and device, server, terminal and storage medium
CN103347220B (en) A kind of method and device reviewing live file
WO2015096648A1 (en) Video sharing method and system in smart tv
CN102845072B (en) The media content playback quality improved
US9060206B2 (en) Sampled digital content based syncronization of supplementary digital content
EP1921852A1 (en) Sharing Television Clips
EP2811750A1 (en) Set top box interaction method and associated set top box and system
CN102055717A (en) Quick playing method, terminal and server
US9986267B2 (en) Methods and systems for dynamically editing, encoding, posting and updating live video content
CN112839238B (en) Screen projection playing method and device and storage medium
CN106878815B (en) Video playing method and device
US20220360849A1 (en) Information processing apparatus, information processing method, transmission apparatus, and transmission method
CN111818383B (en) Video data generation method, system, device, electronic equipment and storage medium
CN113923502B (en) Live video playing method and device
CN105142003B (en) Television program playing method and device
CN113630618B (en) Video processing method, device and system
EP3048796A1 (en) Information system, information delivery method and iptv system based on multi-screen interaction
US20200351531A1 (en) Real-Time Incorporation of User-Generated Content into Third-Party Streams
JP2024048339A (en) Server, terminal and computer program
CN114466201B (en) Live stream processing method and device
CN104980767A (en) Method for grabbing and sharing instant DVB video clips
US11470407B2 (en) Acquisition of extracts of a multimedia stream on a terminal
CN114051150A (en) Live broadcast method and device, electronic equipment and computer readable storage medium
CN115914670B (en) Live broadcast playback processing method, device and storage medium
JP7302801B1 (en) Method, system and computer program for handling streaming data

Legal Events

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