WO2019024638A1 - Live broadcast pausing method and system, live broadcast pausing apparatus, and live broadcast server - Google Patents

Live broadcast pausing method and system, live broadcast pausing apparatus, and live broadcast server Download PDF

Info

Publication number
WO2019024638A1
WO2019024638A1 PCT/CN2018/093994 CN2018093994W WO2019024638A1 WO 2019024638 A1 WO2019024638 A1 WO 2019024638A1 CN 2018093994 W CN2018093994 W CN 2018093994W WO 2019024638 A1 WO2019024638 A1 WO 2019024638A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
live
live broadcast
client
video data
Prior art date
Application number
PCT/CN2018/093994
Other languages
French (fr)
Chinese (zh)
Inventor
袁磊
Original Assignee
优酷网络技术(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 优酷网络技术(北京)有限公司 filed Critical 优酷网络技术(北京)有限公司
Publication of WO2019024638A1 publication Critical patent/WO2019024638A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4333Processing operations in response to a pause request
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a live broadcast suspension method, a system, a live broadcast suspension device, and a live broadcast server.
  • the anchor when a live video is broadcast, the anchor usually collects video data that needs to be broadcasted through the collection end, and then the collection end can send the video data to the server of the live broadcast platform.
  • the live video acquisition request can be sent to the server of the live broadcast platform.
  • the server of the live broadcast platform can push the video data uploaded by the collection terminal to the client of the user, thereby implementing a live broadcast process from the anchor to the user.
  • the anchor sometimes inevitably has an emergency, which will cause the live broadcast process to be suspended. For example, if the anchor needs to temporarily handle other things, the live broadcast process will be suspended.
  • the collection end of the anchor usually interrupts the streaming of the live stream to the server of the live platform. After the live broadcast is resumed, the collection end needs to re-establish a connection with the server of the live broadcast platform to continue to push the data stream. It can be seen that the current suspension of the live stream by interrupting the data stream requires more time to re-establish the connection with the live server when the live broadcast is restarted.
  • the purpose of the embodiment of the present application is to provide a live broadcast suspension method, a system, a live broadcast suspension device, and a live broadcast server, which can improve the efficiency of live broadcast when the live broadcast is restarted.
  • the embodiment of the present application provides a method for suspending a live broadcast, where the method includes: providing a live broadcast data to a live broadcast server at a data collection client, so that the live broadcast server pushes the live broadcast data to a user client.
  • the pause command issued by the anchor is received; in response to the pause command, the data collection client pauses to collect the live broadcast data while maintaining a communication connection with the live server.
  • the embodiment of the present application further provides a live broadcast suspension device, where the device includes: a pause instruction receiving unit, configured to receive a pause instruction sent by a data collection client; and the data collection client is used to broadcast to the live broadcast
  • the server provides the collected live data; the interstitial video data acquiring unit is configured to obtain the interstitial video data in response to the pause instruction, and the pushing unit is configured to push the interstitial video data to the live broadcast server, so that the live broadcast
  • the server pauses to send the live data currently collected by the data collection client to the user client, and sends the split video data to the user client during the pause.
  • the embodiment of the present application further provides a live broadcast suspension method, where the method includes: receiving a live data request sent by a user client, and sending the live data pointed by the live data request to the user client.
  • the live broadcast data is collected and uploaded by the data collection client; when the broadcast video data sent by the live broadcast suspension device is received, the live broadcast data is suspended from being sent to the user client, and is The user client pushes the interstitial video data.
  • the embodiment of the present application further provides a live broadcast server, where the live broadcast server includes: a live broadcast data sending unit, configured to receive a live data request sent by a user client, and send the content to the user client.
  • the client sends the live broadcast data and pushes the interstitial video data to the user client during a pause.
  • the embodiment of the present application further provides a live broadcast suspension system, where the system includes a data collection client, a live broadcast suspension device, a live broadcast server, and a user client, where: the data collection client is used for The live broadcast server provides the collected live broadcast data, and sends a pause command to the live broadcast pause device; the live broadcast pause device is configured to acquire the split video data in response to the pause instruction; push the split video data to the a live broadcast server, configured to: after receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live data currently collected by the data collection client to the user client, and The user client sends the interstitial video data.
  • the data collection client can continue to maintain a communication connection with the live server without disconnecting from the live server.
  • the data collection client can provide the collected live data to the live server according to the previous communication connection, thereby reducing the time for re-establishing the connection with the live server and improving the efficiency of the live broadcast.
  • the live broadcast suspension device can acquire the interstitial video data for replacing the live data stream. Then, the live broadcast suspension device can push the interstitial video data to the live server.
  • the live broadcast server when the live broadcast server receives the inserted video data to be pushed, the broadcast video data can be pushed to the user client, so that when the data collection client pauses to obtain the live data stream from the anchor camera and the microphone, The live broadcast suspension device pushes the inserted video data to the live server to ensure that the live video played in the user client is not interrupted.
  • FIG. 1 is a schematic diagram of a method for suspending a live broadcast in an embodiment of the present application
  • FIG. 2 is a flowchart of a method for suspending a live broadcast in an embodiment of the present application
  • FIG. 3 is an interaction diagram of a live suspension method in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of storage of interstitial video data in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a live broadcast suspension device according to an embodiment of the present application.
  • FIG. 6 is a sequence diagram of a method for suspending a live broadcast according to another embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a live broadcast server according to an embodiment of the present application.
  • FIG. 8 is an interaction diagram of a live suspension system in an embodiment of the present application.
  • the embodiment of the present application provides a live broadcast suspension method, which can be applied to a system architecture of a server and a client.
  • the server may be a service server of the live broadcast platform, and the client may be a data collection client for collecting live broadcast data of the anchor, or a user client for displaying the live broadcast screen to the user.
  • the live broadcast platform may be, for example, a platform such as a betta, a tiger tooth, or a battle flag.
  • the server may be an electronic device having a data operation, a storage function, and a network interaction function; or may be software running in the electronic device to provide support for data processing, storage, and network interaction.
  • the number of the servers is not specifically limited in the present embodiment.
  • the server may be a server, or may be several servers, or a server cluster formed by several servers.
  • the client may be an electronic device having a data collection function, a data playback function, and a network communication function.
  • the client may be, for example, a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television set with network access function, or the like.
  • the client may also be software capable of running in the above electronic device.
  • the client may be an application such as iQiyi, AcFun, betta, etc. running in an electronic device provided by the live broadcast platform.
  • the present application provides a live broadcast suspension method, which may be applied to a data collection client, and the method includes the following steps.
  • the collected data is provided to the live broadcast server by the data collection client, so that the live broadcast server sends the live broadcast data to the user client, and receives the pause command issued by the anchor.
  • the data collection client may collect live data related to the anchor, and the live data may be pushed by the data collection client to the live server of the live platform after the collection.
  • the live broadcast server can push the live data collected by the data collection client of the anchor to the user client to display on the user client. The live broadcast of the anchor.
  • a pause command may be issued in the data collection client.
  • the data collection client may pause to collect the live data related to the anchor.
  • the data collection client can continue to maintain a communication connection with the live server.
  • the data collection client may not push the live data to the live server, so that the live server cannot provide the corresponding live data to the user client, and the user client may display a black screen.
  • the data collection client can send the pause command to the live server, so that the live server can continuously provide data collection to the user client according to the already set play rules. The last frame of the screen provided by the client.
  • the live server can also send video information for characterizing the anchor of the anchor to the user client.
  • the user client can display the last frame of the live broadcast or the black screen. On the screen or the black screen, the words "Host off, please wait” can be displayed.
  • the data acquisition client may issue a cancel pause command, so that after receiving the cancel pause command issued by the anchor, the data collection client may re-collect the live data. And providing the re-collected live broadcast data to the live broadcast server by using the previously communicated communication connection, thereby reducing the time taken for re-establishing the connection with the live broadcast server, and improving the efficiency of the live broadcast.
  • the live broadcast suspension method provided by the embodiment of the present application can also be applied to a live broadcast suspension device.
  • the live broadcast suspension device may be an independent device that maintains data communication with the data collection client, and the live broadcast suspension device may be in the same local area network as the data collection client. In the network, the live suspension device and the data collection client can have a better network environment and faster data transmission speed.
  • the live broadcast suspension device may also be a module integrated in the data collection client, so that when the data collection client pushes live data to the live server, it may first determine whether to obtain from the camera and the microphone. Live broadcast data of the anchor.
  • the live broadcast data of the anchor can be obtained directly from the camera and the microphone, and the obtained live broadcast data is pushed to the live broadcast server. If the current live broadcast status is available, the broadcast video data can be acquired by the live broadcast pause device, and the split video data can be pushed to the live broadcast server. In this way, the data collection client can send data streams to the live server without interrupting during the pause process.
  • the method may further include the following steps.
  • the data collection client may be connected to a camera, a microphone, or the like for collecting live data, or the data collection client itself may include a camera, a microphone, and the like.
  • the data collection client can establish a streaming connection with the live server. Since the data collection client needs to continuously push live data to the live server during the live broadcast, the stream connection may be a long connection.
  • the data collection client when the data collection client pushes the live data to the live server, it may determine in advance whether the live data is obtained from the camera and the microphone. If the anchor currently does not issue a pause command in the data collection client, the data collection client can obtain live data from the camera and the microphone. The data collection client can convert the obtained live data into a live data stream, and push the converted live data stream to the live server. In this way, the user client can obtain the live broadcast of the anchor from the live server.
  • the live data stream may be a data stream that follows a streaming media protocol.
  • the streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
  • the data collection client can pause to obtain live data from devices such as a camera and a microphone.
  • the data collection client can send the pause instruction to the live pause device, so that the live pause device can provide video data for live broadcast.
  • the pause instruction may be that the anchor is released in the data collection client.
  • the data collection client can automatically generate a pause instruction for a specific situation.
  • the data collection client may preferentially obtain live data from the camera and the microphone, and then may detect the obtained live data to determine whether a pause command is currently generated. Specifically, when the data displayed by the data collection client during the first specified duration is the same, the pause instruction may be generated.
  • the first specified duration may be a preset duration in the data collection client, and the duration may be adjusted according to an actual scenario. For example, the first specified duration may be 10 seconds, then within 10 seconds, if the images collected by the camera are the same, it indicates that the anchor may leave the range of the camera shooting, and there is no actual live broadcast. Content, then the data collection client can automatically generate a pause command. In this embodiment, it may be determined whether the pictures displayed in the first specified duration are the same by determining whether the live broadcast data collected within the first specified duration is the same.
  • a pause command may also be generated.
  • the second specified duration may be a preset duration in the data collection client, and the duration may be adjusted according to an actual scenario. For example, the second specified duration may be 3 seconds.
  • a pause command may be generated to provide live broadcast data by the live pause device.
  • the interstitial video data for replacing the live broadcast data may be acquired.
  • the interstitial video data may be video material stored in advance by the anchor in the data collection client.
  • the video material may be, for example, a video highlight, an advertisement, a photo collection, and the like.
  • the in-stream video data may be uniformly stored in a specified resource library.
  • the specified resource library may be a folder or a database built based on a data structure.
  • the database may be, for example, MySQL, Oracle, DB2, Sybase, or the like.
  • the live broadcast suspension device can read the interstitial video data from the local cache in addition to the interpolated video data from the specified resource library.
  • the interstitial video data in the local cache may be interstitial video data that was read during the previous or previous pauses. In this way, the live broadcast suspension device directly reads the interstitial video data from the local cache, thereby improving the data reading speed.
  • the local cache or the interstitial video data in the specified repository may be associated with a time node that is used to characterize the time node at which the interstitial video data was last read.
  • the interstitial video data can be selectively read based on the time node.
  • the live broadcast suspension device may acquire the interstitial video data for pushing to the live broadcast server from the interstitial video data associated with the time node whose current time node exceeds the specified time threshold.
  • the specified time threshold may be a preset duration. For example, the specified time threshold can be 12 hours. In this way, the same in-stream video data will not be played repeatedly within 12 hours.
  • the interstitial video data can be sorted according to the time node, and the closer the time node is to the current time node, the more the sorted position can be.
  • the interstitial video data can be stored in an array. In the array, the higher the in-stream video data, the longer the corresponding time node is from the current time node.
  • there are 3 interstitial video data in the local cache corresponding to 12:04 on July 13, 2017, 15:14 on July 14, 2017, and July 16, 2017. 5:08 these three time nodes.
  • the first interstitial video data in the array can be read out as data to be pushed to the live server.
  • a plurality of candidate video data of the candidate may also be determined according to the current time node and the specified time threshold. For example, if the current time node is 12 o'clock on July 16, 2017, and the specified time threshold is 24 hours, then the latest time node corresponding to the candidate interstitial video data is 12 o'clock on July 15, 2017, and later than The in-stream video data of the time node cannot be played repeatedly. Therefore, as shown in FIG. 4, only the first interpolated video data and the second interpolated video data can be used as candidate interstitial video data. Then, one of the candidate plurality of interstitial video data can be randomly read as data to be pushed to the live server.
  • the pause command sent by the data collection client may further include duration information.
  • the duration information is used to pause the live broadcast data collected by the data collection client after the current time indicates the length of time represented by the duration information. For example, if the duration information is 10 seconds, it indicates that, after 10 seconds from the time when the pause instruction is generated, the data collection client stops acquiring live data from the camera and the microphone, and correspondingly, the live server The live data collected by the data collection client is suspended.
  • the duration information can be used to reserve the acquisition time of the interstitial video data to the live broadcast suspension device, so that the video data can be seamlessly connected after the current live video is paused.
  • the live broadcast suspension device may detect the current average download speed, which may be the average speed at which the live broadcast suspension device downloads resources from the specified resource library. In this way, based on the average download speed and the duration of the duration information, it is possible to determine the target data download amount that the live broadcast pause device can download within the duration information.
  • the average download speed may be 2 M/s
  • the duration information may be 10 seconds
  • the target data download amount may be 20 MB.
  • the live broadcast suspension device can download the probe data packet with a small amount of data from the specified resource pool according to a fixed period.
  • the live broadcast pause device can download a 1 MB probe data packet from the specified resource library every 10 seconds, and calculate the current download speed according to the speed at which the probe data packet is downloaded. Then, after receiving the pause command, the specified data amount calculated before the current time can be averaged to obtain the current average download speed.
  • the live broadcast suspension device may acquire the interstitial video data that is adapted to the target data download amount.
  • the matching of the interstitial video data with the target data download amount may mean that the data amount of the interstitial video data is less than or equal to the target data download amount.
  • the interstitial video data whose download data amount is closest to the target data download amount may be selected.
  • the pause instruction when the anchor command is issued by the anchor, the duration of the pause may also be specified together. Therefore, the pause instruction further includes a pause duration information, where the pause duration information is used to indicate the duration of the pause of playing the live broadcast data collected by the data collection client. For example, the pause duration information may be 5 minutes, then after 5 minutes pause, the live broadcast may continue to be started. In this way, after the pause command is obtained, the live broadcast suspension device can read at least one of the interstitial video data from the specified resource pool or the local cache according to the pause duration information contained therein; wherein the at least one interstitial video data corresponds to The sum of the play durations matches the duration of the pause duration information representation.
  • the matching between the sum of the playing durations and the duration of the pause duration information representation may indicate that the sum of the durations is greater than the duration of the pause duration information representation. For example, if the duration information is 5 minutes, the sum of the durations of the at least one piece of the inserted video data read from the specified resource library or the local cache may be greater than 5 minutes, thereby ensuring that the in-stream video can be continuously played during the pause period. data.
  • the broadcast video data may be pushed to the live broadcast server.
  • the live broadcast suspension device is a module in the data collection client
  • the data collection client may convert the inserted video data into live stream data after acquiring the inserted video data. And pushing the live stream data to the live server.
  • the live stream data may be data that follows a streaming protocol.
  • the streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
  • the live broadcast pause device may be a module in the data collection client, so that after the data acquisition client generates the pause command, the live broadcast data can be stopped from the camera and the microphone, but from the live broadcast pause device. Get in-stream video data.
  • the data collection client pushes the live broadcast server to insert video data.
  • the live server can push the interstitial video data to the user client according to the streaming media protocol.
  • the live broadcast pause device may be an independent device.
  • the data collection client may still provide live broadcast data to the live broadcast server in order not to disconnect from the live broadcast server.
  • the live broadcast suspension device also sends the interstitial video data to the live server.
  • the live broadcast server may suspend sending the live data currently collected by the data collection client to the user client, and send the split video data to the user client during the pause.
  • the play priority of the inserted video data may be higher than the play priority of the live data collected by the data collection client, so that the live broadcast server can preferentially play the inserted video data when receiving the two types of data at the same time.
  • the unsuspend instruction may be generated in the data collection client after the suspension is completed.
  • the cancel pause command can be sent to the live pause device.
  • the live broadcast suspension device may stop pushing the insertion video data to the live server in response to the cancel suspension instruction, so that the live broadcast server is to the user client.
  • the terminal sends the live data currently collected by the data collection client.
  • the present application further provides a live broadcast suspension device, which may include the following units.
  • the pause instruction receiving unit 100 is configured to receive a pause instruction sent by the data collection client; the data collection client is configured to provide the collected live broadcast data to the live broadcast server;
  • the interstitial video data acquiring unit 200 is configured to acquire the interstitial video data in response to the pause instruction;
  • the pushing unit 300 is configured to push the interstitial video data to the live broadcast server, so that the live broadcast server suspends sending the live broadcast data currently collected by the data collection client to the user client, and The user client sends the interstitial video data.
  • the pause command further includes duration information; wherein, after the duration of the duration information, the live broadcast server pauses playing the live broadcast data collected by the data collection client;
  • the in-stream video data acquiring unit includes:
  • a target data download amount determining module configured to detect a current average download speed, and determine a target data download amount based on the average download speed and a duration of the duration information representation
  • a data acquiring module configured to acquire the interpolated video data that is adapted to the target data download amount.
  • the pause command further includes pause duration information; wherein the pause duration information is used to indicate duration of time during which the live data collected by the data collection client is paused; correspondingly, the insert
  • the video data obtaining unit includes: a duration matching module, configured to read at least one of the interstitial video data from the specified resource library or the local cache; wherein the sum of the play durations and the pause duration information corresponding to the at least one interstitial video data The duration of the characterization matches.
  • the device further includes: a cancel instruction receiving unit, configured to receive a cancel pause command sent by the data collection client; and a stop push unit, configured to stop the move in response to the cancel pause command
  • the live broadcast server pushes the interstitial video data, so that the live broadcast server sends the live broadcast data currently collected by the data collection client to the user client.
  • the specific function of the live broadcast suspension device disclosed in the foregoing embodiment may be compared with the implementation manner of the live broadcast suspension method in the present application, and the implementation manner of the live suspension method of the present application may be implemented and the implementation method of the method may be implemented.
  • Technical effects may be compared with the implementation manner of the live broadcast suspension method in the present application, and the implementation manner of the live suspension method of the present application may be implemented and the implementation method of the method may be implemented.
  • the application also provides a live broadcast suspension method, which can be applied to a live broadcast server.
  • the method may include the following steps.
  • S21 Receive a live data request sent by the user client, and send the live data pointed by the live data request to the user client, where the live data is collected and uploaded by the data collection client.
  • the user client when the user client opens the website or application of the live broadcast platform, the user can send a live broadcast data request to the live broadcast server by clicking a certain anchor room or clicking a live broadcast screen of an anchor.
  • the live data request can point to the corresponding live data.
  • the live server can receive the live data request sent by the user client, and send the live data pointed to by the live data request to the user client.
  • the live data is collected and uploaded by the data collection client.
  • the data collection client may be connected to a camera, a microphone, or the like for collecting live data, or the data collection client itself may include a camera, a microphone, and the like.
  • the anchor starts to broadcast, the data collection client can establish a streaming connection with the live server. Since the data collection client needs to continuously push live data to the live server during the live broadcast, the stream connection may be a long connection.
  • the data collection client when the data collection client pushes the live data to the live server, it may determine in advance whether the live data is obtained from the camera and the microphone. If the anchor currently does not issue a pause command in the data collection client, the data collection client can obtain live data from the camera and the microphone. The data collection client can convert the obtained live data into a live data stream, and push the converted live data stream to the live server. In this way, the user client can obtain the live broadcast of the anchor from the live server.
  • the live data stream may be a data stream that follows a streaming media protocol.
  • the streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
  • the data collection client can pause to obtain live data from devices such as a camera and a microphone.
  • the data collection client can send the pause instruction to the live pause device, so that the live pause device can provide video data for live broadcast.
  • the interstitial video data for replacing the live broadcast data may be acquired.
  • the interstitial video data may be video material stored in advance by the anchor in the data collection client.
  • the video material may be, for example, a video highlight, an advertisement, a photo collection, and the like.
  • the in-stream video data may be uniformly stored in a specified resource library.
  • the specified resource library may be a folder or a database built based on a data structure.
  • the database may be, for example, MySQL, Oracle, DB2, Sybase, or the like.
  • the broadcast video data may be pushed to the live broadcast server.
  • the live broadcast server may suspend sending the live broadcast data to the user client, and push the interstitial video data to the user client during the pause.
  • the data collection client may send a cancel pause command to the live broadcast suspension device.
  • the live broadcast suspension device can stop pushing the interstitial video data to the live server in response to the cancel suspension instruction.
  • the live broadcast server cannot receive the interstitial video data sent by the live broadcast suspension device within a specified duration, it indicates that the pause phase has been ended, so that the data collection can be pushed to the user client. The live data currently collected by the client.
  • the live broadcast server may convert the received interstitial video data into live stream data, and push the user to the user client.
  • Live stream data may be a data stream that follows a streaming protocol.
  • the streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
  • the live broadcast server may also automatically push the interstitial video data to the user client when the live data is unavailable when the data collection client is abnormal. Specifically, when the live broadcast server cannot receive the live broadcast data uploaded by the data collection client within a specified duration, it indicates that the data collection client has an abnormality, and the live broadcast process needs to be suspended. At this time, the live broadcast server can read the locally stored interstitial video data and push the read interpolated video data to the user client.
  • the locally stored interstitial video data may be sent by the live pause device during a previous pause.
  • the live broadcast server can store the interstitial video data sent by the live broadcast pause device in the recent period. In order to save storage space, the interstitial video data that is far away from the current time can be automatically deleted. For example, the live server may only retain the in-stream video data sent by the live suspension device within the last 24 hours.
  • the live server can continue to push the live data uploaded by the data collection client to the user client.
  • the live broadcast server receives the live broadcast data uploaded by the data collection client in the process of pushing the broadcast video data read from the local device, it indicates that the data collection client has returned to normal at this time, thereby Stop pushing the in-stream video data to the user client, and start pushing the live data uploaded by the data collection client to the user client.
  • the present application further provides a live broadcast server, where the live broadcast server includes:
  • the live data sending unit 110 is configured to receive a live data request sent by the user client, and send the live data pointed by the live data request to the user client, where the live data is collected by the data collecting client. Upload
  • the interstitial video data sending unit 210 is configured to: when receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live broadcast data to the user client, and pushing the interstitial to the user client during the pause period Video data.
  • the live broadcast server further includes:
  • the live data resending unit is configured to: when the in-stream video data sent by the live broadcast suspension device is not received within a specified duration, push the live data currently collected by the data collection client to the user client.
  • the live broadcast server further includes:
  • a local reading unit configured to: when the live data uploaded by the data collection client cannot be received within a specified duration, read the locally stored interstitial video data, and push the read interpolated to the user client Video data.
  • the specific function of the live broadcast server disclosed in the foregoing embodiment may be compared with the implementation manner of the live broadcast suspension method applied in the live server in the present application, and the implementation manner of the live suspension method of the present application may be implemented and achieved.
  • the technical effect of the method embodiment may be compared with the implementation manner of the live broadcast suspension method applied in the live server in the present application, and the implementation manner of the live suspension method of the present application may be implemented and achieved. The technical effect of the method embodiment.
  • the present application further provides a live broadcast suspension system, where the system includes a data collection client, a direct broadcast suspension device, a live broadcast server, and a user client, where:
  • the data collection client is configured to provide the collected live broadcast data to the live broadcast server, and send a pause instruction to the live broadcast suspension device;
  • the live broadcast suspension device is configured to acquire the interstitial video data in response to the pause instruction; and push the interstitial video data to the live broadcast server;
  • the live broadcast server is configured to: after receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live data currently collected by the data collection client to the user client, and sending the data to the user during the pause period.
  • the client sends the interstitial video data.
  • the specific functions implemented by the data collection client, the live broadcast suspension device, the live broadcast server, and the user client may be interpreted in comparison with the implementation manner of the live suspension method described in the present application, and the implementation of the present application may be implemented.
  • the implementation method of the live suspension method and the technical effect of the method implementation method are achieved.
  • the data collection client can continue to maintain a communication connection with the live server without disconnecting from the live server.
  • the data collection client can provide the collected live data to the live server according to the previous communication connection, thereby reducing the time for re-establishing the connection with the live server and improving the efficiency of the live broadcast.
  • the live pause device can obtain the interstitial video data for replacing the live stream. Then, the live broadcast suspension device can push the interstitial video data to the live server.
  • the live broadcast server when the live broadcast server receives the inserted video data to be pushed, the broadcast video data can be pushed to the user client, so that when the data collection client pauses to obtain the live data stream from the anchor camera and the microphone, The live broadcast suspension device pushes the inserted video data to the live server to ensure that the live video played in the user client is not interrupted.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the logic steps can be used to make the client and the server use logic gates, switches, ASICs, and programmable logic. Controllers and embedded microcontrollers, etc., implement the same functionality.
  • a client, server can be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the present application can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk.
  • An optical disk, etc. includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present application or portions of the embodiments.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Landscapes

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

Abstract

Disclosed are a live broadcast pausing method and system, a live broadcast pausing apparatus, and a live broadcast server, wherein the method comprises: providing, at a data collection client, collected live broadcast data to a live broadcast server, so as to receive, when the live broadcast server pushes the live broadcast data to a user client, a pause instruction issued by an anchor; and in response to the pause instruction, the data collection client pausing, when same maintains a communication connection with the live broadcast server, collection of the live broadcast data. The technical solution provided in the present application can improve the efficiency of live broadcasting when the live broadcast is started again.

Description

直播暂停方法、系统、直播暂停装置及直播服务器Live pause method, system, live pause device and live server
本申请要求于2017年07月31日递交的申请号为201710637551.2、发明名称为“直播暂停方法、系统、直播暂停装置及直播服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on July 31, 2017, the application number is 201710637551.2, and the invention name is "live suspension method, system, live suspension device and live server", the entire contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本申请涉及互联网技术领域,特别涉及一种直播暂停方法、系统、直播暂停装置及直播服务器。The present application relates to the field of Internet technologies, and in particular, to a live broadcast suspension method, a system, a live broadcast suspension device, and a live broadcast server.
背景技术Background technique
随着互联网技术的不断发展,视频直播行业越来越多地受到人们关注。当前,在视频直播时,主播通常通过采集端采集需要直播的视频数据,然后采集端可以将视频数据发送至直播平台的服务器。这样,当用户的客户端中打开直播平台的网站或者应用时,便可以向直播平台的服务器发送直播视频获取请求。直播平台的服务器在接收到所述直播视频获取请求时,便可以向用户的客户端推送所述采集端上传的视频数据,从而实现从主播到用户的直播过程。With the continuous development of Internet technology, the video live broadcast industry has attracted more and more attention. Currently, when a live video is broadcast, the anchor usually collects video data that needs to be broadcasted through the collection end, and then the collection end can send the video data to the server of the live broadcast platform. In this way, when the website or the application of the live broadcast platform is opened in the client's client, the live video acquisition request can be sent to the server of the live broadcast platform. When receiving the live video acquisition request, the server of the live broadcast platform can push the video data uploaded by the collection terminal to the client of the user, thereby implementing a live broadcast process from the anchor to the user.
在直播过程中,主播有时候会不可避免地出现突发事件,从而会使得直播过程中止。例如,主播需要临时处理其它事情,便会暂停直播的过程。在暂停过程中,主播的采集端通常会中断向直播平台的服务器推送直播的数据流。在恢复直播后,采集端便需要再次与直播平台的服务器重新建立连接,以继续推送数据流。由此可见,当前这种通过中断数据流的方式来暂停直播过程,在重新开始直播时,需要花费较多的时间与直播服务器重新建立连接。During the live broadcast, the anchor sometimes inevitably has an emergency, which will cause the live broadcast process to be suspended. For example, if the anchor needs to temporarily handle other things, the live broadcast process will be suspended. During the suspension process, the collection end of the anchor usually interrupts the streaming of the live stream to the server of the live platform. After the live broadcast is resumed, the collection end needs to re-establish a connection with the server of the live broadcast platform to continue to push the data stream. It can be seen that the current suspension of the live stream by interrupting the data stream requires more time to re-establish the connection with the live server when the live broadcast is restarted.
发明内容Summary of the invention
本申请实施方式的目的是提供一种直播暂停方法、系统、直播暂停装置及直播服务器,能够在重新开始直播时,提高直播的效率。The purpose of the embodiment of the present application is to provide a live broadcast suspension method, a system, a live broadcast suspension device, and a live broadcast server, which can improve the efficiency of live broadcast when the live broadcast is restarted.
为实现上述目的,本申请实施方式提供一种直播暂停方法,所述方法包括:在数据采集客户端向直播服务器提供采集的直播数据,以使得所述直播服务器将所述直播数据推送给用户客户端的情况下,接收主播下达的暂停指令;响应于所述暂停指令,所述数据采集客户端在与所述直播服务器保持通信连接的情况下,暂停采集直播数据。To achieve the above objective, the embodiment of the present application provides a method for suspending a live broadcast, where the method includes: providing a live broadcast data to a live broadcast server at a data collection client, so that the live broadcast server pushes the live broadcast data to a user client. In the case of the terminal, the pause command issued by the anchor is received; in response to the pause command, the data collection client pauses to collect the live broadcast data while maintaining a communication connection with the live server.
为实现上述目的,本申请实施方式还提供一种直播暂停装置,所述装置包括:暂停指令接收单元,用于接收数据采集客户端发来的暂停指令;所述数据采集客户端用于向直播服务器提供采集的直播数据;插播视频数据获取单元,用于响应于所述暂停指令,获取插播视频数据;推送单元,用于将所述插播视频数据推送至所述直播服务器,以使得所述直播服务器暂停向用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。To achieve the above objective, the embodiment of the present application further provides a live broadcast suspension device, where the device includes: a pause instruction receiving unit, configured to receive a pause instruction sent by a data collection client; and the data collection client is used to broadcast to the live broadcast The server provides the collected live data; the interstitial video data acquiring unit is configured to obtain the interstitial video data in response to the pause instruction, and the pushing unit is configured to push the interstitial video data to the live broadcast server, so that the live broadcast The server pauses to send the live data currently collected by the data collection client to the user client, and sends the split video data to the user client during the pause.
为实现上述目的,本申请实施方式还提供一种直播暂停方法,所述方法包括:接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据;其中,所述直播数据由数据采集客户端采集并上传;当接收到直播暂停装置发来的插播视频数据时,暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。To achieve the above objective, the embodiment of the present application further provides a live broadcast suspension method, where the method includes: receiving a live data request sent by a user client, and sending the live data pointed by the live data request to the user client. The live broadcast data is collected and uploaded by the data collection client; when the broadcast video data sent by the live broadcast suspension device is received, the live broadcast data is suspended from being sent to the user client, and is The user client pushes the interstitial video data.
为实现上述目的,本申请实施方式还提供一种直播服务器,所述直播服务器包括:直播数据发送单元,用于接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据;其中,所述直播数据由数据采集客户端采集并上传;插播视频数据发送单元,用于当接收到直播暂停装置发来的插播视频数据时,暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。To achieve the above objective, the embodiment of the present application further provides a live broadcast server, where the live broadcast server includes: a live broadcast data sending unit, configured to receive a live data request sent by a user client, and send the content to the user client. The live data pointed to by the live data request; wherein the live data is collected and uploaded by the data collection client; the inserted video data sending unit is configured to pause to the user when receiving the inserted video data sent by the live suspension device The client sends the live broadcast data and pushes the interstitial video data to the user client during a pause.
为实现上述目的,本申请实施方式还提供一种直播暂停系统,所述系统包括数据采集客户端、直播暂停装置、直播服务器以及用户客户端,其中:所述数据采集客户端,用于向所述直播服务器提供采集的直播数据,并向所述直播暂停装置发送暂停指令;所述直播暂停装置,用于响应于所述暂停指令,获取插播视频数据;将所述插播视频数据推送至所述直播服务器;所述直播服务器,用于在接收到所述直播暂停装置发送的插播视频数据后,暂停向所述用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。To achieve the above objective, the embodiment of the present application further provides a live broadcast suspension system, where the system includes a data collection client, a live broadcast suspension device, a live broadcast server, and a user client, where: the data collection client is used for The live broadcast server provides the collected live broadcast data, and sends a pause command to the live broadcast pause device; the live broadcast pause device is configured to acquire the split video data in response to the pause instruction; push the split video data to the a live broadcast server, configured to: after receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live data currently collected by the data collection client to the user client, and The user client sends the interstitial video data.
由上可见,本申请的数据采集客户端在下达暂停指令后,数据采集客户端可以继续与直播服务器保持通信连接,而不会与直播服务器断开连接。这样,当再次恢复直播时,数据采集客户端可以按照之前的通信连接向直播服务器提供采集的直播数据,从而减少了与直播服务器重新建立连接的时间,提高了直播的效率。此外,直播暂停装置可以获取用于替代直播数据流的插播视频数据。然后,所述直播暂停装置可以将所述插播视频数据向直播服务器推送。这样,当直播服务器接收到推送至的插播视频数据时,便可以 向用户客户端推送该插播视频数据,从而使得在数据采集客户端暂停从主播的摄像头和麦克风获取直播数据流时,可以由所述直播暂停装置向直播服务器推送插播视频数据,以保证用户客户端中播放的直播画面不会中断。It can be seen from the above that after the data collection client of the present application issues the pause command, the data collection client can continue to maintain a communication connection with the live server without disconnecting from the live server. In this way, when the live broadcast is resumed, the data collection client can provide the collected live data to the live server according to the previous communication connection, thereby reducing the time for re-establishing the connection with the live server and improving the efficiency of the live broadcast. In addition, the live broadcast suspension device can acquire the interstitial video data for replacing the live data stream. Then, the live broadcast suspension device can push the interstitial video data to the live server. In this way, when the live broadcast server receives the inserted video data to be pushed, the broadcast video data can be pushed to the user client, so that when the data collection client pauses to obtain the live data stream from the anchor camera and the microphone, The live broadcast suspension device pushes the inserted video data to the live server to ensure that the live video played in the user client is not interrupted.
附图说明DRAWINGS
为了更清楚地说明本申请实施方式或现有技术中的技术方案,下面将对实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a few embodiments described in the present application, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本申请实施方式中直播暂停方法的步骤图;FIG. 1 is a schematic diagram of a method for suspending a live broadcast in an embodiment of the present application;
图2为本申请实施方式中直播暂停方法的流程图;2 is a flowchart of a method for suspending a live broadcast in an embodiment of the present application;
图3为本申请实施方式中直播暂停方法的交互图;3 is an interaction diagram of a live suspension method in an embodiment of the present application;
图4为本申请实施方式中插播视频数据的存储示意图;4 is a schematic diagram of storage of interstitial video data in an embodiment of the present application;
图5为本申请实施方式中直播暂停装置的结构示意图;FIG. 5 is a schematic structural diagram of a live broadcast suspension device according to an embodiment of the present application;
图6为本申请另一个实施方式中直播暂停方法的步骤图;6 is a sequence diagram of a method for suspending a live broadcast according to another embodiment of the present application;
图7为本申请实施方式中直播服务器的结构示意图;7 is a schematic structural diagram of a live broadcast server according to an embodiment of the present application;
图8为本申请实施方式中直播暂停系统的交互图。FIG. 8 is an interaction diagram of a live suspension system in an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施方式中的附图,对本申请实施方式中的技术方案进行清楚、完整地描述,显然,所描述的实施方式仅仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. The embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope shall fall within the scope of the application.
本申请实施方式提供一种直播暂停方法,所述方法可以应用于服务器和客户端的系统架构中。所述服务器可以是直播平台的业务服务器,所述客户端可以是用于采集主播的直播数据的数据采集客户端,还可以是用于向用户展示直播画面的用户客户端。其中,所述直播平台例如可以是斗鱼、虎牙、战旗等平台。在本实施方式中,所述服务器可以为一个具有数据运算、存储功能以及网络交互功能的电子设备;也可以为运行于该电子设备中,为数据处理、存储和网络交互提供支持的软件。在本实施方式中并不具体限定 所述服务器的数量。所述服务器可以为一个服务器,还可以为几个服务器,或者,若干服务器形成的服务器集群。The embodiment of the present application provides a live broadcast suspension method, which can be applied to a system architecture of a server and a client. The server may be a service server of the live broadcast platform, and the client may be a data collection client for collecting live broadcast data of the anchor, or a user client for displaying the live broadcast screen to the user. The live broadcast platform may be, for example, a platform such as a betta, a tiger tooth, or a battle flag. In this embodiment, the server may be an electronic device having a data operation, a storage function, and a network interaction function; or may be software running in the electronic device to provide support for data processing, storage, and network interaction. The number of the servers is not specifically limited in the present embodiment. The server may be a server, or may be several servers, or a server cluster formed by several servers.
在本实施方式中,所述客户端可以是具备数据采集功能、数据播放功能以及网络通信功能的电子设备。具体地,所述客户端例如可以是台式电脑、平板电脑、笔记本电脑、智能手机、数字助理、智能可穿戴设备、导购终端、具有网络访问功能的电视机等。或者,所述客户端也可以为能够运行于上述电子设备中的软件。具体的,所述客户端可以为直播平台提供的在电子设备中运行的爱奇艺、AcFun、斗鱼等应用。In this embodiment, the client may be an electronic device having a data collection function, a data playback function, and a network communication function. Specifically, the client may be, for example, a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television set with network access function, or the like. Alternatively, the client may also be software capable of running in the above electronic device. Specifically, the client may be an application such as iQiyi, AcFun, betta, etc. running in an electronic device provided by the live broadcast platform.
本申请提供一种直播暂停方法,所述方法可以应用于数据采集客户端中,所述方法包括以下步骤。The present application provides a live broadcast suspension method, which may be applied to a data collection client, and the method includes the following steps.
S10:在数据采集客户端向直播服务器提供采集的直播数据,以使得所述直播服务器将所述直播数据推送给用户客户端的情况下,接收主播下达的暂停指令。S10: The collected data is provided to the live broadcast server by the data collection client, so that the live broadcast server sends the live broadcast data to the user client, and receives the pause command issued by the anchor.
S20:响应于所述暂停指令,所述数据采集客户端在与所述直播服务器保持通信连接的情况下,暂停采集直播数据。S20: In response to the pause instruction, the data collection client pauses collecting live data while maintaining a communication connection with the live server.
在本实施方式中,数据采集客户端可以采集与主播相关的直播数据,该直播数据在采集之后可以由数据采集客户端推送至直播平台的直播服务器中。这样,当用户客户端向直播服务器发送指向该主播的直播加载请求时,直播服务器便可以将该主播的数据采集客户端当前采集的直播数据推送给用户客户端,从而在用户客户端上进行展示主播的直播画面。In this embodiment, the data collection client may collect live data related to the anchor, and the live data may be pushed by the data collection client to the live server of the live platform after the collection. In this way, when the user client sends a live broadcast request to the live broadcast server to the live broadcast server, the live broadcast server can push the live data collected by the data collection client of the anchor to the user client to display on the user client. The live broadcast of the anchor.
在本实施方式中,当主播需要暂停直播时,可以在数据采集客户端中下达暂停指令。数据采集客户端在接收到主播下达的暂停指令后,可以暂停采集与主播相关的直播数据。但是,数据采集客户端可以继续保持与所述直播服务器之间的通信连接。此时,数据采集客户端可以不向直播服务器推送直播数据,这样直播服务器便无法向用户客户端提供对应的直播数据,用户客户端中可能显示的是黑屏。当然,在实际应用场景中,当主播下达了暂停指令后,数据采集客户端可以向直播服务器发送该暂停指令,这样,直播服务器便可以按照已经设置的播放规则,向用户客户端持续提供数据采集客户端提供的最后一帧画面。当然,直播服务器还可以向用户客户端发送用于表征主播暂离的视频信息。例如,用户客户端中可以显示为主播直播的最后一帧画面或者黑屏,在该画面或者黑屏中可以显示“主播暂离,请稍等”的字样。In this embodiment, when the anchor needs to pause the live broadcast, a pause command may be issued in the data collection client. After receiving the pause command issued by the anchor, the data collection client may pause to collect the live data related to the anchor. However, the data collection client can continue to maintain a communication connection with the live server. At this time, the data collection client may not push the live data to the live server, so that the live server cannot provide the corresponding live data to the user client, and the user client may display a black screen. Of course, in the actual application scenario, after the anchor sends the pause command, the data collection client can send the pause command to the live server, so that the live server can continuously provide data collection to the user client according to the already set play rules. The last frame of the screen provided by the client. Of course, the live server can also send video information for characterizing the anchor of the anchor to the user client. For example, the user client can display the last frame of the live broadcast or the black screen. On the screen or the black screen, the words "Host off, please wait" can be displayed.
在本实施方式中,当主播结束暂离过程,可以向数据采集客户端下达取消暂停指令,这样,在接收到所述主播下达的取消暂停指令后,所述数据采集客户端可以重新采集直 播数据,并通过之前保持的所述通信连接向所述直播服务器提供重新采集的直播数据,从而可以减少与直播服务器重新建立连接所耗费的时间,提高了直播的效率。In this embodiment, when the anchor ends the temporary leaving process, the data acquisition client may issue a cancel pause command, so that after receiving the cancel pause command issued by the anchor, the data collection client may re-collect the live data. And providing the re-collected live broadcast data to the live broadcast server by using the previously communicated communication connection, thereby reducing the time taken for re-establishing the connection with the live broadcast server, and improving the efficiency of the live broadcast.
本申请实施方式提供的直播暂停方法,还可以应用于直播暂停装置中。需要说明的是,在本实施方式中,所述直播暂停装置可以是与所述数据采集客户端保持数据通信的独立设备,所述直播暂停装置通常可以与所述数据采集客户端处于同一个局域网络中,从而使得所述直播暂停装置与所述数据采集客户端之间能够具备较好的网络环境以及较快的数据传输速度。此外,所述直播暂停装置还可以是集成于所述数据采集客户端中的一个模块,这样,所述数据采集客户端在向直播服务器推送直播数据时,可以先判断是否从摄像头和麦克风中获取主播的直播数据。如果当前没有暂停直播,便可以直接从摄像头和麦克风中获取主播的直播数据,并将获取的直播数据推送给直播服务器。如果当前处于暂停直播的状态,便可以通过直播暂停装置获取插播视频数据,并向直播服务器推送该插播视频数据。这样,数据采集客户端便可以在暂停过程中,不需要中断向直播服务器发送数据流。The live broadcast suspension method provided by the embodiment of the present application can also be applied to a live broadcast suspension device. It should be noted that, in this implementation manner, the live broadcast suspension device may be an independent device that maintains data communication with the data collection client, and the live broadcast suspension device may be in the same local area network as the data collection client. In the network, the live suspension device and the data collection client can have a better network environment and faster data transmission speed. In addition, the live broadcast suspension device may also be a module integrated in the data collection client, so that when the data collection client pushes live data to the live server, it may first determine whether to obtain from the camera and the microphone. Live broadcast data of the anchor. If the live broadcast is not currently paused, the live broadcast data of the anchor can be obtained directly from the camera and the microphone, and the obtained live broadcast data is pushed to the live broadcast server. If the current live broadcast status is available, the broadcast video data can be acquired by the live broadcast pause device, and the split video data can be pushed to the live broadcast server. In this way, the data collection client can send data streams to the live server without interrupting during the pause process.
请参阅图1和图2,在接收主播下达的暂停指令之后,所述方法还可以包括以下步骤。Referring to FIG. 1 and FIG. 2, after receiving the pause command issued by the anchor, the method may further include the following steps.
S11:响应于所述暂停指令,获取插播视频数据。S11: Acquire the interstitial video data in response to the pause instruction.
在本实施方式中,所述数据采集客户端可以与用于采集直播数据的摄像头、麦克风等设备相连,或者所述数据采集客户端本身可以包括摄像头、麦克风等设备。主播在开始直播时,数据采集客户端可以与直播服务器建立流连接。由于直播过程中数据采集客户端需要持续向直播服务器推送直播数据,因此所述流连接可以是长连接。In this embodiment, the data collection client may be connected to a camera, a microphone, or the like for collecting live data, or the data collection client itself may include a camera, a microphone, and the like. When the anchor starts to broadcast, the data collection client can establish a streaming connection with the live server. Since the data collection client needs to continuously push live data to the live server during the live broadcast, the stream connection may be a long connection.
在本实施方式中,数据采集客户端在向直播服务器推送直播数据时,可以预先进行判断,是否从摄像头和麦克风中获取直播数据。如果主播当前在数据采集客户端中没有下达暂停指令,数据采集客户端便可以从摄像头和麦克风中获取直播数据。数据采集客户端便可以将获取的直播数据转换为直播数据流,并向直播服务器推送该转换得到的直播数据流。这样,用户客户端便可以从直播服务器中获取到该主播的直播画面。其中,所述直播数据流可以是遵循流媒体协议的数据流。所述流媒体协议例如可以是RTP(Real-time Transport Protocol,实时传输协议)、RTCP(Real-time Transport Control Protocol,实时传输控制协议)、SRTP(Secure Real-time Transport Protocol,安全实时传输协议)等。In this embodiment, when the data collection client pushes the live data to the live server, it may determine in advance whether the live data is obtained from the camera and the microphone. If the anchor currently does not issue a pause command in the data collection client, the data collection client can obtain live data from the camera and the microphone. The data collection client can convert the obtained live data into a live data stream, and push the converted live data stream to the live server. In this way, the user client can obtain the live broadcast of the anchor from the live server. The live data stream may be a data stream that follows a streaming media protocol. The streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
在本实施方式中,如果主播在数据采集客户端中下达了暂停指令,数据采集客户端 便可以暂停从摄像头和麦克风等设备中获取直播数据。为了能够向直播服务器继续推送直播数据流,此时数据采集客户端可以向直播暂停装置发送该暂停指令,以使得所述直播暂停装置可以提供用于直播的视频数据。In this embodiment, if the anchor sends a pause command in the data collection client, the data collection client can pause to obtain live data from devices such as a camera and a microphone. In order to continue to push the live data stream to the live server, the data collection client can send the pause instruction to the live pause device, so that the live pause device can provide video data for live broadcast.
在本实施方式中,所述暂停指令可以是主播在数据采集客户端中下达的。此外,在其它应用场景中,数据采集客户端还可以针对特定的情况,自动生成暂停指令。In this embodiment, the pause instruction may be that the anchor is released in the data collection client. In addition, in other application scenarios, the data collection client can automatically generate a pause instruction for a specific situation.
在本申请一个实施方式中,数据采集客户端可以优先从摄像头和麦克风中获取直播数据,然后可以对获取的直播数据进行检测,从而判断当前是否生成暂停指令。具体地,当所述数据采集客户端在第一指定时长内采集的直播数据所展示的画面均相同时,可以生成暂停指令。在本实施方式中,所述第一指定时长可以是数据采集客户端中预先设定的时长,该时长可以根据实际场景进行调整。例如,所述第一指定时长可以是10秒,那么在10秒中内,如果摄像头采集到的画面都是相同的,则表明此时主播可能离开了摄像头拍摄的范围,当前已经没有实质的直播内容,那么数据采集客户端便可以自动生成暂停指令。在本实施方式中,可以通过判断第一指定时长内采集的直播数据是否相同,从而判定所述第一指定时长内展示的画面是否相同。In an embodiment of the present application, the data collection client may preferentially obtain live data from the camera and the microphone, and then may detect the obtained live data to determine whether a pause command is currently generated. Specifically, when the data displayed by the data collection client during the first specified duration is the same, the pause instruction may be generated. In this embodiment, the first specified duration may be a preset duration in the data collection client, and the duration may be adjusted according to an actual scenario. For example, the first specified duration may be 10 seconds, then within 10 seconds, if the images collected by the camera are the same, it indicates that the anchor may leave the range of the camera shooting, and there is no actual live broadcast. Content, then the data collection client can automatically generate a pause command. In this embodiment, it may be determined whether the pictures displayed in the first specified duration are the same by determining whether the live broadcast data collected within the first specified duration is the same.
在本申请一个实施方式中,如果摄像头出现问题,无法采集到主播的直播数据,那么数据采集客户端就无法获取到直播数据。这样,在本实施方式中,当所述数据采集客户端在第二指定时长内均无法采集到直播数据时,也可以生成暂停指令。所述第二指定时长可以是数据采集客户端中预先设定的时长,该时长可以根据实际场景进行调整。例如,所述第二指定时长可以是3秒,那么在3秒中内,数据采集客户端一直无法采集到直播数据时,便可以生成暂停指令,以由直播暂停装置提供直播数据。In an embodiment of the present application, if the camera has a problem and the live broadcast data of the anchor cannot be collected, the data collection client cannot obtain the live broadcast data. In this way, in the embodiment, when the data collection client cannot collect live data within the second specified duration, a pause command may also be generated. The second specified duration may be a preset duration in the data collection client, and the duration may be adjusted according to an actual scenario. For example, the second specified duration may be 3 seconds. When the data collection client has been unable to collect live data in 3 seconds, a pause command may be generated to provide live broadcast data by the live pause device.
请一并参阅图3,在本实施方式中,当直播暂停装置接收到所述暂停指令时,便可以获取用于替代直播数据的插播视频数据。所述插播视频数据可以是主播预先在数据采集客户端中存储的视频素材。所述视频素材例如可以是视频集锦、广告、图片集等资源。所述插播视频数据可以统一存储于指定资源库中。所述指定资源库可以是文件夹,也可以是基于数据结构建立的数据库。所述数据库例如可以是MySQL、Oracle、DB2、Sybase等。Referring to FIG. 3 together, in the embodiment, when the live pause device receives the pause command, the interstitial video data for replacing the live broadcast data may be acquired. The interstitial video data may be video material stored in advance by the anchor in the data collection client. The video material may be, for example, a video highlight, an advertisement, a photo collection, and the like. The in-stream video data may be uniformly stored in a specified resource library. The specified resource library may be a folder or a database built based on a data structure. The database may be, for example, MySQL, Oracle, DB2, Sybase, or the like.
在本实施方式中,直播暂停装置除了可以从指定资源库中获取插播视频数据,还可以从本地缓存中读取插播视频数据。所述本地缓存中的插播视频数据可以是上一次或者前几次暂停时读取的插播视频数据。这样,直播暂停装置直接从本地缓存中读取插播视频数据,能够提高数据的读取速度。In this embodiment, the live broadcast suspension device can read the interstitial video data from the local cache in addition to the interpolated video data from the specified resource library. The interstitial video data in the local cache may be interstitial video data that was read during the previous or previous pauses. In this way, the live broadcast suspension device directly reads the interstitial video data from the local cache, thereby improving the data reading speed.
在本申请一个实施方式中,本地缓存或者指定资源库中的插播视频数据可以与时间节点相关联,所述时间节点用于表征所述插播视频数据最近一次被读取的时间节点。为了在暂停时播放的插播视频数据不会在短时间内重复,可以基于时间节点有选择地读取插播视频数据。具体地,直播暂停装置可以从距离当前时间节点超过指定时间阈值的时间节点关联的插播视频数据中获取用于推送至所述直播服务器的插播视频数据。所述指定时间阈值可以是预先设置的时长。例如,所述指定时间阈值可以为12小时。这样,在12小时之内,同一个插播视频数据便不会被重复播放。在指定资源库或者本地缓存中,插播视频数据可以按照时间节点进行排序,时间节点越接近当前时间节点,排序的位置可以越靠后。具体地,请参阅图4,插播视频数据可以按照数组进行存储。在数组中,越靠前的插播视频数据,对应的时间节点距离当前时间节点越久。例如,如图4所示,在本地缓存中共有3个插播视频数据,分别对应着2017年7月13日12点04分、2017年7月14日15点14分、2017年7月16日5点08分这三个时间节点。那么在从本地缓存中读取插播视频数据时,可以将数组中的第一个插播视频数据读取出来,作为即将向直播服务器推送的数据。此外,还可以根据当前时间节点与所述指定时间阈值,确定出候选的多个插播视频数据。例如,当前时间节点为2017年7月16日12点,所述指定时间阈值为24小时,那么候选的插播视频数据对应的最晚的时间节点为2017年7月15日12点,再晚于该时间节点的插播视频数据便不可以重复播放。因此,如图4所示中,只有第一插播视频数据和第二插播视频数据可以作为候选的插播视频数据。然后,可以从候选的多个插播视频数据中随机读取一个,作为即将向直播服务器推送的数据。In one embodiment of the present application, the local cache or the interstitial video data in the specified repository may be associated with a time node that is used to characterize the time node at which the interstitial video data was last read. In order for the interstitial video data played during pause to not repeat in a short time, the interstitial video data can be selectively read based on the time node. Specifically, the live broadcast suspension device may acquire the interstitial video data for pushing to the live broadcast server from the interstitial video data associated with the time node whose current time node exceeds the specified time threshold. The specified time threshold may be a preset duration. For example, the specified time threshold can be 12 hours. In this way, the same in-stream video data will not be played repeatedly within 12 hours. In the specified resource library or local cache, the interstitial video data can be sorted according to the time node, and the closer the time node is to the current time node, the more the sorted position can be. Specifically, referring to Figure 4, the interstitial video data can be stored in an array. In the array, the higher the in-stream video data, the longer the corresponding time node is from the current time node. For example, as shown in Figure 4, there are 3 interstitial video data in the local cache, corresponding to 12:04 on July 13, 2017, 15:14 on July 14, 2017, and July 16, 2017. 5:08 these three time nodes. Then, when the interstitial video data is read from the local cache, the first interstitial video data in the array can be read out as data to be pushed to the live server. In addition, a plurality of candidate video data of the candidate may also be determined according to the current time node and the specified time threshold. For example, if the current time node is 12 o'clock on July 16, 2017, and the specified time threshold is 24 hours, then the latest time node corresponding to the candidate interstitial video data is 12 o'clock on July 15, 2017, and later than The in-stream video data of the time node cannot be played repeatedly. Therefore, as shown in FIG. 4, only the first interpolated video data and the second interpolated video data can be used as candidate interstitial video data. Then, one of the candidate plurality of interstitial video data can be randomly read as data to be pushed to the live server.
在本申请一个实施方式中,数据采集客户端发来的暂停指令中,还可以包括时长信息。所述时长信息的作用在于:从当前时刻开始,经过所述时长信息表征的时长后,所述直播服务器暂停播放所述数据采集客户端采集的直播数据。例如,所述时长信息为10秒,那么就表明,从所述暂停指令生成的时刻开始,再经过10秒钟,数据采集客户端便停止从摄像头和麦克风处获取直播数据,相应地,直播服务器便暂停播放所述数据采集客户端采集的直播数据。所述时长信息可以用于给直播暂停装置预留出插播视频数据的获取时间,从而使得在暂停播放当前的直播视频后,能够无缝衔接上插播视频数据。在本实施方式中,直播暂停装置可以检测当前的平均下载速度,所述平均下载速度可以是直播暂停装置从指定资源库中下载资源的平均速度。这样,基于所述平均下载速度和所述时长信息表征的时长,从而可以确定在所述时长信息内,直播暂停装置能够下载的目标数据下载量。例如,所述平均下载速度可以是2M/s,所述时长信息可以是10秒,那 么所述目标数据下载量可以是20MB。在本实施方式中,直播暂停装置可以按照固定周期从指定资源库中下载数据量较小的探测数据包。例如,直播暂停装置可以每隔10秒,从指定资源库中下载1MB的探测数据包,并根据下载探测数据包的速度,来计算当前的下载速度。然后,在接收到暂停指令后,可以将当前时刻之前计算的指定数据量个下载速度求取平均值,从而得到当前的平均下载速度。在本实施方式中,直播暂停装置在确定了所述目标数据下载量后,可以获取与所述目标数据下载量相适配的插播视频数据。其中,插播视频数据与目标数据下载量相适配可以指插播视频数据的数据量小于或者等于所述目标数据下载量。当然,在实际应用场景中,为了充分利用预留的所述时长信息表征的时长,可以选择下载数据量最接近所述目标数据下载量的插播视频数据。In an embodiment of the present application, the pause command sent by the data collection client may further include duration information. The duration information is used to pause the live broadcast data collected by the data collection client after the current time indicates the length of time represented by the duration information. For example, if the duration information is 10 seconds, it indicates that, after 10 seconds from the time when the pause instruction is generated, the data collection client stops acquiring live data from the camera and the microphone, and correspondingly, the live server The live data collected by the data collection client is suspended. The duration information can be used to reserve the acquisition time of the interstitial video data to the live broadcast suspension device, so that the video data can be seamlessly connected after the current live video is paused. In this embodiment, the live broadcast suspension device may detect the current average download speed, which may be the average speed at which the live broadcast suspension device downloads resources from the specified resource library. In this way, based on the average download speed and the duration of the duration information, it is possible to determine the target data download amount that the live broadcast pause device can download within the duration information. For example, the average download speed may be 2 M/s, and the duration information may be 10 seconds, and the target data download amount may be 20 MB. In this embodiment, the live broadcast suspension device can download the probe data packet with a small amount of data from the specified resource pool according to a fixed period. For example, the live broadcast pause device can download a 1 MB probe data packet from the specified resource library every 10 seconds, and calculate the current download speed according to the speed at which the probe data packet is downloaded. Then, after receiving the pause command, the specified data amount calculated before the current time can be averaged to obtain the current average download speed. In this embodiment, after determining the target data download amount, the live broadcast suspension device may acquire the interstitial video data that is adapted to the target data download amount. The matching of the interstitial video data with the target data download amount may mean that the data amount of the interstitial video data is less than or equal to the target data download amount. Of course, in an actual application scenario, in order to make full use of the reserved duration of the duration information representation, the interstitial video data whose download data amount is closest to the target data download amount may be selected.
在本申请一个实施方式中,在主播下达暂停指令时,还可以一并指定暂停持续的时长。因此,所述暂停指令中还包括暂停时长信息,所述暂停时长信息用于表征暂停播放所述数据采集客户端采集的直播数据所持续的时长。例如,所述暂停时长信息可以是5分钟,那么在暂停5分钟之后,可以继续开始直播。这样,直播暂停装置在获取到所述暂停指令后,可以根据其中包含的暂停时长信息,从指定资源库中或者本地缓存中读取至少一个插播视频数据;其中,所述至少一个插播视频数据对应的播放时长之和与所述暂停时长信息表征的时长相匹配。其中,播放时长之和与所述暂停时长信息表征的时长相匹配可以指时长之和大于所述暂停时长信息表征的时长。例如,所述时长信息为5分钟,那么从指定资源库中或者本地缓存中读取的至少一个插播视频数据的时长之和可以大于5分钟,从而能够保证在暂停期间能够持续不断地播放插播视频数据。In an embodiment of the present application, when the anchor command is issued by the anchor, the duration of the pause may also be specified together. Therefore, the pause instruction further includes a pause duration information, where the pause duration information is used to indicate the duration of the pause of playing the live broadcast data collected by the data collection client. For example, the pause duration information may be 5 minutes, then after 5 minutes pause, the live broadcast may continue to be started. In this way, after the pause command is obtained, the live broadcast suspension device can read at least one of the interstitial video data from the specified resource pool or the local cache according to the pause duration information contained therein; wherein the at least one interstitial video data corresponds to The sum of the play durations matches the duration of the pause duration information representation. The matching between the sum of the playing durations and the duration of the pause duration information representation may indicate that the sum of the durations is greater than the duration of the pause duration information representation. For example, if the duration information is 5 minutes, the sum of the durations of the at least one piece of the inserted video data read from the specified resource library or the local cache may be greater than 5 minutes, thereby ensuring that the in-stream video can be continuously played during the pause period. data.
S13:将所述插播视频数据推送至所述直播服务器,以使得所述直播服务器暂停向用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。S13: Push the in-stream video data to the live broadcast server, so that the live broadcast server pauses to send the live broadcast data currently collected by the data collection client to the user client, and sends the live broadcast data to the user client during the pause period. The interstitial video data.
在本实施方式中,直播暂停装置在获取到插播视频数据后,便可以将所述插播视频数据推送至所述直播服务器。当然,在实际应用场景中,所述直播暂停装置如果是数据采集客户端中的一个模块,那么在获取到插播视频数据后,可以由数据采集客户端将所述插播视频数据转换为直播流数据,并向所述直播服务器推送所述直播流数据。所述直播流数据可以是遵循流媒体协议的数据。所述流媒体协议例如可以是RTP(Real-time Transport Protocol,实时传输协议)、RTCP(Real-time Transport Control Protocol,实时传输控制协议)、SRTP(Secure Real-time Transport Protocol,安全实时传输协议)等。In this embodiment, after the live broadcast pause device obtains the interstitial video data, the broadcast video data may be pushed to the live broadcast server. Of course, in the actual application scenario, if the live broadcast suspension device is a module in the data collection client, the data collection client may convert the inserted video data into live stream data after acquiring the inserted video data. And pushing the live stream data to the live server. The live stream data may be data that follows a streaming protocol. The streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
在一个应用场景中,直播暂停装置可以是数据采集客户端中的一个模块,这样,数 据采集客户端生成暂停指令后,便可以停止从摄像头和麦克风处获取直播数据,而是从直播暂停装置处获取插播视频数据。这样,数据采集客户端推送给直播服务器的便是插播视频数据。此时,直播服务器可以按照流媒体协议,向用户客户端推送插播视频数据。In an application scenario, the live broadcast pause device may be a module in the data collection client, so that after the data acquisition client generates the pause command, the live broadcast data can be stopped from the camera and the microphone, but from the live broadcast pause device. Get in-stream video data. In this way, the data collection client pushes the live broadcast server to insert video data. At this time, the live server can push the interstitial video data to the user client according to the streaming media protocol.
在另一个应用场景中,直播暂停装置可以是独立的设备,此时,在生成暂停指令后,数据采集客户端为了不与直播服务器断开连接,可以依然向直播服务器提供直播数据。但是,此时直播暂停装置也会一并向直播服务器发送插播视频数据。在同时接收到两个视频数据的情况下,直播服务器可以暂停向用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。在具体实施时,插播视频数据的播放优先级可以高于数据采集客户端采集的直播数据的播放优先级,这样,直播服务器在同时接收到这两种数据时,可以优先播放插播视频数据。In another application scenario, the live broadcast pause device may be an independent device. At this time, after the pause command is generated, the data collection client may still provide live broadcast data to the live broadcast server in order not to disconnect from the live broadcast server. However, at this time, the live broadcast suspension device also sends the interstitial video data to the live server. In the case that two video data are received at the same time, the live broadcast server may suspend sending the live data currently collected by the data collection client to the user client, and send the split video data to the user client during the pause. In a specific implementation, the play priority of the inserted video data may be higher than the play priority of the live data collected by the data collection client, so that the live broadcast server can preferentially play the inserted video data when receiving the two types of data at the same time.
在本申请一个实施方式中,在暂停结束之后,数据采集客户端中可以生成取消暂停指令。该取消暂停指令可以发送至直播暂停装置。在接收所述数据采集客户端发来的取消暂停指令后,直播暂停装置可以响应于所述取消暂停指令,停止向所述直播服务器推送插播视频数据,以使得所述直播服务器向所述用户客户端发送所述数据采集客户端当前采集的直播数据。In one embodiment of the present application, the unsuspend instruction may be generated in the data collection client after the suspension is completed. The cancel pause command can be sent to the live pause device. After receiving the cancel suspension instruction sent by the data collection client, the live broadcast suspension device may stop pushing the insertion video data to the live server in response to the cancel suspension instruction, so that the live broadcast server is to the user client. The terminal sends the live data currently collected by the data collection client.
请参阅图5,本申请还提供一种直播暂停装置,所述装置可以包括以下单元。Referring to FIG. 5, the present application further provides a live broadcast suspension device, which may include the following units.
暂停指令接收单元100,用于接收数据采集客户端发来的暂停指令;所述数据采集客户端用于向直播服务器提供采集的直播数据;The pause instruction receiving unit 100 is configured to receive a pause instruction sent by the data collection client; the data collection client is configured to provide the collected live broadcast data to the live broadcast server;
插播视频数据获取单元200,用于响应于所述暂停指令,获取插播视频数据;The interstitial video data acquiring unit 200 is configured to acquire the interstitial video data in response to the pause instruction;
推送单元300,用于将所述插播视频数据推送至所述直播服务器,以使得所述直播服务器暂停向用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。The pushing unit 300 is configured to push the interstitial video data to the live broadcast server, so that the live broadcast server suspends sending the live broadcast data currently collected by the data collection client to the user client, and The user client sends the interstitial video data.
在本实施方式中,所述暂停指令中还包括时长信息;其中,从当前时刻开始,经过所述时长信息表征的时长后,所述直播服务器暂停播放所述数据采集客户端采集的直播数据;相应地,所述插播视频数据获取单元包括:In this embodiment, the pause command further includes duration information; wherein, after the duration of the duration information, the live broadcast server pauses playing the live broadcast data collected by the data collection client; Correspondingly, the in-stream video data acquiring unit includes:
目标数据下载量确定模块,用于检测当前的平均下载速度,并基于所述平均下载速度和所述时长信息表征的时长,确定目标数据下载量;a target data download amount determining module, configured to detect a current average download speed, and determine a target data download amount based on the average download speed and a duration of the duration information representation;
数据获取模块,用于获取与所述目标数据下载量相适配的插播视频数据。And a data acquiring module, configured to acquire the interpolated video data that is adapted to the target data download amount.
在本实施方式中,所述暂停指令中还包括暂停时长信息;其中,所述暂停时长信息用于表征暂停播放所述数据采集客户端采集的直播数据所持续的时长;相应地,所述插 播视频数据获取单元包括:时长匹配模块,用于从指定资源库中或者本地缓存中读取至少一个插播视频数据;其中,所述至少一个插播视频数据对应的播放时长之和与所述暂停时长信息表征的时长相匹配。In the embodiment, the pause command further includes pause duration information; wherein the pause duration information is used to indicate duration of time during which the live data collected by the data collection client is paused; correspondingly, the insert The video data obtaining unit includes: a duration matching module, configured to read at least one of the interstitial video data from the specified resource library or the local cache; wherein the sum of the play durations and the pause duration information corresponding to the at least one interstitial video data The duration of the characterization matches.
在本实施方式中,所述装置还包括:取消指令接收单元,用于接收所述数据采集客户端发来的取消暂停指令;停止推送单元,用于响应于所述取消暂停指令,停止向所述直播服务器推送插播视频数据,以使得所述直播服务器向所述用户客户端发送所述数据采集客户端当前采集的直播数据。In this embodiment, the device further includes: a cancel instruction receiving unit, configured to receive a cancel pause command sent by the data collection client; and a stop push unit, configured to stop the move in response to the cancel pause command The live broadcast server pushes the interstitial video data, so that the live broadcast server sends the live broadcast data currently collected by the data collection client to the user client.
上述实施方式公开的直播暂停装置,其实现的具体功能,可以与本申请中上述的直播暂停方法的实施方式相对照解释,可以实现本申请的直播暂停方法的实施方式并达到该方法实施方式的技术效果。The specific function of the live broadcast suspension device disclosed in the foregoing embodiment may be compared with the implementation manner of the live broadcast suspension method in the present application, and the implementation manner of the live suspension method of the present application may be implemented and the implementation method of the method may be implemented. Technical effects.
本申请还提供一种直播暂停方法,所述方法可以应用于直播服务器中。请参阅图6,所述方法可以包括以下步骤。The application also provides a live broadcast suspension method, which can be applied to a live broadcast server. Referring to FIG. 6, the method may include the following steps.
S21:接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据;其中,所述直播数据由数据采集客户端采集并上传。S21: Receive a live data request sent by the user client, and send the live data pointed by the live data request to the user client, where the live data is collected and uploaded by the data collection client.
在本实施方式中,用户客户端在打开直播平台的网站或者应用时,用户可以通过点击某个主播的房间或者点击某个主播的直播画面,来向直播服务器发送直播数据请求。该直播数据请求可以指向对应的直播数据。这样,直播服务器便可以接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据。其中,所述直播数据由数据采集客户端采集并上传。所述数据采集客户端可以与用于采集直播数据的摄像头、麦克风等设备相连,或者所述数据采集客户端本身可以包括摄像头、麦克风等设备。主播在开始直播时,数据采集客户端可以与直播服务器建立流连接。由于直播过程中数据采集客户端需要持续向直播服务器推送直播数据,因此所述流连接可以是长连接。In this embodiment, when the user client opens the website or application of the live broadcast platform, the user can send a live broadcast data request to the live broadcast server by clicking a certain anchor room or clicking a live broadcast screen of an anchor. The live data request can point to the corresponding live data. In this way, the live server can receive the live data request sent by the user client, and send the live data pointed to by the live data request to the user client. The live data is collected and uploaded by the data collection client. The data collection client may be connected to a camera, a microphone, or the like for collecting live data, or the data collection client itself may include a camera, a microphone, and the like. When the anchor starts to broadcast, the data collection client can establish a streaming connection with the live server. Since the data collection client needs to continuously push live data to the live server during the live broadcast, the stream connection may be a long connection.
S23:当接收到直播暂停装置发来的插播视频数据时,暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。S23: When the interstitial video data sent by the live broadcast suspension device is received, the live broadcast data is suspended from being sent to the user client, and the interstitial video data is pushed to the user client during the pause.
在本实施方式中,数据采集客户端在向直播服务器推送直播数据时,可以预先进行判断,是否从摄像头和麦克风中获取直播数据。如果主播当前在数据采集客户端中没有下达暂停指令,数据采集客户端便可以从摄像头和麦克风中获取直播数据。数据采集客户端便可以将获取的直播数据转换为直播数据流,并向直播服务器推送该转换得到的直播数据流。这样,用户客户端便可以从直播服务器中获取到该主播的直播画面。其中, 所述直播数据流可以是遵循流媒体协议的数据流。所述流媒体协议例如可以是RTP(Real-time Transport Protocol,实时传输协议)、RTCP(Real-time Transport Control Protocol,实时传输控制协议)、SRTP(Secure Real-time Transport Protocol,安全实时传输协议)等。In this embodiment, when the data collection client pushes the live data to the live server, it may determine in advance whether the live data is obtained from the camera and the microphone. If the anchor currently does not issue a pause command in the data collection client, the data collection client can obtain live data from the camera and the microphone. The data collection client can convert the obtained live data into a live data stream, and push the converted live data stream to the live server. In this way, the user client can obtain the live broadcast of the anchor from the live server. The live data stream may be a data stream that follows a streaming media protocol. The streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
在本实施方式中,如果主播在数据采集客户端中下达了暂停指令,数据采集客户端便可以暂停从摄像头和麦克风等设备中获取直播数据。为了能够向直播服务器继续推送直播数据流,此时数据采集客户端可以向直播暂停装置发送该暂停指令,以使得所述直播暂停装置可以提供用于直播的视频数据。In this embodiment, if the anchor sends a pause command in the data collection client, the data collection client can pause to obtain live data from devices such as a camera and a microphone. In order to continue to push the live data stream to the live server, the data collection client can send the pause instruction to the live pause device, so that the live pause device can provide video data for live broadcast.
在本实施方式中,当直播暂停装置接收到所述暂停指令时,便可以获取用于替代直播数据的插播视频数据。所述插播视频数据可以是主播预先在数据采集客户端中存储的视频素材。所述视频素材例如可以是视频集锦、广告、图片集等资源。所述插播视频数据可以统一存储于指定资源库中。所述指定资源库可以是文件夹,也可以是基于数据结构建立的数据库。所述数据库例如可以是MySQL、Oracle、DB2、Sybase等。In this embodiment, when the live broadcast suspension device receives the pause instruction, the interstitial video data for replacing the live broadcast data may be acquired. The interstitial video data may be video material stored in advance by the anchor in the data collection client. The video material may be, for example, a video highlight, an advertisement, a photo collection, and the like. The in-stream video data may be uniformly stored in a specified resource library. The specified resource library may be a folder or a database built based on a data structure. The database may be, for example, MySQL, Oracle, DB2, Sybase, or the like.
在本实施方式中,直播暂停装置在获取到插播视频数据后,便可以将所述插播视频数据推送至所述直播服务器。这样,当接收到直播暂停装置发来的插播视频数据时,直播服务器便可以暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。In this embodiment, after the live broadcast pause device obtains the interstitial video data, the broadcast video data may be pushed to the live broadcast server. In this way, when receiving the interstitial video data sent by the live broadcast suspension device, the live broadcast server may suspend sending the live broadcast data to the user client, and push the interstitial video data to the user client during the pause.
在本申请一个实施方式中,在暂停阶段结束后,数据采集客户端可以向直播暂停装置发送取消暂停指令。这样,直播暂停装置可以响应于所述取消暂停指令,停止向所述直播服务器推送插播视频数据。在本实施方式中,当直播服务器在指定时长内无法接收到所述直播暂停装置发来的插播视频数据时,表明当前已经结束了暂停阶段,从而可以向所述用户客户端推送所述数据采集客户端当前采集的直播数据。In an embodiment of the present application, after the pause phase ends, the data collection client may send a cancel pause command to the live broadcast suspension device. In this way, the live broadcast suspension device can stop pushing the interstitial video data to the live server in response to the cancel suspension instruction. In this embodiment, when the live broadcast server cannot receive the interstitial video data sent by the live broadcast suspension device within a specified duration, it indicates that the pause phase has been ended, so that the data collection can be pushed to the user client. The live data currently collected by the client.
在本申请一个实施方式中,直播服务器在接收到直播暂停装置发来的插播视频数据后,可以将接收到的所述插播视频数据转换为直播流数据,并向所述用户客户端推送所述直播流数据。期货总,所述直播流数据可以是遵循流媒体协议的数据流。所述流媒体协议例如可以是RTP(Real-time Transport Protocol,实时传输协议)、RTCP(Real-time Transport Control Protocol,实时传输控制协议)、SRTP(Secure Real-time Transport Protocol,安全实时传输协议)等。In an embodiment of the present application, after receiving the interstitial video data sent by the live broadcast suspension device, the live broadcast server may convert the received interstitial video data into live stream data, and push the user to the user client. Live stream data. In futures, the live stream data may be a data stream that follows a streaming protocol. The streaming media protocol may be, for example, RTP (Real-time Transport Protocol), Real-time Transport Control Protocol (RTCP), and Secure Real-time Transport Protocol (SRTP). Wait.
在本申请一个实施方式中,直播服务器还可以在数据采集客户端出现异常时,无法提供直播数据时,自动向用户客户端推送插播视频数据。具体地,当直播服务器在指定 时长内无法接收到所述数据采集客户端上传的直播数据时,表明数据采集客户端出现了异常,直播过程需要暂停。此时,直播服务器可以读取本地存储的插播视频数据,并向所述用户客户端推送读取的所述插播视频数据。所述本地存储的插播视频数据可以是在之前的暂停过程中由直播暂停装置发来的。直播服务器可以存储最近一段时间内直播暂停装置发来的插播视频数据,为了节省存储空间,可以将距离当前时间较远的插播视频数据自动删除。例如,直播服务器可以仅保留最近24小时内直播暂停装置发来的插播视频数据。In an implementation manner of the present application, the live broadcast server may also automatically push the interstitial video data to the user client when the live data is unavailable when the data collection client is abnormal. Specifically, when the live broadcast server cannot receive the live broadcast data uploaded by the data collection client within a specified duration, it indicates that the data collection client has an abnormality, and the live broadcast process needs to be suspended. At this time, the live broadcast server can read the locally stored interstitial video data and push the read interpolated video data to the user client. The locally stored interstitial video data may be sent by the live pause device during a previous pause. The live broadcast server can store the interstitial video data sent by the live broadcast pause device in the recent period. In order to save storage space, the interstitial video data that is far away from the current time can be automatically deleted. For example, the live server may only retain the in-stream video data sent by the live suspension device within the last 24 hours.
在本实施方式中,当数据采集客户端恢复正常,能够提供直播数据时,直播服务器便可以继续向用户客户端推送数据采集客户端上传的直播数据。具体地,当直播服器在推送从本地读取的所述插播视频数据的过程中,接收到所述数据采集客户端上传的直播数据时,表明此时数据采集客户端已经恢复正常,从而可以停止向所述用户客户端推送所述插播视频数据,并开始向所述用户客户端推送所述数据采集客户端上传的直播数据。In this embodiment, when the data collection client returns to normal and the live data can be provided, the live server can continue to push the live data uploaded by the data collection client to the user client. Specifically, when the live broadcast server receives the live broadcast data uploaded by the data collection client in the process of pushing the broadcast video data read from the local device, it indicates that the data collection client has returned to normal at this time, thereby Stop pushing the in-stream video data to the user client, and start pushing the live data uploaded by the data collection client to the user client.
请参阅图7,本申请还提供一种直播服务器,所述直播服务器包括:Referring to FIG. 7, the present application further provides a live broadcast server, where the live broadcast server includes:
直播数据发送单元110,用于接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据;其中,所述直播数据由数据采集客户端采集并上传;The live data sending unit 110 is configured to receive a live data request sent by the user client, and send the live data pointed by the live data request to the user client, where the live data is collected by the data collecting client. Upload
插播视频数据发送单元210,用于当接收到直播暂停装置发来的插播视频数据时,暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。The interstitial video data sending unit 210 is configured to: when receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live broadcast data to the user client, and pushing the interstitial to the user client during the pause period Video data.
在本实施方式中,所述直播服务器还包括:In this embodiment, the live broadcast server further includes:
直播数据重新发送单元,用于当在指定时长内无法接收到所述直播暂停装置发来的插播视频数据时,向所述用户客户端推送所述数据采集客户端当前采集的直播数据。The live data resending unit is configured to: when the in-stream video data sent by the live broadcast suspension device is not received within a specified duration, push the live data currently collected by the data collection client to the user client.
在本实施方式中,所述直播服务器还包括:In this embodiment, the live broadcast server further includes:
本地读取单元,用于当在指定时长内无法接收到所述数据采集客户端上传的直播数据时,读取本地存储的插播视频数据,并向所述用户客户端推送读取的所述插播视频数据。a local reading unit, configured to: when the live data uploaded by the data collection client cannot be received within a specified duration, read the locally stored interstitial video data, and push the read interpolated to the user client Video data.
上述实施方式公开的直播服务器,其实现的具体功能,可以与本申请中应用于直播服务器中的直播暂停方法的实施方式相对照解释,可以实现本申请的该直播暂停方法的实施方式并达到该方法实施方式的技术效果。The specific function of the live broadcast server disclosed in the foregoing embodiment may be compared with the implementation manner of the live broadcast suspension method applied in the live server in the present application, and the implementation manner of the live suspension method of the present application may be implemented and achieved. The technical effect of the method embodiment.
请参阅图8,本申请还提供一种直播暂停系统,所述系统包括数据采集客户端、直 播暂停装置、直播服务器以及用户客户端,其中:Referring to FIG. 8, the present application further provides a live broadcast suspension system, where the system includes a data collection client, a direct broadcast suspension device, a live broadcast server, and a user client, where:
所述数据采集客户端,用于向所述直播服务器提供采集的直播数据,并向所述直播暂停装置发送暂停指令;The data collection client is configured to provide the collected live broadcast data to the live broadcast server, and send a pause instruction to the live broadcast suspension device;
所述直播暂停装置,用于响应于所述暂停指令,获取插播视频数据;将所述插播视频数据推送至所述直播服务器;The live broadcast suspension device is configured to acquire the interstitial video data in response to the pause instruction; and push the interstitial video data to the live broadcast server;
所述直播服务器,用于在接收到所述直播暂停装置发送的插播视频数据后,暂停向所述用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。The live broadcast server is configured to: after receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live data currently collected by the data collection client to the user client, and sending the data to the user during the pause period. The client sends the interstitial video data.
上述实施方式公开的系统,其数据采集客户端、直播暂停装置、直播服务器以及用户客户端实现的具体功能,可以与本申请中上述的直播暂停方法的实施方式相对照解释,可以实现本申请的直播暂停方法的实施方式并达到该方法实施方式的技术效果。The specific functions implemented by the data collection client, the live broadcast suspension device, the live broadcast server, and the user client may be interpreted in comparison with the implementation manner of the live suspension method described in the present application, and the implementation of the present application may be implemented. The implementation method of the live suspension method and the technical effect of the method implementation method are achieved.
由上可见,本申请的数据采集客户端在下达暂停指令后,数据采集客户端可以继续与直播服务器保持通信连接,而不会与直播服务器断开连接。这样,当再次恢复直播时,数据采集客户端可以按照之前的通信连接向直播服务器提供采集的直播数据,从而减少了与直播服务器重新建立连接的时间,提高了直播的效率。此外,直播暂停装置便可以获取用于替代直播数据流的插播视频数据。然后,所述直播暂停装置可以将所述插播视频数据向直播服务器推送。这样,当直播服务器接收到推送至的插播视频数据时,便可以向用户客户端推送该插播视频数据,从而使得在数据采集客户端暂停从主播的摄像头和麦克风获取直播数据流时,可以由所述直播暂停装置向直播服务器推送插播视频数据,以保证用户客户端中播放的直播画面不会中断。It can be seen from the above that after the data collection client of the present application issues the pause command, the data collection client can continue to maintain a communication connection with the live server without disconnecting from the live server. In this way, when the live broadcast is resumed, the data collection client can provide the collected live data to the live server according to the previous communication connection, thereby reducing the time for re-establishing the connection with the live server and improving the efficiency of the live broadcast. In addition, the live pause device can obtain the interstitial video data for replacing the live stream. Then, the live broadcast suspension device can push the interstitial video data to the live server. In this way, when the live broadcast server receives the inserted video data to be pushed, the broadcast video data can be pushed to the user client, so that when the data collection client pauses to obtain the live data stream from the anchor camera and the microphone, The live broadcast suspension device pushes the inserted video data to the live server to ensure that the live video played in the user client is not interrupted.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开 发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, improvements to a technology could clearly distinguish between hardware improvements (eg, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (for process flow improvements). However, as technology advances, many of today's method flow improvements can be seen as direct improvements in hardware circuit architecture. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented by hardware entity modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system on a single PLD without having to ask the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, today, instead of manually making integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in programming development, but before compiling The original code has to be written in a specific programming language. This is called the Hardware Description Language (HDL). HDL is not the only one, but there are many kinds, such as ABEL (Advanced Boolean Expression Language). AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., are currently the most commonly used VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be apparent to those skilled in the art that the hardware flow for implementing the logic method flow can be easily obtained by simply programming the method flow into the integrated circuit with a few hardware description languages.
本领域技术人员也知道,除了以纯计算机可读程序代码方式实现客户端、服务器以外,完全可以通过将方法步骤进行逻辑编程来使得客户端、服务器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种客户端、服务器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art also know that in addition to implementing the client and the server in a purely computer readable program code, the logic steps can be used to make the client and the server use logic gates, switches, ASICs, and programmable logic. Controllers and embedded microcontrollers, etc., implement the same functionality. Thus such a client, server can be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component. Or even a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施方式或者实施方式的某些部分所述的方法。It will be apparent to those skilled in the art from the above description of the embodiments that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk. An optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present application or portions of the embodiments.
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。尤其,针对直播暂停装置、直播服务器和系统的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the implementation of the live pause device, the live server, and the system, reference may be made to the introduction of the foregoing method.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
虽然通过实施方式描绘了本申请,本领域普通技术人员知道,本申请有许多变形和变化而不脱离本申请的精神,希望所附的权利要求包括这些变形和变化而不脱离本申请的精神。While the present invention has been described by the embodiments of the present invention, it will be understood by those skilled in the art

Claims (22)

  1. 一种直播暂停方法,其特征在于,所述方法包括:A method for suspending a live broadcast, characterized in that the method comprises:
    在数据采集客户端向直播服务器提供采集的直播数据,以使得所述直播服务器将所述直播数据推送给用户客户端的情况下,接收主播下达的暂停指令;The data collection client provides the collected live data to the live broadcast server, so that the live broadcast server sends the live broadcast data to the user client, and receives the pause command issued by the anchor;
    响应于所述暂停指令,所述数据采集客户端在与所述直播服务器保持通信连接的情况下,暂停采集直播数据。In response to the pause instruction, the data collection client suspends collecting live data while maintaining a communication connection with the live server.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    接收所述主播下达的取消暂停指令,所述数据采集客户端重新采集直播数据,并通过所述通信连接向所述直播服务器提供重新采集的直播数据。Receiving the cancellation pause command issued by the anchor, the data collection client re-collects the live broadcast data, and provides the re-collected live broadcast data to the live broadcast server through the communication connection.
  3. 根据权利要求1所述的方法,其特征在于,在接收主播下达的暂停指令之后,所述方法还包括:The method of claim 1, wherein after receiving the pause command issued by the anchor, the method further comprises:
    响应于所述暂停指令,获取插播视频数据;Acquiring the interstitial video data in response to the pause instruction;
    将所述插播视频数据推送至所述直播服务器,以使得所述直播服务器暂停向所述用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。Pushing the in-stream video data to the live broadcast server, so that the live broadcast server pauses to send the live broadcast data currently collected by the data collection client to the user client, and sends the live broadcast data to the user client during the pause period. The interstitial video data.
  4. 根据权利要求3所述的方法,其特征在于,所述暂停指令由所述数据采集客户端按照下述方式生成:The method of claim 3 wherein said pause command is generated by said data collection client in the following manner:
    当所述数据采集客户端在第一指定时长内采集的直播数据所展示的画面均相同时,生成暂停指令;或者Generating a pause instruction when the live data collected by the data collection client during the first specified duration is the same; or
    当所述数据采集客户端在第二指定时长内均无法采集到直播数据时,生成暂停指令。When the data collection client cannot collect live data within the second specified duration, a pause command is generated.
  5. 根据权利要求3所述的方法,其特征在于,获取插播视频数据包括:The method according to claim 3, wherein the acquiring the interstitial video data comprises:
    从指定资源库中或者本地缓存中读取插播视频数据。Read in-stream video data from a specified repository or from a local cache.
  6. 根据权利要求3或5所述的方法,其特征在于,所述插播视频数据与时间节点相关联,所述时间节点用于表征所述插播视频数据最近一次被读取的时间节点;The method according to claim 3 or 5, wherein the interstitial video data is associated with a time node, and the time node is used to represent a time node at which the interstitial video data was last read;
    相应地,获取插播视频数据包括:Accordingly, obtaining the interstitial video data includes:
    从距离当前时间节点超过指定时间阈值的时间节点关联的插播视频数据中获取用于推送至所述直播服务器的插播视频数据。The interstitial video data for push to the live server is obtained from the interstitial video data associated with the time node whose current time node exceeds the specified time threshold.
  7. 根据权利要求3所述的方法,其特征在于,所述暂停指令中还包括时长信息;其中,从当前时刻开始,经过所述时长信息表征的时长后,所述直播服务器暂停播放所述数据采集客户端采集的直播数据;相应地,获取插播视频数据包括:The method according to claim 3, wherein the pause command further includes duration information; wherein, after the current time, the live broadcast server pauses playing the data collection after the duration represented by the duration information The live data collected by the client; accordingly, obtaining the in-stream video data includes:
    检测当前的平均下载速度,并基于所述平均下载速度和所述时长信息表征的时长,确定目标数据下载量;Detecting a current average download speed, and determining a target data download amount based on the average download speed and a duration of the duration information representation;
    获取与所述目标数据下载量相适配的插播视频数据。Obtaining interpolated video data that is adapted to the target data download amount.
  8. 根据权利要求3所述的方法,其特征在于,所述暂停指令中还包括暂停时长信息;其中,所述暂停时长信息用于表征暂停播放所述数据采集客户端采集的直播数据所持续的时长;相应地,获取插播视频数据包括:The method according to claim 3, wherein the pause command further includes pause duration information; wherein the pause duration information is used to indicate duration of time during which the live data collected by the data collection client is paused. Accordingly, obtaining the in-stream video data includes:
    从指定资源库中或者本地缓存中读取至少一个插播视频数据;其中,所述至少一个插播视频数据对应的播放时长之和与所述暂停时长信息表征的时长相匹配。Reading at least one of the interstitial video data from the specified resource library or the local cache; wherein, the sum of the play durations corresponding to the at least one interstitial video data matches the duration of the pause duration information representation.
  9. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, wherein the method further comprises:
    接收所述数据采集客户端发来的取消暂停指令;Receiving a cancellation pause command sent by the data collection client;
    响应于所述取消暂停指令,停止向所述直播服务器推送插播视频数据,以使得所述直播服务器向所述用户客户端发送所述数据采集客户端当前采集的直播数据。In response to the canceling the suspension instruction, stopping the insertion of the interstitial video data to the live server, so that the live broadcast server sends the live data collected by the data collection client to the user client.
  10. 一种直播暂停装置,其特征在于,所述装置包括:A live broadcast suspension device, characterized in that the device comprises:
    暂停指令接收单元,用于接收数据采集客户端发来的暂停指令;所述数据采集客户端用于向直播服务器提供采集的直播数据;a pause instruction receiving unit, configured to receive a pause instruction sent by the data collection client; the data collection client is configured to provide the collected live data to the live server;
    插播视频数据获取单元,用于响应于所述暂停指令,获取插播视频数据;An interstitial video data acquiring unit, configured to acquire the interstitial video data in response to the pause instruction;
    推送单元,用于将所述插播视频数据推送至所述直播服务器,以使得所述直播服务器暂停向用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。a pushing unit, configured to push the interstitial video data to the live broadcast server, so that the live broadcast server pauses to send the live data collected by the data collection client to the user client, and sends the live data to the user during the pause period. The client sends the interstitial video data.
  11. 根据权利要求10所述的装置,其特征在于,所述暂停指令中还包括时长信息;其中,从当前时刻开始,经过所述时长信息表征的时长后,所述直播服务器暂停播放所述数据采集客户端采集的直播数据;相应地,所述插播视频数据获取单元包括:The apparatus according to claim 10, wherein the pause command further includes duration information; wherein, after the current time, the live broadcast server pauses playing the data collection after the duration represented by the duration information The live broadcast data collected by the client; correspondingly, the interstitial video data acquiring unit includes:
    目标数据下载量确定模块,用于检测当前的平均下载速度,并基于所述平均下载速度和所述时长信息表征的时长,确定目标数据下载量;a target data download amount determining module, configured to detect a current average download speed, and determine a target data download amount based on the average download speed and a duration of the duration information representation;
    数据获取模块,用于获取与所述目标数据下载量相适配的插播视频数据。And a data acquiring module, configured to acquire the interpolated video data that is adapted to the target data download amount.
  12. 根据权利要求10所述的装置,其特征在于,所述暂停指令中还包括暂停时长信息;其中,所述暂停时长信息用于表征暂停播放所述数据采集客户端采集的直播数据所持续的时长;相应地,所述插播视频数据获取单元包括:The device according to claim 10, wherein the pause command further includes pause duration information; wherein the pause duration information is used to indicate duration of playing the live broadcast data collected by the data collection client. Correspondingly, the in-stream video data acquiring unit includes:
    时长匹配模块,用于从指定资源库中或者本地缓存中读取至少一个插播视频数据;其中,所述至少一个插播视频数据对应的播放时长之和与所述暂停时长信息表征的时长相匹配。The duration matching module is configured to read at least one of the interstitial video data from the specified resource library or the local cache; wherein the sum of the play durations corresponding to the at least one interstitial video data matches the duration of the pause duration information representation.
  13. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device according to claim 10, wherein the device further comprises:
    取消指令接收单元,用于接收所述数据采集客户端发来的取消暂停指令;a cancel instruction receiving unit, configured to receive an unsuspend instruction sent by the data collection client;
    停止推送单元,用于响应于所述取消暂停指令,停止向所述直播服务器推送插播视频数据,以使得所述直播服务器向所述用户客户端发送所述数据采集客户端当前采集的直播数据。Stopping the pushing unit, in response to the canceling the suspension instruction, stopping pushing the interstitial video data to the live server, so that the live server sends the live data currently collected by the data collection client to the user client.
  14. 一种直播暂停方法,其特征在于,所述方法包括:A method for suspending a live broadcast, characterized in that the method comprises:
    接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据;其中,所述直播数据由数据采集客户端采集并上传;Receiving a live data request sent by the user client, and sending the live data pointed by the live data request to the user client; wherein the live data is collected and uploaded by the data collection client;
    当接收到直播暂停装置发来的插播视频数据时,暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。When the interstitial video data sent by the live broadcast suspension device is received, the live broadcast data is suspended from being sent to the user client, and the interstitial video data is pushed to the user client during the pause.
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:The method of claim 14, wherein the method further comprises:
    当在指定时长内无法接收到所述直播暂停装置发来的插播视频数据时,向所述用户客户端推送所述数据采集客户端当前采集的直播数据。When the in-stream video data sent by the live broadcast suspension device cannot be received within a specified duration, the live data collected by the data collection client is pushed to the user client.
  16. 根据权利要求14所述的方法,其特征在于,向所述用户客户端推送所述插播视频数据包括:The method of claim 14, wherein the pushing the interstitial video data to the user client comprises:
    将接收到的所述插播视频数据转换为直播流数据,并向所述用户客户端推送所述直播流数据。Transmitting the received in-stream video data into live stream data, and pushing the live stream data to the user client.
  17. 根据权利要求14所述的方法,其特征在于,所述方法还包括:The method of claim 14, wherein the method further comprises:
    当在指定时长内无法接收到所述数据采集客户端上传的直播数据时,读取本地存储的插播视频数据,并向所述用户客户端推送读取的所述插播视频数据。When the live data uploaded by the data collection client cannot be received within a specified duration, the locally stored interstitial video data is read, and the read interstitial video data is pushed to the user client.
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method of claim 17, wherein the method further comprises:
    当在推送读取的所述插播视频数据的过程中接收到所述数据采集客户端上传的直播数据时,停止向所述用户客户端推送所述插播视频数据,并开始向所述用户客户端推送所述数据采集客户端上传的直播数据。When the live data uploaded by the data collection client is received during the process of pushing the read-in video data, stop pushing the video data to the user client, and start to the user client. Push the live data uploaded by the data collection client.
  19. 一种直播服务器,其特征在于,所述直播服务器包括:A live broadcast server, wherein the live broadcast server includes:
    直播数据发送单元,用于接收用户客户端发来的直播数据请求,并向所述用户客户端发送所述直播数据请求指向的直播数据;其中,所述直播数据由数据采集客户端采集并上传;The live data sending unit is configured to receive a live data request sent by the user client, and send the live data pointed by the live data request to the user client, where the live data is collected and uploaded by the data collecting client. ;
    插播视频数据发送单元,用于当接收到直播暂停装置发来的插播视频数据时,暂停向所述用户客户端发送所述直播数据,并在暂停期间向所述用户客户端推送所述插播视频数据。The in-stream video data sending unit is configured to: when receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live broadcast data to the user client, and pushing the interstitial video to the user client during the pause period; data.
  20. 根据权利要求19所述的直播服务器,其特征在于,所述直播服务器还包括:The live broadcast server according to claim 19, wherein the live broadcast server further comprises:
    直播数据重新发送单元,用于当在指定时长内无法接收到所述直播暂停装置发来的插播视频数据时,向所述用户客户端推送所述数据采集客户端当前采集的直播数据。The live data resending unit is configured to: when the in-stream video data sent by the live broadcast suspension device is not received within a specified duration, push the live data currently collected by the data collection client to the user client.
  21. 根据权利要求19所述的直播服务器,其特征在于,所述直播服务器还包括:The live broadcast server according to claim 19, wherein the live broadcast server further comprises:
    本地读取单元,用于当在指定时长内无法接收到所述数据采集客户端上传的直播数据时,读取本地存储的插播视频数据,并向所述用户客户端推送读取的所述插播视频数据。a local reading unit, configured to: when the live data uploaded by the data collection client cannot be received within a specified duration, read the locally stored interstitial video data, and push the read interpolated to the user client Video data.
  22. 一种直播暂停系统,其特征在于,所述系统包括数据采集客户端、直播暂停装置、直播服务器以及用户客户端,其中:A live broadcast suspension system, characterized in that the system comprises a data collection client, a live suspension device, a live broadcast server and a user client, wherein:
    所述数据采集客户端,用于向所述直播服务器提供采集的直播数据,并向所述直播暂停装置发送暂停指令;The data collection client is configured to provide the collected live broadcast data to the live broadcast server, and send a pause instruction to the live broadcast suspension device;
    所述直播暂停装置,用于响应于所述暂停指令,获取插播视频数据;将所述插播视频数据推送至所述直播服务器;The live broadcast suspension device is configured to acquire the interstitial video data in response to the pause instruction; and push the interstitial video data to the live broadcast server;
    所述直播服务器,用于在接收到所述直播暂停装置发送的插播视频数据后,暂停向所述用户客户端发送所述数据采集客户端当前采集的直播数据,并在暂停期间向所述用户客户端发送所述插播视频数据。The live broadcast server is configured to: after receiving the interstitial video data sent by the live broadcast suspension device, suspending sending the live data currently collected by the data collection client to the user client, and sending the data to the user during the pause period. The client sends the interstitial video data.
PCT/CN2018/093994 2017-07-31 2018-07-02 Live broadcast pausing method and system, live broadcast pausing apparatus, and live broadcast server WO2019024638A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710637551.2A CN107241615A (en) 2017-07-31 2017-07-31 Live pause method, system, live pause device and direct broadcast server
CN201710637551.2 2017-07-31

Publications (1)

Publication Number Publication Date
WO2019024638A1 true WO2019024638A1 (en) 2019-02-07

Family

ID=59988226

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093994 WO2019024638A1 (en) 2017-07-31 2018-07-02 Live broadcast pausing method and system, live broadcast pausing apparatus, and live broadcast server

Country Status (3)

Country Link
CN (1) CN107241615A (en)
TW (1) TW201911872A (en)
WO (1) WO2019024638A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4057631A1 (en) * 2021-03-08 2022-09-14 Beijing Dajia Internet Information Technology Co., Ltd. Method and apparatus for live streaming, server, system and storage medium

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241615A (en) * 2017-07-31 2017-10-10 合网络技术(北京)有限公司 Live pause method, system, live pause device and direct broadcast server
CN109756756B (en) * 2017-11-08 2021-10-22 阿里巴巴集团控股有限公司 Video playing method and video playing device
CN108055245A (en) * 2017-11-28 2018-05-18 北京潘达互娱科技有限公司 Internet video live broadcasting method, device, electronic equipment and computer storage media
CN107948666A (en) * 2017-11-28 2018-04-20 北京潘达互娱科技有限公司 Internet video live broadcasting method, device, electronic equipment and computer-readable storage medium
CN108174295B (en) * 2017-12-29 2021-05-25 北京奇虎科技有限公司 Method and device for notifying anchor state and method and device for prompting anchor state
CN110858910B (en) * 2018-08-23 2022-05-27 广州虎牙信息科技有限公司 Live video display method, device, equipment and storage medium
CN109831695B (en) * 2018-12-15 2022-09-20 深圳壹账通智能科技有限公司 Live broadcast control method and device, electronic equipment and storage medium
CN109672908A (en) * 2018-12-27 2019-04-23 北京潘达互娱科技有限公司 A kind of method for protecting privacy, device and mobile terminal
CN113727164B (en) * 2020-05-26 2024-04-26 百度在线网络技术(北京)有限公司 Live broadcasting room entrance display method and device, electronic equipment and storage medium
CN111787347A (en) * 2020-07-15 2020-10-16 广州繁星互娱信息科技有限公司 Live broadcast time length calculation method, live broadcast display method, device and equipment
CN114257572B (en) * 2020-09-11 2023-11-24 腾讯科技(深圳)有限公司 Data processing method, device, computer readable medium and electronic equipment
CN115701710A (en) * 2021-08-02 2023-02-10 北京字节跳动网络技术有限公司 Live content switching and displaying method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011075016A1 (en) * 2009-12-15 2011-06-23 Telefonaktiebolaget L M Ericsson (Publ) Pausing of a live media stream
US20140109127A1 (en) * 2008-03-07 2014-04-17 Arun Kalmanje Pause and replay of media content through bookmarks on a server device
CN105227546A (en) * 2015-09-08 2016-01-06 百度在线网络技术(北京)有限公司 For suspending the method and apparatus of RTMP stream
CN105897672A (en) * 2015-11-16 2016-08-24 乐视云计算有限公司 Network broadcast method, device and system
CN106792230A (en) * 2016-12-27 2017-05-31 Tcl数码科技(深圳)有限责任公司 A kind of advertisement interactive approach and system based on net cast
CN107241615A (en) * 2017-07-31 2017-10-10 合网络技术(北京)有限公司 Live pause method, system, live pause device and direct broadcast server

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168505B (en) * 2014-08-07 2019-07-02 广州华多网络科技有限公司 A kind of client terminal playing control method and client
CN105898357A (en) * 2015-12-22 2016-08-24 乐视网信息技术(北京)股份有限公司 Video switching method and device
CN105635764B (en) * 2016-01-14 2020-11-06 腾讯科技(深圳)有限公司 Method and device for playing push information in live video
CN105791889A (en) * 2016-05-04 2016-07-20 武汉斗鱼网络科技有限公司 Advertisement inter-cut method for video live broadcasting and advertisement inter-cut device for video live broadcasting
CN106792095B (en) * 2016-12-23 2020-05-22 深圳Tcl数字技术有限公司 Method and system for intelligent television advertisement insertion
CN106658032B (en) * 2017-01-19 2020-02-21 三峡大学 Multi-camera live broadcasting method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140109127A1 (en) * 2008-03-07 2014-04-17 Arun Kalmanje Pause and replay of media content through bookmarks on a server device
WO2011075016A1 (en) * 2009-12-15 2011-06-23 Telefonaktiebolaget L M Ericsson (Publ) Pausing of a live media stream
CN105227546A (en) * 2015-09-08 2016-01-06 百度在线网络技术(北京)有限公司 For suspending the method and apparatus of RTMP stream
CN105897672A (en) * 2015-11-16 2016-08-24 乐视云计算有限公司 Network broadcast method, device and system
CN106792230A (en) * 2016-12-27 2017-05-31 Tcl数码科技(深圳)有限责任公司 A kind of advertisement interactive approach and system based on net cast
CN107241615A (en) * 2017-07-31 2017-10-10 合网络技术(北京)有限公司 Live pause method, system, live pause device and direct broadcast server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4057631A1 (en) * 2021-03-08 2022-09-14 Beijing Dajia Internet Information Technology Co., Ltd. Method and apparatus for live streaming, server, system and storage medium
US11601690B2 (en) 2021-03-08 2023-03-07 Beijing Dajia Internet Information Technology Co., Ltd. Method and apparatus for live streaming, server, system and storage medium

Also Published As

Publication number Publication date
TW201911872A (en) 2019-03-16
CN107241615A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
WO2019024638A1 (en) Live broadcast pausing method and system, live broadcast pausing apparatus, and live broadcast server
CN109089130B (en) Method and device for adjusting timestamp of live video
US9374403B2 (en) Media stream fragment request
CN110876080B (en) Video screen projection method and device, computer equipment and storage medium
US20150293648A1 (en) Web video occlusion: a method for rendering the videos watched over multiple windows
US20140019986A1 (en) Managing multi-threaded operations in a multimedia authoring environment
EP3500941A1 (en) Methods and systems for instantaneous asynchronous media sharing
WO2022127523A1 (en) Video playback method and apparatus, device, and medium
US9197686B1 (en) Backfill of video stream
CN111447455A (en) Live video stream playback processing method and device and computing equipment
US9281991B2 (en) Media streaming
WO2018192183A1 (en) Method and apparatus for processing video file during wireless screen delivery
JP2022524073A (en) Methods and equipment for dynamic adaptive streaming with HTTP
US20240171797A1 (en) Techniques for providing a content stream based on a delivered stream of content
US11457286B2 (en) Video distribution apparatus, distribution method, and recording medium
WO2022218425A1 (en) Recording streaming method and apparatus, device, and medium
US10498787B2 (en) Communication apparatus, communication method, and program
CN103414863A (en) Method and device for processing video
CN111800649A (en) Method and device for storing video and method and device for generating video
WO2022171039A1 (en) Video pre-loading method and apparatus, and device and medium
US11882170B2 (en) Extended W3C media extensions for processing dash and CMAF inband events
US10893331B1 (en) Subtitle processing for devices with limited memory
CN117014669A (en) Video recording task migration method, device and system and electronic equipment
CN117201894A (en) Media stream slicing method, device, system, equipment and storage medium
CN117596438A (en) Video stream processing system and method

Legal Events

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

Ref document number: 18840510

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18840510

Country of ref document: EP

Kind code of ref document: A1